aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-05 05:59:06 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-05 05:59:06 +0800
commit9e9dea1fdf22db06f37f971964210afce146dc6a (patch)
tree05d9a21efaeee102fb7ac3c4b7ea372586650b80 /camel/providers
parent67360d96cd326bff74a8ff55eee38a60db49fb91 (diff)
downloadgsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.tar
gsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.tar.gz
gsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.tar.bz2
gsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.tar.lz
gsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.tar.xz
gsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.tar.zst
gsoc2013-evolution-9e9dea1fdf22db06f37f971964210afce146dc6a.zip
return a gboolean so we can tell if this command worked. we can't key off
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. svn path=/trunk/; revision=5723
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/nntp/camel-nntp-utils.c17
1 files changed, 9 insertions, 8 deletions
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
- }
+ }
}