Removed an unused parameter from CtdlSubmitMsg(). Why was it even there?
authorArt Cancro <ajc@citadel.org>
Mon, 14 Dec 2020 05:02:04 +0000 (00:02 -0500)
committerArt Cancro <ajc@citadel.org>
Mon, 14 Dec 2020 05:02:04 +0000 (00:02 -0500)
16 files changed:
citadel/journaling.c
citadel/modules/calendar/serv_calendar.c
citadel/modules/ctdlproto/serv_messages.c
citadel/modules/imap/imap_misc.c
citadel/modules/inboxrules/serv_inboxrules.c
citadel/modules/instmsg/serv_instmsg.c
citadel/modules/network/serv_netmail.c
citadel/modules/pop3client/serv_pop3client.c
citadel/modules/rssclient/serv_rssclient.c
citadel/modules/smtp/serv_smtp.c
citadel/modules/smtp/serv_smtpclient.c
citadel/modules/smtp/smtp_util.c
citadel/modules/vcard/serv_vcard.c
citadel/modules/wiki/serv_wiki.c
citadel/msgbase.c
citadel/msgbase.h

index 51faeab6d2b0352d08db627ee80e082ac852e27c..375589750db5e8a83e20ce94f1591409bf4e64a6 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.
@@ -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);
                }
 
index 939bb95516a3d98d4865c6c6e0c61ef1a1e317f3..83afa539bf60aafb66a1a2e8878b1c2bd8939f65 100644 (file)
@@ -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);
                }
index 01fe2a893e55c56d51d410983e3cc7c452a1b395..6550e44211ca4d1afe078a5adcf3902215c1b3cd 100644 (file)
@@ -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);
 
index 6e68b6cbe7915fc3c4daf2d857677bc58d22269c..c2c953b5b61d3ee1658f32dfdc6c26c9c7ebf340 100644 (file)
@@ -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",
index b5dc6d91a4016dc5c7480bc556e29e07036be3b1..4979e57150e74f64900535fef0bd7de83e26c0bf 100644 (file)
@@ -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
index fad00f0ef6c28492d5156b962f20492518477c13..a774c61f2f4d030160bf0c7bc39e550b2c7b7120 100644 (file)
@@ -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. */
index 60b779da444d1acbfe4ee6e9bb4d3cdf31f84353..820c2fe9f6f8448b9b469ff55b2a914a57355b18 100644 (file)
@@ -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);
index 51d3f2dd9599ef9eabbf64a9718784b99faf8f3c..8a674c77f4df847f429c2ad479490c23ff795c43 100644 (file)
@@ -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 {
index 7af7b510398c7e1f05deb9ab8dd9dcad52f0853d..ca05dd62d5067d619f77e030bf797b11a9b450a4 100644 (file)
@@ -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
index eeace012e618b2837f1c0097548f87bf43bcfea0..8b03cfca65f9a637c061d064a282cd9f47d4a547 100644 (file)
@@ -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");
                }
index 70db0a1161122f5cdbab638fefbe152b48a92352..718bd450275c8846c788e7066296af16c1f20464 100644 (file)
@@ -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, "");
                }
index 01b3bed3557e6d3d342d224dc0e595cf8694e51c..f10899f9e68c83b76ae0d738a7c3fa6907133046 100644 (file)
@@ -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 */
index 21a99b2d0aae3b99aad1674d320225cc56700600..b3889fdce2b0e0383ad74eb3cd60572682a61563 100644 (file)
@@ -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);
                }
        }
index ff7eec22d72ac1a7cfe0c498ad58fb4a0e59c5d4..e5d2f545533de44f133d74e6820757ffe111bf30 100644 (file)
@@ -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 */
index 870a83a0347dcd0e318e28330a130bb92b562e38..bf18da7447b0e2323e4cfbc74aad76235ad4f876 100644 (file)
@@ -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);
 }
 
index c990b23b2edd2f96a5e10491e2bc753c165c8b9d..c83b6e2058854258bf2080fb34184c677457bbb1 100644 (file)
@@ -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 *);