aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs24
1 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index f96ae8b..2481d11 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -201,6 +201,8 @@ namespace OpenSim.Region.ClientStack.Linden
201 m_assetService = m_Scene.AssetService; 201 m_assetService = m_Scene.AssetService;
202 m_regionName = m_Scene.RegionInfo.RegionName; 202 m_regionName = m_Scene.RegionInfo.RegionName;
203 m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); 203 m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>();
204 if (m_UserManager == null)
205 m_log.Error("[CAPS]: GetDisplayNames disabled because user management component not found");
204 206
205 RegisterHandlers(); 207 RegisterHandlers();
206 208
@@ -324,9 +326,12 @@ namespace OpenSim.Region.ClientStack.Linden
324 { 326 {
325 try 327 try
326 { 328 {
327 IRequestHandler GetDisplayNamesHandler = new RestStreamHandler( 329 if (m_UserManager != null)
330 {
331 IRequestHandler GetDisplayNamesHandler = new RestStreamHandler(
328 "GET", GetNewCapPath(), GetDisplayNames, "GetDisplayNames", null); 332 "GET", GetNewCapPath(), GetDisplayNames, "GetDisplayNames", null);
329 m_HostCapsObj.RegisterHandler("GetDisplayNames", GetDisplayNamesHandler); 333 m_HostCapsObj.RegisterHandler("GetDisplayNames", GetDisplayNamesHandler);
334 }
330 } 335 }
331 catch (Exception e) 336 catch (Exception e)
332 { 337 {
@@ -1818,23 +1823,24 @@ namespace OpenSim.Region.ClientStack.Linden
1818 string param, IOSHttpRequest httpRequest, 1823 string param, IOSHttpRequest httpRequest,
1819 IOSHttpResponse httpResponse) 1824 IOSHttpResponse httpResponse)
1820 { 1825 {
1821 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NoContent; 1826 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.Gone;
1822 httpResponse.ContentType = "text/plain"; 1827 httpResponse.ContentType = "text/plain";
1823 1828
1824 ScenePresence sp = m_Scene.GetScenePresence(m_AgentID); 1829 ScenePresence sp = m_Scene.GetScenePresence(m_AgentID);
1825 if(sp == null || sp.IsDeleted) 1830 if(sp == null || sp.IsDeleted)
1826 return ""; 1831 return "";
1827 1832
1828 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); 1833 if(sp.IsInTransit)
1829 string[] ids = query.GetValues("ids");
1830
1831 if (m_UserManager == null)
1832 { 1834 {
1833 m_log.Error("[GET_DISPLAY_NAMES]: Cannot fetch display names without a user management component"); 1835 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.ServiceUnavailable;
1834 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError; 1836 httpResponse.AddHeader("Retry-After","30");
1835 return ""; 1837 return "";
1836 } 1838 }
1837 1839
1840 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
1841 string[] ids = query.GetValues("ids");
1842
1843
1838 Dictionary<UUID,string> names = m_UserManager.GetUsersNames(ids); 1844 Dictionary<UUID,string> names = m_UserManager.GetUsersNames(ids);
1839 1845
1840 OSDMap osdReply = new OSDMap(); 1846 OSDMap osdReply = new OSDMap();