From: Automerge Script Date: Wed, 9 May 2007 17:18:48 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.19-netsec~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce63f274ae6ee8ebdbb60d1b8399790d0dc07915;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@63652 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4e661792ae..dbc7fc293c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5317,11 +5317,14 @@ static int transmit_state_notify(struct sip_pvt *p, int state, int full, int sub /* 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"; + } } }