From e274b9f58ac97a52889f16c02cd57cb34626d7a8 Mon Sep 17 00:00:00 2001 From: AdSchellevis Date: Fri, 17 Apr 2015 19:53:37 +0000 Subject: [PATCH] oops, hasync also triggered when not configured... make conditional and refactor --- src/etc/inc/config.lib.inc | 4 +++- src/etc/inc/util.inc | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index a390c92c8..a2b2481da 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -183,7 +183,9 @@ function write_config($desc = 'Unknown', $backup = true) } /* sync carp entries to other firewalls */ - carp_sync_client(); + if ( isset($config['hasync']['synchronizetoip']) && trim($config['hasync']['synchronizetoip']) != "") { + configd_run('filter sync load'); + } /* cleanup backups */ cleanup_backups(); diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 3abb916bb..0102129c8 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -1461,12 +1461,6 @@ function is_interface_mismatch() return $do_assign; } -/* sync carp entries to other firewalls */ -function carp_sync_client() -{ - configd_run('filter sync load'); -} - /****f* util/isAjax * NAME * isAjax - reports if the request is driven from prototype