X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmsgbase.c;h=ae745958bc7c3b4a7106286d93fa2e3d27dff1e4;hb=aca7dd04d80f04b9cd61f740549ce370e76bc332;hp=0b4ed5c593049f39d707f86733092cc144bdb69c;hpb=b6845a37c842070f70b8fbb98fb49c5e2cfc9644;p=citadel.git diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 0b4ed5c59..ae745958b 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -756,7 +756,7 @@ int CtdlForEachMessage(int mode, long ref, char *search_string, free(msglist); return -1; } - msg = CtdlFetchMessage(msglist[a], 1, 1); + msg = CtdlFetchMessage(msglist[a], 1); if (msg != NULL) { if (CtdlMsgCmp(msg, compare)) { msglist[a] = 0L; @@ -1163,7 +1163,7 @@ struct CtdlMessage *CtdlDeserializeMessage(long msgnum, int with_body, const cha * NOTE: Caller is responsible for freeing the returned CtdlMessage struct * using the CM_Free(); function. */ -struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body, int run_msg_hooks) +struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body) { struct cdbdata *dmsgtext; struct CtdlMessage *ret = NULL; @@ -1204,12 +1204,6 @@ struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body, int run_msg_hoo CM_SetField(ret, eMesageText, HKEY("\r\n\r\n (no text)\r\n")); } - /* Perform "before read" hooks (aborting if any return nonzero) */ - if (run_msg_hooks && (PerformMessageHooks(ret, NULL, EVT_BEFOREREAD) > 0)) { - CM_Free(ret); - return NULL; - } - return (ret); } @@ -1596,10 +1590,10 @@ int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */ * request that we don't even bother loading the body into memory. */ if (headers_only == HEADERS_FAST) { - TheMessage = CtdlFetchMessage(msg_num, 0, 1); + TheMessage = CtdlFetchMessage(msg_num, 0); } else { - TheMessage = CtdlFetchMessage(msg_num, 1, 1); + TheMessage = CtdlFetchMessage(msg_num, 1); } if (TheMessage == NULL) { @@ -2394,7 +2388,7 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms msg = supplied_msg; } else { - msg = CtdlFetchMessage(msgid, 0, 1); + msg = CtdlFetchMessage(msgid, 0); } if (msg != NULL) {