diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-11-25 21:40:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-11-25 21:40:33 +0000 |
commit | 0805971e5508824e88f1ee14049da20b676648ea (patch) | |
tree | edac466c5ef1eee450b97155586f05c4a3084d79 /etc | |
parent | 4172a44d36364901d414bce85eb0589e6b9be0d9 (diff) | |
download | pfsense-0805971e5508824e88f1ee14049da20b676648ea.zip pfsense-0805971e5508824e88f1ee14049da20b676648ea.tar.gz |
MFC 8020
Use XML_RPC_encode() to populate XMLRPC arrays instead of setting a single XML_RPC_Value object.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 39924bc..424cb91 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -2008,9 +2008,11 @@ function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsen if($g['booting']) return; - $params = array(new XML_RPC_Value($password, 'string'), - new XML_RPC_Value($section, 'array'), - new XML_RPC_Value($section_xml, 'array')); + $params = array( + new XML_RPC_Value($password, 'string'), + XML_RPC_encode($section), + XML_RPC_encode($section_xml) + ); $msg = new XML_RPC_Message($method, $params); log_error("begin synchronize XML configuration data to $url on port $port"); $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); @@ -2020,8 +2022,9 @@ function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsen log_error("A communication error occured while syncing configuration data with {$url}:{$port} - " . $cli->errstr); file_notice("sync_settings", "A communication error occured while syncing configuration data with {$url}:{$port} - " . $cli->errstr, "Settings Sync", ""); } elseif($resp->faultCode()) { - log_error("An error code was received while syncing configuration data with {$url}:{$port} - Code " . $resp->faultCode() . ":" . $resp->faultString() ); - file_notice("sync_settings", "An error code was received while syncing configuration data with {$url}:{$port} - Code " . $resp->faultCode() . ":" . $resp->faultString(), "Settings Sync", ""); + $error = "An error code was received while syncing configuration data with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("sync_settings", $error, "Settings Sync", ""); } else { log_error("Configuration data was successfully synced to {$url}:{$port}"); } |