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

Function get_resource_by_name

modules/load_balancer/lb_data.c:70–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69
70struct lb_resource *get_resource_by_name(struct lb_data *data, str *name)
71{
72 struct lb_resource *res;
73
74 for( res=data->resources ; res ; res=res->next ) {
75 if (name->len==res->name.len &&
76 memcmp( name->s, res->name.s, name->len)==0) {
77 LM_DBG("found resource [%.*s]\n",name->len,name->s);
78 return res;
79 }
80 }
81
82 return NULL;
83}
84
85
86static struct lb_resource *add_lb_resource(struct lb_data *data, str *name)

Callers 3

add_lb_dsturiFunction · 0.85
lb_routeFunction · 0.85
do_lb_resetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected