X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmsgbase.c;h=d73875df59ff5bed13f547ec74ac3d03f1149a14;hb=6d86b3d162e6f6879d97d0a62351a4538d41c687;hp=94405b53fc5465d02a5a869fdb6d75bca9eb4cc2;hpb=007bbcbb07600e1d40cc90df3ddf788f8312b7d9;p=citadel.git diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 94405b53f..d73875df5 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -1056,21 +1056,9 @@ int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */ */ /* - * Fetch the message from disk. We also keep the most recently - * read message in memory, in case we want to read it again, or fetch - * MIME parts out of it, or whatever. + * Fetch the message from disk. */ - if ( (CC->cached_msg != NULL) && (CC->cached_msgnum == msg_num) ) { - TheMessage = CC->cached_msg; - } - else { - TheMessage = CtdlFetchMessage(msg_num); - if (CC->cached_msg != NULL) { - phree(CC->cached_msg); /* FIXME efence? */ - } - CC->cached_msg = TheMessage; - CC->cached_msgnum = msg_num; - } + TheMessage = CtdlFetchMessage(msg_num); if (TheMessage == NULL) { if (do_proto) cprintf("%d Can't locate msg %ld on disk\n", @@ -1082,8 +1070,7 @@ int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */ TheMessage, msg_num, mode, headers_only, do_proto, crlf); - /* don't free the memory; we're keeping it in the cache */ - /* CtdlFreeMessage(TheMessage); */ + CtdlFreeMessage(TheMessage); return(retcode); }