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 51faeab..3755897 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 939bb95..83afa53 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 01fe2a8..6550e44 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 6e68b6c..c2c953b 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 b5dc6d9..4979e57 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 fad00f0..a774c61 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 60b779d..820c2fe 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 51d3f2d..8a674c7 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 7af7b51..ca05dd6 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 eeace01..8b03cfc 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 70db0a1..718bd45 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 01b3bed..f10899f 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 21a99b2..b3889fd 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 ff7eec2..e5d2f54 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 870a83a..bf18da7 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 c990b23..c83b6e2 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 *);