[Nice] patch for g_io_create_watch glib bug

Madaro Livio livio.madaro at telecomitalia.it
Thu Feb 23 09:14:36 PST 2012


Hi,
Here is the second one for review.

The glib function g_io_create_watch has a bug on Windows: multiple call to g_io_create_watch on the same socket won't work (https://bugzilla.gnome.org/show_bug.cgi?id=338943 )

Libnice calls  g_io_create_watch two times: the first one to set the callback for the socket condition G_IO_IN, the second one for the socket condition G_IO_OUT when the socket send returns WSAEWOULDBLOCK and data is queued for retransmission. The problem is that calling g_io_create_watch the second time "delete" the previous one and the callback for G_IO_IN will never be called.

The patch is a workaround that uses a polling timer to avoid the second g_io_create_watch call.
I know polling is not a very good solution, but it is simple (I modified just few lines of code) otherwise libnice should be modified to call g_io_create_watch just one time.

Regards,
Livio









Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-workaround-for-g_io_create_watch-bug-on-Windows.patch
Type: application/octet-stream
Size: 2011 bytes
Desc: 0002-workaround-for-g_io_create_watch-bug-on-Windows.patch
URL: <http://lists.freedesktop.org/archives/nice/attachments/20120223/86ab3ed8/attachment.obj>


More information about the nice mailing list