[Asterisk-code-review] db: Initialize condition primitive before use (asterisk[17])
George Joseph
asteriskteam at digium.com
Tue Dec 31 08:37:45 CST 2019
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13522 )
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(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/main/db.c b/main/db.c
index e74c46b..d4479f4 100644
--- a/main/db.c
+++ b/main/db.c
@@ -1081,11 +1081,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/+/13522
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: Id4a4e025b637bc4ac7d90557fcb71d56598892ab
Gerrit-Change-Number: 13522
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191231/99c293de/attachment.html>
More information about the asterisk-code-review
mailing list