diff options
-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); |