[asterisk-commits] dvossel: branch 1.6.1 r250397 - in /branches/1.6.1: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 3 12:05:28 CST 2010


Author: dvossel
Date: Wed Mar  3 12:05:24 2010
New Revision: 250397

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=250397
Log:
Merged revisions 250395 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r250395 | dvossel | 2010-03-03 12:03:19 -0600 (Wed, 03 Mar 2010) | 22 lines
  
  Merged revisions 250394 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r250394 | dvossel | 2010-03-03 12:02:27 -0600 (Wed, 03 Mar 2010) | 16 lines
    
    fixes problem with duplicate TXREQ packets
    
    When Asterisk receives an IAX2 TXREQ packet, try_transfer()
    will call store_by_transfercallno() to link the chan_iax2_pvt
    struct into iax_transfercallno_pvts. If a duplicate TXREQ
    packet is received for the same call, the pvt struct will be
    linked into iax_transfercallno_pvts multiple times.  This patch
    fixes this.  Thanks rain for debugging this and providing a patch!
    
    (closes issue #16904)
    Reported by: rain
    Patches:
          iax2-double-txreq-fix.diff uploaded by rain (license 327)
    Tested by: rain, dvossel
  ........
................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_iax2.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/channels/chan_iax2.c?view=diff&rev=250397&r1=250396&r2=250397
==============================================================================
--- branches/1.6.1/channels/chan_iax2.c (original)
+++ branches/1.6.1/channels/chan_iax2.c Wed Mar  3 12:05:24 2010
@@ -7796,9 +7796,14 @@
 	memcpy(&pvt->transfer, &new, sizeof(pvt->transfer));
 	inet_aton(newip, &pvt->transfer.sin_addr);
 	pvt->transfer.sin_family = AF_INET;
+	pvt->transferid = ies->transferid;
+	/* only store by transfercallno if this is a new transfer,
+	 * just in case we get a duplicate TXREQ */
+	if (pvt->transferring == TRANSFER_NONE) {
+		store_by_transfercallno(pvt);
+	}
 	pvt->transferring = TRANSFER_BEGIN;
-	pvt->transferid = ies->transferid;
-	store_by_transfercallno(pvt);
+
 	if (ies->transferid)
 		iax_ie_append_int(&ied, IAX_IE_TRANSFERID, ies->transferid);
 	send_command_transfer(pvt, AST_FRAME_IAX, IAX_COMMAND_TXCNT, 0, ied.buf, ied.pos);
@@ -7892,7 +7897,7 @@
 	pvt->voiceformat = 0;
 	pvt->svideoformat = -1;
 	pvt->videoformat = 0;
-	pvt->transfercallno = -1;
+	pvt->transfercallno = 0;
 	memset(&pvt->rxcore, 0, sizeof(pvt->rxcore));
 	memset(&pvt->offset, 0, sizeof(pvt->offset));
 	/* reset jitterbuffer */




More information about the asterisk-commits mailing list