From cd56a85b648d0cdb106584a4578bf9b7787114f9 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 26 Oct 2011 20:31:57 +0000 Subject: [PATCH] 2011-10-26 Miguel de Dios * include/xmlrpc, include/styles/menu.css, include/functions_update_manager.php, include/functions_config.php, operation/update_manager, operation/update_manager/update_manager.php, images/box_down.png, general/main_menu.php, godmode/update_manager, godmode/update_manager/update_manager.php, godmode/updatemanager: added first version of "Update Manager". * general/login_page.php: fixed the name of build var. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5084 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- .../update_manager/lib/xmlrpc/xmlrpc.inc | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pandora_console/extensions/update_manager/lib/xmlrpc/xmlrpc.inc b/pandora_console/extensions/update_manager/lib/xmlrpc/xmlrpc.inc index b3658f0a3a..8fdccdd22f 100755 --- a/pandora_console/extensions/update_manager/lib/xmlrpc/xmlrpc.inc +++ b/pandora_console/extensions/update_manager/lib/xmlrpc/xmlrpc.inc @@ -1134,19 +1134,20 @@ * @access public */ function& send($msg, $timeout=0, $method='') - { + { // if user deos not specify http protocol, use native method of this client // (i.e. method set during call to constructor) if($method == '') { $method = $this->method; } - + if(is_array($msg)) { // $msg is an array of xmlrpcmsg's + $r = $this->multicall($msg, $timeout, $method); - return $r; + //return $r; } elseif(is_string($msg)) { @@ -1222,7 +1223,7 @@ $this->proxy_authtype ); } - + return $r; } @@ -1268,14 +1269,14 @@ } } else - { + { $encoding_hdr = ''; } // thanks to Grant Rauscher for this $credentials=''; if($username!='') - { + { $credentials='Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n"; if ($authtype != 1) { @@ -1285,13 +1286,13 @@ $accepted_encoding = ''; if(is_array($this->accepted_compression) && count($this->accepted_compression)) - { + { $accepted_encoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n"; } $proxy_credentials = ''; if($proxyhost) - { + { if($proxyport == 0) { $proxyport = 8080; @@ -1371,28 +1372,28 @@ $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr); } if($fp) - { + { if($timeout>0 && function_exists('stream_set_timeout')) { stream_set_timeout($fp, $timeout); } } else - { + { $this->errstr='Connect error: '.$this->errstr; $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')'); return $r; } if(!fputs($fp, $op, strlen($op))) - { + { fclose($fp); $this->errstr='Write error'; $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr); return $r; } else - { + { // reset errno and errstr on succesful socket connection $this->errstr = ''; } @@ -1406,6 +1407,7 @@ $ipd.=fread($fp, 32768); } while(!feof($fp)); fclose($fp); + $r =& $msg->parseResponse($ipd, false, $this->return_type); return $r; @@ -2453,7 +2455,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha print "
---INFLATED RESPONSE---[".strlen($data)." chars]---\n" . htmlentities($data) . "\n---END---
"; } else - { + { error_log('XML-RPC: '.__METHOD__.': errors occurred when trying to decode the deflated data received from server'); $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']); return $r;