zmp fixes (great track record here, eh?)

This commit is contained in:
Sean Middleditch 2009-03-21 01:16:20 -04:00
parent 3f96c5cee8
commit f6daa8571e
1 changed files with 3 additions and 3 deletions

View File

@ -412,7 +412,7 @@ static int _subnegotiate(telnet_t *telnet) {
return 0;
/* count arguments */
while (c != telnet->buffer + telnet->buffer_pos + 1) {
while (c != telnet->buffer + telnet->buffer_pos) {
++argc;
c += strlen(c) + 1;
}
@ -641,8 +641,9 @@ static void _process(telnet_t *telnet, const char *buffer, size_t size) {
"unexpected byte after IAC inside SB: %d",
byte);
/* ready for next bytes */
/* enter IAC state */
start = i + 1;
telnet->state = TELNET_STATE_IAC;
/* process subnegotiation; see comment in
* TELNET_STATE_SB_DATA_IAC about invoking telnet_recv()
@ -655,7 +656,6 @@ static void _process(telnet_t *telnet, const char *buffer, size_t size) {
* as a regular IAC command. we could use a goto, but
* that would be gross.
*/
telnet->state = TELNET_STATE_IAC;
_process(telnet, (char *)&byte, 1);
}
break;