X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmsgbase.c;h=68c94cca054f6794f839db089562124a0a1ea113;hb=d8ea0b390e111014f00a43ed0acf3aeb53987901;hp=2442afac9066342cac63bdd115f330c547e937b0;hpb=1fdafa533f1f8aa20503a010a900cf3d71042a36;p=citadel.git diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 2442afac9..68c94cca0 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -3217,14 +3217,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