[sr-dev] git:master:49cca9c3: dispatcher: declare the inactive threshold variable

Daniel-Constantin Mierla miconda at gmail.com
Tue Jan 13 17:55:29 CET 2015


Module: kamailio
Branch: master
Commit: 49cca9c3bdd1cc5213c05d08ddb1ea85fe3ff96e
URL: https://github.com/kamailio/kamailio/commit/49cca9c3bdd1cc5213c05d08ddb1ea85fe3ff96e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-01-13T17:55:16+01:00

dispatcher: declare the inactive threshold variable

- it was declared as extern only
- reported by Ovidiu Sas

---

Modified: modules/dispatcher/dispatcher.c

---

Diff:  https://github.com/kamailio/kamailio/commit/49cca9c3bdd1cc5213c05d08ddb1ea85fe3ff96e.diff
Patch: https://github.com/kamailio/kamailio/commit/49cca9c3bdd1cc5213c05d08ddb1ea85fe3ff96e.patch

---

diff --git a/modules/dispatcher/dispatcher.c b/modules/dispatcher/dispatcher.c
index 2de3d33..57d3298 100644
--- a/modules/dispatcher/dispatcher.c
+++ b/modules/dispatcher/dispatcher.c
@@ -96,6 +96,8 @@ pv_elem_t * hash_param_model = NULL;
 
 int probing_threshold = 1; /* number of failed requests, before a destination
 							   is taken into probing */
+int inactive_threshold = 1; /* number of replied requests, before a destination
+							   is taken into back in active state */
 str ds_ping_method = str_init("OPTIONS");
 str ds_ping_from   = str_init("sip:dispatcher at localhost");
 static int ds_ping_interval = 0;
@@ -227,6 +229,7 @@ static param_export_t params[]={
 	{"setid_pvname",    PARAM_STR, &ds_setid_pvname},
 	{"attrs_pvname",    PARAM_STR, &ds_attrs_pvname},
 	{"ds_probing_threshold", INT_PARAM, &probing_threshold},
+	{"ds_inactive_threshold", INT_PARAM, &inactive_threshold},
 	{"ds_ping_method",     PARAM_STR, &ds_ping_method},
 	{"ds_ping_from",       PARAM_STR, &ds_ping_from},
 	{"ds_ping_interval",   INT_PARAM, &ds_ping_interval},
@@ -306,9 +309,11 @@ static int mod_init(void)
 			return -1;
 		}
 	}	
-	/* Copy Threshhold to Config */
+	/* copy threshholds to config */
 	cfg_get(dispatcher, dispatcher_cfg, probing_threshold)
 		= probing_threshold;
+	cfg_get(dispatcher, dispatcher_cfg, inactive_threshold)
+		= inactive_threshold;
 
 
 	if(init_data()!= 0)




More information about the sr-dev mailing list