remove typedef from struct recptypes
[citadel.git] / citadel / journaling.c
index 57228e8ed7d7e9e8b0ad964fde231f2c8212f972..939ec3b7d685b3aab69cb38a039ae613a4616fea 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Message journaling functions.
  *
- * Copyright (c) 1987-2018 by the citadel.org team
+ * Copyright (c) 1987-2020 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -29,7 +29,7 @@ struct jnlq *jnlq = NULL;     /* journal queue */
  */
 void JournalBackgroundSubmit(struct CtdlMessage *msg,
                        StrBuf *saved_rfc822_version,
-                       recptypes *recps) {
+                       struct recptypes *recps) {
 
        struct jnlq *jptr = NULL;
 
@@ -45,7 +45,7 @@ void JournalBackgroundSubmit(struct CtdlMessage *msg,
                return;
        }
        memset(jptr, 0, sizeof(struct jnlq));
-       if (recps != NULL) memcpy(&jptr->recps, recps, sizeof(recptypes));
+       if (recps != NULL) memcpy(&jptr->recps, recps, sizeof(struct recptypes));
        if (!CM_IsEmpty(msg, eAuthor)) jptr->from = strdup(msg->cm_fields[eAuthor]);
        if (!CM_IsEmpty(msg, erFc822Addr)) jptr->rfca = strdup(msg->cm_fields[erFc822Addr]);
        if (!CM_IsEmpty(msg, eMsgSubject)) jptr->subj = strdup(msg->cm_fields[eMsgSubject]);
@@ -89,7 +89,7 @@ void local_to_inetemail(char *inetemail, char *localuser, size_t inetemail_len)
 void JournalRunQueueMsg(struct jnlq *jmsg) {
 
        struct CtdlMessage *journal_msg = NULL;
-       recptypes *journal_recps = NULL;
+       struct recptypes *journal_recps = NULL;
        StrBuf *message_text = NULL;
        char mime_boundary[256];
        long mblen;
@@ -121,15 +121,15 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                        CM_SetField(journal_msg, eJournal, HKEY("is journal"));
 
                        if (!IsEmptyStr(jmsg->from)) {
-                               CM_SetField(journal_msg, eAuthor, jmsg->from, strlen(jmsg->from));
+                               CM_SetField(journal_msg, eAuthor, jmsg->from, -1);
                        }
 
                        if (!IsEmptyStr(jmsg->rfca)) {
-                               CM_SetField(journal_msg, erFc822Addr, jmsg->rfca, strlen(jmsg->rfca));
+                               CM_SetField(journal_msg, erFc822Addr, jmsg->rfca, -1);
                        }
 
                        if (!IsEmptyStr(jmsg->subj)) {
-                               CM_SetField(journal_msg, eMsgSubject, jmsg->subj, strlen(jmsg->subj));
+                               CM_SetField(journal_msg, eMsgSubject, jmsg->subj, -1);
                        }
 
                        mblen = snprintf(mime_boundary, sizeof(mime_boundary),
@@ -142,7 +142,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                                rfc822len = 0;
                        }
 
-                       message_text = NewStrBufPlain(NULL, rfc822len + sizeof(recptypes) + 1024);
+                       message_text = NewStrBufPlain(NULL, rfc822len + sizeof(struct recptypes) + 1024);
 
                        /*
                         * Here is where we begin to compose the journalized message.
@@ -223,7 +223,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                        jmsg->msgn = NULL;
                        
                        /* Submit journal message */
-                       CtdlSubmitMsg(journal_msg, journal_recps, "", 0);
+                       CtdlSubmitMsg(journal_msg, journal_recps, "");
                        CM_Free(journal_msg);
                }