mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Remove obsolete checks for ldisc_send with len == 0.
This reverts commit4634cd47f7
and commit43a63019f5
, both of which introduced checks at ldisc_send call sites to avoid triggering the assertion that len != 0 inside ldisc_send. Now that assertion is gone, it's OK to call ldisc_send without checking the buffer size. (cherry picked from commit2bbed67d9e
)
This commit is contained in:
parent
6aa1dcb1ca
commit
bbf6daf612
13
terminal.c
13
terminal.c
@ -3406,8 +3406,7 @@ static void term_out(Terminal *term)
|
||||
strbuf *buf = term_input_data_from_charset(
|
||||
term, DEFAULT_CODEPAGE,
|
||||
term->answerback, term->answerbacklen);
|
||||
if (buf->len)
|
||||
ldisc_send(term->ldisc, buf->s, buf->len, false);
|
||||
ldisc_send(term->ldisc, buf->s, buf->len, false);
|
||||
strbuf_free(buf);
|
||||
}
|
||||
break;
|
||||
@ -3656,7 +3655,7 @@ static void term_out(Terminal *term)
|
||||
break;
|
||||
case 'Z': /* DECID: terminal type query */
|
||||
compatibility(VT100);
|
||||
if (term->ldisc && term->id_string[0])
|
||||
if (term->ldisc)
|
||||
ldisc_send(term->ldisc, term->id_string,
|
||||
strlen(term->id_string), false);
|
||||
break;
|
||||
@ -3974,7 +3973,7 @@ static void term_out(Terminal *term)
|
||||
case 'c': /* DA: terminal type query */
|
||||
compatibility(VT100);
|
||||
/* This is the response for a VT102 */
|
||||
if (term->ldisc && term->id_string[0])
|
||||
if (term->ldisc)
|
||||
ldisc_send(term->ldisc, term->id_string,
|
||||
strlen(term->id_string), false);
|
||||
break;
|
||||
@ -4431,8 +4430,7 @@ static void term_out(Terminal *term)
|
||||
len = strlen(p);
|
||||
ldisc_send(term->ldisc, "\033]L", 3,
|
||||
false);
|
||||
if (len > 0)
|
||||
ldisc_send(term->ldisc, p, len, false);
|
||||
ldisc_send(term->ldisc, p, len, false);
|
||||
ldisc_send(term->ldisc, "\033\\", 2,
|
||||
false);
|
||||
}
|
||||
@ -4447,8 +4445,7 @@ static void term_out(Terminal *term)
|
||||
len = strlen(p);
|
||||
ldisc_send(term->ldisc, "\033]l", 3,
|
||||
false);
|
||||
if (len > 0)
|
||||
ldisc_send(term->ldisc, p, len, false);
|
||||
ldisc_send(term->ldisc, p, len, false);
|
||||
ldisc_send(term->ldisc, "\033\\", 2,
|
||||
false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user