deal with backends that might not have loaded successfully (they'll have a
2003-01-09 Chris Toshok <toshok@ximian.com> * backend/pas/pas-book-factory.c (backend_last_client_gone_cb): deal with backends that might not have loaded successfully (they'll have a NULL uri). svn path=/trunk/; revision=19385
This commit is contained in:

committed by
Chris Toshok

parent
fd67bd851b
commit
50a352b367
@ -1,3 +1,9 @@
|
||||
2003-01-09 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* backend/pas/pas-book-factory.c (backend_last_client_gone_cb):
|
||||
deal with backends that might not have loaded successfully
|
||||
(they'll have a NULL uri).
|
||||
|
||||
2003-01-09 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* gui/component/select-names/e-select-names-bonobo.c
|
||||
|
@ -143,29 +143,30 @@ backend_last_client_gone_cb (PASBackend *backend, gpointer data)
|
||||
{
|
||||
PASBookFactory *factory;
|
||||
const char *uri;
|
||||
gpointer orig_key;
|
||||
gboolean result;
|
||||
char *orig_uri;
|
||||
|
||||
factory = PAS_BOOK_FACTORY (data);
|
||||
|
||||
/* Remove the backend from the active server map */
|
||||
|
||||
uri = pas_backend_get_uri (backend);
|
||||
g_assert (uri != NULL);
|
||||
if (uri) {
|
||||
gpointer orig_key;
|
||||
gboolean result;
|
||||
char *orig_uri;
|
||||
|
||||
result = g_hash_table_lookup_extended (factory->priv->active_server_map, uri,
|
||||
&orig_key, NULL);
|
||||
g_assert (result != FALSE);
|
||||
result = g_hash_table_lookup_extended (factory->priv->active_server_map, uri,
|
||||
&orig_key, NULL);
|
||||
g_assert (result != FALSE);
|
||||
|
||||
orig_uri = orig_key;
|
||||
orig_uri = orig_key;
|
||||
|
||||
g_hash_table_remove (factory->priv->active_server_map, orig_uri);
|
||||
g_free (orig_uri);
|
||||
g_hash_table_remove (factory->priv->active_server_map, orig_uri);
|
||||
g_free (orig_uri);
|
||||
|
||||
g_object_unref (backend);
|
||||
g_object_unref (backend);
|
||||
|
||||
/* Notify upstream if there are no more backends */
|
||||
/* Notify upstream if there are no more backends */
|
||||
}
|
||||
|
||||
if (g_hash_table_size (factory->priv->active_server_map) == 0)
|
||||
g_signal_emit (G_OBJECT (factory), factory_signals[LAST_BOOK_GONE], 0);
|
||||
|
Reference in New Issue
Block a user