summaryrefslogtreecommitdiff
path: root/main/devicestate.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-06-06 12:21:33 +0000
committerJoshua Colp <jcolp@digium.com>2007-06-06 12:21:33 +0000
commit3f671bb11db0229a5d128d6b6fc5e309225ff579 (patch)
treeb582076f60557220987af52e192453281f18dfde /main/devicestate.c
parent1d8be33e285dce0f061c0b6ba324365a887b2c07 (diff)
Merged revisions 67594 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r67594 | file | 2007-06-06 08:20:27 -0400 (Wed, 06 Jun 2007) | 10 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@67595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/devicestate.c')
-rw-r--r--main/devicestate.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/main/devicestate.c b/main/devicestate.c
index a1b4c4ca3..f8e1a337a 100644
--- a/main/devicestate.c
+++ b/main/devicestate.c
@@ -399,18 +399,17 @@ 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 */
/* there is no background thread, so process the change now */