summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--ot_accesslist.c2
-rw-r--r--ot_http.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c8366ca..c427462 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ LIBOWFAT_HEADERS=$(PREFIX)/libowfat
18LIBOWFAT_LIBRARY=$(PREFIX)/libowfat 18LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
19 19
20BINDIR?=$(PREFIX)/bin 20BINDIR?=$(PREFIX)/bin
21STRIP?=strip
21 22
22#FEATURES+=-DWANT_V6 23#FEATURES+=-DWANT_V6
23 24
@@ -71,7 +72,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES)
71 72
72$(BINARY): $(OBJECTS) $(HEADERS) 73$(BINARY): $(OBJECTS) $(HEADERS)
73 $(CC) -o $@ $(OBJECTS) $(LDFLAGS) 74 $(CC) -o $@ $(OBJECTS) $(LDFLAGS)
74 strip $@ 75 $(STRIP) $@
75$(BINARY).debug: $(OBJECTS_debug) $(HEADERS) 76$(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
76 $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS) 77 $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
77proxy: $(OBJECTS_proxy) $(HEADERS) 78proxy: $(OBJECTS_proxy) $(HEADERS)
diff --git a/ot_accesslist.c b/ot_accesslist.c
index 921bde3..3154e7f 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -119,7 +119,7 @@ int accesslist_hashisvalid( ot_hash hash ) {
119 void * exactmatch = NULL; 119 void * exactmatch = NULL;
120 120
121 if (accesslist) 121 if (accesslist)
122 bsearch( hash, accesslist->list, accesslist->size, OT_HASH_COMPARE_SIZE, vector_compare_hash ); 122 exactmatch = bsearch( hash, accesslist->list, accesslist->size, OT_HASH_COMPARE_SIZE, vector_compare_hash );
123 123
124#ifdef WANT_ACCESSLIST_BLACK 124#ifdef WANT_ACCESSLIST_BLACK
125 return exactmatch == NULL; 125 return exactmatch == NULL;
diff --git a/ot_http.c b/ot_http.c
index 6869687..2e16b58 100644
--- a/ot_http.c
+++ b/ot_http.c
@@ -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