diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/nntp/camel-nntp-store.c | 16 |
2 files changed, 14 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 26a4bb4c2e..5487d5e9b0 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2004-06-10 Not Zed <NotZed@Ximian.com> + + * providers/nntp/camel-nntp-store.c (camel_nntp_command): move the + stream based checking into the loop, after we connect. Fixes a + crash. + 2004-06-09 Jeffrey Stedfast <fejj@novell.com> * camel-gpg-context.c (gpg_verify): Fixed a case where it was diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c index 515c927f3c..d46ddeb93b 100644 --- a/camel/providers/nntp/camel-nntp-store.c +++ b/camel/providers/nntp/camel-nntp-store.c @@ -1262,14 +1262,6 @@ camel_nntp_command (CamelNNTPStore *store, CamelException *ex, CamelNNTPFolder * _("Not connected.")); return -1; } - - /* Check for unprocessed data, ! */ - if (store->stream->mode == CAMEL_NNTP_STREAM_DATA) { - g_warning("Unprocessed data left in stream, flushing"); - while (camel_nntp_stream_getd(store->stream, (unsigned char **)&p, &u) > 0) - ; - } - camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_LINE); retry = 0; do { @@ -1279,6 +1271,14 @@ camel_nntp_command (CamelNNTPStore *store, CamelException *ex, CamelNNTPFolder * && !camel_service_connect (CAMEL_SERVICE (store), ex)) return -1; + /* Check for unprocessed data, ! */ + if (store->stream->mode == CAMEL_NNTP_STREAM_DATA) { + g_warning("Unprocessed data left in stream, flushing"); + while (camel_nntp_stream_getd(store->stream, (unsigned char **)&p, &u) > 0) + ; + } + camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_LINE); + if (folder != NULL && (store->current_folder == NULL || strcmp(store->current_folder, ((CamelFolder *)folder)->full_name) != 0)) { ret = camel_nntp_raw_command(store, ex, line, "group %s", ((CamelFolder *)folder)->full_name); |