Module init function */
| 248 | |
| 249 | /** Module init function */ |
| 250 | static int mod_init(void) |
| 251 | { |
| 252 | unsigned int _timer; |
| 253 | int *param; |
| 254 | |
| 255 | if(load_uac_auth_api(&uac_auth_api)<0){ |
| 256 | LM_ERR("Failed to load uac_auth api\n"); |
| 257 | return -1; |
| 258 | } |
| 259 | |
| 260 | /* load all TM stuff */ |
| 261 | if(load_tm_api(&tmb)==-1) { |
| 262 | LM_ERR("can't load tm functions\n"); |
| 263 | return -1; |
| 264 | } |
| 265 | |
| 266 | if (enable_clustering && ureg_init_cluster( handle_shtag_change )<0) { |
| 267 | LM_ERR("failed to initialized clustering support\n"); |
| 268 | return -1; |
| 269 | } |
| 270 | |
| 271 | if(default_expires<15){ |
| 272 | LM_ERR("default_expires to short: [%d]<15\n", default_expires); |
| 273 | return -1; |
| 274 | } |
| 275 | if(timer_interval<10){ |
| 276 | LM_ERR("timer_interval to short: [%d]<10\n", timer_interval); |
| 277 | return -1; |
| 278 | } |
| 279 | if(reg_hsize<1 || reg_hsize>20) { |
| 280 | LM_ERR("Wrong hash size: 20<[%d]<1\n", reg_hsize); |
| 281 | } |
| 282 | reg_hsize = 1<<reg_hsize; |
| 283 | |
| 284 | if(init_reg_htable()<0) { |
| 285 | LM_ERR("Failed to initialize registrant hash table\n"); |
| 286 | return -1; |
| 287 | } |
| 288 | |
| 289 | uac_reg_srg = sr_register_group(CHAR_INT("uac_registrant"), |
| 290 | 0 /*not public*/); |
| 291 | if (uac_reg_srg==NULL) { |
| 292 | LM_ERR("failed to create uac_registrant group for status reports\n"); |
| 293 | return -1; |
| 294 | } |
| 295 | |
| 296 | reg_table_name.len = strlen(reg_table_name.s); |
| 297 | registrar_column.len = strlen(registrar_column.s); |
| 298 | proxy_column.len = strlen(proxy_column.s); |
| 299 | aor_column.len = strlen(aor_column.s); |
| 300 | third_party_registrant_column.len = |
| 301 | strlen(third_party_registrant_column.s); |
| 302 | username_column.len = strlen(username_column.s); |
| 303 | password_column.len = strlen(password_column.s); |
| 304 | binding_URI_column.len = strlen(binding_URI_column.s); |
| 305 | binding_params_column.len = strlen(binding_params_column.s); |
| 306 | expiry_column.len = strlen(expiry_column.s); |
| 307 | forced_socket_column.len = strlen(forced_socket_column.s); |
nothing calls this directly
no test coverage detected