aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-14 17:20:24 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-14 17:20:24 +0000
commit6a5c8142fb96d522ee9065b2740f2c18466ef40c (patch)
tree7e16f0faa3229698131af708e53849666c6da15f /app.c
parent48f8b7d7ca1342bbf83e058d27a1ad6157c60802 (diff)
use a better name for structure element (when using named initializers)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6593 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rwxr-xr-xapp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/app.c b/app.c
index 40bc06e29..a96acd373 100755
--- a/app.c
+++ b/app.c
@@ -1506,27 +1506,30 @@ int ast_parseoptions(const struct ast_option *options, struct ast_flags *flags,
int argloc;
char *arg;
int res = 0;
+
flags->flags = 0;
+
if (!optstr)
return 0;
+
s = optstr;
- while(*s) {
+ while (*s) {
curarg = *s & 0x7f;
flags->flags |= options[curarg].flag;
- argloc = options[curarg].argoption;
+ argloc = options[curarg].arg_index;
s++;
if (*s == '(') {
/* Has argument */
s++;
arg = s;
- while(*s && (*s != ')')) s++;
+ while (*s && (*s != ')')) s++;
if (*s) {
if (argloc)
args[argloc - 1] = arg;
*s = '\0';
s++;
} else {
- ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c'\n", curarg);
+ ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c' in string '%s'\n", curarg, arg);
res = -1;
}
} else if (argloc)
@@ -1534,4 +1537,3 @@ int ast_parseoptions(const struct ast_option *options, struct ast_flags *flags,
}
return res;
}
-