Fixed initial TELNET sequence to leave cursor at the start of line on some clients.
Made welcome/header string parametrizable. Added to sample file missing parameter telnet. git-svn-id: http://yate.null.ro/svn/yate/trunk@2478 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
b7614cf5ed
commit
21a195a4e5
|
@ -8,11 +8,14 @@
|
|||
;addr=127.0.0.1
|
||||
|
||||
; header: string: Header string to display on connect
|
||||
;header=YATE (http://YATE.null.ro) ready.
|
||||
;header=YATE ${version}-${release} (http://YATE.null.ro) ready.
|
||||
|
||||
; password: string: Password required to authenticate, default empty!
|
||||
;password=
|
||||
|
||||
; telnet: bool: Initiate TELNET negotiation on connect
|
||||
;telnet=yes
|
||||
|
||||
; output: bool: Enable output as soon as connecting
|
||||
;output=no
|
||||
|
||||
|
|
|
@ -284,15 +284,15 @@ void Connection::run()
|
|||
|
||||
Output("Remote connection from %s",m_address.c_str());
|
||||
m_auth = !s_cfg.getValue("general","password");
|
||||
const char *hdr = s_cfg.getValue("general","header","YATE (http://YATE.null.ro) ready.");
|
||||
if (hdr) {
|
||||
writeStr(hdr);
|
||||
writeStr("\r\n");
|
||||
hdr = 0;
|
||||
}
|
||||
String hdr = s_cfg.getValue("general","header","YATE ${version}-${release} (http://YATE.null.ro) ready.");
|
||||
Engine::runParams().replaceParams(hdr);
|
||||
if (s_cfg.getBoolValue("general","telnet",true)) {
|
||||
// WILL SUPPRESS GO AHEAD, WILL ECHO - and enough BS and blanks to hide them
|
||||
writeStr("\377\373\003\377\373\001\b\b\b\b\b\b \b\b\b\b\b\b");
|
||||
writeStr("\377\373\003\377\373\001\r \b\b\b\b\b\b");
|
||||
}
|
||||
if (hdr) {
|
||||
writeStr("\r" + hdr + "\r\n");
|
||||
hdr.clear();
|
||||
}
|
||||
unsigned char buffer[128];
|
||||
for (;;) {
|
||||
|
|
Loading…
Reference in New Issue