From a848893d85cd027d831ba0ecae9dacef0a5f0605 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 30 Aug 2008 17:33:07 -0700 Subject: ringbuf: create a new struct rbvec instead of reusing struct iovec Using struct iovec means having to cast iov_base everywhere we want to do pointer arithmetic. Instead, just use rbvec which can be safely casted to iovec whenever we use the readv/writev functions. --- src/inputStream_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inputStream_http.c') diff --git a/src/inputStream_http.c b/src/inputStream_http.c index a6c715459..cc31ed435 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -461,7 +461,7 @@ static ssize_t buffer_data(InputStream *is) assert(pthread_equal(data->io_thread, pthread_self())); assert_state2(CONN_STATE_BUFFER, CONN_STATE_PREBUFFER); - if (!ringbuf_get_write_vector(data->rb, vec)) { + if (!ringbuf_get_write_vector(data->rb, (struct rbvec *)vec)) { data->state = CONN_STATE_BUFFER_FULL; return 0; } -- cgit v1.2.3