Revision 593f0521
Added by Jim Pingle over 8 years ago
src/etc/inc/xmlrpc_client.inc | ||
---|---|---|
111 | 111 |
if ($previouserror == null) { |
112 | 112 |
// CurlException doesnt get filled with PreviousError, |
113 | 113 |
// however we dont want to show the stacktrace included in the 'message' to non sysadmin users |
114 |
$this->error = "CurlException calling XMLRPC method {$method} #" . $e->getMessage(); |
|
114 |
preg_match("/HTTP_Request2_ConnectionException: (.*) in \/.*/", $e->getMessage(), $errormsg); |
|
115 |
$this->error = "A communications error occurred while attempting to call XMLRPC method {$method}: " . $errormsg[1]; |
|
115 | 116 |
} else { |
116 | 117 |
$this->error = "CurlException calling XMLRPC method {$method} #" . $previouserror->getMessage(); |
117 | 118 |
} |
src/etc/rc.filter_synchronize | ||
---|---|---|
96 | 96 |
$resp = $rpc_client->xmlrpc_method('host_firmware_version'); |
97 | 97 |
|
98 | 98 |
log_error(sprintf(gettext("XMLRPC versioncheck:").$resp['config_version'] ." -- ". $config['version'])); |
99 |
if (!isset($resp['config_version']) || |
|
100 |
($resp['config_version'] != $config['version'])) { |
|
99 |
if (!isset($resp['config_version'])) { |
|
100 |
update_filter_reload_status("The {$g['product_name']} software configuration version of the other member could not be determined. Skipping synchronization to avoid causing a problem!"); |
|
101 |
log_error("The {$g['product_name']} software configuration version of the other member could not be determined. Skipping synchronization to avoid causing a problem!"); |
|
102 |
return false; |
|
103 |
} elseif ($resp['config_version'] != $config['version']) { |
|
101 | 104 |
update_filter_reload_status("The other member is on a different configuration version of {$g['product_name']}. Sync will not be done to prevent problems!"); |
102 | 105 |
log_error("The other member is on a different configuration version of {$g['product_name']}. Sync will not be done to prevent problems!"); |
103 | 106 |
return false; |
Also available in: Unified diff
Improve XMLRPC failure messages/exception handling. Fixes #7448