/*
* 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.
*/
void JournalBackgroundSubmit(struct CtdlMessage *msg,
StrBuf *saved_rfc822_version,
- recptypes *recps) {
+ struct recptypes *recps) {
struct jnlq *jptr = NULL;
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]);
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;
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),
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.
jmsg->msgn = NULL;
/* Submit journal message */
- CtdlSubmitMsg(journal_msg, journal_recps, "", 0);
+ CtdlSubmitMsg(journal_msg, journal_recps, "");
CM_Free(journal_msg);
}