diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-03-20 23:33:45 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-03-20 23:33:45 +0800 |
commit | a070159cc5ed59df4d79f6d23c9ba87a3f50a7ec (patch) | |
tree | e58f4aa51219e471e99b8ceb0bab9881004c851b /netio.c | |
parent | 20f9683ae050092a1f028ae55c546966c4882925 (diff) |
Fix when iov queue is large
Diffstat (limited to 'netio.c')
-rw-r--r-- | netio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -273,7 +273,7 @@ void packet_queue_to_iovec(struct Queue *queue, struct iovec *iov, unsigned int *iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count); - for (l = queue->head, i = 0; l; l = l->link, i++) + for (l = queue->head, i = 0; i < *iov_count; l = l->link, i++) { writebuf = (buffer*)l->item; len = writebuf->len - 1 - writebuf->pos; |