From 5f18a088a83c9997e1fe026241de2c0db1a961b8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 11:14:46 -0700 Subject: More error catching/outputting. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index e22328d..b425d90 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -137,11 +137,21 @@ namespace OpenSim.Server.Handlers.Grid } Dictionary rinfoData = new Dictionary(); - foreach (KeyValuePair kvp in request) - rinfoData[kvp.Key] = kvp.Value; - GridRegion rinfo = new GridRegion(rinfoData); + GridRegion rinfo = null; + try + { + foreach (KeyValuePair kvp in request) + rinfoData[kvp.Key] = kvp.Value; + rinfo = new GridRegion(rinfoData); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); + } - bool result = m_GridService.RegisterRegion(scopeID, rinfo); + bool result = false; + if (rinfo != null) + m_GridService.RegisterRegion(scopeID, rinfo); if (result) return SuccessResult(); -- cgit v1.1 From 05b80185b9f74979eeab0d60ae4d7de56593264c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 11:49:21 -0700 Subject: More debug to try to diagnose a problem with region registration. --- OpenSim/Server/Base/ServerUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index 0964caa..9d9735e 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs @@ -260,7 +260,7 @@ namespace OpenSim.Server.Base public static Dictionary ParseXmlResponse(string data) { - //m_log.DebugFormat("[XXX]: received xml string: {0}", data); + m_log.DebugFormat("[XXX]: received xml string: {0}", data); Dictionary ret = new Dictionary(); -- cgit v1.1 From 9bd1353875d40806cbe76b8afca17ed5a93e9efd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 12:13:38 -0700 Subject: Fixed bug introduced in one of the last commits. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index b425d90..08edcbf 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -151,7 +151,7 @@ namespace OpenSim.Server.Handlers.Grid bool result = false; if (rinfo != null) - m_GridService.RegisterRegion(scopeID, rinfo); + result = m_GridService.RegisterRegion(scopeID, rinfo); if (result) return SuccessResult(); -- cgit v1.1 From 282b7520355749466b7142a8273e7eaa3e92ebc1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 13:14:14 -0700 Subject: Minor change. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index 08edcbf..17a31bc 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -113,7 +113,7 @@ namespace OpenSim.Server.Handlers.Grid byte[] Register(Dictionary request) { UUID scopeID = UUID.Zero; - if (request["SCOPEID"] != null) + if (request.ContainsKey("SCOPEID")) UUID.TryParse(request["SCOPEID"], out scopeID); else m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to register region"); -- cgit v1.1 From 2753f4d62c79b45f5ad1b3e275d7a9c628d34687 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 16:06:21 -0700 Subject: * GridServerPostHandler.cs: Try/catch in Handle * BaseOpenSimServer.cs: Added thread pool numbers in show threads --- .../Server/Handlers/Grid/GridServerPostHandler.cs | 55 ++++++++++++---------- 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index 17a31bc..433ed0b 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -67,43 +67,50 @@ namespace OpenSim.Server.Handlers.Grid //m_log.DebugFormat("[XXX]: query String: {0}", body); - Dictionary request = - ServerUtils.ParseQueryString(body); + try + { + Dictionary request = + ServerUtils.ParseQueryString(body); - if (!request.ContainsKey("METHOD")) - return FailureResult(); + if (!request.ContainsKey("METHOD")) + return FailureResult(); - string method = request["METHOD"]; + string method = request["METHOD"]; - switch (method) - { - case "register": - return Register(request); + switch (method) + { + case "register": + return Register(request); - case "deregister": - return Deregister(request); + case "deregister": + return Deregister(request); - case "get_neighbours": - return GetNeighbours(request); + case "get_neighbours": + return GetNeighbours(request); - case "get_region_by_uuid": - return GetRegionByUUID(request); + case "get_region_by_uuid": + return GetRegionByUUID(request); - case "get_region_by_position": - return GetRegionByPosition(request); + case "get_region_by_position": + return GetRegionByPosition(request); - case "get_region_by_name": - return GetRegionByName(request); + case "get_region_by_name": + return GetRegionByName(request); - case "get_regions_by_name": - return GetRegionsByName(request); + case "get_regions_by_name": + return GetRegionsByName(request); - case "get_region_range": - return GetRegionRange(request); + case "get_region_range": + return GetRegionRange(request); + } + m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID HANDLER]: Exception {0}", e); } - m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method); return FailureResult(); } -- cgit v1.1