wok-current view busybox/stuff/busybox-1.18-conspy.u @ rev 10972

Up: tor to 0.2.2.33.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Oct 12 12:39:17 2011 +0000 (2011-10-12)
parents
children
line source
1 Fix esc keys leak
2 --- busybox-1.18.0/miscutils/conspy.c
3 +++ busybox-1.18.0/miscutils/conspy.c
4 @@ -506,16 +506,17 @@
5 }
6 }
7 poll_timeout_ms = 250;
8 + if (option_mask32 & FLAG(v)) continue;
10 // Insert all keys pressed into the virtual console's input
11 // buffer. Don't do this if the virtual console is in scan
12 // code mode - giving ASCII characters to a program expecting
13 // scan codes will confuse it.
14 - if (!(option_mask32 & FLAG(v)) && G.escape_count == 0) {
15 + G.key_count += bytes_read;
16 + if (G.escape_count == 0) {
17 int handle, result;
18 long kbd_mode;
20 - G.key_count += bytes_read;
21 handle = xopen(tty_name, O_WRONLY);
22 result = ioctl(handle, KDGKBMODE, &kbd_mode);
23 if (result >= 0) {