diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-08-07 06:17:18 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-08-07 06:17:18 +0800 |
commit | ee486f95dcd45fdd4acc5a1893f37e64310f8f15 (patch) | |
tree | 707c91170e7af4daf22fab11dd6f969a2980d9b9 /camel/providers/pop3/camel-pop3-folder.c | |
parent | ba57a90d939acce8ddc2b480f22de64be5c7a7f8 (diff) | |
download | gsoc2013-evolution-ee486f95dcd45fdd4acc5a1893f37e64310f8f15.tar.gz gsoc2013-evolution-ee486f95dcd45fdd4acc5a1893f37e64310f8f15.tar.zst gsoc2013-evolution-ee486f95dcd45fdd4acc5a1893f37e64310f8f15.zip |
Don't strstr for noselect=yes, that's just plain broken.
2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (get_folder_info_online):
Don't strstr for noselect=yes, that's just plain broken.
svn path=/trunk/; revision=11714
Diffstat (limited to 'camel/providers/pop3/camel-pop3-folder.c')
-rw-r--r-- | camel/providers/pop3/camel-pop3-folder.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c index b33a9f1569..0032077fd6 100644 --- a/camel/providers/pop3/camel-pop3-folder.c +++ b/camel/providers/pop3/camel-pop3-folder.c @@ -285,16 +285,16 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex) char *result, *body; CamelStream *msgstream; CamelMimeMessage *msg; - + num = uid_to_number (CAMEL_POP3_FOLDER (folder), uid); if (num == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("No message with uid %s"), uid); return NULL; } - - camel_operation_start_transient(NULL, _("Retrieving POP message %d"), num); - + + camel_operation_start_transient (NULL, _("Retrieving POP message %d"), num); + status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store), &result, ex, "RETR %d", num); switch (status) { @@ -304,14 +304,13 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex) g_free (result); /* fall through */ case CAMEL_POP3_FAIL: - camel_operation_end(NULL); + camel_operation_end (NULL); return NULL; } - - /* this should be "nnn octets" ? No. RTFRFC. FIXME. */ + if (result && sscanf (result, "%d", &total) != 1) total = 0; - + g_free (result); body = camel_pop3_command_get_additional_data (CAMEL_POP3_STORE (folder->parent_store), total, ex); if (!body) { @@ -320,21 +319,21 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex) _("Could not retrieve message from POP " "server %s: %s"), service->url->host, camel_exception_get_description (ex)); - camel_operation_end(NULL); + camel_operation_end (NULL); return NULL; } - + msgstream = camel_stream_mem_new_with_buffer (body, strlen (body)); g_free (body); msg = camel_mime_message_new (); camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), CAMEL_STREAM (msgstream)); - + camel_object_unref (CAMEL_OBJECT (msgstream)); - - camel_operation_end(NULL); - + + camel_operation_end (NULL); + return msg; } |