Enlightenment CVS committal
Author : chaos
Project : e17
Module : apps/evfs
Dir : e17/apps/evfs/src/common
Modified Files:
evfs_cleanup.c evfs_command.c evfs_filereference.c evfs_io.c
Log Message:
* Fix mem smash in operation event cleanup
* Serialise operation events properly
* Populate plugin references in file reference post-command receive in IO code
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/common/evfs_cleanup.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- evfs_cleanup.c 16 Aug 2007 11:31:16 -0000 1.30
+++ evfs_cleanup.c 17 Aug 2007 10:19:04 -0000 1.31
@@ -20,7 +20,7 @@
evfs_cleanup_file_command_only(evfs_command* command)
{
if (command->file_command->files)
- free(command->file_command->files);
+ evas_list_free(command->file_command->files);
free(command);
}
@@ -113,9 +113,6 @@
void
evfs_cleanup_progress_event(EvfsEventProgress* event)
{
- if (event->from) evfs_cleanup_filereference(event->from);
- if (event->to) evfs_cleanup_filereference(event->to);
-
}
void
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/common/evfs_command.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evfs_command.c 16 Aug 2007 13:12:36 -0000 1.1
+++ evfs_command.c 17 Aug 2007 10:19:04 -0000 1.2
@@ -21,3 +21,15 @@
return evas_list_count(command->file_command->files);
return 0;
}
+
+void evfs_command_localise(evfs_command* command)
+{
+ if (command->file_command && command->file_command->files) {
+ Evas_List* l;
+ EvfsFilereference* file;
+ for (l=command->file_command->files;l;) {
+ EvfsFilereference_sanitise(file);
+ l=l->next;
+ }
+ }
+}
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/common/evfs_filereference.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evfs_filereference.c 16 Aug 2007 13:12:36 -0000 1.1
+++ evfs_filereference.c 17 Aug 2007 10:19:04 -0000 1.2
@@ -7,6 +7,7 @@
ref->plugin_uri = strdup(plugin);
ref->file_type = filetype;
ref->plugin = evfs_get_plugin_for_uri(evfs_server_get(), plugin);
+ printf("Got plugin %p for uri %s\n", ref->plugin, plugin);
return ref;
}
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/common/evfs_io.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- evfs_io.c 16 Aug 2007 13:24:32 -0000 1.75
+++ evfs_io.c 17 Aug 2007 10:19:04 -0000 1.76
@@ -27,6 +27,7 @@
static Eet_Data_Descriptor *_EvfsMetadataGroup_edd;
static Eet_Data_Descriptor *_EvfsEventMetadataGroups_edd;
static Eet_Data_Descriptor *_EvfsOperation_edd;
+static Eet_Data_Descriptor *_EvfsEventOperation_edd;
static Eet_Data_Descriptor *_EvfsEventAuthRequired_edd;
static Eet_Data_Descriptor *_EvfsEventOpen_edd;
@@ -118,6 +119,24 @@
EET_DATA_DESCRIPTOR_ADD_SUB(_EvfsFilereference_edd, EvfsFilereference,
"parent", parent,
_EvfsFilereference_edd);
+ /*Evfs_operation eet */
+ _EvfsOperation_edd = _NEW_EDD(EvfsOperation);
+
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation, "id", id,
+ EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
+ "misc_str", misc_str,
EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
+ "ret_str_1", misc_str,
EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
+ "ret_str_2", misc_str,
EET_T_STRING);
+
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation, "status",
+ status, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
+ "substatus", substatus, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
+ "response", response, EET_T_INT);
/*Command edd*/
_EvfsCommandFile_edd = _NEW_EDD(evfs_command_file);
@@ -131,8 +150,6 @@
"ref2", ref2, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_LIST(_EvfsCommandFile_edd, evfs_command_file,
"files", files, _EvfsFilereference_edd);
-
-
_EvfsCommand_edd = _NEW_EDD(evfs_command);
EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsCommand_edd, evfs_command,
@@ -144,27 +161,6 @@
EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsCommand_edd, evfs_command,
"EvfsCommand_id", client_identifier,
EET_T_INT);
- /*Evfs_operation eet */
- _EvfsOperation_edd = _NEW_EDD(EvfsOperation);
-
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation, "id", id,
- EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
- "misc_str", misc_str,
EET_T_STRING);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
- "ret_str_1", misc_str,
EET_T_STRING);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
- "ret_str_2", misc_str,
EET_T_STRING);
-
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation, "status",
- status, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
- "substatus", substatus, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsOperation_edd, evfs_operation,
- "response", response, EET_T_INT);
-
-
-
/*Base event EDD*/
_EvfsEvent_edd = _NEW_EDD(EvfsEvent);
EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsEvent_edd, EvfsEvent,
@@ -249,6 +245,13 @@
_EVFS_EVENT_BASE_ADD(EvfsEventOpen);
evfs_io_event_edd_set(EVFS_EV_FILE_OPEN, _EvfsEventOpen_edd);
+ /*EvfsEventOperation*/
+ _EvfsEventOperation_edd = _NEW_EDD(EvfsEventOperation);
+ _EVFS_EVENT_BASE_ADD(EvfsEventOperation);
+ EET_DATA_DESCRIPTOR_ADD_SUB(_EvfsEventOperation_edd, EvfsEventOperation,
"EvfsEventOperation_operation", operation, _EvfsOperation_edd);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_EvfsEventOperation_edd, EvfsEventOperation,
"EvfsEventOperation_misc", misc, EET_T_STRING);
+ evfs_io_event_edd_set(EVFS_EV_OPERATION, _EvfsEventOperation_edd);
+
/*File monitor edd*/
/*_evfs_filemonitor_edd =
@@ -357,7 +360,11 @@
ecore_ipc_message* msg = evfs_io_event_construct(event);
/*printf("Writing event to master: %p -- message: %p:%p..\n",
client->master, msg, msg->data);*/
- evfs_write_ecore_ipc_server_message(client->master,msg);
+ if (msg) {
+ evfs_write_ecore_ipc_server_message(client->master,msg);
+ } else {
+ printf("Could not find message to write\n");
+ }
}
EvfsEvent*
@@ -420,22 +427,6 @@
//be generic
//
void
-evfs_write_operation_command(evfs_connection * conn, evfs_command * command)
-{
- int size_ret = 0;
-
- char *data =
- eet_data_descriptor_encode(_EvfsOperation_edd, command->op, &size_ret);
-
- evfs_write_ecore_ipc_server_message(conn->server,
- ecore_ipc_message_new(EVFS_COMMAND,
-
EVFS_COMMAND_PART_OPERATION,
- 0, 0, 0, data,
- size_ret));
- free(data);
-}
-
-void
evfs_write_command(evfs_connection * conn, evfs_command * command)
{
char* data;
@@ -463,6 +454,10 @@
int size;
com = eet_data_descriptor_decode(_EvfsCommand_edd, message->data,
message->len);
+
+ /*Set local references to plugins, etc*/
+ evfs_command_localise(com);
+
return com;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs