* Initialize children */
| 561 | * Initialize children |
| 562 | */ |
| 563 | static int child_init(int rank) |
| 564 | { |
| 565 | struct cachedb_url *it; |
| 566 | cachedb_con *con; |
| 567 | |
| 568 | for (it = sql_script_urls;it;it=it->next) { |
| 569 | LM_DBG("iterating through conns - [%s]\n", db_url_escape(&it->url)); |
| 570 | con = dbcache_init(&it->url); |
| 571 | if (con == NULL) { |
| 572 | LM_ERR("failed to open connection\n"); |
| 573 | return -1; |
| 574 | } |
| 575 | if (cachedb_put_connection(&cache_mod_name,con) < 0) { |
| 576 | LM_ERR("failed to insert connection\n"); |
| 577 | return -1; |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | cachedb_free_url(sql_script_urls); |
| 582 | |
| 583 | return 0; |
| 584 | } |
| 585 | |
| 586 | /* |
| 587 | * destroy function |
nothing calls this directly
no test coverage detected