Skip to content
Snippets Groups Projects
Commit a4ba16f5 authored by deuce's avatar deuce
Browse files

Don't call request_telnet_opt() in rlogin mode, don't support TG_CRLF,

TG_ECHO, or TG_LINEMODE for RLogin (the protocol specifies these values).
parent ae9ebc85
No related branches found
No related tags found
No related merge requests found
...@@ -135,12 +135,14 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode) ...@@ -135,12 +135,14 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode)
sendsocket(remote_socket,(char*)buf,l); sendsocket(remote_socket,(char*)buf,l);
} }
else {
/* This is required for gating to Unix telnetd */ /* This is required for gating to Unix telnetd */
if(mode&TG_NOTERMTYPE) if(mode&TG_NOTERMTYPE)
request_telnet_opt(TELNET_DONT,TELNET_TERM_TYPE, 3000); // Re-negotiation of terminal type request_telnet_opt(TELNET_DONT,TELNET_TERM_TYPE, 3000); // Re-negotiation of terminal type
/* Text/NVT mode by default */ /* Text/NVT mode by default */
request_telnet_opt(TELNET_DONT,TELNET_BINARY_TX, 3000); request_telnet_opt(TELNET_DONT,TELNET_BINARY_TX, 3000);
}
if(mode&(TG_PASSTHRU|TG_RLOGIN)) if(mode&(TG_PASSTHRU|TG_RLOGIN))
telnet_mode|=TELNET_MODE_GATE; // Pass-through telnet commands telnet_mode|=TELNET_MODE_GATE; // Pass-through telnet commands
...@@ -195,6 +197,7 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode) ...@@ -195,6 +197,7 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode)
else if(*buf<' ' && mode&TG_CTRLKEYS) else if(*buf<' ' && mode&TG_CTRLKEYS)
handle_ctrlkey(*buf, K_NONE); handle_ctrlkey(*buf, K_NONE);
gotline=false; gotline=false;
if(!(mode&TG_RLOGIN)) {
if(mode&TG_LINEMODE && buf[0]!='\r') { if(mode&TG_LINEMODE && buf[0]!='\r') {
ungetkey(buf[0]); ungetkey(buf[0]);
l=K_CHAT; l=K_CHAT;
...@@ -213,6 +216,7 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode) ...@@ -213,6 +216,7 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode)
RingBufWrite(&outbuf,buf,rd); RingBufWrite(&outbuf,buf,rd);
} }
} }
}
for(attempts=0;attempts<60 && online; attempts++) /* added retry loop here, Jan-20-2003 */ for(attempts=0;attempts<60 && online; attempts++) /* added retry loop here, Jan-20-2003 */
{ {
if((i=sendsocket(remote_socket,(char*)buf,rd))>=0) if((i=sendsocket(remote_socket,(char*)buf,rd))>=0)
...@@ -262,8 +266,10 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode) ...@@ -262,8 +266,10 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode)
console&=~CON_RAW_IN; console&=~CON_RAW_IN;
telnet_mode&=~TELNET_MODE_GATE; telnet_mode&=~TELNET_MODE_GATE;
if(!(mode&TG_RLOGIN)) {
/* Disable Telnet Terminal Echo */ /* Disable Telnet Terminal Echo */
request_telnet_opt(TELNET_WILL,TELNET_ECHO); request_telnet_opt(TELNET_WILL,TELNET_ECHO);
}
close_socket(remote_socket); close_socket(remote_socket);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment