diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-29 00:07:32 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-29 00:07:32 +0000 |
commit | 633b7b4f97532d6bcfe9c26a3bb3183118ce7a6e (patch) | |
tree | 37963f25a365e5913a91c0fbcf3bb98b736234aa /main/file.c | |
parent | bf1706909cfd31b51ab12d26b20e836194d0dbd8 (diff) |
Merged revisions 90142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90142 | russell | 2007-11-28 18:06:08 -0600 (Wed, 28 Nov 2007) | 4 lines
Merge a change from team/russell/chan_refcount ...
This makes ast_stopstream() thread-safe.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90143 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/file.c')
-rw-r--r-- | main/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/file.c b/main/file.c index be5c019de..bbdda4c38 100644 --- a/main/file.c +++ b/main/file.c @@ -119,6 +119,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); @@ -131,6 +133,9 @@ int ast_stopstream(struct ast_channel *tmp) ast_closestream(tmp->vstream); tmp->vstream = NULL; } + + ast_channel_unlock(tmp); + return 0; } |