summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-12-19 15:37:12 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-12-19 15:37:12 -0800
commitef6121cba1c72549cca10763645254ae3aaf2887 (patch)
tree9e96342f6f1aaab12d0fefa4718ea80685f55dc3 /indra
parentca4c5d3bcb18afefc181bdc164d1c338abef7488 (diff)
CHUI-499: Code clean-up and adding some more types badly defined.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.cpp17
-rw-r--r--indra/newview/llnotificationstorage.cpp6
2 files changed, 17 insertions, 6 deletions
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 43fd7705aa..bf3dcae1f3 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -98,8 +98,6 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
{
LLFastTimer _(FTM_LOAD_DND_NOTIFICATIONS);
- LL_INFOS("stinsonDebug") << "STINSON DEBUG: loading notifiations" << LL_ENDL;
-
LLSD input;
if (!readNotifications(input) ||input.isUndefined())
{
@@ -127,8 +125,6 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
LLSD notification_params = *notification_it;
LLNotificationPtr notification(new LLNotification(notification_params));
- LL_INFOS("stinsonDebug") << "STINSON DEBUG: loading notification of type '" << notification->getType() << "'" << LL_ENDL;
-
const LLUUID& notificationID = notification->id();
if (instance.find(notificationID))
{
@@ -136,8 +132,17 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
}
else
{
- LLNotificationResponderPtr responder(createResponder(notification_params["name"], notification_params["responder"]));
- notification->setResponseFunctor(responder);
+ LLNotificationResponderInterface* responder = createResponder(notification_params["name"], notification_params["responder"]);
+ if (responder == NULL)
+ {
+ LL_WARNS("LLDoNotDisturbNotificationStorage") << "cannot create responder for notification of type '"
+ << notification->getType() << "'" << LL_ENDL;
+ }
+ else
+ {
+ LLNotificationResponderPtr responderPtr(responder);
+ notification->setResponseFunctor(responderPtr);
+ }
instance.add(notification);
}
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index 4746e4bbd4..b797775369 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -126,7 +126,13 @@ LLResponderRegistry::LLResponderRegistry()
, mBuildMap()
{
add("ObjectGiveItem", &create<LLOfferInfo>);
+ add("OwnObjectGiveItem", &create<LLOfferInfo>);
add("UserGiveItem", &create<LLOfferInfo>);
+
+ add("TeleportOffered", &create<LLOfferInfo>);
+ add("TeleportOffered_MaturityExceeded", &create<LLOfferInfo>);
+
+ add("OfferFriendship", &create<LLOfferInfo>);
}
LLResponderRegistry::~LLResponderRegistry()