After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 331224 - networking bug on windows
networking bug on windows
Status: RESOLVED OBSOLETE
Product: Pan
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Charles Kerr
Pan QA Team
Depends on: 331214
Blocks:
 
 
Reported: 2006-02-15 00:46 UTC by Kenneth Haley
Modified: 2006-05-31 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kenneth Haley 2006-02-15 00:46:37 UTC
Please describe the problem:
The networking code needs to be changed to work properly on windows.  It needs
to read all the data from the buffer before returning from the watch function. 
A change like the following should work.

nntp.c: function nntp_read

GIOStatus stat;

while((stat=g_io_channel_read_line_string (channel, g, NULL, 
&err))!=G_IO_STATUS_AGAIN)

switch (stat)
{


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Charles Kerr 2006-02-16 16:41:02 UTC
what's the Windows behavior without the patch?
Comment 2 Kenneth Haley 2006-02-16 22:19:09 UTC
Pan stops receiving data from the socket.  The problem with the patch is that it will freeze the ui while reading from the network.  There is a glib bug open on this but the source of the problem hasn't been found yet.

http://bugzilla.gnome.org/show_bug.cgi?id=331214


It's interesting that pan receives more data than the test case in that bug.
Comment 3 Kenneth Haley 2006-03-31 10:35:30 UTC
In case it still matters, the most efficient solution I came up with was to have a do nothing idle function running while a socket was being watched.  Sinc only one idle function is needed at a time something like this would work:

namespace
{
guint idle=0,ref=0;;
gint idle()
{return 1;} // or was it 0 to stay running?
void ref_idle()
{
  if(++ref==1)
    idle=g_idle_add
}
void unref_idle()
{
  if(--ref==0)
    g_source_remove(idle) ?
}
}

Then just ref_idle when adding a watch, and unref when ending a watch.  Hopefully the real fix will make it into glib 2.12.  At least this version shouldn't degrade the ui performance.
Comment 4 Charles Kerr 2006-05-11 16:10:12 UTC
Is this still an issue with the rewrite?

The reason I ask is that I use the Windows version periodically
(with the glib 2.10 runtime from the gipm) without problems.
Comment 5 Kenneth Haley 2006-05-31 04:33:07 UTC
I haven't had any problems since the rewrite. So it looks like this bug can be closed.