From fd7ff4051baf62911ccc10904f0cd22c8fa96927 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 11 Jan 2010 01:05:22 -0500 Subject: Handle faultCode() --- etc/rc.filter_synchronize | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- cgit v1.1