mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merge a change from team/russell/chan_refcount ...
This makes ast_stopstream() thread-safe. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -136,6 +136,8 @@ int ast_format_unregister(const char *name)
|
||||
|
||||
int ast_stopstream(struct ast_channel *tmp)
|
||||
{
|
||||
ast_channel_lock(tmp);
|
||||
|
||||
/* Stop a running stream if there is one */
|
||||
if (tmp->stream) {
|
||||
ast_closestream(tmp->stream);
|
||||
@@ -148,6 +150,9 @@ int ast_stopstream(struct ast_channel *tmp)
|
||||
ast_closestream(tmp->vstream);
|
||||
tmp->vstream = NULL;
|
||||
}
|
||||
|
||||
ast_channel_unlock(tmp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user