mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Remove obsolete checks for ldisc_send with len == 0.
This reverts commit 4634cd47f75e74a697840fb32f18edb7f1cf41da and commit 43a63019f5bdc627170212ec5ed8c1333ad4727b, 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.
This commit is contained in:
parent
cd3e917fd0
commit
2bbed67d9e
13
terminal.c
13
terminal.c
@ -3412,8 +3412,7 @@ static void term_out(Terminal *term)
|
|||||||
strbuf *buf = term_input_data_from_charset(
|
strbuf *buf = term_input_data_from_charset(
|
||||||
term, DEFAULT_CODEPAGE,
|
term, DEFAULT_CODEPAGE,
|
||||||
term->answerback, term->answerbacklen);
|
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);
|
strbuf_free(buf);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3660,7 +3659,7 @@ static void term_out(Terminal *term)
|
|||||||
break;
|
break;
|
||||||
case 'Z': /* DECID: terminal type query */
|
case 'Z': /* DECID: terminal type query */
|
||||||
compatibility(VT100);
|
compatibility(VT100);
|
||||||
if (term->ldisc && term->id_string[0])
|
if (term->ldisc)
|
||||||
ldisc_send(term->ldisc, term->id_string,
|
ldisc_send(term->ldisc, term->id_string,
|
||||||
strlen(term->id_string), false);
|
strlen(term->id_string), false);
|
||||||
break;
|
break;
|
||||||
@ -3974,7 +3973,7 @@ static void term_out(Terminal *term)
|
|||||||
case 'c': /* DA: terminal type query */
|
case 'c': /* DA: terminal type query */
|
||||||
compatibility(VT100);
|
compatibility(VT100);
|
||||||
/* This is the response for a VT102 */
|
/* This is the response for a VT102 */
|
||||||
if (term->ldisc && term->id_string[0])
|
if (term->ldisc)
|
||||||
ldisc_send(term->ldisc, term->id_string,
|
ldisc_send(term->ldisc, term->id_string,
|
||||||
strlen(term->id_string), false);
|
strlen(term->id_string), false);
|
||||||
break;
|
break;
|
||||||
@ -4419,8 +4418,7 @@ static void term_out(Terminal *term)
|
|||||||
len = strlen(p);
|
len = strlen(p);
|
||||||
ldisc_send(term->ldisc, "\033]L", 3,
|
ldisc_send(term->ldisc, "\033]L", 3,
|
||||||
false);
|
false);
|
||||||
if (len > 0)
|
ldisc_send(term->ldisc, p, len, false);
|
||||||
ldisc_send(term->ldisc, p, len, false);
|
|
||||||
ldisc_send(term->ldisc, "\033\\", 2,
|
ldisc_send(term->ldisc, "\033\\", 2,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
@ -4435,8 +4433,7 @@ static void term_out(Terminal *term)
|
|||||||
len = strlen(p);
|
len = strlen(p);
|
||||||
ldisc_send(term->ldisc, "\033]l", 3,
|
ldisc_send(term->ldisc, "\033]l", 3,
|
||||||
false);
|
false);
|
||||||
if (len > 0)
|
ldisc_send(term->ldisc, p, len, false);
|
||||||
ldisc_send(term->ldisc, p, len, false);
|
|
||||||
ldisc_send(term->ldisc, "\033\\", 2,
|
ldisc_send(term->ldisc, "\033\\", 2,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user