Compare commits

...

58 Commits

Author SHA1 Message Date
Fernando Oliveira
2d065bd327 Merge branch 'master' of https://github.com/ffoliveira/opensimulator
Conflicts:
	CONTRIBUTORS.txt
	OpenSim/Framework/Monitoring/BaseStatsCollector.cs
	OpenSim/Framework/Monitoring/MemoryWatchdog.cs
	OpenSim/Framework/Servers/MainServer.cs
	OpenSim/Framework/Util.cs
	OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
	OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
	OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
	OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
	OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
	OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
	OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
	OpenSim/Region/Framework/Interfaces/ISoundModule.cs
	OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
	OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
	OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
	OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
	OpenSim/Services/HypergridService/GatekeeperService.cs
	OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
	bin/OpenMetaverse.Rendering.Meshmerizer.dll
	bin/OpenMetaverse.dll.config
2013-07-04 14:55:49 -03:00
Fernando Oliveira
81c484d713 Merge branch 'master' of https://github.com/nebadon2025/opensimulator
Conflicts:
	OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs
	OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs
	OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs
	OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
	OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
	OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs
	OpenSim/Capabilities/Properties/AssemblyInfo.cs
	OpenSim/ConsoleClient/Properties/AssemblyInfo.cs
	OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs
	OpenSim/Data/MySQL/Properties/AssemblyInfo.cs
	OpenSim/Data/Null/Properties/AssemblyInfo.cs
	OpenSim/Data/Properties/AssemblyInfo.cs
	OpenSim/Data/SQLite/Properties/AssemblyInfo.cs
	OpenSim/Framework/AssemblyInfo.cs
	OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
	OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
	OpenSim/Framework/Configuration/HTTP/Properties/AssemblyInfo.cs
	OpenSim/Framework/Configuration/XML/Properties/AssemblyInfo.cs
	OpenSim/Framework/Console/AssemblyInfo.cs
	OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
	OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
	OpenSim/Framework/Monitoring/Stats/Stat.cs
	OpenSim/Framework/Monitoring/StatsManager.cs
	OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs
	OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs
	OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
	OpenSim/Framework/Servers/BaseOpenSimServer.cs
	OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
	OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
	OpenSim/Framework/Servers/Properties/AssemblyInfo.cs
	OpenSim/Framework/Servers/ServerBase.cs
	OpenSim/Region/Application/OpenSim.cs
	OpenSim/Region/Application/OpenSimBase.cs
	OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
	OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
	OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
	OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
	OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
	OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
	OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
	OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
	OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
	OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
	OpenSim/Region/CoreModules/Framework/Statistics/Logging/LogWriter.cs
	OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
	OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
	OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
	OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
	OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
	OpenSim/Region/DataSnapshot/Properties/AssemblyInfo.cs
	OpenSim/Region/Framework/Properties/AssemblyInfo.cs
	OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
	OpenSim/Region/Framework/Scenes/EventManager.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/Framework/Scenes/SceneManager.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
	OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
	OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs
	OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
	OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
	OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
	OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
	OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs
	OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
	OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
	OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
	OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
	OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
	OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
	OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
	OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
	OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
	OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
	OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
	OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
	OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
	OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
	OpenSim/Region/Physics/BulletSPlugin/Properties/AssemblyInfo.cs
	OpenSim/Region/Physics/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
	OpenSim/Region/Physics/Manager/AssemblyInfo.cs
	OpenSim/Region/Physics/Meshing/Properties/AssemblyInfo.cs
	OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
	OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs
	OpenSim/Region/RegionCombinerModule/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
	OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
	OpenSim/Region/UserStatistics/Properties/AssemblyInfo.cs
	OpenSim/Server/Base/Properties/AssemblyInfo.cs
	OpenSim/Server/Base/ServicesServerBase.cs
	OpenSim/Server/Handlers/Properties/AssemblyInfo.cs
	OpenSim/Server/Properties/AssemblyInfo.cs
	OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
	OpenSim/Services/AssetService/XAssetService.cs
	OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
	OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
	OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
	OpenSim/Services/Base/Properties/AssemblyInfo.cs
	OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
	OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
	OpenSim/Services/Friends/Properties/AssemblyInfo.cs
	OpenSim/Services/GridService/Properties/AssemblyInfo.cs
	OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
	OpenSim/Services/HypergridService/UserAgentService.cs
	OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
	OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
	OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
	OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
	OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
	OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs
	OpenSim/Tests/Common/Helpers/SceneHelpers.cs
	OpenSim/Tests/Common/Mock/TestScene.cs
	OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs
	OpenSim/Tools/Configger/Properties/AssemblyInfo.cs
	OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs
	ThirdParty/SmartThreadPool/AssemblyInfo.cs
	bin/OpenMetaverse.StructuredData.dll
	bin/OpenMetaverse.dll
	bin/OpenMetaverseTypes.dll
	bin/OpenSim.ini.example
	bin/OpenSimDefaults.ini
	bin/Robust.HG.ini.example
	bin/Robust.ini.example
	bin/config-include/StandaloneCommon.ini.example
	bin/lib32/BulletSim.dll
	bin/lib32/libBulletSim.so
	bin/lib64/BulletSim.dll
	bin/lib64/libBulletSim.so
	prebuild.xml
2013-04-17 23:41:43 -03:00
Fernando Oliveira
335687c846 Merge branch 'master' of https://github.com/ffoliveira/opensimulator
Conflicts:
	.gitignore
	OpenSim/Data/IXGroupData.cs
	OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
2013-03-14 23:53:10 -03:00
Fernando Oliveira
cdbf39ddba Added MySQL/MySQLXGroupData.cs 2013-01-17 16:55:40 -02:00
Fernando Oliveira
269e20ca11 Rolled back to the nebadon source 2013-01-17 14:03:14 -02:00
Fernando Oliveira
0bcd3860cf Merge branch 'master' of https://github.com/ffoliveira/opensimulator
Conflicts:
	OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
2013-01-17 11:44:07 -02:00
Fernando Oliveira
94b5ea1b5a Merge remote-tracking branch 'upstream/master'
Conflicts:
	.gitignore
	OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
2013-01-17 11:41:46 -02:00
Fernando Oliveira
9106d82382 Merge remote-tracking branch 'upstream/master'
Conflicts:
	.gitignore
	OpenSim/Framework/Console/ConsoleUtil.cs
	OpenSim/Region/Application/OpenSim.cs
	OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
	OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
	OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
	OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
	OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
	OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
	OpenSim/Region/Framework/Scenes/EventManager.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
	OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
	OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs
	OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
	OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
	OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
	OpenSim/Region/Physics/BulletSPlugin/BSHingeConstraint.cs
	OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
	OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
	OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
	OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs
	OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
	OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
	OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs
	OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
	OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
	OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
	OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
	OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
	OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
	OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
	OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
	OpenSim/Region/Physics/Manager/PhysicsActor.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
	OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
	OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
	OpenSim/Region/UserStatistics/WebStatsModule.cs
	OpenSim/Server/Base/ServicesServerBase.cs
	OpenSim/Server/ServerMain.cs
	bin/OpenMetaverse.dll.config
	bin/OpenSim.ini.example
	bin/OpenSimDefaults.ini
	bin/Robust.HG.ini.example
	bin/Robust.ini.example
	bin/config-include/GridCommon.ini.example
	bin/lib32/BulletSim.dll
	bin/lib32/libBulletSim.so
	bin/lib64/BulletSim.dll
	bin/lib64/libBulletSim.so
