More C99-style comments.
[citadel.git] / citadel / server / journaling.c
index 77cd53e1472972ac1e2a4a81861dd713a749b389..8a97fd4798bdf52743b2c6a77159c253b0048df9 100644 (file)
@@ -1,6 +1,6 @@
 // Message journaling functions.
 //
-// Copyright (c) 1987-2023 by the citadel.org team
+// Copyright (c) 1987-2024 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or disclosure
 // is subject to the terms of the GNU General Public License, version 3.
 
 struct jnlq *jnlq = NULL;      // journal queue
 
-/*
- * Hand off a copy of a message to be journalized.
- */
-void JournalBackgroundSubmit(struct CtdlMessage *msg,
-                       StrBuf *saved_rfc822_version,
-                       struct recptypes *recps) {
-
+// Hand off a copy of a message to be journalized.
+void JournalBackgroundSubmit(struct CtdlMessage *msg, StrBuf *saved_rfc822_version, struct recptypes *recps) {
        struct jnlq *jptr = NULL;
 
-       /* Avoid double journaling! */
+       // Avoid double journaling!
        if (!CM_IsEmpty(msg, eJournal)) {
                FreeStrBuf(&saved_rfc822_version);
                return;
@@ -45,7 +40,7 @@ void JournalBackgroundSubmit(struct CtdlMessage *msg,
        if (!CM_IsEmpty(msg, emessageId)) jptr->msgn = strdup(msg->cm_fields[emessageId]);
        jptr->rfc822 = SmashStrBuf(&saved_rfc822_version);
 
-       /* Add to the queue */
+       // Add to the queue
        begin_critical_section(S_JOURNAL_QUEUE);
        jptr->next = jnlq;
        jnlq = jptr;
@@ -53,10 +48,8 @@ void JournalBackgroundSubmit(struct CtdlMessage *msg,
 }
 
 
-/*
- * Convert a local user name to an internet email address for the journal
- * FIXME - grab the user's Internet email address from the user record, not from vCard !!!!
- */
+// Convert a local user name to an internet email address for the journal
+// FIXME - grab the user's Internet email address from the user record, not from vCard !!!!
 void local_to_inetemail(char *inetemail, char *localuser, size_t inetemail_len) {
        struct ctdluser us;
        struct vCard *v;
@@ -76,9 +69,7 @@ void local_to_inetemail(char *inetemail, char *localuser, size_t inetemail_len)
 }
 
 
-/*
- * Called by JournalRunQueue() to send an individual message.
- */
+// Called by JournalRunQueue() to send an individual message.
 void JournalRunQueueMsg(struct jnlq *jmsg) {
 
        struct CtdlMessage *journal_msg = NULL;
@@ -101,11 +92,8 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                   || (journal_recps->num_internet > 0)
                   || (journal_recps->num_room > 0)
                ) {
-
-                       /*
-                        * Construct journal message.
-                        * Note that we are transferring ownership of some of the memory here.
-                        */
+                       // Construct journal message.
+                       // Note that we are transferring ownership of some of the memory here.
                        journal_msg = malloc(sizeof(struct CtdlMessage));
                        memset(journal_msg, 0, sizeof(struct CtdlMessage));
                        journal_msg->cm_magic = CTDLMESSAGE_MAGIC;
@@ -137,10 +125,8 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
 
                        message_text = NewStrBufPlain(NULL, rfc822len + sizeof(struct recptypes) + 1024);
 
-                       /*
-                        * Here is where we begin to compose the journalized message.
-                        * (The "ExJournalReport" header is consumed by some email retention services which assume the journaling agent is Exchange.)
-                        */
+                       // Here is where we begin to compose the journalized message.
+                       // (The "ExJournalReport" header is consumed by some email retention services which assume the journaling agent is Exchange.)
                        StrBufAppendBufPlain(
                                message_text, 
                                HKEY("Content-type: multipart/mixed; boundary=\""),
@@ -215,7 +201,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                        jmsg->rfc822 = NULL;
                        jmsg->msgn = NULL;
                        
-                       /* Submit journal message */
+                       // Submit journal message
                        CtdlSubmitMsg(journal_msg, journal_recps, "");
                        CM_Free(journal_msg);
                }
@@ -223,14 +209,12 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                free_recipients(journal_recps);
        }
 
-       /* We are responsible for freeing this memory. */
+       // We are responsible for freeing this memory.
        free(jmsg);
 }
 
 
-/*
- * Run the queue.
- */
+// Run the queue.
 void JournalRunQueue(void) {
        struct jnlq *jptr = NULL;