[Asterisk-cvs] asterisk/channels chan_iax2.c,1.141,1.142

markster at lists.digium.com markster at lists.digium.com
Sat May 8 10:29:28 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv24094/channels

Modified Files:
	chan_iax2.c 
Log Message:
Allow notransfer to be a global option


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- chan_iax2.c	6 May 2004 20:39:31 -0000	1.141
+++ chan_iax2.c	8 May 2004 14:38:48 -0000	1.142
@@ -173,7 +173,7 @@
 
 static char accountcode[20];
 static int amaflags = 0;
-static int notransfer = 0;
+static int globalnotransfer = 0;
 
 static pthread_t netthreadid = AST_PTHREADT_NULL;
 
@@ -847,7 +847,7 @@
 			iaxs[x]->pingid = ast_sched_add(sched, ping_time * 1000, send_ping, (void *)x);
 			iaxs[x]->lagid = ast_sched_add(sched, lagrq_time * 1000, send_lagrq, (void *)x);
 			iaxs[x]->amaflags = amaflags;
-			iaxs[x]->notransfer = notransfer;
+			iaxs[x]->notransfer = globalnotransfer;
 			strncpy(iaxs[x]->accountcode, accountcode, sizeof(iaxs[x]->accountcode)-1);
 		} else {
 			ast_log(LOG_WARNING, "Out of resources\n");
@@ -5681,7 +5681,7 @@
 	char *portno=NULL;
 	int capability = iax2_capability;
 	int trunk;
-	int notransfer = 0;
+	int notransfer = globalnotransfer;
 	strncpy(s, (char *)data, sizeof(s)-1);
 	/* FIXME The next two lines seem useless */
 	stringp=s;
@@ -6265,6 +6265,8 @@
 			use_jitterbuffer = ast_true(v->value);
 		else if (!strcasecmp(v->name, "authdebug"))
 			authdebug = ast_true(v->value);
+		else if (!strcasecmp(v->name, "notransfer"))
+			globalnotransfer = ast_true(v->value);
 		else if (!strcasecmp(v->name, "trunkfreq")) {
 			trunkfreq = atoi(v->value);
 			if (trunkfreq < 10)
@@ -6394,7 +6396,7 @@
 	strncpy(accountcode, "", sizeof(accountcode)-1);
 	strncpy(language, "", sizeof(language)-1);
 	amaflags = 0;
-	notransfer = 0;
+	globalnotransfer = 0;
 	srand(time(NULL));
 	delete_users();
 	set_config(config,&dead_sin);




More information about the svn-commits mailing list