aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-17 00:39:41 +0100
committerJustin Clark-Casey (justincc)2013-08-17 00:39:41 +0100
commit14ae89dbe7e06d838fc1bc01cf377d8f0d3eb035 (patch)
treeb3bf1a9dd26f745073893d12e3dcdbba7f6178e2 /OpenSim/ApplicationPlugins
parentAdd ScenePresenceTeleportTests.TestSameSimulatorIsolatedRegionsV2() regressio... (diff)
downloadopensim-SC_OLD-14ae89dbe7e06d838fc1bc01cf377d8f0d3eb035.zip
opensim-SC_OLD-14ae89dbe7e06d838fc1bc01cf377d8f0d3eb035.tar.gz
opensim-SC_OLD-14ae89dbe7e06d838fc1bc01cf377d8f0d3eb035.tar.bz2
opensim-SC_OLD-14ae89dbe7e06d838fc1bc01cf377d8f0d3eb035.tar.xz
Fix issues with RemoteAdmin admin_save_heightmap and admin_load_heightmap not working.
This is because they were wrongly looking for both regionid and region_id parameters in the same request. Now only region_id is required (and recognized), regionid having been already deprecated for some time. This is essentially Michelle Argus' patch from http://opensimulator.org/mantis/view.php?id=6737 but with tabs replaced with spaces. Thanks!
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs45
1 files changed, 30 insertions, 15 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 3abf40b..c78cf3b 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -327,18 +327,26 @@ namespace OpenSim.ApplicationPlugins.RemoteController
327 // k, (string)requestData[k], ((string)requestData[k]).Length); 327 // k, (string)requestData[k], ((string)requestData[k]).Length);
328 // } 328 // }
329 329
330 CheckStringParameters(requestData, responseData, new string[] {"filename", "regionid"}); 330 CheckStringParameters(requestData, responseData, new string[] { "filename" });
331 CheckRegionParams(requestData, responseData); 331 CheckRegionParams(requestData, responseData);
332 332
333 Scene scene = null; 333 Scene scene = null;
334 GetSceneFromRegionParams(requestData, responseData, out scene); 334 GetSceneFromRegionParams(requestData, responseData, out scene);
335 string file = (string)requestData["filename"];
336 335
337 responseData["accepted"] = true; 336 if (scene != null)
337 {
338 string file = (string)requestData["filename"];
338 339
339 LoadHeightmap(file, scene.RegionInfo.RegionID); 340 responseData["accepted"] = true;
340 341
341 responseData["success"] = true; 342 LoadHeightmap(file, scene.RegionInfo.RegionID);
343
344 responseData["success"] = true;
345 }
346 else
347 {
348 responseData["success"] = false;
349 }
342 350
343 m_log.Info("[RADMIN]: Load height maps request complete"); 351 m_log.Info("[RADMIN]: Load height maps request complete");
344 } 352 }
@@ -352,23 +360,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController
352 360
353// m_log.DebugFormat("[RADMIN]: Save Terrain: XmlRpc {0}", request.ToString()); 361// m_log.DebugFormat("[RADMIN]: Save Terrain: XmlRpc {0}", request.ToString());
354 362
355 CheckStringParameters(requestData, responseData, new string[] { "filename", "regionid" }); 363 CheckStringParameters(requestData, responseData, new string[] { "filename" });
356 CheckRegionParams(requestData, responseData); 364 CheckRegionParams(requestData, responseData);
357 365
358 Scene region = null; 366 Scene scene = null;
359 GetSceneFromRegionParams(requestData, responseData, out region); 367 GetSceneFromRegionParams(requestData, responseData, out scene);
360 368
361 string file = (string)requestData["filename"]; 369 if (scene != null)
362 m_log.InfoFormat("[RADMIN]: Terrain Saving: {0}", file); 370 {
371 string file = (string)requestData["filename"];
372 m_log.InfoFormat("[RADMIN]: Terrain Saving: {0}", file);
363 373
364 responseData["accepted"] = true; 374 responseData["accepted"] = true;
365 375
366 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>(); 376 ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
367 if (null == terrainModule) throw new Exception("terrain module not available"); 377 if (null == terrainModule) throw new Exception("terrain module not available");
368 378
369 terrainModule.SaveToFile(file); 379 terrainModule.SaveToFile(file);
370 380
371 responseData["success"] = true; 381 responseData["success"] = true;
382 }
383 else
384 {
385 responseData["success"] = false;
386 }
372 387
373 m_log.Info("[RADMIN]: Save height maps request complete"); 388 m_log.Info("[RADMIN]: Save height maps request complete");
374 } 389 }