aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/nntp/camel-nntp-store.c')
-rw-r--r--camel/providers/nntp/camel-nntp-store.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index c412c0f6a3..5c9475ed14 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -176,6 +176,8 @@ nntp_store_get_folder (CamelStore *store, const gchar *folder_name,
CF_CLASS (new_folder)->init (new_folder, store, NULL,
folder_name, ".", FALSE, ex);
+ CF_CLASS (new_folder)->refresh_info (new_folder, ex);
+
return new_folder;
}
@@ -271,21 +273,22 @@ camel_nntp_command (CamelNNTPStore *store, char **ret, char *fmt, ...)
va_list ap;
int status;
int resp_code;
- CamelException *ex;
va_start (ap, fmt);
cmdbuf = g_strdup_vprintf (fmt, ap);
va_end (ap);
- ex = camel_exception_new();
-
/* make sure we're connected */
- if (store->ostream == NULL)
- nntp_store_connect (CAMEL_SERVICE (store), ex);
-
- if (camel_exception_get_id (ex)) {
- camel_exception_free (ex);
- return CAMEL_NNTP_FAIL;
+ if (store->ostream == NULL) {
+ CamelException ex;
+
+ camel_exception_init (&ex);
+ nntp_store_connect (CAMEL_SERVICE (store), &ex);
+ if (camel_exception_get_id (&ex)) {
+ camel_exception_clear (&ex);
+ return CAMEL_NNTP_FAIL;
+ }
+ camel_exception_clear (&ex);
}
/* Send the command */
@@ -344,6 +347,19 @@ camel_nntp_command_get_additional_data (CamelNNTPStore *store)
char *buf;
int i, status = CAMEL_NNTP_OK;
+ /* make sure we're connected */
+ if (store->ostream == NULL) {
+ CamelException ex;
+
+ camel_exception_init (&ex);
+ nntp_store_connect (CAMEL_SERVICE (store), &ex);
+ if (camel_exception_get_id (&ex)) {
+ camel_exception_clear (&ex);
+ return NULL;
+ }
+ camel_exception_clear (&ex);
+ }
+
data = g_ptr_array_new ();
while (1) {
buf = camel_stream_buffer_read_line (stream);