[asterisk-commits] mvanbaak: branch 1.6.0 r218108 - /branches/1.6.0/main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 12 08:10:23 CDT 2009


Author: mvanbaak
Date: Sat Sep 12 08:10:18 2009
New Revision: 218108

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218108
Log:
Use the ip for the new 'rtp set debug ip <foo>'.

Since 1.6.X still has the deprecated 'rtp debug ip <foo>'
this patch is different from the fix that went into trunk

(closes issue #15711)
Reported by: davidw
Patches:
      2009082800-rtpdebug.diff.txt uploaded by mvanbaak (license 7)
Tested by: davidw

Modified:
    branches/1.6.0/main/rtp.c

Modified: branches/1.6.0/main/rtp.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/main/rtp.c?view=diff&rev=218108&r1=218107&r2=218108
==============================================================================
--- branches/1.6.0/main/rtp.c (original)
+++ branches/1.6.0/main/rtp.c Sat Sep 12 08:10:18 2009
@@ -3989,14 +3989,18 @@
 	return res;
 }
 
-static char *rtp_do_debug_ip(struct ast_cli_args *a)
+static char *rtp_do_debug_ip(struct ast_cli_args *a, int deprecated)
 {
 	struct hostent *hp;
 	struct ast_hostent ahp;
 	int port = 0;
 	char *p, *arg;
 
-	arg = a->argv[3];
+	if (deprecated == 1) {
+		arg = a->argv[3];
+	} else {
+		arg = a->argv[4];
+	}
 	p = strstr(arg, ":");
 	if (p) {
 		*p = '\0';
@@ -4078,7 +4082,7 @@
 	} else {
 		if (strncasecmp(a->argv[2], "ip", 2))
 			return CLI_SHOWUSAGE;
-		return rtp_do_debug_ip(a);
+		return rtp_do_debug_ip(a, 1);
 	}
 
 	return CLI_SUCCESS;
@@ -4111,7 +4115,7 @@
 			return CLI_SUCCESS;
 		}
 	} else if (a->argc == e->args +1) { /* ip */
-		return rtp_do_debug_ip(a);
+		return rtp_do_debug_ip(a, 0);
 	}
 
 	return CLI_SHOWUSAGE;   /* default, failure */




More information about the asterisk-commits mailing list