diff options
author | Not Zed <NotZed@Ximian.com> | 2001-11-28 07:05:30 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-11-28 07:05:30 +0800 |
commit | 4b89a1c6b25b16241b216531a1c70ccb95e55d6d (patch) | |
tree | c59fbce05405e55d4fd01b8754a37f160a7ccec3 /camel/providers/nntp/camel-nntp-folder.c | |
parent | 45aa3c76643dfc428fc9eaf19857239f71e16dc5 (diff) | |
download | gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.tar gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.tar.gz gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.tar.bz2 gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.tar.lz gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.tar.xz gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.tar.zst gsoc2013-evolution-4b89a1c6b25b16241b216531a1c70ccb95e55d6d.zip |
If the uid doesn't have a ',' in it, fail to crash.
2001-11-25 Not Zed <NotZed@Ximian.com>
* providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
the uid doesn't have a ',' in it, fail to crash.
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_article_is_read): check group != NULL before scanning.
(camel_nntp_newsrc_get_highest_article_read): "
(camel_nntp_newsrc_get_num_articles_read): "
(camel_nntp_newsrc_mark_range_read): "
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_overview_fmt): IF we dont have
nntp_list_follows, dont try and get a list response.
(nntp_store_get_folder_info): Set path part of folderinfo.
svn path=/trunk/; revision=14799
Diffstat (limited to 'camel/providers/nntp/camel-nntp-folder.c')
-rw-r--r-- | camel/providers/nntp/camel-nntp-folder.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c index 9f291d9fb8..e3b4da6b40 100644 --- a/camel/providers/nntp/camel-nntp-folder.c +++ b/camel/providers/nntp/camel-nntp-folder.c @@ -105,15 +105,18 @@ nntp_folder_get_message (CamelFolder *folder, const gchar *uid, CamelException * /* get the parent store */ parent_store = camel_folder_get_parent_store (folder); - message_id = strchr (uid, ',') + 1; - status = camel_nntp_command (CAMEL_NNTP_STORE( parent_store ), ex, NULL, "ARTICLE %s", message_id); + message_id = strchr (uid, ','); + if (message_id) { + message_id++; + status = camel_nntp_command (CAMEL_NNTP_STORE( parent_store ), ex, NULL, "ARTICLE %s", message_id); + } /* if the message_id was not found, raise an exception and return */ - if (status == NNTP_NO_SUCH_ARTICLE) { + if (message_id == NULL || status == NNTP_NO_SUCH_ARTICLE) { camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Message %s not found."), - message_id); + uid); return NULL; } else if (status != NNTP_ARTICLE_FOLLOWS) { |