aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-stream.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-11-19 13:26:47 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-11-19 13:26:47 +0800
commitded1f87e4c9b206906ee0587c1ecc648e36b4ac3 (patch)
treed9b737895f8d4f62c6eedde6c14ee3c8ba62cc9f /camel/providers/nntp/camel-nntp-stream.c
parenteccb379e0ca17bb136a05eaafccaa8186420028e (diff)
downloadgsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.tar
gsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.tar.gz
gsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.tar.bz2
gsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.tar.lz
gsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.tar.xz
gsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.tar.zst
gsoc2013-evolution-ded1f87e4c9b206906ee0587c1ecc648e36b4ac3.zip
Make debug run based on 'nntp' debug option.
2004-11-18 Not Zed <NotZed@Ximian.com> * 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
Diffstat (limited to 'camel/providers/nntp/camel-nntp-stream.c')
-rw-r--r--camel/providers/nntp/camel-nntp-stream.c8
1 files changed, 5 insertions, 3 deletions
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 <glib.h>
#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;
}
}