Guard against scenes without an agent prefs service and a copy and paste fix
Signed-off-by: Diva Canto <diva@metaverseink.com>fsassets
parent
7f1a73cbda
commit
044654b5a9
|
@ -118,6 +118,13 @@ namespace OpenSim.Region.ClientStack.LindenCaps
|
||||||
|
|
||||||
public string UpdateAgentPreferences(string request, string path, string param, UUID agent)
|
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());
|
m_log.DebugFormat("[AgentPrefs]: UpdateAgentPreferences for {0}", agent.ToString());
|
||||||
OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
|
OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
|
||||||
AgentPrefs data = m_scenes[0].AgentPreferencesService.GetAgentPreferences(agent);
|
AgentPrefs data = m_scenes[0].AgentPreferencesService.GetAgentPreferences(agent);
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences
|
||||||
|
|
||||||
if (m_AgentPreferencesService == null)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
m_Enabled = true;
|
m_Enabled = true;
|
||||||
|
|
Loading…
Reference in New Issue