--- sbbs/src/sbbs3/scfglib1.c 2018/04/24 16:41:23 1.1 +++ sbbs/src/sbbs3/scfglib1.c 2018/04/24 16:42:36 1.1.1.2 @@ -2,13 +2,13 @@ /* Synchronet configuration library routines */ -/* $Id: scfglib1.c,v 1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: scfglib1.c,v 1.1.1.2 2018/04/24 16:42:36 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 2004 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 * @@ -63,7 +63,7 @@ BOOL read_node_cfg(scfg_t* cfg, char* er { char c,str[MAX_PATH+1],fname[13]; int i; - short n; + int16_t n; long offset=0; FILE *instream; @@ -183,7 +183,8 @@ BOOL read_node_cfg(scfg_t* cfg, char* er BOOL read_main_cfg(scfg_t* cfg, char* error) { char str[MAX_PATH+1],fname[13],c; - short i,j,n; + short i,j; + int16_t n; long offset=0; FILE *instream; @@ -411,7 +412,8 @@ BOOL read_main_cfg(scfg_t* cfg, char* er BOOL read_msgs_cfg(scfg_t* cfg, char* error) { char str[MAX_PATH+1],fname[13],c; - short i,j,k,n; + short i,j; + int16_t n,k; long offset=0; FILE *instream; @@ -435,13 +437,13 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* er get_int(cfg->smb_retry_time,instream); /* odd byte */ if(!cfg->smb_retry_time) cfg->smb_retry_time=30; - for(i=0;i<234;i++) /* NULL */ + get_int(cfg->max_qwkmsgage, instream); + for(i=0;i<233;i++) /* NULL */ get_int(n,instream); get_int(cfg->msg_misc,instream); for(i=0;i<255;i++) /* 0xff */ get_int(n,instream); - /******************/ /* Message Groups */ /******************/ @@ -618,8 +620,8 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* er get_int(k,instream); if(k) { - if((cfg->qhub[i]->sub=(ushort *)malloc(sizeof(ushort)*k))==NULL) - return allocerr(instream,error,offset,fname,sizeof(uint)*k); + if((cfg->qhub[i]->sub=(ulong *)malloc(sizeof(ulong)*k))==NULL) + return allocerr(instream,error,offset,fname,sizeof(ulong)*k); if((cfg->qhub[i]->conf=(ushort *)malloc(sizeof(ushort)*k))==NULL) return allocerr(instream,error,offset,fname,sizeof(ushort)*k); if((cfg->qhub[i]->mode=(char *)malloc(sizeof(char)*k))==NULL) @@ -627,9 +629,11 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* er } for(j=0;jqhub[i]->conf[cfg->qhub[i]->subs],instream); - get_int(cfg->qhub[i]->sub[cfg->qhub[i]->subs],instream); + get_int(subnum,instream); + cfg->qhub[i]->sub[cfg->qhub[i]->subs]=subnum; get_int(cfg->qhub[i]->mode[cfg->qhub[i]->subs],instream); if(cfg->qhub[i]->sub[cfg->qhub[i]->subs]total_subs) cfg->sub[cfg->qhub[i]->sub[cfg->qhub[i]->subs]]->misc|=SUB_QNET;