Browse code

utils/kamctl: removed unused default values

- test if DEFAULT_Q is set inside the function using it, because it has
single place usage

Daniel-Constantin Mierla authored on 16/09/2014 16:13:02
Showing 3 changed files
... ...
@@ -2454,6 +2454,10 @@ usrloc() {
2454 2454
 				exit 1
2455 2455
 			fi
2456 2456
 
2457
+			if [ -z "$DEFAULT_Q" ] ; then
2458
+				DEFAULT_Q = "1.0"
2459
+			fi
2460
+
2457 2461
 			$CTLCMD ul_add "$USRLOC_TABLE" "$OSERUSER@$OSERDOMAIN" "$2" \
2458 2462
 "$UL_EXPIRES" "$DEFAULT_Q" "$UL_PATH" "$UL_FLAGS" "$BR_FLAGS" "$ALL_METHODS"
2459 2463
 			exit $?
... ...
@@ -56,11 +56,7 @@
56 56
 # FIXME
57 57
 
58 58
 # FOREVER="2030-05-28 21:32:15"
59
-# DEFAULT_ALIASES_EXPIRES=$FOREVER
60 59
 # DEFAULT_Q="1.0"
61
-# DEFAULT_CALLID="Default-Call-ID"
62
-# DEFAULT_CSEQ="13"
63
-# DEFAULT_LOCATION_EXPIRES=$FOREVER
64 60
 
65 61
 
66 62
 # Program to calculate a message-digest fingerprint 
... ...
@@ -54,12 +54,6 @@ DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs
54 54
 # FIXME
55 55
 
56 56
 FOREVER=${FOREVER:-2030-05-28 21:32:15}
57
-DEFAULT_ALIASES_EXPIRES=${DEFAULT_ALIASES_EXPIRES:-${FOREVER}}
58
-DEFAULT_Q=${DEFAULT_Q:-1.0}
59
-DEFAULT_CALLID=${DEFAULT_CALLID:-Default-Call-ID}
60
-DEFAULT_CSEQ=${DEFAULT_CSEQ:-13}
61
-DEFAULT_LOCATION_EXPIRES=${DEFAULT_LOCATION_EXPIRES:-${FOREVER}}
62
-
63 57
 
64 58
 # default location for config files
65 59
 DEFAULT_CFG_DIR=/usr/local/etc/kamailio