[svn-commits] file: branch 1.4 r63611 - in /branches/1.4: ./ channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed May 9 09:54:57 MST 2007


Author: file
Date: Wed May  9 11:54:56 2007
New Revision: 63611

URL: http://svn.digium.com/view/asterisk?view=rev&rev=63611
Log:
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)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_sip.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=63611&r1=63610&r2=63611
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed May  9 11:54:56 2007
@@ -6922,11 +6922,14 @@
 	
 	/* 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";
+			}
 		}
 	}
 



More information about the svn-commits mailing list