talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 59a718bfd6732a9997bb6020e776ac1ee049d358
parent 414b08d658d56f25052aab18ab75d7e321d97e3b
Author: Colin Leroy <colin@colino.net>
Date:   Thu, 11 Oct 2018 16:06:39 +0200

Make the "Saving sent message..." debug prints more interesting.

Diffstat:
Msrc/procmsg.c | 26++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/procmsg.c b/src/procmsg.c @@ -1132,13 +1132,19 @@ gint procmsg_save_to_outbox(FolderItem *outbox, const gchar *file, gint num; MsgInfo *msginfo, *tmp_msginfo; MsgFlags flag = {0, 0}; + gchar *outbox_path = NULL; - debug_print("saving sent message...\n"); - - if (!outbox) + if (!outbox) { + debug_print("using default outbox\n"); outbox = folder_get_default_outbox(); + } + cm_return_val_if_fail(outbox != NULL, -1); + outbox_path = folder_item_get_path(outbox); + debug_print("saving sent message to %s...\n", outbox_path); + g_free(outbox_path); + /* remove queueing headers */ if (is_queued) { gchar tmp[MAXPATHLEN + 1]; @@ -1740,13 +1746,21 @@ send_mail: /* save message to outbox */ if (mailval == 0 && newsval == 0 && savecopyfolder) { - debug_print("saving sent message...\n"); + debug_print("saving sent message to %s...\n", savecopyfolder); if (!encrypt || !mailac->save_encrypted_as_clear_text) { outbox = folder_find_item_from_identifier(savecopyfolder); - if (!outbox) + if (!outbox) { + gchar *id; outbox = folder_get_default_outbox(); - + if (outbox != NULL) { + id = folder_item_get_identifier(outbox); + debug_print("%s not found, using %s\n", savecopyfolder, id); + g_free(id); + } else { + debug_print("could not find outbox\n"); + } + } /* Mail was not saved to outbox before encrypting, save it now. */ gboolean saved = FALSE; *queued_removed = FALSE;