! \brief * Module initialization function */
| 378 | * Module initialization function |
| 379 | */ |
| 380 | static int mod_init(void) |
| 381 | { |
| 382 | LM_DBG("initializing\n"); |
| 383 | |
| 384 | if (ul_init_globals() != 0) { |
| 385 | LM_ERR("failed to init globals\n"); |
| 386 | return -1; |
| 387 | } |
| 388 | |
| 389 | if (ul_check_config() != 0) { |
| 390 | LM_ERR("bad runtime config - exiting...\n"); |
| 391 | return -1; |
| 392 | } |
| 393 | |
| 394 | if (ul_check_db() != 0) { |
| 395 | LM_ERR("DB support check failed\n"); |
| 396 | return -1; |
| 397 | } |
| 398 | |
| 399 | if (ul_init_timers() != 0) { |
| 400 | LM_ERR("failed to init timers\n"); |
| 401 | return -1; |
| 402 | } |
| 403 | |
| 404 | if (ul_init_cbs() < 0) { |
| 405 | LM_ERR("usrloc/callbacks initialization failed\n"); |
| 406 | return -1; |
| 407 | } |
| 408 | |
| 409 | if (ul_event_init() < 0) { |
| 410 | LM_ERR("cannot initialize USRLOC events\n"); |
| 411 | return -1; |
| 412 | } |
| 413 | |
| 414 | if (ul_init_cluster() < 0) { |
| 415 | LM_ERR("failed to init clustering support\n"); |
| 416 | return -1; |
| 417 | } |
| 418 | |
| 419 | return 0; |
| 420 | } |
| 421 | |
| 422 | |
| 423 | static void ul_rpc_data_load(int sender_id, void *_) |
nothing calls this directly
no test coverage detected