[Asterisk-cvs] asterisk/channels chan_iax2.c,1.288,1.289

markster at lists.digium.com markster at lists.digium.com
Wed May 18 19:28:05 CDT 2005


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

Modified Files:
	chan_iax2.c 
Log Message:
Actually apply timestamp bug (bug #3961)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -d -r1.288 -r1.289
--- chan_iax2.c	17 May 2005 19:41:09 -0000	1.288
+++ chan_iax2.c	18 May 2005 23:33:06 -0000	1.289
@@ -6527,8 +6527,17 @@
 			/* Handle the IAX pseudo frame itself */
 			if (option_debug)
 				ast_log(LOG_DEBUG, "IAX subclass %d received\n", f.subclass);
-			/* Go through the motions of delivering the packet without actually doing so */
-			schedule_delivery(&fr, 0, updatehistory, 0);
+
+                        /* Update last ts unless the frame's timestamp originated with us. */
+			if (iaxs[fr.callno]->last < fr.ts &&
+                            f.subclass != IAX_COMMAND_ACK &&
+                            f.subclass != IAX_COMMAND_PONG &&
+                            f.subclass != IAX_COMMAND_LAGRP) {
+				iaxs[fr.callno]->last = fr.ts;
+				if (option_debug)
+					ast_log(LOG_DEBUG, "For call=%d, set last=%d\n", fr.callno, fr.ts);
+			}
+
 			switch(f.subclass) {
 			case IAX_COMMAND_ACK:
 				/* Do nothing */




More information about the svn-commits mailing list