diff options
| author | Jedy Wang <jedy.wang@sun.com> | 2009-04-21 14:23:22 +0800 |
|---|---|---|
| committer | jedy <jedy@pampas.(none)> | 2009-04-21 14:32:25 +0800 |
| commit | 8463fec3243663ca763851ee2d88fcb182a089f1 (patch) | |
| tree | 2f61b1721b482c5a78685b4304626549b9f7417e | |
| parent | cd0a267535ae2d3277ed93bbe9021af842d7dc49 (diff) | |
| download | evolution-data-server-8463fec3243663ca763851ee2d88fcb182a089f1.tar.gz | |
Fix for bug #578210
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | libedataserver/e-component-listener.c | 14 |
2 files changed, 13 insertions, 8 deletions
@@ -1,3 +1,10 @@ +2009-04-21 Wang Xin <jedy.wang@sun.com> + + ** Fix for bug #578210 + + * libedataserver/e-component-listener.c: (connection_listen_cb): Updated + the code to handle re-entrant problem. + 2009-04-12 Matthew Barnes <mbarnes@redhat.com> ** Remove a bunch of juvenile comments. Source code should diff --git a/libedataserver/e-component-listener.c b/libedataserver/e-component-listener.c index 3dc0b5966..00bd17389 100644 --- a/libedataserver/e-component-listener.c +++ b/libedataserver/e-component-listener.c @@ -36,18 +36,17 @@ static guint comp_listener_signals[LAST_SIGNAL]; static void connection_listen_cb (gpointer object, gpointer user_data) { - GList *l, *next = NULL; EComponentListener *cl; g_static_rec_mutex_lock (&watched_lock); - for (l = watched_connections; l != NULL; l = next) { - next = l->next; - cl = l->data; - - switch (ORBit_small_get_connection_status (cl->priv->component)) { + cl = (EComponentListener *)user_data; + /* cl can be removed in e_component_listener_finalize */ + if (g_list_find (watched_connections, cl) == NULL) + g_static_rec_mutex_unlock (&watched_lock); + switch (ORBit_small_get_connection_status (cl->priv->component)) { case ORBIT_CONNECTION_DISCONNECTED : - watched_connections = g_list_delete_link (watched_connections, l); + watched_connections = g_list_remove (watched_connections, cl); g_object_ref (cl); g_signal_emit (cl, comp_listener_signals[COMPONENT_DIED], 0); @@ -56,7 +55,6 @@ connection_listen_cb (gpointer object, gpointer user_data) break; default : break; - } } g_static_rec_mutex_unlock (&watched_lock); |
