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

Function dr_child_init

modules/drouting/drouting.c:2282–2303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2280
2281
2282static int dr_child_init(int rank)
2283{
2284 struct head_db *db = head_db_start;
2285
2286 LM_DBG("Child initialization on rank %d \n",rank);
2287
2288 for (db = head_db_start; db; db = db->next) {
2289 if (db_connect_head(db) < 0) {
2290 LM_ERR("failed to create DB connection\n");
2291 return -1;
2292 }
2293 }
2294
2295 /* if child 1, send a job for itself to run the data loading after
2296 * the init sequance is done */
2297 if ( (rank==1) && ipc_send_rpc( process_no, rpc_dr_reload_data, NULL)<0) {
2298 LM_CRIT("failed to RPC the data loading\n");
2299 return -1;
2300 }
2301
2302 return 0;
2303}
2304
2305
2306static int dr_exit(void)

Callers

nothing calls this directly

Calls 2

ipc_send_rpcFunction · 0.85
db_connect_headFunction · 0.70

Tested by

no test coverage detected