From 0027de0a544438f146cfc94f005fd6f4ba9f94d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Fri, 8 May 2009 18:42:37 +0000 Subject: * Create two new functions lock($subsystem)/unlock() to have more reliable locking using semaphores. This function can sleep till the resource is free and can help find not well behaving code. * Remove most of the config_lock/config_unlock logics on the whole scripts/pages it is an abuse of this. If any sybsytem wants to lock can do so with its own lock. * Lock the config when doing a filter reload to avoid parallell recursion on this function, since it is not reentrant. This compenstates for the removal of lock aquiring from the scripts/pages. * config_lock/config_unlock are now compate shims that do nothing. They are preserved since packages 'abuse' them too. --- usr/local/www/system.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'usr/local/www/system.php') diff --git a/usr/local/www/system.php b/usr/local/www/system.php index 57d1e4d..fe983a8 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -198,7 +198,6 @@ if ($_POST) { write_config($changedesc); $retval = 0; - config_lock(); $retval = system_hostname_configure(); $retval |= system_hosts_generate(); $retval |= system_resolvconf_generate(); @@ -211,10 +210,8 @@ if ($_POST) { $retval |= interface_configure(); // Reload the filter - plugins might need to be run. - filter_configure(); + $retval |= filter_configure(); - config_unlock(); - $savemsg = get_std_save_message($retval); } } -- cgit v1.1