Do not use ':' as a separator between arguments (kept around for 1.4 for backwards...
authorOlle Johansson <oej@edvina.net>
Mon, 5 Jun 2006 06:36:18 +0000 (06:36 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 5 Jun 2006 06:36:18 +0000 (06:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32185 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c
channels/chan_sip.c

index 9424c11..4c00a9b 100644 (file)
@@ -9398,7 +9398,9 @@ static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, cha
                return 0;
        }
 
-       if ((colname = strchr(peername, ':')))
+       if ((colname = strchr(peername, ':')))  /*! \todo : will be removed after the 1.4 relese */
+               *colname++ = '\0';
+       else if ((colname = strchr(peername, '|')))
                *colname++ = '\0';
        else
                colname = "ip";
@@ -9446,7 +9448,7 @@ static int function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, cha
 struct ast_custom_function iaxpeer_function = {
        .name = "IAXPEER",
        .synopsis = "Gets IAX peer information",
-       .syntax = "IAXPEER(<peername|CURRENTCHANNEL>[:item])",
+       .syntax = "IAXPEER(<peername|CURRENTCHANNEL>[|item])",
        .read = function_iaxpeer,
        .desc = "If peername specified, valid items are:\n"
        "- ip (default)          The IP address.\n"
index 7e6a330..f36d3ab 100644 (file)
@@ -9980,7 +9980,9 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha
        char *colname;
        char iabuf[INET_ADDRSTRLEN];
 
-       if ((colname = strchr(data, ':')))
+       if ((colname = strchr(data, ':')))      /*! \todo Will be deprecated after 1.4 */
+               *colname++ = '\0';
+       else if ((colname = strchr(data, '|')))
                *colname++ = '\0';
        else
                colname = "ip";
@@ -10039,7 +10041,7 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha
 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"