im.pidgin.pidgin: c55dabf731ea4d3fcb287e43b157062eb2d425fa
markdoliner at pidgin.im
markdoliner at pidgin.im
Mon Nov 26 14:45:33 EST 2007
-----------------------------------------------------------------
Revision: c55dabf731ea4d3fcb287e43b157062eb2d425fa
Ancestor: a00ff8e1a342a8326627d51728ad97699740c945
Author: markdoliner at pidgin.im
Date: 2007-11-26T19:39:21
Branch: im.pidgin.pidgin
Modified files:
libpurple/certificate.c
ChangeLog:
Simplify this a little bit. Most of this change is just removing
a level on indentation.
-------------- next part --------------
============================================================
--- libpurple/certificate.c 7a5f333abd5b8481d5aa1ec7589fd6a0e8e1b1ca
+++ libpurple/certificate.c 71082eb0ec224f4575b4e6a8e43e063e06e9b9a0
@@ -1758,7 +1758,6 @@ purple_certificate_register_pool(PurpleC
gboolean
purple_certificate_register_pool(PurpleCertificatePool *pool)
{
- gboolean success = FALSE;
g_return_val_if_fail(pool, FALSE);
g_return_val_if_fail(pool->scheme_name, FALSE);
g_return_val_if_fail(pool->name, FALSE);
@@ -1771,46 +1770,42 @@ purple_certificate_register_pool(PurpleC
/* Initialize the pool if needed */
if (pool->init) {
+ gboolean success;
+
success = pool->init();
- } else {
- success = TRUE;
+ if (!success)
+ return FALSE;
}
-
- if (success) {
- /* Register the Pool */
- cert_pools = g_list_prepend(cert_pools, pool);
- /* TODO: Emit a signal that the pool got registered */
+ /* Register the Pool */
+ cert_pools = g_list_prepend(cert_pools, pool);
- PURPLE_DBUS_REGISTER_POINTER(pool, PurpleCertificatePool);
- purple_signal_register(pool, /* Signals emitted from pool */
- "certificate-stored",
- purple_marshal_VOID__POINTER_POINTER,
- NULL, /* No callback return value */
- 2, /* Two non-data arguments */
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CERTIFICATEPOOL),
- purple_value_new(PURPLE_TYPE_STRING));
+ /* TODO: Emit a signal that the pool got registered */
- purple_signal_register(pool, /* Signals emitted from pool */
- "certificate-deleted",
- purple_marshal_VOID__POINTER_POINTER,
- NULL, /* No callback return value */
- 2, /* Two non-data arguments */
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CERTIFICATEPOOL),
- purple_value_new(PURPLE_TYPE_STRING));
+ PURPLE_DBUS_REGISTER_POINTER(pool, PurpleCertificatePool);
+ purple_signal_register(pool, /* Signals emitted from pool */
+ "certificate-stored",
+ purple_marshal_VOID__POINTER_POINTER,
+ NULL, /* No callback return value */
+ 2, /* Two non-data arguments */
+ purple_value_new(PURPLE_TYPE_SUBTYPE,
+ PURPLE_SUBTYPE_CERTIFICATEPOOL),
+ purple_value_new(PURPLE_TYPE_STRING));
+ purple_signal_register(pool, /* Signals emitted from pool */
+ "certificate-deleted",
+ purple_marshal_VOID__POINTER_POINTER,
+ NULL, /* No callback return value */
+ 2, /* Two non-data arguments */
+ purple_value_new(PURPLE_TYPE_SUBTYPE,
+ PURPLE_SUBTYPE_CERTIFICATEPOOL),
+ purple_value_new(PURPLE_TYPE_STRING));
- purple_debug_info("certificate",
- "CertificatePool %s registered\n",
- pool->name);
- return TRUE;
- } else {
- return FALSE;
- }
-
- /* Control does not reach this point */
+ purple_debug_info("certificate",
+ "CertificatePool %s registered\n",
+ pool->name);
+
+ return TRUE;
}
gboolean
More information about the Commits
mailing list