aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-28 17:21:24 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-28 17:21:24 +0000
commitb58476cddcb51ea5b80a13f5f375271104f1afa1 (patch)
tree71630b456aae80ecb9da5fe4c0b4fce68bbada92 /include/asterisk
parente921c9458081afd2c7ac890158d179da6c866255 (diff)
Merged revisions 100581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100581 | russell | 2008-01-28 11:15:41 -0600 (Mon, 28 Jan 2008) | 9 lines Make some deadlock related fixes. These bugs were discovered and reported internally at Digium by Steve Pitts. - Fix up chan_local to ensure that the channel lock is held before the local pvt lock. - Don't hold the channel lock when executing the timing function, as it can cause a deadlock when using chan_local. This actually changes the code back to be how it was before the change for issue #10765. But, I added some other locking that I think will prevent the problem reported there, as well. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100582 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/channel.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 58fec7a46..c1c9cc211 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -177,7 +177,10 @@ typedef unsigned long long ast_group_t;
struct ast_generator {
void *(*alloc)(struct ast_channel *chan, void *params);
void (*release)(struct ast_channel *chan, void *data);
- /*! This function gets called with the channel locked */
+ /*! This function gets called with the channel unlocked, but is called in
+ * the context of the channel thread so we know the channel is not going
+ * to disappear. This callback is responsible for locking the channel as
+ * necessary. */
int (*generate)(struct ast_channel *chan, void *data, int len, int samples);
/*! This gets called when DTMF_END frames are read from the channel */
void (*digit)(struct ast_channel *chan, char digit);