fixed an error in one of the log messages
[citadel.git] / citadel / msgbase.c
index a4ef8b925cfd6fea7b820b25e14b4cde8d242af9..30f9a6888b9c084a681e257656731a7b6ef4bbc0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Implements the message store.
  *
- * Copyright (c) 1987-2017 by the citadel.org team
+ * Copyright (c) 1987-2018 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.
@@ -2093,7 +2093,6 @@ int CtdlOutputPreLoadedMsg(
 
        if (!CM_IsValidMsg(TheMessage)) {
                syslog(LOG_ERR, "msgbase: error; invalid preloaded message for output");
-               cit_backtrace ();
                return(om_no_such_msg);
        }
 
@@ -2912,12 +2911,12 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,     /* message to save */
        /* Decide where bounces need to be delivered */
        if ((recps != NULL) && (recps->bounce_to == NULL))
        {
-               if (CC->logged_in) 
-                       snprintf(bounce_to, sizeof bounce_to, "%s@%s",
-                                CC->user.fullname, CtdlGetConfigStr("c_nodename"));
-               else 
-                       snprintf(bounce_to, sizeof bounce_to, "%s@%s",
-                                msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]);
+               if (CC->logged_in) {
+                       snprintf(bounce_to, sizeof bounce_to, "%s@%s", CC->user.fullname, CtdlGetConfigStr("c_nodename"));
+               }
+               else {
+                       snprintf(bounce_to, sizeof bounce_to, "%s@%s", msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]);
+               }
                recps->bounce_to = bounce_to;
        }
                
@@ -3603,8 +3602,6 @@ void AdjRefCountList(long *msgnum, long nmsg, int incr)
        struct arcq *new_arcq;
        int rv = 0;
 
-       syslog(LOG_DEBUG, "msgbase: AdjRefCountList() msg %ld ref count delta %+d", nmsg, incr);
-
        begin_critical_section(S_SUPPMSGMAIN);
        if (arcfp == NULL) {
                arcfp = fopen(file_arcq, "ab+");
@@ -3625,6 +3622,7 @@ void AdjRefCountList(long *msgnum, long nmsg, int incr)
        the_size = sizeof(struct arcq) * nmsg;
        new_arcq = malloc(the_size);
        for (i = 0; i < nmsg; i++) {
+               syslog(LOG_DEBUG, "msgbase: AdjRefCountList() msg %ld ref count delta %+d", msgnum[i], incr);
                new_arcq[i].arcq_msgnum = msgnum[i];
                new_arcq[i].arcq_delta = incr;
        }