From 12ebed81311d61f66773250cb301ff0e139d847f Mon Sep 17 00:00:00 2001 From: short <> Date: Sun, 30 Nov 2003 09:29:54 +0000 Subject: [PATCH] Prevent XML-logging of "file_seek" and "file_tell" for master-cached actions. - We are not interested for such events during captive-bug-replay(1) as it is completely slave-based simulation. --- src/libcaptive/sandbox/parent-File.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/libcaptive/sandbox/parent-File.c b/src/libcaptive/sandbox/parent-File.c index 7a960d7..cf22421 100644 --- a/src/libcaptive/sandbox/parent-File.c +++ b/src/libcaptive/sandbox/parent-File.c @@ -269,22 +269,15 @@ GnomeVFSResult captive_sandbox_parent_file_seek (CaptiveFileParentObject *captive_file_parent_object,GnomeVFSSeekPosition whence,GnomeVFSFileOffset offset) { GnomeVFSResult r; -xmlNode *xml_action=NULL; CaptiveVfsParentObject *captive_vfs_parent_object; g_return_val_if_fail(CAPTIVE_FILE_PARENT_IS_OBJECT(captive_file_parent_object),GNOME_VFS_ERROR_BAD_PARAMETERS); captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs); - if (captive_vfs_parent_object->corba_bug_action) { - xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_seek",NULL); - xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object)); - xmlNewProp(xml_action,"whence", - (whence==GNOME_VFS_SEEK_START ? "start" : - (whence==GNOME_VFS_SEEK_CURRENT ? "current" : - (whence==GNOME_VFS_SEEK_END ? "end" : captive_printf_alloca("%lu",(unsigned long)whence))))); - xmlNewProp(xml_action,"offset",captive_printf_alloca("%" G_GINT64_FORMAT,(gint64)offset)); - } + /* Do not produce 'xml_action' here as we use only 'slave' point of view + * for captive-bug-replay(1). + */ switch (whence) { case GNOME_VFS_SEEK_START: @@ -309,8 +302,6 @@ CaptiveVfsParentObject *captive_vfs_parent_object; r=GNOME_VFS_ERROR_BAD_PARAMETERS; } - if (xml_action) - xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r)); if (r!=GNOME_VFS_OK) return r; @@ -357,7 +348,6 @@ CaptiveVfsParentObject *captive_vfs_parent_object; GnomeVFSResult captive_sandbox_parent_file_tell(CaptiveFileParentObject *captive_file_parent_object,GnomeVFSFileOffset *offset_return) { GnomeVFSResult r; -xmlNode *xml_action=NULL; CaptiveVfsParentObject *captive_vfs_parent_object; g_return_val_if_fail(CAPTIVE_FILE_PARENT_IS_OBJECT(captive_file_parent_object),GNOME_VFS_ERROR_BAD_PARAMETERS); @@ -365,21 +355,16 @@ CaptiveVfsParentObject *captive_vfs_parent_object; captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs); - if (captive_vfs_parent_object->corba_bug_action) { - xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_tell",NULL); - xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object)); - } + /* Do not produce 'xml_action' here as we use only 'slave' point of view + * for captive-bug-replay(1). + */ *offset_return=captive_file_parent_object->offset; r=GNOME_VFS_OK; - if (xml_action) - xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r)); + if (r!=GNOME_VFS_OK) return r; - if (xml_action) - xmlNewProp(xml_action,"offset_return",captive_printf_alloca("%" G_GINT64_FORMAT,(gint64)*offset_return)); - return GNOME_VFS_OK; } -- 1.8.3.1