[asterisk-commits] file: branch 1.2 r67593 - /branches/1.2/devicestate.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 6 05:18:36 MST 2007


Author: file
Date: Wed Jun  6 07:18:36 2007
New Revision: 67593

URL: http://svn.digium.com/view/asterisk?view=rev&rev=67593
Log:
Revert channel name splitting fix for Zap. The moral of the story is don't use - in your user/peer names. (issue #9668 reported by stevedavies)

Modified:
    branches/1.2/devicestate.c

Modified: branches/1.2/devicestate.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/devicestate.c?view=diff&rev=67593&r1=67592&r2=67593
==============================================================================
--- branches/1.2/devicestate.c (original)
+++ branches/1.2/devicestate.c Wed Jun  6 07:18:36 2007
@@ -198,14 +198,13 @@
 {
 	char *device;
 	struct state_change *change = NULL;
+	char *tmp = NULL;
 
 	device = buf;
 
-	if (!strncasecmp(device, "Zap", 3)) {
-		char *tmp = strrchr(device, '-');
-		if (tmp)
-			*tmp = '\0';
-	}
+	tmp = strrchr(device, '-');
+	if (tmp)
+		*tmp = '\0';
 
 	if (change_thread != AST_PTHREADT_NULL)
 		change = calloc(1, sizeof(*change) + strlen(device));



More information about the asterisk-commits mailing list