diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-17 05:32:17 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-17 05:32:17 +0000 |
commit | b95e2b6f962ddccf667155ec1fa67d5006e5cfaf (patch) | |
tree | 6512d83bec07cca0a7c050cc533f2b7c16500208 | |
parent | 8651c0b8eb28892021a6c554bf896b2cce7263a3 (diff) |
news.c: show more verbose warnings.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@899 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ChangeLog.ja | 4 | ||||
-rw-r--r-- | libsylph/news.c | 15 |
3 files changed, 19 insertions, 4 deletions
@@ -1,3 +1,7 @@ +2006-01-17 + + * libsylph/news.c: news_get_group_list(): show more verbose warnings. + 2006-01-13 * version 2.2.0beta4 diff --git a/ChangeLog.ja b/ChangeLog.ja index 3f07c7e8..b96c82ff 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,7 @@ +2006-01-17 + + * libsylph/news.c: news_get_group_list(): より詳細な警告を表示。 + 2006-01-13 * version 2.2.0beta4 diff --git a/libsylph/news.c b/libsylph/news.c index 0c1ab053..e17e86c5 100644 --- a/libsylph/news.c +++ b/libsylph/news.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2005 Hiroyuki Yamamoto + * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -553,7 +553,7 @@ GSList *news_get_group_list(Folder *folder) return NULL; } if (recv_write_to_file(SESSION(session)->sock, filename) < 0) { - log_warning(_("can't retrieve newsgroup list\n")); + log_warning("can't retrieve newsgroup list\n"); session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; g_free(filename); @@ -576,13 +576,20 @@ GSList *news_get_group_list(Folder *folder) NewsGroupInfo *ginfo; p = strchr(p, ' '); - if (!p) continue; + if (!p) { + strretchomp(buf); + log_warning("invalid LIST response: %s\n", buf); + continue; + } *p = '\0'; p++; name = buf; - if (sscanf(p, "%d %d %c", &last_num, &first_num, &type) < 3) + if (sscanf(p, "%d %d %c", &last_num, &first_num, &type) < 3) { + strretchomp(p); + log_warning("invalid LIST response: %s %s\n", name, p); continue; + } ginfo = news_group_info_new(name, first_num, last_num, type); |