* ecore: fix obvious bug. But Ecore_Con with UDP session is
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 16 Dec 2010 13:08:49 +0000 (13:08 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 16 Dec 2010 13:08:49 +0000 (13:08 +0000)
completly broken and no time to fix it.

Try elixir sample code:
http://code.google.com/p/freebox-elixir/source/browse/#svn%2Ftrunk%2Fexemples%2Fecore_con_udp

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@55593 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 67aeaa1..8e1cfb4 100644 (file)
@@ -2005,7 +2005,7 @@ _ecore_con_svr_udp_handler(void             *data,
      {
         if (!svr->delete_me)
           {
-/* we lost our client! */
+              /* we lost our client! */
               Ecore_Con_Event_Client_Del *e;
 
               e = calloc(1, sizeof(Ecore_Con_Event_Client_Del));
@@ -2361,6 +2361,8 @@ _ecore_con_event_client_del_free(void *data __UNUSED__,
    Ecore_Con_Event_Client_Del *e;
 
    e = ev;
+   if (!e->client) return ;
+
    e->client->event_count--;
    if ((e->client->event_count <= 0) && (e->client->delete_me))
      ecore_con_client_del(e->client);