From 0387f48886a9395d89eaca01cd40ab751610426f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 14 Dec 2020 00:02:04 -0500 Subject: [PATCH] Removed an unused parameter from CtdlSubmitMsg(). Why was it even there? --- citadel/journaling.c | 4 ++-- citadel/modules/calendar/serv_calendar.c | 8 ++++---- citadel/modules/ctdlproto/serv_messages.c | 2 +- citadel/modules/imap/imap_misc.c | 2 +- citadel/modules/inboxrules/serv_inboxrules.c | 2 +- citadel/modules/instmsg/serv_instmsg.c | 4 ++-- citadel/modules/network/serv_netmail.c | 6 +++--- citadel/modules/pop3client/serv_pop3client.c | 4 ++-- citadel/modules/rssclient/serv_rssclient.c | 2 +- citadel/modules/smtp/serv_smtp.c | 2 +- citadel/modules/smtp/serv_smtpclient.c | 4 ++-- citadel/modules/smtp/smtp_util.c | 6 +++--- citadel/modules/vcard/serv_vcard.c | 2 +- citadel/modules/wiki/serv_wiki.c | 6 +++--- citadel/msgbase.c | 7 +++---- citadel/msgbase.h | 2 +- 16 files changed, 31 insertions(+), 32 deletions(-) diff --git a/citadel/journaling.c b/citadel/journaling.c index 51faeab6d..375589750 100644 --- a/citadel/journaling.c +++ b/citadel/journaling.c @@ -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. @@ -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); } diff --git a/citadel/modules/calendar/serv_calendar.c b/citadel/modules/calendar/serv_calendar.c index 939bb9551..83afa539b 100644 --- a/citadel/modules/calendar/serv_calendar.c +++ b/citadel/modules/calendar/serv_calendar.c @@ -145,7 +145,7 @@ void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) { CM_SetAsFieldSB(msg, eMesageText, &MsgBody); /* Now write the data */ - CtdlSubmitMsg(msg, NULL, "", QP_EADDR); + CtdlSubmitMsg(msg, NULL, ""); CM_Free(msg); } @@ -297,7 +297,7 @@ void ical_send_a_reply(icalcomponent *request, char *action) { if (msg != NULL) { valid = validate_recipients(organizer_string, NULL, 0); - CtdlSubmitMsg(msg, valid, "", QP_EADDR); + CtdlSubmitMsg(msg, valid, ""); CM_Free(msg); free_recipients(valid); } @@ -669,7 +669,7 @@ int ical_update_my_calendar_with_reply(icalcomponent *cal) { if (msg != NULL) { CIT_ICAL->avoid_sending_invitations = 1; - CtdlSubmitMsg(msg, NULL, roomname, QP_EADDR); + CtdlSubmitMsg(msg, NULL, roomname); CM_Free(msg); CIT_ICAL->avoid_sending_invitations = 0; } @@ -2169,7 +2169,7 @@ void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal) if (msg != NULL) { valid = validate_recipients(attendees_string, NULL, 0); - CtdlSubmitMsg(msg, valid, "", QP_EADDR); + CtdlSubmitMsg(msg, valid, ""); CM_Free(msg); free_recipients(valid); } diff --git a/citadel/modules/ctdlproto/serv_messages.c b/citadel/modules/ctdlproto/serv_messages.c index 01fe2a893..6550e4421 100644 --- a/citadel/modules/ctdlproto/serv_messages.c +++ b/citadel/modules/ctdlproto/serv_messages.c @@ -686,7 +686,7 @@ void cmd_ent0(char *entargs) } if (msg != NULL) { - msgnum = CtdlSubmitMsg(msg, valid, "", QP_EADDR); + msgnum = CtdlSubmitMsg(msg, valid, ""); if (do_confirm) { cprintf("%ld\n", msgnum); diff --git a/citadel/modules/imap/imap_misc.c b/citadel/modules/imap/imap_misc.c index 6e68b6cbe..c2c953b5b 100644 --- a/citadel/modules/imap/imap_misc.c +++ b/citadel/modules/imap/imap_misc.c @@ -392,7 +392,7 @@ void imap_append(int num_parms, ConstStr *Params) { else { /* Yes ... go ahead and post! */ if (msg != NULL) { - new_msgnum = CtdlSubmitMsg(msg, NULL, "", 0); + new_msgnum = CtdlSubmitMsg(msg, NULL, ""); } if (new_msgnum >= 0L) { IReplyPrintf("OK [APPENDUID %ld %ld] APPEND completed", diff --git a/citadel/modules/inboxrules/serv_inboxrules.c b/citadel/modules/inboxrules/serv_inboxrules.c index b5dc6d91a..4979e5715 100644 --- a/citadel/modules/inboxrules/serv_inboxrules.c +++ b/citadel/modules/inboxrules/serv_inboxrules.c @@ -373,7 +373,7 @@ int inbox_do_redirect(struct irule *rule, long msgnum) { return(1); // don't delete the inbox copy if this failed } - CtdlSubmitMsg(msg, valid, NULL, 0); // send the message to the new recipient + CtdlSubmitMsg(msg, valid, NULL); // send the message to the new recipient free_recipients(valid); CM_Free(msg); return(0); // delete the inbox copy diff --git a/citadel/modules/instmsg/serv_instmsg.c b/citadel/modules/instmsg/serv_instmsg.c index fad00f0ef..a774c61f2 100644 --- a/citadel/modules/instmsg/serv_instmsg.c +++ b/citadel/modules/instmsg/serv_instmsg.c @@ -1,7 +1,7 @@ /* * This module handles instant messaging between users. * - * Copyright (c) 1987-2019 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. @@ -479,7 +479,7 @@ void flush_individual_conversation(struct imlog *im) { */ snprintf(roomname, sizeof roomname, "%010ld.%s", im->usernums[1], PAGELOGROOM); CtdlCreateRoom(roomname, 5, "", 0, 1, 1, VIEW_BBS); - msgnum = CtdlSubmitMsg(msg, NULL, roomname, 0); + msgnum = CtdlSubmitMsg(msg, NULL, roomname); CM_Free(msg); /* If there is a valid user number in usernums[0], save a copy for them too. */ diff --git a/citadel/modules/network/serv_netmail.c b/citadel/modules/network/serv_netmail.c index 60b779da4..820c2fe9f 100644 --- a/citadel/modules/network/serv_netmail.c +++ b/citadel/modules/network/serv_netmail.c @@ -221,7 +221,7 @@ void network_deliver_digest(SpoolControl *sc) if (valid != NULL) { valid->bounce_to = strdup(bounce_to); valid->envelope_from = strdup(bounce_to); - CtdlSubmitMsg(msg, valid, NULL, 0); + CtdlSubmitMsg(msg, valid, NULL); } CM_Free(msg); free_recipients(valid); @@ -365,7 +365,7 @@ void network_deliver_list(struct CtdlMessage *msg, SpoolControl *sc, const char valid->bounce_to = strdup(bounce_to); valid->envelope_from = strdup(bounce_to); valid->sending_room = strdup(RoomName); - CtdlSubmitMsg(msg, valid, NULL, 0); + CtdlSubmitMsg(msg, valid, NULL); free_recipients(valid); } /* Do not call CM_Free(msg) here; the caller will free it. */ @@ -409,7 +409,7 @@ void network_process_participate(SpoolControl *sc, struct CtdlMessage *omsg, lon valid = validate_recipients(ChrPtr(sc->Users[participate]) , NULL, 0); CM_SetField(msg, eRecipient, SKEY(sc->Users[roommailalias])); - CtdlSubmitMsg(msg, valid, "", 0); + CtdlSubmitMsg(msg, valid, ""); free_recipients(valid); } CM_Free(msg); diff --git a/citadel/modules/pop3client/serv_pop3client.c b/citadel/modules/pop3client/serv_pop3client.c index 51d3f2dd9..8a674c77f 100644 --- a/citadel/modules/pop3client/serv_pop3client.c +++ b/citadel/modules/pop3client/serv_pop3client.c @@ -1,7 +1,7 @@ /* * Consolidate mail from remote POP3 accounts. * - * Copyright (c) 2007-2019 by the citadel.org team + * Copyright (c) 2007-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 as published @@ -143,7 +143,7 @@ void pop3client_one_mailbox(char *room, const char *host, const char *user, cons res = curl_easy_perform(curl); if (res == CURLE_OK) { struct CtdlMessage *msg = convert_internet_message_buf(&TheMsg); - CtdlSubmitMsg(msg, NULL, room, 0); + CtdlSubmitMsg(msg, NULL, room); CM_Free(msg); } else { diff --git a/citadel/modules/rssclient/serv_rssclient.c b/citadel/modules/rssclient/serv_rssclient.c index 7af7b5103..ca05dd62d 100644 --- a/citadel/modules/rssclient/serv_rssclient.c +++ b/citadel/modules/rssclient/serv_rssclient.c @@ -180,7 +180,7 @@ void rss_end_element(void *data, const char *el) long msgnum = (-1); for (rr=r->rooms; rr!=NULL; rr=rr->next) { if (rr == r->rooms) { - msgnum = CtdlSubmitMsg(r->msg, NULL, rr->room, 0); // in first room, save msg + msgnum = CtdlSubmitMsg(r->msg, NULL, rr->room); // in first room, save msg } else { CtdlSaveMsgPointerInRoom(rr->room, msgnum, 0, NULL); // elsewhere, save a pointer diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index eeace012e..8b03cfca6 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -948,7 +948,7 @@ void smtp_data(long offset, long flags) } else { /* Ok, we'll accept this message. */ - msgnum = CtdlSubmitMsg(msg, valid, "", 0); + msgnum = CtdlSubmitMsg(msg, valid, ""); if (msgnum > 0L) { StrBufPrintf(sSMTP->OneRcpt, "250 Message accepted.\r\n"); } diff --git a/citadel/modules/smtp/serv_smtpclient.c b/citadel/modules/smtp/serv_smtpclient.c index 70db0a116..718bd4502 100644 --- a/citadel/modules/smtp/serv_smtpclient.c +++ b/citadel/modules/smtp/serv_smtpclient.c @@ -141,7 +141,7 @@ int smtp_aftersave(struct CtdlMessage *msg, recptypes * recps) CM_SetField(imsg, eAuthor, HKEY("Citadel")); CM_SetField(imsg, eJournal, HKEY("do not journal")); CM_SetAsFieldSB(imsg, eMesageText, &SpoolMsg); - CtdlSubmitMsg(imsg, NULL, SMTP_SPOOLOUT_ROOM, QP_EADDR); + CtdlSubmitMsg(imsg, NULL, SMTP_SPOOLOUT_ROOM); CM_Free(imsg); } return 0; @@ -499,7 +499,7 @@ void smtp_process_one_msg(long qmsgnum) // replace the old queue entry with the new one syslog(LOG_DEBUG, "smtpclient: %ld rewriting", qmsgnum); msg = convert_internet_message_buf(&NewInstr); // This function will free NewInstr for us - CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM, 0); + CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM); CM_Free(msg); CtdlDeleteMessages(SMTP_SPOOLOUT_ROOM, &qmsgnum, 1, ""); } diff --git a/citadel/modules/smtp/smtp_util.c b/citadel/modules/smtp/smtp_util.c index 01b3bed35..f10899f9e 100644 --- a/citadel/modules/smtp/smtp_util.c +++ b/citadel/modules/smtp/smtp_util.c @@ -1,7 +1,7 @@ /* * Utility functions for the Citadel SMTP implementation * - * Copyright (c) 1998-2018 by the citadel.org team + * Copyright (c) 1998-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. @@ -247,14 +247,14 @@ void smtp_do_bounce(const char *instr, int is_final) valid = validate_recipients(bounceto, smtp_get_Recipients (), 0); if (valid != NULL) { if (valid->num_error == 0) { - CtdlSubmitMsg(bmsg, valid, "", QP_EADDR); + CtdlSubmitMsg(bmsg, valid, ""); successful_bounce = 1; } } /* If not, post it in the Aide> room */ if (successful_bounce == 0) { - CtdlSubmitMsg(bmsg, NULL, CtdlGetConfigStr("c_aideroom"), QP_EADDR); + CtdlSubmitMsg(bmsg, NULL, CtdlGetConfigStr("c_aideroom")); } /* Free up the memory we used */ diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index 21a99b2d0..b3889fdce 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -1164,7 +1164,7 @@ void store_this_ha(struct addresses_to_be_filed *aptr) { vcard_free(v); syslog(LOG_DEBUG, "vcard: adding contact: %s", recipient); - CtdlSubmitMsg(vmsg, NULL, aptr->roomname, QP_EADDR); + CtdlSubmitMsg(vmsg, NULL, aptr->roomname); CM_Free(vmsg); } } diff --git a/citadel/modules/wiki/serv_wiki.c b/citadel/modules/wiki/serv_wiki.c index ff7eec22d..e5d2f5455 100644 --- a/citadel/modules/wiki/serv_wiki.c +++ b/citadel/modules/wiki/serv_wiki.c @@ -352,7 +352,7 @@ int wiki_upload_beforesave(struct CtdlMessage *msg, recptypes *recp) { CM_SetFieldLONG(history_msg, eTimestamp, Now); - CtdlSubmitMsg(history_msg, NULL, "", 0); + CtdlSubmitMsg(history_msg, NULL, ""); } else { syslog(LOG_ALERT, "Empty boundary string in history message. No history!\n"); @@ -633,7 +633,7 @@ void wiki_rev(char *pagename, char *rev, char *operation) else if (!strcasecmp(operation, "fetch")) { CM_SetField(msg, eAuthor, HKEY("Citadel")); CtdlCreateRoom(wwm, 5, "", 0, 1, 1, VIEW_BBS); /* Not an error if already exists */ - msgnum = CtdlSubmitMsg(msg, NULL, wwm, 0); /* Store the revision here */ + msgnum = CtdlSubmitMsg(msg, NULL, wwm); /* Store the revision here */ /* * WARNING: VILE SLEAZY HACK @@ -670,7 +670,7 @@ void wiki_rev(char *pagename, char *rev, char *operation) if (!IsEmptyStr(pagename)) { CM_SetField(msg, eExclusiveID, pagename, strlen(pagename)); } - msgnum = CtdlSubmitMsg(msg, NULL, "", 0); /* Replace the current revision */ + msgnum = CtdlSubmitMsg(msg, NULL, ""); /* Replace the current revision */ } else { /* Theoretically it is impossible to get here, but throw an error anyway */ diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 870a83a03..bf18da744 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2659,8 +2659,7 @@ void ReplicationChecks(struct CtdlMessage *msg) { */ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ recptypes *recps, /* recipients (if mail) */ - const char *force, /* force a particular room? */ - int flags /* should the message be exported clean? */ + const char *force /* force a particular room? */ ) { char hold_rm[ROOMNAMELEN]; char actual_rm[ROOMNAMELEN]; @@ -3022,7 +3021,7 @@ long quickie_message(const char *from, CM_SetField(msg, eMesageText, text, -1); } - long msgnum = CtdlSubmitMsg(msg, recp, room, 0); + long msgnum = CtdlSubmitMsg(msg, recp, room); CM_Free(msg); if (recp != NULL) free_recipients(recp); return msgnum; @@ -3612,7 +3611,7 @@ void CtdlWriteObject(char *req_room, /* Room to stuff it in */ ); } /* Now write the data */ - CtdlSubmitMsg(msg, NULL, roomname, 0); + CtdlSubmitMsg(msg, NULL, roomname); CM_Free(msg); } diff --git a/citadel/msgbase.h b/citadel/msgbase.h index c990b23b2..c83b6e205 100644 --- a/citadel/msgbase.h +++ b/citadel/msgbase.h @@ -78,7 +78,7 @@ void memfmout (char *mptr, const char *nl); void output_mime_parts(char *); long send_message (struct CtdlMessage *); void loadtroom (void); -long CtdlSubmitMsg(struct CtdlMessage *, recptypes *, const char *, int); +long CtdlSubmitMsg(struct CtdlMessage *, recptypes *, const char *); long quickie_message(const char *from, const char *fromaddr, const char *to, char *room, const char *text, int format_type, const char *subject); void GetMetaData(struct MetaData *, long); void PutMetaData(struct MetaData *); -- 2.30.2