diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-05-02 22:47:25 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-05-02 22:47:25 +0800 |
commit | 19e1afbd1ca6d306166ce74bcd6c6889f8d196f3 (patch) | |
tree | 682e347d7cd5cee4c388743781cd723fce0598a2 /packet.c | |
parent | fee32054e68324f8c2e13858f21e2ac406190734 (diff) |
Fix no-writev fallback
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -61,6 +61,10 @@ void write_packet() { /* 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 @@ void write_packet() { * 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); |