mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@100581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -142,7 +142,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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user