+object shutdown() functions as release() will not destroy() servants
[captive.git] / src / libcaptive / sandbox / parent-File.c
index 507467c..288fd6d 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id$
- * CORBA/ORBit server side of File object of sandbox_parent()
+ * CORBA/ORBit client side of File object of sandbox_parent()
  * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
  * 
  * This program is free software; you can redistribute it and/or modify
@@ -56,9 +56,15 @@ GnomeVFSResult captive_sandbox_parent_file_new_create(CaptiveFileObject *captive
 
 GnomeVFSResult captive_sandbox_parent_file_close(CaptiveFileObject *captive_file_object)
 {
+GnomeVFSResult r;
+
        g_return_val_if_fail(captive_file_object!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
        g_return_val_if_fail(captive_file_object->file_Handle==NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
 
+       Captive_File_shutdown(captive_file_object->corba_File_object,&captive_corba_ev);
+       if (GNOME_VFS_OK!=(r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev)))
+               return r;
+
        CORBA_Object_release((CORBA_Object)captive_file_object->corba_File_object,&captive_corba_ev);
        captive_file_object->corba_File_object=CORBA_OBJECT_NIL;