From 9e9dea1fdf22db06f37f971964210afce146dc6a Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 4 Oct 2000 21:59:06 +0000 Subject: return a gboolean so we can tell if this command worked. we can't key off 2000-10-04 Chris Toshok * 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. svn path=/trunk/; revision=5723 --- camel/ChangeLog | 11 +++++++++++ camel/providers/nntp/camel-nntp-utils.c | 17 +++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'camel') 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 + + * 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 * 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 #include -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 - } + } } -- cgit v1.2.3