Skip to content
Snippets Groups Projects
Commit 5e6d804d authored by rswindell's avatar rswindell
Browse files

Now sends telnet DO/WILL transmit binary command before all file transfers.

Hopefully fixes Linux telnet client upload/download problem.
parent 3e816e82
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@
****************************************************************************/
#include "sbbs.h"
#include "telnet.h"
/****************************************************************************/
/* Updates downloader, uploader and downloaded file data */
......@@ -192,13 +193,27 @@ int sbbs_t::protocol(char *cmdline, bool cd)
p=NULL;
sprintf(msg,"Transferring %s",cmdline);
spymsg(msg);
sys_status|=SS_FILEXFER;
sys_status|=SS_FILEXFER; /* disable spy during file xfer */
/* enable telnet binary transmission in both directions */
if(!(telnet_mode&TELNET_MODE_BIN_RX)) {
send_telnet_cmd(TELNET_DO,TELNET_BINARY);
telnet_mode|=TELNET_MODE_BIN_RX;
}
send_telnet_cmd(TELNET_WILL,TELNET_BINARY);
i=external(cmdline
,EX_OUTL
#ifdef __unix__ /* file xfer progs use stdio on Unix */
|EX_INR|EX_OUTR|EX_BIN
#endif
,p);
/* disable telnet binary transmission mode */
send_telnet_cmd(TELNET_WONT,TELNET_BINARY);
/* Got back to Text/NVT mode */
if(telnet_mode&TELNET_MODE_BIN_RX) {
send_telnet_cmd(TELNET_DONT,TELNET_BINARY);
telnet_mode&=~TELNET_MODE_BIN_RX;
}
sys_status&=~SS_FILEXFER;
if(online==ON_REMOTE)
rioctl(IOFB);
......
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