Mercurial > dropbear
diff packet.c @ 1079:acf444bcb115
Fix no-writev fallback
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 02 May 2015 22:47:25 +0800 |
parents | 10f198d4a308 |
children | c6346c63281b |
line wrap: on
line diff
--- a/packet.c Fri Apr 17 20:59:32 2015 +0800 +++ b/packet.c Sat May 02 22:47:25 2015 +0800 @@ -61,6 +61,10 @@ /* 50 is somewhat arbitrary */ unsigned int iov_count = 50; struct iovec iov[50]; +#else + int len; + buffer* writebuf; + int packet_type; #endif TRACE2(("enter write_packet")) @@ -97,6 +101,8 @@ * a cleartext packet_type indicator */ packet_type = writebuf->data[writebuf->len-1]; len = writebuf->len - 1 - writebuf->pos; + TRACE2(("write_packet type %d len %d/%d", packet_type, + len, writebuf->len-1)) dropbear_assert(len > 0); /* Try to write as much as possible */ written = write(ses.sock_out, buf_getptr(writebuf, len), len);