From 822b2977dad91476f01aae65c42197b712ed361f Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 1 Jan 2019 10:56:31 +0000
Subject: [PATCH] When failing to import vote-msgs or poll-closure-msgs from a
 QWKnet hub, change the errormsg() call to just a debug-level log message.
 These failures are expected if the local system (QWKnet node) didn't get the
 original poll message, for example. Continue to log these errors when
 encountered on a QWKhub (where they are less expected since a hub should
 normally have a deeper history of messages/polls than nodes will).

---
 src/sbbs3/qwk.cpp | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/sbbs3/qwk.cpp b/src/sbbs3/qwk.cpp
index 9257dc2345..23f13cf16b 100644
--- a/src/sbbs3/qwk.cpp
+++ b/src/sbbs3/qwk.cpp
@@ -1188,13 +1188,21 @@ bool sbbs_t::qwk_vote(str_list_t ini, const char* section, smb_net_type_t net_ty
 			notice = text[PollVoteNotice];
 		}
 		result = votemsg(&cfg, &smb, &msg, notice, text[VoteNoticeFmt]);
-		if(result != SMB_SUCCESS && result != SMB_DUPE_MSG)
-			errormsg(WHERE, ERR_WRITE, smb.file, result, smb.last_error);
+		if(result != SMB_SUCCESS && result != SMB_DUPE_MSG) {
+			if(hubnum >= 0)
+				lprintf(LOG_DEBUG, "Error %s (%d) writing vote-msg to %s", smb.last_error, result, smb.file);
+			else
+				errormsg(WHERE, ERR_WRITE, smb.file, result, smb.last_error);
+		}
 	}
 	else if(strnicmp(section, "close:", 6) == 0) {
 		smb_hfield_str(&msg, RFC822MSGID, section + 6);
-		if((result = smb_addpollclosure(&smb, &msg, smb_storage_mode(&cfg, &smb))) != SMB_SUCCESS)
-			errormsg(WHERE,ERR_WRITE,smb.file,result,smb.last_error);
+		if((result = smb_addpollclosure(&smb, &msg, smb_storage_mode(&cfg, &smb))) != SMB_SUCCESS) {
+			if(hubnum >= 0)
+				lprintf(LOG_DEBUG, "Error %s (%d) writing poll-close-msg to %s", smb.last_error, result, smb.file);
+			else
+				errormsg(WHERE, ERR_WRITE, smb.file, result, smb.last_error);
+		}
 	}
 	else result = SMB_SUCCESS;
 
-- 
GitLab