[asterisk-commits] qwell: branch group/ast_storage r108709 - in /team/group/ast_storage: ./ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Mar 14 10:23:36 CDT 2008
Author: qwell
Date: Fri Mar 14 10:23:35 2008
New Revision: 108709
URL: http://svn.digium.com/view/asterisk?view=rev&rev=108709
Log:
Merged revisions 108683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r108683 | qwell | 2008-03-14 09:32:55 -0500 (Fri, 14 Mar 2008) | 12 lines
Merged revisions 108682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r108682 | qwell | 2008-03-14 09:29:05 -0500 (Fri, 14 Mar 2008) | 4 lines
Fix a potential segfault if chan (or chan->music_state) is NULL.
Closes issue #12210, credit to edantie for pointing this out.
........
................
Modified:
team/group/ast_storage/ (props changed)
team/group/ast_storage/res/res_musiconhold.c
Propchange: team/group/ast_storage/
------------------------------------------------------------------------------
automerge = sure
Propchange: team/group/ast_storage/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/group/ast_storage/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Mar 14 10:23:35 2008
@@ -1,1 +1,1 @@
-/trunk:1-108644
+/trunk:1-108698
Modified: team/group/ast_storage/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/res/res_musiconhold.c?view=diff&rev=108709&r1=108708&r2=108709
==============================================================================
--- team/group/ast_storage/res/res_musiconhold.c (original)
+++ team/group/ast_storage/res/res_musiconhold.c Fri Mar 14 10:23:35 2008
@@ -210,22 +210,25 @@
static void moh_files_release(struct ast_channel *chan, void *data)
{
- struct moh_files_state *state = chan->music_state;
-
- if (chan && state) {
- if (chan->stream) {
- ast_closestream(chan->stream);
- chan->stream = NULL;
- }
- ast_verb(3, "Stopped music on hold on %s\n", chan->name);
-
- if (state->origwfmt && ast_set_write_format(chan, state->origwfmt)) {
- ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", chan->name, state->origwfmt);
- }
- state->save_pos = state->pos + 1;
- }
- if (ast_atomic_dec_and_test(&state->class->inuse) && state->class->delete)
- ast_moh_destroy_one(state->class);
+ struct moh_files_state *state;
+
+ if (chan) {
+ if ((state = chan->music_state)) {
+ if (chan->stream) {
+ ast_closestream(chan->stream);
+ chan->stream = NULL;
+ }
+ ast_verb(3, "Stopped music on hold on %s\n", chan->name);
+
+ if (state->origwfmt && ast_set_write_format(chan, state->origwfmt)) {
+ ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", chan->name, state->origwfmt);
+ }
+ state->save_pos = state->pos + 1;
+
+ if (ast_atomic_dec_and_test(&state->class->inuse) && state->class->delete)
+ ast_moh_destroy_one(state->class);
+ }
+ }
}
More information about the asterisk-commits
mailing list