aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-05 16:41:19 -0700
committerJohn Hurliman2009-10-05 16:41:19 -0700
commita76a1afda84c3b2e23820af9b7f2c5ab3b2b97e0 (patch)
tree7419c7ac451dc210c8f02ffcb60e6900615460f5 /OpenSim
parentAdded CloseDBConnection() to replace the old CloseReaderCommand(). This will ... (diff)
parent* GridServerPostHandler.cs: Try/catch in Handle (diff)
downloadopensim-SC_OLD-a76a1afda84c3b2e23820af9b7f2c5ab3b2b97e0.zip
opensim-SC_OLD-a76a1afda84c3b2e23820af9b7f2c5ab3b2b97e0.tar.gz
opensim-SC_OLD-a76a1afda84c3b2e23820af9b7f2c5ab3b2b97e0.tar.bz2
opensim-SC_OLD-a76a1afda84c3b2e23820af9b7f2c5ab3b2b97e0.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs8
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs55
2 files changed, 38 insertions, 25 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 632b551..56155dd 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -238,7 +238,7 @@ namespace OpenSim.Framework.Servers
238 List<Thread> threads = ThreadTracker.GetThreads(); 238 List<Thread> threads = ThreadTracker.GetThreads();
239 if (threads == null) 239 if (threads == null)
240 { 240 {
241 sb.Append("Thread tracking is only enabled in DEBUG mode."); 241 sb.Append("OpenSim thread tracking is only enabled in DEBUG mode.");
242 } 242 }
243 else 243 else
244 { 244 {
@@ -264,6 +264,12 @@ namespace OpenSim.Framework.Servers
264 } 264 }
265 } 265 }
266 } 266 }
267 int workers = 0, ports = 0, maxWorkers = 0, maxPorts = 0;
268 ThreadPool.GetAvailableThreads(out workers, out ports);
269 ThreadPool.GetMaxThreads(out maxWorkers, out maxPorts);
270
271 sb.Append(Environment.NewLine + "*** ThreadPool threads ***" + Environment.NewLine);
272 sb.Append("workers: " + (maxWorkers - workers) + " (" + maxWorkers + "); ports: " + (maxPorts - ports) + " (" + maxPorts + ")" + Environment.NewLine);
267 273
268 return sb.ToString(); 274 return sb.ToString();
269 } 275 }
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
67 67
68 //m_log.DebugFormat("[XXX]: query String: {0}", body); 68 //m_log.DebugFormat("[XXX]: query String: {0}", body);
69 69
70 Dictionary<string, string> request = 70 try
71 ServerUtils.ParseQueryString(body); 71 {
72 Dictionary<string, string> request =
73 ServerUtils.ParseQueryString(body);
72 74
73 if (!request.ContainsKey("METHOD")) 75 if (!request.ContainsKey("METHOD"))
74 return FailureResult(); 76 return FailureResult();
75 77
76 string method = request["METHOD"]; 78 string method = request["METHOD"];
77 79
78 switch (method) 80 switch (method)
79 { 81 {
80 case "register": 82 case "register":
81 return Register(request); 83 return Register(request);
82 84
83 case "deregister": 85 case "deregister":
84 return Deregister(request); 86 return Deregister(request);
85 87
86 case "get_neighbours": 88 case "get_neighbours":
87 return GetNeighbours(request); 89 return GetNeighbours(request);
88 90
89 case "get_region_by_uuid": 91 case "get_region_by_uuid":
90 return GetRegionByUUID(request); 92 return GetRegionByUUID(request);
91 93
92 case "get_region_by_position": 94 case "get_region_by_position":
93 return GetRegionByPosition(request); 95 return GetRegionByPosition(request);
94 96
95 case "get_region_by_name": 97 case "get_region_by_name":
96 return GetRegionByName(request); 98 return GetRegionByName(request);
97 99
98 case "get_regions_by_name": 100 case "get_regions_by_name":
99 return GetRegionsByName(request); 101 return GetRegionsByName(request);
100 102
101 case "get_region_range": 103 case "get_region_range":
102 return GetRegionRange(request); 104 return GetRegionRange(request);
103 105
106 }
107 m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method);
108 }
109 catch (Exception e)
110 {
111 m_log.DebugFormat("[GRID HANDLER]: Exception {0}", e);
104 } 112 }
105 113
106 m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method);
107 return FailureResult(); 114 return FailureResult();
108 115
109 } 116 }