summaryrefslogtreecommitdiff
path: root/ot_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_http.c')
-rw-r--r--ot_http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ot_http.c b/ot_http.c
index cd856d1..cce6dc2 100644
--- a/ot_http.c
+++ b/ot_http.c
@@ -77,7 +77,7 @@ static void http_senddata( const int64 sock, struct ot_workstruct *ws ) {
77 memcpy( outbuf, ws->reply + written_size, ws->reply_size - written_size ); 77 memcpy( outbuf, ws->reply + written_size, ws->reply_size - written_size );
78 if ( !cookie->batch ) { 78 if ( !cookie->batch ) {
79 cookie->batch = malloc( sizeof(io_batch) ); 79 cookie->batch = malloc( sizeof(io_batch) );
80 memset( cookie->batch, 0, sizeof(io_batch) ); 80 iob_init_autofree(cookie->batch, 0);
81 cookie->batches = 1; 81 cookie->batches = 1;
82 } 82 }
83 83
@@ -171,7 +171,7 @@ fprintf(stderr, "http_sendiovecdata sending %d iovec entries found cookie->batch
171 iovec_free( &iovec_entries, &iovector ); 171 iovec_free( &iovec_entries, &iovector );
172 HTTPERROR_500; 172 HTTPERROR_500;
173 } 173 }
174 memset( cookie->batch, 0, sizeof(io_batch) ); 174 iob_init_autofree(cookie->batch, 0);
175 cookie->batches = 1; 175 cookie->batches = 1;
176 } 176 }
177 current = cookie->batch + cookie->batches - 1; 177 current = cookie->batch + cookie->batches - 1;
@@ -186,7 +186,7 @@ fprintf(stderr, "http_sendiovecdata found batch above limit: %llu\n", current->b
186 if( new_batch ) { 186 if( new_batch ) {
187 cookie->batch = new_batch; 187 cookie->batch = new_batch;
188 current = cookie->batch + cookie->batches++; 188 current = cookie->batch + cookie->batches++;
189 memset( current, 0, sizeof(io_batch) ); 189 iob_init_autofree(current ,0);
190 } 190 }
191 } 191 }
192fprintf(stderr, "http_sendiovecdata calling iob_addbuf_free with %zd\n", iovector[i].iov_len); 192fprintf(stderr, "http_sendiovecdata calling iob_addbuf_free with %zd\n", iovector[i].iov_len);