]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 109763 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Tue, 18 Mar 2008 22:36:02 +0000 (22:36 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 18 Mar 2008 22:36:02 +0000 (22:36 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109763 | russell | 2008-03-18 17:34:42 -0500 (Tue, 18 Mar 2008) | 3 lines

Fix one place where the chanspy datastore isn't removed from a channel.
(issue #12243, reported by atis, patch by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109764 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_chanspy.c

index ab056e0aa0d6775ed8ac34a80b1669fb95aff848..f37de3889c459fd9cdd45888ac5d48ddf8b9d9ba 100644 (file)
@@ -714,8 +714,10 @@ static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
                                        res = ast_streamfile(chan, peer_name, chan->language);
                                        if (!res)
                                                res = ast_waitstream(chan, "");
-                                       if (res)
+                                       if (res) {
+                                               chanspy_ds_free(peer_chanspy_ds);
                                                break;
+                                       }
                                } else
                                        res = ast_say_character_str(chan, peer_name, "", chan->language);
                                if ((num = atoi(ptr)))
@@ -731,6 +733,7 @@ static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
                                goto exit;
                        } else if (res == -2) {
                                res = 0;
+                               chanspy_ds_free(peer_chanspy_ds);
                                goto exit;
                        } else if (res > 1 && spec) {
                                struct ast_channel *next;