]> arthur.barton.de Git - netatalk.git/commitdiff
Fix a possible bug handling disconnected sessions, NetAFP Bug ID #16
authorFrank Lahm <franklahm@googlemail.com>
Mon, 19 Mar 2012 14:33:47 +0000 (15:33 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Mon, 19 Mar 2012 14:33:47 +0000 (15:33 +0100)
NEWS
libatalk/dsi/dsi_stream.c

diff --git a/NEWS b/NEWS
index 96306165da22db88788b103b44b597a995f8c3dd..4b68c54f96a42aaa7e29b5880aeb610eb4cf2590 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Changes in 2.2.3
        and -krb5service are not set, from Jamie Gilbertson
 * FIX: afpd: sendfile() on FreeBSD was broken, courtesy of Denis Ahrens
 * FIX: afpd: Dont use searchdb when doing partial name search
+* FIX: afpd: Fix a possible bug handling disconnected sessions, NetAFP Bug ID #16
 
 Changes in 2.2.2
 ================
index bc84a5fa2bb47849ac5cc2129116e5ad2f137aba..ab1339184b48b1394a89415c481f2689ad0d83c9 100644 (file)
@@ -62,6 +62,9 @@ static int dsi_peek(DSI *dsi)
     maxfd = dsi->socket + 1;
 
     while (1) {
+        if (dsi->socket == -1)
+            /* eg dsi_disconnect() might have disconnected us */
+            return -1;
         FD_ZERO(&readfds);
         FD_ZERO(&writefds);