aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/nntp/camel-nntp-store.c5
-rw-r--r--camel/providers/nntp/camel-nntp-summary.c8
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);