[Asterisk-cvs] asterisk/channels chan_iax2.c,1.188.2.13,1.188.2.14

russell at lists.digium.com russell at lists.digium.com
Fri Mar 18 11:34:50 CST 2005


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

Modified Files:
      Tag: v1-0
	chan_iax2.c 
Log Message:
don't explode if a box running CVS head sends trunk frames with timestamps (bug #3790)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.188.2.13
retrieving revision 1.188.2.14
diff -u -d -r1.188.2.13 -r1.188.2.14
--- chan_iax2.c	7 Feb 2005 04:05:29 -0000	1.188.2.13
+++ chan_iax2.c	18 Mar 2005 17:30:05 -0000	1.188.2.14
@@ -5063,6 +5063,10 @@
 		/* This is a meta header */
 		switch(meta->metacmd) {
 		case IAX_META_TRUNK:
+		        if (meta->cmddata != 0) {
+				ast_log(LOG_WARNING, "meta trunk cmd %d received, I only understand 0 (perhaps the remote side is sending trunk timestamps?)\n", meta->cmddata);
+				return 1;
+		        }
 			if (res < sizeof(struct ast_iax2_meta_hdr) + sizeof(struct ast_iax2_meta_trunk_hdr)) {
 				ast_log(LOG_WARNING, "midget meta trunk packet received (%d of %d min)\n", res, (int)sizeof(struct ast_iax2_mini_hdr));
 				return 1;




More information about the svn-commits mailing list