[evolution-data-server] Add camel_cert_ref().



commit 4175ee849bebe61e918492579076c7c007bb4d5e
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Sep 22 10:26:10 2013 -0400

    Add camel_cert_ref().
    
    Replaces camel_certdb_cert_ref(); removes the CamelCertDB argument.

 camel/camel-certdb.c                    |   10 ++++------
 camel/camel-certdb.h                    |    2 +-
 docs/reference/camel/camel-sections.txt |    2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c
index 95c6d0e..59db3f9 100644
--- a/camel/camel-certdb.c
+++ b/camel/camel-certdb.c
@@ -504,8 +504,8 @@ camel_certdb_get_host (CamelCertDB *certdb,
        key = certdb_key_new (hostname, fingerprint);
 
        cert = g_hash_table_lookup (certdb->cert_hash, key);
-       if (cert)
-               camel_certdb_cert_ref (certdb, cert);
+       if (cert != NULL)
+               camel_cert_ref (cert);
 
        certdb_key_free (key);
 
@@ -542,7 +542,7 @@ camel_certdb_put (CamelCertDB *certdb,
                camel_certdb_cert_unref (certdb, old_cert);
        }
 
-       camel_certdb_cert_ref (certdb, cert);
+       camel_cert_ref (cert);
        g_ptr_array_add (certdb->certs, cert);
        /* takes ownership of 'key' */
        g_hash_table_insert (certdb->cert_hash, key, cert);
@@ -598,10 +598,8 @@ camel_cert_new (void)
 }
 
 void
-camel_certdb_cert_ref (CamelCertDB *certdb,
-                       CamelCert *cert)
+camel_cert_ref (CamelCert *cert)
 {
-       g_return_if_fail (CAMEL_IS_CERTDB (certdb));
        g_return_if_fail (cert != NULL);
        g_return_if_fail (cert->refcount > 0);
 
diff --git a/camel/camel-certdb.h b/camel/camel-certdb.h
index 6f0fa35..276994c 100644
--- a/camel/camel-certdb.h
+++ b/camel/camel-certdb.h
@@ -140,7 +140,7 @@ void camel_certdb_put (CamelCertDB *certdb, CamelCert *cert);
 void camel_certdb_remove_host (CamelCertDB *certdb, const gchar *hostname, const gchar *fingerprint);
 
 CamelCert *camel_cert_new (void);
-void camel_certdb_cert_ref (CamelCertDB *certdb, CamelCert *cert);
+void camel_cert_ref (CamelCert *cert);
 void camel_certdb_cert_unref (CamelCertDB *certdb, CamelCert *cert);
 
 void camel_certdb_clear (CamelCertDB *certdb);
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index bb2626c..5f1de3c 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -96,7 +96,7 @@ camel_certdb_get_host
 camel_certdb_put
 camel_certdb_remove_host
 camel_cert_new
-camel_certdb_cert_ref
+camel_cert_ref
 camel_certdb_cert_unref
 camel_certdb_clear
 camel_cert_get_string


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]