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

Function mod_init

modules/dns_cache/dns_cache.c:102–119  ·  view source on GitHub ↗

* init module function */

Source from the content-addressed store, hash-verified

100 * init module function
101 */
102static int mod_init(void)
103{
104 LM_NOTICE("initializing module dns_cache ...\n");
105
106 if (cachedb_url.s == NULL) {
107 LM_ERR("no cachedb_url set !\n");
108 return -1;
109 } else {
110 cachedb_url.len = strlen(cachedb_url.s);
111 LM_DBG("using CacheDB URL: %s\n", db_url_escape(&cachedb_url));
112 }
113
114 /* set pointers that resolver will use for caching */
115 dnscache_fetch_func=get_dnscache_value;
116 dnscache_put_func=put_dnscache_value;
117
118 return 0;
119}
120
121static int child_init(int rank)
122{

Callers

nothing calls this directly

Calls 1

db_url_escapeFunction · 0.85

Tested by

no test coverage detected