diff options
-rw-r--r-- | camel/ChangeLog | 11 | ||||
-rw-r--r-- | camel/providers/nntp/camel-nntp-utils.c | 17 |
2 files changed, 20 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index b593806e9b..0a286e715b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2000-10-04 Chris Toshok <toshok@helixcode.com> + + * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a + gboolean so we can tell if this command worked. we can't key off + the OVER extension being present because at least one server (INN + 2.2) doesn't report the OVER extension but implements the XOVER + command. This could of course just be because I'm a loser for + thinking they were related in the first place. + (camel_nntp_get_headers): always try XOVER first, and if it fails + revert to the slow method. + 2000-10-04 Dan Winship <danw@helixcode.com> * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where diff --git a/camel/providers/nntp/camel-nntp-utils.c b/camel/providers/nntp/camel-nntp-utils.c index 1a990fb94f..b23d2c540d 100644 --- a/camel/providers/nntp/camel-nntp-utils.c +++ b/camel/providers/nntp/camel-nntp-utils.c @@ -33,8 +33,8 @@ #include <stdlib.h> #include <string.h> -static void -get_OVER_headers(CamelNNTPStore *nntp_store, CamelFolder *folder, +static gboolean +get_XOVER_headers(CamelNNTPStore *nntp_store, CamelFolder *folder, int first_message, int last_message, CamelException *ex) { int status; @@ -107,10 +107,13 @@ get_OVER_headers(CamelNNTPStore *nntp_store, CamelFolder *folder, } g_free (line); } + + return TRUE; } else { /* XXX */ g_warning ("weird nntp response for XOVER: %d\n", status); + return FALSE; } } @@ -236,13 +239,11 @@ camel_nntp_get_headers (CamelStore *store, return; } - if (nntp_store->extensions & CAMEL_NNTP_EXT_OVER) { - get_OVER_headers (nntp_store, folder, first_message, last_message, ex); - } - else { + + if (!get_XOVER_headers (nntp_store, folder, first_message, last_message, ex)) { g_warning ("need to fix get_HEAD_headers\n"); -#if 0 +#if 0 get_HEAD_headers (nntp_store, folder, first_message, last_message, ex); #endif - } + } } |