From: <enl...@li...> - 2005-10-22 09:10:31
|
Enlightenment CVS committal Author : lordchaos Project : e17 Module : apps/evfs Dir : e17/apps/evfs/src/bin Modified Files: evfs_main.c Log Message: Let plugins know that client has left =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_main.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- evfs_main.c 22 Oct 2005 04:51:42 -0000 1.19 +++ evfs_main.c 22 Oct 2005 09:09:55 -0000 1.20 @@ -90,13 +90,28 @@ ipc_client_del(void *data, int type, void *event) { Ecore_Ipc_Event_Client_Del *e; + Ecore_List* keys; evfs_client* client; + evfs_plugin* plugin; + char* key; e = (Ecore_Ipc_Event_Client_Del *) event; client = ecore_hash_get(server->client_hash, e->client); printf("Client %ld, Client Disconnected!!!\n", client->id); + + /*Notify the plugins that this client has disconnected*/ + keys = ecore_hash_keys(server->plugin_uri_hash); + ecore_list_goto_first(keys); + while ( (key = ecore_list_remove_first(keys)) ){ + plugin = ecore_hash_get(server->plugin_uri_hash, key); + (*plugin->functions->evfs_client_disconnect)(client); + } + + + ecore_list_destroy(keys); + ecore_hash_remove(server->client_hash, client); evfs_cleanup_client(client); |