|
|
|
@ -492,7 +492,10 @@ static int my_connect_db(struct ast_config *cfg)
|
|
|
|
ast_log(LOG_ERROR, "Failed to connect to mysql database %s on %s.\n", ast_str_buffer(dbname), ast_str_buffer(hostname));
|
|
|
|
ast_log(LOG_ERROR, "Failed to connect to mysql database %s on %s.\n", ast_str_buffer(dbname), ast_str_buffer(hostname));
|
|
|
|
connected = 0;
|
|
|
|
connected = 0;
|
|
|
|
records = 0;
|
|
|
|
records = 0;
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
return AST_MODULE_LOAD_SUCCESS; /* May be reconnected later */
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ast_debug(1, "Successfully connected to MySQL database.\n");
|
|
|
|
ast_debug(1, "Successfully connected to MySQL database.\n");
|
|
|
|
connected = 1;
|
|
|
|
connected = 1;
|
|
|
|
records = 0;
|
|
|
|
records = 0;
|
|
|
|
@ -575,7 +578,7 @@ static int my_connect_db(struct ast_config *cfg)
|
|
|
|
AST_LIST_INSERT_TAIL(&columns, entry, list);
|
|
|
|
AST_LIST_INSERT_TAIL(&columns, entry, list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mysql_free_result(result);
|
|
|
|
mysql_free_result(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
return AST_MODULE_LOAD_SUCCESS;
|
|
|
|
return AST_MODULE_LOAD_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|