From 3566c2b88802d2ebce6ab9af8d99545fe19f0b58 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Tue, 26 Jul 2011 11:02:52 +0200 Subject: [PATCH] Temporarily disable ECONNRESET detection, it causes primary reconnections failures --- etc/afpd/afp_dsi.c | 2 ++ include/atalk/dsi.h | 2 ++ libatalk/dsi/dsi_stream.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/etc/afpd/afp_dsi.c b/etc/afpd/afp_dsi.c index 0707aebc..c59272ff 100644 --- a/etc/afpd/afp_dsi.c +++ b/etc/afpd/afp_dsi.c @@ -500,12 +500,14 @@ void afp_over_dsi(AFPObj *obj) exit(0); } +#if 0 /* got ECONNRESET in read from client => exit*/ if (dsi->flags & DSI_GOT_ECONNRESET) { LOG(log_note, logtype_afpd, "afp_over_dsi: client connection reset"); afp_dsi_close(obj); exit(0); } +#endif if (dsi->flags & DSI_RECONINPROG) { LOG(log_note, logtype_afpd, "afp_over_dsi: failed reconnect"); diff --git a/include/atalk/dsi.h b/include/atalk/dsi.h index 6c8236d7..aed01816 100644 --- a/include/atalk/dsi.h +++ b/include/atalk/dsi.h @@ -159,7 +159,9 @@ typedef struct DSI { #define DSI_RECONSOCKET (1 << 7) /* we have a new socket from primary reconnect */ #define DSI_RECONINPROG (1 << 8) /* used in the new session in reconnect */ #define DSI_AFP_LOGGED_OUT (1 << 9) /* client called afp_logout, quit on next EOF from socket */ +#if 0 #define DSI_GOT_ECONNRESET (1 << 10) /* got ECONNRESET from client => exit */ +#endif /* basic initialization: dsi_init.c */ extern DSI *dsi_init (const dsi_proto /*protocol*/, diff --git a/libatalk/dsi/dsi_stream.c b/libatalk/dsi/dsi_stream.c index a2a58722..5630f07d 100644 --- a/libatalk/dsi/dsi_stream.c +++ b/libatalk/dsi/dsi_stream.c @@ -390,8 +390,10 @@ size_t dsi_stream_read(DSI *dsi, void *data, const size_t length) stored += len; } else { /* eof or error */ /* don't log EOF error if it's just after connect (OSX 10.3 probe) */ +#if 0 if (errno == ECONNRESET) dsi->flags |= DSI_GOT_ECONNRESET; +#endif if (len || stored || dsi->read_count) { if (! (dsi->flags & DSI_DISCONNECTED)) { LOG(log_error, logtype_dsi, "dsi_stream_read: len:%d, %s", -- 2.39.2