]> arthur.barton.de Git - netatalk.git/commitdiff
In disconnected state afpd process was still reading from socket every SIGALARM
authorFrank Lahm <franklahm@googlemail.com>
Fri, 22 Jul 2011 13:16:50 +0000 (15:16 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Fri, 22 Jul 2011 13:16:50 +0000 (15:16 +0200)
etc/afpd/afp_dsi.c

index 8fc7c0fb80edd74dc4469f8836b2bea01f5efed0..0707aebcb81ab8b0b5973699eafb589a21353ef3 100644 (file)
@@ -517,7 +517,8 @@ void afp_over_dsi(AFPObj *obj)
             if (dsi_disconnect(dsi) != 0)
                 afp_dsi_die(EXITERR_CLNT);
 
-            pause(); /* gets interrupted by SIGALARM or SIGURG tickle */
+            while (dsi->flags & DSI_DISCONNECTED)
+                pause(); /* gets interrupted by SIGALARM or SIGURG tickle */
             continue; /* continue receiving until disconnect timer expires
                        * or a primary reconnect succeeds  */
         }