From ba892274b393550be3cc7a25ff0e8f86cc1344a9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 28 Mar 2014 10:30:03 -0400 Subject: DRTVWR-363: Fix LLNotificationsListener::listChannels() channel walk. LLNotifications::ChannelMap went away when LLNotificationChannel became an LLInstanceTracker subclass. Iterate the universe of channels using LLNotificationChannel::beginInstances(), endInstances() instead. More troubling is that LLNotificationChannel::getParentChannelName() went away too. When LLNotificationChannel acquired a Params block and corresponding constructor, it acquired the ability to listen on multiple upstream sources. That meant that a single mParent string became inapplicable, and its access method was removed. (Curiously, mParent was not itself removed, but it was left unused.) Change mParent to mParents, a vector, built by connectToChannel(). Introduce getParents(), an accessor returning an iterator_range over that vector. Change LLNotificationsListener::listChannels() to collect a "parents" key in the map returned for each channel, and -- for backwards compatibility -- capture the first entry in the "parents" array as "parent". --- indra/llui/llnotifications.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 5c288c3f03..99641ae104 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1189,6 +1189,7 @@ void LLNotificationChannel::connectToChannel( const std::string& channel_name ) } else { + mParents.push_back(channel_name); LLNotificationChannelPtr p = LLNotifications::instance().getChannel(channel_name); p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); } -- cgit v1.2.3