* init module function */
| 100 | * init module function |
| 101 | */ |
| 102 | static 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 | |
| 121 | static int child_init(int rank) |
| 122 | { |
nothing calls this directly
no test coverage detected