screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] Regarding bug #34200: Log misses first character


From: hiren panchasara
Subject: [screen-devel] Regarding bug #34200: Log misses first character
Date: Tue, 13 Sep 2011 23:59:05 -0700

Hi All,

This is my first attempt to look into this (for that matter any open source) code so please tolerate my stupidity.

Firstly, I tried to browse through code to understand it but that didnt help much so I thought its a good idea to try to solve any existing bug. So I started looking into this one: https://savannah.gnu.org/bugs/?34200.

I drill down to the piece of code causing it (IMO) and following diffs _seem_ to fix it:

diff --git a/src/window.c b/src/window.c
index 8509b7d..56c18de 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1905,8 +1905,6 @@ char *data;
          if (buf[0] & TIOCPKT_DOSTOP)
            WNewAutoFlow(p, 1);
        }
-      bp++;
-      len--;
     }
 #endif
 #ifdef BUILTIN_TELNET

IMO, here, buf[] holds the data to be logged and bp++ skips the first char. I want to understand if this is correct assumption. Why was bp++ and len-- there in the first place.

If someone could help me understand what this piece of code is doing, that will be great.
What is TIOCPKT?

I did "git blame window.c" and found this portion of code written by jnweiger.

Thanks,
Hiren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]