summaryrefslogtreecommitdiffhomepage
path: root/netio.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-03-04 14:57:18 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-03-04 14:57:18 +0800
commit7f1591054198e6633f7ed2b1f79d8ed0826df21b (patch)
treea7e847bc92be470a669898b2bbd2ca8db8e874d1 /netio.c
parent625b38d7af8c53981d61e8f24c3d623d1874237d (diff)
get rid of unused packet_type in encrypted write queue
Diffstat (limited to 'netio.c')
-rw-r--r--netio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/netio.c b/netio.c
index 62fdc72..3cd7b5e 100644
--- a/netio.c
+++ b/netio.c
@@ -306,10 +306,10 @@ void packet_queue_to_iovec(const struct Queue *queue, struct iovec *iov, unsigne
for (l = queue->head, i = 0; i < *iov_count; l = l->link, i++)
{
writebuf = (buffer*)l->item;
- len = writebuf->len - 1 - writebuf->pos;
+ len = writebuf->len - writebuf->pos;
dropbear_assert(len > 0);
- TRACE2(("write_packet writev #%d type %d len %d/%d", i, writebuf->data[writebuf->len-1],
- len, writebuf->len-1))
+ TRACE2(("write_packet writev #%d len %d/%d", i,
+ len, writebuf->len))
iov[i].iov_base = buf_getptr(writebuf, len);
iov[i].iov_len = len;
}
@@ -320,7 +320,7 @@ void packet_queue_consume(struct Queue *queue, ssize_t written) {
int len;
while (written > 0) {
writebuf = (buffer*)examine(queue);
- len = writebuf->len - 1 - writebuf->pos;
+ len = writebuf->len - writebuf->pos;
if (len > written) {
/* partial buffer write */
buf_incrpos(writebuf, written);