* Initialize children */
| 526 | * Initialize children |
| 527 | */ |
| 528 | static int child_init(int rank) |
| 529 | { |
| 530 | LM_DBG("child [%d] pid [%d]\n", rank, getpid()); |
| 531 | if (rls_dbf.init==0) |
| 532 | { |
| 533 | LM_CRIT("database not bound\n"); |
| 534 | return -1; |
| 535 | } |
| 536 | rls_db = rls_dbf.init(&db_url); |
| 537 | if (!rls_db) |
| 538 | { |
| 539 | LM_ERR("child %d: Error while connecting database\n", |
| 540 | rank); |
| 541 | return -1; |
| 542 | } |
| 543 | |
| 544 | LM_DBG("child %d: Database connection opened successfully\n", rank); |
| 545 | |
| 546 | pid= my_pid(); |
| 547 | return 0; |
| 548 | } |
| 549 | |
| 550 | /* |
| 551 | * destroy function |