Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/bin


Modified Files:
        evfs_main.c 


Log Message:
* Big logical change: Detach incoming command processing from ipc event chain.  
This enables us to call ecore_main_loop_iterate() from within a 'command 
processor', thus enabling multiple commands to be processed the same time (e.g. 
loading the directory structure of a big .tar.bz2, but at the same time 
responding to a file-stat (properties) request).  

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_main.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- evfs_main.c 3 Nov 2005 12:39:46 -0000       1.23
+++ evfs_main.c 8 Nov 2005 09:00:20 -0000       1.24
@@ -136,11 +136,11 @@
 
    /*True == command finished*/
    if (evfs_process_incoming_command(server, client->prog_command, msg)) {
-         evfs_handle_command(client, client->prog_command);
-         
-
-         evfs_cleanup_command(client->prog_command, 
EVFS_CLEANUP_FREE_COMMAND); 
+         evfs_command_client* com_cli = NEW(evfs_command_client);
+         com_cli->client = client;
+         com_cli->command = client->prog_command;
          client->prog_command = NULL;
+         ecore_list_append(server->incoming_command_list, com_cli);
    }
 
 
@@ -258,6 +258,20 @@
 }
 
 
+int incoming_command_cb(void* data) {
+       evfs_command_client* com_cli = 
ecore_list_remove_first(server->incoming_command_list);
+       
+       if (com_cli) {
+               evfs_handle_command(com_cli->client, com_cli->command);
+               evfs_cleanup_command(com_cli->command, 
EVFS_CLEANUP_FREE_COMMAND); 
+               free(com_cli);
+
+       }
+       
+       return 1;
+}
+
+
 
 int main(int argc, char** argv) {
        /*Init the ipc server*/
@@ -271,6 +285,8 @@
        server->client_hash = ecore_hash_new(ecore_direct_hash, 
ecore_direct_compare);
        server->plugin_uri_hash = ecore_hash_new(ecore_str_hash, 
ecore_str_compare);
        server->clientCounter = 0;
+       server->incoming_command_list = ecore_list_new();
+       ecore_idle_enterer_add(incoming_command_cb, NULL);
 
        /*Load the plugins*/
        evfs_load_plugins();




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to