Bugzilla – Attachment 893 Details for
Bug 1025
Does not correctly send/parse disabled special character in ttymodes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
_POSIX_VDISABLE patch for 4.0p1
vdisable.diff (text/plain), 1.29 KB, created by
Jacob Nevins
on 2005-04-21 20:30:30 AEST
(
hide
)
Description:
_POSIX_VDISABLE patch for 4.0p1
Filename:
MIME Type:
Creator:
Jacob Nevins
Created:
2005-04-21 20:30:30 AEST
Size:
1.29 KB
patch
obsolete
>--- ttymodes.c.orig Thu Apr 21 10:54:33 2005 >+++ ttymodes.c Thu Apr 21 11:04:28 2005 >@@ -241,6 +241,32 @@ > } > > /* >+ * Encode a special character into SSH line format. >+ */ >+static u_int >+special_char_encode(cc_t c) >+{ >+#ifdef _POSIX_VDISABLE >+ if (c == _POSIX_VDISABLE) >+ return 255; >+#endif /* _POSIX_VDISABLE */ >+ return c; >+} >+ >+/* >+ * Decode a special character from SSH line format. >+ */ >+static cc_t >+special_char_decode(u_int c) >+{ >+#ifdef _POSIX_VDISABLE >+ if (c == 255) >+ return _POSIX_VDISABLE; >+#endif /* _POSIX_VDISABLE */ >+ return c; >+} >+ >+/* > * Encodes terminal modes for the terminal referenced by fd > * or tiop in a portable manner, and appends the modes to a packet > * being constructed. >@@ -287,7 +313,7 @@ > #define TTYCHAR(NAME, OP) \ > debug3("tty_make_modes: %d %d", OP, tio.c_cc[NAME]); \ > buffer_put_char(&buf, OP); \ >- put_arg(&buf, tio.c_cc[NAME]); >+ put_arg(&buf, special_char_encode(tio.c_cc[NAME])); > > #define TTYMODE(NAME, FIELD, OP) \ > debug3("tty_make_modes: %d %d", OP, ((tio.FIELD & NAME) != 0)); \ >@@ -375,7 +401,7 @@ > #define TTYCHAR(NAME, OP) \ > case OP: \ > n_bytes += arg_size; \ >- tio.c_cc[NAME] = get_arg(); \ >+ tio.c_cc[NAME] = special_char_decode(get_arg()); \ > debug3("tty_parse_modes: %d %d", OP, tio.c_cc[NAME]); \ > break; > #define TTYMODE(NAME, FIELD, OP) \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1025
: 893