summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-05-09 16:56:45 +0000
committerJoshua Colp <jcolp@digium.com>2007-05-09 16:56:45 +0000
commit7e10164e20ad18e3fbb2c86d1d9d016b5d35aedb (patch)
tree2892cb301f09672b0e4d49fddc198788d014ea9a /channels
parent39dd02d542a6bd3c25904ede618cab89a8f600ae (diff)
Merged revisions 63611 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r63611 | file | 2007-05-09 12:54:56 -0400 (Wed, 09 May 2007) | 10 lines Merged revisions 63610 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63610 | file | 2007-05-09 12:51:03 -0400 (Wed, 09 May 2007) | 2 lines Properly handle hints that point to multiple devices in chan_sip. Why chan_sip is even doing this I have no idea but I would rather not go into a rant. (issue #9536 reported by rlister) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 56b9d7014..f705ba2b2 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7494,11 +7494,14 @@ static int transmit_state_notify(struct sip_pvt *p, int state, int full, int tim
/* Check which device/devices we are watching and if they are registered */
if (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, p->context, p->exten)) {
- /* If they are not registered, we will override notification and show no availability */
- if (ast_device_state(hint) == AST_DEVICE_UNAVAILABLE) {
- local_state = NOTIFY_CLOSED;
- pidfstate = "away";
- pidfnote = "Not online";
+ char *hint2 = hint, *individual_hint = NULL;
+ while ((individual_hint = strsep(&hint2, "&"))) {
+ /* If they are not registered, we will override notification and show no availability */
+ if (ast_device_state(individual_hint) == AST_DEVICE_UNAVAILABLE) {
+ local_state = NOTIFY_CLOSED;
+ pidfstate = "away";
+ pidfnote = "Not online";
+ }
}
}