Mercurial > urweb
diff src/c/urweb.c @ 864:6304f5e8fbb4
FastCGI working with lighttpd
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 27 Jun 2009 19:07:28 -0400 |
parents | 305bc0a431de |
children | 03e7f111fe99 |
line wrap: on
line diff
--- a/src/c/urweb.c Sat Jun 27 17:50:31 2009 -0400 +++ b/src/c/urweb.c Sat Jun 27 19:07:28 2009 -0400 @@ -206,12 +206,13 @@ 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 @@ 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 @@ client *c = new_client(); use_client(c); ctx->client = c; - } + } } }