]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 376916,376920 via svnmerge from
authorAutomerge script <automerge@asterisk.org>
Fri, 30 Nov 2012 17:26:20 +0000 (17:26 +0000)
committerAutomerge script <automerge@asterisk.org>
Fri, 30 Nov 2012 17:26:20 +0000 (17:26 +0000)
file:///srv/subversion/repos/asterisk/branches/10

................
  r376916 | mmichelson | 2012-11-30 10:23:46 -0600 (Fri, 30 Nov 2012) | 23 lines

  Fix potential crashes during SIP attended transfers.

  The principal behind this patch is simple. During a transfer,
  we manipulate channels that are owned by a separate thread than
  the one we currently are running in, so it makes sense that we
  need to grab a reference to the channels so that they cannot
  disappear out from under us.

  In the wild, crashes were sometimes seen when the transferring
  party would hang up the call before the transfer target answered
  the call. The most common place to see the crash occur was when
  attempting to send a connected line update to the transferer
  channel.

  (closes issue ASTERISK-20226)
  Reported by Jared Smith
  Patches:
   ASTERISK-20226.patch uploaded by Mark Michelson (License #5049)
  Tested by: Jared Smith
  ........

  Merged revisions 376901 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r376920 | seanbright | 2012-11-30 11:06:21 -0600 (Fri, 30 Nov 2012) | 5 lines

  Minor spelling fix to the VOLUME documentation.
  ........

  Merged revisions 376919 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376948 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
funcs/func_volume.c

index be07d4697314c2ec6eb102c09e5f376edde5c0f0..f4491815990ce2359a4ac85612cbdf653c101efe 100644 (file)
@@ -24520,8 +24520,11 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual *
        }
 
        /* We have a channel, find the bridge */
-       target.chan1 = targetcall_pvt->owner;                           /* Transferer to Asterisk */
+       target.chan1 = ast_channel_ref(targetcall_pvt->owner);                          /* Transferer to Asterisk */
        target.chan2 = ast_bridged_channel(targetcall_pvt->owner);      /* Asterisk to target */
+       if (target.chan2) {
+               ast_channel_ref(target.chan2);
+       }
 
        if (!target.chan2 || !(target.chan2->_state == AST_STATE_UP || target.chan2->_state == AST_STATE_RINGING) ) {
                /* Wrong state of new channel */
@@ -24660,6 +24663,10 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual *
        /* at this point if the transfer is successful only the transferer pvt should be locked. */
        ast_party_connected_line_free(&connected_to_target);
        ast_party_connected_line_free(&connected_to_transferee);
+       ast_channel_unref(target.chan1);
+       if (target.chan2) {
+               ast_channel_unref(target.chan2);
+       }
        if (targetcall_pvt)
                ao2_t_ref(targetcall_pvt, -1, "drop targetcall_pvt");
        return 1;
index ce10b56807a1e70450625f75ac05b0e5813b12a1..953a37dcdd97423018133f0ec0413f0babcac454 100644 (file)
@@ -65,7 +65,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                        <para>Set(VOLUME(TX)=3)</para>
                        <para>Set(VOLUME(RX)=2)</para>
                        <para>Set(VOLUME(TX,p)=3)</para>
-                       <para>Set(VOLUME(RX,p)=3></para>
+                       <para>Set(VOLUME(RX,p)=3)</para>
                </description>
        </function>
  ***/