[Asterisk-code-review] db: Initialize condition primitive before use (asterisk[13])
Sean Bright
asteriskteam at digium.com
Fri Dec 27 17:31:13 CST 2019
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13504 )
Change subject: db: Initialize condition primitive before use
......................................................................
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
---
M main/db.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/04/13504/1
diff --git a/main/db.c b/main/db.c
index 4d1b372..193bd2e 100644
--- a/main/db.c
+++ b/main/db.c
@@ -1083,11 +1083,12 @@
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;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13504
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Id4a4e025b637bc4ac7d90557fcb71d56598892ab
Gerrit-Change-Number: 13504
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191227/85f6c26d/attachment.html>
More information about the asterisk-code-review
mailing list