From: Enlightenment S. <no-...@en...> - 2012-08-17 12:09:33
|
Log: move pool disconnect event serializing to regular disconnect function to catch cases where all pool members have individually disconnected Author: discomfitor Date: 2012-08-17 05:09:26 -0700 (Fri, 17 Aug 2012) New Revision: 75388 Trac: http://trac.enlightenment.org/e/changeset/75388 Modified: trunk/PROTO/esskyuehl/src/lib/esql_connect.c trunk/PROTO/esskyuehl/src/lib/esql_pool.c Modified: trunk/PROTO/esskyuehl/src/lib/esql_connect.c =================================================================== --- trunk/PROTO/esskyuehl/src/lib/esql_connect.c 2012-08-17 11:55:51 UTC (rev 75387) +++ trunk/PROTO/esskyuehl/src/lib/esql_connect.c 2012-08-17 12:09:26 UTC (rev 75388) @@ -93,10 +93,13 @@ e->fdh = NULL; if (e->pool_member) e->pool_struct->e_connected--; - else + if ((!e->pool_member) || (!e->pool_struct->e_connected)) { INFO("Disconnected"); - ecore_event_add(ESQL_EVENT_DISCONNECT, e, (Ecore_End_Cb)esql_fake_free, NULL); + if (e->pool_member) + ecore_event_add(ESQL_EVENT_DISCONNECT, e->pool_struct, (Ecore_End_Cb)esql_fake_free, NULL); + else + ecore_event_add(ESQL_EVENT_DISCONNECT, e, (Ecore_End_Cb)esql_fake_free, NULL); e->event_count++; } } Modified: trunk/PROTO/esskyuehl/src/lib/esql_pool.c =================================================================== --- trunk/PROTO/esskyuehl/src/lib/esql_pool.c 2012-08-17 11:55:51 UTC (rev 75387) +++ trunk/PROTO/esskyuehl/src/lib/esql_pool.c 2012-08-17 12:09:26 UTC (rev 75388) @@ -135,8 +135,6 @@ EINA_INLIST_FOREACH(ep->esqls, e) if (e->connected) esql_disconnect(e); ep->connected = EINA_FALSE; - ep->e_connected = 0; - ecore_event_add(ESQL_EVENT_DISCONNECT, ep, (Ecore_End_Cb)esql_fake_free, NULL); } Esql_Query_Id |