Eventscript functions: fix counter regression.
authorMartin Schwenke <martin@meltin.net>
Wed, 15 Dec 2010 23:11:33 +0000 (10:11 +1100)
committerMartin Schwenke <martin@meltin.net>
Thu, 11 Aug 2011 00:46:56 +0000 (10:46 +1000)
d362be7d32079ac1390d67056ce107bfbca2c937 wasn't well thought out.
Subsequent commits depend on ctdb_counter_init() taking an argument,
so this makes those cases work.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions

index 9b19548b131f4550056530d0d36420b108821c7d..b26a78fe04f6257a4b1d8668238d2105f07d30a1 100755 (executable)
@@ -520,18 +520,18 @@ _ctdb_counter_common () {
     mkdir -p "${_counter_file%/*}" # dirname
 }
 ctdb_counter_init () {
-    _ctdb_counter_common "$@"
+    _ctdb_counter_common "$1"
 
     >"$_counter_file"
 }
 ctdb_counter_incr () {
-    _ctdb_counter_common "$@"
+    _ctdb_counter_common "$1"
 
     # unary counting!
     echo -n 1 >> "$_counter_file"
 }
 ctdb_check_counter_limit () {
-    _ctdb_counter_common "$@"
+    _ctdb_counter_common
 
     _limit="${1:-${service_fail_limit}}"
     _quiet="$2"
@@ -546,7 +546,7 @@ ctdb_check_counter_limit () {
     fi
 }
 ctdb_check_counter_equal () {
-    _ctdb_counter_common "$@"
+    _ctdb_counter_common
 
     _limit=$1