From 0b2d6ab2728082908391d5fca2e233244d8e2d85 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 31 Oct 2018 07:44:44 +0000 Subject: [PATCH] Still pack the QWK packet (i.e. with messages from sub-boards) even if the mail base can't be opened (e.g. it's locked for maintenance). --- src/sbbs3/pack_qwk.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/sbbs3/pack_qwk.cpp b/src/sbbs3/pack_qwk.cpp index 5d554f8a84..270ac7d3e5 100644 --- a/src/sbbs3/pack_qwk.cpp +++ b/src/sbbs3/pack_qwk.cpp @@ -332,21 +332,8 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack) else personal=NULL; - if(useron.qwk&(QWK_EMAIL|QWK_ALLMAIL) /* && !prepack */) { - SAFEPRINTF(smb.file,"%smail",cfg.data_dir); - smb.retry_time=cfg.smb_retry_time; - smb.subnum=INVALID_SUB; - if((i=smb_open(&smb))!=0) { - fclose(qwk); - if(hdrs!=NULL) - fclose(hdrs); - if(voting!=NULL) - fclose(voting); - if(personal) - fclose(personal); - errormsg(WHERE,ERR_OPEN,smb.file,i,smb.last_error); - return(false); - } + if(useron.qwk&(QWK_EMAIL|QWK_ALLMAIL) + && smb_open_sub(&cfg, &smb, INVALID_SUB) == SMB_SUCCESS) { /***********************/ /* Pack E-mail, if any */ @@ -425,7 +412,7 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack) smb_close(&smb); /* Close the e-mail */ if(mailmsgs) free(mail); - } + } /*********************/ /* Pack new messages */ -- GitLab