aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-06-10 10:13:24 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-06-10 10:13:24 +0800
commit51f081335faf0609b65e284a48d4b5513a72a04d (patch)
tree03039ff0f2ade194e8852761b330ab4f32a6de3a /camel
parent8d2043ec63bc9c6998f2a1aea610279313f1f9ad (diff)
downloadgsoc2013-evolution-51f081335faf0609b65e284a48d4b5513a72a04d.tar.gz
gsoc2013-evolution-51f081335faf0609b65e284a48d4b5513a72a04d.tar.zst
gsoc2013-evolution-51f081335faf0609b65e284a48d4b5513a72a04d.zip
move the stream based checking into the loop, after we connect. Fixes a
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. svn path=/trunk/; revision=26272
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/nntp/camel-nntp-store.c16
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);