diff src/c/fastcgi.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 c2317cfb99ec
children 0cee0c8d8c37
line wrap: on
line diff
--- a/src/c/fastcgi.c	Sat Dec 26 11:56:40 2009 -0500
+++ b/src/c/fastcgi.c	Sun Dec 27 10:37:24 2009 -0500
@@ -10,6 +10,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <stdarg.h>
+#include <ctype.h>
 
 #include <pthread.h>
 
@@ -19,6 +20,8 @@
 
 #include "fastcgi.h"
 
+extern uw_app uw_application;
+
 typedef struct {
   unsigned char version;
   unsigned char type;
@@ -300,7 +303,7 @@
   int me = *(int *)data;
   FCGI_Input *in = fastcgi_input();
   FCGI_Output *out = fastcgi_output();
-  uw_context ctx = uw_request_new_context(out, log_error, log_debug);
+  uw_context ctx = uw_request_new_context(&uw_application, out, log_error, log_debug);
   uw_request_context rc = uw_new_request_context();
   headers hs;
   size_t body_size = 0;
@@ -489,7 +492,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.
@@ -538,7 +541,7 @@
   }
 
   uw_set_on_success("");
-  uw_request_init(NULL, log_error, log_debug);
+  uw_request_init(&uw_application, NULL, log_error, log_debug);
 
   names = calloc(nthreads, sizeof(int));