Skip to content
Snippets Groups Projects
Commit b9e78bdf authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Batch download queue not cleared upon packed QWK packet

Before the "new filebase" merge of 2021, a user's batch download queue would be cleared when a QWK packet was successfully packed for them via the event thread (i.e. triggered via semaphore file). That was lost in the new filebase change (the batch download queue would not be cleared) - caught by Coverity (CID 350336).

It appears pre-packed QWK packets never cleared the batch download queue (does anyone actually use this feature in this day and age?) - fixed.
parent d4306822
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -24,6 +24,7 @@
#include "telnet.h"
#include "netwrap.h"
#include "petdefs.h"
#include "filedat.h"
#include "js_rtpool.h"
#include "js_request.h"
#include "ssl.h"
......@@ -2570,7 +2571,6 @@ static bool is_time_to_run(time_t now, const qhub_t* hub)
void event_thread(void* arg)
{
char str[MAX_PATH+1];
char bat_list[MAX_PATH+1];
char semfile[MAX_PATH+1];
int i,j,k;
int file;
......@@ -2752,7 +2752,7 @@ void event_thread(void* arg)
sbbs->lprintf(LOG_INFO, "Packing completed: %s", str);
sbbs->qwk_success(l,0,1);
sbbs->putmsgptrs();
remove(bat_list);
batch_list_clear(&sbbs->cfg, sbbs->useron.number, XFER_BATCH_DOWNLOAD);
} else
sbbs->lputs(LOG_INFO, "No packet created (no new messages)");
sbbs->delfiles(sbbs->cfg.temp_dir,ALLFILES);
......@@ -2804,6 +2804,7 @@ void event_thread(void* arg)
if(sbbs->pack_qwk(str,&l,true /* pre-pack */)) {
sbbs->qwk_success(l,0,1);
sbbs->putmsgptrs();
batch_list_clear(&sbbs->cfg, sbbs->useron.number, XFER_BATCH_DOWNLOAD);
}
sbbs->delfiles(sbbs->cfg.temp_dir,ALLFILES);
sbbs->console&=~CON_L_ECHO;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment