diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-06 12:20:27 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-06 12:20:27 +0000 |
commit | 431d46a7caa8c6def59d8e7fafc5ced7f975625e (patch) | |
tree | 9de6032b5abd1bc8551d88bca3afa0cc494ef882 /main/devicestate.c | |
parent | 6a47780e897dc6cbf559e6e9d93d1a94f2fee146 (diff) |
Merged revisions 67593 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r67593 | file | 2007-06-06 08:18:36 -0400 (Wed, 06 Jun 2007) | 2 lines
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.4@67594 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/devicestate.c')
-rw-r--r-- | main/devicestate.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/main/devicestate.c b/main/devicestate.c index 46db60d6d..1b9d49d87 100644 --- a/main/devicestate.c +++ b/main/devicestate.c @@ -298,17 +298,16 @@ static int __ast_device_state_changed_literal(char *buf) { char *device; struct state_change *change; + char *tmp = NULL; if (option_debug > 2) ast_log(LOG_DEBUG, "Notification of state change to be queued on device/channel %s\n", buf); 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 = ast_calloc(1, sizeof(*change) + strlen(device)))) { /* we could not allocate a change struct, or */ |