[Asterisk-cvs] asterisk/channels chan_local.c,1.19,1.20

markster at lists.digium.com markster at lists.digium.com
Tue Oct 7 21:19:58 CDT 2003


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

Modified Files:
	chan_local.c 
Log Message:
Handle without context


Index: chan_local.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_local.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- chan_local.c	8 Oct 2003 02:11:56 -0000	1.19
+++ chan_local.c	8 Oct 2003 02:21:09 -0000	1.20
@@ -333,6 +333,13 @@
 		memset(tmp, 0, sizeof(struct local_pvt));
 		ast_mutex_init(&tmp->lock);
 		strncpy(tmp->exten, data, sizeof(tmp->exten) - 1);
+		opts = strchr(tmp->exten, '/');
+		if (opts) {
+			*opts='\0';
+			opts++;
+			if (strchr(opts, 'n'))
+				tmp->nooptimization = 1;
+		}
 		c = strchr(tmp->exten, '@');
 		if (c) {
 			*c = '\0';
@@ -340,13 +347,6 @@
 			strncpy(tmp->context, c, sizeof(tmp->context) - 1);
 		} else
 			strncpy(tmp->context, "default", sizeof(tmp->context) - 1);
-		opts = strchr(tmp->context, '/');
-		if (opts) {
-			*opts='\0';
-			opts++;
-			if (strchr(opts, 'n'))
-				tmp->nooptimization = 1;
-		}
 		tmp->reqformat = format;
 		if (!ast_exists_extension(NULL, tmp->context, tmp->exten, 1, NULL)) {
 			ast_log(LOG_NOTICE, "No such extension/context %s@%s creating local channel\n", tmp->context, tmp->exten);




More information about the svn-commits mailing list