- fixes interruption with libcurl transport - fixes parsing error of 64 bit integers - fixes libxml2 related memory leak
69 lines
2.7 KiB
Diff
69 lines
2.7 KiB
Diff
From 1c76aa8abeaef8273f637324e43de78677535833 Mon Sep 17 00:00:00 2001
|
|
From: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
|
|
Date: Fri, 19 Oct 2012 19:47:27 +0000
|
|
Subject: Release 1.25.20
|
|
|
|
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable@2435 adbb7d4b-a73a-0410-a071-c5f57c452bd4
|
|
---
|
|
lib/curl_transport/xmlrpc_curl_transport.c | 23 ++++++++++++++++++++---
|
|
version.mk | 2 +-
|
|
2 Dateien geändert, 21 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
|
|
|
|
diff --git a/lib/curl_transport/xmlrpc_curl_transport.c b/lib/curl_transport/xmlrpc_curl_transport.c
|
|
index c48b927..96a403e 100644
|
|
--- a/lib/curl_transport/xmlrpc_curl_transport.c
|
|
+++ b/lib/curl_transport/xmlrpc_curl_transport.c
|
|
@@ -1170,6 +1170,16 @@ createRpc(xmlrpc_env * const envP,
|
|
if (rpcP == NULL)
|
|
xmlrpc_faultf(envP, "Couldn't allocate memory for rpc object");
|
|
else {
|
|
+ curlt_progressFn * curlProgressFn;
|
|
+
|
|
+ if (progress || clientTransportP->interruptP)
|
|
+ curlProgressFn = &curlTransactionProgress;
|
|
+ else {
|
|
+ /* There's nothing for curlTransactionProgress() to do, so save
|
|
+ the time and complexity of calling it.
|
|
+ */
|
|
+ curlProgressFn = NULL;
|
|
+ }
|
|
rpcP->transportP = clientTransportP;
|
|
rpcP->curlSessionP = curlSessionP;
|
|
rpcP->callInfoP = callInfoP;
|
|
@@ -1186,7 +1196,7 @@ createRpc(xmlrpc_env * const envP,
|
|
&clientTransportP->curlSetupStuff,
|
|
rpcP,
|
|
complete ? &finishRpcCurlTransaction : NULL,
|
|
- progress ? &curlTransactionProgress : NULL,
|
|
+ curlProgressFn,
|
|
&rpcP->curlTransactionP);
|
|
if (!envP->fault_occurred) {
|
|
if (envP->fault_occurred)
|
|
@@ -1296,15 +1306,22 @@ curlTransactionProgress(void * const context,
|
|
|
|
assert(rpcP);
|
|
assert(transportP);
|
|
- assert(rpcP->progress);
|
|
|
|
progressData.response.total = dlTotal;
|
|
progressData.response.now = dlNow;
|
|
progressData.call.total = ulTotal;
|
|
progressData.call.now = ulNow;
|
|
|
|
- rpcP->progress(rpcP->callInfoP, progressData);
|
|
+ if (rpcP->progress) {
|
|
+ struct xmlrpc_progress_data progressData;
|
|
+
|
|
+ progressData.response.total = dlTotal;
|
|
+ progressData.response.now = dlNow;
|
|
+ progressData.call.total = ulTotal;
|
|
+ progressData.call.now = ulNow;
|
|
|
|
+ rpcP->progress(rpcP->callInfoP, progressData);
|
|
+ }
|
|
if (transportP->interruptP)
|
|
*abortP = *transportP->interruptP;
|
|
else
|
|
--
|
|
1.7.11.7
|
|
|