Added --with-threadlog. Use this if you want the thread table written to
[citadel.git] / citadel / journaling.c
index e344e6ba9fa680c9a872e363a3a49169386a0dbf..267d781a4e2b8b8e425280f3f0cd0c0d991b4be9 100644 (file)
@@ -48,6 +48,8 @@
 #include "serv_vcard.h"                        /* Needed for vcard_getuser and extract_inet_email_addrs */
 #include "journaling.h"
 
+#include "ctdl_module.h"
+
 struct jnlq *jnlq = NULL;      /* journal queue */
 
 /*
@@ -260,6 +262,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
 void JournalRunQueue(void) {
        struct jnlq *jptr = NULL;
 
+       CtdlThreadPushName("JournalRunQueue");
        while (jnlq != NULL) {
                begin_critical_section(S_JOURNAL_QUEUE);
                if (jnlq != NULL) {
@@ -269,6 +272,7 @@ void JournalRunQueue(void) {
                end_critical_section(S_JOURNAL_QUEUE);
                JournalRunQueueMsg(jptr);
        }
+       CtdlThreadPopName();
 }