diff options
author | snowdrop | 2004-08-30 13:25:23 +0000 |
---|---|---|
committer | snowdrop | 2004-08-30 13:25:23 +0000 |
commit | 056647348ff38f83b5e13bed1c4f4bb76cce50f9 (patch) | |
tree | 70b26c98086029d71db2fd9179eb9e7ff5b1f696 /nanohttp/nanohttp-server.c | |
parent | 295147a45091769563551a26c79a06abbe5f4dc9 (diff) | |
download | csoap-056647348ff38f83b5e13bed1c4f4bb76cce50f9.tar.gz csoap-056647348ff38f83b5e13bed1c4f4bb76cce50f9.tar.bz2 |
optimized warnings
Diffstat (limited to 'nanohttp/nanohttp-server.c')
-rw-r--r-- | nanohttp/nanohttp-server.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c index da71273..0e241a7 100644 --- a/nanohttp/nanohttp-server.c +++ b/nanohttp/nanohttp-server.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-server.c,v 1.9 2004/08/30 07:55:42 snowdrop Exp $ +* $Id: nanohttp-server.c,v 1.10 2004/08/30 13:25:23 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -109,13 +109,14 @@ FUNCTION: httpd_register int httpd_register(const char* ctx, httpd_service func) { hservice_t* service; - log_verbose3("register service:t(%p):%s", service, SAVE_STR(ctx)); service = (hservice_t*)malloc(sizeof(hservice_t)); service->next = NULL; service->func = func; strcpy(service->ctx, ctx); + log_verbose3("register service:t(%p):%s", service, SAVE_STR(ctx));
+
if (_httpd_services_head == NULL) { _httpd_services_head = _httpd_services_tail = service; } else { @@ -267,12 +268,10 @@ static void* httpd_session_main(void *data) char buffer[256]; /* temp buffer for recv() */ char header[4064]; /* received header */ int total; /* result from recv() */ - int hindex; /* searching end of header */ int headerreached =0; /* whether reach header "\n\n" */ hrequest_t* req = NULL; /* only for test */ httpd_conn_t *rconn; hservice_t* service = NULL; - char *content_length_str; long content_length = 0; header[0] = '\0'; @@ -390,7 +389,7 @@ pthread_attr_init(&attr); #if HSOCKET_BLOCKMODE!=0 fcntl(_httpd_socket, F_SETFL, O_NONBLOCK); #endif -#else +#else
if(ioctlsocket(_httpd_socket, FIONBIO, (u_long FAR*) &iMode) == INVALID_SOCKET) { log_error1("ioctlsocket error"); |