Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster

avinationmerge
Melanie 2012-01-30 16:44:26 +00:00
commit ad02e01e77
5 changed files with 37 additions and 10 deletions

View File

@ -263,6 +263,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Scene rebootedScene = null; Scene rebootedScene = null;
GetSceneFromRegionParams(requestData, responseData, out rebootedScene); GetSceneFromRegionParams(requestData, responseData, out rebootedScene);
IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
responseData["success"] = false; responseData["success"] = false;
responseData["accepted"] = true; responseData["accepted"] = true;
responseData["rebooting"] = true; responseData["rebooting"] = true;
@ -273,6 +275,23 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requestData.ContainsKey("alerts")) if (requestData.ContainsKey("alerts"))
{ {
string[] alertTimes = requestData["alerts"].ToString().Split( new char[] {','}); string[] alertTimes = requestData["alerts"].ToString().Split( new char[] {','});
if (alertTimes.Length == 1 && Convert.ToInt32(alertTimes[0]) == -1)
{
if (restartModule != null)
{
message = "Restart has been cancelled";
if (requestData.ContainsKey("message"))
message = requestData["message"].ToString();
restartModule.AbortRestart(message);
responseData["success"] = true;
responseData["rebooting"] = false;
return;
}
}
foreach (string a in alertTimes) foreach (string a in alertTimes)
times.Add(Convert.ToInt32(a)); times.Add(Convert.ToInt32(a));
} }
@ -305,7 +324,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
notice = false; notice = false;
} }
IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
if (restartModule != null) if (restartModule != null)
{ {
restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice); restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);

View File

@ -2766,7 +2766,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
reply.Data.ParcelID = parcelID; reply.Data.ParcelID = parcelID;
reply.Data.OwnerID = land.OwnerID; reply.Data.OwnerID = land.OwnerID;
reply.Data.Name = Utils.StringToBytes(land.Name); reply.Data.Name = Utils.StringToBytes(land.Name);
reply.Data.Desc = Utils.StringToBytes(land.Description); reply.Data.Desc = Utils.StringToBytes(land.Description.Substring(0, land.Description.Length > 254 ? 254: land.Description.Length));
reply.Data.ActualArea = land.Area; reply.Data.ActualArea = land.Area;
reply.Data.BillableArea = land.Area; // TODO: what is this? reply.Data.BillableArea = land.Area; // TODO: what is this?

View File

@ -256,6 +256,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>(); IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>();
if (restartModule != null) if (restartModule != null)
{ {
if (timeInSeconds == -1)
{
restartModule.AbortRestart("Restart aborted by region manager");
return;
}
List<int> times = new List<int>(); List<int> times = new List<int>();
while (timeInSeconds > 0) while (timeInSeconds > 0)
{ {

View File

@ -190,10 +190,10 @@ namespace OpenSim.Region.CoreModules.World.Land
else else
{ {
// Normal Calculations // Normal Calculations
int parcelMax = (int)((double)(LandData.Area int parcelMax = (int)((long)LandData.Area
* m_scene.RegionInfo.ObjectCapacity) * (long)m_scene.RegionInfo.ObjectCapacity
* m_scene.RegionInfo.RegionSettings.ObjectBonus) * (long)m_scene.RegionInfo.RegionSettings.ObjectBonus
/ 65536; / 65536L);
m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax); m_log.DebugFormat("Area: {0}, Capacity {1}, Bonus {2}, Parcel {3}", LandData.Area, m_scene.RegionInfo.ObjectCapacity, m_scene.RegionInfo.RegionSettings.ObjectBonus, parcelMax);
return parcelMax; return parcelMax;
} }
@ -208,9 +208,9 @@ namespace OpenSim.Region.CoreModules.World.Land
else else
{ {
// Normal Calculations // Normal Calculations
int parcelMax = LandData.Area int parcelMax = (int)((long)LandData.Area
* m_scene.RegionInfo.ObjectCapacity * (long)m_scene.RegionInfo.ObjectCapacity
/ 65536; / 65536L);
return parcelMax; return parcelMax;
} }
} }
@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Land
//Normal Calculations //Normal Calculations
int simMax = (int)((long)LandData.SimwideArea int simMax = (int)((long)LandData.SimwideArea
* (long)m_scene.RegionInfo.ObjectCapacity / 65536L); * (long)m_scene.RegionInfo.ObjectCapacity / 65536L);
m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}", LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax); // m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}", LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax);
return simMax; return simMax;
} }
} }

View File

@ -240,6 +240,9 @@ namespace OpenSim.Region.CoreModules.World.Region
if (m_DialogModule != null && message != String.Empty) if (m_DialogModule != null && message != String.Empty)
m_DialogModule.SendGeneralAlert(message); m_DialogModule.SendGeneralAlert(message);
} }
if (m_MarkerPath != String.Empty)
File.Delete(Path.Combine(m_MarkerPath,
m_Scene.RegionInfo.RegionID.ToString()));
} }
private void HandleRegionRestart(string module, string[] args) private void HandleRegionRestart(string module, string[] args)