2013-01-16 23:08:55 -02:00
Fernando Oliveira
5d3d600b2e Merge remote-tracking branch 'upstream/master'
Conflicts:
	OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
2013-01-16 22:15:01 -02:00
Fernando Oliveira
31a43c7fbc Merge remote-tracking branch 'upstream/master' 2012-09-18 00:45:31 -03:00
Fernando Oliveira
82fd8c46ea Merge remote-tracking branch 'upstream/master'
Conflicts:
	OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
2012-09-15 14:20:33 -03:00
Fernando Oliveira
0ce8a5f76a added PostGreSQL support 2012-09-15 13:38:19 -03:00
Fernando Oliveira
34114c4e28 Merge remote-tracking branch 'upstream/master' 2012-08-19 22:59:24 -03:00
Fernando Oliveira
f839385af9 Merge remote-tracking branch 'upstream/master' 2012-05-03 20:11:24 -03:00
Fernando Oliveira
a6bce45692 Merge remote-tracking branch 'upstream/master' 2012-05-02 20:52:41 -03:00
Fernando Oliveira
7615d12148 Merge remote-tracking branch 'upstream/master' 2012-04-29 13:32:32 -03:00
Fernando Oliveira
0365fec926 Merge remote-tracking branch 'upstream/master' 2012-04-19 23:09:07 -03:00
Fernando Oliveira
53d21bcb50 Merge remote-tracking branch 'upstream/master' 2012-04-17 23:59:40 -03:00
Fernando Oliveira
c45392c17e Merge remote-tracking branch 'upstream/master' 2012-04-01 23:23:42 -03:00
Fernando Oliveira
7ac437987a Merge branch 'master' of https://github.com/ffoliveira/opensimulator
Conflicts:
	bin/lib32/BulletSim.dll
	bin/lib64/BulletSim.dll
2012-03-30 00:52:48 -03:00
Fernando Oliveira
9e17b07e8b Merge remote-tracking branch 'upstream/master' 2012-03-30 00:47:21 -03:00
Fernando Oliveira
8600ea2763 Merge branch 'master' into myideas 2012-03-27 00:45:13 -03:00
Fernando Oliveira
cd6fe5c4e6 Merge remote-tracking branch 'upstream/master' 2012-03-25 20:16:27 -03:00
Fernando Oliveira
64884bf65c Merge remote-tracking branch 'upstream/master' 2012-03-24 00:25:01 -03:00
Fernando Oliveira
c01db95f48 Merge remote-tracking branch 'remotes/upstream/master' into myideas
Started to implement GetEmptyCoordinates
2012-03-15 01:33:41 -03:00
Fernando Oliveira
3fbadb79ba Merge branch 'master' of https://github.com/ffoliveira/opensimulator
Conflicts:
	OpenSim/Region/Application/OpenSimBase.cs
	bin/OpenSim.ini.example
2012-03-10 20:40:26 -03:00
Fernando Oliveira
6eeba80d2a Merge remote-tracking branch 'upstream/master' 2012-03-10 20:31:40 -03:00
Fernando Oliveira
04431fcb01 Merge remote-tracking branch 'upstream/master'
Conflicts:
	OpenSim/Region/Application/OpenSimBase.cs
	bin/OpenSim.ini.example
2012-03-10 20:31:30 -03:00
Fernando Oliveira
bbe9af5576 Merge remote-tracking branch 'upstream/master'
Conflicts:
	OpenSim/Region/Application/OpenSimBase.cs
	bin/OpenSim.ini.example
2012-03-10 00:34:16 -03:00
Fernando Oliveira
6b4e4da89e Merge remote-tracking branch 'upstream/master' 2012-03-09 20:14:39 -03:00
Fernando Oliveira
b6e963c830 Merge branch 'master' of https://github.com/ffoliveira/opensimulator 2012-03-09 20:11:24 -03:00
Fernando Oliveira
8ea08cf4b4 merge changes from opensim 2012-03-09 20:11:02 -03:00
Fernando Oliveira
d92fc1dfb3 merge changes from opensim 2012-03-09 20:09:13 -03:00
Fernando Oliveira
83c018ebcd Merge remote-tracking branch 'upstream/master'
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2012-03-06 23:32:20 -03:00
Fernando Oliveira
cf763b8306 Merge remote-tracking branch 'upstream/master' 2012-02-29 23:09:00 -03:00
Fernando Oliveira
5cda6ab754 Merge remote-tracking branch 'upstream/master' 2012-02-25 00:48:11 -02:00
Fernando Oliveira
6f6e05d775 Optimizations on osSetDynamicTextureURL function to reduce memory leak 2012-02-24 01:29:18 -02:00
Fernando Oliveira
c07fdc6ac4 Merge remote-tracking branch 'upstream/master' 2012-02-23 13:21:14 -02:00
Fernando Oliveira
2e6f5f6bcd Changed the Estate first letter keys to uppercase 2012-02-23 13:16:47 -02:00
Fernando Oliveira
705b3fe414 Merge remote-tracking branch 'upstream/master' 2012-02-20 22:53:27 -02:00
Fernando Oliveira
55aaea8b91 Just added Maptile default to UUID.Zero 2012-02-20 22:53:22 -02:00
Fernando Oliveira
f4e32350ed Changed back to generate maptiles when there are no MaptileStaticUUID at regions.ini 2012-02-15 15:55:02 -02:00
Fernando Oliveira
58f5e4b47a Merge branch 'master' of https://github.com/ffoliveira/opensimulator 2012-02-15 02:04:58 -02:00
Fernando Oliveira
ddacc87617 Implemented different MapTile for each region in Regions.ini using MaptileStaticUUID key
OpenSim.ini MaptileStaticUUID still work for default regions

Signed-off-by: Fernando Oliveira <fernando@oliveira.eti.br>
2012-02-15 02:03:32 -02:00
Fernando Oliveira
c5d1d6c47b Implemented different MapTile for each region in Regions.ini using MaptileStaticUUID key
OpenSim.ini MaptileStaticUUID still work for default regions

Signed-off-by: Fernando Oliveira <fernando@oliveira.eti.br>
2012-02-15 01:35:49 -02:00
Fernando Oliveira
23ebe65add Merge remote-tracking branch 'upstream/master' 2012-02-15 00:28:22 -02:00
Fernando Oliveira
c611966828 try to configure maptile for each region 2012-02-15 00:27:10 -02:00
Fernando Oliveira
b9fa9a801e Added Log to Maptile from Regions.ini 2012-02-10 01:55:08 -02:00
Fernando Oliveira
ec38593674 Put MaptileStaticUUID also in Regions.Ini file - as an alternative to MapTile by region 2012-02-10 00:17:34 -02:00
Fernando Oliveira
f018047460 Merge branch 'master' of https://github.com/ffoliveira/opensimulator 2012-02-09 22:34:38 -02:00
Fernando Oliveira
60a0395837 sync and merge source code from nebadom repo 2012-02-09 22:05:59 -02:00
Fernando Oliveira
d27ed42897 Merge remote-tracking branch 'upstream/master' 2012-02-09 22:00:26 -02:00
Fernando Oliveira
8bdc238ca4 Automatic empty coordinates attribution at sim creation 2012-02-09 21:56:24 -02:00
root
6903b60a0f Merge remote-tracking branch 'upstream/master' 2012-02-02 13:19:56 -05:00
Fernando Oliveira
46dec8666c New methods to get empty coordinates from the server 2012-01-23 16:11:42 -02:00
Fernando Oliveira
352774d5bf Merge remote-tracking branch 'remotes/upstream/master' 2012-01-22 16:04:22 -02:00
Fernando Oliveira
34c0bd212a Moved the EstateName and EstateOwner to OpenSim.ini at EstateDefaults entry
To be used only on first time Estate Creation

