ports/117870: misc/xfce4-weather-plugin does not handle non-blocking connects() correctly

Stephen Hurd shurd at sasktel.net
Tue Nov 6 15:50:02 UTC 2007


>Number:         117870
>Category:       ports
>Synopsis:       misc/xfce4-weather-plugin does not handle non-blocking connects() correctly
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 06 15:50:02 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Hurd
>Release:        6.2-RELEASE-p6
>Organization:
>Environment:
FreeBSD server.hurd.local 6.2-RELEASE-p6 FreeBSD 6.2-RELEASE-p6 #3: Tue Jul 24 22:03:03 PDT 2007     root at server.hurd.local:/usr/src/sys/i386/compile/SERVER  i386

>Description:
misc/xfce4-weather-plugin uses a nonblocking socket for the initial connect() but then later does not check that send() and recv() don't fail for ENOTCONN.  As a result, this plugin only works on slow computers or computers with very fast internet connections.
>How-To-Repeat:
Configure misc/xfce4-weather-plugin.  If necessary, slow your inetnet connection down (via dummynet for example).
>Fix:
Add attached patch to ports/misc/xfce4-weather-plugin/files

Patch attached with submission follows:

--- panel-plugin/weather-http.c.orig	Wed Jan 17 10:02:39 2007
+++ panel-plugin/weather-http.c	Tue Nov  6 07:33:04 2007
@@ -171,7 +171,7 @@
           return FALSE;
         }
     }
-  else if (errno != EAGAIN)        /* some other error happened */
+  else if (errno != EAGAIN && errno != ENOTCONN)        /* some other error happened */
     {
 
       DBG ("file desc: %d", request->fd);
@@ -239,7 +239,7 @@
       callback (TRUE, request->cb_data);
       return FALSE;
     }
-  else if (errno != EAGAIN)
+  else if (errno != EAGAIN && errno != ENOTCONN)
     {
       perror ("keep_receiving()");
       request->cb_function (FALSE, request->cb_data);


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list