mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
XmlRpc: Shortcurcuit mode (server and client are the same), *Draw: Fixed critical deadlock problem in FindIml
git-svn-id: svn://ultimatepp.org/upp/trunk@2202 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
50e36e842e
commit
fa3441cfdf
5 changed files with 59 additions and 62 deletions
|
|
@ -2,11 +2,28 @@
|
|||
|
||||
#define LLOG(x) // LOG(x)
|
||||
|
||||
XmlRpcCall::XmlRpcCall(const char *url)
|
||||
{
|
||||
shorted = true;
|
||||
if(url && *url) {
|
||||
server.URL(url);
|
||||
shorted = false;
|
||||
}
|
||||
server.ContentType("text/xml");
|
||||
timeout = 30000;
|
||||
}
|
||||
|
||||
String XmlRpcExecute(const String& request, const char *group, const char *peeraddr);
|
||||
|
||||
Value XmlRpcCall::Execute()
|
||||
{
|
||||
String request = XmlHeader();
|
||||
request << XmlTag("methodCall")(XmlTag("methodName")(method) + FormatXmlRpcParams(data.out));
|
||||
String response = server.Post(request).TimeoutMsecs(timeout).ExecuteRedirect();
|
||||
String response;
|
||||
if(shorted)
|
||||
response = XmlRpcExecute(request, "", "127.0.0.1");
|
||||
else
|
||||
response = server.Post(request).TimeoutMsecs(timeout).ExecuteRedirect();
|
||||
LLOG("response: " << response);
|
||||
if(IsNull(response)) {
|
||||
LLOG("ERROR: " << server.GetError());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue