[asterisk-commits] branch 1.2 r37439 - /branches/1.2/channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jul 12 08:23:59 MST 2006


Author: file
Date: Wed Jul 12 10:23:59 2006
New Revision: 37439

URL: http://svn.digium.com/view/asterisk?rev=37439&view=rev
Log:
Add support to have maxauthreq as a global option

Modified:
    branches/1.2/channels/chan_iax2.c

Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?rev=37439&r1=37438&r2=37439&view=diff
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Wed Jul 12 10:23:59 2006
@@ -147,6 +147,7 @@
 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;
@@ -8432,6 +8433,7 @@
 	
 	if (user) {
 		memset(user, 0, sizeof(struct iax2_user));
+		user->maxauthreq = maxauthreq;
 		user->curauthreq = oldcurauthreq;
 		user->prefs = prefs;
 		user->capability = iax2_capability;
@@ -8868,6 +8870,10 @@
 			}
 		} 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;



More information about the asterisk-commits mailing list