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

Function virtual_mod_init

modules/db_virtual/db_virtual.c:372–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370
371
372int virtual_mod_init(void){
373 LM_DBG("VIRTUAL client version is %s\n","1.33");
374
375
376
377 if(!global){
378 int i,j;
379 if (init_global() || init_private_handles())
380 return -1;
381
382 //print structure
383 for(i = 0; i< global->size; i++){
384 LM_DBG("set {%.*s}\n", global->set_list[i].set_name.len,
385 global->set_list[i].set_name.s);
386 for(j=0; j< global->set_list[i].size; j++){
387 LM_DBG("url \t{%.*s}%p\n",
388 global->set_list[i].db_list[j].db_url.len,
389 global->set_list[i].db_list[j].db_url.s,
390 &global->set_list[i].db_list[j].dbf);
391 }
392 }
393
394 if(db_reconnect_with_timer){
395 if (register_timer("db_virtual-reconnect",
396 reconnect_timer, NULL, db_probe_time,
397 TIMER_FLAG_DELAY_ON_DELAY)<0) {
398 LM_ERR("failed to register keepalive timer\n");
399 }
400 }
401 }
402
403 return 0;
404}
405
406
407static void destroy(void){

Callers 2

dbase.cFile · 0.85
db_virtual_bind_apiFunction · 0.85

Calls 3

init_globalFunction · 0.85
init_private_handlesFunction · 0.85
register_timerFunction · 0.85

Tested by

no test coverage detected