diff options
-rw-r--r-- | OpenSim/Framework/Communications/IGridServices.cs | 1 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 5 |
7 files changed, 40 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index 9e34672..39f04c3 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs | |||
@@ -38,6 +38,7 @@ namespace OpenSim.Framework.Communications | |||
38 | /// </summary> | 38 | /// </summary> |
39 | /// <param name="regionInfos"> </param> | 39 | /// <param name="regionInfos"> </param> |
40 | /// <returns></returns> | 40 | /// <returns></returns> |
41 | /// <exception cref="System.Exception">Thrown if region registration failed</exception> | ||
41 | RegionCommsListener RegisterRegion(RegionInfo regionInfos); | 42 | RegionCommsListener RegisterRegion(RegionInfo regionInfos); |
42 | 43 | ||
43 | bool DeregisterRegion(RegionInfo regionInfo); | 44 | bool DeregisterRegion(RegionInfo regionInfo); |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 8ed619c..284ac0c 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -388,7 +388,7 @@ namespace OpenSim.Grid.GridServer | |||
388 | " " + sim.regionLocY + " currently occupied by " + existingSim.regionName); | 388 | " " + sim.regionLocY + " currently occupied by " + existingSim.regionName); |
389 | } | 389 | } |
390 | 390 | ||
391 | return ErrorResponse("The key required to login your region did not match. Please check your send and receive keys."); | 391 | return ErrorResponse("The key required to login your region did not match. Please check your grid send and receive keys."); |
392 | } | 392 | } |
393 | } | 393 | } |
394 | else | 394 | else |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index d910dc4..c7094c7 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -569,7 +569,18 @@ namespace OpenSim | |||
569 | //moved these here as the terrain texture has to be created after the modules are initialized | 569 | //moved these here as the terrain texture has to be created after the modules are initialized |
570 | // and has to happen before the region is registered with the grid. | 570 | // and has to happen before the region is registered with the grid. |
571 | scene.CreateTerrainTexture(true); | 571 | scene.CreateTerrainTexture(true); |
572 | scene.RegisterRegionWithGrid(); | 572 | |
573 | try | ||
574 | { | ||
575 | scene.RegisterRegionWithGrid(); | ||
576 | } | ||
577 | catch (Exception e) | ||
578 | { | ||
579 | m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e); | ||
580 | |||
581 | // Carrying on now causes a lot of confusion down the line - we need to get the user's attention | ||
582 | System.Environment.Exit(1); | ||
583 | } | ||
573 | 584 | ||
574 | // We need to do this after we've initialized the scripting engines. | 585 | // We need to do this after we've initialized the scripting engines. |
575 | scene.StartScripts(); | 586 | scene.StartScripts(); |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 1dcab20..5e0e074 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -129,10 +129,6 @@ namespace OpenSim.Region.ClientStack | |||
129 | 129 | ||
130 | scene.LoadWorldMap(); | 130 | scene.LoadWorldMap(); |
131 | 131 | ||
132 | //moved to opensimMain as these have to happen after modules are initialised | ||
133 | // scene.CreateTerrainTexture(true); | ||
134 | // scene.RegisterRegionWithGrid(); | ||
135 | |||
136 | scene.PhysicsScene = GetPhysicsScene(); | 132 | scene.PhysicsScene = GetPhysicsScene(); |
137 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); | 133 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); |
138 | scene.PhysicsScene.SetWaterLevel(regionInfo.EstateSettings.waterHeight); | 134 | scene.PhysicsScene.SetWaterLevel(regionInfo.EstateSettings.waterHeight); |
@@ -171,4 +167,4 @@ namespace OpenSim.Region.ClientStack | |||
171 | protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 167 | protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, |
172 | AgentCircuitManager circuitManager); | 168 | AgentCircuitManager circuitManager); |
173 | } | 169 | } |
174 | } \ No newline at end of file | 170 | } |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index eada868..03fd448 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
94 | // see IGridServices | 94 | // see IGridServices |
95 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) | 95 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) |
96 | { | 96 | { |
97 | m_log.DebugFormat( | 97 | m_log.InfoFormat( |
98 | "[OGS1 GRID SERVICES]: Attempting to register region {0} with grid at {1}", | 98 | "[OGS1 GRID SERVICES]: Attempting to register region {0} with grid at {1}", |
99 | regionInfo.RegionName, serversInfo.GridURL); | 99 | regionInfo.RegionName, serversInfo.GridURL); |
100 | 100 | ||
@@ -137,14 +137,16 @@ namespace OpenSim.Region.Communications.OGS1 | |||
137 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | 137 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); |
138 | GridResp = GridReq.Send(serversInfo.GridURL, 30000); | 138 | GridResp = GridReq.Send(serversInfo.GridURL, 30000); |
139 | } | 139 | } |
140 | catch (Exception ex) | 140 | catch (Exception e) |
141 | { | 141 | { |
142 | m_log.ErrorFormat( | 142 | Exception e2 |
143 | "[OGS1 GRID SERVICES]: Unable to connect to grid at {0}. Grid server not running? Exception {1}", | 143 | = new Exception( |
144 | serversInfo.GridURL, ex); | 144 | String.Format("Unable to connect to grid at {0}. Grid service not running?", serversInfo.GridURL), |
145 | e); | ||
145 | 146 | ||
146 | throw(ex); | 147 | throw(e2); |
147 | } | 148 | } |
149 | |||
148 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 150 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
149 | Hashtable griddatahash = GridRespData; | 151 | Hashtable griddatahash = GridRespData; |
150 | 152 | ||
@@ -152,11 +154,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
152 | if (GridRespData.ContainsKey("error")) | 154 | if (GridRespData.ContainsKey("error")) |
153 | { | 155 | { |
154 | string errorstring = (string) GridRespData["error"]; | 156 | string errorstring = (string) GridRespData["error"]; |
155 | m_log.ErrorFormat( | ||
156 | "[OGS1 GRID SERVICES]: Unable to connect to grid at {0}: {1}", | ||
157 | serversInfo.GridURL, errorstring); | ||
158 | 157 | ||
159 | return null; | 158 | Exception e = new Exception(String.Format("Unable to connect to grid at {0}: {1}", serversInfo.GridURL, errorstring)); |
159 | |||
160 | throw e; | ||
160 | } | 161 | } |
161 | else | 162 | else |
162 | { | 163 | { |
@@ -292,7 +293,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
292 | 293 | ||
293 | if (responseData.ContainsKey("error")) | 294 | if (responseData.ContainsKey("error")) |
294 | { | 295 | { |
295 | Console.WriteLine("error received from grid server" + responseData["error"]); | 296 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Error received from grid server: {0}", responseData["error"]); |
296 | return null; | 297 | return null; |
297 | } | 298 | } |
298 | 299 | ||
@@ -355,7 +356,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
355 | 356 | ||
356 | if (responseData.ContainsKey("error")) | 357 | if (responseData.ContainsKey("error")) |
357 | { | 358 | { |
358 | m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server" + responseData["error"]); | 359 | m_log.Error("[OGS1 GRID SERVICES]: Error received from grid server: " + responseData["error"]); |
359 | return null; | 360 | return null; |
360 | } | 361 | } |
361 | 362 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e8a6c45..e18c467 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -924,13 +924,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
924 | } | 924 | } |
925 | } | 925 | } |
926 | 926 | ||
927 | /// <summary> | ||
928 | /// Register this region with a grid service | ||
929 | /// </summary> | ||
930 | /// <exception cref="System.Exception">Thrown if registration of the region itself fails.</exception> | ||
927 | public void RegisterRegionWithGrid() | 931 | public void RegisterRegionWithGrid() |
928 | { | 932 | { |
929 | RegisterCommsEvents(); | 933 | RegisterCommsEvents(); |
934 | |||
930 | // These two 'commands' *must be* next to each other or sim rebooting fails. | 935 | // These two 'commands' *must be* next to each other or sim rebooting fails. |
931 | m_sceneGridService.RegisterRegion(RegionInfo); | 936 | m_sceneGridService.RegisterRegion(RegionInfo); |
932 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); | 937 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); |
938 | |||
933 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); | 939 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); |
940 | |||
934 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) | 941 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) |
935 | { | 942 | { |
936 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 943 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 91bbdb7..5ef4a7d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -84,6 +84,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
84 | m_commsProvider.InterRegion.rdebugRegionName = _debugRegionName; | 84 | m_commsProvider.InterRegion.rdebugRegionName = _debugRegionName; |
85 | } | 85 | } |
86 | 86 | ||
87 | /// <summary> | ||
88 | /// Register a region with the grid | ||
89 | /// </summary> | ||
90 | /// <param name="regionInfos"></param> | ||
91 | /// <exception cref="System.Exception">Thrown if region registration fails.</exception> | ||
87 | public void RegisterRegion(RegionInfo regionInfos) | 92 | public void RegisterRegion(RegionInfo regionInfos) |
88 | { | 93 | { |
89 | m_regionInfo = regionInfos; | 94 | m_regionInfo = regionInfos; |