MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / lookup_rtpe_node

Function lookup_rtpe_node

modules/rtpengine/rtpengine.c:2006–2027  ·  view source on GitHub ↗

Returns the first matching node in set */

Source from the content-addressed store, hash-verified

2004
2005/* Returns the first matching node in set */
2006static struct rtpe_node *lookup_rtpe_node(struct rtpe_set * rtpe_list, str *rtpe_url)
2007{
2008 struct rtpe_node * crt_rtpe;
2009
2010 if (rtpe_list == NULL)
2011 return NULL;
2012
2013 if (rtpe_url->len==0 || !rtpe_url->s)
2014 return NULL;
2015
2016 for(crt_rtpe = rtpe_list->rn_first; crt_rtpe != NULL;
2017 crt_rtpe = crt_rtpe->rn_next){
2018 if(crt_rtpe->rn_url.len == rtpe_url->len){
2019 if(strncmp(crt_rtpe->rn_url.s, rtpe_url->s, rtpe_url->len) == 0){
2020 return crt_rtpe;
2021 }
2022 }
2023 }
2024
2025 /* No match */
2026 return NULL;
2027}
2028
2029/* finds the node based upon URL and frees it from set */
2030static void free_rtpe_node(struct rtpe_set *list, str *rtpe_url)

Callers 2

add_rtpengine_socksFunction · 0.85
rtpe_function_callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected