From d24d6ab7bbfda8e302af3a5cf8be62299d543c1a Mon Sep 17 00:00:00 2001 From: snowdrop Date: Thu, 28 Oct 2004 10:30:41 +0000 Subject: changed hstatus_t to herror_t and chagend the API function to return herror_t. Added herror_*() functions and fixed a bug in the socket receive comm. --- nanohttp/nanohttp-response.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'nanohttp/nanohttp-response.c') diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c index 8f55856..f2e13c5 100755 --- a/nanohttp/nanohttp-response.c +++ b/nanohttp/nanohttp-response.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-response.c,v 1.1 2004/10/15 13:30:42 snowdrop Exp $ +* $Id: nanohttp-response.c,v 1.2 2004/10/28 10:30:46 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003-2004 Ferhat Ayaz @@ -121,10 +121,12 @@ _hresponse_parse_header(const char *buffer) return res; } -hresponse_t * -hresponse_new_from_socket(hsocket_t sock) + +herror_t +hresponse_new_from_socket(hsocket_t sock, hresponse_t **out) { - int i=0, status; + int i=0, readed; + herror_t status; hresponse_t *res; attachments_t *mimeMessage; char buffer[MAX_HEADER_SIZE+1]; @@ -133,11 +135,11 @@ read_header: /* for errorcode: 100 (continue) */ /* Read header */ while (iin = http_input_stream_new_from_file(mimeMessage->root_part->filename); } } - - return res; + *out = res; + return H_OK; } -- cgit v1.1-32-gdbae