Module: kamailio
Branch: master
Commit: fcabdc012d5490cfc740d0e0773fd88ed07c2b64
URL:
https://github.com/kamailio/kamailio/commit/fcabdc012d5490cfc740d0e0773fd88…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-18T08:49:34+02:00
dispatcher: adjustments to ds_list_exist()
- info log messages made debug
- return -2 if evaluating the fixup param fails
---
Modified: src/modules/dispatcher/dispatch.c
Modified: src/modules/dispatcher/dispatcher.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fcabdc012d5490cfc740d0e0773fd88…
Patch:
https://github.com/kamailio/kamailio/commit/fcabdc012d5490cfc740d0e0773fd88…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 483ddb418f..18b713ce02 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -1482,16 +1482,16 @@ static inline int ds_get_index(int group, int ds_list_idx,
ds_set_t **index)
int ds_list_exist(int set)
{
ds_set_t *si = NULL;
- LM_DBG("-- Looking for set %d\n", set);
+ LM_DBG("looking for destination set [%d]\n", set);
/* get the index of the set */
si = ds_avl_find(_ds_list, set);
if(si == NULL) {
- LM_INFO("destination set [%d] not found\n", set);
+ LM_DBG("destination set [%d] not found\n", set);
return -1; /* False */
}
- LM_INFO("destination set [%d] found\n", set);
+ LM_DBG("destination set [%d] found\n", set);
return 1; /* True */
}
diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c
index da5d4c8f62..0be0968ac2 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -1025,9 +1025,8 @@ static int w_ds_list_exist(struct sip_msg *msg, char *param, char
*p2)
if(fixup_get_ivalue(msg, (gparam_p)param, &set) != 0) {
LM_ERR("cannot get set id param value\n");
- return -1;
+ return -2;
}
- LM_DBG("--- Looking for dispatcher set %d\n", set);
return ds_list_exist(set);
}