| 70 | } |
| 71 | |
| 72 | int init_http_db(ph_framework_t *framework_data, int index) |
| 73 | { |
| 74 | ph_db_url_t *ph_db_urls = framework_data->ph_db_urls; |
| 75 | |
| 76 | if (db_bind_mod(&ph_db_urls[index].db_url, |
| 77 | &ph_db_urls[index].http_dbf) < 0) { |
| 78 | LM_ERR("Unable to bind to a database driver\n"); |
| 79 | return -1; |
| 80 | } |
| 81 | if (connect_http_db(framework_data, index)!=0){ |
| 82 | LM_ERR("unable to connect to the database\n"); |
| 83 | return -1; |
| 84 | } |
| 85 | |
| 86 | ph_db_urls[index].http_dbf.close(*ph_db_urls[index].http_db_handle); |
| 87 | *ph_db_urls[index].http_db_handle = NULL; |
| 88 | |
| 89 | return 0; |
| 90 | } |
| 91 | |
| 92 | |
| 93 | void destroy_http_db(ph_framework_t *framework_data) |
no test coverage detected