diff options
| -rw-r--r-- | ot_http.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -168,7 +168,7 @@ ssize_t http_sendiovecdata( const int64 sock, struct ot_workstruct *ws, int iove | |||
| 168 | 168 | ||
| 169 | /* Split huge iovectors into separate io_batches */ | 169 | /* Split huge iovectors into separate io_batches */ |
| 170 | for( i=0; i<iovec_entries; ++i ) { | 170 | for( i=0; i<iovec_entries; ++i ) { |
| 171 | io_batch *current = cookie->batch + cookie->batches; | 171 | io_batch *current = cookie->batch + cookie->batches - 1; |
| 172 | 172 | ||
| 173 | /* If the current batch's limit is reached, try to reallocate a new batch to work on */ | 173 | /* If the current batch's limit is reached, try to reallocate a new batch to work on */ |
| 174 | if( current->bytesleft > OT_BATCH_LIMIT ) { | 174 | if( current->bytesleft > OT_BATCH_LIMIT ) { |
| @@ -180,7 +180,7 @@ ssize_t http_sendiovecdata( const int64 sock, struct ot_workstruct *ws, int iove | |||
| 180 | } | 180 | } |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | iob_addbuf_munmap( current, iovector[i].iov_base, iovector[i].iov_len ); | 183 | iob_addbuf_free( current, iovector[i].iov_base, iovector[i].iov_len ); |
| 184 | } | 184 | } |
| 185 | free( iovector ); | 185 | free( iovector ); |
| 186 | 186 | ||
