diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-22 15:26:59 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-22 15:26:59 +0800 |
commit | a6d5b77cf93d138233b913b99fc6d612563408f4 (patch) | |
tree | 0b50402bcfa2d68e3c6630564b8c45a968de0fac /camel/providers | |
parent | 8d422f78c2583f77f1bc61834553db268e7ad7be (diff) | |
download | gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.tar gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.tar.gz gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.tar.bz2 gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.tar.lz gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.tar.xz gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.tar.zst gsoc2013-evolution-a6d5b77cf93d138233b913b99fc6d612563408f4.zip |
decode newsgroups header into a list of newsgroups.
2004-03-22 Not Zed <NotZed@Ximian.com>
* camel-mime-utils.c (camel_header_newsgroups_decode)
(camel_header_newsgroups_free): decode newsgroups header into a
list of newsgroups.
** See #55887.
* providers/nntp/camel-nntp-summary.c (camel_nntp_summary_check):
NOOP if we're offline.
* providers/nntp/camel-nntp-store.c (nntp_connected): spit a
warning if we try to do stuff whilst offline, rather than crash.
svn path=/trunk/; revision=25142
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/nntp/camel-nntp-store.c | 5 | ||||
-rw-r--r-- | camel/providers/nntp/camel-nntp-summary.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c index 815e3d7397..3b04f95052 100644 --- a/camel/providers/nntp/camel-nntp-store.c +++ b/camel/providers/nntp/camel-nntp-store.c @@ -1027,6 +1027,11 @@ camel_nntp_try_authenticate (CamelNNTPStore *store) static gboolean nntp_connected (CamelNNTPStore *store, CamelException *ex) { + if (((CamelDiscoStore *)store)->status == CAMEL_DISCO_STORE_OFFLINE) { + g_warning("Trying to talk to nntp session whilst offline"); + return FALSE; + } + if (store->stream == NULL) return camel_service_connect (CAMEL_SERVICE (store), ex); diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c index 8c0d5f8476..7923369754 100644 --- a/camel/providers/nntp/camel-nntp-summary.c +++ b/camel/providers/nntp/camel-nntp-summary.c @@ -242,14 +242,18 @@ camel_nntp_summary_check(CamelNNTPSummary *cns, CamelFolderChangeInfo *changes, unsigned int n, f, l; int count; + folder = (CamelFolder *)cns->folder; + store = (CamelNNTPStore *)folder->parent_store; + + if (((CamelDiscoStore *)store)->status == CAMEL_DISCO_STORE_OFFLINE) + return 0; + if (xover_setup (cns, ex) == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, _("Connection error: %s"), strerror(errno)); return -1; } - folder = (CamelFolder *)cns->folder; - store = (CamelNNTPStore *)folder->parent_store; s = (CamelFolderSummary *)cns; ret = camel_nntp_command(store, &line, "group %s", folder->full_name); |