[asterisk-commits] file: trunk r64277 - in /trunk: ./ main/devicestate.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 14 11:39:16 MST 2007


Author: file
Date: Mon May 14 13:39:16 2007
New Revision: 64277

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

................
r64276 | file | 2007-05-14 14:36:34 -0400 (Mon, 14 May 2007) | 10 lines

Merged revisions 64275 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r64275 | file | 2007-05-14 14:34:06 -0400 (Mon, 14 May 2007) | 2 lines

Only perform stripping of - strings from the channel name for Zap channels. Anywhere else we might remove a legitimate part of a device name. (issue #9668 reported by stevedavies)

........

................

Modified:
    trunk/   (props changed)
    trunk/main/devicestate.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/devicestate.c?view=diff&rev=64277&r1=64276&r2=64277
==============================================================================
--- trunk/main/devicestate.c (original)
+++ trunk/main/devicestate.c Mon May 14 13:39:16 2007
@@ -437,15 +437,19 @@
 
 static int __ast_device_state_changed_literal(char *buf)
 {
-	char *device, *tmp;
+	char *device;
 	struct state_change *change;
 
 	if (option_debug > 2)
 		ast_log(LOG_DEBUG, "Notification of state change to be queued on device/channel %s\n", buf);
 
 	device = buf;
-	if ((tmp = strrchr(device, '-')))
-		*tmp = '\0';
+
+	if (!strncasecmp(device, "Zap", 3)) {
+		char *tmp = strrchr(device, '-');
+		if (tmp)
+			*tmp = '\0';
+	}
 
 	if (change_thread == AST_PTHREADT_NULL || !(change = ast_calloc(1, sizeof(*change) + strlen(device)))) {
 		/* we could not allocate a change struct, or */



More information about the asterisk-commits mailing list