diff options
author | Scott Ullrich <sullrich@pfSense.org> | 2010-01-11 01:05:22 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfSense.org> | 2010-01-11 01:09:09 -0500 |
commit | fd7ff4051baf62911ccc10904f0cd22c8fa96927 (patch) | |
tree | 1947d84f97424e9c25e803760f6367373c78f95f | |
parent | 01cf3e74e5c1fae3c47c0e0154a0f1bd0964d986 (diff) | |
download | pfsense-fd7ff4051baf62911ccc10904f0cd22c8fa96927.zip pfsense-fd7ff4051baf62911ccc10904f0cd22c8fa96927.tar.gz |
Handle faultCode()
-rwxr-xr-x | etc/rc.filter_synchronize | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index f846999..c4d8960 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -168,10 +168,15 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); $username = $config['system']['user'][0]['name']; $cli->setCredentials($username, $password); - if($numberofruns == 1) + if($numberofruns > 1) $cli->setDebug(1); /* send our XMLRPC message and timeout after 240 seconds */ $resp = $cli->send($msg, "240"); + if($resp->faultCode()) { + $error = "A communications error occurred while attempting communication with {$url}:{$port} (pfsense.exec_php)."; + log_error($error); + return; + } if(!$resp) { $error = "A communications error occured while attempting XMLRPC sync with username {$username} {$url}:{$port}."; log_error($error); |