diff src/c/http.c @ 1094:db52c32dbe42

All three current protocols work with move to using uw_app
author Adam Chlipala <adamc@hcoop.net>
date Sun, 27 Dec 2009 10:37:24 -0500
parents 305bc0a431de
children 951fced704d6
line wrap: on
line diff
--- a/src/c/http.c	Sat Dec 26 11:56:40 2009 -0500
+++ b/src/c/http.c	Sun Dec 27 10:37:24 2009 -0500
@@ -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 *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 @@
   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 @@
     }
   }
 
-  uw_request_init(NULL, log_error, log_debug);
+  uw_request_init(&uw_application, NULL, log_error, log_debug);
 
   names = calloc(nthreads, sizeof(int));