aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Shaw <joe@ximian.com>2001-07-04 05:33:47 +0800
committerJoe Shaw <joeshaw@src.gnome.org>2001-07-04 05:33:47 +0800
commit014e0bf46b33bd11cc6fd22c63df6ff62a52dbce (patch)
tree09a9745f313dff136709b5bd887ac013f7514b0b
parent80f0be6c133b234925808fff2c78dfbba2f39dc4 (diff)
downloadgsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.tar
gsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.tar.gz
gsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.tar.bz2
gsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.tar.lz
gsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.tar.xz
gsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.tar.zst
gsoc2013-evolution-014e0bf46b33bd11cc6fd22c63df6ff62a52dbce.zip
Added NNTP_NO_PERMISSION (502) to the list of response codes.
2001-07-03 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION (502) to the list of response codes. * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying to reconnect, get extensions, etc. Just give up and return FALSE. svn path=/trunk/; revision=10769
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/nntp/camel-nntp-resp-codes.h2
-rw-r--r--camel/providers/nntp/camel-nntp-store.c6
3 files changed, 16 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 5f9a0fdf1d..166b0ac35b 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2001-07-03 Joe Shaw <joe@ximian.com>
+
+ * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
+ (502) to the list of response codes.
+
+ * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
+ receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
+ to reconnect, get extensions, etc. Just give up and return FALSE.
+
2001-07-03 Dan Winship <danw@ximian.com>
* providers/imap/camel-imap-message-cache.c
diff --git a/camel/providers/nntp/camel-nntp-resp-codes.h b/camel/providers/nntp/camel-nntp-resp-codes.h
index 27d450b261..56aec79d3c 100644
--- a/camel/providers/nntp/camel-nntp-resp-codes.h
+++ b/camel/providers/nntp/camel-nntp-resp-codes.h
@@ -42,6 +42,8 @@
#define NNTP_NO_SUCH_GROUP 411
#define NNTP_NO_SUCH_ARTICLE 430
+#define NNTP_NO_PERMISSION 502
+
/* authentication */
#define NNTP_AUTH_ACCEPTED 281
#define NNTP_AUTH_CONTINUE 381
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index d72db9b6b3..084fbaa582 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -234,8 +234,12 @@ nntp_store_connect (CamelService *service, CamelException *ex)
return FALSE;
}
- /* check if posting is allowed. */
resp_code = atoi (buf);
+ /* Check to see if we have any permissions on this server. */
+ if (resp_code == NNTP_NO_PERMISSION)
+ return FALSE;
+
+ /* check if posting is allowed. */
if (resp_code == NNTP_GREETING_POSTING_OK) {
g_print ("posting allowed\n");
store->posting_allowed = TRUE;