summaryrefslogtreecommitdiffhomepage
path: root/packet.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-05-02 22:47:25 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-05-02 22:47:25 +0800
commit19e1afbd1ca6d306166ce74bcd6c6889f8d196f3 (patch)
tree682e347d7cd5cee4c388743781cd723fce0598a2 /packet.c
parentfee32054e68324f8c2e13858f21e2ac406190734 (diff)
Fix no-writev fallback
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/packet.c b/packet.c
index 1d1be84..19b5759 100644
--- a/packet.c
+++ b/packet.c
@@ -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);