aboutsummaryrefslogtreecommitdiffstats
path: root/main/utils.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-18 15:35:26 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-18 15:35:26 +0000
commit3462b9fd2154802833b224db1d4551215ff1656d (patch)
tree4b2af360f5c4e12c7b2c7e0f506f58c29856f4da /main/utils.c
parent235f1da99f71ada46f71401b995e0aa4a5651840 (diff)
This patch fixes merge_contexts_and_delete so it does not deadlock when hints are present.
Reason: when I re-engineered the merge_and_delete func to reduce its lock time, I failed to notice that the functions it calls still also do locking as before. This leads to deadlocks on dialplan reloads, when there are actually living, subscribed hints registered in the system. While the reporter come across this problem while using AEL, I might note that these deadlocks should also happen if extensions.conf were used. Here I added these routines to pbx.c: ast_add_extension_nolock add_pri_lockopt ast_add_extension2_lockopt find_context add_hint_nolock All of the above routines are static and restricted to be used only within pbx.c, and more specifically within the merge_contexts_and_delete routine. They are pretty much the same as their counterparts except they don't lock contexts or hints. Most of them now do the real work of their name-alike, with optional locking via extra arguments, and are called by their name-alike. The goal was to have the original functions so they would behave exactly as before. Both PJ and I tested these fixes, and the deadlocking problem is no longer encountered. (closes issue #14357) Reported by: pj Patches: 14357.diff uploaded by murf (license 17) Tested by: pj, murf git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176943 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/utils.c')
0 files changed, 0 insertions, 0 deletions