| 119 | } |
| 120 | |
| 121 | static int child_init(int rank) |
| 122 | { |
| 123 | if (cachedb_bind_mod(&cachedb_url, &cdbf) < 0) { |
| 124 | LM_ERR("cannot bind functions for db_url %s\n", |
| 125 | db_url_escape(&cachedb_url)); |
| 126 | return -1; |
| 127 | } |
| 128 | |
| 129 | if (!CACHEDB_CAPABILITY(&cdbf, |
| 130 | CACHEDB_CAP_GET|CACHEDB_CAP_SET)) { |
| 131 | LM_ERR("not enough capabilities\n"); |
| 132 | return -1; |
| 133 | } |
| 134 | |
| 135 | cdbc = cdbf.init(&cachedb_url); |
| 136 | if (!cdbc) { |
| 137 | LM_ERR("cannot connect to db_url %s\n", db_url_escape(&cachedb_url)); |
| 138 | return -1; |
| 139 | } |
| 140 | |
| 141 | return 0; |
| 142 | } |
| 143 | |
| 144 | /* |
| 145 | * destroy function |
nothing calls this directly
no test coverage detected