Commit 5b1c92c2 authored by rswindell's avatar rswindell
Browse files

Eliminated riosync() - just not necessary with TCP/IP (thanks to Dekan for

pointing this out).
parent 1764c912
......@@ -892,7 +892,6 @@ void sbbs_t::privchat(bool local)
local_y=14; }
while(online && (local || !(sys_status&SS_ABORT))) {
// RIOSYNC(0);
lncntr=0;
if(sys_status&SS_SPLITP)
lbuflen=0;
......
......@@ -213,8 +213,6 @@ int sbbs_t::protocol(prot_t* prot, enum XFER_TYPE type
return(-1);
}
bputs(text[StartXferNow]);
RIOSYNC(0);
//lprintf("%s",cmdline);
if(cd)
p=cfg.temp_dir;
else
......
......@@ -1661,11 +1661,6 @@ int sbbs_t::exec(csi_t *csi)
case CS_ASYNC:
ASYNC;
return(0);
#if 0 /* Removed 02/18/01 - never used, officially deprecated for INCHAR */
case CS_RIOSYNC:
RIOSYNC(0);
return(0);
#endif
case CS_GETTIMELEFT:
gettimeleft();
return(0);
......
......@@ -507,7 +507,6 @@ void sbbs_t::pause()
int i,j;
long l=K_UPPER;
RIOSYNC(0);
if(sys_status&SS_ABORT)
return;
lncntr=0;
......
......@@ -1442,7 +1442,6 @@ js_logoff(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
sbbs->exec_bin(sbbs->cfg.logoff_mod,&sbbs->main_csi);
sbbs->user_event(EVENT_LOGOFF);
sbbs->menu("logoff");
sbbs->riosync(0);
sbbs->hangup();
}
......
......@@ -3039,7 +3039,6 @@ void sbbs_t::hangup(void)
if(client_socket!=INVALID_SOCKET) {
mswait(1000); /* Give socket output buffer time to flush */
riosync(0);
client_off(client_socket);
close_socket(client_socket);
client_socket=INVALID_SOCKET;
......@@ -3086,31 +3085,6 @@ void sbbs_t::putcom(char *str, int len)
outcom(str[i]);
}
void sbbs_t::riosync(char abortable)
{
if(useron.misc&(RIP|WIP|HTML)) /* don't allow abort with RIP or WIP */
abortable=0; /* mainly because of ANSI cursor position response */
if(sys_status&SS_ABORT) /* no need to sync if already aborting */
return;
time_t start=time(NULL);
while(online && rioctl(TXBC)) { /* wait up to three minutes for tx buf empty */
if(sys_status&SS_ABORT)
break;
#if 0 /* this isn't necessary (or desired) on a TCP/IP connection */
if(abortable && rioctl(RXBC)) { /* incoming characer */
rioctl(IOFO); /* flush output */
sys_status|=SS_ABORT; /* set abort flag so no pause */
break; /* abort sync */
}
#endif
if(time(NULL)-start>180) { /* timeout */
logline("!!","riosync timeout");
break;
}
mswait(100);
}
}
/* Legacy Remote I/O Control Interface */
int sbbs_t::rioctl(ushort action)
{
......
......@@ -521,7 +521,6 @@ public:
int uselect(int add, uint n, char *title, char *item, uchar *ar);
uint uselect_total, uselect_num[500];
void riosync(char abortable);
void redrwstr(char *strin, int i, int l, long mode);
void attr(int atr); /* Change local and remote text attributes */
void ctrl_a(char x); /* Peforms the Ctrl-Ax attribute changes */
......
......@@ -819,12 +819,9 @@ enum { /* Values of mode for userlist function */
attr(slatr[slcnt]); \
rputs(slbuf[slcnt]); \
curatr=slcuratr[slcnt]; }
#define RIOSYNC(x) { if(online==ON_REMOTE) riosync(x); }
#define SYNC { getnodedat(cfg.node_num,&thisnode,0); \
RIOSYNC(0); \
nodesync(); }
#define ASYNC { getnodedat(cfg.node_num,&thisnode,0); \
RIOSYNC(1); \
nodesync(); }
#define ANSI_SAVE() rputs("\x1b[s")
#define ANSI_RESTORE() rputs("\x1b[u")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment