On Sun, 12 Dec 2010 23:26:21 -0800 "Enlightenment SVN" <no-re...@enlightenment.org> wrote:
> Log: > discomfitor... SPANK! REVERT REVERT REVERT! i've been sitting in a > text console for a while because of this. and when dr. evil sits in a > text console for a while... he gets angry. when dr. evil gets angry, > mr. bigglesworth gets upset... and when mr. migglesworth gets upset... > PEOPLE DIE! > > /me aims some sharks with laser beams @ discomfitor > > (run e17 under valgrind. find out). > > > > Author: raster > Date: 2010-12-12 23:26:21 -0800 (Sun, 12 Dec 2010) > New Revision: 55531 > Trac: http://trac.enlightenment.org/e/changeset/55531 > > Modified: > trunk/ecore/src/lib/ecore_ipc/ecore_ipc.c > > Modified: trunk/ecore/src/lib/ecore_ipc/ecore_ipc.c > =================================================================== > --- trunk/ecore/src/lib/ecore_ipc/ecore_ipc.c 2010-12-13 05:20:56 UTC > (rev 55530) +++ trunk/ecore/src/lib/ecore_ipc/ecore_ipc.c 2010-12-13 > 07:26:21 UTC (rev 55531) @@ -844,8 +844,7 @@ > "ecore_ipc_client_server_get"); > return NULL; > } > - if (!ecore_con_client_server_get(cl->client)) return NULL; > - return ecore_con_server_data_get(ecore_con_client_server_get(cl->client)); > + return > (ecore_con_server_data_get(ecore_con_client_server_get(cl->client))); } > > /** > @@ -872,15 +871,9 @@ > cl->delete_me = 1; > if (cl->event_count == 0) > { > - Ecore_Con_Server *s; > - > + svr = > ecore_con_server_data_get(ecore_con_client_server_get(cl->client)); > ecore_con_client_del(cl->client); > - s = ecore_con_client_server_get(cl->client); > - if (s) > - { > - svr = ecore_con_server_data_get(s); > - svr->clients = eina_list_remove(svr->clients, cl); > - } > + svr->clients = eina_list_remove(svr->clients, cl); > if (cl->buf) free(cl->buf); > ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE); > free(cl); > @@ -1018,21 +1011,17 @@ > _ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, > void *ev) { > Ecore_Con_Event_Client_Add *e; > - Ecore_Con_Server *s; > - Ecore_Ipc_Server *svr; > > e = ev; > - s = ecore_con_client_server_get(e->client); > - if (!s) return ECORE_CALLBACK_RENEW; > - svr = ecore_con_server_data_get(s); > - if (!svr) return ECORE_CALLBACK_RENEW; > - if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW; > + if (!eina_list_data_find(servers, > ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return > ECORE_CALLBACK_RENEW; /* handling code here */ { > Ecore_Ipc_Client *cl; > + Ecore_Ipc_Server *svr; > > cl = calloc(1, sizeof(Ecore_Ipc_Client)); > if (!cl) return ECORE_CALLBACK_CANCEL; > + svr = > ecore_con_server_data_get(ecore_con_client_server_get(e->client)); > ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT); cl->client = e->client; > cl->max_buf_size = 32 * 1024; > @@ -1060,15 +1049,9 @@ > _ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, > void *ev) { > Ecore_Con_Event_Client_Del *e; > - Ecore_Con_Server *s; > - Ecore_Ipc_Server *svr; > > e = ev; > - s = ecore_con_client_server_get(e->client); > - if (!s) return ECORE_CALLBACK_RENEW; > - svr = ecore_con_server_data_get(s); > - if (!svr) return ECORE_CALLBACK_RENEW; > - if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW; > + if (!eina_list_data_find(servers, > ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return > ECORE_CALLBACK_RENEW; /* handling code here */ { > Ecore_Ipc_Client *cl; > @@ -1076,7 +1059,9 @@ > cl = ecore_con_client_data_get(e->client); > { > Ecore_Ipc_Event_Client_Del *e2; > + Ecore_Ipc_Server *svr; > > + svr = > ecore_con_server_data_get(ecore_con_client_server_get(e->client)); > svr->client_list = eina_list_remove(svr->client_list, cl); if (!cl->delete_me) > { > @@ -1098,23 +1083,26 @@ > _ecore_ipc_event_server_add(void *data __UNUSED__, int ev_type __UNUSED__, > void *ev) { > Ecore_Con_Event_Server_Add *e; > - Ecore_Ipc_Server *svr; > > e = ev; > - svr = ecore_con_server_data_get(e->server); > - if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW; > + if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) > return ECORE_CALLBACK_RENEW; /* handling code here */ > - if (!svr->delete_me) > { > - Ecore_Ipc_Event_Server_Add *e2; > + Ecore_Ipc_Server *svr; > > - e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Add)); > - if (e2) > + svr = ecore_con_server_data_get(e->server); > + if (!svr->delete_me) > { > - svr->event_count++; > - e2->server = svr; > - ecore_event_add(ECORE_IPC_EVENT_SERVER_ADD, e2, > - _ecore_ipc_event_server_add_free, NULL); > + Ecore_Ipc_Event_Server_Add *e2; > + > + e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Add)); > + if (e2) > + { > + svr->event_count++; > + e2->server = svr; > + ecore_event_add(ECORE_IPC_EVENT_SERVER_ADD, e2, > + _ecore_ipc_event_server_add_free, NULL); > + } > } > } > return ECORE_CALLBACK_CANCEL; > @@ -1124,23 +1112,26 @@ > _ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, > void *ev) { > Ecore_Con_Event_Server_Del *e; > - Ecore_Ipc_Server *svr; > > e = ev; > - svr = ecore_con_server_data_get(e->server); > - if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW; > + if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) > return ECORE_CALLBACK_RENEW; /* handling code here */ > - if (!svr->delete_me) > { > - Ecore_Ipc_Event_Server_Del *e2; > + Ecore_Ipc_Server *svr; > > - e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Del)); > - if (e2) > + svr = ecore_con_server_data_get(e->server); > + if (!svr->delete_me) > { > - svr->event_count++; > - e2->server = svr; > - ecore_event_add(ECORE_IPC_EVENT_SERVER_DEL, e2, > - _ecore_ipc_event_server_del_free, NULL); > + Ecore_Ipc_Event_Server_Del *e2; > + > + e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Del)); > + if (e2) > + { > + svr->event_count++; > + e2->server = svr; > + ecore_event_add(ECORE_IPC_EVENT_SERVER_DEL, e2, > + _ecore_ipc_event_server_del_free, NULL); > + } > } > } > return ECORE_CALLBACK_CANCEL; > @@ -1191,21 +1182,17 @@ > _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, > void *ev) { > Ecore_Con_Event_Client_Data *e; > - Ecore_Con_Server *svr; > - Ecore_Ipc_Client *cl; > > e = ev; > - svr = ecore_con_client_server_get(e->client); > - if (!svr) return ECORE_CALLBACK_RENEW; > - cl = ecore_con_server_data_get(svr); > - if (!cl) return ECORE_CALLBACK_RENEW; > - if (!eina_list_data_find(servers, cl)) return ECORE_CALLBACK_RENEW; > + if (!eina_list_data_find(servers, > ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return > ECORE_CALLBACK_RENEW; /* handling code here */ { > + Ecore_Ipc_Client *cl; > Ecore_Ipc_Msg_Head msg; > int offset = 0; > unsigned char *buf; > > + cl = ecore_con_client_data_get(e->client); > > if (!cl->buf) > { > @@ -1267,13 +1254,10 @@ > { > Ecore_Ipc_Event_Client_Data *e2; > Ecore_Ipc_Server *svr; > - Ecore_Con_Server *sv; > int max, max2; > > buf = NULL; > - sv = ecore_con_client_server_get(cl->client); > - if (!sv) return ECORE_CALLBACK_CANCEL; > - svr = ecore_con_server_data_get(sv); > + svr = > ecore_con_server_data_get(ecore_con_client_server_get(cl->client)); max = > svr->max_buf_size; max2 = cl->max_buf_size; > if ((max >= 0) && (max2 >= 0)) > @@ -1390,17 +1374,18 @@ > _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, > void *ev) { > Ecore_Con_Event_Server_Data *e; > - Ecore_Ipc_Server *svr; > > e = ev; > - svr = ecore_con_server_data_get(e->server); > - if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW; > + if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) > return ECORE_CALLBACK_RENEW; /* handling code here */ > { > + Ecore_Ipc_Server *svr; > Ecore_Ipc_Msg_Head msg; > int offset = 0; > unsigned char *buf; > > + svr = ecore_con_server_data_get(e->server); > + > if (!svr->buf) > { > svr->buf_size = e->size; > > > ------------------------------------------------------------------------------ > Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, > new data types, scalar functions, improved concurrency, built-in packages, > OCI, SQL*Plus, data movement tools, best practices and more. > http://p.sf.net/sfu/oracle-sfdev2dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn Don't revert it, fix it. Using ecore_con like this just leads to lots of unnecessary spank warnings when you pass a null pointer. -- Mike Blumenkrantz Zentific: We run the three-legged race individually. ------------------------------------------------------------------------------ Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel