Update svn properties, add copyright header, formatting cleanup.
parent
c266df0dfe
commit
54ccca1e2c
|
@ -227,7 +227,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
// them easy to reach from anywhere in the assembly.
|
||||
|
||||
Rest.main = openSim;
|
||||
if(Rest.main == null)
|
||||
if (Rest.main == null)
|
||||
throw new Exception("OpenSim base pointer is null");
|
||||
|
||||
Rest.Plugin = this;
|
||||
|
|
|
@ -503,7 +503,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
req.Params = transferRequest.TransferInfo.Params;
|
||||
req.AssetInf = new AssetInfo(asset);
|
||||
req.NumPackets = CalculateNumPackets(asset.Data);
|
||||
lock(AssetRequests) AssetRequests.Add(req);
|
||||
lock (AssetRequests) AssetRequests.Add(req);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -526,7 +526,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
lock(AssetRequests)
|
||||
lock (AssetRequests)
|
||||
{
|
||||
req = AssetRequests[0];
|
||||
AssetRequests.RemoveAt(0);
|
||||
|
|
|
@ -1,8 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* 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 OpenSimulator Project 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 THE CONTRIBUTORS 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 OpenMetaverse;
|
||||
|
||||
|
||||
namespace OpenSim.Framework.Communications
|
||||
{
|
||||
public interface IAuthentication
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
|
||||
"POST", m_RestURL+"/SaveMessage/", im);
|
||||
|
||||
if(im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
|
||||
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
|
||||
{
|
||||
IClientAPI client = FindClient(new UUID(im.fromAgentID));
|
||||
if (client == null)
|
||||
|
|
|
@ -66,18 +66,17 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
/// <param name="data"></param>
|
||||
public void ReturnData(UUID id, byte[] data)
|
||||
{
|
||||
DynamicTextureUpdater updater = null;
|
||||
|
||||
DynamicTextureUpdater updater = null;
|
||||
|
||||
lock(Updaters)
|
||||
lock (Updaters)
|
||||
{
|
||||
if (Updaters.ContainsKey(id))
|
||||
{
|
||||
updater = Updaters[id];
|
||||
if (Updaters.ContainsKey(id))
|
||||
{
|
||||
updater = Updaters[id];
|
||||
}
|
||||
}
|
||||
|
||||
if(updater != null)
|
||||
if (updater != null)
|
||||
{
|
||||
if (RegisteredScenes.ContainsKey(updater.SimUUID))
|
||||
{
|
||||
|
@ -86,27 +85,26 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
}
|
||||
}
|
||||
|
||||
if(updater.UpdateTimer == 0)
|
||||
{
|
||||
lock(Updaters)
|
||||
{
|
||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||
{
|
||||
Updaters.Remove(updater.UpdaterID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (updater.UpdateTimer == 0)
|
||||
{
|
||||
lock (Updaters)
|
||||
{
|
||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||
{
|
||||
Updaters.Remove(updater.UpdaterID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
|
||||
string extraParams, int updateTimer)
|
||||
string extraParams, int updateTimer)
|
||||
{
|
||||
return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255);
|
||||
}
|
||||
|
||||
public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
|
||||
string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
|
||||
string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
|
||||
{
|
||||
if (RenderPlugins.ContainsKey(contentType))
|
||||
{
|
||||
|
@ -123,12 +121,12 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
updater.BlendWithOldTexture = SetBlending;
|
||||
updater.FrontAlpha = AlphaValue;
|
||||
|
||||
lock(Updaters)
|
||||
lock (Updaters)
|
||||
{
|
||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||
{
|
||||
Updaters.Add(updater.UpdaterID, updater);
|
||||
}
|
||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||
{
|
||||
Updaters.Add(updater.UpdaterID, updater);
|
||||
}
|
||||
}
|
||||
|
||||
RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams);
|
||||
|
@ -138,13 +136,13 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
}
|
||||
|
||||
public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
|
||||
string extraParams, int updateTimer)
|
||||
string extraParams, int updateTimer)
|
||||
{
|
||||
return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255);
|
||||
}
|
||||
|
||||
public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
|
||||
string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
|
||||
string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
|
||||
{
|
||||
if (RenderPlugins.ContainsKey(contentType))
|
||||
{
|
||||
|
@ -159,12 +157,12 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
updater.BlendWithOldTexture = SetBlending;
|
||||
updater.FrontAlpha = AlphaValue;
|
||||
|
||||
lock(Updaters)
|
||||
lock (Updaters)
|
||||
{
|
||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||
{
|
||||
Updaters.Add(updater.UpdaterID, updater);
|
||||
}
|
||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||
{
|
||||
Updaters.Add(updater.UpdaterID, updater);
|
||||
}
|
||||
}
|
||||
|
||||
RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
|
||||
|
@ -173,7 +171,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
return UUID.Zero;
|
||||
}
|
||||
|
||||
|
||||
public void GetDrawStringSize(string contentType, string text, string fontName, int fontSize,
|
||||
out double xSize, out double ySize)
|
||||
{
|
||||
|
@ -307,7 +304,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
part.ScheduleFullUpdate();
|
||||
|
||||
scene.CommsManager.AssetCache.ExpireAsset(oldID);
|
||||
|
||||
}
|
||||
|
||||
private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
|
||||
|
|
|
@ -4998,29 +4998,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
if (dir.x == 0)
|
||||
{
|
||||
if (dir.y == 0)
|
||||
{
|
||||
// Direction vector is 0,0 so return
|
||||
// false since we're staying in the sim
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Y is the only valid direction
|
||||
edge.y = dir.y / Math.Abs(dir.y);
|
||||
}
|
||||
if (dir.y == 0)
|
||||
{
|
||||
// Direction vector is 0,0 so return
|
||||
// false since we're staying in the sim
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Y is the only valid direction
|
||||
edge.y = dir.y / Math.Abs(dir.y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LSL_Float mag;
|
||||
if (dir.x > 0)
|
||||
{
|
||||
if (dir.x > 0)
|
||||
{
|
||||
mag = (Constants.RegionSize - pos.x) / dir.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
mag = (pos.x/dir.x);
|
||||
}
|
||||
}
|
||||
|
||||
mag = Math.Abs(mag);
|
||||
|
||||
|
@ -5028,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
if (edge.y > Constants.RegionSize || edge.y < 0)
|
||||
{
|
||||
// Y goes out of bounds first
|
||||
// Y goes out of bounds first
|
||||
edge.y = dir.y / Math.Abs(dir.y);
|
||||
}
|
||||
else
|
||||
|
@ -5039,18 +5039,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
}
|
||||
|
||||
List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY);
|
||||
List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY);
|
||||
|
||||
uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
|
||||
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
|
||||
uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
|
||||
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
|
||||
|
||||
foreach (SimpleRegionInfo sri in neighbors)
|
||||
{
|
||||
if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY)
|
||||
return 0;
|
||||
}
|
||||
foreach (SimpleRegionInfo sri in neighbors)
|
||||
{
|
||||
if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -50,7 +50,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
|||
return localID.ToString() + itemID.ToString();
|
||||
}
|
||||
|
||||
|
||||
private class TimerClass
|
||||
{
|
||||
public uint localID;
|
||||
|
|
|
@ -231,8 +231,8 @@
|
|||
|
||||
[Communications]
|
||||
|
||||
;InterregionComms = "LocalComms"
|
||||
InterregionComms = "RESTComms"
|
||||
;InterregionComms = "LocalComms"
|
||||
InterregionComms = "RESTComms"
|
||||
|
||||
[StandAlone]
|
||||
accounts_authenticate = true
|
||||
|
@ -579,16 +579,16 @@ InterregionComms = "RESTComms"
|
|||
|
||||
|
||||
[RestHandler]
|
||||
; Change this to true to enable the REST Asset and Inventory Plugin
|
||||
enabled = false
|
||||
authenticate=true
|
||||
secured=true
|
||||
extended-escape=true
|
||||
realm=OpenSim REST
|
||||
dump-asset=false
|
||||
path-fill=true
|
||||
dump-line-size=32
|
||||
flush-on-error=true
|
||||
; Change this to true to enable the REST Asset and Inventory Plugin
|
||||
enabled = false
|
||||
authenticate = true
|
||||
secured = true
|
||||
extended-escape = true
|
||||
realm = OpenSim REST
|
||||
dump-asset = false
|
||||
path-fill = true
|
||||
dump-line-size = 32
|
||||
flush-on-error = true
|
||||
|
||||
|
||||
; Uncomment the following for IRC bridge
|
||||
|
@ -1122,16 +1122,16 @@ InterregionComms = "RESTComms"
|
|||
; default is false
|
||||
enabled = false
|
||||
|
||||
; Channel on which to signal region readiness through a message
|
||||
; formatted as follows: "{server_startup|oar_file_load},{0|1},n,[oar error]"
|
||||
; - the first field indicating whether this is an initial server startup
|
||||
; - the second field is a number indicating whether the OAR file loaded ok (1 == ok, 0 == error)
|
||||
; - the third field is a number indicating how many scripts failed to compile
|
||||
; - "oar error" if supplied, provides the error message from the OAR load
|
||||
; Channel on which to signal region readiness through a message
|
||||
; formatted as follows: "{server_startup|oar_file_load},{0|1},n,[oar error]"
|
||||
; - the first field indicating whether this is an initial server startup
|
||||
; - the second field is a number indicating whether the OAR file loaded ok (1 == ok, 0 == error)
|
||||
; - the third field is a number indicating how many scripts failed to compile
|
||||
; - "oar error" if supplied, provides the error message from the OAR load
|
||||
channel_notify = -800
|
||||
|
||||
|
||||
[MRM]
|
||||
; Enables the Mini Region Modules Script Engine. WARNING: SECURITY RISK.
|
||||
; default is false
|
||||
Enabled = false
|
||||
Enabled = false
|
||||
|
|
Loading…
Reference in New Issue