diff --git a/src/sbbs3/bat_xfer.cpp b/src/sbbs3/bat_xfer.cpp index 14220dfcce1e738a28488781794aa66d7cf1fdd5..e12bc335432fe3eb89621138cf8dd1a8d4915366 100644 --- a/src/sbbs3/bat_xfer.cpp +++ b/src/sbbs3/bat_xfer.cpp @@ -157,9 +157,10 @@ void sbbs_t::batchmenu() : cfg.dir[batdn_dir[i]]->path ,tmp); mv(str,tmp2,1); /* copy the file to temp dir */ - getnodedat(cfg.node_num,&thisnode,1); - thisnode.aux=0xff; - putnodedat(cfg.node_num,&thisnode); + if(getnodedat(cfg.node_num,&thisnode,true)==0) { + thisnode.aux=0xff; + putnodedat(cfg.node_num,&thisnode); + } CRLF; } } @@ -410,9 +411,10 @@ BOOL sbbs_t::start_batch_download() : cfg.dir[batdn_dir[i]]->path ,fname); mv(str,path,1); /* copy the file to temp dir */ - getnodedat(cfg.node_num,&thisnode,1); - thisnode.aux=40; /* clear the seq dev # */ - putnodedat(cfg.node_num,&thisnode); + if(getnodedat(cfg.node_num,&thisnode,true)==0) { + thisnode.aux=40; /* clear the seq dev # */ + putnodedat(cfg.node_num,&thisnode); + } CRLF; } } @@ -448,15 +450,16 @@ BOOL sbbs_t::start_batch_download() } sprintf(str,"%sBATCHDN.LST",cfg.node_dir); - getnodedat(cfg.node_num,&thisnode,1); action=NODE_DLNG; t=now; if(cur_cps) t+=(totalsize/(ulong)cur_cps); localtime_r(&t,&tm); - thisnode.aux=(tm.tm_hour*60)+tm.tm_min; - thisnode.action=action; - putnodedat(cfg.node_num,&thisnode); /* calculate ETA */ + if(getnodedat(cfg.node_num,&thisnode,true)==0) { + thisnode.aux=(tm.tm_hour*60)+tm.tm_min; + thisnode.action=action; + putnodedat(cfg.node_num,&thisnode); /* calculate ETA */ + } start=time(NULL); error=protocol(cmdstr(cfg.prot[xfrprot]->batdlcmd,str,list,NULL),false); end=time(NULL); diff --git a/src/sbbs3/download.cpp b/src/sbbs3/download.cpp index 7b24bd2fc18c771a6bc6f2d7eebf59184c5b64ec..2e483fa64102c9f8c77806f837023a6be5907195 100644 --- a/src/sbbs3/download.cpp +++ b/src/sbbs3/download.cpp @@ -351,15 +351,18 @@ void sbbs_t::seqwait(uint devnum) for(start=now=time(NULL);online && now-start<90;now=time(NULL)) { if(msgabort()) /* max wait ^^^^ sec */ break; - getnodedat(cfg.node_num,&thisnode,1); /* open and lock this record */ + getnodedat(cfg.node_num,&thisnode,true); /* open and lock this record */ for(i=1;i<=cfg.sys_nodes;i++) { if(i==cfg.node_num) continue; - getnodedat(i,&node,1); - if((node.status==NODE_INUSE || node.status==NODE_QUIET) - && node.action==NODE_RFSD && node.aux==devnum) { - putnodedat(i,&node); - break; } - putnodedat(i,&node); } + if(getnodedat(i,&node,true)==0) { + if((node.status==NODE_INUSE || node.status==NODE_QUIET) + && node.action==NODE_RFSD && node.aux==devnum) { + putnodedat(i,&node); + break; + } + putnodedat(i,&node); + } + } if(i>cfg.sys_nodes) { thisnode.action=NODE_RFSD; thisnode.aux=devnum; diff --git a/src/sbbs3/execfunc.cpp b/src/sbbs3/execfunc.cpp index c839180a91ef66f2035a493cd52c0d7fe7c586a4..97707d2c1135e7cdd4692cb9d4fbc4a779bbf17d 100644 --- a/src/sbbs3/execfunc.cpp +++ b/src/sbbs3/execfunc.cpp @@ -285,10 +285,14 @@ int sbbs_t::exec_function(csi_t *csi) if(i<=cfg.sys_nodes || criterrs) { if(!noyes(text[ClearErrCounter])) { for(i=1;i<=cfg.sys_nodes;i++) { - getnodedat(i,&node,1); - node.errors=0; - putnodedat(i,&node); } - criterrs=0; } } + if(getnodedat(i,&node,true)==0) { + node.errors=0; + putnodedat(i,&node); + } + criterrs=0; + } + } + } return(0); case CS_ANSI_CAPTURE: /* Capture ANSI codes */ sys_status^=SS_ANSCAP; diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp index 597667b4d439a8a49785964289e7a42e1aae733d..8f0f941c0dbb8f4a92dd91cf4301da39169e614b 100644 --- a/src/sbbs3/listfile.cpp +++ b/src/sbbs3/listfile.cpp @@ -106,9 +106,12 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode) action=NODE_LFIL; getnodedat(cfg.node_num,&thisnode,0); if(thisnode.action!=NODE_LFIL) { /* was a sync */ - getnodedat(cfg.node_num,&thisnode,1); - thisnode.action=NODE_LFIL; - putnodedat(cfg.node_num,&thisnode); } } + if(getnodedat(cfg.node_num,&thisnode,true)==0) { + thisnode.action=NODE_LFIL; + putnodedat(cfg.node_num,&thisnode); + } + } + } while(online && found<MAX_FILES) { if(found<0) @@ -1282,10 +1285,12 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode) sprintf(str,"%s%s",dirpath,fname); sprintf(path,"%s%s",cfg.temp_dir,fname); mv(str,path,1); /* copy the file to temp dir */ - getnodedat(cfg.node_num,&thisnode,1); - thisnode.aux=0xf0; - putnodedat(cfg.node_num,&thisnode); - CRLF; } + if(getnodedat(cfg.node_num,&thisnode,true)==0) { + thisnode.aux=0xf0; + putnodedat(cfg.node_num,&thisnode); + } + CRLF; + } for(j=0;j<cfg.total_dlevents;j++) if(!stricmp(cfg.dlevent[j]->ext,f.name+9) && chk_ar(cfg.dlevent[j]->ar,&useron)) {