--- sbbs/src/sbbs3/scfgsave.c 2018/04/24 16:41:23 1.1 +++ sbbs/src/sbbs3/scfgsave.c 2018/04/24 16:43:00 1.1.1.2 @@ -2,13 +2,13 @@ /* Synchronet configuration file save routines */ -/* $Id: scfgsave.c,v 1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: scfgsave.c,v 1.1.1.2 2018/04/24 16:43:00 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -180,7 +180,7 @@ BOOL DLLCALL write_node_cfg(scfg_t* cfg, { char str[MAX_PATH+1]; int i,file; - ushort n; + uint16_t n; FILE *stream; if(cfg->prepped) @@ -278,7 +278,8 @@ BOOL DLLCALL write_main_cfg(scfg_t* cfg, { char str[MAX_PATH+1],c=0; int file; - ushort i,j,n; + ushort i,j; + uint16_t n; FILE *stream; if(cfg->prepped) @@ -435,8 +436,8 @@ BOOL DLLCALL write_msgs_cfg(scfg_t* cfg, char str[MAX_PATH+1],c; char dir[LEN_DIR+1]=""; int i,j,k,file; - ushort n; - long l; + uint16_t n; + int32_t l; FILE *stream; smb_t smb; @@ -457,11 +458,13 @@ BOOL DLLCALL write_msgs_cfg(scfg_t* cfg, put_int(cfg->mail_maxage,stream); put_str(cfg->preqwk_arstr,stream); put_int(cfg->smb_retry_time,stream); + put_int(cfg->max_qwkmsgage,stream); n=0; - for(i=0;i<235;i++) + for(i=0;i<233;i++) put_int(n,stream); + put_int(cfg->msg_misc,stream); n=0xffff; - for(i=0;i<256;i++) + for(i=0;i<255;i++) put_int(n,stream); /* Message Groups */ @@ -626,7 +629,8 @@ BOOL DLLCALL write_msgs_cfg(scfg_t* cfg, put_int(cfg->qhub[i]->subs,stream); for(j=0;jqhub[i]->subs;j++) { put_int(cfg->qhub[i]->conf[j],stream); - put_int(cfg->qhub[i]->sub[j],stream); + n=(uint16_t)cfg->qhub[i]->sub[j]; + put_int(n,stream); put_int(cfg->qhub[i]->mode[j],stream); } n=0; for(j=0;j<32;j++) @@ -719,8 +723,8 @@ BOOL DLLCALL write_file_cfg(scfg_t* cfg, char str[MAX_PATH+1],cmd[LEN_CMD+1],c; char path[MAX_PATH+1]; int i,j,k,file; - ushort n; - long l=0; + uint16_t n; + int32_t l=0; FILE *stream; if(cfg->prepped) @@ -956,7 +960,7 @@ BOOL DLLCALL write_chat_cfg(scfg_t* cfg, { char str[MAX_PATH+1]; int i,j,file; - ushort n; + uint16_t n; FILE *stream; if(cfg->prepped) @@ -1031,7 +1035,7 @@ BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, { uchar str[MAX_PATH+1],c; int i,j,sec,file; - ushort n; + uint16_t n; FILE *stream; if(cfg->prepped) @@ -1111,8 +1115,9 @@ BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, put_str(cfg->event[i]->dir,stream); put_int(cfg->event[i]->freq,stream); put_int(cfg->event[i]->mdays,stream); + put_int(cfg->event[i]->months,stream); n=0; - for(j=0;j<5;j++) + for(j=0;j<4;j++) put_int(n,stream); }