summaryrefslogtreecommitdiffstats
path: root/libcsoap
diff options
context:
space:
mode:
authorGravatar snowdrop2005-07-27 07:45:40 +0000
committerGravatar snowdrop2005-07-27 07:45:40 +0000
commitd7c4593ff2b4c55fdc33676e20ecafff1c87e62c (patch)
tree6dd78a36c5d1b60fd21803b8ece6e1cf6eb967c0 /libcsoap
parent8761f387a1a6079081d4db85d7716609efb2e242 (diff)
downloadcsoap-d7c4593ff2b4c55fdc33676e20ecafff1c87e62c.tar.gz
csoap-d7c4593ff2b4c55fdc33676e20ecafff1c87e62c.tar.bz2
Changes of Menzo
nanohttp/nanohttp-client.c and nanohttp/nanohttp-client.h added httpc_close_free, a variant of httpc_free which explicitly asks to close the socket. Otherwise after a number of client/server interactions we get socket error 24 (Too many open files). libcsoap/soap-client.c call httpc_close_free instead of httpc_free nanohttp/nanohttp-socket.c in hsocket_close call shutdown with SHUT_RDWR instead of 1 (SHUT_WR). Otherwise after a number of client/server interactions the shutdown call doesn't return anymore.
Diffstat (limited to 'libcsoap')
-rw-r--r--libcsoap/soap-client.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libcsoap/soap-client.c b/libcsoap/soap-client.c
index e12317c..b015a9c 100644
--- a/libcsoap/soap-client.c
+++ b/libcsoap/soap-client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-client.c,v 1.16 2005/05/27 19:28:14 snowdrop Exp $
+* $Id: soap-client.c,v 1.17 2005/07/27 07:45:40 snowdrop Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -121,21 +121,21 @@ soap_client_invoke(SoapCtx *call, SoapCtx** response, const char *url, const cha
status = httpc_post_begin(conn, url);
if (status != H_OK) {
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
status = http_output_stream_write_string(conn->out, content);
if (status != H_OK) {
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
status = httpc_post_end(conn, &res);
if (status != H_OK) {
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
@@ -149,21 +149,21 @@ soap_client_invoke(SoapCtx *call, SoapCtx** response, const char *url, const cha
sprintf(start_id, "289247829121218%d", counter++);
status = httpc_mime_begin(conn, url, start_id, "", "text/xml");
if (status != H_OK) {
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
status = httpc_mime_next(conn, start_id, "text/xml", "binary");
if (status != H_OK) {
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
status = http_output_stream_write(conn->out, content, strlen(content));
if (status != H_OK) {
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
@@ -175,7 +175,7 @@ soap_client_invoke(SoapCtx *call, SoapCtx** response, const char *url, const cha
part->content_type, part->transfer_encoding, part->filename);
if (status != H_OK) {
log_error2("Send file failed. Status:%d", status);
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
@@ -184,7 +184,7 @@ soap_client_invoke(SoapCtx *call, SoapCtx** response, const char *url, const cha
status = httpc_mime_end(conn, &res);
if (status != H_OK)
{
- httpc_free(conn);
+ httpc_close_free(conn);
xmlBufferFree(buffer);
return status;
}
@@ -197,7 +197,7 @@ soap_client_invoke(SoapCtx *call, SoapCtx** response, const char *url, const cha
status = _soap_client_build_result(res, &res_env);
if (status != H_OK) {
hresponse_free(res);
- httpc_free(conn);
+ httpc_close_free(conn);
return status;
}
@@ -221,7 +221,7 @@ soap_client_invoke(SoapCtx *call, SoapCtx** response, const char *url, const cha
hresponse_free(res);
- httpc_free(conn);
+ httpc_close_free(conn);
return H_OK;
}