diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-21 23:28:11 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-21 23:28:11 +0000 |
commit | 38e516d9a56709db0aa4d10f24822cbc9a94dabe (patch) | |
tree | 7f2a3b162ec94e5a02013d93dc67e03b1ade7f64 /main/pbx.c | |
parent | 63c9ee110058ea8482fdaccb55dcb325a701b72a (diff) |
Merged revisions 169869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r169869 | file | 2009-01-21 19:25:27 -0400 (Wed, 21 Jan 2009) | 11 lines
Merged revisions 169867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r169867 | file | 2009-01-21 19:20:47 -0400 (Wed, 21 Jan 2009) | 4 lines
Read lock the contexts to maintain the locking order when we are notified that the state of a device has changed.
(closes issue #13839)
Reported by: mcallist
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@169871 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index e944aa174..a9d011e13 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3302,6 +3302,8 @@ static int handle_statechange(void *datap) { struct ast_hint *hint; struct statechange *sc = datap; + + ast_rdlock_contexts(); AST_RWLIST_RDLOCK(&hints); AST_RWLIST_TRAVERSE(&hints, hint, list) { @@ -3340,6 +3342,7 @@ static int handle_statechange(void *datap) hint->laststate = state; /* record we saw the change */ } AST_RWLIST_UNLOCK(&hints); + ast_unlock_contexts(); ast_free(sc); return 0; } |