Date: Tue, 6 Nov 2007 15:49:40 GMT From: Stephen Hurd <shurd@sasktel.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/117870: misc/xfce4-weather-plugin does not handle non-blocking connects() correctly Message-ID: <200711061549.lA6FneX4021725@www.freebsd.org> Resent-Message-ID: <200711061550.lA6Fo2Hd043294@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711061549.lA6FneX4021725>