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

Function init_auth

modules/aaa_diameter/app_opensips/app_opensips.c:127–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127static int init_auth(void)
128{
129 const int mysql_reconnect_val = 1;
130
131 db_conn = mysql_init(NULL);
132 mysql_options(db_conn, MYSQL_OPT_RECONNECT, &mysql_reconnect_val);
133
134 /* Connect to database */
135 if (!mysql_real_connect(db_conn, db_host,
136 db_user, db_pass, db_db, 0, NULL, 0)) {
137 fd_log_error("[AUTH] failed to connect to MySQL: %s", mysql_error(db_conn));
138 return errno;
139 } else {
140 fd_log_debug("[AUTH] connected to MySQL");
141 }
142
143 return 0;
144}
145
146static FILE *get_acc_log(void)
147{

Callers 1

os_entryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected