summaryrefslogtreecommitdiff
path: root/src/c/http.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-27 10:37:24 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-27 10:37:24 -0500
commit129b1c431efebc77a7a0046c725380ba29b814cf (patch)
tree860e97379bc9422f4f7bd8fade58f9752afd92d9 /src/c/http.c
parentc4120c8ddaa5340efad5f835ce4565f2a8ae2cbf (diff)
All three current protocols work with move to using uw_app
Diffstat (limited to 'src/c/http.c')
-rw-r--r--src/c/http.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/c/http.c b/src/c/http.c
index 9550bd4f..70001961 100644
--- a/src/c/http.c
+++ b/src/c/http.c
@@ -16,6 +16,8 @@
#include "request.h"
#include "queue.h"
+extern uw_app uw_application;
+
int uw_backlog = 10;
static char *get_header(void *data, const char *h) {
@@ -61,7 +63,7 @@ static void log_debug(void *data, const char *fmt, ...) {
static void *worker(void *data) {
int me = *(int *)data;
- uw_context ctx = uw_request_new_context(NULL, log_error, log_debug);
+ uw_context ctx = uw_request_new_context(&uw_application, NULL, log_error, log_debug);
size_t buf_size = 2;
char *buf = malloc(buf_size);
uw_request_context rc = uw_new_request_context();
@@ -214,7 +216,7 @@ static void sigint(int signum) {
exit(0);
}
-static loggers ls = {NULL, log_error, log_debug};
+static loggers ls = {&uw_application, NULL, log_error, log_debug};
int main(int argc, char *argv[]) {
// The skeleton for this function comes from Beej's sockets tutorial.
@@ -262,7 +264,7 @@ int main(int argc, char *argv[]) {
}
}
- uw_request_init(NULL, log_error, log_debug);
+ uw_request_init(&uw_application, NULL, log_error, log_debug);
names = calloc(nthreads, sizeof(int));