Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / libcaptive / sandbox / server-CaptiveIOChannel.c
index db71790..c09481d 100644 (file)
@@ -62,17 +62,12 @@ Captive_CaptiveIOChannel impl_Captive_CaptiveIOChannel__create
 Captive_CaptiveIOChannel retval;
 impl_POA_Captive_CaptiveIOChannel *newservant;
 PortableServer_ObjectId *objid;
-GIOStatus erriostatus;
 
        captive_new0(newservant);       /* FIXME: leak */
        newservant->servant.vepv=&impl_Captive_CaptiveIOChannel_vepv;
        newservant->poa=poa;
 
        newservant->image_iochannel=image_iochannel;
-       erriostatus=g_io_channel_set_encoding(newservant->image_iochannel,
-                       NULL, /* encoding; force binary data */
-                       NULL);  /* error */
-       g_assert(erriostatus==G_IO_STATUS_NORMAL);
 
        /* captive_giochannel_size() only _after_ g_io_channel_set_encoding() ! */
        newservant->image_size=captive_giochannel_size(newservant->image_iochannel);
@@ -119,7 +114,7 @@ GIOStatus erriostatus;
        buffer_corba->_release=TRUE;
 
        erriostatus=g_io_channel_read_chars(servant->image_iochannel,
-                       buffer_corba->_buffer,  /* buf */
+                       (gchar *)buffer_corba->_buffer, /* buf */
                        count,  /* count */
                        &bytes_read,    /* bytes_read */
                        NULL);  /* error */
@@ -146,7 +141,7 @@ static void impl_Captive_CaptiveIOChannel_write(impl_POA_Captive_CaptiveIOChanne
 gsize bytes_written;
 
        if (G_IO_STATUS_NORMAL!=g_io_channel_write_chars(servant->image_iochannel,
-                       buffer_corba->_buffer,  /* buf */
+                       (const gchar *)buffer_corba->_buffer,   /* buf */
                        buffer_corba->_length,  /* count */
                        &bytes_written, /* bytes_written */
                        NULL)   /* error */