diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-17 09:09:39 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-17 09:09:39 +0000 |
commit | a180370d2eb17006ef9b3df030445a30de6c2c89 (patch) | |
tree | 853eb20be82d45e66efcbff53432880442216423 /libsylph | |
parent | 191e20dbe4ce6118718ef0b3182219b56e560300 (diff) |
fixed IMAP4 filtering when IP unreachable.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1493 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/filter.c | 6 | ||||
-rw-r--r-- | libsylph/filter.h | 2 | ||||
-rw-r--r-- | libsylph/imap.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/libsylph/filter.c b/libsylph/filter.c index e33c3554..c7f60f29 100644 --- a/libsylph/filter.c +++ b/libsylph/filter.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -100,6 +100,8 @@ gint filter_apply_msginfo(GSList *fltlist, MsgInfo *msginfo, if (!fltlist) return 0; file = procmsg_get_message_file(msginfo); + if (!file) + return -1; hlist = procheader_get_header_list_from_file(file); if (!hlist) { g_free(file); @@ -367,6 +369,8 @@ static gboolean filter_match_cond(FilterCond *cond, MsgInfo *msginfo, break; case FLT_COND_CMD_TEST: file = procmsg_get_message_file(msginfo); + if (!file) + return FALSE; cmdline = g_strconcat(cond->str_value, " \"", file, "\"", NULL); matched = (execute_command_line(cmdline, FALSE) == 0); g_free(cmdline); diff --git a/libsylph/filter.h b/libsylph/filter.h index df6255a4..9f0940be 100644 --- a/libsylph/filter.h +++ b/libsylph/filter.h @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libsylph/imap.c b/libsylph/imap.c index 9eda5599..f3856ce1 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -882,6 +882,8 @@ static GSList *imap_get_msg_list_full(Folder *folder, FolderItem *item, session = imap_session_get(folder); if (!session) { + if (uncached_only) + return NULL; mlist = procmsg_read_cache(item, FALSE); item->last_num = procmsg_get_last_num_in_msg_list(mlist); procmsg_set_flags(mlist, item); |