...
 
Commits (2)
  • Rob Swindell's avatar
    d9aac2b8
  • Rob Swindell's avatar
    Allow forward-to-netmail option to be toggled off by user · 98d4f083
    Rob Swindell authored
    Bug introduced in commit a2f5990b (Sept-11):
    By calling putuserrec() before modifying user->misc and then calling
    noyes(), we're giving an opportunity for the low-level node sync code to
    read the modified "useron" back from the database, thus losing the change
    we just made to user->misc. Instead, move the putuserrec() call to the end
    of the case statement. Another option would have been to turn off the NETMAIL
    flag before the first call to putuserrec().
    
    Bug reported by Nugax (BYTEXCHG)
    98d4f083
......@@ -50,7 +50,7 @@
/*************/
#define VERSION "3.18" /* Version: Major.minor */
#define REVISION 'b' /* Revision: lowercase letter */
#define REVISION 'c' /* Revision: lowercase letter */
#define VERSION_NUM (31800 + (tolower(REVISION)-'a'))
#define VERSION_HEX (0x31800 + (tolower(REVISION)-'a'))
......
......@@ -1081,11 +1081,11 @@ void sbbs_t::maindflts(user_t* user)
getstr(user->netmail,LEN_NETMAIL,K_LINE|K_EDIT|K_AUTODEL|K_TRIM);
if(sys_status&SS_ABORT)
break;
putuserrec(&cfg,user->number,U_NETMAIL,LEN_NETMAIL,user->netmail);
user->misc &= ~NETMAIL;
if(is_supported_netmail_addr(&cfg, user->netmail) && !noyes(text[ForwardMailQ]))
user->misc |= NETMAIL;
putuserrec(&cfg,user->number,U_MISC,8,ultoa(user->misc,str,16));
putuserrec(&cfg,user->number,U_NETMAIL,LEN_NETMAIL,user->netmail);
break;
case 'C':
user->misc^=CLRSCRN;
......