mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Fix building CDR and CEL SQLite3 modules.
They added a sqlite3_log() function which was conflicting with our function names. (closes issue #17017) Reported by: alephlg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -219,7 +219,7 @@ static void free_config(int reload)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sqlite3_log(struct ast_cdr *cdr)
|
static int write_cdr(struct ast_cdr *cdr)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
@@ -329,7 +329,7 @@ static int load_module(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res = ast_cdr_register(name, desc, sqlite3_log);
|
res = ast_cdr_register(name, desc, write_cdr);
|
||||||
if (res) {
|
if (res) {
|
||||||
ast_log(LOG_ERROR, "Unable to register custom SQLite3 CDR handling\n");
|
ast_log(LOG_ERROR, "Unable to register custom SQLite3 CDR handling\n");
|
||||||
free_config(0);
|
free_config(0);
|
||||||
|
@@ -226,7 +226,7 @@ static void free_config(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sqlite3_log(const struct ast_event *event, void *userdata)
|
static void write_cel(const struct ast_event *event, void *userdata)
|
||||||
{
|
{
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
char *sql = NULL;
|
char *sql = NULL;
|
||||||
@@ -336,7 +336,7 @@ static int load_module(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
event_sub = ast_event_subscribe(AST_EVENT_CEL, sqlite3_log, "CEL sqlite3 custom backend", NULL, AST_EVENT_IE_END);
|
event_sub = ast_event_subscribe(AST_EVENT_CEL, write_cel, "CEL sqlite3 custom backend", NULL, AST_EVENT_IE_END);
|
||||||
if (!event_sub) {
|
if (!event_sub) {
|
||||||
ast_log(LOG_ERROR, "Unable to register custom SQLite3 CEL handling\n");
|
ast_log(LOG_ERROR, "Unable to register custom SQLite3 CEL handling\n");
|
||||||
free_config();
|
free_config();
|
||||||
|
Reference in New Issue
Block a user