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 /libsylph/news.c | |
parent | 8651c0b8eb28892021a6c554bf896b2cce7263a3 (diff) |
news.c: show more verbose warnings.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@899 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/news.c')
-rw-r--r-- | libsylph/news.c | 15 |
1 files changed, 11 insertions, 4 deletions
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); |