--- sbbs/src/sbbs3/telgate.cpp 2018/04/24 16:41:23 1.1 +++ sbbs/src/sbbs3/telgate.cpp 2018/04/24 16:43:45 1.1.1.2 @@ -2,13 +2,13 @@ /* Synchronet telnet gateway routines */ -/* $Id: telgate.cpp,v 1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: telgate.cpp,v 1.1.1.2 2018/04/24 16:43:45 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -110,14 +110,11 @@ void sbbs_t::telnet_gate(char* destaddr, return; } - lprintf(LOG_INFO,"Node %d %s gate to %s port %d on socket %d" + lprintf(LOG_INFO,"Node %d %s gate to %s port %u on socket %d" ,cfg.node_num ,mode&TG_RLOGIN ? "RLogin" : "Telnet" ,destaddr,port,remote_socket); - if(mode&(TG_PASSTHRU|TG_RLOGIN)) - telnet_mode|=TELNET_MODE_GATE; // Pass-through telnet commands - if(!(mode&TG_CTRLKEYS)) console|=CON_RAW_IN; @@ -136,10 +133,13 @@ void sbbs_t::telnet_gate(char* destaddr, /* This is required for gating to Unix telnetd */ if(mode&TG_NOTERMTYPE) - request_telnet_opt(TELNET_DONT,TELNET_TERM_TYPE); // Re-negotiation of terminal type + request_telnet_opt(TELNET_DONT,TELNET_TERM_TYPE, 3000); // Re-negotiation of terminal type /* Text/NVT mode by default */ - request_telnet_opt(TELNET_DONT,TELNET_BINARY_TX); + request_telnet_opt(TELNET_DONT,TELNET_BINARY_TX, 3000); + + if(mode&(TG_PASSTHRU|TG_RLOGIN)) + telnet_mode|=TELNET_MODE_GATE; // Pass-through telnet commands while(online) { if(!(mode&TG_NOCHKTIME)) @@ -250,7 +250,7 @@ void sbbs_t::telnet_gate(char* destaddr, p=dump; for(int i=0;i