summaryrefslogtreecommitdiff
path: root/src/c/urweb.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-27 19:07:28 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-27 19:07:28 -0400
commitaf332ab2219bf9c424c80593cb885915abed8738 (patch)
treeaf49dbce95461b12a44cf64bece402b21b95f537 /src/c/urweb.c
parentb9fcbe3dc86323a4a64b419c589a1cc5eeb38749 (diff)
FastCGI working with lighttpd
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 6e217e08..221ac039 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -206,12 +206,13 @@ void uw_set_on_success(char *s) {
void uw_client_connect(unsigned id, int pass, int sock,
int (*send)(int sockfd, const void *buf, ssize_t len),
- int (*close)(int fd)) {
+ int (*close)(int fd),
+ void *logger_data, uw_logger log_error) {
client *c = find_client(id);
if (c == NULL) {
close(sock);
- fprintf(stderr, "Out-of-bounds client request (%u)\n", id);
+ log_error(logger_data, "Out-of-bounds client request (%u)\n", id);
return;
}
@@ -220,14 +221,14 @@ void uw_client_connect(unsigned id, int pass, int sock,
if (c->mode != USED) {
pthread_mutex_unlock(&c->lock);
close(sock);
- fprintf(stderr, "Client request for unused slot (%u)\n", id);
+ log_error(logger_data, "Client request for unused slot (%u)\n", id);
return;
}
if (pass != c->pass) {
pthread_mutex_unlock(&c->lock);
close(sock);
- fprintf(stderr, "Wrong client password (%u, %d)\n", id, pass);
+ log_error(logger_data, "Wrong client password (%u, %d)\n", id, pass);
return;
}
@@ -563,7 +564,7 @@ void uw_login(uw_context ctx) {
client *c = new_client();
use_client(c);
ctx->client = c;
- }
+ }
}
}