[Bug 37145] Replace low level network code with GIO

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat May 14 15:33:59 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=37145

--- Comment #2 from Debarshi Ray <debarshi.ray at gmail.com> 2011-05-14 06:33:59 PDT ---
Created an attachment (id=46708)
 View: https://bugs.freedesktop.org/attachment.cgi?id=46708
 Review: https://bugs.freedesktop.org/review?bug=37145&attachment=46708

IdleServerConnection: Replace low level network code with GIO

Known problems:

1. When iface_disconnect_impl_full is called we cancel priv->cancellable to
remove the GSourceFunc. This happens by triggering _socket_received (ie. the
GSourceFunc) one more time and we return FALSE if priv->cancellable is
cancelled. According to the documentation for g_socket_create_source the value
of condition  "is likely 0 unless cancellation happened at the same time as a
condition change". So there is a possibility that some data that arrived
immediately before the disconnection will be lost.

    Avoiding this is a bit tricky because iface_disconnect_impl_full can be
called from the dispose method as well and to return the data it emits a signal
on the IdleServerConnection object, which in this case is the object being
disposed.

2. iface_disconnect_impl_full does not cancel connections in the "connecting"
state. It is just a matter of cancelling the priv->cancellable but I did not
want to change the behaviour of the older code.

3. I am not sure why the 'g_assert(priv != NULL)' was been used in the earlier
code.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list