Module: kamailio
Branch: master
Commit: 27186f1d951c89c033bb02c6b446a630e1fce5d3
URL:
https://github.com/kamailio/kamailio/commit/27186f1d951c89c033bb02c6b446a63…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-18T08:24:15+02:00
core: locking - rec lock init condition fixed
---
Modified: src/core/locking.c
---
Diff:
https://github.com/kamailio/kamailio/commit/27186f1d951c89c033bb02c6b446a63…
Patch:
https://github.com/kamailio/kamailio/commit/27186f1d951c89c033bb02c6b446a63…
---
diff --git a/src/core/locking.c b/src/core/locking.c
index a670f7e881..ebe4a9ab3c 100644
--- a/src/core/locking.c
+++ b/src/core/locking.c
@@ -39,7 +39,7 @@ rec_lock_t* rec_lock_alloc()
rec_lock_t* rec_lock_init(rec_lock_t* rlock)
{
memset(rlock, 0, sizeof(rec_lock_t));
- if(lock_init(&rlock->lock)<0) {
+ if(lock_init(&rlock->lock)==0) {
return NULL;
}
return rlock;