X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fnetwork%2Fserv_netspool.c;fp=citadel%2Fmodules%2Fnetwork%2Fserv_netspool.c;h=b13f1b8ff1f4827a91e50a7114476b72abf89962;hp=3ebac02fe1da072764f7e1b4da1835c01f9d9ceb;hb=655715fde9f23bbd59cd49f2189077598c428db0;hpb=2626e55c60386f4527a7a5722a4564dd9cb369fc diff --git a/citadel/modules/network/serv_netspool.c b/citadel/modules/network/serv_netspool.c index 3ebac02fe..b13f1b8ff 100644 --- a/citadel/modules/network/serv_netspool.c +++ b/citadel/modules/network/serv_netspool.c @@ -325,27 +325,23 @@ void InspectQueuedRoom(SpoolControl **pSC, void CalcListID(SpoolControl *sc) { StrBuf *RoomName; - const char *err; - int fd; struct CitContext *CCC = CC; - char filename[PATH_MAX]; #define MAX_LISTIDLENGTH 150 - assoc_file_name(filename, sizeof filename, &sc->room, ctdl_info_dir); - fd = open(filename, 0); - - if (fd > 0) { - struct stat stbuf; - - if ((fstat(fd, &stbuf) == 0) && - (stbuf.st_size > 0)) - { - sc->RoomInfo = NewStrBufPlain(NULL, stbuf.st_size + 1); - StrBufReadBLOB(sc->RoomInfo, &fd, 0, stbuf.st_size, &err); - } - close(fd); + // Load the room banner as the list description + struct CtdlMessage *msg = CtdlFetchMessage(sc->room.msgnum_info, 1, 1); + if (msg != NULL) { + CC->redirect_buffer = NewStrBufPlain(NULL, SIZ); + CtdlOutputPreLoadedMsg(msg, MT_CITADEL, HEADERS_NONE, 0, 0, 0); + CM_Free(msg); + sc->RoomInfo = CC->redirect_buffer; + CC->redirect_buffer = NULL; + } + else { + sc->RoomInfo = NewStrBufPlain(NULL, SIZ); } + // Calculate the List ID sc->ListID = NewStrBufPlain(NULL, 1024); if (StrLength(sc->RoomInfo) > 0) {