From ded1f87e4c9b206906ee0587c1ecc648e36b4ac3 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 19 Nov 2004 05:26:47 +0000 Subject: Make debug run based on 'nntp' debug option. 2004-11-18 Not Zed * providers/nntp/camel-nntp-stream.c: * providers/nntp/camel-nntp-store.c: * providers/nntp/camel-nntp-summary.c: Make debug run based on 'nntp' debug option. * providers/nntp/camel-nntp-stream.c (stream_fill): if we get a 0 read, return ECONNRESET. This should really have been put on the stream for that imap hack fix. * providers/nntp/camel-nntp-store.c (camel_nntp_try_authenticate): retry if the password attempt failed. ** See bug #68556. * providers/nntp/camel-nntp-store.c (xover_setup): don't overwrite exception if we get a failure. (camel_nntp_command): if we continue, then set the return code to -1, so we re-loop rather than abort. svn path=/trunk/; revision=27946 --- camel/providers/nntp/camel-nntp-stream.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'camel/providers/nntp/camel-nntp-stream.c') diff --git a/camel/providers/nntp/camel-nntp-stream.c b/camel/providers/nntp/camel-nntp-stream.c index 1e2dcb23f9..bc62c0a0c2 100644 --- a/camel/providers/nntp/camel-nntp-stream.c +++ b/camel/providers/nntp/camel-nntp-stream.c @@ -32,9 +32,9 @@ #include #include "camel-nntp-stream.h" +#include "camel-debug.h" -extern int camel_verbose_debug; -#define dd(x) (camel_verbose_debug?(x):0) +#define dd(x) (camel_debug("nntp:stream")?(x):0) static CamelObjectClass *parent_class = NULL; @@ -60,7 +60,9 @@ stream_fill(CamelNNTPStream *is) is->end[0] = '\n'; return is->end - is->ptr; } else { - dd(printf("NNTP_STREAM_FILL(ERROR): '%s'\n", strerror(errno))); + if (left == 0) + errno = ECONNRESET; + dd(printf("NNTP_STREAM_FILL(ERROR): %d - '%s'\n", left, strerror(errno))); return -1; } } -- cgit v1.2.3