From 6072fd86675d81c52371ad4d5f2b942a2e00da7f Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 2 Jun 2007 01:34:00 +0000 Subject: [PATCH] * Some commenting on asset server (needs completing) * Removed strip2.png - added defaultstripe.png * World map images are now generated when the terrain is tainted, not yet sent to the grid/asset server. --- .../SQLiteManager.cs | 26 ++++++++++++ .../AssetHttpServer.cs | 37 ++++++++++++++++++ .../OpenGridServices.AssetServer/Main.cs | 1 + OpenSim/OpenSim.RegionServer/world/World.cs | 2 + bin/{stripe3.png => defaultstripe.png} | Bin 5 files changed, 66 insertions(+) rename bin/{stripe3.png => defaultstripe.png} (100%) diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs index 7da16dbff7..87794386ed 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs +++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs @@ -1,3 +1,29 @@ +/* +* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ using System; using System.Collections.Generic; using System.Text; diff --git a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs index 8439e92839..023e4c16a0 100644 --- a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs +++ b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs @@ -1,3 +1,29 @@ +/* +* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ using System; using System.Collections.Generic; using System.Net; @@ -12,13 +38,24 @@ using OpenSim.Servers; namespace OpenGridServices.AssetServer { + /// + /// An HTTP server for sending assets + /// public class AssetHttpServer :BaseHttpServer { + /// + /// Creates the new asset server + /// + /// Port to initalise on public AssetHttpServer(int port) : base(port) { } + /// + /// Handles an HTTP request + /// + /// HTTP State Info public override void HandleRequest(Object stateinfo) { try diff --git a/OpenGridServices/OpenGridServices.AssetServer/Main.cs b/OpenGridServices/OpenGridServices.AssetServer/Main.cs index 0661fc5099..334d3c5b41 100644 --- a/OpenGridServices/OpenGridServices.AssetServer/Main.cs +++ b/OpenGridServices/OpenGridServices.AssetServer/Main.cs @@ -49,6 +49,7 @@ using Db4objects.Db4o.Query; namespace OpenGridServices.AssetServer { /// + /// An asset server /// public class OpenAsset_Main : BaseServer, conscmd_callback { diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs index ef6833ccb8..22beb0e595 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.cs @@ -229,6 +229,8 @@ namespace OpenSim.world Terrain.tainted = 0; OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); localStorage.SaveMap(Terrain.getHeights1D()); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image."); + Terrain.exportImage("map_" + m_regInfo.RegionName + ".png", "defaultstripe.png"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); phyScene.SetTerrain(Terrain.getHeights1D()); diff --git a/bin/stripe3.png b/bin/defaultstripe.png similarity index 100% rename from bin/stripe3.png rename to bin/defaultstripe.png