diff options
author | Adam Frisby | 2008-03-11 15:48:50 +0000 |
---|---|---|
committer | Adam Frisby | 2008-03-11 15:48:50 +0000 |
commit | b40957b57c040ffab58a4a52015fba625909ea6f (patch) | |
tree | 751fc9fc31997f90528e35e8d43d8a8d608df69c | |
parent | Eliminated several compiler warning messages (diff) | |
download | opensim-SC_OLD-b40957b57c040ffab58a4a52015fba625909ea6f.zip opensim-SC_OLD-b40957b57c040ffab58a4a52015fba625909ea6f.tar.gz opensim-SC_OLD-b40957b57c040ffab58a4a52015fba625909ea6f.tar.bz2 opensim-SC_OLD-b40957b57c040ffab58a4a52015fba625909ea6f.tar.xz |
* Applying patch from Mantis #607 - Grid Server crash. Thanks Diva.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 568f3f2..5ea2a3a 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -239,9 +239,10 @@ namespace OpenSim.Grid.GridServer | |||
239 | 239 | ||
240 | Hashtable requestData = (Hashtable)request.Params[0]; | 240 | Hashtable requestData = (Hashtable)request.Params[0]; |
241 | string myword; | 241 | string myword; |
242 | if (requestData.ContainsKey("UUID")) | 242 | LLUUID uuid; |
243 | if (requestData.ContainsKey("UUID") && LLUUID.TryParse((string)requestData["UUID"], out uuid)) | ||
243 | { | 244 | { |
244 | TheSim = getRegion(new LLUUID((string)requestData["UUID"])); | 245 | TheSim = getRegion(uuid); |
245 | 246 | ||
246 | // logToDB((new LLUUID((string)requestData["UUID"])).ToString(),"XmlRpcSimulatorLoginMethod",String.Empty, 5,"Region attempting login with UUID."); | 247 | // logToDB((new LLUUID((string)requestData["UUID"])).ToString(),"XmlRpcSimulatorLoginMethod",String.Empty, 5,"Region attempting login with UUID."); |
247 | } | 248 | } |
@@ -275,14 +276,25 @@ namespace OpenSim.Grid.GridServer | |||
275 | TheSim.regionUserSendKey = config.UserSendKey; | 276 | TheSim.regionUserSendKey = config.UserSendKey; |
276 | TheSim.regionUserRecvKey = config.UserRecvKey; | 277 | TheSim.regionUserRecvKey = config.UserRecvKey; |
277 | 278 | ||
278 | TheSim.serverIP = (string)requestData["sim_ip"]; | 279 | try |
279 | TheSim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); | 280 | { |
280 | TheSim.httpPort = Convert.ToUInt32((string)requestData["http_port"]); | 281 | TheSim.serverIP = (string)requestData["sim_ip"]; |
281 | TheSim.remotingPort = Convert.ToUInt32((string)requestData["remoting_port"]); | 282 | TheSim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); |
282 | TheSim.regionLocX = Convert.ToUInt32((string)requestData["region_locx"]); | 283 | TheSim.httpPort = Convert.ToUInt32((string)requestData["http_port"]); |
283 | TheSim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); | 284 | TheSim.remotingPort = Convert.ToUInt32((string)requestData["remoting_port"]); |
284 | TheSim.regionLocZ = 0; | 285 | TheSim.regionLocX = Convert.ToUInt32((string)requestData["region_locx"]); |
285 | TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]); | 286 | TheSim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); |
287 | TheSim.regionLocZ = 0; | ||
288 | } | ||
289 | catch (FormatException) | ||
290 | { | ||
291 | m_log.Info("[GRID]: invalid login parameters, ignoring."); | ||
292 | responseData["error"] = "Wrong format in login parameters. Please verify them."; | ||
293 | return response; | ||
294 | } | ||
295 | LLUUID textureID = LLUUID.Zero; | ||
296 | if (LLUUID.TryParse((string)requestData["map-image-id"], out textureID)) | ||
297 | TheSim.regionMapTextureID = textureID; | ||
286 | 298 | ||
287 | // part of an initial brutish effort to provide accurate information (as per the xml region spec) | 299 | // part of an initial brutish effort to provide accurate information (as per the xml region spec) |
288 | // wrt the ownership of a given region | 300 | // wrt the ownership of a given region |