aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn/isdn_lib_intern.h
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-15 21:34:28 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-15 21:34:28 +0000
commit6b63a682c665f510723f5dfcaf2f6b44b1b9328a (patch)
treeeb8cfe6369398ab67d1870934edc5aaac32a47ac /channels/misdn/isdn_lib_intern.h
parentcc47cb810ac8e12ee572b4900b305457f14ca06a (diff)
Merged revisions 206707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r206707 | rmudgett | 2009-07-15 16:14:41 -0500 (Wed, 15 Jul 2009) | 33 lines Merged revisions 206706 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r206706 | rmudgett | 2009-07-15 15:44:55 -0500 (Wed, 15 Jul 2009) | 26 lines Merged revision 206700 from https://origsvn.digium.com/svn/asterisk/be/branches/C.2-... .......... Fixed chan_misdn crash because mISDNuser library is not thread safe. With Asterisk the mISDNuser library is driven by two threads concurrently: 1. channels/misdn/isdn_lib.c::manager_event_handler() 2. channels/misdn/isdn_lib.c::misdn_lib_isdn_event_catcher() Calls into the library are done concurrently and recursively from isdn_lib.c. Both threads can fiddle with the master/child layer3_proc_t lists. One thread may traverse the list when the other interrupts it and then removes the list element which the first thread was currently handling. This is exactly what caused the crash. About 60 calls were needed to a Gigaset CX475 before it occurred once. This patch adds locking when calling into the mISDNuser library. This also fixes some cb_log calls with wrong port parameter. JIRA ABE-1913 Patches: misdn-locking.patch (Modified with mostly cosmetic changes) .......... ................ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@206762 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn/isdn_lib_intern.h')
-rw-r--r--channels/misdn/isdn_lib_intern.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/misdn/isdn_lib_intern.h b/channels/misdn/isdn_lib_intern.h
index 725ef963f..0a0804caa 100644
--- a/channels/misdn/isdn_lib_intern.h
+++ b/channels/misdn/isdn_lib_intern.h
@@ -57,6 +57,7 @@ struct misdn_stack {
/** is first element because &nst equals &mISDNlist **/
net_stack_t nst;
manager_t mgr;
+ pthread_mutex_t nstlock;
int d_stid;