Skip to content
Snippets Groups Projects
Commit fc99ac8c authored by Sean Bright's avatar Sean Bright
Browse files

db: Initialize condition primitive before use

The db_init() function ultimately calls db_sync() which signals the
condition before it is initialized.

Change-Id: Id4a4e025b637bc4ac7d90557fcb71d56598892ab
parent 7c4fc2e3
No related branches found
No related tags found
No related merge requests found
......@@ -1081,11 +1081,12 @@ static void astdb_atexit(void)
int astdb_init(void)
{
ast_cond_init(&dbcond, NULL);
if (db_init()) {
return -1;
}
ast_cond_init(&dbcond, NULL);
if (ast_pthread_create_background(&syncthread, NULL, db_sync_thread, NULL)) {
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment