David Nečas yazmış:
> On Sun, Dec 27, 2009 at 06:28:33PM +0200, Ali Polatel wrote:
> > How do I close a established GSocketConnection?
> 
> Using g_io_stream_close().
> 
> > The following doesn't work:
> > GSocketConnection *conn;
> > ...
> > g_io_stream_close(G_IO_STREAM(conn));
> > GLib-GIO-CRITICAL **: g_io_stream_close: assertion `G_IS_IO_STREAM 
> > (stream)' failed
> > 
> > g_object_unref fails too:
> > GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' 
> > failed
> 
> This looks like conn is an invalid pointer, perhaps to an already
> destroyed object.  So it matters what has happened in the `...' part.

You're right, I was just confused.
The reason was I wrongly called g_object_unref() on GSocketClient and
after that tried to call g_io_stream_close() on the GSocketConnection
object.
Thanks!

> 
> Yeti
> 

-- 
Regards,
Ali Polatel

Attachment: pgpMjbKrj8qkI.pgp
Description: PGP signature

_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to