[Asterisk-cvs] asterisk/channels chan_iax.c,1.40,1.41 chan_iax2.c,1.73,1.74

martinp at lists.digium.com martinp at lists.digium.com
Mon Nov 17 17:11:39 CST 2003


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv15615/channels

Modified Files:
	chan_iax.c chan_iax2.c 
Log Message:
Fix the AbsoluteTimeout issue with IAX/IAX2 when in native mode


Index: chan_iax.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- chan_iax.c	14 Nov 2003 04:11:03 -0000	1.40
+++ chan_iax.c	17 Nov 2003 23:37:56 -0000	1.41
@@ -1962,6 +1962,10 @@
 		to = 1000;
 		who = ast_waitfor_n(cs, 2, &to);
 		if (!who) {
+			if (ast_check_hangup(c0) || ast_check_hangup(c1)) {
+				res = 0;
+				break;
+			}
 			continue;
 		}
 		f = ast_read(who);

Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- chan_iax2.c	15 Nov 2003 23:27:47 -0000	1.73
+++ chan_iax2.c	17 Nov 2003 23:37:56 -0000	1.74
@@ -1985,7 +1985,7 @@
 	struct ast_channel *cs[3];
 	struct ast_channel *who;
 	int to = -1;
-	int res;
+	int res = -1;
 	int transferstarted=0;
 	struct ast_frame *f;
 	struct chan_iax2_pvt *p0 = c0->pvt->pvt;
@@ -2023,7 +2023,6 @@
 				ast_log(LOG_WARNING, "Unable to start the transfer\n");
 			transferstarted = 1;
 		}
-		
 		if ((p0->transferring == TRANSFER_RELEASED) && (p1->transferring == TRANSFER_RELEASED)) {
 			/* Call has been transferred.  We're no longer involved */
 			gettimeofday(&tv, NULL);
@@ -2042,6 +2041,10 @@
 		to = 1000;
 		who = ast_waitfor_n(cs, 2, &to);
 		if (!who) {
+			if (ast_check_hangup(c0) || ast_check_hangup(c1)) {
+				res = 0;
+				break;
+			}
 			continue;
 		}
 		f = ast_read(who);




More information about the svn-commits mailing list