diff options
Diffstat (limited to 'nanohttp')
-rw-r--r-- | nanohttp/nanohttp-common.c | 11 | ||||
-rwxr-xr-x | nanohttp/nanohttp-mime.c | 5 | ||||
-rwxr-xr-x | nanohttp/nanohttp-response.c | 3 | ||||
-rw-r--r-- | nanohttp/nanohttp-server.c | 4 |
4 files changed, 12 insertions, 11 deletions
diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c index a7f7f50..9b5015e 100644 --- a/nanohttp/nanohttp-common.c +++ b/nanohttp/nanohttp-common.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-common.c,v 1.36 2006/12/10 19:21:06 m0gg Exp $ +* $Id: nanohttp-common.c,v 1.37 2006/12/16 15:55:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -193,8 +193,11 @@ hpairnode_free(hpair_t * pair) if (pair == NULL) return; - free(pair->key); - free(pair->value); + if (pair->key) + free(pair->key); + + if (pair->value) + free(pair->value); free(pair); @@ -462,7 +465,7 @@ attachments_free(struct attachments_t *message) { struct part_t *tmp, *part; - if (message == NULL) + if (!message) return; part = message->parts; diff --git a/nanohttp/nanohttp-mime.c b/nanohttp/nanohttp-mime.c index 59b50c0..4798bf4 100755 --- a/nanohttp/nanohttp-mime.c +++ b/nanohttp/nanohttp-mime.c @@ -3,7 +3,7 @@ * | \/ | | | | \/ | | _/ * |_''_| |_| |_''_| |_'/ PARSER * -* $Id: nanohttp-mime.c,v 1.18 2006/12/11 08:35:58 m0gg Exp $ +* $Id: nanohttp-mime.c,v 1.19 2006/12/16 15:55:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003-2004 Ferhat Ayaz @@ -964,8 +964,7 @@ mime_get_attachments(content_type_t * ctype, struct http_input_stream_t * in, "'start' not set for multipart/related"); } - mimeMessage = - mime_message_parse(in, root_id, boundary, "."); + mimeMessage = mime_message_parse(in, root_id, boundary, "."); if (mimeMessage == NULL) { /* TODO (#1#): Handle Error in http form */ diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c index 5741683..ec35c40 100755 --- a/nanohttp/nanohttp-response.c +++ b/nanohttp/nanohttp-response.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-response.c,v 1.17 2006/12/10 19:21:07 m0gg Exp $ +* $Id: nanohttp-response.c,v 1.18 2006/12/16 15:55:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003-2004 Ferhat Ayaz @@ -204,7 +204,6 @@ read_header: /* for errorcode: 100 (continue) */ /* Create input stream */ res->in = http_input_stream_new(sock, res->header); - /* Check for MIME message */ if ((res->content_type && !strcmp(res->content_type->type, "multipart/related"))) diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c index 1808b32..bc7bffe 100644 --- a/nanohttp/nanohttp-server.c +++ b/nanohttp/nanohttp-server.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-server.c,v 1.74 2006/12/10 19:21:07 m0gg Exp $ +* $Id: nanohttp-server.c,v 1.75 2006/12/16 15:55:24 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -749,7 +749,7 @@ httpd_session_main(void *data) { char buffer[256]; - sprintf(buffer, "service '%s' not registered properly (func == NULL)", req->path); + sprintf(buffer, "service '%s' not registered properly (service function is NULL)", req->path); log_verbose1(buffer); httpd_send_internal_error(rconn, buffer); } |