diff options
author | Cinder | 2015-06-13 12:36:32 -0600 |
---|---|---|
committer | Diva Canto | 2015-06-13 13:37:08 -0700 |
commit | 044654b5a9db3d7b81b8bfc24eeb55d262a23631 (patch) | |
tree | 7969f04ecf7a57e754ff1645e2c6453c6e7ad0d0 /OpenSim | |
parent | Fixed indentation (diff) | |
download | opensim-SC-044654b5a9db3d7b81b8bfc24eeb55d262a23631.zip opensim-SC-044654b5a9db3d7b81b8bfc24eeb55d262a23631.tar.gz opensim-SC-044654b5a9db3d7b81b8bfc24eeb55d262a23631.tar.bz2 opensim-SC-044654b5a9db3d7b81b8bfc24eeb55d262a23631.tar.xz |
Guard against scenes without an agent prefs service and a copy and paste fix
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs index 9f65dbf..fcc260f 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs | |||
@@ -118,6 +118,13 @@ namespace OpenSim.Region.ClientStack.LindenCaps | |||
118 | 118 | ||
119 | public string UpdateAgentPreferences(string request, string path, string param, UUID agent) | 119 | public string UpdateAgentPreferences(string request, string path, string param, UUID agent) |
120 | { | 120 | { |
121 | // The viewer doesn't do much with the return value, so for now, if there is no preference service, | ||
122 | // we'll return a null llsd block for debugging purposes. This may change if someone knows what the | ||
123 | // correct server response would be here. | ||
124 | if (m_scenes[0].AgentPreferencesService == null) | ||
125 | { | ||
126 | return "<llsd><undef /></llsd>"; | ||
127 | } | ||
121 | m_log.DebugFormat("[AgentPrefs]: UpdateAgentPreferences for {0}", agent.ToString()); | 128 | m_log.DebugFormat("[AgentPrefs]: UpdateAgentPreferences for {0}", agent.ToString()); |
122 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 129 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
123 | AgentPrefs data = m_scenes[0].AgentPreferencesService.GetAgentPreferences(agent); | 130 | AgentPrefs data = m_scenes[0].AgentPreferencesService.GetAgentPreferences(agent); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs index 9d8367d..41ae53f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences | |||
88 | 88 | ||
89 | if (m_AgentPreferencesService == null) | 89 | if (m_AgentPreferencesService == null) |
90 | { | 90 | { |
91 | m_log.Error("[AGENT PREFERENCES CONNECTOR]: Can't load user account service"); | 91 | m_log.Error("[AGENT PREFERENCES CONNECTOR]: Can't load agent preferences service"); |
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | m_Enabled = true; | 94 | m_Enabled = true; |