git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-11-16 18:11:28 +00:00
parent 544a2ecbd3
commit 60ebbb5744
2 changed files with 7 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
2005-11-16 Kevin P. Fleming <kpfleming@limerick.digium.com> 2005-11-16 Kevin P. Fleming <kpfleming@limerick.digium.com>
* channel.c (ast_queue_hangup): ensure that the channel lock is held before changing its fields... (issue #5770)
* res/res_musiconhold.c: don't spit out incorrect log messages (and leak memory) during reload (issue #5766) * res/res_musiconhold.c: don't spit out incorrect log messages (and leak memory) during reload (issue #5766)
* channels/chan_sip.c (process_sdp): don't pass video codec number into ast_getformatname(), it is not valid input for that function (issue #5764) * channels/chan_sip.c (process_sdp): don't pass video codec number into ast_getformatname(), it is not valid input for that function (issue #5764)

View File

@@ -667,7 +667,11 @@ int ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin)
int ast_queue_hangup(struct ast_channel *chan) int ast_queue_hangup(struct ast_channel *chan)
{ {
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP }; struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
chan->_softhangup |= AST_SOFTHANGUP_DEV; /* Yeah, let's not change a lock-critical value without locking */
if (!ast_mutex_trylock(&chan->lock)) {
chan->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&chan->lock);
}
return ast_queue_frame(chan, &f); return ast_queue_frame(chan, &f);
} }