Author Topic: restoring go-ahead after write_prompt  (Read 1339 times)

Offline Stavros

  • Acquaintance
  • *
  • Posts: 36
    • View Profile
restoring go-ahead after write_prompt
« on: July 20, 2014, 10:22:32 PM »
When the switch was made to libtelnet (commit a901c645), one bit of code that was removed was sending a go-ahead (TELNET_GA) command after each prompt. A lot of clients use this command to differentiate prompts from other text. Here is a small patch to add it back in, but using the libtelnet API:

Code: [Select]
diff --git a/src/comm.cc b/src/comm.cc
index 0754d70..4e5c4a3 100644
--- a/src/comm.cc
+++ b/src/comm.cc
@@ -1371,6 +1371,9 @@ static void print_prompt(interactive_t *ip) {
   if (!IP_VALID(ip, ob)) {
     return;
   }
+  if ((ip->iflags & USING_TELNET) && !(ip->iflags & SUPPRESS_GA)) {
+    telnet_iac(ip->telnet, TELNET_GA);
+  }
 } /* print_prompt() */

 /*

Offline FallenTree

  • BFF
  • ***
  • Posts: 483
    • View Profile
Re: restoring go-ahead after write_prompt
« Reply #1 on: September 05, 2014, 01:50:06 PM »
merged