From ebde083c541b5d202014c41450a3519f4d08e3c9 Mon Sep 17 00:00:00 2001 From: snowdrop Date: Wed, 20 Oct 2004 14:17:36 +0000 Subject: optimized for visualc 6 --- libcsoap/soap-client.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'libcsoap/soap-client.c') diff --git a/libcsoap/soap-client.c b/libcsoap/soap-client.c index 58886ff..5562399 100644 --- a/libcsoap/soap-client.c +++ b/libcsoap/soap-client.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: soap-client.c,v 1.8 2004/10/15 13:33:13 snowdrop Exp $ +* $Id: soap-client.c,v 1.9 2004/10/20 14:17:36 snowdrop Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -25,9 +25,21 @@ #include #include -/*--------------------------------- */ +/*--------------------------------- */ +static int _block_socket = 0; static SoapEnv *_soap_client_build_result(hresponse_t *res); /*--------------------------------- */ + +void soap_client_block_socket(int block) +{ + _block_socket = block; +} + +int soap_client_get_blockmode() +{ + return _block_socket; +} + int soap_client_init_args(int argc, char *argv[]) @@ -79,8 +91,6 @@ soap_client_invoke(SoapCtx *call, const char *url, const char *soap_action) static int counter=1; part_t *part; int file_count=0; - long total_size; - long file_size; /* Create buffer */ buffer = xmlBufferCreate(); @@ -88,7 +98,8 @@ soap_client_invoke(SoapCtx *call, const char *url, const char *soap_action) content = (char*)xmlBufferContent(buffer); /* Transport via HTTP */ - conn = httpc_new(); + conn = httpc_new(); + conn->block = soap_client_get_blockmode(); /* Set soap action */ if (soap_action != NULL) { @@ -224,9 +235,7 @@ soap_client_invoke(SoapCtx *call, const char *url, const char *soap_action) static SoapEnv* _soap_client_build_result(hresponse_t *res) { - xmlDocPtr doc; SoapEnv *env; - char *buffer; log_verbose2("Building result (%p)", res); @@ -252,7 +261,7 @@ SoapEnv* _soap_client_build_result(hresponse_t *res) env = soap_env_new_from_stream(res->in); if (env == NULL) { - xmlFreeDoc(doc); +/* xmlFreeDoc(doc);*/ return soap_env_new_with_fault(Fault_Client, "Can not create envelope","",""); } -- cgit v1.1-32-gdbae