Guard against scenes without an agent prefs service and a copy and paste fix

Signed-off-by: Diva Canto <diva@metaverseink.com>
fsassets
Cinder 2015-06-13 12:36:32 -06:00 committed by Diva Canto
parent 7f1a73cbda
commit 044654b5a9
2 changed files with 8 additions and 1 deletions

View File

@ -118,6 +118,13 @@ namespace OpenSim.Region.ClientStack.LindenCaps
public string UpdateAgentPreferences(string request, string path, string param, UUID agent)
{
// The viewer doesn't do much with the return value, so for now, if there is no preference service,
// we'll return a null llsd block for debugging purposes. This may change if someone knows what the
// correct server response would be here.
if (m_scenes[0].AgentPreferencesService == null)
{
return "<llsd><undef /></llsd>";
}
m_log.DebugFormat("[AgentPrefs]: UpdateAgentPreferences for {0}", agent.ToString());
OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
AgentPrefs data = m_scenes[0].AgentPreferencesService.GetAgentPreferences(agent);

View File

@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences
if (m_AgentPreferencesService == null)
{
m_log.Error("[AGENT PREFERENCES CONNECTOR]: Can't load user account service");
m_log.Error("[AGENT PREFERENCES CONNECTOR]: Can't load agent preferences service");
return;
}
m_Enabled = true;