Module: kamailio
Branch: master
Commit: 39d98127268afdfa841e7c80ce26185fe8d0673c
URL:
https://github.com/kamailio/kamailio/commit/39d98127268afdfa841e7c80ce26185…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: Richard Fuchs <rfuchs(a)sipwise.com>
Date: 2018-01-31T12:10:16-05:00
rtpegnine: honour the 'setid_default' variable in all instances
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/39d98127268afdfa841e7c80ce26185…
Patch:
https://github.com/kamailio/kamailio/commit/39d98127268afdfa841e7c80ce26185…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 6ad0c16d7e..f9e630f60e 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -734,14 +734,6 @@ struct rtpp_set *get_rtpp_set(unsigned int set_id)
unsigned int my_current_id = 0;
int new_list;
-#if DEFAULT_RTPP_SET_ID > 0
- if (set_id < DEFAULT_RTPP_SET_ID )
- {
- LM_ERR(" invalid rtpproxy set value [%u]\n", set_id);
- return NULL;
- }
-#endif
-
my_current_id = set_id;
/*search for the current_id*/
lock_get(rtpp_set_list->rset_head_lock);
@@ -798,7 +790,7 @@ struct rtpp_set *get_rtpp_set(unsigned int set_id)
rtpp_set_list->rset_last = rtpp_list;
rtpp_set_count++;
- if(my_current_id == DEFAULT_RTPP_SET_ID){
+ if(my_current_id == setid_default){
default_rtpp_set = rtpp_list;
}
}
@@ -1010,7 +1002,7 @@ static int rtpengine_add_rtpengine_set(char * rtp_proxies, unsigned
int weight,
rtp_proxies+=2;
}else{
rtp_proxies = p;
- my_current_id = DEFAULT_RTPP_SET_ID;
+ my_current_id = setid_default;
}
for(;*rtp_proxies && isspace(*rtp_proxies);rtp_proxies++);
@@ -1490,10 +1482,6 @@ mod_init(void)
}
}
- /* any rtpproxy configured? */
- if (rtpp_set_list)
- default_rtpp_set = select_rtpp_set(DEFAULT_RTPP_SET_ID);
-
if (rtp_inst_pv_param.s) {
rtp_inst_pv_param.len = strlen(rtp_inst_pv_param.s);
rtp_inst_pvar = pv_cache_get(&rtp_inst_pv_param);