summaryrefslogtreecommitdiff
path: root/ot_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_http.c')
-rw-r--r--ot_http.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ot_http.c b/ot_http.c
index 4111d6b..55c524d 100644
--- a/ot_http.c
+++ b/ot_http.c
@@ -53,7 +53,7 @@ static void http_senddata( const int64 client_socket, char *buffer, size_t size
53 /* whoever sends data is not interested in its input-array */ 53 /* whoever sends data is not interested in its input-array */
54 if( h && ( h->flag & STRUCT_HTTP_FLAG_ARRAY_USED ) ) { 54 if( h && ( h->flag & STRUCT_HTTP_FLAG_ARRAY_USED ) ) {
55 h->flag &= ~STRUCT_HTTP_FLAG_ARRAY_USED; 55 h->flag &= ~STRUCT_HTTP_FLAG_ARRAY_USED;
56 array_reset( &h->request ); 56 array_reset( &h->data.request );
57 } 57 }
58 58
59 written_size = write( client_socket, buffer, size ); 59 written_size = write( client_socket, buffer, size );
@@ -69,9 +69,9 @@ static void http_senddata( const int64 client_socket, char *buffer, size_t size
69 return; 69 return;
70 } 70 }
71 71
72 iob_reset( &h->batch ); 72 iob_reset( &h->data.batch );
73 memmove( outbuf, buffer + written_size, size - written_size ); 73 memmove( outbuf, buffer + written_size, size - written_size );
74 iob_addbuf_free( &h->batch, outbuf, size - written_size ); 74 iob_addbuf_free( &h->data.batch, outbuf, size - written_size );
75 h->flag |= STRUCT_HTTP_FLAG_IOB_USED; 75 h->flag |= STRUCT_HTTP_FLAG_IOB_USED;
76 76
77 /* writeable short data sockets just have a tcp timeout */ 77 /* writeable short data sockets just have a tcp timeout */
@@ -124,7 +124,7 @@ ssize_t http_sendiovecdata( const int64 client_socket, int iovec_entries, struct
124 free it now */ 124 free it now */
125 if( h->flag & STRUCT_HTTP_FLAG_ARRAY_USED ) { 125 if( h->flag & STRUCT_HTTP_FLAG_ARRAY_USED ) {
126 h->flag &= ~STRUCT_HTTP_FLAG_ARRAY_USED; 126 h->flag &= ~STRUCT_HTTP_FLAG_ARRAY_USED;
127 array_reset( &h->request ); 127 array_reset( &h->data.request );
128 } 128 }
129 129
130 /* If we came here, wait for the answer is over */ 130 /* If we came here, wait for the answer is over */
@@ -149,12 +149,12 @@ ssize_t http_sendiovecdata( const int64 client_socket, int iovec_entries, struct
149 else 149 else
150 header_size = sprintf( header, "HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\nContent-Length: %zd\r\n\r\n", size ); 150 header_size = sprintf( header, "HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\nContent-Length: %zd\r\n\r\n", size );
151 151
152 iob_reset( &h->batch ); 152 iob_reset( &h->data.batch );
153 iob_addbuf_free( &h->batch, header, header_size ); 153 iob_addbuf_free( &h->data.batch, header, header_size );
154 154
155 /* Will move to ot_iovec.c */ 155 /* Will move to ot_iovec.c */
156 for( i=0; i<iovec_entries; ++i ) 156 for( i=0; i<iovec_entries; ++i )
157 iob_addbuf_munmap( &h->batch, iovector[i].iov_base, iovector[i].iov_len ); 157 iob_addbuf_munmap( &h->data.batch, iovector[i].iov_base, iovector[i].iov_len );
158 free( iovector ); 158 free( iovector );
159 159
160 h->flag |= STRUCT_HTTP_FLAG_IOB_USED; 160 h->flag |= STRUCT_HTTP_FLAG_IOB_USED;