Signed-off-by: Fernando Oliveira <fernando@oliveira.eti.br>
2012-01-22 02:04:10 -02:00
Fernando Oliveira
3032b49ec4 Changed to Auto Create a Sim at first time using the Regions.ini files Master Avatar and Estate keys 2012-01-21 19:08:04 -02:00
104 changed files with 6 additions and 14473 deletions

View File

@@ -1,67 +0,0 @@
/*
* 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 System.Collections.Generic;
using System.Linq;
using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
namespace OpenSim.Data.Null
{
/// <summary>
/// Not a proper generic data handler yet - probably needs to actually store the data as well instead of relying
/// on descendent classes
/// </summary>
public class NullGenericDataHandler
{
protected List<T> Get<T>(string[] fields, string[] vals, List<T> inputEntities)
{
List<T> entities = inputEntities;
for (int i = 0; i < fields.Length; i++)
{
entities
= entities.Where(
e =>
{
FieldInfo fi = typeof(T).GetField(fields[i]);
if (fi == null)
throw new NotImplementedException(string.Format("No field {0} for val {1}", fields[i], vals[i]));
return fi.GetValue(e).ToString() == vals[i];
}
).ToList();
}
return entities;
}
}
}

View File

@@ -1,90 +0,0 @@
/*
* 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 System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
namespace OpenSim.Data.Null
{
public class NullXGroupData : NullGenericDataHandler, IXGroupData
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Dictionary<UUID, XGroup> m_groups = new Dictionary<UUID, XGroup>();
public NullXGroupData(string connectionString, string realm) {}
public bool StoreGroup(XGroup group)
{
lock (m_groups)
{
m_groups[group.groupID] = group.Clone();
}
return true;
}
public XGroup[] GetGroups(string field, string val)
{
return GetGroups(new string[] { field }, new string[] { val });
}
public XGroup[] GetGroups(string[] fields, string[] vals)
{
lock (m_groups)
{
List<XGroup> origGroups = Get<XGroup>(fields, vals, m_groups.Values.ToList());
return origGroups.Select(g => g.Clone()).ToArray();
}
}
public bool DeleteGroups(string field, string val)
{
return DeleteGroups(new string[] { field }, new string[] { val });
}
public bool DeleteGroups(string[] fields, string[] vals)
{
lock (m_groups)
{
XGroup[] groupsToDelete = GetGroups(fields, vals);
Array.ForEach(groupsToDelete, g => m_groups.Remove(g.groupID));
}
return true;
}
}
}

View File

@@ -1,84 +0,0 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Nini.Config;
using log4net;
using OpenMetaverse;
namespace OpenSim.Framework
{
public class AssetPermissions
{
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
private bool[] m_DisallowExport, m_DisallowImport;
private string[] m_AssetTypeNames;
public AssetPermissions(IConfig config)
{
Type enumType = typeof(AssetType);
m_AssetTypeNames = Enum.GetNames(enumType);
for (int i = 0; i < m_AssetTypeNames.Length; i++)
m_AssetTypeNames[i] = m_AssetTypeNames[i].ToLower();
int n = Enum.GetValues(enumType).Length;
m_DisallowExport = new bool[n];
m_DisallowImport = new bool[n];
LoadPermsFromConfig(config, "DisallowExport", m_DisallowExport);
LoadPermsFromConfig(config, "DisallowImport", m_DisallowImport);
}
private void LoadPermsFromConfig(IConfig assetConfig, string variable, bool[] bitArray)
{
if (assetConfig == null)
return;
string perms = assetConfig.GetString(variable, String.Empty);
string[] parts = perms.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string s in parts)
{
int index = Array.IndexOf(m_AssetTypeNames, s.Trim().ToLower());
if (index >= 0)
bitArray[index] = true;
else
m_log.WarnFormat("[Asset Permissions]: Invalid AssetType {0}", s);
}
}
public bool AllowedExport(sbyte type)
{
string assetTypeName = ((AssetType)type).ToString();
int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
if (index >= 0 && m_DisallowExport[index])
{
m_log.DebugFormat("[Asset Permissions]: Export denied: configuration does not allow export of AssetType {0}", assetTypeName);
return false;
}
return true;
}
public bool AllowedImport(sbyte type)
{
string assetTypeName = ((AssetType)type).ToString();
int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
if (index >= 0 && m_DisallowImport[index])
{
m_log.DebugFormat("[Asset Permissions]: Import denied: configuration does not allow import of AssetType {0}", assetTypeName);
return false;
}
return true;
}
}
}

View File

@@ -1,88 +0,0 @@
/*
* 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 System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework.Monitoring
{
public class PercentageStat : Stat
{
public long Antecedent { get; set; }
public long Consequent { get; set; }
public override double Value
{
get
{
// Asking for an update here means that the updater cannot access this value without infinite recursion.
// XXX: A slightly messy but simple solution may be to flick a flag so we can tell if this is being
// called by the pull action and just return the value.
if (StatType == StatType.Pull)
PullAction(this);
long c = Consequent;
// Avoid any chance of a multi-threaded divide-by-zero
if (c == 0)
return 0;
return (double)Antecedent / c * 100;
}
set
{
throw new InvalidOperationException("Cannot set value on a PercentageStat");
}
}
public PercentageStat(
string shortName,
string name,
string description,
string category,
string container,
StatType type,
Action<Stat> pullAction,
StatVerbosity verbosity)
: base(shortName, name, description, "%", category, container, type, pullAction, verbosity) {}
public override string ToConsoleString()
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat(
"{0}.{1}.{2} : {3:0.##}{4} ({5}/{6})",
Category, Container, ShortName, Value, UnitName, Antecedent, Consequent);
AppendMeasuresOfInterest(sb);
return sb.ToString();
}
}
}

View File

@@ -1,91 +0,0 @@
/*
* 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 System.Collections.Generic;
namespace OpenSim.Framework
{
/// <summary>
/// Naive pool implementation.
/// </summary>
/// <remarks>
/// Currently assumes that objects are in a useable state when returned.
/// </remarks>
public class Pool<T>
{
/// <summary>
/// Number of objects in the pool.
/// </summary>
public int Count
{
get
{
lock (m_pool)
return m_pool.Count;
}
}
private Stack<T> m_pool;
/// <summary>
/// Maximum pool size. Beyond this, any returned objects are not pooled.
/// </summary>
private int m_maxPoolSize;
private Func<T> m_createFunction;
public Pool(Func<T> createFunction, int maxSize)
{
m_maxPoolSize = maxSize;
m_createFunction = createFunction;
m_pool = new Stack<T>(m_maxPoolSize);
}
public T GetObject()
{
lock (m_pool)
{
if (m_pool.Count > 0)
return m_pool.Pop();
else
return m_createFunction();
}
}
public void ReturnObject(T obj)
{
lock (m_pool)
{
if (m_pool.Count >= m_maxPoolSize)
return;
else
m_pool.Push(obj);
}
}
}
}

View File

@@ -1,53 +0,0 @@
/*
* 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;
namespace OpenSim.Framework
{
/// <summary>
/// Region flags used internally by OpenSimulator to store installation specific information about regions.
/// </summary>
/// <remarks>
/// Don't confuse with OpenMetaverse.RegionFlags which are client facing flags (i.e. they go over the wire).
/// Returned by IGridService.GetRegionFlags()
/// </remarks>
[Flags]
public enum RegionFlags : int
{
DefaultRegion = 1, // Used for new Rez. Random if multiple defined
FallbackRegion = 2, // Regions we redirect to when the destination is down
RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false
NoDirectLogin = 8, // Region unavailable for direct logins (by name)
Persistent = 16, // Don't remove on unregister
LockedOut = 32, // Don't allow registration
NoMove = 64, // Don't allow moving this region
Reservation = 128, // This is an inactive reservation
Authenticate = 256, // Require authentication
Hyperlink = 512 // Record represents a HG link
}
}

View File

@@ -1,306 +0,0 @@
/*
* 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 System.Collections.Generic;
using System.Reflection;
using OpenMetaverse;
using OpenMetaverse.Packets;
using log4net;
using OpenSim.Framework.Monitoring;
namespace OpenSim.Region.ClientStack.LindenUDP
{
public sealed class PacketPool
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly PacketPool instance = new PacketPool();
/// <summary>
/// Pool of packets available for reuse.
/// </summary>
private readonly Dictionary<PacketType, Stack<Packet>> pool = new Dictionary<PacketType, Stack<Packet>>();
private static Dictionary<Type, Stack<Object>> DataBlocks = new Dictionary<Type, Stack<Object>>();
public static PacketPool Instance
{
get { return instance; }
}
public bool RecyclePackets { get; set; }
public bool RecycleDataBlocks { get; set; }
/// <summary>
/// The number of packets pooled
/// </summary>
public int PacketsPooled
{
get
{
lock (pool)
return pool.Count;
}
}
/// <summary>
/// The number of blocks pooled.
/// </summary>
public int BlocksPooled
{
get
{
lock (DataBlocks)
return DataBlocks.Count;
}
}
/// <summary>
/// Number of packets requested.
/// </summary>
public long PacketsRequested { get; private set; }
/// <summary>
/// Number of packets reused.
/// </summary>
public long PacketsReused { get; private set; }
/// <summary>
/// Number of packet blocks requested.
/// </summary>
public long BlocksRequested { get; private set; }
/// <summary>
/// Number of packet blocks reused.
/// </summary>
public long BlocksReused { get; private set; }
private PacketPool()
{
// defaults
RecyclePackets = true;
RecycleDataBlocks = true;
}
/// <summary>
/// Gets a packet of the given type.
/// </summary>
/// <param name='type'></param>
/// <returns>Guaranteed to always return a packet, whether from the pool or newly constructed.</returns>
public Packet GetPacket(PacketType type)
{
PacketsRequested++;
Packet packet;
if (!RecyclePackets)
return Packet.BuildPacket(type);
lock (pool)
{
if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0)
{
// m_log.DebugFormat("[PACKETPOOL]: Building {0} packet", type);
// Creating a new packet if we cannot reuse an old package
packet = Packet.BuildPacket(type);
}
else
{
// m_log.DebugFormat("[PACKETPOOL]: Pulling {0} packet", type);
// Recycle old packages
PacketsReused++;
packet = pool[type].Pop();
}
}
return packet;
}
// private byte[] decoded_header = new byte[10];
private static PacketType GetType(byte[] bytes)
{
byte[] decoded_header = new byte[10 + 8];
ushort id;
PacketFrequency freq;
if ((bytes[0] & Helpers.MSG_ZEROCODED) != 0)
{
Helpers.ZeroDecode(bytes, 16, decoded_header);
}
else
{
Buffer.BlockCopy(bytes, 0, decoded_header, 0, 10);
}
if (decoded_header[6] == 0xFF)
{
if (decoded_header[7] == 0xFF)
{
id = (ushort) ((decoded_header[8] << 8) + decoded_header[9]);
freq = PacketFrequency.Low;
}
else
{
id = decoded_header[7];
freq = PacketFrequency.Medium;
}
}
else
{
id = decoded_header[6];
freq = PacketFrequency.High;
}
return Packet.GetType(id, freq);
}
public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer)
{
PacketType type = GetType(bytes);
// Array.Clear(zeroBuffer, 0, zeroBuffer.Length);
int i = 0;
Packet packet = GetPacket(type);
if (packet == null)
m_log.WarnFormat("[PACKETPOOL]: Failed to get packet of type {0}", type);
else
packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
return packet;
}
/// <summary>
/// Return a packet to the packet pool
/// </summary>
/// <param name="packet"></param>
public void ReturnPacket(Packet packet)
{
if (RecycleDataBlocks)
{
switch (packet.Type)
{
case PacketType.ObjectUpdate:
ObjectUpdatePacket oup = (ObjectUpdatePacket)packet;
foreach (ObjectUpdatePacket.ObjectDataBlock oupod in oup.ObjectData)
ReturnDataBlock<ObjectUpdatePacket.ObjectDataBlock>(oupod);
oup.ObjectData = null;
break;
case PacketType.ImprovedTerseObjectUpdate:
ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet;
foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData)
ReturnDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(itoupod);
itoup.ObjectData = null;
break;
}
}
if (RecyclePackets)
{
switch (packet.Type)
{
// List pooling packets here
case PacketType.AgentUpdate:
case PacketType.PacketAck:
case PacketType.ObjectUpdate:
case PacketType.ImprovedTerseObjectUpdate:
lock (pool)
{
PacketType type = packet.Type;
if (!pool.ContainsKey(type))
{
pool[type] = new Stack<Packet>();
}
if ((pool[type]).Count < 50)
{
// m_log.DebugFormat("[PACKETPOOL]: Pushing {0} packet", type);
pool[type].Push(packet);
}
}
break;
// Other packets wont pool
default:
return;
}
}
}
public T GetDataBlock<T>() where T: new()
{
lock (DataBlocks)
{
BlocksRequested++;
Stack<Object> s;
if (DataBlocks.TryGetValue(typeof(T), out s))
{
if (s.Count > 0)
{
BlocksReused++;
return (T)s.Pop();
}
}
else
{
DataBlocks[typeof(T)] = new Stack<Object>();
}
return new T();
}
}
public void ReturnDataBlock<T>(T block) where T: new()
{
if (block == null)
return;
lock (DataBlocks)
{
if (!DataBlocks.ContainsKey(typeof(T)))
DataBlocks[typeof(T)] = new Stack<Object>();
if (DataBlocks[typeof(T)].Count < 50)
DataBlocks[typeof(T)].Push(block);
}
}
}
}

View File

@@ -1,137 +0,0 @@
/*
* 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 System.Collections.Generic;
using System.Reflection;
using log4net;
using Mono.Addins;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Server.Base;
using OpenSim.Services.Interfaces;
using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
{
public class BasePresenceServiceConnector : IPresenceService
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected bool m_Enabled;
protected PresenceDetector m_PresenceDetector;
/// <summary>
/// Underlying presence service. Do not use directly.
/// </summary>
public IPresenceService m_PresenceService;
public Type ReplaceableInterface
{
get { return null; }
}
public void AddRegion(Scene scene)
{
if (!m_Enabled)
return;
// m_log.DebugFormat(
// "[LOCAL PRESENCE CONNECTOR]: Registering IPresenceService to scene {0}", scene.RegionInfo.RegionName);
scene.RegisterModuleInterface<IPresenceService>(this);
m_PresenceDetector.AddRegion(scene);
m_log.InfoFormat("[BASE PRESENCE SERVICE CONNECTOR]: Enabled for region {0}", scene.Name);
}
public void RemoveRegion(Scene scene)
{
if (!m_Enabled)
return;
m_PresenceDetector.RemoveRegion(scene);
}
public void RegionLoaded(Scene scene)
{
if (!m_Enabled)
return;
}
public void PostInitialise()
{
}
public void Close()
{
}
#region IPresenceService
public bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID)
{
m_log.Warn("[BASE PRESENCE SERVICE CONNECTOR]: LoginAgent connector not implemented at the simulators");
return false;
}
public bool LogoutAgent(UUID sessionID)
{
return m_PresenceService.LogoutAgent(sessionID);
}
public bool LogoutRegionAgents(UUID regionID)
{
return m_PresenceService.LogoutRegionAgents(regionID);
}
public bool ReportAgent(UUID sessionID, UUID regionID)
{
return m_PresenceService.ReportAgent(sessionID, regionID);
}
public PresenceInfo GetAgent(UUID sessionID)
{
return m_PresenceService.GetAgent(sessionID);
}
public PresenceInfo[] GetAgents(string[] userIDs)
{
// Don't bother potentially making a useless network call if we not going to ask for any users anyway.
if (userIDs.Length == 0)
return new PresenceInfo[0];
return m_PresenceService.GetAgents(userIDs);
}
#endregion
}
}

View File

@@ -1,112 +0,0 @@
/*
* 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 System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenMetaverse.Messages.Linden;
using Mono.Addins;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using OpenSim.Services.Interfaces;
using Caps = OpenSim.Framework.Capabilities.Caps;
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.World.Land
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DwellModule")]
public class DwellModule : IDwellModule, INonSharedRegionModule
{
private Scene m_scene;
public Type ReplaceableInterface
{
get { return typeof(IDwellModule); }
}
public string Name
{
get { return "DwellModule"; }
}
public void Initialise(IConfigSource source)
{
}
public void AddRegion(Scene scene)
{
m_scene = scene;
m_scene.EventManager.OnNewClient += OnNewClient;
}
public void RegionLoaded(Scene scene)
{
}
public void RemoveRegion(Scene scene)
{
}
public void Close()
{
}
public void OnNewClient(IClientAPI client)
{
client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
}
private void ClientOnParcelDwellRequest(int localID, IClientAPI client)
{
ILandObject parcel = m_scene.LandChannel.GetLandObject(localID);
if (parcel == null)
return;
client.SendParcelDwellReply(localID, parcel.LandData.GlobalID, parcel.LandData.Dwell);
}
public int GetDwell(UUID parcelID)
{
return 0;
}
}
}

View File

@@ -1,224 +0,0 @@
/*
* 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 System.Reflection;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using Nini.Config;
using Mono.Addins;
using Caps = OpenSim.Framework.Capabilities.Caps;
namespace OpenSim.Region.CoreModules.World.LightShare
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EnvironmentModule")]
public class EnvironmentModule : INonSharedRegionModule, IEnvironmentModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene = null;
private UUID regionID = UUID.Zero;
private static bool Enabled = false;
private static readonly string capsName = "EnvironmentSettings";
private static readonly string capsBase = "/CAPS/0020/";
private LLSDEnvironmentSetResponse setResponse = null;
#region INonSharedRegionModule
public void Initialise(IConfigSource source)
{
IConfig config = source.Configs["ClientStack.LindenCaps"];
if (null == config)
return;
if (config.GetString("Cap_EnvironmentSettings", String.Empty) != "localhost")
{
m_log.InfoFormat("[{0}]: Module is disabled.", Name);
return;
}
Enabled = true;
m_log.InfoFormat("[{0}]: Module is enabled.", Name);
}
public void Close()
{
}
public string Name
{
get { return "EnvironmentModule"; }
}
public Type ReplaceableInterface
{
get { return null; }
}
public void AddRegion(Scene scene)
{
if (!Enabled)
return;
scene.RegisterModuleInterface<IEnvironmentModule>(this);
m_scene = scene;
regionID = scene.RegionInfo.RegionID;
}
public void RegionLoaded(Scene scene)
{
if (!Enabled)
return;
setResponse = new LLSDEnvironmentSetResponse();
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
}
public void RemoveRegion(Scene scene)
{
if (Enabled)
return;
scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
m_scene = null;
}
#endregion
#region IEnvironmentModule
public void ResetEnvironmentSettings(UUID regionUUID)
{
if (!Enabled)
return;
m_scene.SimulationDataService.RemoveRegionEnvironmentSettings(regionUUID);
}
#endregion
#region Events
private void OnRegisterCaps(UUID agentID, Caps caps)
{
// m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}",
// Name, agentID, caps.RegionName);
string capsPath = capsBase + UUID.Random();
// Get handler
caps.RegisterHandler(
capsName,
new RestStreamHandler(
"GET",
capsPath,
(request, path, param, httpRequest, httpResponse)
=> GetEnvironmentSettings(request, path, param, agentID, caps),
capsName,
agentID.ToString()));
// Set handler
caps.HttpListener.AddStreamHandler(
new RestStreamHandler(
"POST",
capsPath,
(request, path, param, httpRequest, httpResponse)
=> SetEnvironmentSettings(request, path, param, agentID, caps),
capsName,
agentID.ToString()));
}
#endregion
private string GetEnvironmentSettings(string request, string path, string param,
UUID agentID, Caps caps)
{
// m_log.DebugFormat("[{0}]: Environment GET handle for agentID {1} in region {2}",
// Name, agentID, caps.RegionName);
string env = String.Empty;
try
{
env = m_scene.SimulationDataService.LoadRegionEnvironmentSettings(regionID);
}
catch (Exception e)
{
m_log.ErrorFormat("[{0}]: Unable to load environment settings for region {1}, Exception: {2} - {3}",
Name, caps.RegionName, e.Message, e.StackTrace);
}
if (String.IsNullOrEmpty(env))
env = EnvironmentSettings.EmptySettings(UUID.Zero, regionID);
return env;
}
private string SetEnvironmentSettings(string request, string path, string param,
UUID agentID, Caps caps)
{
// m_log.DebugFormat("[{0}]: Environment SET handle from agentID {1} in region {2}",
// Name, agentID, caps.RegionName);
setResponse.regionID = regionID;
setResponse.success = false;
if (!m_scene.Permissions.CanIssueEstateCommand(agentID, false))
{
setResponse.fail_reason = "Insufficient estate permissions, settings has not been saved.";
return LLSDHelpers.SerialiseLLSDReply(setResponse);
}
try
{
m_scene.SimulationDataService.StoreRegionEnvironmentSettings(regionID, request);
setResponse.success = true;
m_log.InfoFormat("[{0}]: New Environment settings has been saved from agentID {1} in region {2}",
Name, agentID, caps.RegionName);
}
catch (Exception e)
{
m_log.ErrorFormat("[{0}]: Environment settings has not been saved for region {1}, Exception: {2} - {3}",
Name, caps.RegionName, e.Message, e.StackTrace);
setResponse.success = false;
setResponse.fail_reason = String.Format("Environment Set for region {0} has failed, settings has not been saved.", caps.RegionName);
}
return LLSDHelpers.SerialiseLLSDReply(setResponse);
}
}
}

View File

@@ -1,297 +0,0 @@
/*
* 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 System.Collections.Generic;
using System.Reflection;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using Nini.Config;
using Mono.Addins;
namespace OpenSim.Region.CoreModules.World.LightShare
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LightShareModule")]
public class LightShareModule : INonSharedRegionModule, ILightShareModule, ICommandableModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly Commander m_commander = new Commander("windlight");
private Scene m_scene;
private static bool m_enableWindlight;
#region ICommandableModule Members
public ICommander CommandInterface
{
get { return m_commander; }
}
#endregion
#region INonSharedRegionModule Members
public void Initialise(IConfigSource config)
{
try
{
m_enableWindlight = config.Configs["LightShare"].GetBoolean("enable_windlight", false);
}
catch (Exception)
{
m_log.Debug("[WINDLIGHT]: ini failure for enable_windlight - using default");
}
m_log.DebugFormat("[WINDLIGHT]: windlight module {0}", (m_enableWindlight ? "enabled" : "disabled"));
}
public void AddRegion(Scene scene)
{
if (!m_enableWindlight)
return;
m_scene = scene;
m_scene.RegisterModuleInterface<ILightShareModule>(this);
m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent;
m_scene.EventManager.OnSaveNewWindlightProfile += EventManager_OnSaveNewWindlightProfile;
m_scene.EventManager.OnSendNewWindlightProfileTargeted += EventManager_OnSendNewWindlightProfileTargeted;
m_scene.LoadWindlightProfile();
InstallCommands();
}
public void RemoveRegion(Scene scene)
{
if (!m_enableWindlight)
return;
m_scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole;
m_scene.EventManager.OnMakeRootAgent -= EventManager_OnMakeRootAgent;
m_scene.EventManager.OnSaveNewWindlightProfile -= EventManager_OnSaveNewWindlightProfile;
m_scene.EventManager.OnSendNewWindlightProfileTargeted -= EventManager_OnSendNewWindlightProfileTargeted;
m_scene = null;
}
public void Close()
{
}
public string Name
{
get { return "LightShareModule"; }
}
public void RegionLoaded(Scene scene)
{
}
public Type ReplaceableInterface
{
get { return null; }
}
#endregion
public static bool EnableWindlight
{
get
{
return m_enableWindlight;
}
set
{
}
}
#region events
private List<byte[]> compileWindlightSettings(RegionLightShareData wl)
{
byte[] mBlock = new Byte[249];
int pos = 0;
wl.waterColor.ToBytes(mBlock, 0); pos += 12;
Utils.FloatToBytes(wl.waterFogDensityExponent).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.underwaterFogModifier).CopyTo(mBlock, pos); pos += 4;
wl.reflectionWaveletScale.ToBytes(mBlock, pos); pos += 12;
Utils.FloatToBytes(wl.fresnelScale).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.fresnelOffset).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.refractScaleAbove).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.refractScaleBelow).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.blurMultiplier).CopyTo(mBlock, pos); pos += 4;
wl.bigWaveDirection.ToBytes(mBlock, pos); pos += 8;
wl.littleWaveDirection.ToBytes(mBlock, pos); pos += 8;
wl.normalMapTexture.ToBytes(mBlock, pos); pos += 16;
wl.horizon.ToBytes(mBlock, pos); pos += 16;
Utils.FloatToBytes(wl.hazeHorizon).CopyTo(mBlock, pos); pos += 4;
wl.blueDensity.ToBytes(mBlock, pos); pos += 16;
Utils.FloatToBytes(wl.hazeDensity).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.densityMultiplier).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.distanceMultiplier).CopyTo(mBlock, pos); pos += 4;
wl.sunMoonColor.ToBytes(mBlock, pos); pos += 16;
Utils.FloatToBytes(wl.sunMoonPosition).CopyTo(mBlock, pos); pos += 4;
wl.ambient.ToBytes(mBlock, pos); pos += 16;
Utils.FloatToBytes(wl.eastAngle).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.sunGlowFocus).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.sunGlowSize).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.sceneGamma).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.starBrightness).CopyTo(mBlock, pos); pos += 4;
wl.cloudColor.ToBytes(mBlock, pos); pos += 16;
wl.cloudXYDensity.ToBytes(mBlock, pos); pos += 12;
Utils.FloatToBytes(wl.cloudCoverage).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.cloudScale).CopyTo(mBlock, pos); pos += 4;
wl.cloudDetailXYDensity.ToBytes(mBlock, pos); pos += 12;
Utils.FloatToBytes(wl.cloudScrollX).CopyTo(mBlock, pos); pos += 4;
Utils.FloatToBytes(wl.cloudScrollY).CopyTo(mBlock, pos); pos += 4;
Utils.UInt16ToBytes(wl.maxAltitude).CopyTo(mBlock, pos); pos += 2;
mBlock[pos] = Convert.ToByte(wl.cloudScrollXLock); pos++;
mBlock[pos] = Convert.ToByte(wl.cloudScrollYLock); pos++;
mBlock[pos] = Convert.ToByte(wl.drawClassicClouds); pos++;
List<byte[]> param = new List<byte[]>();
param.Add(mBlock);
return param;
}
public void SendProfileToClient(IClientAPI client)
{
SendProfileToClient(client, m_scene.RegionInfo.WindlightSettings);
}
public void SendProfileToClient(IClientAPI client, RegionLightShareData wl)
{
if (m_enableWindlight)
{
if (m_scene.RegionInfo.WindlightSettings.valid)
{
List<byte[]> param = compileWindlightSettings(wl);
client.SendGenericMessage("Windlight", UUID.Random(), param);
}
else
{
List<byte[]> param = new List<byte[]>();
client.SendGenericMessage("WindlightReset", UUID.Random(), param);
}
}
}
private void EventManager_OnMakeRootAgent(ScenePresence presence)
{
m_log.Debug("[WINDLIGHT]: Sending windlight scene to new client");
SendProfileToClient(presence.ControllingClient);
}
private void EventManager_OnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID pUUID)
{
IClientAPI client;
m_scene.TryGetClient(pUUID, out client);
SendProfileToClient(client, wl);
}
private void EventManager_OnSaveNewWindlightProfile()
{
m_scene.ForEachRootClient(SendProfileToClient);
}
#endregion
#region ICommandableModule Members
private void InstallCommands()
{
Command wlload = new Command("load", CommandIntentions.COMMAND_NON_HAZARDOUS, HandleLoad, "Load windlight profile from the database and broadcast");
Command wlenable = new Command("enable", CommandIntentions.COMMAND_NON_HAZARDOUS, HandleEnable, "Enable the windlight plugin");
Command wldisable = new Command("disable", CommandIntentions.COMMAND_NON_HAZARDOUS, HandleDisable, "Disable the windlight plugin");
m_commander.RegisterCommand("load", wlload);
m_commander.RegisterCommand("enable", wlenable);
m_commander.RegisterCommand("disable", wldisable);
m_scene.RegisterModuleCommander(m_commander);
}
private void HandleLoad(Object[] args)
{
if (!m_enableWindlight)
{
m_log.InfoFormat("[WINDLIGHT]: Cannot load windlight profile, module disabled. Use 'windlight enable' first.");
}
else
{
m_log.InfoFormat("[WINDLIGHT]: Loading Windlight profile from database");
m_scene.LoadWindlightProfile();
m_log.InfoFormat("[WINDLIGHT]: Load complete");
}
}
private void HandleDisable(Object[] args)
{
m_log.InfoFormat("[WINDLIGHT]: Plugin now disabled");
m_enableWindlight = false;
}
private void HandleEnable(Object[] args)
{
m_log.InfoFormat("[WINDLIGHT]: Plugin now enabled");
m_enableWindlight = true;
}
/// <summary>
/// Processes commandline input. Do not call directly.
/// </summary>
/// <param name="args">Commandline arguments</param>
private void EventManager_OnPluginConsole(string[] args)
{
if (args[0] == "windlight")
{
if (args.Length == 1)
{
m_commander.ProcessConsoleCommand("add", new string[0]);
return;
}
string[] tmpArgs = new string[args.Length - 2];
int i;
for (i = 2; i < args.Length; i++)
{
tmpArgs[i - 2] = args[i];
}
m_commander.ProcessConsoleCommand(args[1], tmpArgs);
}
}
#endregion
}
}

View File

@@ -1,33 +0,0 @@
/*
* 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.
*/
namespace OpenSim.Region.Framework.Interfaces
{
public interface ILightShareModule
{
}
}

