aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController
diff options
context:
space:
mode:
authorMelanie2013-08-17 03:23:45 +0100
committerMelanie2013-08-17 03:23:45 +0100
commitbef03fb30be67dbe671dcc330558daf8a6c4bb22 (patch)
tree6d221db8af5bdb1a09190527a79aae3dfe3116d9 /OpenSim/ApplicationPlugins/RemoteController
parentMerge branch 'master' into careminster (diff)
parentRemove mono compiler warnings from UserProfilesModule (diff)
downloadopensim-SC-bef03fb30be67dbe671dcc330558daf8a6c4bb22.zip
opensim-SC-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.gz
opensim-SC-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.bz2
opensim-SC-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController')
-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 729667c..f3490fb 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -439,18 +439,26 @@ namespace OpenSim.ApplicationPlugins.RemoteController
439 // k, (string)requestData[k], ((string)requestData[k]).Length); 439 // k, (string)requestData[k], ((string)requestData[k]).Length);
440 // } 440 // }
441 441
442 CheckStringParameters(requestData, responseData, new string[] {"filename", "regionid"}); 442 CheckStringParameters(requestData, responseData, new string[] { "filename" });
443 CheckRegionParams(requestData, responseData); 443 CheckRegionParams(requestData, responseData);
444 444
445 Scene scene = null; 445 Scene scene = null;
446 GetSceneFromRegionParams(requestData, responseData, out scene); 446 GetSceneFromRegionParams(requestData, responseData, out scene);
447 string file = (string)requestData["filename"];
448 447
449 responseData["accepted"] = true; 448 if (scene != null)
449 {
450 string file = (string)requestData["filename"];
450 451
451 LoadHeightmap(file, scene.RegionInfo.RegionID); 452 responseData["accepted"] = true;
452 453
453 responseData["success"] = true; 454 LoadHeightmap(file, scene.RegionInfo.RegionID);
455
456 responseData["success"] = true;
457 }
458 else
459 {
460 responseData["success"] = false;
461 }
454 462
455 m_log.Info("[RADMIN]: Load height maps request complete"); 463 m_log.Info("[RADMIN]: Load height maps request complete");
456 } 464 }
@@ -464,23 +472,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController
464 472
465// m_log.DebugFormat("[RADMIN]: Save Terrain: XmlRpc {0}", request.ToString()); 473// m_log.DebugFormat("[RADMIN]: Save Terrain: XmlRpc {0}", request.ToString());
466 474
467 CheckStringParameters(requestData, responseData, new string[] { "filename", "regionid" }); 475 CheckStringParameters(requestData, responseData, new string[] { "filename" });
468 CheckRegionParams(requestData, responseData); 476 CheckRegionParams(requestData, responseData);
469 477
470 Scene region = null; 478 Scene scene = null;
471 GetSceneFromRegionParams(requestData, responseData, out region); 479 GetSceneFromRegionParams(requestData, responseData, out scene);
472 480
473 string file = (string)requestData["filename"]; 481 if (scene != null)
474 m_log.InfoFormat("[RADMIN]: Terrain Saving: {0}", file); 482 {
483 string file = (string)requestData["filename"];
484 m_log.InfoFormat("[RADMIN]: Terrain Saving: {0}", file);
475 485
476 responseData["accepted"] = true; 486 responseData["accepted"] = true;
477 487
478 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>(); 488 ITerrainModule terrainModule = scene.RequestModuleInterface<ITerrainModule>();
479 if (null == terrainModule) throw new Exception("terrain module not available"); 489 if (null == terrainModule) throw new Exception("terrain module not available");
480 490
481 terrainModule.SaveToFile(file); 491 terrainModule.SaveToFile(file);
482 492
483 responseData["success"] = true; 493 responseData["success"] = true;
494 }
495 else
496 {
497 responseData["success"] = false;
498 }
484 499
485 m_log.Info("[RADMIN]: Save height maps request complete"); 500 m_log.Info("[RADMIN]: Save height maps request complete");
486 } 501 }