aboutsummaryrefslogtreecommitdiffstats
path: root/devicestate.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-06 12:18:36 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-06 12:18:36 +0000
commit9e3daeb7cc23ac2b2c62519e2912a5babc23a6e7 (patch)
tree94b1c2d6da27db81fbb38d718b2bbdd1c9c126eb /devicestate.c
parent293fba77696ffe7d5939ed785ee862f6fd4bb2e7 (diff)
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)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@67593 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'devicestate.c')
-rw-r--r--devicestate.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/devicestate.c b/devicestate.c
index 71a1bae0d..6cfb24aa1 100644
--- a/devicestate.c
+++ b/devicestate.c
@@ -198,14 +198,13 @@ static int __ast_device_state_changed_literal(char *buf)
{
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));