diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-05 06:45:34 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-05 06:45:34 +0000 |
commit | fa466fd5e1e6b481f6249979cfb7397caa875f5c (patch) | |
tree | d26111cc73dba81cd7c684f4528695bfcf16ee53 /src/procmsg.c | |
parent | 02a672d5bfa50cad8ab5cb047125c708c68176ab (diff) |
moved procmsg.c::procmsg_send_queue() to send_message.c::send_message_queue_all().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@545 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/procmsg.c')
-rw-r--r-- | src/procmsg.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/src/procmsg.c b/src/procmsg.c index 9766d874..560c0478 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -28,7 +28,6 @@ #include "procmsg.h" #include "procheader.h" #include "account.h" -#include "send_message.h" #include "procmime.h" #include "prefs_common.h" #include "prefs_filter.h" @@ -1239,81 +1238,6 @@ void procmsg_empty_all_trash(void) } } -gint procmsg_send_queue(FolderItem *queue, gboolean save_msgs, - gboolean filter_msgs) -{ - gint ret = 0; - GSList *mlist = NULL; - GSList *cur; - - if (!queue) - queue = folder_get_default_queue(); - g_return_val_if_fail(queue != NULL, -1); - - mlist = folder_item_get_msg_list(queue, FALSE); - mlist = procmsg_sort_msg_list(mlist, SORT_BY_NUMBER, SORT_ASCENDING); - - for (cur = mlist; cur != NULL; cur = cur->next) { - gchar *file; - MsgInfo *msginfo = (MsgInfo *)cur->data; - QueueInfo *qinfo; - gchar tmp[MAXPATHLEN + 1]; - - file = procmsg_get_message_file(msginfo); - if (!file) - continue; - - qinfo = send_get_queue_info(file); - if (!qinfo || send_message_queue(qinfo) < 0) { - g_warning("Sending queued message %d failed.\n", - msginfo->msgnum); - send_queue_info_free(qinfo); - g_free(file); - continue; - } - - g_snprintf(tmp, sizeof(tmp), "%s%ctmpmsg.out.%08x", - get_rc_dir(), G_DIR_SEPARATOR, g_random_int()); - - if (send_get_queue_contents(qinfo, tmp) == 0) { - if (save_msgs) { - FolderItem *outbox; - outbox = account_get_special_folder - (qinfo->ac, F_OUTBOX); - procmsg_save_to_outbox(outbox, tmp); - } - if (filter_msgs) { - FilterInfo *fltinfo; - - fltinfo = filter_info_new(); - fltinfo->account = qinfo->ac; - fltinfo->flags.perm_flags = 0; - fltinfo->flags.tmp_flags = MSG_RECEIVED; - - filter_apply(prefs_common.fltlist, tmp, - fltinfo); - - filter_info_free(fltinfo); - } - g_unlink(tmp); - } - - send_queue_info_free(qinfo); - g_free(file); - - folder_item_remove_msg(queue, msginfo); - ret++; - } - - procmsg_msg_list_free(mlist); - - procmsg_clear_cache(queue); - queue->cache_dirty = FALSE; - queue->mtime = 0; - - return ret; -} - gint procmsg_save_to_outbox(FolderItem *outbox, const gchar *file) { gint num; |