| 247 | } |
| 248 | |
| 249 | static int child_init(int rank) |
| 250 | { |
| 251 | LM_DBG("initializing cachedb_dynamodb child ...\n"); |
| 252 | |
| 253 | cachedb_con *con; |
| 254 | struct cachedb_url *it; |
| 255 | |
| 256 | for (it = dynamo_script_urls;it;it=it->next) { |
| 257 | LM_DBG("iterating through conns - [%s]\n", db_url_escape(&it->url)); |
| 258 | con = dynamodb_init(&it->url); |
| 259 | if (con == NULL) { |
| 260 | LM_ERR("failed to open connection\n"); |
| 261 | return -1; |
| 262 | } |
| 263 | if (cachedb_put_connection(&cache_mod_name, con) < 0) { |
| 264 | LM_ERR("failed to insert connection\n"); |
| 265 | return -1; |
| 266 | } |
| 267 | |
| 268 | } |
| 269 | |
| 270 | cachedb_free_url(dynamo_script_urls); |
| 271 | return 0; |
| 272 | } |
| 273 | |
| 274 | /* |
| 275 | * destroy function |
nothing calls this directly
no test coverage detected