From c97cdab3e95d3c75bcc5778be6658d48db2f8301 Mon Sep 17 00:00:00 2001 From: short <> Date: Wed, 29 Oct 2003 15:30:33 +0000 Subject: [PATCH] captive_sandbox_parent_file_write(): Fixed .captivebug.xml.gz dumping. --- src/libcaptive/sandbox/parent-File.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libcaptive/sandbox/parent-File.c b/src/libcaptive/sandbox/parent-File.c index e157816..7a960d7 100644 --- a/src/libcaptive/sandbox/parent-File.c +++ b/src/libcaptive/sandbox/parent-File.c @@ -199,15 +199,16 @@ CaptiveVfsParentObject *captive_vfs_parent_object; *bytes_written_return=0; - if (captive_vfs_parent_object->corba_bug_action) { - xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_write",NULL); - xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object)); - xmlNewProp(xml_action,"num_bytes",captive_printf_alloca("%lu",(unsigned long)num_bytes)); - } - r=captive_sandbox_parent_file_seek_slave(captive_file_parent_object, GNOME_VFS_SEEK_START,captive_file_parent_object->offset); if (r==GNOME_VFS_OK) { + + if (captive_vfs_parent_object->corba_bug_action) { + xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_write",NULL); + xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object)); + xmlNewProp(xml_action,"num_bytes",captive_printf_alloca("%lu",(unsigned long)num_bytes)); + } + buffer_corba_local._maximum=num_bytes; buffer_corba_local._length=num_bytes; buffer_corba_local._buffer=(/* de-const */gpointer)buffer_captive; @@ -216,9 +217,9 @@ CaptiveVfsParentObject *captive_vfs_parent_object; Captive_File_write(captive_file_parent_object->corba_File_object, &buffer_corba_local,&bytes_written_corba,&captive_corba_ev); r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object); + if (xml_action) + xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r)); } - if (xml_action) - xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r)); if (r!=GNOME_VFS_OK) return r; -- 1.8.3.1