View File

@@ -1,58 +0,0 @@
/*
* 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 System.Collections.Generic;
using System.Reflection;
using System.Threading;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture]
public class SceneManagerTests : OpenSimTestCase
{
[Test]
public void TestClose()
{
TestHelpers.InMethod();
SceneHelpers sh = new SceneHelpers();
Scene scene = sh.SetupScene();
sh.SceneManager.Close();
Assert.That(scene.ShuttingDown, Is.True);
}
}
}

0
OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs Executable file → Normal file
View File

View File

@@ -1,167 +0,0 @@
/*
* 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 copyrightD
* 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 System.Collections.Generic;
using System.Text;
using OpenMetaverse;
namespace OpenSim.Region.Physics.BulletSPlugin
{
public sealed class BSConstraint6Dof : BSConstraint
{
private static string LogHeader = "[BULLETSIM 6DOF CONSTRAINT]";
public override ConstraintType Type { get { return ConstraintType.D6_CONSTRAINT_TYPE; } }
// Create a btGeneric6DofConstraint
public BSConstraint6Dof(BulletWorld world, BulletBody obj1, BulletBody obj2,
Vector3 frame1, Quaternion frame1rot,
Vector3 frame2, Quaternion frame2rot,
bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
: base(world)
{
m_body1 = obj1;
m_body2 = obj2;
m_constraint = PhysicsScene.PE.Create6DofConstraint(m_world, m_body1, m_body2,
frame1, frame1rot,
frame2, frame2rot,
useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies);
m_enabled = true;
world.physicsScene.DetailLog("{0},BS6DofConstraint,createFrame,wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}",
BSScene.DetailLogZero, world.worldID,
obj1.ID, obj1.AddrString, obj2.ID, obj2.AddrString);
}
// 6 Dof constraint based on a midpoint between the two constrained bodies
public BSConstraint6Dof(BulletWorld world, BulletBody obj1, BulletBody obj2,
Vector3 joinPoint,
bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
: base(world)
{
m_body1 = obj1;
m_body2 = obj2;
if (!obj1.HasPhysicalBody || !obj2.HasPhysicalBody)
{
world.physicsScene.DetailLog("{0},BS6DOFConstraint,badBodyPtr,wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}",
BSScene.DetailLogZero, world.worldID,
obj1.ID, obj1.AddrString, obj2.ID, obj2.AddrString);
world.physicsScene.Logger.ErrorFormat("{0} Attempt to build 6DOF constraint with missing bodies: wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}",
LogHeader, world.worldID, obj1.ID, obj1.AddrString, obj2.ID, obj2.AddrString);
m_enabled = false;
}
else
{
m_constraint = PhysicsScene.PE.Create6DofConstraintToPoint(m_world, m_body1, m_body2,
joinPoint,
useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies);
PhysicsScene.DetailLog("{0},BS6DofConstraint,createMidPoint,wID={1}, csrt={2}, rID={3}, rBody={4}, cID={5}, cBody={6}",
BSScene.DetailLogZero, world.worldID, m_constraint.AddrString,
obj1.ID, obj1.AddrString, obj2.ID, obj2.AddrString);
if (!m_constraint.HasPhysicalConstraint)
{
world.physicsScene.Logger.ErrorFormat("{0} Failed creation of 6Dof constraint. rootID={1}, childID={2}",
LogHeader, obj1.ID, obj2.ID);
m_enabled = false;
}
else
{
m_enabled = true;
}
}
}
// A 6 Dof constraint that is fixed in the world and constrained to a on-the-fly created static object
public BSConstraint6Dof(BulletWorld world, BulletBody obj1, Vector3 frameInBloc, Quaternion frameInBrot,
bool useLinearReferenceFrameB, bool disableCollisionsBetweenLinkedBodies)
: base(world)
{
m_body1 = obj1;
m_body2 = obj1; // Look out for confusion down the road
m_constraint = PhysicsScene.PE.Create6DofConstraintFixed(m_world, m_body1,
frameInBloc, frameInBrot,
useLinearReferenceFrameB, disableCollisionsBetweenLinkedBodies);
m_enabled = true;
world.physicsScene.DetailLog("{0},BS6DofConstraint,createFixed,wID={1},rID={2},rBody={3}",
BSScene.DetailLogZero, world.worldID, obj1.ID, obj1.AddrString);
}
public bool SetFrames(Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot)
{
bool ret = false;
if (m_enabled)
{
PhysicsScene.PE.SetFrames(m_constraint, frameA, frameArot, frameB, frameBrot);
ret = true;
}
return ret;
}
public bool SetCFMAndERP(float cfm, float erp)
{
bool ret = false;
if (m_enabled)
{
PhysicsScene.PE.SetConstraintParam(m_constraint, ConstraintParams.BT_CONSTRAINT_STOP_CFM, cfm, ConstraintParamAxis.AXIS_ALL);
PhysicsScene.PE.SetConstraintParam(m_constraint, ConstraintParams.BT_CONSTRAINT_STOP_ERP, erp, ConstraintParamAxis.AXIS_ALL);
PhysicsScene.PE.SetConstraintParam(m_constraint, ConstraintParams.BT_CONSTRAINT_CFM, cfm, ConstraintParamAxis.AXIS_ALL);
ret = true;
}
return ret;
}
public bool UseFrameOffset(bool useOffset)
{
bool ret = false;
float onOff = useOffset ? ConfigurationParameters.numericTrue : ConfigurationParameters.numericFalse;
if (m_enabled)
ret = PhysicsScene.PE.UseFrameOffset(m_constraint, onOff);
return ret;
}
public bool TranslationalLimitMotor(bool enable, float targetVelocity, float maxMotorForce)
{
bool ret = false;
float onOff = enable ? ConfigurationParameters.numericTrue : ConfigurationParameters.numericFalse;
if (m_enabled)
{
ret = PhysicsScene.PE.TranslationalLimitMotor(m_constraint, onOff, targetVelocity, maxMotorForce);
m_world.physicsScene.DetailLog("{0},BS6DOFConstraint,TransLimitMotor,enable={1},vel={2},maxForce={3}",
BSScene.DetailLogZero, enable, targetVelocity, maxMotorForce);
}
return ret;
}
public bool SetBreakingImpulseThreshold(float threshold)
{
bool ret = false;
if (m_enabled)
ret = PhysicsScene.PE.SetBreakingImpulseThreshold(m_constraint, threshold);
return ret;
}
}
}

0
OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs Executable file → Normal file
View File

View File

View File

0
OpenSim/Region/Physics/BulletSPlugin/BSMaterials.cs Executable file → Normal file
View File

0
OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs Executable file → Normal file
View File

0
OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs Executable file → Normal file
View File

View File

View File

0
OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs Executable file → Normal file
View File

View File

@@ -1,44 +0,0 @@
/*
* 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 System.Runtime.Serialization;
namespace OpenSim.Region.ScriptEngine.Shared
{
[Serializable]
public class ScriptException : Exception
{
public ScriptException() : base() {}
public ScriptException(string message) : base(message) {}
public ScriptException(string message, Exception innerException) : base(message, innerException) {}
public ScriptException(SerializationInfo info, StreamingContext context) :base(info, context) {}
}
}

View File

@@ -1,110 +0,0 @@
/*
* 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 System.IO;
using System.Net;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using Nini.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Server.Handlers.Asset;
using OpenSim.Services.AssetService;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
namespace OpenSim.Server.Handlers.Asset.Test
{
[TestFixture]
public class AssetServerPostHandlerTests : OpenSimTestCase
{
[Test]
public void TestGoodAssetStoreRequest()
{
TestHelpers.InMethod();
UUID assetId = TestHelpers.ParseTail(0x1);
IConfigSource config = new IniConfigSource();
config.AddConfig("AssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
AssetService assetService = new AssetService(config);
AssetServerPostHandler asph = new AssetServerPostHandler(assetService);
AssetBase asset = AssetHelpers.CreateNotecardAsset(assetId, "Hello World");
MemoryStream buffer = new MemoryStream();
XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = Encoding.UTF8;
using (XmlWriter writer = XmlWriter.Create(buffer, settings))
{
XmlSerializer serializer = new XmlSerializer(typeof(AssetBase));
serializer.Serialize(writer, asset);
writer.Flush();
}
buffer.Position = 0;
asph.Handle(null, buffer, null, null);
AssetBase retrievedAsset = assetService.Get(assetId.ToString());
Assert.That(retrievedAsset, Is.Not.Null);
}
[Test]
public void TestBadXmlAssetStoreRequest()
{
TestHelpers.InMethod();
IConfigSource config = new IniConfigSource();
config.AddConfig("AssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
AssetService assetService = new AssetService(config);
AssetServerPostHandler asph = new AssetServerPostHandler(assetService);
MemoryStream buffer = new MemoryStream();
byte[] badData = new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f };
buffer.Write(badData, 0, badData.Length);
buffer.Position = 0;
TestOSHttpResponse response = new TestOSHttpResponse();
asph.Handle(null, buffer, null, response);
Assert.That(response.StatusCode, Is.EqualTo((int)HttpStatusCode.BadRequest));
}
}
}

View File

@@ -1,177 +0,0 @@
/*
* 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 Nini.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Server.Base;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common;
namespace OpenSim.Services.InventoryService.Tests
{
/// <summary>
/// Tests for the XInventoryService
/// </summary>
/// <remarks>
/// TODO: Fill out more tests.
/// </remarks>
[TestFixture]
public class XInventoryServiceTests : OpenSimTestCase
{
private IInventoryService CreateXInventoryService()
{
IConfigSource config = new IniConfigSource();
config.AddConfig("InventoryService");
config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
return ServerUtils.LoadPlugin<IInventoryService>(
"OpenSim.Services.InventoryService.dll:XInventoryService", new Object[] { config });
}
/// <summary>
/// Tests add item operation.
/// </summary>
/// <remarks>
/// TODO: Test all operations.
/// </remarks>
[Test]
public void TestAddItem()
{
TestHelpers.InMethod();
string creatorId = TestHelpers.ParseTail(0x1).ToString();
UUID ownerId = TestHelpers.ParseTail(0x2);
UUID itemId = TestHelpers.ParseTail(0x10);
UUID assetId = TestHelpers.ParseTail(0x20);
UUID folderId = TestHelpers.ParseTail(0x30);
int invType = (int)InventoryType.Animation;
int assetType = (int)AssetType.Animation;
string itemName = "item1";
IInventoryService xis = CreateXInventoryService();
InventoryItemBase itemToStore
= new InventoryItemBase(itemId, ownerId)
{
CreatorIdentification = creatorId.ToString(),
AssetID = assetId,
Name = itemName,
Folder = folderId,
InvType = invType,
AssetType = assetType
};
Assert.That(xis.AddItem(itemToStore), Is.True);
InventoryItemBase itemRetrieved = new InventoryItemBase(itemId);
itemRetrieved = xis.GetItem(itemRetrieved);
Assert.That(itemRetrieved, Is.Not.Null);
Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId));
Assert.That(itemRetrieved.Owner, Is.EqualTo(ownerId));
Assert.That(itemRetrieved.AssetID, Is.EqualTo(assetId));
Assert.That(itemRetrieved.Folder, Is.EqualTo(folderId));
Assert.That(itemRetrieved.InvType, Is.EqualTo(invType));
Assert.That(itemRetrieved.AssetType, Is.EqualTo(assetType));
Assert.That(itemRetrieved.Name, Is.EqualTo(itemName));
}
[Test]
public void TestUpdateItem()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
string creatorId = TestHelpers.ParseTail(0x1).ToString();
UUID ownerId = TestHelpers.ParseTail(0x2);
UUID itemId = TestHelpers.ParseTail(0x10);
UUID assetId = TestHelpers.ParseTail(0x20);
UUID folderId = TestHelpers.ParseTail(0x30);
int invType = (int)InventoryType.Animation;
int assetType = (int)AssetType.Animation;
string itemName = "item1";
string itemName2 = "item2";
IInventoryService xis = CreateXInventoryService();
InventoryItemBase itemToStore
= new InventoryItemBase(itemId, ownerId)
{
CreatorIdentification = creatorId.ToString(),
AssetID = assetId,
Name = itemName,
Folder = folderId,
InvType = invType,
AssetType = assetType
};
Assert.That(xis.AddItem(itemToStore), Is.True);
// Normal update
itemToStore.Name = itemName2;
Assert.That(xis.UpdateItem(itemToStore), Is.True);
InventoryItemBase itemRetrieved = new InventoryItemBase(itemId);
itemRetrieved = xis.GetItem(itemRetrieved);
Assert.That(itemRetrieved, Is.Not.Null);
Assert.That(itemRetrieved.Name, Is.EqualTo(itemName2));
// Attempt to update properties that should never change
string creatorId2 = TestHelpers.ParseTail(0x7).ToString();
UUID ownerId2 = TestHelpers.ParseTail(0x8);
UUID folderId2 = TestHelpers.ParseTail(0x70);
int invType2 = (int)InventoryType.CallingCard;
int assetType2 = (int)AssetType.CallingCard;
string itemName3 = "item3";
itemToStore.CreatorIdentification = creatorId2.ToString();
itemToStore.Owner = ownerId2;
itemToStore.Folder = folderId2;
itemToStore.InvType = invType2;
itemToStore.AssetType = assetType2;
itemToStore.Name = itemName3;
Assert.That(xis.UpdateItem(itemToStore), Is.True);
itemRetrieved = xis.GetItem(itemRetrieved);
Assert.That(itemRetrieved, Is.Not.Null);
Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId));
Assert.That(itemRetrieved.Owner, Is.EqualTo(ownerId));
Assert.That(itemRetrieved.AssetID, Is.EqualTo(assetId));
Assert.That(itemRetrieved.Folder, Is.EqualTo(folderId));
Assert.That(itemRetrieved.InvType, Is.EqualTo(invType));
Assert.That(itemRetrieved.AssetType, Is.EqualTo(assetType));
Assert.That(itemRetrieved.Name, Is.EqualTo(itemName3));
}
}
}

View File

@@ -1,26 +0,0 @@
/*
* Copyright (c) Contributors, http://aurora-sim.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 Aurora-Sim 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.
*/

Binary file not shown.

Binary file not shown.

View File

@@ -1 +0,0 @@
libsqlite version: 3.7.5

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More