]> arthur.barton.de Git - netatalk.git/commitdiff
Add exit code
authorFrank Lahm <franklahm@gmail.com>
Mon, 28 Oct 2013 11:31:47 +0000 (12:31 +0100)
committerRalph Boehme <sloowfranklin@gmail.com>
Mon, 28 Oct 2013 14:10:00 +0000 (15:10 +0100)
Use dedicated exit code for AFP connections that were dropped
by the client right after the TCP handshake.

NEWS
include/atalk/util.h
libatalk/dsi/dsi_tcp.c

diff --git a/NEWS b/NEWS
index cd9e90d35782ded405677a522257269bddde3db3..aa61935e63dc160147115074987c9774fad0faa3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,8 @@ Changes in 3.1.0
 Changes in 3.0.7
 ================
 * FIX: Build fixes for the Kerberos UAM
+* UPD: Use dedicated exit code for AFP connections that were dropped
+       by the client right after the TCP handshake
 
 Changes in 3.0.6
 ================
index 386b6c28c9b1c1ddfb8560752e66480595788627..38e1e7b2dd4f36a115c4ca2a73ba5b0d8b60d326 100644 (file)
@@ -25,6 +25,7 @@
 #define EXITERR_CLNT 1  /* client related error */
 #define EXITERR_CONF 2  /* error in config files/cmd line parameters */
 #define EXITERR_SYS  3  /* local system error */
+#define EXITERR_CLOSED 4  /* connection was immediately closed after TCP handshake */
 
 /* Print a SBT and exit */
 #define AFP_PANIC(why) \
index ad8a3a23715683d0c97b2fdc8e983aba72f27694..24fde971fbd2aca085456c8494e7dd3bbeccfb79 100644 (file)
@@ -186,7 +186,7 @@ static pid_t dsi_tcp_open(DSI *dsi)
         len = dsi_stream_read(dsi, block, 2);
         if (!len ) {
             /* connection already closed, don't log it (normal OSX 10.3 behaviour) */
-            exit(EXITERR_CLNT);
+            exit(EXITERR_CLOSED);
         }
         if (len < 2 || (block[0] > DSIFL_MAX) || (block[1] > DSIFUNC_MAX)) {
             LOG(log_error, logtype_dsi, "dsi_tcp_open: invalid header");