| 2280 | |
| 2281 | |
| 2282 | static 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 | |
| 2306 | static int dr_exit(void) |
nothing calls this directly
no test coverage detected