MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / init_http_db

Function init_http_db

modules/pi_http/http_db_handler.c:72–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72int 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
93void destroy_http_db(ph_framework_t *framework_data)

Callers 1

mod_initFunction · 0.85

Calls 2

db_bind_modFunction · 0.85
connect_http_dbFunction · 0.85

Tested by

no test coverage detected