mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
look for the last '-' in the channel name instead of the first (issue #5514)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -195,12 +195,13 @@ static void do_state_change(const char *device)
|
|||||||
|
|
||||||
static int __ast_device_state_changed_literal(char *buf)
|
static int __ast_device_state_changed_literal(char *buf)
|
||||||
{
|
{
|
||||||
char *device;
|
char *device, *tmp;
|
||||||
char *parse;
|
|
||||||
struct state_change *change = NULL;
|
struct state_change *change = NULL;
|
||||||
|
|
||||||
parse = buf;
|
device = buf;
|
||||||
device = strsep(&parse, "-");
|
tmp = strrchr(device, '-');
|
||||||
|
if (tmp)
|
||||||
|
*tmp = '\0';
|
||||||
if (change_thread != AST_PTHREADT_NULL)
|
if (change_thread != AST_PTHREADT_NULL)
|
||||||
change = calloc(1, sizeof(*change) + strlen(device));
|
change = calloc(1, sizeof(*change) + strlen(device));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user