#include "summaryview.h"
#include "log.h"
#include "timing.h"
+#include "inc.h"
static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_session, gchar **errstr);
START_TIMING("procmsg_get_thread_tree");
root = g_node_new(NULL);
msgid_table = g_hash_table_new(g_str_hash, g_str_equal);
- subject_relation = g_relation_new(2);
- g_relation_index(subject_relation, 0, g_str_hash, g_str_equal);
+
+ if (prefs_common.thread_by_subject) {
+ subject_relation = g_relation_new(2);
+ g_relation_index(subject_relation, 0, g_str_hash, g_str_equal);
+ }
for (; mlist != NULL; mlist = mlist->next) {
msginfo = (MsgInfo *)mlist->data;
END_TIMING();
}
- g_relation_destroy(subject_relation);
+ if (prefs_common.thread_by_subject)
+ g_relation_destroy(subject_relation);
+
g_hash_table_destroy(msgid_table);
END_TIMING();
return root;
return -1;
}
send_queue_lock = TRUE;
+ inc_lock();
if (!queue)
queue = folder_get_default_queue();
if (queue == NULL) {
send_queue_lock = FALSE;
+ inc_unlock();
return -1;
}
}
}
send_queue_lock = FALSE;
+ inc_unlock();
toolbar_main_set_sensitive(mainwindow_get_mainwindow());
return (err != 0 ? -err : sent);
g_warning("can't save message\n");
return -1;
}
- return 0;
}
msginfo = folder_item_get_msginfo(outbox, num); /* refcnt++ */
tmp_msginfo = procmsg_msginfo_get_full_info(msginfo); /* refcnt++ */
if (tmp_msginfo && (msginfo->dispositionnotificationto ||
msginfo->returnreceiptto)) {
procmsg_msginfo_set_flags(msginfo, MSG_RETRCPT_SENT, 0);
- procmsg_msginfo_free(msginfo); /* refcnt-- */
}
+ procmsg_msginfo_free(tmp_msginfo); /* refcnt-- */
}
return 0;