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 | |
parent | 295147a45091769563551a26c79a06abbe5f4dc9 (diff) | |
download | csoap-056647348ff38f83b5e13bed1c4f4bb76cce50f9.tar.gz csoap-056647348ff38f83b5e13bed1c4f4bb76cce50f9.tar.bz2 |
optimized warnings
Diffstat (limited to 'nanohttp')
-rw-r--r-- | nanohttp/nanohttp-client.c | 4 | ||||
-rw-r--r-- | nanohttp/nanohttp-common.c | 3 | ||||
-rw-r--r-- | nanohttp/nanohttp-server.c | 9 |
3 files changed, 7 insertions, 9 deletions
diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c index e0456e8..59d0cd0 100644 --- a/nanohttp/nanohttp-client.c +++ b/nanohttp/nanohttp-client.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-client.c,v 1.14 2004/08/30 07:55:41 snowdrop Exp $ +* $Id: nanohttp-client.c,v 1.15 2004/08/30 13:28:58 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -521,7 +521,7 @@ int httpc_receive_response(httpc_conn_t *conn, } log_error1("Unknown server response retreive type!"); - + return -1; } /*-------------------------------------------------- diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c index 6fac5ba..b9dbe62 100644 --- a/nanohttp/nanohttp-common.c +++ b/nanohttp/nanohttp-common.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-common.c,v 1.9 2004/08/26 17:07:47 rans Exp $ +* $Id: nanohttp-common.c,v 1.10 2004/08/30 13:28:58 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -645,7 +645,6 @@ hresponse_t *hresponse_new_from_buffer(const char* buffer) { hresponse_t *res; char *s1, *s2, *str; - hpair_t *pair; /* create response object */ res = hresponse_new(); 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"); |