struct _CamelCertDBPrivate {
GMutex db_lock; /* for the db hashtable/array */
GMutex io_lock; /* load/save lock, for access to saved_count, etc */
- GMutex alloc_lock; /* for setting up and using allocators */
};
static gint certdb_header_load (CamelCertDB *certdb, FILE *istream);
g_mutex_clear (&priv->db_lock);
g_mutex_clear (&priv->io_lock);
- g_mutex_clear (&priv->alloc_lock);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (camel_certdb_parent_class)->finalize (object);
g_mutex_init (&certdb->priv->db_lock);
g_mutex_init (&certdb->priv->io_lock);
- g_mutex_init (&certdb->priv->alloc_lock);
}
CamelCertDB *
g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), NULL);
- g_mutex_lock (&certdb->priv->alloc_lock);
-
cert = g_slice_new0 (CamelCert);
cert->refcount = 1;
- g_mutex_unlock (&certdb->priv->alloc_lock);
-
return cert;
}