projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6262e9e
)
look for the last '-' in the channel name instead of the first (issue #5514)
author
Russell Bryant
<russell@russellbryant.com>
Wed, 26 Oct 2005 15:34:34 +0000
(15:34 +0000)
committer
Russell Bryant
<russell@russellbryant.com>
Wed, 26 Oct 2005 15:34:34 +0000
(15:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6854
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
devicestate.c
patch
|
blob
|
history
diff --git
a/devicestate.c
b/devicestate.c
index
fabed73
..
086cadb
100755
(executable)
--- a/
devicestate.c
+++ b/
devicestate.c
@@
-195,12
+195,13
@@
static void do_state_change(const char *device)
static int __ast_device_state_changed_literal(char *buf)
{
- char *device;
- char *parse;
+ char *device, *tmp;
struct state_change *change = NULL;
- parse = buf;
- device = strsep(&parse, "-");
+ device = buf;
+ tmp = strrchr(device, '-');
+ if (tmp)
+ *tmp = '\0';
if (change_thread != AST_PTHREADT_NULL)
change = calloc(1, sizeof(*change) + strlen(device));