aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/fastcgi.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/fastcgi.c
parentc4120c8ddaa5340efad5f835ce4565f2a8ae2cbf (diff)
All three current protocols work with move to using uw_app
Diffstat (limited to 'src/c/fastcgi.c')
-rw-r--r--src/c/fastcgi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/c/fastcgi.c b/src/c/fastcgi.c
index 1a8a8316..b6b6e9a8 100644
--- a/src/c/fastcgi.c
+++ b/src/c/fastcgi.c
@@ -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 @@ static void *worker(void *data) {
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 @@ 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.
@@ -538,7 +541,7 @@ int main(int argc, char *argv[]) {
}
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));