From 7cc3caa01e058702155329485cbc8d054be488f2 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Fri, 6 May 2005 00:29:06 +0000 Subject: Only sync if there were sections checked --- packages/carp_sync_client.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/carp_sync_client.php b/packages/carp_sync_client.php index 545772d1..2123c3d8 100644 --- a/packages/carp_sync_client.php +++ b/packages/carp_sync_client.php @@ -74,11 +74,13 @@ if($already_processed != 1) { $sections_xml[] = new XML_RPC_Value(backup_config_section("shaper"), 'string'); $sections[] = new XML_RPC_Value('shaper', 'string'); } - carp_sync_xml($synchronizetoip, $carp['password'], $sections, $sections_xml); - $cli = new XML_RPC_Client('/xmlrpc.php', $synchronizetoip); - $msg = new XML_RPC_Message('pfsense.filter_configure', array(new XML_RPC_Value($carp['password'], 'string'))); - $cli->setCredentials('admin', $carp['password']); - $cli->send($msg); + if(count($sections) > 0) { + carp_sync_xml($synchronizetoip, $carp['password'], $sections, $sections_xml); + $cli = new XML_RPC_Client('/xmlrpc.php', $synchronizetoip); + $msg = new XML_RPC_Message('pfsense.filter_configure', array(new XML_RPC_Value($carp['password'], 'string'))); + $cli->setCredentials('admin', $carp['password']); + $cli->send($msg); + } } } } -- cgit v1.2.3