Fixed uninitialized 'md5' options-module field in sandbox clients.
[captive.git] / src / libcaptive / sandbox / server-Vfs.c
index 2f28a85..28affd3 100644 (file)
@@ -28,6 +28,7 @@
 #include "split.h"
 #include "server-GLogFunc.h"
 #include "client-CaptiveIOChannel.h"
+#include "../client/vfs-slave.h"
 
 
 static void impl_Captive_Vfs_fini(impl_POA_Captive_Vfs *servant,CORBA_Environment *ev);
@@ -113,6 +114,8 @@ static void options_module_corba_to_options_module_captive
                        src_options_module_corba->data._length);
        dest_options_module_captive->u.pe32.length=src_options_module_corba->data._length;
        dest_options_module_captive->u.pe32.mapped=FALSE;
+       /* 'md5' is never used in sandbox client; XML is dumped by the master. */
+       dest_options_module_captive->u.pe32.md5=g_strdup("<sandbox-client:undef>");
 }
 
 
@@ -152,7 +155,9 @@ struct captive_options_module *options_module;
                options_captive.load_module=g_list_append(options_captive.load_module,options_module);
                }
 
+       options_captive.sandbox=TRUE;
        g_assert(options_captive.sandbox_server_argv==NULL);
+       g_assert(options_captive.sandbox_server_ior==NULL);
 
        if (GNOME_VFS_OK!=(errvfsresult=captive_vfs_new(&servant->captive_vfs_object,&options_captive))) {
                CORBA_exception_set(ev,CORBA_USER_EXCEPTION,ex_Captive_GnomeVFSResultException,GINT_TO_POINTER((gint)errvfsresult));
@@ -162,7 +167,7 @@ struct captive_options_module *options_module;
 
        captive_options_free(&options_captive);
 
-       g_assert(servant->captive_vfs_object!=NULL);
+       g_assert(CAPTIVE_VFS_SLAVE_IS_OBJECT(servant->captive_vfs_object));
 }
 
 
@@ -207,7 +212,7 @@ GSource *source;
                        servant,        /* data */
                        NULL);  /* notify */
   g_source_attach(source,
-                       g_main_loop_get_context(linc_main_get_loop())); /* context; NULL means 'default context' */
+                       captive_corba_get_context());   /* context; NULL means 'default context' */
   g_source_unref(source);
 #endif
 }