[Asterisk-cvs] asterisk rtp.c,1.62,1.63

markster at lists.digium.com markster at lists.digium.com
Tue Apr 20 15:18:47 CDT 2004


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

Modified Files:
	rtp.c 
Log Message:
Don't spam 3389 warning message


Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- rtp.c	15 Apr 2004 20:12:46 -0000	1.62
+++ rtp.c	20 Apr 2004 19:23:08 -0000	1.63
@@ -56,6 +56,8 @@
 
 #define MAX_RTP_PT 256
 
+#define FLAG_3389_WARNING (1 << 0)
+
 struct ast_rtp {
 	int s;
 	char resp;
@@ -71,6 +73,7 @@
 	int dtmfcount;
 	unsigned int dtmfduration;
 	int nat;
+	int flags;
 	struct sockaddr_in us;
 	struct sockaddr_in them;
 	struct timeval rxcore;
@@ -272,7 +275,10 @@
 #if 0
 	printf("RFC3389: %d bytes, format is %d\n", len, rtp->lastrxformat);
 #endif	
-	ast_log(LOG_NOTICE, "RFC3389 support incomplete.  Turn off on client if possible\n");
+	if (!(rtp->flags & FLAG_3389_WARNING)) {
+		ast_log(LOG_NOTICE, "RFC3389 support incomplete.  Turn off on client if possible\n");
+		rtp->flags |= FLAG_3389_WARNING;
+	}
 	if (!rtp->lastrxformat)
 		return 	NULL;
 	switch(rtp->lastrxformat) {




More information about the svn-commits mailing list