summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-response.c
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp/nanohttp-response.c')
-rwxr-xr-xnanohttp/nanohttp-response.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c
index 64eac44..cb24d10 100755
--- a/nanohttp/nanohttp-response.c
+++ b/nanohttp/nanohttp-response.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-response.c,v 1.9 2006/02/27 22:26:02 snowdrop Exp $
+* $Id: nanohttp-response.c,v 1.10 2006/03/06 13:37:38 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -146,9 +146,9 @@ _hresponse_parse_header(const char *buffer)
herror_t
-hresponse_new_from_socket(hsocket_t sock, hresponse_t ** out)
+hresponse_new_from_socket(hsocket_t *sock, hresponse_t ** out)
{
- int i = 0, readed;
+ int i = 0, count;
herror_t status;
hresponse_t *res;
attachments_t *mimeMessage;
@@ -158,8 +158,7 @@ read_header: /* for errorcode: 100 (continue) */
/* Read header */
while (i < MAX_HEADER_SIZE)
{
- status = hsocket_read(sock, &(buffer[i]), 1, 1, &readed);
- if (status != H_OK)
+ if ((status = hsocket_read(sock, &(buffer[i]), 1, 1, &count)) != H_OK)
{
log_error1("Socket read error");
return status;