[asterisk-commits] file: trunk r69223 - in /trunk: ./ channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 13 14:20:33 MST 2007


Author: file
Date: Wed Jun 13 16:20:32 2007
New Revision: 69223

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69223
Log:
Merged revisions 69221 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69221 | file | 2007-06-13 17:17:28 -0400 (Wed, 13 Jun 2007) | 2 lines

Let's make chan_iax2 media only native transfers actually work. (issue #9376 reported by simone cittadini)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=69223&r1=69222&r2=69223
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Jun 13 16:20:32 2007
@@ -1224,7 +1224,7 @@
 	if ((cur->transfer.sin_addr.s_addr == sin->sin_addr.s_addr) &&
 	    (cur->transfer.sin_port == sin->sin_port) && (cur->transferring)) {
 		/* We're transferring */
-		if (dcallno == cur->callno)
+		if ((dcallno == cur->callno) || (cur->transferring == TRANSFER_MEDIAPASS && cur->transfercallno == callno))
 			return 1;
 	}
 	return 0;
@@ -1326,6 +1326,7 @@
 	int x;
 	struct timeval now;
 	char host[80];
+
 	if (new <= NEW_ALLOW) {
 		for (x=1;(res < 1) && (x<maxnontrunkcall);x++) {
 			ast_mutex_lock(&iaxsl[x]);
@@ -6839,7 +6840,7 @@
 	if (!fr->callno)
 		fr->callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &sin, new, 1, fd);
 
-	if (fr->callno > 0) 
+	if (fr->callno > 0)
 		ast_mutex_lock(&iaxsl[fr->callno]);
 
 	if (!fr->callno || !iaxs[fr->callno]) {
@@ -7924,6 +7925,14 @@
 				break;	
 			case IAX_COMMAND_TXMEDIA:
 				if (iaxs[fr->callno]->transferring == TRANSFER_READY) {
+                                        AST_LIST_LOCK(&queue);
+                                        AST_LIST_TRAVERSE(&queue, cur, list) {
+                                                /* Cancel any outstanding frames and start anew */
+                                                if ((fr->callno == cur->callno) && (cur->transfer)) {
+                                                        cur->retries = -1;
+                                                }
+                                        }
+                                        AST_LIST_UNLOCK(&queue);
 					/* Start sending our media to the transfer address, but otherwise leave the call as-is */
 					iaxs[fr->callno]->transferring = TRANSFER_MEDIAPASS;
 				}



More information about the asterisk-commits mailing list