diff options
-rw-r--r-- | ot_http.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -31,9 +31,9 @@ | |||
31 | #include "trackerlogic.h" | 31 | #include "trackerlogic.h" |
32 | 32 | ||
33 | #ifdef WANT_NO_AUTO_FREE | 33 | #ifdef WANT_NO_AUTO_FREE |
34 | #define OT_IOB_INIT iob_init | 34 | #define OT_IOB_INIT(B) bzero(B, sizeof(io_batch)) |
35 | #else | 35 | #else |
36 | #define OT_IOB_INIT iob_init_autofree | 36 | #define OT_IOB_INIT(B) iob_init_autofree(B, 0) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #define OT_MAXMULTISCRAPE_COUNT 64 | 39 | #define OT_MAXMULTISCRAPE_COUNT 64 |
@@ -87,7 +87,7 @@ static void http_senddata(const int64 sock, struct ot_workstruct *ws) { | |||
87 | memcpy(outbuf, ws->reply + written_size, ws->reply_size - written_size); | 87 | memcpy(outbuf, ws->reply + written_size, ws->reply_size - written_size); |
88 | if (!cookie->batch) { | 88 | if (!cookie->batch) { |
89 | cookie->batch = malloc(sizeof(io_batch)); | 89 | cookie->batch = malloc(sizeof(io_batch)); |
90 | OT_IOB_INIT(cookie->batch, 0); | 90 | OT_IOB_INIT(cookie->batch); |
91 | cookie->batches = 1; | 91 | cookie->batches = 1; |
92 | } | 92 | } |
93 | 93 | ||
@@ -185,7 +185,7 @@ ssize_t http_sendiovecdata(const int64 sock, struct ot_workstruct *ws, int iovec | |||
185 | iovec_free(&iovec_entries, &iovector); | 185 | iovec_free(&iovec_entries, &iovector); |
186 | HTTPERROR_500; | 186 | HTTPERROR_500; |
187 | } | 187 | } |
188 | OT_IOB_INIT(cookie->batch, 0); | 188 | OT_IOB_INIT(cookie->batch); |
189 | cookie->batches = 1; | 189 | cookie->batches = 1; |
190 | } | 190 | } |
191 | current = cookie->batch + cookie->batches - 1; | 191 | current = cookie->batch + cookie->batches - 1; |
@@ -199,7 +199,7 @@ ssize_t http_sendiovecdata(const int64 sock, struct ot_workstruct *ws, int iovec | |||
199 | if (new_batch) { | 199 | if (new_batch) { |
200 | cookie->batch = new_batch; | 200 | cookie->batch = new_batch; |
201 | current = cookie->batch + cookie->batches++; | 201 | current = cookie->batch + cookie->batches++; |
202 | OT_IOB_INIT(current, 0); | 202 | OT_IOB_INIT(current); |
203 | } | 203 | } |
204 | } | 204 | } |
205 | iob_addbuf_free(current, iovector[i].iov_base, iovector[i].iov_len); | 205 | iob_addbuf_free(current, iovector[i].iov_base, iovector[i].iov_len); |