X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmsgbase.c;h=c583263eb4ebc19220aa72a3660637dcff0ca1b6;hb=79b223cc3fa9d72e4b202b1e5a32adcb53210c37;hp=1bc393b26efc0c958d6655f4fc0910ea4863fef2;hpb=7d014eb06c42f620b197a9530051326f46ae6c9b;p=citadel.git diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 1bc393b26..c583263eb 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2635,7 +2635,6 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms "CtdlSaveMsgPointersInRoom(room=%s, num_msgs=%d, repl=%d, suppress_rca=%d)\n", roomname, num_newmsgs, do_repl_check, suppress_refcount_adj ); - if (num_newmsgs > 0) for (i=0; iroom.QRname); @@ -2682,10 +2681,6 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms } if (unique) { msgs_to_be_merged[num_msgs_to_be_merged++] = newmsgidlist[i]; - syslog(LOG_DEBUG, "\033[32mmsg %ld is being merged\033[0m", newmsgidlist[i]); - } - else { - syslog(LOG_DEBUG, "\033[31mmsg %ld is not unique\033[0m", newmsgidlist[i]); } } @@ -3266,14 +3261,18 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ } else { syslog(LOG_DEBUG, "No user <%s>\n", recipient); - CtdlSaveMsgPointerInRoom(config.c_aideroom, - newmsgid, 0, msg); + CtdlSaveMsgPointerInRoom(config.c_aideroom, newmsgid, 0, msg); } } /* Perform "after save" hooks */ syslog(LOG_DEBUG, "Performing after-save hooks\n"); + if (msg->cm_fields['3'] != NULL) free(msg->cm_fields['3']); + msg->cm_fields['3'] = malloc(20); + snprintf(msg->cm_fields['3'], 20, "%ld", newmsgid); PerformMessageHooks(msg, EVT_AFTERSAVE); + free(msg->cm_fields['3']); + msg->cm_fields['3'] = NULL; /* For IGnet mail, we have to save a new copy into the spooler for * each recipient, with the R and D fields set to the recipient and