Skip to content
Snippets Groups Projects
Commit 34528efa authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge remote-tracking branch 'origin/master' into new_user_dat

parents bc7b1e3c e48295fa
No related branches found
No related tags found
No related merge requests found
...@@ -1085,8 +1085,16 @@ void sbbs_t::privchat(bool forced, int node_num) ...@@ -1085,8 +1085,16 @@ void sbbs_t::privchat(bool forced, int node_num)
lseek(in,0L,SEEK_SET); lseek(in,0L,SEEK_SET);
ch=0; ch=0;
utime(inpath,NULL); utime(inpath,NULL);
if(read(in,&ch,1) != 1) int rd = read(in,&ch,1);
if(rd != 1) {
lprintf(LOG_ERR, "read character from %s returned %d instead of 1", inpath, rd);
ch = 0; ch = 0;
} else {
if(ch < ' ')
lprintf(LOG_DEBUG, "read control character %u (%s) from %s", ch, c_escape_char(ch), inpath);
else
lprintf(LOG_DEBUG, "read character '%c' from %s", ch, inpath);
}
(void)lseek(in,-1L,SEEK_CUR); (void)lseek(in,-1L,SEEK_CUR);
if(!ch) break; /* char from other node */ if(!ch) break; /* char from other node */
activity=1; activity=1;
...@@ -1156,7 +1164,13 @@ void sbbs_t::privchat(bool forced, int node_num) ...@@ -1156,7 +1164,13 @@ void sbbs_t::privchat(bool forced, int node_num)
} }
} }
ch=0; ch=0;
write(in,&ch,1); int wr = write(in,&ch,1);
if(wr != 1)
lprintf(LOG_ERR, "write of character 0x%02X to %s returned %d", ch, inpath, wr);
else if(ch < ' ')
lprintf(LOG_DEBUG, "wrote control character %u (%s) to %s", ch, c_escape_char(ch), inpath);
else
lprintf(LOG_DEBUG, "wrote character '%c' to %s", ch, inpath);
if(!(sys_status&SS_SPLITP)) if(!(sys_status&SS_SPLITP))
localchar=remotechar; localchar=remotechar;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment