diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-19 20:13:40 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-19 20:13:40 +0000 |
commit | 0aa40f136606a6f67d075d19d63714cf4e931484 (patch) | |
tree | 3d11d87996f576127f14da4b8dd9277df030649a | |
parent | 7bcf0529c5bcfda5dd4d3d88e9633c087cc496ff (diff) |
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
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 28f23d64a..6df7e1d0b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12964,9 +12964,12 @@ static int function_sippeer(struct ast_channel *chan, const char *cmd, char *dat 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 @@ static int function_sippeer(struct ast_channel *chan, const char *cmd, char *dat 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" |