ソースを参照

dispatcher: adjustments to ds_list_exist()

- info log messages made debug
- return -2 if evaluating the fixup param fails
Daniel-Constantin Mierla 5 年 前
コミット
fcabdc012d
2 ファイル変更4 行追加5 行削除
  1. 3 3
      src/modules/dispatcher/dispatch.c
  2. 1 2
      src/modules/dispatcher/dispatcher.c

+ 3 - 3
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 */
 }
 

+ 1 - 2
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);
 }