diff options
author | Joshua Colp <jcolp@digium.com> | 2006-07-12 15:25:17 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2006-07-12 15:25:17 +0000 |
commit | 5d9419304c9c05d50550739cea7b347a86187e37 (patch) | |
tree | 033fefc603839edad04a77ea5ab9b1449b7aeb88 | |
parent | 5b639e613588e4d4f46f7ce7466ac32f77513fac (diff) |
Merged revisions 37439 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r37439 | file | 2006-07-12 11:23:59 -0400 (Wed, 12 Jul 2006) | 2 lines
Add support to have maxauthreq as a global option
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_iax2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 3ec95bacc..e03208b45 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -145,6 +145,7 @@ static char context[80] = "default"; static char language[MAX_LANGUAGE] = ""; static char regcontext[AST_MAX_CONTEXT] = ""; +static int maxauthreq = 0; static int max_retries = 4; static int ping_time = 20; static int lagrq_time = 10; @@ -8402,6 +8403,7 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, in if (user) { memset(user, 0, sizeof(struct iax2_user)); + user->maxauthreq = maxauthreq; user->curauthreq = oldcurauthreq; user->prefs = prefs; user->capability = iax2_capability; @@ -8864,6 +8866,10 @@ static int set_config(char *config_file, int reload) } } else if (!strcasecmp(v->name, "language")) { ast_copy_string(language, v->value, sizeof(language)); + } else if (!strcasecmp(v->name, "maxauthreq")) { + maxauthreq = atoi(v->value); + if (maxauthreq < 0) + maxauthreq = 0; } /*else if (strcasecmp(v->name,"type")) */ /* ast_log(LOG_WARNING, "Ignoring %s\n", v->name); */ v = v->next; |