[asterisk-commits] file: trunk r43698 - in /trunk: ./ channels/chan_local.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Sep 26 13:20:35 MST 2006


Author: file
Date: Tue Sep 26 15:20:34 2006
New Revision: 43698

URL: http://svn.digium.com/view/asterisk?rev=43698&view=rev
Log:
Merged revisions 43697 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43697 | file | 2006-09-26 16:19:33 -0400 (Tue, 26 Sep 2006) | 2 lines

Strip options off the argument passed for devicestate in chan_local. (issue #8034 reported by pcardozo)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_local.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Tue Sep 26 15:20:34 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43640,43642,43650,43674,43676,43695
+/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469,43477,43482,43486,43489,43492,43518,43524,43553,43564,43616,43640,43642,43650,43674,43676,43695,43697

Modified: trunk/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_local.c?rev=43698&r1=43697&r2=43698&view=diff
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Sep 26 15:20:34 2006
@@ -127,7 +127,7 @@
 static int local_devicestate(void *data)
 {
 	char *exten = ast_strdupa(data);
-	char *context = NULL;
+	char *context = NULL, *opts = NULL;
 	int res;
 
 	if (!(context = strchr(exten, '@'))) {
@@ -136,6 +136,10 @@
 	}
 
 	*context++ = '\0';
+
+	/* Strip options if they exist */
+	if ((opts = strchr(context, '/')))
+		*opts = '\0';
 
 	if (option_debug > 2)
 		ast_log(LOG_DEBUG, "Checking if extension %s@%s exists (devicestate)\n", exten, context);



More information about the asterisk-commits mailing list