aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-14 18:39:16 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-14 18:39:16 +0000
commit8da27f17baab8987de12faf0a6f54de759e54715 (patch)
tree8d9e4cd9ba1661c46a2cc28e40a4ebd99c73fd46 /main
parent0c8ba17644092a3ecc039ace0f9d8d1c2cf9c91c (diff)
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) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64277 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/devicestate.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main/devicestate.c b/main/devicestate.c
index c13d635d1..d0b972270 100644
--- a/main/devicestate.c
+++ b/main/devicestate.c
@@ -437,15 +437,19 @@ static void do_state_change(const char *device)
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 */