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

Function new_sroutes_holder

route.c:102–121  ·  view source on GitHub ↗

! * \brief Allocates and initializes a new routing list holder */

Source from the content-addressed store, hash-verified

100 * \brief Allocates and initializes a new routing list holder
101 */
102struct os_script_routes* new_sroutes_holder( int inc_ver )
103{
104 static unsigned int sr_version = 1;
105 struct os_script_routes *sr;
106
107 sr = (struct os_script_routes *) pkg_malloc
108 ( sizeof(struct os_script_routes) );
109 if ( sr==NULL) {
110 LM_ERR("failed to allocate table for script routes\n");
111 return NULL;
112 }
113 memset( sr, 0, sizeof(struct os_script_routes) );
114
115 sr->request[DEFAULT_RT].name = "0";
116 sr->onreply[DEFAULT_RT].name = "0";
117
118 sr->version = inc_ver ? ++sr_version : sr_version ;
119
120 return sr;
121}
122
123
124/*!

Callers 3

routes_reload_per_procFunction · 0.85
reload_routing_scriptFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected