Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/bin


Modified Files:
        evfs_metadata.c evfs_operation_tasks.c evfs_server_handle.c 


Log Message:
* Cleanup warnings, etc

===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_metadata.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- evfs_metadata.c     22 Jul 2006 05:43:37 -0000      1.19
+++ evfs_metadata.c     22 Jul 2006 06:09:26 -0000      1.20
@@ -284,7 +284,7 @@
        if (!evfs_object_client_is_get()) {
                printf(". EVFS metadata initialise..\n");
 
-               evfs_metadata_extract_init();
+               evfs_metadata_extract_fork(NULL);
                        
                /*String edd*/
                Evfs_Metadata_String_Edd = 
_evfs_metadata_edd_create("evfs_metadata_string", sizeof(evfs_metadata_object));
@@ -589,8 +589,7 @@
        eet_close(_evfs_metadata_eet);
 }
 
-void evfs_metadata_file_get_key_value_string(evfs_filereference* ref, char* 
key,
-               char* value) 
+char* evfs_metadata_file_get_key_value_string(evfs_filereference* ref, char* 
key) 
 {
        evfs_metadata_object* obj = NULL;
        char path[PATH_MAX];
@@ -598,6 +597,7 @@
        char* file_path;
        int size;
        int ret;
+       char* value;
 
        /*Build a path*/
        file_path = evfs_filereference_to_string(ref);
@@ -614,13 +614,15 @@
 
                if (obj) {
                        printf ("Got %s -> %s\n", obj->key, (char*)obj->value);
+                       value = strdup(obj->value);
                        free(data);
                        free(obj);
                }
        }       
        eet_close(_evfs_metadata_eet);
-
        free(file_path);
+
+       return value;
 }
 
 
@@ -630,16 +632,15 @@
 /*----------------*/
 /*This section defines the fork/grab part of the metadata system*/
 
-int evfs_metadata_extract_init()
-{
-       /*if (!evfs_object_client_is_get()) {
-               if (!(_metadata_fork = fork())) {
-                       printf("Metadata fork initialised..\n");
-                       while ( 1 ) {
-                               sleep(1);
-                       }
-               }
-       }*/
+int evfs_metadata_extract_fork(evfs_filereference* ref)
+{      
+       if (!(_metadata_fork = fork())) {
+               evfs_plugin* plugin;
+               char* uri = homedir;
+               
+               printf("Extract fork started, homedir: %s..\n", homedir);
+
+       }
 
        return 1;
 }
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_operation_tasks.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evfs_operation_tasks.c      23 Apr 2006 12:38:15 -0000      1.7
+++ evfs_operation_tasks.c      22 Jul 2006 06:09:26 -0000      1.8
@@ -1,6 +1,8 @@
 #include "evfs.h"
 
-#define TASK_COPY_ITERATIONS 1
+/*FIXME - this should be dynamic, in proportion to the number
+ * of items on the queue.  If queue is empty, we can iterate till done*/
+#define TASK_COPY_ITERATIONS 3
 
 int evfs_operation_tasks_file_copy_run(evfs_operation* op,
                evfs_operation_task_file_copy* copy)
@@ -45,7 +47,9 @@
        if (copy->file_from->fd == 0 && copy->file_from->fd_p == NULL) {
                /*printf("Opening source file...\n");*/
                int fd 
=(*EVFS_PLUGIN_FILE(copy->file_from->plugin)->functions->evfs_file_open) 
(op->client, copy->file_from);
-               /*TODO: Error checking on file open fail*/
+               if (!fd) {
+                       /*TODO: Error checking on file open fail*/
+               }
        }
 
        if (copy->file_to->fd == 0 && copy->file_to->fd_p == NULL) {
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_server_handle.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- evfs_server_handle.c        21 Jul 2006 17:01:31 -0000      1.62
+++ evfs_server_handle.c        22 Jul 2006 06:09:26 -0000      1.63
@@ -334,27 +334,19 @@
    evfs_plugin *plugin = evfs_get_plugin_for_uri(client->server,
                                                  command->file_command.
                                                  files[0]->plugin_uri);
-   if (plugin)
-     {
+   if (plugin) {
         Ecore_List *directory_list = NULL;
-
         (*EVFS_PLUGIN_FILE(plugin)->functions->evfs_dir_list) (client, 
command, &directory_list);
-
-        if (directory_list)
-          {
+        if (directory_list) {
              evfs_list_dir_event_create(client, command, directory_list);
-          }
-        else
-          {
+        } else {
              printf
                 ("evfs_handle_dir_list_command: Recevied null from plugin for 
directory_list\n");
-          }
-     }
-   else
-     {
+        }
+  } else {
         printf("No plugin for '%s'\n",
                command->file_command.files[0]->plugin_uri);
-     }
+  }
 }
 
 
@@ -398,7 +390,6 @@
    struct stat file_stat;
    struct stat dest_stat;
 
-   int progress = 0;
    int res;
    evfs_operation_files *op;
 
@@ -540,13 +531,13 @@
 }
 
 void
-evfs_handle_ping_command(evfs_client * client, evfs_command * command)
+evfs_handle_ping_command(evfs_client * client __UNUSED__, evfs_command * 
command __UNUSED__)
 {
    printf("Ping!\n");
 }
 
 void
-evfs_handle_operation_command(evfs_client * client, evfs_command * command)
+evfs_handle_operation_command(evfs_client * client __UNUSED__, evfs_command * 
command)
 {
    evfs_operation *op_get = NULL;
 
@@ -577,7 +568,7 @@
        
 }
 
-void evfs_handle_metadata_string_file_set_command(evfs_client* client, 
+void evfs_handle_metadata_string_file_set_command(evfs_client* client 
__UNUSED__, 
                evfs_command* command, char* key, char* value) 
 {
        if (command->file_command.num_files > 0) {
@@ -585,11 +576,12 @@
        }
 }
 
-void evfs_handle_metadata_string_file_get_command(evfs_client* client, 
+void evfs_handle_metadata_string_file_get_command(evfs_client* client 
__UNUSED__, 
                evfs_command* command, char* key) 
 {
+       char* value;
        if (command->file_command.num_files > 0) {
-               
evfs_metadata_file_get_key_value_string(command->file_command.files[0], key);
+               value = 
evfs_metadata_file_get_key_value_string(command->file_command.files[0], key);
        }
 }
 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to