[asterisk-commits] simon.perreault: branch group/v6-new r271227 - /team/group/v6-new/main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 17 12:12:54 CDT 2010
Author: simon.perreault
Date: Thu Jun 17 12:12:51 2010
New Revision: 271227
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=271227
Log:
Allow IPv6 addresses in sip.conf register lines. This required changing generic argument
splitting code to make it match brackets like it already does for parentheses and double
quotes.
Modified:
team/group/v6-new/main/app.c
Modified: team/group/v6-new/main/app.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/app.c?view=diff&rev=271227&r1=271226&r2=271227
==============================================================================
--- team/group/v6-new/main/app.c (original)
+++ team/group/v6-new/main/app.c Thu Jun 17 12:12:51 2010
@@ -1190,7 +1190,7 @@
{
int argc;
char *scan, *wasdelim = NULL;
- int paren = 0, quote = 0;
+ int paren = 0, quote = 0, bracket = 0;
if (!array || !arraylen) {
return 0;
@@ -1212,6 +1212,12 @@
} else if (*scan == ')') {
if (paren) {
paren--;
+ }
+ } else if (*scan == '[') {
+ bracket++;
+ } else if (*scan == '[') {
+ if (bracket) {
+ bracket--;
}
} else if (*scan == '"' && delim != '"') {
quote = quote ? 0 : 1;
@@ -1227,7 +1233,7 @@
} else {
scan++;
}
- } else if ((*scan == delim) && !paren && !quote) {
+ } else if ((*scan == delim) && !paren && !quote && !bracket) {
wasdelim = scan;
*scan++ = '\0';
break;
More information about the asterisk-commits
mailing list