[svn-commits] tilghman: trunk r89429 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 19 14:13:41 CST 2007


Author: tilghman
Date: Mon Nov 19 14:13:40 2007
New Revision: 89429

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89429
Log:
Change delimiter of SIPPEER to be comma (instead of pipe) and further deprecate the old ':' delimiter
Reported by: pj
Patch by: tilghman
Closes issue #11305

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=89429&r1=89428&r2=89429
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Nov 19 14:13:40 2007
@@ -12964,9 +12964,12 @@
 	struct sip_peer *peer;
 	char *colname;
 
-	if ((colname = strchr(data, ':')))	/*! \todo Will be deprecated after 1.4 */
+	if ((colname = strchr(data, ':'))) {	/*! \todo Will be deprecated after 1.4 */
+		static int deprecation_warning = 0;
 		*colname++ = '\0';
-	else if ((colname = strchr(data, '|')))
+		if (deprecation_warning++ % 10 == 0)
+			ast_log(LOG_WARNING, "SIPPEER(): usage of ':' to separate arguments is deprecated.  Please use ',' instead.\n");
+	} else if ((colname = strchr(data, ',')))
 		*colname++ = '\0';
 	else
 		colname = "ip";
@@ -13035,7 +13038,7 @@
 struct ast_custom_function sippeer_function = {
 	.name = "SIPPEER",
 	.synopsis = "Gets SIP peer information",
-	.syntax = "SIPPEER(<peername>[|item])",
+	.syntax = "SIPPEER(<peername>[,item])",
 	.read = function_sippeer,
 	.desc = "Valid items are:\n"
 	"- ip (default)          The IP address.\n"




More information about the svn-commits mailing list