mirror of
https://github.com/asterisk/asterisk.git
synced 2025-08-29 09:15:34 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@64275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -196,13 +196,17 @@ 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 = NULL;
|
||||
|
||||
device = buf;
|
||||
tmp = strrchr(device, '-');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
|
||||
if (!strncasecmp(device, "Zap", 3)) {
|
||||
char *tmp = strrchr(device, '-');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
}
|
||||
|
||||
if (change_thread != AST_PTHREADT_NULL)
|
||||
change = calloc(1, sizeof(*change) + strlen(device));
|
||||
|
||||
|
Reference in New Issue
Block a user