| 122 | } |
| 123 | |
| 124 | static int child_init(int rank) |
| 125 | { |
| 126 | struct cachedb_url *it; |
| 127 | cachedb_con *con; |
| 128 | |
| 129 | for (it = couchbase_script_urls;it;it=it->next) { |
| 130 | LM_DBG("iterating through couchbase conns - [%.*s]\n",it->url.len,it->url.s); |
| 131 | con = couchbase_init(&it->url); |
| 132 | if (con == NULL) { |
| 133 | LM_ERR("failed to open connection\n"); |
| 134 | return -1; |
| 135 | } |
| 136 | if (cachedb_put_connection(&cache_mod_name,con) < 0) { |
| 137 | LM_ERR("failed to insert connection\n"); |
| 138 | return -1; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | cachedb_free_url(couchbase_script_urls); |
| 143 | return 0; |
| 144 | } |
| 145 | |
| 146 | /* |
| 147 | * destroy function |
nothing calls this directly
no test coverage detected