diff options
author | m0gg | 2006-11-25 15:06:57 +0000 |
---|---|---|
committer | m0gg | 2006-11-25 15:06:57 +0000 |
commit | 82c14810dd1c101f20052c4ab92f33c57a255cc1 (patch) | |
tree | 6d445e22baf26d4df2ae08ad678ba56a19f22e7e /nanohttp/nanohttp-response.c | |
parent | 01aaebca2e4b8b2d13aef5cdeda9b8874efe1c31 (diff) | |
download | csoap-82c14810dd1c101f20052c4ab92f33c57a255cc1.tar.gz csoap-82c14810dd1c101f20052c4ab92f33c57a255cc1.tar.bz2 |
documentation enhancements and code cleanup
Diffstat (limited to 'nanohttp/nanohttp-response.c')
-rwxr-xr-x | nanohttp/nanohttp-response.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c index ad8c4a1..c239eb4 100755 --- a/nanohttp/nanohttp-response.c +++ b/nanohttp/nanohttp-response.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-response.c,v 1.14 2006/11/23 15:27:33 m0gg Exp $ +* $Id: nanohttp-response.c,v 1.15 2006/11/25 15:06:58 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003-2004 Ferhat Ayaz @@ -46,6 +46,7 @@ #endif #include "nanohttp-logging.h" +#include "nanohttp-error.h" #include "nanohttp-common.h" #include "nanohttp-socket.h" #include "nanohttp-stream.h" @@ -57,10 +58,11 @@ hresponse_new(void) { hresponse_t *res; - if (!(res = (hresponse_t *) malloc(sizeof(hresponse_t)))) { + if (!(res = (hresponse_t *) malloc(sizeof(hresponse_t)))) + { - log_error2("malloc failed (%s)", strerror(errno)); - return NULL; + log_error2("malloc failed (%s)", strerror(errno)); + return NULL; } res->version = HTTP_1_1; @@ -159,7 +161,7 @@ hresponse_new_from_socket(struct hsocket_t *sock, hresponse_t ** out) int i = 0, count; herror_t status; hresponse_t *res; - attachments_t *mimeMessage; + struct attachments_t *mimeMessage; char buffer[MAX_HEADER_SIZE + 1]; read_header: /* for errorcode: 100 (continue) */ |