aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
-rw-r--r--OpenSim/Addons/Groups/GroupsExtendedData.cs4
-rw-r--r--OpenSim/Addons/Groups/GroupsMessagingModule.cs32
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs42
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs20
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs4
-rw-r--r--OpenSim/Addons/Groups/IGroupsServicesConnector.cs8
-rw-r--r--OpenSim/Addons/Groups/Local/GroupsServiceLocalConnectorModule.cs10
-rw-r--r--OpenSim/Addons/Groups/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs4
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs14
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs12
-rw-r--r--OpenSim/Addons/Groups/Service/GroupsService.cs38
-rw-r--r--OpenSim/Addons/Groups/Service/GroupsServiceBase.cs110
-rw-r--r--OpenSim/Addons/Groups/Service/HGGroupsService.cs2
-rw-r--r--OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs4
-rw-r--r--OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs2
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs2
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs20
-rw-r--r--OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs12
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs50
-rw-r--r--OpenSim/Capabilities/Caps.cs8
-rw-r--r--OpenSim/Capabilities/CapsHandlers.cs6
-rw-r--r--OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs2
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs16
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs2
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs2
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs4
-rw-r--r--OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs4
-rw-r--r--OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs2
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs12
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs96
-rw-r--r--OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs8
-rw-r--r--OpenSim/Capabilities/LLSDAssetUploadResponse.cs2
-rw-r--r--OpenSim/Capabilities/LLSDAvatarPicker.cs2
-rw-r--r--OpenSim/Capabilities/LLSDInventoryItem.cs6
-rw-r--r--OpenSim/Capabilities/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/ConsoleClient/ConsoleClient.cs4
-rw-r--r--OpenSim/ConsoleClient/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Data/DBGuids.cs2
-rw-r--r--OpenSim/Data/IAvatarData.cs2
-rw-r--r--OpenSim/Data/IEstateDataStore.cs16
-rw-r--r--OpenSim/Data/IGridUserData.cs2
-rw-r--r--OpenSim/Data/IGroupsData.cs2
-rw-r--r--OpenSim/Data/IHGTravelingData.cs2
-rw-r--r--OpenSim/Data/IOfflineIMData.cs2
-rw-r--r--OpenSim/Data/IPresenceData.cs2
-rw-r--r--OpenSim/Data/IRegionData.cs2
-rw-r--r--OpenSim/Data/IXGroupData.cs6
-rw-r--r--OpenSim/Data/Migration.cs26
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLAuthenticationData.cs28
-rw-r--r--OpenSim/Data/MySQL/MySQLAvatarData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs14
-rw-r--r--OpenSim/Data/MySQL/MySQLFSAssetData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs20
-rw-r--r--OpenSim/Data/MySQL/MySQLGroupsData.cs20
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs12
-rw-r--r--OpenSim/Data/MySQL/MySQLMigrations.cs6
-rw-r--r--OpenSim/Data/MySQL/MySQLOfflineIMData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLPresenceData.cs8
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs30
-rw-r--r--OpenSim/Data/MySQL/MySQLUserProfilesData.cs176
-rw-r--r--OpenSim/Data/MySQL/MySQLXAssetData.cs6
-rw-r--r--OpenSim/Data/MySQL/MySQLXInventoryData.cs6
-rwxr-xr-xOpenSim/Data/Null/NullEstateData.cs6
-rw-r--r--OpenSim/Data/Null/NullFriendsData.cs10
-rw-r--r--OpenSim/Data/Null/NullPresenceData.cs8
-rw-r--r--OpenSim/Data/Null/NullUserAccountData.cs32
-rw-r--r--OpenSim/Data/PGSQL/PGSQLAssetData.cs18
-rw-r--r--OpenSim/Data/PGSQL/PGSQLAuthenticationData.cs6
-rw-r--r--OpenSim/Data/PGSQL/PGSQLAvatarData.cs2
-rw-r--r--OpenSim/Data/PGSQL/PGSQLEstateData.cs2
-rw-r--r--OpenSim/Data/PGSQL/PGSQLFriendsData.cs6
-rw-r--r--OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs14
-rwxr-xr-xOpenSim/Data/PGSQL/PGSQLGroupsData.cs36
-rw-r--r--OpenSim/Data/PGSQL/PGSQLInventoryData.cs58
-rw-r--r--OpenSim/Data/PGSQL/PGSQLManager.cs2
-rw-r--r--OpenSim/Data/PGSQL/PGSQLMigration.cs4
-rw-r--r--OpenSim/Data/PGSQL/PGSQLOfflineIMData.cs2
-rwxr-xr-xOpenSim/Data/PGSQL/PGSQLPresenceData.cs4
-rw-r--r--OpenSim/Data/PGSQL/PGSQLRegionData.cs14
-rwxr-xr-xOpenSim/Data/PGSQL/PGSQLSimulationData.cs156
-rw-r--r--OpenSim/Data/PGSQL/PGSQLUserAccountData.cs20
-rw-r--r--OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs12
-rw-r--r--OpenSim/Data/PGSQL/PGSQLXAssetData.cs24
-rw-r--r--OpenSim/Data/PGSQL/PGSQLXInventoryData.cs14
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteAuthenticationData.cs6
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs12
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteGridUserData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteHGTravelData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs16
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserAccountData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserProfilesData.cs166
-rw-r--r--OpenSim/Data/SQLite/SQLiteUtils.cs6
-rw-r--r--OpenSim/Data/SQLite/SQLiteXInventoryData.cs4
-rw-r--r--OpenSim/Data/Tests/AssetTests.cs6
-rw-r--r--OpenSim/Data/Tests/BasicDataServiceTest.cs12
-rw-r--r--OpenSim/Data/Tests/DefaultTestConns.cs10
-rw-r--r--OpenSim/Data/Tests/EstateTests.cs18
-rw-r--r--OpenSim/Data/Tests/InventoryTests.cs28
-rw-r--r--OpenSim/Data/Tests/PropertyScrambler.cs2
-rw-r--r--OpenSim/Data/Tests/RegionTests.cs152
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs6
-rw-r--r--OpenSim/Framework/AnimationSet.cs2
-rw-r--r--OpenSim/Framework/AssetBase.cs6
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Framework/AssetRequestToClient.cs6
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs48
-rw-r--r--OpenSim/Framework/AvatarWearable.cs8
-rw-r--r--OpenSim/Framework/BasicDOSProtector.cs14
-rw-r--r--OpenSim/Framework/BlockingQueue.cs2
-rw-r--r--OpenSim/Framework/Cache.cs4
-rw-r--r--OpenSim/Framework/CapsUtil.cs2
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs8
-rw-r--r--OpenSim/Framework/CircularBuffer.cs20
-rw-r--r--OpenSim/Framework/CnmMemoryCache.cs140
-rw-r--r--OpenSim/Framework/CnmSynchronizedCache.cs106
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs40
-rwxr-xr-xOpenSim/Framework/Console/ConsoleBase.cs8
-rw-r--r--OpenSim/Framework/Console/ConsoleUtil.cs22
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs22
-rw-r--r--OpenSim/Framework/Console/MockConsole.cs4
-rw-r--r--OpenSim/Framework/Console/RemoteConsole.cs400
-rw-r--r--OpenSim/Framework/DAMap.cs40
-rw-r--r--OpenSim/Framework/DOMap.cs2
-rw-r--r--OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs124
-rw-r--r--OpenSim/Framework/EstateBan.cs2
-rw-r--r--OpenSim/Framework/EstateSettings.cs2
-rw-r--r--OpenSim/Framework/GridInstantMessage.cs2
-rw-r--r--OpenSim/Framework/IClientAPI.cs72
-rw-r--r--OpenSim/Framework/ICnmCache.cs106
-rw-r--r--OpenSim/Framework/ILandChannel.cs6
-rw-r--r--OpenSim/Framework/ILandObject.cs32
-rw-r--r--OpenSim/Framework/IPrimCounts.cs14
-rw-r--r--OpenSim/Framework/IRegistryCore.cs2
-rw-r--r--OpenSim/Framework/IScene.cs4
-rw-r--r--OpenSim/Framework/ISceneAgent.cs2
-rw-r--r--OpenSim/Framework/InventoryFolderImpl.cs2
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs110
-rw-r--r--OpenSim/Framework/InventoryNodeBase.cs8
-rw-r--r--OpenSim/Framework/LandData.cs8
-rw-r--r--OpenSim/Framework/Lazy.cs4
-rw-r--r--OpenSim/Framework/LocklessQueue.cs2
-rw-r--r--OpenSim/Framework/MapAndArray.cs12
-rw-r--r--OpenSim/Framework/MapItemReplyStruct.cs2
-rw-r--r--OpenSim/Framework/MetricsCollector.cs8
-rw-r--r--OpenSim/Framework/Monitoring/BaseStatsCollector.cs2
-rw-r--r--OpenSim/Framework/Monitoring/Checks/Check.cs8
-rw-r--r--OpenSim/Framework/Monitoring/Interfaces/IStatsCollector.cs2
-rw-r--r--OpenSim/Framework/Monitoring/JobEngine.cs10
-rw-r--r--OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Framework/Monitoring/ServerStatsCollector.cs26
-rwxr-xr-xOpenSim/Framework/Monitoring/SimExtraStatsCollector.cs28
-rw-r--r--OpenSim/Framework/Monitoring/Stats/Stat.cs38
-rw-r--r--OpenSim/Framework/Monitoring/StatsLogger.cs6
-rw-r--r--OpenSim/Framework/Monitoring/StatsManager.cs4
-rw-r--r--OpenSim/Framework/Monitoring/Watchdog.cs2
-rw-r--r--OpenSim/Framework/Monitoring/WorkManager.cs32
-rw-r--r--OpenSim/Framework/NetworkUtil.cs4
-rw-r--r--OpenSim/Framework/OutboundUrlFilter.cs16
-rw-r--r--OpenSim/Framework/PluginManager.cs54
-rw-r--r--OpenSim/Framework/PrimeNumberHelper.cs2
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs4
-rw-r--r--OpenSim/Framework/PriorityQueue.cs24
-rw-r--r--OpenSim/Framework/RegionInfo.cs30
-rw-r--r--OpenSim/Framework/RegionSettings.cs18
-rw-r--r--OpenSim/Framework/RestClient.cs2
-rw-r--r--OpenSim/Framework/SLUtil.cs14
-rw-r--r--OpenSim/Framework/Serialization/ArchiveConstants.cs4
-rw-r--r--OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs6
-rw-r--r--OpenSim/Framework/Serialization/External/OspResolver.cs44
-rw-r--r--OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs34
-rw-r--r--OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs22
-rw-r--r--OpenSim/Framework/Serialization/External/UserProfileSerializer.cs12
-rw-r--r--OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveWriter.cs12
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs30
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs46
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs14
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs8
-rw-r--r--OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs6
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs34
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/JsonRpcResponse.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs12
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestSessionService.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs82
-rw-r--r--OpenSim/Framework/Servers/HttpServer/XmlRpcBasicDOSProtector.cs6
-rw-r--r--OpenSim/Framework/Servers/MainServer.cs14
-rw-r--r--OpenSim/Framework/Servers/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs52
-rw-r--r--OpenSim/Framework/Servers/Tests/OSHttpTests.cs136
-rw-r--r--OpenSim/Framework/ServiceAuth/BasicHttpAuthentication.cs2
-rw-r--r--OpenSim/Framework/ServiceAuth/CompoundAuthentication.cs2
-rw-r--r--OpenSim/Framework/SimStats.cs10
-rw-r--r--OpenSim/Framework/TaskInventoryDictionary.cs6
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs2
-rw-r--r--OpenSim/Framework/Tests/AgentCircuitDataTest.cs8
-rw-r--r--OpenSim/Framework/Tests/AgentCircuitManagerTests.cs2
-rw-r--r--OpenSim/Framework/Tests/AnimationTests.cs2
-rw-r--r--OpenSim/Framework/Tests/CacheTests.cs4
-rw-r--r--OpenSim/Framework/Tests/LocationTest.cs2
-rw-r--r--OpenSim/Framework/Tests/MundaneFrameworkTests.cs12
-rw-r--r--OpenSim/Framework/Tests/PrimeNumberHelperTests.cs6
-rw-r--r--OpenSim/Framework/Tests/UtilTest.cs2
-rw-r--r--OpenSim/Framework/UserProfileData.cs10
-rw-r--r--OpenSim/Framework/UserProfiles.cs12
-rw-r--r--OpenSim/Framework/Util.cs86
-rw-r--r--OpenSim/Framework/VersionInfo.cs12
-rw-r--r--OpenSim/Framework/WearableCacheItem.cs6
-rw-r--r--OpenSim/Framework/WebUtil.cs60
-rw-r--r--OpenSim/Region/Application/Application.cs58
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs14
-rw-r--r--OpenSim/Region/Application/IApplicationPlugin.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs76
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs84
-rw-r--r--OpenSim/Region/Application/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/Application/RegionApplicationBase.cs12
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs60
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs30
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs38
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs30
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs16
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs242
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs36
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs76
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs52
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs82
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs44
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs58
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs52
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs14
-rw-r--r--OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs22
-rw-r--r--OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs2
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs70
-rw-r--r--OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs2
-rw-r--r--OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs78
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs42
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs52
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs160
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs38
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs114
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs84
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs60
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs74
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs44
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs178
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs60
-rw-r--r--OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs48
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs104
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs46
-rw-r--r--OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs20
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs78
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs62
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs10
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs22
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs38
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs56
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs28
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs20
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs16
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs66
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs22
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs10
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Access/AccessModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs46
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs52
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs46
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs98
-rw-r--r--OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs38
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs60
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandChannel.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs74
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs50
-rw-r--r--OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs138
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs40
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs224
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs252
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs36
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs54
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs214
-rw-r--r--OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Region/RestartModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs24
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Sun/SunModule.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Wind/WindModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IBuySellModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICloudModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICommander.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityCreator.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityInventory.cs20
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEventQueue.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGodsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGroupsModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IHttpRequests.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IMoapModule.cs8
-rw-r--r--OpenSim/Region/Framework/Interfaces/INPCModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IPresenceModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs28
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs8
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISnmpModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrainModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IUrlModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IVoiceModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWindModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWorldComm.cs2
-rw-r--r--OpenSim/Region/Framework/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/CollisionSounds.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityManager.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs260
-rw-r--r--OpenSim/Region/Framework/Scenes/KeyframeMotion.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs30
-rw-r--r--OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SOPMaterial.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SOPVehicle.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs82
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs32
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs58
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs192
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs6
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs58
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs192
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs244
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs58
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs278
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs60
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs28
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SimStatsReporter.cs46
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainCompressor.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs22
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs32
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs54
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs32
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/UndoState.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs254
-rw-r--r--OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs182
-rw-r--r--OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs32
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs42
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs22
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs40
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs22
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs60
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs118
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs60
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs48
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs94
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs22
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs4
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs32
-rw-r--r--OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs10
-rw-r--r--OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs40
-rwxr-xr-xOpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs18
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs130
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs78
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs102
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs80
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs36
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs34
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs10
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs18
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs4
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs12
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs2
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs10
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs8
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs36
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs60
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs32
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs32
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs18
-rw-r--r--OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs16
-rw-r--r--OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs16
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs8
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs310
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs120
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs6
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs2
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSParam.cs210
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs6
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSScene.cs10
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs8
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs26
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs16
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs168
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs12
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs20
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs6
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEApi.cs2470
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs20
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEModule.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs92
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs14
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/OdeScene.cs78
-rw-r--r--OpenSim/Region/PhysicsModules/POS/POSCharacter.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs14
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs2470
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs50
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs12
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs12
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs38
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs64
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs6
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs58
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs18
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs44
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs118
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs74
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs106
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs76
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs24
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs1710
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs50
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs76
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs28
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs14
-rwxr-xr-xOpenSim/Region/ScriptEngine/XEngine/XEngine.cs82
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs2
-rw-r--r--OpenSim/Server/Base/CommandManager.cs90
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs2
-rw-r--r--OpenSim/Server/Base/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Server/Base/ProtocolVersions.cs14
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs42
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs4
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerConnector.cs14
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs4
-rw-r--r--OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs12
-rw-r--r--OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs20
-rw-r--r--OpenSim/Server/Handlers/Authentication/OpenIdServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs6
-rw-r--r--OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs6
-rw-r--r--OpenSim/Server/Handlers/BakedTextures/XBakesHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Base/ServerConnector.cs6
-rw-r--r--OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs10
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs10
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs12
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs4
-rw-r--r--OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs6
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs4
-rw-r--r--OpenSim/Server/Handlers/Land/LandServiceInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Login/LLLoginHandlers.cs8
-rw-r--r--OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs4
-rw-r--r--OpenSim/Server/Handlers/Map/MapAddServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs2
-rw-r--r--OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs4
-rw-r--r--OpenSim/Server/Handlers/Profiles/UserProfilesConnector.cs6
-rw-r--r--OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs108
-rw-r--r--OpenSim/Server/Handlers/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs10
-rw-r--r--OpenSim/Server/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Server/ServerMain.cs4
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs10
-rw-r--r--OpenSim/Services/AssetService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/AssetService/XAssetService.cs10
-rw-r--r--OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs6
-rw-r--r--OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs4
-rw-r--r--OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs6
-rw-r--r--OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs10
-rw-r--r--OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/AvatarService/AvatarService.cs4
-rw-r--r--OpenSim/Services/AvatarService/AvatarServiceBase.cs2
-rw-r--r--OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/Base/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/Base/ServiceBase.cs8
-rw-r--r--OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs22
-rw-r--r--OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs16
-rw-r--r--OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServicesConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs12
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs24
-rw-r--r--OpenSim/Services/Connectors/Land/LandServicesConnector.cs6
-rw-r--r--OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs32
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs16
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs18
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs16
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs10
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs6
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs6
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs24
-rw-r--r--OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs4
-rw-r--r--OpenSim/Services/EstateService/EstateDataService.cs8
-rw-r--r--OpenSim/Services/FSAssetService/FSAssetService.cs18
-rw-r--r--OpenSim/Services/FreeswitchService/FreeswitchService.cs58
-rw-r--r--OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/Friends/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/GridService/GridService.cs42
-rw-r--r--OpenSim/Services/GridService/GridServiceBase.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs16
-rw-r--r--OpenSim/Services/GridService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs20
-rw-r--r--OpenSim/Services/HypergridService/HGAssetService.cs2
-rw-r--r--OpenSim/Services/HypergridService/HGFSAssetService.cs2
-rw-r--r--OpenSim/Services/HypergridService/HGFriendsService.cs2
-rw-r--r--OpenSim/Services/HypergridService/HGInstantMessageService.cs2
-rw-r--r--OpenSim/Services/HypergridService/HGInventoryService.cs8
-rw-r--r--OpenSim/Services/HypergridService/HGRemoteAssetService.cs2
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs12
-rw-r--r--OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/HypergridService/UserAccountCache.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs22
-rw-r--r--OpenSim/Services/Interfaces/IAgentPreferencesService.cs2
-rw-r--r--OpenSim/Services/Interfaces/IAssetService.cs6
-rw-r--r--OpenSim/Services/Interfaces/IAuthenticationService.cs2
-rw-r--r--OpenSim/Services/Interfaces/IAuthorizationService.cs24
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs8
-rw-r--r--OpenSim/Services/Interfaces/IEstateDataService.cs34
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs14
-rw-r--r--OpenSim/Services/Interfaces/IGridUserService.cs14
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs6
-rw-r--r--OpenSim/Services/Interfaces/IInventoryService.cs6
-rw-r--r--OpenSim/Services/Interfaces/IOfflineIMService.cs4
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs2
-rw-r--r--OpenSim/Services/Interfaces/IUserProfilesService.cs8
-rw-r--r--OpenSim/Services/Interfaces/OpenProfileClient.cs4
-rw-r--r--OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs44
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs38
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs12
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs44
-rw-r--r--OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/MapImageService/MapImageService.cs6
-rw-r--r--OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs8
-rw-r--r--OpenSim/Services/PresenceService/PresenceServiceBase.cs2
-rw-r--r--OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/UserAccountService/AgentPreferencesService.cs2
-rw-r--r--OpenSim/Services/UserAccountService/GridUserService.cs2
-rw-r--r--OpenSim/Services/UserAccountService/GridUserServiceBase.cs2
-rw-r--r--OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs4
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesService.cs42
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs4
-rw-r--r--OpenSim/Tests/Clients/Grid/GridClient.cs8
-rw-r--r--OpenSim/Tests/Common/DatabaseTestAttribute.cs6
-rw-r--r--OpenSim/Tests/Common/Helpers/AssetHelpers.cs32
-rw-r--r--OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs2
-rw-r--r--OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs2
-rw-r--r--OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs10
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs66
-rw-r--r--OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs12
-rw-r--r--OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs4
-rw-r--r--OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs16
-rw-r--r--OpenSim/Tests/Common/LongRunningAttribute.cs4
-rw-r--r--OpenSim/Tests/Common/Mock/BaseAssetRepository.cs8
-rw-r--r--OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs28
-rw-r--r--OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs24
-rw-r--r--OpenSim/Tests/Common/Mock/MockScriptEngine.cs8
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs22
-rw-r--r--OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs10
-rw-r--r--OpenSim/Tests/Common/Mock/TestHttpClientContext.cs14
-rw-r--r--OpenSim/Tests/Common/Mock/TestHttpRequest.cs80
-rw-r--r--OpenSim/Tests/Common/Mock/TestHttpResponse.cs36
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs40
-rw-r--r--OpenSim/Tests/Common/Mock/TestLLUDPServer.cs26
-rw-r--r--OpenSim/Tests/Common/Mock/TestLandChannel.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestScene.cs6
-rw-r--r--OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs10
-rw-r--r--OpenSim/Tests/Common/TestHelpers.cs8
-rw-r--r--OpenSim/Tests/Robust/Clients/Grid/GridClient.cs4
-rw-r--r--OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs4
-rw-r--r--OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs4
-rw-r--r--OpenSim/Tools/Compiler/Program.cs4
-rw-r--r--OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Tools/Configger/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Tools/Configger/Util.cs2
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs4
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/CrossBehaviour.cs6
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs6
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/InventoryDownloadBehaviour.cs6
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs8
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour2.cs6
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs4
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/TwitchyBehaviour.cs8
-rw-r--r--OpenSim/Tools/pCampBot/Bot.cs24
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs34
-rw-r--r--OpenSim/Tools/pCampBot/Interfaces/IBehaviour.cs2
-rw-r--r--OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Tools/pCampBot/pCampBot.cs6
-rw-r--r--Prebuild/src/Core/Attributes/DataNodeAttribute.cs84
-rw-r--r--Prebuild/src/Core/Attributes/OptionNodeAttribute.cs84
-rw-r--r--Prebuild/src/Core/Attributes/TargetAttribute.cs84
-rw-r--r--Prebuild/src/Core/FatalException.cs114
-rw-r--r--Prebuild/src/Core/Interfaces/IDataNode.cs52
-rw-r--r--Prebuild/src/Core/Interfaces/ITarget.cs62
-rw-r--r--Prebuild/src/Core/Kernel.cs1400
-rw-r--r--Prebuild/src/Core/Nodes/AuthorNode.cs124
-rw-r--r--Prebuild/src/Core/Nodes/CleanFilesNode.cs18
-rw-r--r--Prebuild/src/Core/Nodes/CleanupNode.cs74
-rw-r--r--Prebuild/src/Core/Nodes/ConfigurationNode.cs372
-rw-r--r--Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs90
-rw-r--r--Prebuild/src/Core/Nodes/DataNode.cs172
-rw-r--r--Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs6
-rw-r--r--Prebuild/src/Core/Nodes/DescriptionNode.cs124
-rw-r--r--Prebuild/src/Core/Nodes/ExcludeNode.cs78
-rw-r--r--Prebuild/src/Core/Nodes/FileNode.cs456
-rw-r--r--Prebuild/src/Core/Nodes/FilesNode.cs284
-rw-r--r--Prebuild/src/Core/Nodes/MatchNode.cs458
-rw-r--r--Prebuild/src/Core/Nodes/OptionsNode.cs1178
-rw-r--r--Prebuild/src/Core/Nodes/ProcessNode.cs166
-rw-r--r--Prebuild/src/Core/Nodes/ProjectNode.cs1024
-rw-r--r--Prebuild/src/Core/Nodes/ReferenceNode.cs218
-rw-r--r--Prebuild/src/Core/Nodes/ReferencePathNode.cs124
-rw-r--r--Prebuild/src/Core/Nodes/SolutionNode.cs516
-rw-r--r--Prebuild/src/Core/Parse/IfContext.cs268
-rw-r--r--Prebuild/src/Core/Parse/Preprocessor.cs1088
-rw-r--r--Prebuild/src/Core/Targets/AutotoolsTarget.cs14
-rw-r--r--Prebuild/src/Core/Targets/DebugTarget.cs110
-rw-r--r--Prebuild/src/Core/Targets/MakefileTarget.cs20
-rw-r--r--Prebuild/src/Core/Targets/MonoDevelopTarget.cs964
-rw-r--r--Prebuild/src/Core/Targets/NAntTarget.cs710
-rw-r--r--Prebuild/src/Core/Targets/SharpDevelop2Target.cs88
-rw-r--r--Prebuild/src/Core/Targets/SharpDevelopTarget.cs794
-rw-r--r--Prebuild/src/Core/Targets/ToolInfo.cs356
-rw-r--r--Prebuild/src/Core/Targets/VS2002Target.cs114
-rw-r--r--Prebuild/src/Core/Targets/VS2003Target.cs1132
-rw-r--r--Prebuild/src/Core/Targets/VS2005Target.cs26
-rw-r--r--Prebuild/src/Core/Targets/VS2008Target.cs180
-rw-r--r--Prebuild/src/Core/Targets/VS2010Target.cs204
-rw-r--r--Prebuild/src/Core/Targets/VSGenericTarget.cs1766
-rw-r--r--Prebuild/src/Core/Targets/VSVersion.cs70
-rw-r--r--Prebuild/src/Core/Targets/XcodeTarget.cs24
-rw-r--r--Prebuild/src/Core/UnknownLanguageException.cs76
-rw-r--r--Prebuild/src/Core/Utilities/CommandLineCollection.cs254
-rw-r--r--Prebuild/src/Core/Utilities/CurrentDirectory.cs80
-rw-r--r--Prebuild/src/Core/Utilities/Helper.cs1036
-rw-r--r--Prebuild/src/Core/Utilities/Log.cs434
-rw-r--r--Prebuild/src/Core/WarningException.cs112
-rw-r--r--Prebuild/src/Prebuild.cs236
-rw-r--r--Prebuild/src/Properties/AssemblyInfo.cs18
-rw-r--r--ThirdParty/SmartThreadPool/CallerThreadContext.cs198
-rw-r--r--ThirdParty/SmartThreadPool/EventWaitHandle.cs30
-rw-r--r--ThirdParty/SmartThreadPool/EventWaitHandleFactory.cs6
-rw-r--r--ThirdParty/SmartThreadPool/Interfaces.cs444
-rw-r--r--ThirdParty/SmartThreadPool/InternalInterfaces.cs2
-rw-r--r--ThirdParty/SmartThreadPool/PriorityQueue.cs446
-rw-r--r--ThirdParty/SmartThreadPool/STPPerformanceCounter.cs606
-rw-r--r--ThirdParty/SmartThreadPool/STPStartInfo.cs150
-rw-r--r--ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs6
-rw-r--r--ThirdParty/SmartThreadPool/SmartThreadPool.cs1634
-rw-r--r--ThirdParty/SmartThreadPool/WIGStartInfo.cs218
-rw-r--r--ThirdParty/SmartThreadPool/WorkItem.cs20
-rw-r--r--ThirdParty/SmartThreadPool/WorkItemFactory.cs592
-rw-r--r--ThirdParty/SmartThreadPool/WorkItemInfo.cs104
-rw-r--r--ThirdParty/SmartThreadPool/WorkItemsGroup.cs452
-rw-r--r--ThirdParty/SmartThreadPool/WorkItemsGroupBase.cs14
-rw-r--r--ThirdParty/SmartThreadPool/WorkItemsQueue.cs872
959 files changed, 24588 insertions, 24588 deletions
diff --git a/OpenSim/Addons/Groups/GroupsExtendedData.cs b/OpenSim/Addons/Groups/GroupsExtendedData.cs
index c783b9e..d92c442 100644
--- a/OpenSim/Addons/Groups/GroupsExtendedData.cs
+++ b/OpenSim/Addons/Groups/GroupsExtendedData.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Groups
46 public string AccessToken; 46 public string AccessToken;
47 } 47 }
48 48
49 public class ExtendedGroupMembersData 49 public class ExtendedGroupMembersData
50 { 50 {
51 // This is the only difference: this is a string 51 // This is the only difference: this is a string
52 public string AgentID; 52 public string AgentID;
@@ -65,7 +65,7 @@ namespace OpenSim.Groups
65 public UUID RoleID; 65 public UUID RoleID;
66 // This is the only difference: this is a string 66 // This is the only difference: this is a string
67 public string MemberID; 67 public string MemberID;
68 68
69 } 69 }
70 70
71 public struct ExtendedGroupNoticeData 71 public struct ExtendedGroupNoticeData
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
index 2ec9652..f4d3490 100644
--- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs
+++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Groups
131 { 131 {
132 if (!m_groupMessagingEnabled) 132 if (!m_groupMessagingEnabled)
133 return; 133 return;
134 134
135 scene.RegisterModuleInterface<IGroupsMessagingModule>(this); 135 scene.RegisterModuleInterface<IGroupsMessagingModule>(this);
136 m_sceneList.Add(scene); 136 m_sceneList.Add(scene);
137 137
@@ -163,7 +163,7 @@ namespace OpenSim.Groups
163 if (m_groupData == null) 163 if (m_groupData == null)
164 { 164 {
165 m_log.Error("[Groups.Messaging]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled."); 165 m_log.Error("[Groups.Messaging]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
166 RemoveRegion(scene); 166 RemoveRegion(scene);
167 return; 167 return;
168 } 168 }
169 169
@@ -218,7 +218,7 @@ namespace OpenSim.Groups
218 m_msgTransferModule = null; 218 m_msgTransferModule = null;
219 } 219 }
220 220
221 public Type ReplaceableInterface 221 public Type ReplaceableInterface
222 { 222 {
223 get { return null; } 223 get { return null; }
224 } 224 }
@@ -262,7 +262,7 @@ namespace OpenSim.Groups
262 { 262 {
263 if (m_debugEnabled) 263 if (m_debugEnabled)
264 m_log.DebugFormat("[Groups.Messaging]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 264 m_log.DebugFormat("[Groups.Messaging]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
265 265
266 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID.ToString(), groupID, null); 266 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID.ToString(), groupID, null);
267 267
268 if (groupInfo != null) 268 if (groupInfo != null)
@@ -279,7 +279,7 @@ namespace OpenSim.Groups
279 { 279 {
280 SendMessageToGroup(im, groupID, UUID.Zero, null); 280 SendMessageToGroup(im, groupID, UUID.Zero, null);
281 } 281 }
282 282
283 public void SendMessageToGroup( 283 public void SendMessageToGroup(
284 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) 284 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition)
285 { 285 {
@@ -355,9 +355,9 @@ namespace OpenSim.Groups
355 { 355 {
356 if (!sendCondition(member)) 356 if (!sendCondition(member))
357 { 357 {
358 if (m_debugEnabled) 358 if (m_debugEnabled)
359 m_log.DebugFormat( 359 m_log.DebugFormat(
360 "[Groups.Messaging]: Not sending to {0} as they do not fulfill send condition", 360 "[Groups.Messaging]: Not sending to {0} as they do not fulfill send condition",
361 member.AgentID); 361 member.AgentID);
362 362
363 continue; 363 continue;
@@ -366,7 +366,7 @@ namespace OpenSim.Groups
366 else if (hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID)) 366 else if (hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID))
367 { 367 {
368 // Don't deliver messages to people who have dropped this session 368 // Don't deliver messages to people who have dropped this session
369 if (m_debugEnabled) 369 if (m_debugEnabled)
370 m_log.DebugFormat("[Groups.Messaging]: {0} has dropped session, not delivering to them", member.AgentID); 370 m_log.DebugFormat("[Groups.Messaging]: {0} has dropped session, not delivering to them", member.AgentID);
371 371
372 continue; 372 continue;
@@ -414,7 +414,7 @@ namespace OpenSim.Groups
414 "[Groups.Messaging]: SendMessageToGroup for group {0} with {1} visible members, {2} online took {3}ms", 414 "[Groups.Messaging]: SendMessageToGroup for group {0} with {1} visible members, {2} online took {3}ms",
415 groupID, groupMembersCount, groupMembers.Count(), Environment.TickCount - requestStartTick); 415 groupID, groupMembersCount, groupMembers.Count(), Environment.TickCount - requestStartTick);
416 } 416 }
417 417
418 #region SimGridEventHandlers 418 #region SimGridEventHandlers
419 419
420 void OnClientLogin(IClientAPI client) 420 void OnClientLogin(IClientAPI client)
@@ -445,13 +445,13 @@ namespace OpenSim.Groups
445 // The instant message module will only deliver messages of dialog types: 445 // The instant message module will only deliver messages of dialog types:
446 // MessageFromAgent, StartTyping, StopTyping, MessageFromObject 446 // MessageFromAgent, StartTyping, StopTyping, MessageFromObject
447 // 447 //
448 // Any other message type will not be delivered to a client by the 448 // Any other message type will not be delivered to a client by the
449 // Instant Message Module 449 // Instant Message Module
450 450
451 UUID regionID = new UUID(msg.RegionID); 451 UUID regionID = new UUID(msg.RegionID);
452 if (m_debugEnabled) 452 if (m_debugEnabled)
453 { 453 {
454 m_log.DebugFormat("[Groups.Messaging]: {0} called, IM from region {1}", 454 m_log.DebugFormat("[Groups.Messaging]: {0} called, IM from region {1}",
455 System.Reflection.MethodBase.GetCurrentMethod().Name, regionID); 455 System.Reflection.MethodBase.GetCurrentMethod().Name, regionID);
456 456
457 DebugGridInstantMessage(msg); 457 DebugGridInstantMessage(msg);
@@ -508,7 +508,7 @@ namespace OpenSim.Groups
508 m_log.DebugFormat("[Groups.Messaging]: skipping agent {0} because he has an agent in region of origin", sp.UUID); 508 m_log.DebugFormat("[Groups.Messaging]: skipping agent {0} because he has an agent in region of origin", sp.UUID);
509 return; 509 return;
510 } 510 }
511 else 511 else
512 { 512 {
513 if (m_debugEnabled) 513 if (m_debugEnabled)
514 m_log.DebugFormat("[Groups.Messaging]: not skipping agent {0}", sp.UUID); 514 m_log.DebugFormat("[Groups.Messaging]: not skipping agent {0}", sp.UUID);
@@ -531,7 +531,7 @@ namespace OpenSim.Groups
531 } 531 }
532 } 532 }
533 }); 533 });
534 534
535 } 535 }
536 } 536 }
537 } 537 }
@@ -555,7 +555,7 @@ namespace OpenSim.Groups
555 break; 555 break;
556 556
557 case (byte)InstantMessageDialog.SessionSend: 557 case (byte)InstantMessageDialog.SessionSend:
558 // User hasn't dropped, so they're in the session, 558 // User hasn't dropped, so they're in the session,
559 // maybe we should deliver it. 559 // maybe we should deliver it.
560 IClientAPI client = GetActiveClient(new UUID(msg.toAgentID)); 560 IClientAPI client = GetActiveClient(new UUID(msg.toAgentID));
561 if (client != null) 561 if (client != null)
@@ -655,7 +655,7 @@ namespace OpenSim.Groups
655 UUID AgentID = new UUID(im.fromAgentID); 655 UUID AgentID = new UUID(im.fromAgentID);
656 656
657 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero.ToString(), GroupID, null); 657 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero.ToString(), GroupID, null);
658 658
659 if (groupInfo != null) 659 if (groupInfo != null)
660 { 660 {
661 AgentInvitedToGroupChatSession(AgentID.ToString(), GroupID); 661 AgentInvitedToGroupChatSession(AgentID.ToString(), GroupID);
@@ -681,7 +681,7 @@ namespace OpenSim.Groups
681 UUID GroupID = new UUID(im.imSessionID); 681 UUID GroupID = new UUID(im.imSessionID);
682 UUID AgentID = new UUID(im.fromAgentID); 682 UUID AgentID = new UUID(im.fromAgentID);
683 683
684 if (m_debugEnabled) 684 if (m_debugEnabled)
685 m_log.DebugFormat("[Groups.Messaging]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); 685 m_log.DebugFormat("[Groups.Messaging]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString());
686 686
687 //If this agent is sending a message, then they want to be in the session 687 //If this agent is sending a message, then they want to be in the session
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs
index 57fbbf7..1e9f2b5 100644
--- a/OpenSim/Addons/Groups/GroupsModule.cs
+++ b/OpenSim/Addons/Groups/GroupsModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Groups
51 private List<Scene> m_sceneList = new List<Scene>(); 51 private List<Scene> m_sceneList = new List<Scene>();
52 52
53 private IMessageTransferModule m_msgTransferModule = null; 53 private IMessageTransferModule m_msgTransferModule = null;
54 54
55 private IGroupsServicesConnector m_groupData = null; 55 private IGroupsServicesConnector m_groupData = null;
56 private IUserManagement m_UserManagement; 56 private IUserManagement m_UserManagement;
57 57
@@ -210,7 +210,7 @@ namespace OpenSim.Groups
210 if (m_debugEnabled) m_log.Debug("[Groups]: Shutting down Groups module."); 210 if (m_debugEnabled) m_log.Debug("[Groups]: Shutting down Groups module.");
211 } 211 }
212 212
213 public Type ReplaceableInterface 213 public Type ReplaceableInterface
214 { 214 {
215 get { return null; } 215 get { return null; }
216 } 216 }
@@ -318,7 +318,7 @@ namespace OpenSim.Groups
318 318
319 SendAgentGroupDataUpdate(remoteClient, false); 319 SendAgentGroupDataUpdate(remoteClient, false);
320 320
321 // also current viewers do ignore it and ask later on a much nicer thread 321 // also current viewers do ignore it and ask later on a much nicer thread
322 // its a info request not a change, so nothing is sent to others 322 // its a info request not a change, so nothing is sent to others
323 // they do get the group title with the avatar object update on arrivel to a region 323 // they do get the group title with the avatar object update on arrivel to a region
324 } 324 }
@@ -453,9 +453,9 @@ namespace OpenSim.Groups
453 } 453 }
454 454
455 if (m_groupData.AddGroupNotice(GetRequestingAgentIDStr(remoteClient), GroupID, NoticeID, im.fromAgentName, Subject, Message, 455 if (m_groupData.AddGroupNotice(GetRequestingAgentIDStr(remoteClient), GroupID, NoticeID, im.fromAgentName, Subject, Message,
456 hasAttachment, 456 hasAttachment,
457 (byte)(item == null ? 0 : item.AssetType), 457 (byte)(item == null ? 0 : item.AssetType),
458 item == null ? null : item.Name, 458 item == null ? null : item.Name,
459 item == null ? UUID.Zero : item.ID, 459 item == null ? UUID.Zero : item.ID,
460 item == null ? UUID.Zero.ToString() : item.Owner.ToString())) 460 item == null ? UUID.Zero.ToString() : item.Owner.ToString()))
461 { 461 {
@@ -463,7 +463,7 @@ namespace OpenSim.Groups
463 { 463 {
464 OnNewGroupNotice(GroupID, NoticeID); 464 OnNewGroupNotice(GroupID, NoticeID);
465 } 465 }
466 466
467 // Send notice out to everyone that wants notices 467 // Send notice out to everyone that wants notices
468 foreach (GroupMembersData member in m_groupData.GetGroupMembers(GetRequestingAgentIDStr(remoteClient), GroupID)) 468 foreach (GroupMembersData member in m_groupData.GetGroupMembers(GetRequestingAgentIDStr(remoteClient), GroupID))
469 { 469 {
@@ -497,7 +497,7 @@ namespace OpenSim.Groups
497 497
498 m_log.DebugFormat("[Groups]: Giving inventory from {0} to {1}", giver, remoteClient.AgentId); 498 m_log.DebugFormat("[Groups]: Giving inventory from {0} to {1}", giver, remoteClient.AgentId);
499 string message; 499 string message;
500 InventoryItemBase itemCopy = ((Scene)(remoteClient.Scene)).GiveInventoryItem(remoteClient.AgentId, 500 InventoryItemBase itemCopy = ((Scene)(remoteClient.Scene)).GiveInventoryItem(remoteClient.AgentId,
501 giver, notice.noticeData.AttachmentItemID, out message); 501 giver, notice.noticeData.AttachmentItemID, out message);
502 502
503 if (itemCopy == null) 503 if (itemCopy == null)
@@ -509,10 +509,10 @@ namespace OpenSim.Groups
509 remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0); 509 remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0);
510 } 510 }
511 } 511 }
512 512
513 // Interop, received special 210 code for ejecting a group member 513 // Interop, received special 210 code for ejecting a group member
514 // this only works within the comms servers domain, and won't work hypergrid 514 // this only works within the comms servers domain, and won't work hypergrid
515 // TODO:FIXME: Use a presense server of some kind to find out where the 515 // TODO:FIXME: Use a presense server of some kind to find out where the
516 // client actually is, and try contacting that region directly to notify them, 516 // client actually is, and try contacting that region directly to notify them,
517 // or provide the notification via xmlrpc update queue 517 // or provide the notification via xmlrpc update queue
518 if ((im.dialog == 210)) 518 if ((im.dialog == 210))
@@ -523,7 +523,7 @@ namespace OpenSim.Groups
523 523
524 UUID ejecteeID = new UUID(im.toAgentID); 524 UUID ejecteeID = new UUID(im.toAgentID);
525 525
526 im.imSessionID = UUID.Zero.Guid; 526 im.imSessionID = UUID.Zero.Guid;
527 im.dialog = (byte)InstantMessageDialog.MessageFromAgent; 527 im.dialog = (byte)InstantMessageDialog.MessageFromAgent;
528 OutgoingInstantMessage(im, ejecteeID); 528 OutgoingInstantMessage(im, ejecteeID);
529 529
@@ -577,7 +577,7 @@ namespace OpenSim.Groups
577 { 577 {
578 return m_groupData.GetGroupRecord(UUID.Zero.ToString(), UUID.Zero, name); 578 return m_groupData.GetGroupRecord(UUID.Zero.ToString(), UUID.Zero, name);
579 } 579 }
580 580
581 public void ActivateGroup(IClientAPI remoteClient, UUID groupID) 581 public void ActivateGroup(IClientAPI remoteClient, UUID groupID)
582 { 582 {
583 if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 583 if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -585,7 +585,7 @@ namespace OpenSim.Groups
585 m_groupData.SetAgentActiveGroup(GetRequestingAgentIDStr(remoteClient), GetRequestingAgentIDStr(remoteClient), groupID); 585 m_groupData.SetAgentActiveGroup(GetRequestingAgentIDStr(remoteClient), GetRequestingAgentIDStr(remoteClient), groupID);
586 586
587 // Changing active group changes title, active powers, all kinds of things 587 // Changing active group changes title, active powers, all kinds of things
588 // anyone who is in any region that can see this client, should probably be 588 // anyone who is in any region that can see this client, should probably be
589 // updated with new group info. At a minimum, they should get ScenePresence 589 // updated with new group info. At a minimum, they should get ScenePresence
590 // updated with new title. 590 // updated with new title.
591 SendAgentGroupDataUpdate(remoteClient, true); 591 SendAgentGroupDataUpdate(remoteClient, true);
@@ -620,10 +620,10 @@ namespace OpenSim.Groups
620 620
621 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 621 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
622 { 622 {
623 if (m_debugEnabled) 623 if (m_debugEnabled)
624 m_log.DebugFormat( 624 m_log.DebugFormat(
625 "[Groups]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); 625 "[Groups]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name);
626 626
627 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentIDStr(remoteClient), groupID); 627 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentIDStr(remoteClient), groupID);
628 628
629 if (m_debugEnabled) 629 if (m_debugEnabled)
@@ -706,7 +706,7 @@ namespace OpenSim.Groups
706 706
707 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) 707 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID)
708 { 708 {
709 if (m_debugEnabled) 709 if (m_debugEnabled)
710 m_log.DebugFormat( 710 m_log.DebugFormat(
711 "[Groups]: {0} called with groupID={1}, agentID={2}", 711 "[Groups]: {0} called with groupID={1}, agentID={2}",
712 System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); 712 System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID);
@@ -776,7 +776,7 @@ namespace OpenSim.Groups
776 } 776 }
777 777
778 string reason = string.Empty; 778 string reason = string.Empty;
779 UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment, 779 UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment,
780 allowPublish, maturePublish, remoteClient.AgentId, out reason); 780 allowPublish, maturePublish, remoteClient.AgentId, out reason);
781 781
782 if (groupID != UUID.Zero) 782 if (groupID != UUID.Zero)
@@ -823,7 +823,7 @@ namespace OpenSim.Groups
823 if (membership != null) 823 if (membership != null)
824 { 824 {
825 return membership.GroupTitle; 825 return membership.GroupTitle;
826 } 826 }
827 return string.Empty; 827 return string.Empty;
828 } 828 }
829 829
@@ -839,7 +839,7 @@ namespace OpenSim.Groups
839 // TODO: Not sure what all is needed here, but if the active group role change is for the group 839 // TODO: Not sure what all is needed here, but if the active group role change is for the group
840 // the client currently has set active, then we need to do a scene presence update too 840 // the client currently has set active, then we need to do a scene presence update too
841 // if (m_groupData.GetAgentActiveMembership(GetRequestingAgentID(remoteClient)).GroupID == GroupID) 841 // if (m_groupData.GetAgentActiveMembership(GetRequestingAgentID(remoteClient)).GroupID == GroupID)
842 842
843 SendDataUpdate(remoteClient, true); 843 SendDataUpdate(remoteClient, true);
844 } 844 }
845 845
@@ -899,7 +899,7 @@ namespace OpenSim.Groups
899 case 1: 899 case 1:
900 // Remove 900 // Remove
901 m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentIDStr(remoteClient), memberID.ToString(), groupID, roleID); 901 m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentIDStr(remoteClient), memberID.ToString(), groupID, roleID);
902 902
903 break; 903 break;
904 default: 904 default:
905 m_log.ErrorFormat("[Groups]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); 905 m_log.ErrorFormat("[Groups]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes);
@@ -1072,7 +1072,7 @@ namespace OpenSim.Groups
1072 1072
1073 // Send Message to Ejectee 1073 // Send Message to Ejectee
1074 GridInstantMessage msg = new GridInstantMessage(); 1074 GridInstantMessage msg = new GridInstantMessage();
1075 1075
1076 // if local send a normal message 1076 // if local send a normal message
1077 if(ejecteeClient != null) 1077 if(ejecteeClient != null)
1078 { 1078 {
@@ -1324,7 +1324,7 @@ namespace OpenSim.Groups
1324 membershipArray = membershipData.ToArray(); 1324 membershipArray = membershipData.ToArray();
1325 } 1325 }
1326 } 1326 }
1327 1327
1328 if (m_debugEnabled) 1328 if (m_debugEnabled)
1329 { 1329 {
1330 m_log.InfoFormat("[Groups]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); 1330 m_log.InfoFormat("[Groups]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
index 7d57de1..9852581 100644
--- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Groups
103 if (!m_Enabled) 103 if (!m_Enabled)
104 return; 104 return;
105 105
106 m_log.DebugFormat("[Groups]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName); 106 m_log.DebugFormat("[Groups]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName);
107 scene.RegisterModuleInterface<IGroupsServicesConnector>(this); 107 scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
108 m_Scenes.Add(scene); 108 m_Scenes.Add(scene);
109 109
@@ -135,7 +135,7 @@ namespace OpenSim.Groups
135 { 135 {
136 m_LocalGroupsConnector = new GroupsServiceLocalConnectorModule(m_Config, m_UserManagement); 136 m_LocalGroupsConnector = new GroupsServiceLocalConnectorModule(m_Config, m_UserManagement);
137 // Also, if local, create the endpoint for the HGGroupsService 137 // Also, if local, create the endpoint for the HGGroupsService
138 new HGGroupsServiceRobustConnector(m_Config, MainServer.Instance, string.Empty, 138 new HGGroupsServiceRobustConnector(m_Config, MainServer.Instance, string.Empty,
139 scene.RequestModuleInterface<IOfflineIMService>(), scene.RequestModuleInterface<IUserAccountService>()); 139 scene.RequestModuleInterface<IOfflineIMService>(), scene.RequestModuleInterface<IUserAccountService>());
140 140
141 } 141 }
@@ -170,7 +170,7 @@ namespace OpenSim.Groups
170 if (sp is ScenePresence && ((ScenePresence)sp).PresenceType != PresenceType.Npc) 170 if (sp is ScenePresence && ((ScenePresence)sp).PresenceType != PresenceType.Npc)
171 { 171 {
172 AgentCircuitData aCircuit = ((ScenePresence)sp).Scene.AuthenticateHandler.GetAgentCircuitData(client.AgentId); 172 AgentCircuitData aCircuit = ((ScenePresence)sp).Scene.AuthenticateHandler.GetAgentCircuitData(client.AgentId);
173 if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 && 173 if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 &&
174 m_OfflineIM != null && m_Messaging != null) 174 m_OfflineIM != null && m_Messaging != null)
175 { 175 {
176 List<GridInstantMessage> ims = m_OfflineIM.GetMessages(aCircuit.AgentID); 176 List<GridInstantMessage> ims = m_OfflineIM.GetMessages(aCircuit.AgentID);
@@ -184,12 +184,12 @@ namespace OpenSim.Groups
184 184
185 #region IGroupsServicesConnector 185 #region IGroupsServicesConnector
186 186
187 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 187 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
188 bool allowPublish, bool maturePublish, UUID founderID, out string reason) 188 bool allowPublish, bool maturePublish, UUID founderID, out string reason)
189 { 189 {
190 reason = string.Empty; 190 reason = string.Empty;
191 if (m_UserManagement.IsLocalGridUser(RequestingAgentID)) 191 if (m_UserManagement.IsLocalGridUser(RequestingAgentID))
192 return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID, 192 return m_LocalGroupsConnector.CreateGroup(RequestingAgentID, name, charter, showInList, insigniaID,
193 membershipFee, openEnrollment, allowPublish, maturePublish, founderID, out reason); 193 membershipFee, openEnrollment, allowPublish, maturePublish, founderID, out reason);
194 else 194 else
195 { 195 {
@@ -198,14 +198,14 @@ namespace OpenSim.Groups
198 } 198 }
199 } 199 }
200 200
201 public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, 201 public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee,
202 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason) 202 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason)
203 { 203 {
204 reason = string.Empty; 204 reason = string.Empty;
205 string url = string.Empty; 205 string url = string.Empty;
206 string name = string.Empty; 206 string name = string.Empty;
207 if (IsLocal(groupID, out url, out name)) 207 if (IsLocal(groupID, out url, out name))
208 return m_LocalGroupsConnector.UpdateGroup(AgentUUI(RequestingAgentID), groupID, charter, showInList, insigniaID, membershipFee, 208 return m_LocalGroupsConnector.UpdateGroup(AgentUUI(RequestingAgentID), groupID, charter, showInList, insigniaID, membershipFee,
209 openEnrollment, allowPublish, maturePublish, out reason); 209 openEnrollment, allowPublish, maturePublish, out reason);
210 else 210 else
211 { 211 {
@@ -374,7 +374,7 @@ namespace OpenSim.Groups
374 374
375 } 375 }
376 } 376 }
377 377
378 return new List<GroupRoleMembersData>(); 378 return new List<GroupRoleMembersData>();
379 } 379 }
380 380
@@ -626,7 +626,7 @@ namespace OpenSim.Groups
626 } 626 }
627 if (agent != null) 627 if (agent != null)
628 return Util.ProduceUserUniversalIdentifier(agent); 628 return Util.ProduceUserUniversalIdentifier(agent);
629 629
630 // we don't know anything about this foreign user 630 // we don't know anything about this foreign user
631 // try asking the user management module, which may know more 631 // try asking the user management module, which may know more
632 return m_UserManagement.GetUserUUI(AgentID); 632 return m_UserManagement.GetUserUUI(AgentID);
@@ -664,7 +664,7 @@ namespace OpenSim.Groups
664 string url = string.Empty, first = string.Empty, last = string.Empty, tmp = string.Empty; 664 string url = string.Empty, first = string.Empty, last = string.Empty, tmp = string.Empty;
665 if (Util.ParseUniversalUserIdentifier(uID, out userID, out url, out first, out last, out tmp)) 665 if (Util.ParseUniversalUserIdentifier(uID, out userID, out url, out first, out last, out tmp))
666 m_UserManagement.AddUser(userID, first, last, url); 666 m_UserManagement.AddUser(userID, first, last, url);
667 667
668 return userID; 668 return userID;
669 } 669 }
670 670
diff --git a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs
index f60c1a5..af00770 100644
--- a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs
@@ -64,8 +64,8 @@ namespace OpenSim.Groups
64 64
65 m_log.DebugFormat("[Groups.RobustHGConnector]: Starting with config name {0}", m_ConfigName); 65 m_log.DebugFormat("[Groups.RobustHGConnector]: Starting with config name {0}", m_ConfigName);
66 66
67 string homeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", 67 string homeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI",
68 new string[] { "Startup", "Hypergrid", m_ConfigName}, string.Empty); 68 new string[] { "Startup", "Hypergrid", m_ConfigName}, string.Empty);
69 if (homeURI == string.Empty) 69 if (homeURI == string.Empty)
70 throw new Exception(String.Format("[Groups.RobustHGConnector]: please provide the HomeURI [Startup] or in section {0}", m_ConfigName)); 70 throw new Exception(String.Format("[Groups.RobustHGConnector]: please provide the HomeURI [Startup] or in section {0}", m_ConfigName));
71 71
diff --git a/OpenSim/Addons/Groups/IGroupsServicesConnector.cs b/OpenSim/Addons/Groups/IGroupsServicesConnector.cs
index a09b59e..8a6e88d 100644
--- a/OpenSim/Addons/Groups/IGroupsServicesConnector.cs
+++ b/OpenSim/Addons/Groups/IGroupsServicesConnector.cs
@@ -34,9 +34,9 @@ namespace OpenSim.Groups
34{ 34{
35 public interface IGroupsServicesConnector 35 public interface IGroupsServicesConnector
36 { 36 {
37 UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, 37 UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee,
38 bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID, out string reason); 38 bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID, out string reason);
39 bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, 39 bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee,
40 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason); 40 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason);
41 ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName); 41 ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName);
42 List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search); 42 List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search);
@@ -75,7 +75,7 @@ namespace OpenSim.Groups
75 /// If the user is a member of the group then the data structure is returned. If not, then null is returned. 75 /// If the user is a member of the group then the data structure is returned. If not, then null is returned.
76 /// </returns> 76 /// </returns>
77 ExtendedGroupMembershipData GetAgentGroupMembership(string RequestingAgentID, string AgentID, UUID GroupID); 77 ExtendedGroupMembershipData GetAgentGroupMembership(string RequestingAgentID, string AgentID, UUID GroupID);
78 78
79 /// <summary> 79 /// <summary>
80 /// Get information about the groups to which a user belongs. 80 /// Get information about the groups to which a user belongs.
81 /// </summary> 81 /// </summary>
@@ -87,7 +87,7 @@ namespace OpenSim.Groups
87 /// </returns> 87 /// </returns>
88 List<GroupMembershipData> GetAgentGroupMemberships(string RequestingAgentID, string AgentID); 88 List<GroupMembershipData> GetAgentGroupMemberships(string RequestingAgentID, string AgentID);
89 89
90 bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, 90 bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message,
91 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID); 91 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID);
92 GroupNoticeInfo GetGroupNotice(string RequestingAgentID, UUID noticeID); 92 GroupNoticeInfo GetGroupNotice(string RequestingAgentID, UUID noticeID);
93 List<ExtendedGroupNoticeData> GetGroupNotices(string RequestingAgentID, UUID GroupID); 93 List<ExtendedGroupNoticeData> GetGroupNotices(string RequestingAgentID, UUID GroupID);
diff --git a/OpenSim/Addons/Groups/Local/GroupsServiceLocalConnectorModule.cs b/OpenSim/Addons/Groups/Local/GroupsServiceLocalConnectorModule.cs
index 8e30df5..c7877c6 100644
--- a/OpenSim/Addons/Groups/Local/GroupsServiceLocalConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Local/GroupsServiceLocalConnectorModule.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Groups
108 if (!m_Enabled) 108 if (!m_Enabled)
109 return; 109 return;
110 110
111 m_log.DebugFormat("[Groups]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName); 111 m_log.DebugFormat("[Groups]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName);
112 scene.RegisterModuleInterface<IGroupsServicesConnector>(this); 112 scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
113 m_Scenes.Add(scene); 113 m_Scenes.Add(scene);
114 } 114 }
@@ -146,16 +146,16 @@ namespace OpenSim.Groups
146 146
147 #region IGroupsServicesConnector 147 #region IGroupsServicesConnector
148 148
149 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 149 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
150 bool allowPublish, bool maturePublish, UUID founderID, out string reason) 150 bool allowPublish, bool maturePublish, UUID founderID, out string reason)
151 { 151 {
152 m_log.DebugFormat("[Groups]: Creating group {0}", name); 152 m_log.DebugFormat("[Groups]: Creating group {0}", name);
153 reason = string.Empty; 153 reason = string.Empty;
154 return m_GroupsService.CreateGroup(RequestingAgentID.ToString(), name, charter, showInList, insigniaID, 154 return m_GroupsService.CreateGroup(RequestingAgentID.ToString(), name, charter, showInList, insigniaID,
155 membershipFee, openEnrollment, allowPublish, maturePublish, founderID, out reason); 155 membershipFee, openEnrollment, allowPublish, maturePublish, founderID, out reason);
156 } 156 }
157 157
158 public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, 158 public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee,
159 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason) 159 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason)
160 { 160 {
161 reason = string.Empty; 161 reason = string.Empty;
@@ -296,7 +296,7 @@ namespace OpenSim.Groups
296 public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, 296 public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message,
297 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) 297 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID)
298 { 298 {
299 return m_GroupsService.AddGroupNotice(RequestingAgentID, groupID, noticeID, fromName, subject, message, 299 return m_GroupsService.AddGroupNotice(RequestingAgentID, groupID, noticeID, fromName, subject, message,
300 hasAttachment, attType, attName, attItemID, attOwnerID); 300 hasAttachment, attType, attName, attItemID, attOwnerID);
301 } 301 }
302 302
diff --git a/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs b/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs
index 98630eb..e9be9c4 100644
--- a/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs
+++ b/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Addons.Groups")] 9[assembly: AssemblyTitle("OpenSim.Addons.Groups")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
index 7450c14..8f6be0d 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
@@ -41,7 +41,7 @@ using Nini.Config;
41 41
42namespace OpenSim.Groups 42namespace OpenSim.Groups
43{ 43{
44 public class GroupsServiceRemoteConnector 44 public class GroupsServiceRemoteConnector
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
@@ -71,7 +71,7 @@ namespace OpenSim.Groups
71 } 71 }
72 /// 72 ///
73 73
74 m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, authentication {1}", 74 m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, authentication {1}",
75 m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); 75 m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString()));
76 } 76 }
77 77
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs
index d4739c6..b6c75a8 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Groups
113 if (!m_Enabled) 113 if (!m_Enabled)
114 return; 114 return;
115 115
116 m_log.DebugFormat("[Groups.RemoteConnector]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName); 116 m_log.DebugFormat("[Groups.RemoteConnector]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName);
117 scene.RegisterModuleInterface<IGroupsServicesConnector>(this); 117 scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
118 m_Scenes.Add(scene); 118 m_Scenes.Add(scene);
119 } 119 }
@@ -151,7 +151,7 @@ namespace OpenSim.Groups
151 151
152 #region IGroupsServicesConnector 152 #region IGroupsServicesConnector
153 153
154 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 154 public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
155 bool allowPublish, bool maturePublish, UUID founderID, out string reason) 155 bool allowPublish, bool maturePublish, UUID founderID, out string reason)
156 { 156 {
157 m_log.DebugFormat("[Groups.RemoteConnector]: Creating group {0}", name); 157 m_log.DebugFormat("[Groups.RemoteConnector]: Creating group {0}", name);
@@ -167,7 +167,7 @@ namespace OpenSim.Groups
167 return groupID; 167 return groupID;
168 } 168 }
169 169
170 public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, 170 public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee,
171 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason) 171 bool openEnrollment, bool allowPublish, bool maturePublish, out string reason)
172 { 172 {
173 string r = string.Empty; 173 string r = string.Empty;
@@ -186,9 +186,9 @@ namespace OpenSim.Groups
186 if (GroupID == UUID.Zero && (GroupName == null || GroupName != null && GroupName == string.Empty)) 186 if (GroupID == UUID.Zero && (GroupName == null || GroupName != null && GroupName == string.Empty))
187 return null; 187 return null;
188 188
189 return m_CacheWrapper.GetGroupRecord(RequestingAgentID,GroupID,GroupName, delegate 189 return m_CacheWrapper.GetGroupRecord(RequestingAgentID,GroupID,GroupName, delegate
190 { 190 {
191 return m_GroupsService.GetGroupRecord(RequestingAgentID, GroupID, GroupName); 191 return m_GroupsService.GetGroupRecord(RequestingAgentID, GroupID, GroupName);
192 }); 192 });
193 } 193 }
194 194
@@ -362,7 +362,7 @@ namespace OpenSim.Groups
362 m_GroupsService.RemoveAgentToGroupInvite(RequestingAgentID, inviteID); 362 m_GroupsService.RemoveAgentToGroupInvite(RequestingAgentID, inviteID);
363 } 363 }
364 364
365 public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, 365 public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message,
366 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) 366 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID)
367 { 367 {
368 GroupNoticeInfo notice = new GroupNoticeInfo(); 368 GroupNoticeInfo notice = new GroupNoticeInfo();
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
index d79e4fa..598e7a5 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
@@ -393,7 +393,7 @@ namespace OpenSim.Groups
393 393
394 if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") || 394 if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") ||
395 !request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") || 395 !request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") ||
396 !request.ContainsKey("Powers") || !request.ContainsKey("OP")) 396 !request.ContainsKey("Powers") || !request.ContainsKey("OP"))
397 NullResult(result, "Bad network data"); 397 NullResult(result, "Bad network data");
398 398
399 else 399 else
@@ -519,11 +519,11 @@ namespace OpenSim.Groups
519 519
520 bool success = false; 520 bool success = false;
521 if (op == "ADD") 521 if (op == "ADD")
522 success = m_GroupsService.AddAgentToGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), 522 success = m_GroupsService.AddAgentToGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(),
523 new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); 523 new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString()));
524 524
525 else if (op == "DELETE") 525 else if (op == "DELETE")
526 success = m_GroupsService.RemoveAgentFromGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), 526 success = m_GroupsService.RemoveAgentFromGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(),
527 new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); 527 new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString()));
528 528
529 result["RESULT"] = success.ToString(); 529 result["RESULT"] = success.ToString();
@@ -647,8 +647,8 @@ namespace OpenSim.Groups
647 string op = request["OP"].ToString(); 647 string op = request["OP"].ToString();
648 648
649 if (op == "ADD" && request.ContainsKey("GroupID") && request.ContainsKey("RoleID") && request.ContainsKey("AgentID")) 649 if (op == "ADD" && request.ContainsKey("GroupID") && request.ContainsKey("RoleID") && request.ContainsKey("AgentID"))
650 { 650 {
651 bool success = m_GroupsService.AddAgentToGroupInvite(request["RequestingAgentID"].ToString(), 651 bool success = m_GroupsService.AddAgentToGroupInvite(request["RequestingAgentID"].ToString(),
652 new UUID(request["InviteID"].ToString()), new UUID(request["GroupID"].ToString()), 652 new UUID(request["InviteID"].ToString()), new UUID(request["GroupID"].ToString()),
653 new UUID(request["RoleID"].ToString()), request["AgentID"].ToString()); 653 new UUID(request["RoleID"].ToString()), request["AgentID"].ToString());
654 654
@@ -664,7 +664,7 @@ namespace OpenSim.Groups
664 } 664 }
665 else if (op == "GET") 665 else if (op == "GET")
666 { 666 {
667 GroupInviteInfo invite = m_GroupsService.GetAgentToGroupInvite(request["RequestingAgentID"].ToString(), 667 GroupInviteInfo invite = m_GroupsService.GetAgentToGroupInvite(request["RequestingAgentID"].ToString(),
668 new UUID(request["InviteID"].ToString())); 668 new UUID(request["InviteID"].ToString()));
669 669
670 if (invite != null) 670 if (invite != null)
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs
index 710b00a..ea0fedd 100644
--- a/OpenSim/Addons/Groups/Service/GroupsService.cs
+++ b/OpenSim/Addons/Groups/Service/GroupsService.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Groups
126 126
127 #endregion 127 #endregion
128 128
129 public UUID CreateGroup(string RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 129 public UUID CreateGroup(string RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
130 bool allowPublish, bool maturePublish, UUID founderID, out string reason) 130 bool allowPublish, bool maturePublish, UUID founderID, out string reason)
131 { 131 {
132 reason = string.Empty; 132 reason = string.Empty;
@@ -264,7 +264,7 @@ namespace OpenSim.Groups
264 if (ownerRole != null) 264 if (ownerRole != null)
265 ownerRoleID = ownerRole.RoleID; 265 ownerRoleID = ownerRole.RoleID;
266 266
267 // Check visibility? 267 // Check visibility?
268 // When we don't want to check visibility, we pass it "all" as the requestingAgentID 268 // When we don't want to check visibility, we pass it "all" as the requestingAgentID
269 bool checkVisibility = !RequestingAgentID.Equals(UUID.Zero.ToString()); 269 bool checkVisibility = !RequestingAgentID.Equals(UUID.Zero.ToString());
270 270
@@ -307,20 +307,20 @@ namespace OpenSim.Groups
307 m.Contribution = Int32.Parse(d.Data["Contribution"]); 307 m.Contribution = Int32.Parse(d.Data["Contribution"]);
308 m.ListInProfile = d.Data["ListInProfile"] == "1" ? true : false; 308 m.ListInProfile = d.Data["ListInProfile"] == "1" ? true : false;
309 309
310 GridUserData gud = m_GridUserService.Get(d.PrincipalID); 310 GridUserData gud = m_GridUserService.Get(d.PrincipalID);
311 if (gud != null) 311 if (gud != null)
312 { 312 {
313 if (bool.Parse(gud.Data["Online"])) 313 if (bool.Parse(gud.Data["Online"]))
314 { 314 {
315 m.OnlineStatus = @"Online"; 315 m.OnlineStatus = @"Online";
316 } 316 }
317 else 317 else
318 { 318 {
319 int unixtime = int.Parse(gud.Data["Login"]); 319 int unixtime = int.Parse(gud.Data["Login"]);
320 // The viewer is very picky about how these strings are formed. Eg. it will crash on malformed dates! 320 // The viewer is very picky about how these strings are formed. Eg. it will crash on malformed dates!
321 m.OnlineStatus = (unixtime == 0) ? @"unknown" : Util.ToDateTime(unixtime).ToString("MM/dd/yyyy"); 321 m.OnlineStatus = (unixtime == 0) ? @"unknown" : Util.ToDateTime(unixtime).ToString("MM/dd/yyyy");
322 } 322 }
323 } 323 }
324 324
325 // Is this person an owner of the group? 325 // Is this person an owner of the group?
326 m.IsOwner = (rolemembershipsList.Find(r => r.RoleID == ownerRoleID) != null) ? true : false; 326 m.IsOwner = (rolemembershipsList.Find(r => r.RoleID == ownerRoleID) != null) ? true : false;
@@ -553,8 +553,8 @@ namespace OpenSim.Groups
553 { 553 {
554 newRoleID = r.RoleID; 554 newRoleID = r.RoleID;
555 break; 555 break;
556 } 556 }
557 } 557 }
558 558
559 MembershipData member = m_Database.RetrieveMember(GroupID, AgentID); 559 MembershipData member = m_Database.RetrieveMember(GroupID, AgentID);
560 if (member != null) 560 if (member != null)
@@ -712,7 +712,7 @@ namespace OpenSim.Groups
712 m_Database.StoreMember(membership); 712 m_Database.StoreMember(membership);
713 } 713 }
714 714
715 public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, 715 public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message,
716 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) 716 bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID)
717 { 717 {
718 // Check perms 718 // Check perms
diff --git a/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs b/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs
index 8e237aa..98d0172 100644
--- a/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs
+++ b/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs
@@ -35,67 +35,67 @@ using OpenSim.Services.Base;
35 35
36namespace OpenSim.Groups 36namespace OpenSim.Groups
37{ 37{
38 public class GroupsServiceBase : ServiceBase 38 public class GroupsServiceBase : ServiceBase
39 { 39 {
40 protected IGroupsData m_Database = null; 40 protected IGroupsData m_Database = null;
41 protected IGridUserData m_GridUserService = null; 41 protected IGridUserData m_GridUserService = null;
42 42
43 public GroupsServiceBase(IConfigSource config, string cName) 43 public GroupsServiceBase(IConfigSource config, string cName)
44 : base(config) 44 : base(config)
45 { 45 {
46 string dllName = String.Empty; 46 string dllName = String.Empty;
47 string connString = String.Empty; 47 string connString = String.Empty;
48 string realm = "os_groups"; 48 string realm = "os_groups";
49 string usersRealm = "GridUser"; 49 string usersRealm = "GridUser";
50 string configName = (cName == string.Empty) ? "Groups" : cName; 50 string configName = (cName == string.Empty) ? "Groups" : cName;
51 51
52 // 52 //
53 // Try reading the [DatabaseService] section, if it exists 53 // Try reading the [DatabaseService] section, if it exists
54 // 54 //
55 IConfig dbConfig = config.Configs["DatabaseService"]; 55 IConfig dbConfig = config.Configs["DatabaseService"];
56 if (dbConfig != null) 56 if (dbConfig != null)
57 { 57 {
58 if (dllName == String.Empty) 58 if (dllName == String.Empty)
59 dllName = dbConfig.GetString("StorageProvider", String.Empty); 59 dllName = dbConfig.GetString("StorageProvider", String.Empty);
60 if (connString == String.Empty) 60 if (connString == String.Empty)
61 connString = dbConfig.GetString("ConnectionString", String.Empty); 61 connString = dbConfig.GetString("ConnectionString", String.Empty);
62 } 62 }
63 63
64 // 64 //
65 // [Groups] section overrides [DatabaseService], if it exists 65 // [Groups] section overrides [DatabaseService], if it exists
66 // 66 //
67 IConfig groupsConfig = config.Configs[configName]; 67 IConfig groupsConfig = config.Configs[configName];
68 if (groupsConfig != null) 68 if (groupsConfig != null)
69 { 69 {
70 dllName = groupsConfig.GetString("StorageProvider", dllName); 70 dllName = groupsConfig.GetString("StorageProvider", dllName);
71 connString = groupsConfig.GetString("ConnectionString", connString); 71 connString = groupsConfig.GetString("ConnectionString", connString);
72 realm = groupsConfig.GetString("Realm", realm); 72 realm = groupsConfig.GetString("Realm", realm);
73 } 73 }
74 74
75 // 75 //
76 // We tried, but this doesn't exist. We can't proceed. 76 // We tried, but this doesn't exist. We can't proceed.
77 // 77 //
78 if (dllName.Equals(String.Empty)) 78 if (dllName.Equals(String.Empty))
79 throw new Exception("No StorageProvider configured"); 79 throw new Exception("No StorageProvider configured");
80 80
81 m_Database = LoadPlugin<IGroupsData>(dllName, new Object[] { connString, realm }); 81 m_Database = LoadPlugin<IGroupsData>(dllName, new Object[] { connString, realm });
82 if (m_Database == null) 82 if (m_Database == null)
83 throw new Exception("Could not find a storage interface in the given module " + dllName); 83 throw new Exception("Could not find a storage interface in the given module " + dllName);
84 84
85 // 85 //
86 // [GridUserService] section overrides [DatabaseService], if it exists 86 // [GridUserService] section overrides [DatabaseService], if it exists
87 // 87 //
88 IConfig usersConfig = config.Configs["GridUserService"]; 88 IConfig usersConfig = config.Configs["GridUserService"];
89 if (usersConfig != null) 89 if (usersConfig != null)
90 { 90 {
91 dllName = usersConfig.GetString("StorageProvider", dllName); 91 dllName = usersConfig.GetString("StorageProvider", dllName);
92 connString = usersConfig.GetString("ConnectionString", connString); 92 connString = usersConfig.GetString("ConnectionString", connString);
93 usersRealm = usersConfig.GetString("Realm", usersRealm); 93 usersRealm = usersConfig.GetString("Realm", usersRealm);
94 } 94 }
95 95
96 m_GridUserService = LoadPlugin<IGridUserData>(dllName, new Object[] { connString, usersRealm }); 96 m_GridUserService = LoadPlugin<IGridUserData>(dllName, new Object[] { connString, usersRealm });
97 if (m_GridUserService == null) 97 if (m_GridUserService == null)
98 throw new Exception("Could not find a storage inferface for the given users module " + dllName); 98 throw new Exception("Could not find a storage inferface for the given users module " + dllName);
99 } 99 }
100 } 100 }
101} 101}
diff --git a/OpenSim/Addons/Groups/Service/HGGroupsService.cs b/OpenSim/Addons/Groups/Service/HGGroupsService.cs
index 56e999b..7d86f85 100644
--- a/OpenSim/Addons/Groups/Service/HGGroupsService.cs
+++ b/OpenSim/Addons/Groups/Service/HGGroupsService.cs
@@ -76,7 +76,7 @@ namespace OpenSim.Groups
76 76
77 // Check if it already exists 77 // Check if it already exists
78 GroupData grec = m_Database.RetrieveGroup(groupID); 78 GroupData grec = m_Database.RetrieveGroup(groupID);
79 if (grec == null || 79 if (grec == null ||
80 (grec != null && grec.Data["Location"] != string.Empty && grec.Data["Location"].ToLower() != serviceLocation.ToLower())) 80 (grec != null && grec.Data["Location"] != string.Empty && grec.Data["Location"].ToLower() != serviceLocation.ToLower()))
81 { 81 {
82 // Create the group 82 // Create the group
diff --git a/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs b/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs
index a980f22..fe828bc 100644
--- a/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs
+++ b/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Addons.OfflineIM")] 9[assembly: AssemblyTitle("OpenSim.Addons.OfflineIM")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs
index 047b8be..46d4979 100644
--- a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs
+++ b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs
@@ -77,7 +77,7 @@ namespace OpenSim.OfflineIM
77 break; 77 break;
78 } 78 }
79 /// 79 ///
80 m_log.DebugFormat("[OfflineIM.V2.RemoteConnector]: Offline IM server at {0} with auth {1}", 80 m_log.DebugFormat("[OfflineIM.V2.RemoteConnector]: Offline IM server at {0} with auth {1}",
81 m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); 81 m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString()));
82 } 82 }
83 83
@@ -140,7 +140,7 @@ namespace OpenSim.OfflineIM
140 { 140 {
141 Dictionary<string, object> sendData = new Dictionary<string, object>(); 141 Dictionary<string, object> sendData = new Dictionary<string, object>();
142 sendData["UserID"] = userID; 142 sendData["UserID"] = userID;
143 143
144 MakeRequest("DELETE", sendData); 144 MakeRequest("DELETE", sendData);
145 } 145 }
146 146
diff --git a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
index 02084ff..d1ecdce 100644
--- a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
+++ b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs
@@ -90,7 +90,7 @@ namespace OpenSim.OfflineIM
90 public bool StoreMessage(GridInstantMessage im, out string reason) 90 public bool StoreMessage(GridInstantMessage im, out string reason)
91 { 91 {
92 reason = string.Empty; 92 reason = string.Empty;
93 93
94 // Check limits 94 // Check limits
95 UUID principalID = new UUID(im.toAgentID); 95 UUID principalID = new UUID(im.toAgentID);
96 long count = m_Database.GetCount("PrincipalID", principalID.ToString()); 96 long count = m_Database.GetCount("PrincipalID", principalID.ToString());
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index 89224a6..feb73a9 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -124,7 +124,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
124 m_log.Debug("[LOAD REGIONS PLUGIN]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + 124 m_log.Debug("[LOAD REGIONS PLUGIN]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " +
125 Thread.CurrentThread.ManagedThreadId.ToString() + 125 Thread.CurrentThread.ManagedThreadId.ToString() +
126 ")"); 126 ")");
127 127
128 bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); 128 bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
129 129
130 m_openSim.CreateRegion(regionsToLoad[i], true, out scene); 130 m_openSim.CreateRegion(regionsToLoad[i], true, out scene);
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
index 1873a06..976714c 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
@@ -38,7 +38,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
38 public class RegionLoaderFileSystem : IRegionLoader 38 public class RegionLoaderFileSystem : IRegionLoader
39 { 39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 private IConfigSource m_configSource; 42 private IConfigSource m_configSource;
43 43
44 public void SetIniConfigSource(IConfigSource configSource) 44 public void SetIniConfigSource(IConfigSource configSource)
@@ -72,11 +72,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
72 72
73 // Create an empty Regions.ini if there are no existing config files. 73 // Create an empty Regions.ini if there are no existing config files.
74 if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0) 74 if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0)
75 { 75 {
76 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); 76 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource);
77 iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); 77 iniFiles = Directory.GetFiles(regionConfigPath, "*.ini");
78 } 78 }
79 79
80 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config files from {0}", regionConfigPath); 80 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config files from {0}", regionConfigPath);
81 81
82 List<RegionInfo> regionInfos = new List<RegionInfo>(); 82 List<RegionInfo> regionInfos = new List<RegionInfo>();
@@ -85,16 +85,16 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
85 foreach (string file in iniFiles) 85 foreach (string file in iniFiles)
86 { 86 {
87 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); 87 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file);
88 88
89 IConfigSource source = new IniConfigSource(file); 89 IConfigSource source = new IniConfigSource(file);
90 90
91 foreach (IConfig config in source.Configs) 91 foreach (IConfig config in source.Configs)
92 { 92 {
93 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource, config.Name); 93 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource, config.Name);
94 regionInfos.Add(regionInfo); 94 regionInfos.Add(regionInfo);
95 95
96 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName); 96 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName);
97 97
98 i++; 98 i++;
99 } 99 }
100 } 100 }
@@ -102,12 +102,12 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
102 foreach (string file in configFiles) 102 foreach (string file in configFiles)
103 { 103 {
104 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); 104 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file);
105 105
106 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource); 106 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource);
107 regionInfos.Add(regionInfo); 107 regionInfos.Add(regionInfo);
108 108
109 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName); 109 m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName);
110 110
111 i++; 111 i++;
112 } 112 }
113 113
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs
index a8e1f95..a45abad 100644
--- a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs
+++ b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.ApplicationPlugins.RegionModulesController")] 9[assembly: AssemblyTitle("OpenSim.ApplicationPlugins.RegionModulesController")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs
index 8f38a29..2e25c60 100644
--- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs
@@ -75,7 +75,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
75 } 75 }
76 76
77#region IApplicationPlugin implementation 77#region IApplicationPlugin implementation
78 78
79 public void Initialise (OpenSimBase openSim) 79 public void Initialise (OpenSimBase openSim)
80 { 80 {
81 m_openSim = openSim; 81 m_openSim = openSim;
@@ -111,7 +111,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
111 { 111 {
112 m_log.InfoFormat( 112 m_log.InfoFormat(
113 "[REGIONMODULES]: From plugin {0}, (version {1}), loaded {2} modules, {3} shared, {4} non-shared {5} unknown", 113 "[REGIONMODULES]: From plugin {0}, (version {1}), loaded {2} modules, {3} shared, {4} non-shared {5} unknown",
114 loadedModuleData.Key.Id, 114 loadedModuleData.Key.Id,
115 loadedModuleData.Key.Version, 115 loadedModuleData.Key.Version,
116 loadedModuleData.Value[0] + loadedModuleData.Value[1] + loadedModuleData.Value[2], 116 loadedModuleData.Value[0] + loadedModuleData.Value[1] + loadedModuleData.Value[2],
117 loadedModuleData.Value[0], loadedModuleData.Value[1], loadedModuleData.Value[2]); 117 loadedModuleData.Value[0], loadedModuleData.Value[1], loadedModuleData.Value[2]);
@@ -261,7 +261,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
261 } 261 }
262 262
263#region Region Module interfacesController implementation 263#region Region Module interfacesController implementation
264 264
265 /// <summary> 265 /// <summary>
266 /// Check that the given module is no disabled in the [Modules] section of the config files. 266 /// Check that the given module is no disabled in the [Modules] section of the config files.
267 /// </summary> 267 /// </summary>
@@ -293,10 +293,10 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
293 if (className != String.Empty && 293 if (className != String.Empty &&
294 node.Type.ToString() != className) 294 node.Type.ToString() != className)
295 return false; 295 return false;
296 } 296 }
297 297
298 return true; 298 return true;
299 } 299 }
300 300
301 // The root of all evil. 301 // The root of all evil.
302 // This is where we handle adding the modules to scenes when they 302 // This is where we handle adding the modules to scenes when they
diff --git a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs
index c841a69..590a6a9 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.ApplicationPlugins.RemoteController")] 9[assembly: AssemblyTitle("OpenSim.ApplicationPlugins.RemoteController")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 1a7c698..a5c9fb4 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -575,7 +575,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
575 } 575 }
576 576
577 responseData["success"] = true; 577 responseData["success"] = true;
578 578
579 m_log.Info("[RADMIN]: Shutdown Administrator Request complete"); 579 m_log.Info("[RADMIN]: Shutdown Administrator Request complete");
580 } 580 }
581 581
@@ -747,9 +747,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
747 { 747 {
748 // No INI setting recorded. 748 // No INI setting recorded.
749 } 749 }
750 750
751 string regionIniPath; 751 string regionIniPath;
752 752
753 if (requestData.Contains("region_file")) 753 if (requestData.Contains("region_file"))
754 { 754 {
755 // Make sure that the file to be created is in a subdirectory of the region storage directory. 755 // Make sure that the file to be created is in a subdirectory of the region storage directory.
@@ -773,7 +773,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
773 region.RegionName.Replace(" ", "_").Replace(":", "_"). 773 region.RegionName.Replace(" ", "_").Replace(":", "_").
774 Replace("/", "_"))); 774 Replace("/", "_")));
775 } 775 }
776 776
777 m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", 777 m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}",
778 region.RegionID, regionIniPath); 778 region.RegionID, regionIniPath);
779 region.SaveRegionToFile("dynamic region", regionIniPath); 779 region.SaveRegionToFile("dynamic region", regionIniPath);
@@ -782,9 +782,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
782 { 782 {
783 region.Persistent = false; 783 region.Persistent = false;
784 } 784 }
785 785
786 // Set the estate 786 // Set the estate
787 787
788 // Check for an existing estate 788 // Check for an existing estate
789 List<int> estateIDs = m_application.EstateDataService.GetEstates((string) requestData["estate_name"]); 789 List<int> estateIDs = m_application.EstateDataService.GetEstates((string) requestData["estate_name"]);
790 if (estateIDs.Count < 1) 790 if (estateIDs.Count < 1)
@@ -795,12 +795,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
795 // ok, client wants us to use an explicit UUID 795 // ok, client wants us to use an explicit UUID
796 // regardless of what the avatar name provided 796 // regardless of what the avatar name provided
797 userID = new UUID((string) requestData["estate_owner_uuid"]); 797 userID = new UUID((string) requestData["estate_owner_uuid"]);
798 798
799 // Check that the specified user exists 799 // Check that the specified user exists
800 Scene currentOrFirst = m_application.SceneManager.CurrentOrFirstScene; 800 Scene currentOrFirst = m_application.SceneManager.CurrentOrFirstScene;
801 IUserAccountService accountService = currentOrFirst.UserAccountService; 801 IUserAccountService accountService = currentOrFirst.UserAccountService;
802 UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID, userID); 802 UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID, userID);
803 803
804 if (user == null) 804 if (user == null)
805 throw new Exception("Specified user was not found."); 805 throw new Exception("Specified user was not found.");
806 } 806 }
@@ -809,23 +809,23 @@ namespace OpenSim.ApplicationPlugins.RemoteController
809 // We need to look up the UUID for the avatar with the provided name. 809 // We need to look up the UUID for the avatar with the provided name.
810 string ownerFirst = (string) requestData["estate_owner_first"]; 810 string ownerFirst = (string) requestData["estate_owner_first"];
811 string ownerLast = (string) requestData["estate_owner_last"]; 811 string ownerLast = (string) requestData["estate_owner_last"];
812 812
813 Scene currentOrFirst = m_application.SceneManager.CurrentOrFirstScene; 813 Scene currentOrFirst = m_application.SceneManager.CurrentOrFirstScene;
814 IUserAccountService accountService = currentOrFirst.UserAccountService; 814 IUserAccountService accountService = currentOrFirst.UserAccountService;
815 UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID, 815 UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID,
816 ownerFirst, ownerLast); 816 ownerFirst, ownerLast);
817 817
818 // Check that the specified user exists 818 // Check that the specified user exists
819 if (user == null) 819 if (user == null)
820 throw new Exception("Specified user was not found."); 820 throw new Exception("Specified user was not found.");
821 821
822 userID = user.PrincipalID; 822 userID = user.PrincipalID;
823 } 823 }
824 else 824 else
825 { 825 {
826 throw new Exception("Estate owner details not provided."); 826 throw new Exception("Estate owner details not provided.");
827 } 827 }
828 828
829 // Create a new estate with the name provided 829 // Create a new estate with the name provided
830 region.EstateSettings = m_application.EstateDataService.CreateNewEstate(); 830 region.EstateSettings = m_application.EstateDataService.CreateNewEstate();
831 831
@@ -852,7 +852,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
852 throw new Exception("Failed to join estate."); 852 throw new Exception("Failed to join estate.");
853 } 853 }
854 } 854 }
855 855
856 // Create the region and perform any initial initialization 856 // Create the region and perform any initial initialization
857 857
858 IScene newScene; 858 IScene newScene;
@@ -1159,7 +1159,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1159 1159
1160 // Set home position 1160 // Set home position
1161 1161
1162 GridRegion home = scene.GridService.GetRegionByPosition(scopeID, 1162 GridRegion home = scene.GridService.GetRegionByPosition(scopeID,
1163 (int)Util.RegionToWorldLoc(regionXLocation), (int)Util.RegionToWorldLoc(regionYLocation)); 1163 (int)Util.RegionToWorldLoc(regionXLocation), (int)Util.RegionToWorldLoc(regionYLocation));
1164 if (null == home) 1164 if (null == home)
1165 { 1165 {
@@ -1389,7 +1389,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1389 1389
1390 if ((null != regionXLocation) && (null != regionYLocation)) 1390 if ((null != regionXLocation) && (null != regionYLocation))
1391 { 1391 {
1392 GridRegion home = scene.GridService.GetRegionByPosition(scopeID, 1392 GridRegion home = scene.GridService.GetRegionByPosition(scopeID,
1393 (int)Util.RegionToWorldLoc((uint)regionXLocation), (int)Util.RegionToWorldLoc((uint)regionYLocation)); 1393 (int)Util.RegionToWorldLoc((uint)regionXLocation), (int)Util.RegionToWorldLoc((uint)regionYLocation));
1394 if (null == home) { 1394 if (null == home) {
1395 m_log.WarnFormat("[RADMIN]: Unable to set home region for updated user account {0} {1}", firstName, lastName); 1395 m_log.WarnFormat("[RADMIN]: Unable to set home region for updated user account {0} {1}", firstName, lastName);
@@ -1416,7 +1416,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1416 1416
1417 throw e; 1417 throw e;
1418 } 1418 }
1419 1419
1420 m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); 1420 m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
1421 } 1421 }
1422 } 1422 }
@@ -1608,7 +1608,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1608 GetSceneFromRegionParams(requestData, responseData, out scene); 1608 GetSceneFromRegionParams(requestData, responseData, out scene);
1609 1609
1610 string filename = (string) requestData["filename"]; 1610 string filename = (string) requestData["filename"];
1611 1611
1612 bool mergeOar = false; 1612 bool mergeOar = false;
1613 bool skipAssets = false; 1613 bool skipAssets = false;
1614 1614
@@ -1735,7 +1735,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1735 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; 1735 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
1736 1736
1737 m_log.InfoFormat( 1737 m_log.InfoFormat(
1738 "[RADMIN]: Submitting save OAR request for {0} to file {1}, request ID {2}", 1738 "[RADMIN]: Submitting save OAR request for {0} to file {1}, request ID {2}",
1739 scene.Name, filename, requestId); 1739 scene.Name, filename, requestId);
1740 1740
1741 archiver.ArchiveRegion(filename, requestId, options); 1741 archiver.ArchiveRegion(filename, requestId, options);
@@ -2082,8 +2082,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2082 Hashtable responseData = (Hashtable)response.Value; 2082 Hashtable responseData = (Hashtable)response.Value;
2083// Hashtable requestData = (Hashtable)request.Params[0]; 2083// Hashtable requestData = (Hashtable)request.Params[0];
2084 2084
2085 m_application.SceneManager.ForEachScene(s => 2085 m_application.SceneManager.ForEachScene(s =>
2086 s.RegionInfo.EstateSettings = m_application.EstateDataService.LoadEstateSettings(s.RegionInfo.RegionID, false) 2086 s.RegionInfo.EstateSettings = m_application.EstateDataService.LoadEstateSettings(s.RegionInfo.RegionID, false)
2087 ); 2087 );
2088 2088
2089 responseData["success"] = true; 2089 responseData["success"] = true;
@@ -2815,7 +2815,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2815 if (destinationFolder.Type != (short)FolderType.Clothing) 2815 if (destinationFolder.Type != (short)FolderType.Clothing)
2816 { 2816 {
2817 destinationFolder = new InventoryFolderBase(); 2817 destinationFolder = new InventoryFolderBase();
2818 2818
2819 destinationFolder.ID = UUID.Random(); 2819 destinationFolder.ID = UUID.Random();
2820 destinationFolder.Name = "Clothing"; 2820 destinationFolder.Name = "Clothing";
2821 destinationFolder.Owner = destination; 2821 destinationFolder.Owner = destination;
@@ -2951,11 +2951,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2951 { 2951 {
2952 sourceFolder = new InventoryFolderBase(); 2952 sourceFolder = new InventoryFolderBase();
2953 sourceFolder.ID = UUID.Random(); 2953 sourceFolder.ID = UUID.Random();
2954 if (assetType == FolderType.Clothing) 2954 if (assetType == FolderType.Clothing)
2955 { 2955 {
2956 sourceFolder.Name = "Clothing"; 2956 sourceFolder.Name = "Clothing";
2957 } 2957 }
2958 else 2958 else
2959 { 2959 {
2960 sourceFolder.Name = "Body Parts"; 2960 sourceFolder.Name = "Body Parts";
2961 } 2961 }
@@ -3168,7 +3168,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
3168 3168
3169 // Set home position 3169 // Set home position
3170 3170
3171 GridRegion home = scene.GridService.GetRegionByPosition(scopeID, 3171 GridRegion home = scene.GridService.GetRegionByPosition(scopeID,
3172 (int)Util.RegionToWorldLoc(regionXLocation), (int)Util.RegionToWorldLoc(regionYLocation)); 3172 (int)Util.RegionToWorldLoc(regionXLocation), (int)Util.RegionToWorldLoc(regionYLocation));
3173 if (null == home) { 3173 if (null == home) {
3174 m_log.WarnFormat("[RADMIN]: Unable to set home region for newly created user account {0} {1}", names[0], names[1]); 3174 m_log.WarnFormat("[RADMIN]: Unable to set home region for newly created user account {0} {1}", names[0], names[1]);
diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs
index 7ba65c9..7492602 100644
--- a/OpenSim/Capabilities/Caps.cs
+++ b/OpenSim/Capabilities/Caps.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Framework.Capabilities
64 64
65 private CapsHandlers m_capsHandlers; 65 private CapsHandlers m_capsHandlers;
66 66
67 private Dictionary<string, PollServiceEventArgs> m_pollServiceHandlers 67 private Dictionary<string, PollServiceEventArgs> m_pollServiceHandlers
68 = new Dictionary<string, PollServiceEventArgs>(); 68 = new Dictionary<string, PollServiceEventArgs>();
69 69
70 private Dictionary<string, string> m_externalCapsHandlers = new Dictionary<string, string>(); 70 private Dictionary<string, string> m_externalCapsHandlers = new Dictionary<string, string>();
@@ -160,7 +160,7 @@ namespace OpenSim.Framework.Capabilities
160 public void RegisterPollHandler(string capName, PollServiceEventArgs pollServiceHandler) 160 public void RegisterPollHandler(string capName, PollServiceEventArgs pollServiceHandler)
161 { 161 {
162// m_log.DebugFormat( 162// m_log.DebugFormat(
163// "[CAPS]: Registering handler with name {0}, url {1} for {2}", 163// "[CAPS]: Registering handler with name {0}, url {1} for {2}",
164// capName, pollServiceHandler.Url, m_agentID, m_regionName); 164// capName, pollServiceHandler.Url, m_agentID, m_regionName);
165 165
166 m_pollServiceHandlers.Add(capName, pollServiceHandler); 166 m_pollServiceHandlers.Add(capName, pollServiceHandler);
@@ -170,7 +170,7 @@ namespace OpenSim.Framework.Capabilities
170// uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; 170// uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
171// string protocol = "http"; 171// string protocol = "http";
172// string hostName = m_httpListenerHostName; 172// string hostName = m_httpListenerHostName;
173// 173//
174// if (MainServer.Instance.UseSSL) 174// if (MainServer.Instance.UseSSL)
175// { 175// {
176// hostName = MainServer.Instance.SSLCommonName; 176// hostName = MainServer.Instance.SSLCommonName;
@@ -238,7 +238,7 @@ namespace OpenSim.Framework.Capabilities
238 string hostName = m_httpListenerHostName; 238 string hostName = m_httpListenerHostName;
239 uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; 239 uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
240 string protocol = "http"; 240 string protocol = "http";
241 241
242 if (MainServer.Instance.UseSSL) 242 if (MainServer.Instance.UseSSL)
243 { 243 {
244 hostName = MainServer.Instance.SSLCommonName; 244 hostName = MainServer.Instance.SSLCommonName;
diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs
index 6d3b9b5..f5a40df 100644
--- a/OpenSim/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Capabilities/CapsHandlers.cs
@@ -112,9 +112,9 @@ namespace OpenSim.Framework.Capabilities
112 m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path); 112 m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path);
113 m_capsHandlers.Remove(idx); 113 m_capsHandlers.Remove(idx);
114 } 114 }
115 115
116 if (null == value) return; 116 if (null == value) return;
117 117
118 m_capsHandlers[idx] = value; 118 m_capsHandlers[idx] = value;
119 m_httpListener.AddStreamHandler(value); 119 m_httpListener.AddStreamHandler(value);
120 } 120 }
@@ -147,7 +147,7 @@ namespace OpenSim.Framework.Capabilities
147 { 147 {
148 Hashtable caps = new Hashtable(); 148 Hashtable caps = new Hashtable();
149 string protocol = "http://"; 149 string protocol = "http://";
150 150
151 if (m_useSSL) 151 if (m_useSSL)
152 protocol = "https://"; 152 protocol = "https://";
153 153
diff --git a/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs b/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs
index 426174d..5163169 100644
--- a/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs
+++ b/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Capabilities.Handlers
74 74
75 int page_size = (string.IsNullOrEmpty(psize) ? 500 : Int32.Parse(psize)); 75 int page_size = (string.IsNullOrEmpty(psize) ? 500 : Int32.Parse(psize));
76 int page_number = (string.IsNullOrEmpty(pnumber) ? 1 : Int32.Parse(pnumber)); 76 int page_number = (string.IsNullOrEmpty(pnumber) ? 1 : Int32.Parse(pnumber));
77 77
78 // Full content request 78 // Full content request
79 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.OK; 79 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.OK;
80 //httpResponse.ContentLength = ??; 80 //httpResponse.ContentLength = ??;
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
index e3a9a22..53ed115 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs
@@ -43,7 +43,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
43 43
44namespace OpenSim.Capabilities.Handlers 44namespace OpenSim.Capabilities.Handlers
45{ 45{
46 public class FetchInvDescHandler 46 public class FetchInvDescHandler
47 { 47 {
48 private static readonly ILog m_log = 48 private static readonly ILog m_log =
49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -53,14 +53,14 @@ namespace OpenSim.Capabilities.Handlers
53 private IScene m_Scene; 53 private IScene m_Scene;
54// private object m_fetchLock = new Object(); 54// private object m_fetchLock = new Object();
55 55
56 public FetchInvDescHandler(IInventoryService invService, ILibraryService libService, IScene s) 56 public FetchInvDescHandler(IInventoryService invService, ILibraryService libService, IScene s)
57 { 57 {
58 m_InventoryService = invService; 58 m_InventoryService = invService;
59 m_LibraryService = libService; 59 m_LibraryService = libService;
60 m_Scene = s; 60 m_Scene = s;
61 } 61 }
62 62
63 63
64 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 64 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
65 { 65 {
66 //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); 66 //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request);
@@ -72,14 +72,14 @@ namespace OpenSim.Capabilities.Handlers
72 // correctly mark it as a uuid 72 // correctly mark it as a uuid
73 // 73 //
74 request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>"); 74 request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
75 75
76 // another hack <integer>1</integer> results in a 76 // another hack <integer>1</integer> results in a
77 // System.ArgumentException: Object type System.Int32 cannot 77 // System.ArgumentException: Object type System.Int32 cannot
78 // be converted to target type: System.Boolean 78 // be converted to target type: System.Boolean
79 // 79 //
80 request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>"); 80 request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
81 request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>"); 81 request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
82 82
83 Hashtable hash = new Hashtable(); 83 Hashtable hash = new Hashtable();
84 try 84 try
85 { 85 {
@@ -90,9 +90,9 @@ namespace OpenSim.Capabilities.Handlers
90 m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace); 90 m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace);
91 m_log.Error("Request: " + request); 91 m_log.Error("Request: " + request);
92 } 92 }
93 93
94 ArrayList foldersrequested = (ArrayList)hash["folders"]; 94 ArrayList foldersrequested = (ArrayList)hash["folders"];
95 95
96 string response = ""; 96 string response = "";
97 string bad_folders_response = ""; 97 string bad_folders_response = "";
98 98
@@ -516,7 +516,7 @@ from docs seems this was never a spec
516// } 516// }
517// } 517// }
518// } 518// }
519// 519//
520// foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) 520// foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
521// { 521// {
522// m_log.DebugFormat( 522// m_log.DebugFormat(
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs
index 8200a96..e239a90 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Capabilities.Handlers
80 { 80 {
81 // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated 81 // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated
82 m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); 82 m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one.");
83 items = new InventoryItemBase[itemsRequested.Count]; 83 items = new InventoryItemBase[itemsRequested.Count];
84 foreach (UUID id in itemIDs) 84 foreach (UUID id in itemIDs)
85 items[i++] = m_inventoryService.GetItem(m_agentID, id); 85 items[i++] = m_inventoryService.GetItem(m_agentID, id);
86 } 86 }
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs
index 8af3c64..94c2c89 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
120 string request = "<llsd><map><key>items</key><array><map><key>item_id</key><uuid>"; 120 string request = "<llsd><map><key>items</key><array><map><key>item_id</key><uuid>";
121 request += "10000000-0000-0000-0000-000000000001"; // Notecard 1 121 request += "10000000-0000-0000-0000-000000000001"; // Notecard 1
122 request += "</uuid></map></array></map></llsd>"; 122 request += "</uuid></map></array></map></llsd>";
123 123
124 string llsdresponse = handler.FetchInventoryRequest(request, "/FETCH", string.Empty, req, resp); 124 string llsdresponse = handler.FetchInventoryRequest(request, "/FETCH", string.Empty, req, resp);
125 125
126 Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); 126 Assert.That(llsdresponse != null, Is.True, "Incorrect null response");
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs
index 94eef3b..4143aa3 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
140 string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>"; 140 string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>";
141 request += m_rootFolderID; 141 request += m_rootFolderID;
142 request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>"; 142 request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>";
143 143
144 string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp); 144 string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp);
145 145
146 Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); 146 Assert.That(llsdresponse != null, Is.True, "Incorrect null response");
@@ -203,7 +203,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests
203 203
204 // Make sure that the note card link is included 204 // Make sure that the note card link is included
205 Assert.That(llsdresponse.Contains("Link to notecard"), Is.True, "Link to notecard is missing"); 205 Assert.That(llsdresponse.Contains("Link to notecard"), Is.True, "Link to notecard is missing");
206 206
207 //Make sure the notecard item itself is included 207 //Make sure the notecard item itself is included
208 Assert.That(llsdresponse.Contains("Test Notecard 2"), Is.True, "Notecard 2 item (the source) is missing"); 208 Assert.That(llsdresponse.Contains("Test Notecard 2"), Is.True, "Notecard 2 item (the source) is missing");
209 209
diff --git a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs
index 3e01bbb..41cfdb6 100644
--- a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs
@@ -87,12 +87,12 @@ namespace OpenSim.Capabilities.Handlers
87 OSDMap osdname = new OSDMap(); 87 OSDMap osdname = new OSDMap();
88 if(parts[0] == "Unknown") 88 if(parts[0] == "Unknown")
89 { 89 {
90 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); 90 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
91 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); 91 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
92 } 92 }
93 else 93 else
94 { 94 {
95 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); 95 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
96 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); 96 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
97 } 97 }
98 osdname["display_name"] = OSD.FromString(kvp.Value); 98 osdname["display_name"] = OSD.FromString(kvp.Value);
diff --git a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs
index 8f70c97..32da1c2 100644
--- a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs
+++ b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Capabilities.Handlers
61 61
62 if (m_UserManagement == null) 62 if (m_UserManagement == null)
63 throw new Exception(String.Format("Failed to load UserManagement from {0}; config is {1}", umService, m_ConfigName)); 63 throw new Exception(String.Format("Failed to load UserManagement from {0}; config is {1}", umService, m_ConfigName));
64 64
65 server.AddStreamHandler( 65 server.AddStreamHandler(
66 new GetDisplayNamesHandler("/CAPS/agents/", m_UserManagement, "GetDisplayNames", null)); 66 new GetDisplayNamesHandler("/CAPS/agents/", m_UserManagement, "GetDisplayNames", null));
67 } 67 }
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 8215124..062a842 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Capabilities.Handlers
55 private IAssetService m_assetService; 55 private IAssetService m_assetService;
56 56
57 public const string DefaultFormat = "x-j2c"; 57 public const string DefaultFormat = "x-j2c";
58 58
59 public GetTextureHandler(IAssetService assService) 59 public GetTextureHandler(IAssetService assService)
60 { 60 {
61 m_assetService = assService; 61 m_assetService = assService;
@@ -83,7 +83,7 @@ namespace OpenSim.Capabilities.Handlers
83 if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID)) 83 if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID))
84 { 84 {
85// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID); 85// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID);
86 86
87 string[] formats; 87 string[] formats;
88 if (!string.IsNullOrEmpty(format)) 88 if (!string.IsNullOrEmpty(format))
89 { 89 {
@@ -129,7 +129,7 @@ namespace OpenSim.Capabilities.Handlers
129 } 129 }
130 130
131 /// <summary> 131 /// <summary>
132 /// 132 ///
133 /// </summary> 133 /// </summary>
134 /// <param name="httpRequest"></param> 134 /// <param name="httpRequest"></param>
135 /// <param name="httpResponse"></param> 135 /// <param name="httpResponse"></param>
@@ -190,7 +190,7 @@ namespace OpenSim.Capabilities.Handlers
190 190
191 //response = new Hashtable(); 191 //response = new Hashtable();
192 192
193 193
194 //WriteTextureData(request,response,null,format); 194 //WriteTextureData(request,response,null,format);
195 // not found 195 // not found
196 //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); 196 //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
@@ -287,7 +287,7 @@ namespace OpenSim.Capabilities.Handlers
287 response["content_type"] = texture.Metadata.ContentType; 287 response["content_type"] = texture.Metadata.ContentType;
288 else 288 else
289 response["content_type"] = "image/" + format; 289 response["content_type"] = "image/" + format;
290 290
291 response["bin_response_data"] = texture.Data; 291 response["bin_response_data"] = texture.Data;
292 response["int_bytes"] = texture.Data.Length; 292 response["int_bytes"] = texture.Data.Length;
293 293
@@ -400,7 +400,7 @@ namespace OpenSim.Capabilities.Handlers
400 400
401 if (image != null) 401 if (image != null)
402 image.Dispose(); 402 image.Dispose();
403 403
404 if(managedImage != null) 404 if(managedImage != null)
405 managedImage.Clear(); 405 managedImage.Clear();
406 if (imgstream != null) 406 if (imgstream != null)
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs
index 5f86ed4..d5df7a2 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs
@@ -24,7 +24,7 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Specialized; 30using System.Collections.Specialized;
@@ -44,7 +44,7 @@ using OpenSim.Framework.Servers.HttpServer;
44using OpenSim.Region.Framework.Interfaces; 44using OpenSim.Region.Framework.Interfaces;
45using OpenSim.Services.Interfaces; 45using OpenSim.Services.Interfaces;
46using Caps = OpenSim.Framework.Capabilities.Caps; 46using Caps = OpenSim.Framework.Capabilities.Caps;
47 47
48namespace OpenSim.Capabilities.Handlers 48namespace OpenSim.Capabilities.Handlers
49{ 49{
50 public class GetTextureRobustHandler : BaseStreamHandler 50 public class GetTextureRobustHandler : BaseStreamHandler
@@ -52,9 +52,9 @@ namespace OpenSim.Capabilities.Handlers
52 private static readonly ILog m_log = 52 private static readonly ILog m_log =
53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 private IAssetService m_assetService; 54 private IAssetService m_assetService;
55 55
56 public const string DefaultFormat = "x-j2c"; 56 public const string DefaultFormat = "x-j2c";
57 57
58 // TODO: Change this to a config option 58 // TODO: Change this to a config option
59 private string m_RedirectURL = null; 59 private string m_RedirectURL = null;
60 60
@@ -66,28 +66,28 @@ namespace OpenSim.Capabilities.Handlers
66 if (m_RedirectURL != null && !m_RedirectURL.EndsWith("/")) 66 if (m_RedirectURL != null && !m_RedirectURL.EndsWith("/"))
67 m_RedirectURL += "/"; 67 m_RedirectURL += "/";
68 } 68 }
69 69
70 protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 70 protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
71 { 71 {
72 // Try to parse the texture ID from the request URL 72 // Try to parse the texture ID from the request URL
73 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); 73 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
74 string textureStr = query.GetOne("texture_id"); 74 string textureStr = query.GetOne("texture_id");
75 string format = query.GetOne("format"); 75 string format = query.GetOne("format");
76 76
77 //m_log.DebugFormat("[GETTEXTURE]: called {0}", textureStr); 77 //m_log.DebugFormat("[GETTEXTURE]: called {0}", textureStr);
78 78
79 if (m_assetService == null) 79 if (m_assetService == null)
80 { 80 {
81 m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service"); 81 m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service");
82 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; 82 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
83 return null; 83 return null;
84 } 84 }
85 85
86 UUID textureID; 86 UUID textureID;
87 if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID)) 87 if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID))
88 { 88 {
89// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID); 89// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID);
90 90
91 string[] formats; 91 string[] formats;
92 if (!string.IsNullOrEmpty(format)) 92 if (!string.IsNullOrEmpty(format))
93 { 93 {
@@ -98,10 +98,10 @@ namespace OpenSim.Capabilities.Handlers
98 formats = WebUtil.GetPreferredImageTypes(httpRequest.Headers.Get("Accept")); 98 formats = WebUtil.GetPreferredImageTypes(httpRequest.Headers.Get("Accept"));
99 if (formats.Length == 0) 99 if (formats.Length == 0)
100 formats = new string[1] { DefaultFormat }; // default 100 formats = new string[1] { DefaultFormat }; // default
101 101
102 } 102 }
103 // OK, we have an array with preferred formats, possibly with only one entry 103 // OK, we have an array with preferred formats, possibly with only one entry
104 104
105 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; 105 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
106 foreach (string f in formats) 106 foreach (string f in formats)
107 { 107 {
@@ -113,14 +113,14 @@ namespace OpenSim.Capabilities.Handlers
113 { 113 {
114 m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url); 114 m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url);
115 } 115 }
116 116
117// m_log.DebugFormat( 117// m_log.DebugFormat(
118// "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}", 118// "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}",
119// textureID, httpResponse.StatusCode, httpResponse.ContentLength); 119// textureID, httpResponse.StatusCode, httpResponse.ContentLength);
120 120
121 return null; 121 return null;
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// 125 ///
126 /// </summary> 126 /// </summary>
@@ -133,16 +133,16 @@ namespace OpenSim.Capabilities.Handlers
133 { 133 {
134// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); 134// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
135 AssetBase texture; 135 AssetBase texture;
136 136
137 string fullID = textureID.ToString(); 137 string fullID = textureID.ToString();
138 if (format != DefaultFormat) 138 if (format != DefaultFormat)
139 fullID = fullID + "-" + format; 139 fullID = fullID + "-" + format;
140 140
141 if (!String.IsNullOrEmpty(m_RedirectURL)) 141 if (!String.IsNullOrEmpty(m_RedirectURL))
142 { 142 {
143 // Only try to fetch locally cached textures. Misses are redirected 143 // Only try to fetch locally cached textures. Misses are redirected
144 texture = m_assetService.GetCached(fullID); 144 texture = m_assetService.GetCached(fullID);
145 145
146 if (texture != null) 146 if (texture != null)
147 { 147 {
148 if (texture.Type != (sbyte)AssetType.Texture) 148 if (texture.Type != (sbyte)AssetType.Texture)
@@ -166,14 +166,14 @@ namespace OpenSim.Capabilities.Handlers
166 { 166 {
167 // try the cache 167 // try the cache
168 texture = m_assetService.GetCached(fullID); 168 texture = m_assetService.GetCached(fullID);
169 169
170 if (texture == null) 170 if (texture == null)
171 { 171 {
172// m_log.DebugFormat("[GETTEXTURE]: texture was not in the cache"); 172// m_log.DebugFormat("[GETTEXTURE]: texture was not in the cache");
173 173
174 // Fetch locally or remotely. Misses return a 404 174 // Fetch locally or remotely. Misses return a 404
175 texture = m_assetService.Get(textureID.ToString()); 175 texture = m_assetService.Get(textureID.ToString());
176 176
177 if (texture != null) 177 if (texture != null)
178 { 178 {
179 if (texture.Type != (sbyte)AssetType.Texture) 179 if (texture.Type != (sbyte)AssetType.Texture)
@@ -192,7 +192,7 @@ namespace OpenSim.Capabilities.Handlers
192 newTexture.Data = ConvertTextureData(texture, format); 192 newTexture.Data = ConvertTextureData(texture, format);
193 if (newTexture.Data.Length == 0) 193 if (newTexture.Data.Length == 0)
194 return false; // !!! Caller try another codec, please! 194 return false; // !!! Caller try another codec, please!
195 195
196 newTexture.Flags = AssetFlags.Collectable; 196 newTexture.Flags = AssetFlags.Collectable;
197 newTexture.Temporary = true; 197 newTexture.Temporary = true;
198 newTexture.Local = true; 198 newTexture.Local = true;
@@ -209,17 +209,17 @@ namespace OpenSim.Capabilities.Handlers
209 return true; 209 return true;
210 } 210 }
211 } 211 }
212 212
213 // not found 213 // not found
214// m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); 214// m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found");
215 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; 215 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
216 return true; 216 return true;
217 } 217 }
218 218
219 private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format) 219 private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format)
220 { 220 {
221 string range = request.Headers.GetOne("Range"); 221 string range = request.Headers.GetOne("Range");
222 222
223 if (!String.IsNullOrEmpty(range)) // JP2's only 223 if (!String.IsNullOrEmpty(range)) // JP2's only
224 { 224 {
225 // Range request 225 // Range request
@@ -233,7 +233,7 @@ namespace OpenSim.Capabilities.Handlers
233// m_log.DebugFormat( 233// m_log.DebugFormat(
234// "[GETTEXTURE]: Client requested range for texture {0} starting at {1} but texture has end of {2}", 234// "[GETTEXTURE]: Client requested range for texture {0} starting at {1} but texture has end of {2}",
235// texture.ID, start, texture.Data.Length); 235// texture.ID, start, texture.Data.Length);
236 236
237 // Stricly speaking, as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, we should be sending back 237 // Stricly speaking, as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, we should be sending back
238 // Requested Range Not Satisfiable (416) here. However, it appears that at least recent implementations 238 // Requested Range Not Satisfiable (416) here. However, it appears that at least recent implementations
239 // of the Linden Lab viewer (3.2.1 and 3.3.4 and probably earlier), a viewer that has previously 239 // of the Linden Lab viewer (3.2.1 and 3.3.4 and probably earlier), a viewer that has previously
@@ -244,7 +244,7 @@ namespace OpenSim.Capabilities.Handlers
244 // level 2. If this estimate is greater than the total texture size, returning a RequestedRangeNotSatisfiable 244 // level 2. If this estimate is greater than the total texture size, returning a RequestedRangeNotSatisfiable
245 // here will cause the viewer to treat the texture as bad and never display the full resolution 245 // here will cause the viewer to treat the texture as bad and never display the full resolution
246 // However, if we return PartialContent (or OK) instead, the viewer will display that resolution. 246 // However, if we return PartialContent (or OK) instead, the viewer will display that resolution.
247 247
248// response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; 248// response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable;
249// response.AddHeader("Content-Range", String.Format("bytes */{0}", texture.Data.Length)); 249// response.AddHeader("Content-Range", String.Format("bytes */{0}", texture.Data.Length));
250// response.StatusCode = (int)System.Net.HttpStatusCode.OK; 250// response.StatusCode = (int)System.Net.HttpStatusCode.OK;
@@ -257,13 +257,13 @@ namespace OpenSim.Capabilities.Handlers
257 // the rest of the entity. 257 // the rest of the entity.
258 if (end == -1) 258 if (end == -1)
259 end = int.MaxValue; 259 end = int.MaxValue;
260 260
261 end = Utils.Clamp(end, 0, texture.Data.Length - 1); 261 end = Utils.Clamp(end, 0, texture.Data.Length - 1);
262 start = Utils.Clamp(start, 0, end); 262 start = Utils.Clamp(start, 0, end);
263 int len = end - start + 1; 263 int len = end - start + 1;
264 264
265// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); 265// m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
266 266
267 // Always return PartialContent, even if the range covered the entire data length 267 // Always return PartialContent, even if the range covered the entire data length
268 // We were accidentally sending back 404 before in this situation 268 // We were accidentally sending back 404 before in this situation
269 // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the 269 // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the
@@ -275,11 +275,11 @@ namespace OpenSim.Capabilities.Handlers
275// response.StatusCode = (int)System.Net.HttpStatusCode.OK; 275// response.StatusCode = (int)System.Net.HttpStatusCode.OK;
276// else 276// else
277 response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; 277 response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
278 278
279 response.ContentLength = len; 279 response.ContentLength = len;
280 response.ContentType = texture.Metadata.ContentType; 280 response.ContentType = texture.Metadata.ContentType;
281 response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length)); 281 response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
282 282
283 response.Body.Write(texture.Data, start, len); 283 response.Body.Write(texture.Data, start, len);
284 } 284 }
285 } 285 }
@@ -300,7 +300,7 @@ namespace OpenSim.Capabilities.Handlers
300 response.ContentType = "image/" + format; 300 response.ContentType = "image/" + format;
301 response.Body.Write(texture.Data, 0, texture.Data.Length); 301 response.Body.Write(texture.Data, 0, texture.Data.Length);
302 } 302 }
303 303
304// if (response.StatusCode < 200 || response.StatusCode > 299) 304// if (response.StatusCode < 200 || response.StatusCode > 299)
305// m_log.WarnFormat( 305// m_log.WarnFormat(
306// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", 306// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
@@ -310,7 +310,7 @@ namespace OpenSim.Capabilities.Handlers
310// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", 310// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
311// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); 311// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
312 } 312 }
313 313
314 /// <summary> 314 /// <summary>
315 /// Parse a range header. 315 /// Parse a range header.
316 /// </summary> 316 /// </summary>
@@ -327,18 +327,18 @@ namespace OpenSim.Capabilities.Handlers
327 private bool TryParseRange(string header, out int start, out int end) 327 private bool TryParseRange(string header, out int start, out int end)
328 { 328 {
329 start = end = 0; 329 start = end = 0;
330 330
331 if (header.StartsWith("bytes=")) 331 if (header.StartsWith("bytes="))
332 { 332 {
333 string[] rangeValues = header.Substring(6).Split('-'); 333 string[] rangeValues = header.Substring(6).Split('-');
334 334
335 if (rangeValues.Length == 2) 335 if (rangeValues.Length == 2)
336 { 336 {
337 if (!Int32.TryParse(rangeValues[0], out start)) 337 if (!Int32.TryParse(rangeValues[0], out start))
338 return false; 338 return false;
339 339
340 string rawEnd = rangeValues[1]; 340 string rawEnd = rangeValues[1];
341 341
342 if (rawEnd == "") 342 if (rawEnd == "")
343 { 343 {
344 end = -1; 344 end = -1;
@@ -350,27 +350,27 @@ namespace OpenSim.Capabilities.Handlers
350 } 350 }
351 } 351 }
352 } 352 }
353 353
354 start = end = 0; 354 start = end = 0;
355 return false; 355 return false;
356 } 356 }
357 357
358 private byte[] ConvertTextureData(AssetBase texture, string format) 358 private byte[] ConvertTextureData(AssetBase texture, string format)
359 { 359 {
360 m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format); 360 m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format);
361 byte[] data = new byte[0]; 361 byte[] data = new byte[0];
362 362
363 MemoryStream imgstream = new MemoryStream(); 363 MemoryStream imgstream = new MemoryStream();
364 Bitmap mTexture = null; 364 Bitmap mTexture = null;
365 ManagedImage managedImage = null; 365 ManagedImage managedImage = null;
366 Image image = null; 366 Image image = null;
367 367
368 try 368 try
369 { 369 {
370 // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data 370 // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data
371 371
372 imgstream = new MemoryStream(); 372 imgstream = new MemoryStream();
373 373
374 // Decode image to System.Drawing.Image 374 // Decode image to System.Drawing.Image
375 if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) 375 if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null)
376 { 376 {
@@ -380,7 +380,7 @@ namespace OpenSim.Capabilities.Handlers
380 using(EncoderParameters myEncoderParameters = new EncoderParameters()) 380 using(EncoderParameters myEncoderParameters = new EncoderParameters())
381 { 381 {
382 myEncoderParameters.Param[0] = new EncoderParameter(Encoder.Quality,95L); 382 myEncoderParameters.Param[0] = new EncoderParameter(Encoder.Quality,95L);
383 383
384 // Save bitmap to stream 384 // Save bitmap to stream
385 ImageCodecInfo codec = GetEncoderInfo("image/" + format); 385 ImageCodecInfo codec = GetEncoderInfo("image/" + format);
386 if (codec != null) 386 if (codec != null)
@@ -404,10 +404,10 @@ namespace OpenSim.Capabilities.Handlers
404 // If we encountered an exception, one or more of these will be null 404 // If we encountered an exception, one or more of these will be null
405 if (mTexture != null) 405 if (mTexture != null)
406 mTexture.Dispose(); 406 mTexture.Dispose();
407 407
408 if (image != null) 408 if (image != null)
409 image.Dispose(); 409 image.Dispose();
410 410
411 if(managedImage != null) 411 if(managedImage != null)
412 managedImage.Clear(); 412 managedImage.Clear();
413 413
@@ -417,10 +417,10 @@ namespace OpenSim.Capabilities.Handlers
417 imgstream.Dispose(); 417 imgstream.Dispose();
418 } 418 }
419 } 419 }
420 420
421 return data; 421 return data;
422 } 422 }
423 423
424 // From msdn 424 // From msdn
425 private static ImageCodecInfo GetEncoderInfo(String mimeType) 425 private static ImageCodecInfo GetEncoderInfo(String mimeType)
426 { 426 {
diff --git a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs
index f628ac1..387b3de 100644
--- a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs
+++ b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Capabilities.Handlers")] 8[assembly: AssemblyTitle("OpenSim.Capabilities.Handlers")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index 5536564..80b8306 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Capabilities.Handlers
51{ 51{
52 public class UploadBakedTextureHandler 52 public class UploadBakedTextureHandler
53 { 53 {
54 54
55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 private Caps m_HostCapsObj; 57 private Caps m_HostCapsObj;
@@ -81,7 +81,7 @@ namespace OpenSim.Capabilities.Handlers
81 { 81 {
82 string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath; 82 string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
83 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); 83 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
84 84
85 BakedTextureUploader uploader = 85 BakedTextureUploader uploader =
86 new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_HostCapsObj.AgentID); 86 new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_HostCapsObj.AgentID);
87 uploader.OnUpLoad += BakedTextureUploaded; 87 uploader.OnUpLoad += BakedTextureUploaded;
@@ -127,7 +127,7 @@ namespace OpenSim.Capabilities.Handlers
127 asset.Temporary = true; 127 asset.Temporary = true;
128 asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are 128 asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are
129 m_assetService.Store(asset); 129 m_assetService.Store(asset);
130 130
131 } 131 }
132 } 132 }
133 133
@@ -151,7 +151,7 @@ namespace OpenSim.Capabilities.Handlers
151 // m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); 151 // m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
152 } 152 }
153 153
154 154
155 155
156 /// <summary> 156 /// <summary>
157 /// Handle raw uploaded baked texture data. 157 /// Handle raw uploaded baked texture data.
diff --git a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
index 7c4bc97..97491e3 100644
--- a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
+++ b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Framework.Capabilities
78 public string state; 78 public string state;
79 public int upload_price; 79 public int upload_price;
80 public string rsvp; 80 public string rsvp;
81 81
82 public LLSDNewFileAngentInventoryVariablePriceReplyResponse() 82 public LLSDNewFileAngentInventoryVariablePriceReplyResponse()
83 { 83 {
84 state = "confirm_upload"; 84 state = "confirm_upload";
diff --git a/OpenSim/Capabilities/LLSDAvatarPicker.cs b/OpenSim/Capabilities/LLSDAvatarPicker.cs
index d0b3f3a..12e892c 100644
--- a/OpenSim/Capabilities/LLSDAvatarPicker.cs
+++ b/OpenSim/Capabilities/LLSDAvatarPicker.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Capabilities
42 { 42 {
43 public string username; 43 public string username;
44 public string display_name; 44 public string display_name;
45 //'display_name_next_update':d"1970-01-01T00:00:00Z" 45 //'display_name_next_update':d"1970-01-01T00:00:00Z"
46 public string legacy_first_name; 46 public string legacy_first_name;
47 public string legacy_last_name; 47 public string legacy_last_name;
48 public UUID id; 48 public UUID id;
diff --git a/OpenSim/Capabilities/LLSDInventoryItem.cs b/OpenSim/Capabilities/LLSDInventoryItem.cs
index 958e807..460a215 100644
--- a/OpenSim/Capabilities/LLSDInventoryItem.cs
+++ b/OpenSim/Capabilities/LLSDInventoryItem.cs
@@ -87,12 +87,12 @@ namespace OpenSim.Framework.Capabilities
87 [OSDMap] 87 [OSDMap]
88 public class LLSDInventoryFolderContents 88 public class LLSDInventoryFolderContents
89 { 89 {
90 public UUID agent_id; 90 public UUID agent_id;
91 public int descendents; 91 public int descendents;
92 public UUID folder_id; 92 public UUID folder_id;
93 public OSDArray categories = new OSDArray(); 93 public OSDArray categories = new OSDArray();
94 public OSDArray items = new OSDArray(); 94 public OSDArray items = new OSDArray();
95 public UUID owner_id; 95 public UUID owner_id;
96 public int version; 96 public int version;
97 } 97 }
98 98
diff --git a/OpenSim/Capabilities/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Properties/AssemblyInfo.cs
index f8a9dae..72a5240 100644
--- a/OpenSim/Capabilities/Properties/AssemblyInfo.cs
+++ b/OpenSim/Capabilities/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Capabilities")] 8[assembly: AssemblyTitle("OpenSim.Capabilities")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/ConsoleClient/ConsoleClient.cs b/OpenSim/ConsoleClient/ConsoleClient.cs
index 7c003ea..e689424 100644
--- a/OpenSim/ConsoleClient/ConsoleClient.cs
+++ b/OpenSim/ConsoleClient/ConsoleClient.cs
@@ -178,7 +178,7 @@ namespace OpenSim.ConsoleClient
178 Requester.MakeRequest(requestUrl, requestData, ReadResponses); 178 Requester.MakeRequest(requestUrl, requestData, ReadResponses);
179 return; 179 return;
180 } 180 }
181 181
182 List<string> lines = new List<string>(); 182 List<string> lines = new List<string>();
183 183
184 foreach (XmlNode part in rootNodeL[0].ChildNodes) 184 foreach (XmlNode part in rootNodeL[0].ChildNodes)
@@ -202,7 +202,7 @@ namespace OpenSim.ConsoleClient
202 string[] parts = l.Split(new char[] {':'}, 3); 202 string[] parts = l.Split(new char[] {':'}, 3);
203 if (parts.Length != 3) 203 if (parts.Length != 3)
204 continue; 204 continue;
205 205
206 if (parts[2].StartsWith("+++") || parts[2].StartsWith("-++")) 206 if (parts[2].StartsWith("+++") || parts[2].StartsWith("-++"))
207 prompt = parts[2]; 207 prompt = parts[2];
208 else 208 else
diff --git a/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs b/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs
index 9c0c784..87bff14 100644
--- a/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs
+++ b/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.ConsoleClient")] 8[assembly: AssemblyTitle("OpenSim.ConsoleClient")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Data/DBGuids.cs b/OpenSim/Data/DBGuids.cs
index ad1c19c..1a2bf41 100644
--- a/OpenSim/Data/DBGuids.cs
+++ b/OpenSim/Data/DBGuids.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Data
38 /// <summary>This function converts a value returned from the database in one of the 38 /// <summary>This function converts a value returned from the database in one of the
39 /// supported formats into a UUID. This function is not actually DBMS-specific right 39 /// supported formats into a UUID. This function is not actually DBMS-specific right
40 /// now 40 /// now
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 /// <param name="id"></param> 43 /// <param name="id"></param>
44 /// <returns></returns> 44 /// <returns></returns>
diff --git a/OpenSim/Data/IAvatarData.cs b/OpenSim/Data/IAvatarData.cs
index 0a18e21..b3f12c1 100644
--- a/OpenSim/Data/IAvatarData.cs
+++ b/OpenSim/Data/IAvatarData.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Data
39 public Dictionary<string, string> Data; 39 public Dictionary<string, string> Data;
40 } 40 }
41 41
42 public interface IAvatarData 42 public interface IAvatarData
43 { 43 {
44 AvatarBaseData[] Get(string field, string val); 44 AvatarBaseData[] Get(string field, string val);
45 bool Store(AvatarBaseData data); 45 bool Store(AvatarBaseData data);
diff --git a/OpenSim/Data/IEstateDataStore.cs b/OpenSim/Data/IEstateDataStore.cs
index f9070ea..6b30db2 100644
--- a/OpenSim/Data/IEstateDataStore.cs
+++ b/OpenSim/Data/IEstateDataStore.cs
@@ -46,14 +46,14 @@ namespace OpenSim.Data
46 /// <param name="create">If true, then an estate is created if one is not found.</param> 46 /// <param name="create">If true, then an estate is created if one is not found.</param>
47 /// <returns></returns> 47 /// <returns></returns>
48 EstateSettings LoadEstateSettings(UUID regionID, bool create); 48 EstateSettings LoadEstateSettings(UUID regionID, bool create);
49 49
50 /// <summary> 50 /// <summary>
51 /// Load estate settings for an estate ID. 51 /// Load estate settings for an estate ID.
52 /// </summary> 52 /// </summary>
53 /// <param name="estateID"></param> 53 /// <param name="estateID"></param>
54 /// <returns></returns> 54 /// <returns></returns>
55 EstateSettings LoadEstateSettings(int estateID); 55 EstateSettings LoadEstateSettings(int estateID);
56 56
57 /// <summary> 57 /// <summary>
58 /// Create a new estate. 58 /// Create a new estate.
59 /// </summary> 59 /// </summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Data
67 /// </summary> 67 /// </summary>
68 /// <returns>An empty list if no estates were found.</returns> 68 /// <returns>An empty list if no estates were found.</returns>
69 List<EstateSettings> LoadEstateSettingsAll(); 69 List<EstateSettings> LoadEstateSettingsAll();
70 70
71 /// <summary> 71 /// <summary>
72 /// Store estate settings. 72 /// Store estate settings.
73 /// </summary> 73 /// </summary>
@@ -75,7 +75,7 @@ namespace OpenSim.Data
75 /// This is also called by EstateSettings.Save()</remarks> 75 /// This is also called by EstateSettings.Save()</remarks>
76 /// <param name="es"></param> 76 /// <param name="es"></param>
77 void StoreEstateSettings(EstateSettings es); 77 void StoreEstateSettings(EstateSettings es);
78 78
79 /// <summary> 79 /// <summary>
80 /// Get estate IDs. 80 /// Get estate IDs.
81 /// </summary> 81 /// </summary>
@@ -88,13 +88,13 @@ namespace OpenSim.Data
88 /// </summary> 88 /// </summary>
89 /// <returns>An empty list if no estates were found.</returns> 89 /// <returns>An empty list if no estates were found.</returns>
90 List<int> GetEstatesByOwner(UUID ownerID); 90 List<int> GetEstatesByOwner(UUID ownerID);
91 91
92 /// <summary> 92 /// <summary>
93 /// Get the IDs of all estates. 93 /// Get the IDs of all estates.
94 /// </summary> 94 /// </summary>
95 /// <returns>An empty list if no estates were found.</returns> 95 /// <returns>An empty list if no estates were found.</returns>
96 List<int> GetEstatesAll(); 96 List<int> GetEstatesAll();
97 97
98 /// <summary> 98 /// <summary>
99 /// Link a region to an estate. 99 /// Link a region to an estate.
100 /// </summary> 100 /// </summary>
@@ -102,14 +102,14 @@ namespace OpenSim.Data
102 /// <param name="estateID"></param> 102 /// <param name="estateID"></param>
103 /// <returns>true if the link succeeded, false otherwise</returns> 103 /// <returns>true if the link succeeded, false otherwise</returns>
104 bool LinkRegion(UUID regionID, int estateID); 104 bool LinkRegion(UUID regionID, int estateID);
105 105
106 /// <summary> 106 /// <summary>
107 /// Get the UUIDs of all the regions in an estate. 107 /// Get the UUIDs of all the regions in an estate.
108 /// </summary> 108 /// </summary>
109 /// <param name="estateID"></param> 109 /// <param name="estateID"></param>
110 /// <returns></returns> 110 /// <returns></returns>
111 List<UUID> GetRegions(int estateID); 111 List<UUID> GetRegions(int estateID);
112 112
113 /// <summary> 113 /// <summary>
114 /// Delete an estate 114 /// Delete an estate
115 /// </summary> 115 /// </summary>
diff --git a/OpenSim/Data/IGridUserData.cs b/OpenSim/Data/IGridUserData.cs
index 9afa477..1b2ea87 100644
--- a/OpenSim/Data/IGridUserData.cs
+++ b/OpenSim/Data/IGridUserData.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Data
47 /// <summary> 47 /// <summary>
48 /// An interface for connecting to the user grid datastore 48 /// An interface for connecting to the user grid datastore
49 /// </summary> 49 /// </summary>
50 public interface IGridUserData 50 public interface IGridUserData
51 { 51 {
52 GridUserData Get(string userID); 52 GridUserData Get(string userID);
53 GridUserData[] GetAll(string query); 53 GridUserData[] GetAll(string query);
diff --git a/OpenSim/Data/IGroupsData.cs b/OpenSim/Data/IGroupsData.cs
index c11e649..bd059e0 100644
--- a/OpenSim/Data/IGroupsData.cs
+++ b/OpenSim/Data/IGroupsData.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Data
81 } 81 }
82 82
83 83
84 public interface IGroupsData 84 public interface IGroupsData
85 { 85 {
86 // groups table 86 // groups table
87 bool StoreGroup(GroupData data); 87 bool StoreGroup(GroupData data);
diff --git a/OpenSim/Data/IHGTravelingData.cs b/OpenSim/Data/IHGTravelingData.cs
index 452af7b..5e4894e 100644
--- a/OpenSim/Data/IHGTravelingData.cs
+++ b/OpenSim/Data/IHGTravelingData.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Data
48 /// <summary> 48 /// <summary>
49 /// An interface for connecting to the user grid datastore 49 /// An interface for connecting to the user grid datastore
50 /// </summary> 50 /// </summary>
51 public interface IHGTravelingData 51 public interface IHGTravelingData
52 { 52 {
53 HGTravelingData Get(UUID sessionID); 53 HGTravelingData Get(UUID sessionID);
54 HGTravelingData[] GetSessions(UUID userID); 54 HGTravelingData[] GetSessions(UUID userID);
diff --git a/OpenSim/Data/IOfflineIMData.cs b/OpenSim/Data/IOfflineIMData.cs
index 58501a3..a0f4d69 100644
--- a/OpenSim/Data/IOfflineIMData.cs
+++ b/OpenSim/Data/IOfflineIMData.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Data
39 } 39 }
40 40
41 41
42 public interface IOfflineIMData 42 public interface IOfflineIMData
43 { 43 {
44 OfflineIMData[] Get(string field, string val); 44 OfflineIMData[] Get(string field, string val);
45 long GetCount(string field, string key); 45 long GetCount(string field, string key);
diff --git a/OpenSim/Data/IPresenceData.cs b/OpenSim/Data/IPresenceData.cs
index 9ec48b0..4086245 100644
--- a/OpenSim/Data/IPresenceData.cs
+++ b/OpenSim/Data/IPresenceData.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Data
44 /// <summary> 44 /// <summary>
45 /// An interface for connecting to the presence datastore 45 /// An interface for connecting to the presence datastore
46 /// </summary> 46 /// </summary>
47 public interface IPresenceData 47 public interface IPresenceData
48 { 48 {
49 bool Store(PresenceData data); 49 bool Store(PresenceData data);
50 50
diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs
index ca9b327..c8e38a4 100644
--- a/OpenSim/Data/IRegionData.cs
+++ b/OpenSim/Data/IRegionData.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Data
67 /// <summary> 67 /// <summary>
68 /// An interface for connecting to the authentication datastore 68 /// An interface for connecting to the authentication datastore
69 /// </summary> 69 /// </summary>
70 public interface IRegionData 70 public interface IRegionData
71 { 71 {
72 RegionData Get(UUID regionID, UUID ScopeID); 72 RegionData Get(UUID regionID, UUID ScopeID);
73 List<RegionData> Get(string regionName, UUID ScopeID); 73 List<RegionData> Get(string regionName, UUID ScopeID);
diff --git a/OpenSim/Data/IXGroupData.cs b/OpenSim/Data/IXGroupData.cs
index e5821ef..82073fe 100644
--- a/OpenSim/Data/IXGroupData.cs
+++ b/OpenSim/Data/IXGroupData.cs
@@ -38,12 +38,12 @@ namespace OpenSim.Data
38 public UUID ownerRoleID; 38 public UUID ownerRoleID;
39 public string name; 39 public string name;
40 public string charter; 40 public string charter;
41 public bool showInList; 41 public bool showInList;
42 public UUID insigniaID; 42 public UUID insigniaID;
43 public int membershipFee; 43 public int membershipFee;
44 public bool openEnrollment; 44 public bool openEnrollment;
45 public bool allowPublish; 45 public bool allowPublish;
46 public bool maturePublish; 46 public bool maturePublish;
47 public UUID founderID; 47 public UUID founderID;
48 public ulong everyonePowers; 48 public ulong everyonePowers;
49 public ulong ownersPowers; 49 public ulong ownersPowers;
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs
index d606470..e54bf55 100644
--- a/OpenSim/Data/Migration.cs
+++ b/OpenSim/Data/Migration.cs
@@ -80,10 +80,10 @@ namespace OpenSim.Data
80 80
81 /// <summary>Have the parameterless constructor just so we can specify it as a generic parameter with the new() constraint. 81 /// <summary>Have the parameterless constructor just so we can specify it as a generic parameter with the new() constraint.
82 /// Currently this is only used in the tests. A Migration instance created this way must be then 82 /// Currently this is only used in the tests. A Migration instance created this way must be then
83 /// initialized with Initialize(). Regular creation should be through the parameterized constructors. 83 /// initialized with Initialize(). Regular creation should be through the parameterized constructors.
84 /// </summary> 84 /// </summary>
85 public Migration() 85 public Migration()
86 { 86 {
87 } 87 }
88 88
89 public Migration(DbConnection conn, Assembly assem, string subtype, string type) 89 public Migration(DbConnection conn, Assembly assem, string subtype, string type)
@@ -91,7 +91,7 @@ namespace OpenSim.Data
91 Initialize(conn, assem, type, subtype); 91 Initialize(conn, assem, type, subtype);
92 } 92 }
93 93
94 public Migration(DbConnection conn, Assembly assem, string type) 94 public Migration(DbConnection conn, Assembly assem, string type)
95 { 95 {
96 Initialize(conn, assem, type, ""); 96 Initialize(conn, assem, type, "");
97 } 97 }
@@ -191,7 +191,7 @@ namespace OpenSim.Data
191 int newversion = kvp.Key; 191 int newversion = kvp.Key;
192 // we need to up the command timeout to infinite as we might be doing long migrations. 192 // we need to up the command timeout to infinite as we might be doing long migrations.
193 193
194 /* [AlexRa 01-May-10]: We can't always just run any SQL in a single batch (= ExecuteNonQuery()). Things like 194 /* [AlexRa 01-May-10]: We can't always just run any SQL in a single batch (= ExecuteNonQuery()). Things like
195 * stored proc definitions might have to be sent to the server each in a separate batch. 195 * stored proc definitions might have to be sent to the server each in a separate batch.
196 * This is certainly so for MS SQL; not sure how the MySQL connector sorts out the mess 196 * This is certainly so for MS SQL; not sure how the MySQL connector sorts out the mess
197 * with 'delimiter @@'/'delimiter ;' around procs. So each "script" this code executes now is not 197 * with 'delimiter @@'/'delimiter ;' around procs. So each "script" this code executes now is not
@@ -276,7 +276,7 @@ namespace OpenSim.Data
276 private delegate void FlushProc(); 276 private delegate void FlushProc();
277 277
278 /// <summary>Scans for migration resources in either old-style "scattered" (one file per version) 278 /// <summary>Scans for migration resources in either old-style "scattered" (one file per version)
279 /// or new-style "integrated" format (single file with ":VERSION nnn" sections). 279 /// or new-style "integrated" format (single file with ":VERSION nnn" sections).
280 /// In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script 280 /// In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script
281 /// that must be sent to the server separately. The old-style migrations are loaded each in one piece 281 /// that must be sent to the server separately. The old-style migrations are loaded each in one piece
282 /// and don't support the ':GO' feature. 282 /// and don't support the ':GO' feature.
@@ -301,12 +301,12 @@ namespace OpenSim.Data
301 { 301 {
302 /* The filename should be '<StoreName>.migrations[.NNN]' where NNN 302 /* The filename should be '<StoreName>.migrations[.NNN]' where NNN
303 * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip 303 * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip
304 * the file without looking inside if we have a higher version already. Without the suffix we read 304 * the file without looking inside if we have a higher version already. Without the suffix we read
305 * the file anyway and use the version numbers inside. Any unrecognized suffix (such as '.sql') 305 * the file anyway and use the version numbers inside. Any unrecognized suffix (such as '.sql')
306 * is valid but ignored. 306 * is valid but ignored.
307 * 307 *
308 * NOTE that we expect only one 'merged' migration file. If there are several, we take the last one. 308 * NOTE that we expect only one 'merged' migration file. If there are several, we take the last one.
309 * If you are numbering them, leave only the latest one in the project or at least make sure they numbered 309 * If you are numbering them, leave only the latest one in the project or at least make sure they numbered
310 * to come up in the correct order (e.g. 'SomeStore.migrations.001' rather than 'SomeStore.migrations.1') 310 * to come up in the correct order (e.g. 'SomeStore.migrations.001' rather than 'SomeStore.migrations.1')
311 */ 311 */
312 312
@@ -351,7 +351,7 @@ namespace OpenSim.Data
351 if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) 351 if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase))
352 { 352 {
353 if (sb.Length == 0) continue; 353 if (sb.Length == 0) continue;
354 if (nVersion > after) 354 if (nVersion > after)
355 script.Add(sb.ToString()); 355 script.Add(sb.ToString());
356 sb.Length = 0; 356 sb.Length = 0;
357 continue; 357 continue;
@@ -405,10 +405,10 @@ scan_old_style:
405 } 405 }
406 } 406 }
407 } 407 }
408 408
409 if (migrations.Count < 1) 409 if (migrations.Count < 1)
410 m_log.DebugFormat("[MIGRATIONS]: {0} data tables already up to date at revision {1}", _type, after); 410 m_log.DebugFormat("[MIGRATIONS]: {0} data tables already up to date at revision {1}", _type, after);
411 411
412 return migrations; 412 return migrations;
413 } 413 }
414 } 414 }
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 1488e1a..f16cd91 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -329,8 +329,8 @@ namespace OpenSim.Data.MySQL
329 { 329 {
330 m_log.Error( 330 m_log.Error(
331 string.Format( 331 string.Format(
332 "[ASSETS DB]: MySql failure fetching asset set from {0}, count {1}. Exception ", 332 "[ASSETS DB]: MySql failure fetching asset set from {0}, count {1}. Exception ",
333 start, count), 333 start, count),
334 e); 334 e);
335 } 335 }
336 } 336 }
diff --git a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
index 7627497..af6be75 100644
--- a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
+++ b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
@@ -77,21 +77,21 @@ namespace OpenSim.Data.MySQL
77 cmd.Parameters.AddWithValue("?principalID", principalID.ToString()); 77 cmd.Parameters.AddWithValue("?principalID", principalID.ToString());
78 78
79 IDataReader result = cmd.ExecuteReader(); 79 IDataReader result = cmd.ExecuteReader();
80 80
81 if (result.Read()) 81 if (result.Read())
82 { 82 {
83 ret.PrincipalID = principalID; 83 ret.PrincipalID = principalID;
84 84
85 CheckColumnNames(result); 85 CheckColumnNames(result);
86 86
87 foreach (string s in m_ColumnNames) 87 foreach (string s in m_ColumnNames)
88 { 88 {
89 if (s == "UUID") 89 if (s == "UUID")
90 continue; 90 continue;
91 91
92 ret.Data[s] = result[s].ToString(); 92 ret.Data[s] = result[s].ToString();
93 } 93 }
94 94
95 return ret; 95 return ret;
96 } 96 }
97 else 97 else
@@ -132,25 +132,25 @@ namespace OpenSim.Data.MySQL
132 if (!first) 132 if (!first)
133 update += ", "; 133 update += ", ";
134 update += "`" + field + "` = ?"+field; 134 update += "`" + field + "` = ?"+field;
135 135
136 first = false; 136 first = false;
137 137
138 cmd.Parameters.AddWithValue("?"+field, data.Data[field]); 138 cmd.Parameters.AddWithValue("?"+field, data.Data[field]);
139 } 139 }
140 140
141 update += " where UUID = ?principalID"; 141 update += " where UUID = ?principalID";
142 142
143 cmd.CommandText = update; 143 cmd.CommandText = update;
144 cmd.Parameters.AddWithValue("?principalID", data.PrincipalID.ToString()); 144 cmd.Parameters.AddWithValue("?principalID", data.PrincipalID.ToString());
145 145
146 if (ExecuteNonQuery(cmd) < 1) 146 if (ExecuteNonQuery(cmd) < 1)
147 { 147 {
148 string insert = "insert into `" + m_Realm + "` (`UUID`, `" + 148 string insert = "insert into `" + m_Realm + "` (`UUID`, `" +
149 String.Join("`, `", fields) + 149 String.Join("`, `", fields) +
150 "`) values (?principalID, ?" + String.Join(", ?", fields) + ")"; 150 "`) values (?principalID, ?" + String.Join(", ?", fields) + ")";
151 151
152 cmd.CommandText = insert; 152 cmd.CommandText = insert;
153 153
154 if (ExecuteNonQuery(cmd) < 1) 154 if (ExecuteNonQuery(cmd) < 1)
155 return false; 155 return false;
156 } 156 }
@@ -166,7 +166,7 @@ namespace OpenSim.Data.MySQL
166 { 166 {
167 cmd.Parameters.AddWithValue("?"+item, value); 167 cmd.Parameters.AddWithValue("?"+item, value);
168 cmd.Parameters.AddWithValue("?UUID", principalID.ToString()); 168 cmd.Parameters.AddWithValue("?UUID", principalID.ToString());
169 169
170 if (ExecuteNonQuery(cmd) > 0) 170 if (ExecuteNonQuery(cmd) > 0)
171 return true; 171 return true;
172 } 172 }
@@ -186,7 +186,7 @@ namespace OpenSim.Data.MySQL
186 cmd.Parameters.AddWithValue("?principalID", principalID.ToString()); 186 cmd.Parameters.AddWithValue("?principalID", principalID.ToString());
187 cmd.Parameters.AddWithValue("?token", token); 187 cmd.Parameters.AddWithValue("?token", token);
188 cmd.Parameters.AddWithValue("?lifetime", lifetime.ToString()); 188 cmd.Parameters.AddWithValue("?lifetime", lifetime.ToString());
189 189
190 if (ExecuteNonQuery(cmd) > 0) 190 if (ExecuteNonQuery(cmd) > 0)
191 return true; 191 return true;
192 } 192 }
diff --git a/OpenSim/Data/MySQL/MySQLAvatarData.cs b/OpenSim/Data/MySQL/MySQLAvatarData.cs
index 6a2f5d8..63e8020 100644
--- a/OpenSim/Data/MySQL/MySQLAvatarData.cs
+++ b/OpenSim/Data/MySQL/MySQLAvatarData.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Data.MySQL
57 cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = ?PrincipalID and `Name` = ?Name", m_Realm); 57 cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = ?PrincipalID and `Name` = ?Name", m_Realm);
58 cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); 58 cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString());
59 cmd.Parameters.AddWithValue("?Name", name); 59 cmd.Parameters.AddWithValue("?Name", name);
60 60
61 if (ExecuteNonQuery(cmd) > 0) 61 if (ExecuteNonQuery(cmd) > 0)
62 return true; 62 return true;
63 } 63 }
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index fe1487b..a5c8d24 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -403,19 +403,19 @@ namespace OpenSim.Data.MySQL
403 return e; 403 return e;
404 } 404 }
405 } 405 }
406 406
407 public List<EstateSettings> LoadEstateSettingsAll() 407 public List<EstateSettings> LoadEstateSettingsAll()
408 { 408 {
409 List<EstateSettings> allEstateSettings = new List<EstateSettings>(); 409 List<EstateSettings> allEstateSettings = new List<EstateSettings>();
410 410
411 List<int> allEstateIds = GetEstatesAll(); 411 List<int> allEstateIds = GetEstatesAll();
412 412
413 foreach (int estateId in allEstateIds) 413 foreach (int estateId in allEstateIds)
414 allEstateSettings.Add(LoadEstateSettings(estateId)); 414 allEstateSettings.Add(LoadEstateSettings(estateId));
415 415
416 return allEstateSettings; 416 return allEstateSettings;
417 } 417 }
418 418
419 public List<int> GetEstatesAll() 419 public List<int> GetEstatesAll()
420 { 420 {
421 List<int> result = new List<int>(); 421 List<int> result = new List<int>();
@@ -441,7 +441,7 @@ namespace OpenSim.Data.MySQL
441 dbcon.Close(); 441 dbcon.Close();
442 } 442 }
443 443
444 return result; 444 return result;
445 } 445 }
446 446
447 public List<int> GetEstates(string search) 447 public List<int> GetEstates(string search)
diff --git a/OpenSim/Data/MySQL/MySQLFSAssetData.cs b/OpenSim/Data/MySQL/MySQLFSAssetData.cs
index 4ed2de6..2837ce3 100644
--- a/OpenSim/Data/MySQL/MySQLFSAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLFSAssetData.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Data.MySQL
54 { 54 {
55 get { return GetType().Assembly; } 55 get { return GetType().Assembly; }
56 } 56 }
57 57
58 public MySQLFSAssetData() 58 public MySQLFSAssetData()
59 { 59 {
60 } 60 }
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index dc657c8..6aae9c6 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Data.MySQL
40 public class MySQLGenericTableHandler<T> : MySqlFramework where T: class, new() 40 public class MySQLGenericTableHandler<T> : MySqlFramework where T: class, new()
41 { 41 {
42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 protected Dictionary<string, FieldInfo> m_Fields = 44 protected Dictionary<string, FieldInfo> m_Fields =
45 new Dictionary<string, FieldInfo>(); 45 new Dictionary<string, FieldInfo>();
46 46
@@ -58,7 +58,7 @@ namespace OpenSim.Data.MySQL
58 { 58 {
59 m_Realm = realm; 59 m_Realm = realm;
60 m_connectionString = connectionString; 60 m_connectionString = connectionString;
61 61
62 if (storeName != String.Empty) 62 if (storeName != String.Empty)
63 { 63 {
64 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 64 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
@@ -130,7 +130,7 @@ namespace OpenSim.Data.MySQL
130 m_Realm, where); 130 m_Realm, where);
131 131
132 cmd.CommandText = query; 132 cmd.CommandText = query;
133 133
134 return DoQuery(cmd); 134 return DoQuery(cmd);
135 } 135 }
136 } 136 }
@@ -185,7 +185,7 @@ namespace OpenSim.Data.MySQL
185 m_Fields[name].SetValue(row, reader[name]); 185 m_Fields[name].SetValue(row, reader[name]);
186 } 186 }
187 } 187 }
188 188
189 if (m_DataField != null) 189 if (m_DataField != null)
190 { 190 {
191 Dictionary<string, string> data = 191 Dictionary<string, string> data =
@@ -215,9 +215,9 @@ namespace OpenSim.Data.MySQL
215 { 215 {
216 string query = String.Format("select * from {0} where {1}", 216 string query = String.Format("select * from {0} where {1}",
217 m_Realm, where); 217 m_Realm, where);
218 218
219 cmd.CommandText = query; 219 cmd.CommandText = query;
220 220
221 return DoQuery(cmd); 221 return DoQuery(cmd);
222 } 222 }
223 } 223 }
@@ -236,16 +236,16 @@ namespace OpenSim.Data.MySQL
236 { 236 {
237 names.Add(fi.Name); 237 names.Add(fi.Name);
238 values.Add("?" + fi.Name); 238 values.Add("?" + fi.Name);
239 239
240 // Temporarily return more information about what field is unexpectedly null for 240 // Temporarily return more information about what field is unexpectedly null for
241 // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the 241 // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the
242 // InventoryTransferModule or we may be required to substitute a DBNull here. 242 // InventoryTransferModule or we may be required to substitute a DBNull here.
243 if (fi.GetValue(row) == null) 243 if (fi.GetValue(row) == null)
244 throw new NullReferenceException( 244 throw new NullReferenceException(
245 string.Format( 245 string.Format(
246 "[MYSQL GENERIC TABLE HANDLER]: Trying to store field {0} for {1} which is unexpectedly null", 246 "[MYSQL GENERIC TABLE HANDLER]: Trying to store field {0} for {1} which is unexpectedly null",
247 fi.Name, row)); 247 fi.Name, row));
248 248
249 cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString()); 249 cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString());
250 } 250 }
251 251
diff --git a/OpenSim/Data/MySQL/MySQLGroupsData.cs b/OpenSim/Data/MySQL/MySQLGroupsData.cs
index 5734d19..4e73ee7 100644
--- a/OpenSim/Data/MySQL/MySQLGroupsData.cs
+++ b/OpenSim/Data/MySQL/MySQLGroupsData.cs
@@ -133,10 +133,10 @@ namespace OpenSim.Data.MySQL
133 133
134 public bool DeleteMember(UUID groupID, string pricipalID) 134 public bool DeleteMember(UUID groupID, string pricipalID)
135 { 135 {
136 return m_Membership.Delete(new string[] { "GroupID", "PrincipalID" }, 136 return m_Membership.Delete(new string[] { "GroupID", "PrincipalID" },
137 new string[] { groupID.ToString(), pricipalID }); 137 new string[] { groupID.ToString(), pricipalID });
138 } 138 }
139 139
140 public int MemberCount(UUID groupID) 140 public int MemberCount(UUID groupID)
141 { 141 {
142 return (int)m_Membership.GetCount("GroupID", groupID.ToString()); 142 return (int)m_Membership.GetCount("GroupID", groupID.ToString());
@@ -168,7 +168,7 @@ namespace OpenSim.Data.MySQL
168 168
169 public bool DeleteRole(UUID groupID, UUID roleID) 169 public bool DeleteRole(UUID groupID, UUID roleID)
170 { 170 {
171 return m_Roles.Delete(new string[] { "GroupID", "RoleID" }, 171 return m_Roles.Delete(new string[] { "GroupID", "RoleID" },
172 new string[] { groupID.ToString(), roleID.ToString() }); 172 new string[] { groupID.ToString(), roleID.ToString() });
173 } 173 }
174 174
@@ -360,7 +360,7 @@ namespace OpenSim.Data.MySQL
360 get { return GetType().Assembly; } 360 get { return GetType().Assembly; }
361 } 361 }
362 362
363 public MySqlGroupsGroupsHandler(string connectionString, string realm, string store) 363 public MySqlGroupsGroupsHandler(string connectionString, string realm, string store)
364 : base(connectionString, realm, store) 364 : base(connectionString, realm, store)
365 { 365 {
366 } 366 }
@@ -375,7 +375,7 @@ namespace OpenSim.Data.MySQL
375 get { return GetType().Assembly; } 375 get { return GetType().Assembly; }
376 } 376 }
377 377
378 public MySqlGroupsMembershipHandler(string connectionString, string realm) 378 public MySqlGroupsMembershipHandler(string connectionString, string realm)
379 : base(connectionString, realm, string.Empty) 379 : base(connectionString, realm, string.Empty)
380 { 380 {
381 } 381 }
@@ -390,7 +390,7 @@ namespace OpenSim.Data.MySQL
390 get { return GetType().Assembly; } 390 get { return GetType().Assembly; }
391 } 391 }
392 392
393 public MySqlGroupsRolesHandler(string connectionString, string realm) 393 public MySqlGroupsRolesHandler(string connectionString, string realm)
394 : base(connectionString, realm, string.Empty) 394 : base(connectionString, realm, string.Empty)
395 { 395 {
396 } 396 }
@@ -405,7 +405,7 @@ namespace OpenSim.Data.MySQL
405 get { return GetType().Assembly; } 405 get { return GetType().Assembly; }
406 } 406 }
407 407
408 public MySqlGroupsRoleMembershipHandler(string connectionString, string realm) 408 public MySqlGroupsRoleMembershipHandler(string connectionString, string realm)
409 : base(connectionString, realm, string.Empty) 409 : base(connectionString, realm, string.Empty)
410 { 410 {
411 } 411 }
@@ -420,7 +420,7 @@ namespace OpenSim.Data.MySQL
420 get { return GetType().Assembly; } 420 get { return GetType().Assembly; }
421 } 421 }
422 422
423 public MySqlGroupsInvitesHandler(string connectionString, string realm) 423 public MySqlGroupsInvitesHandler(string connectionString, string realm)
424 : base(connectionString, realm, string.Empty) 424 : base(connectionString, realm, string.Empty)
425 { 425 {
426 } 426 }
@@ -447,7 +447,7 @@ namespace OpenSim.Data.MySQL
447 get { return GetType().Assembly; } 447 get { return GetType().Assembly; }
448 } 448 }
449 449
450 public MySqlGroupsNoticesHandler(string connectionString, string realm) 450 public MySqlGroupsNoticesHandler(string connectionString, string realm)
451 : base(connectionString, realm, string.Empty) 451 : base(connectionString, realm, string.Empty)
452 { 452 {
453 } 453 }
@@ -475,7 +475,7 @@ namespace OpenSim.Data.MySQL
475 get { return GetType().Assembly; } 475 get { return GetType().Assembly; }
476 } 476 }
477 477
478 public MySqlGroupsPrincipalsHandler(string connectionString, string realm) 478 public MySqlGroupsPrincipalsHandler(string connectionString, string realm)
479 : base(connectionString, realm, string.Empty) 479 : base(connectionString, realm, string.Empty)
480 { 480 {
481 } 481 }
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index e9b10f3..382d4a5 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -288,7 +288,7 @@ namespace OpenSim.Data.MySQL
288 // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. 288 // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these.
289 // (DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero) 289 // (DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero)
290 item.CreatorId = reader["creatorID"].ToString(); 290 item.CreatorId = reader["creatorID"].ToString();
291 291
292 // Be a bit safer in parsing these because the 292 // Be a bit safer in parsing these because the
293 // database doesn't enforce them to be not null, and 293 // database doesn't enforce them to be not null, and
294 // the inventory still works if these are weird in the 294 // the inventory still works if these are weird in the
@@ -453,7 +453,7 @@ namespace OpenSim.Data.MySQL
453 itemName = item.Name.Substring(0, 64); 453 itemName = item.Name.Substring(0, 64);
454 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length + " to " + itemName.Length + " characters on add item"); 454 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length + " to " + itemName.Length + " characters on add item");
455 } 455 }
456 456
457 string itemDesc = item.Description; 457 string itemDesc = item.Description;
458 if (item.Description.Length > 128) 458 if (item.Description.Length > 128)
459 { 459 {
@@ -490,10 +490,10 @@ namespace OpenSim.Data.MySQL
490 result.Parameters.AddWithValue("?groupID", item.GroupID); 490 result.Parameters.AddWithValue("?groupID", item.GroupID);
491 result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); 491 result.Parameters.AddWithValue("?groupOwned", item.GroupOwned);
492 result.Parameters.AddWithValue("?flags", item.Flags); 492 result.Parameters.AddWithValue("?flags", item.Flags);
493 493
494 lock (m_dbLock) 494 lock (m_dbLock)
495 result.ExecuteNonQuery(); 495 result.ExecuteNonQuery();
496 496
497 result.Dispose(); 497 result.Dispose();
498 } 498 }
499 499
@@ -630,7 +630,7 @@ namespace OpenSim.Data.MySQL
630 { 630 {
631 cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString()); 631 cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString());
632 cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString()); 632 cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString());
633 633
634 try 634 try
635 { 635 {
636 lock (m_dbLock) 636 lock (m_dbLock)
@@ -860,7 +860,7 @@ namespace OpenSim.Data.MySQL
860 deleteOneFolder(folderID); 860 deleteOneFolder(folderID);
861 deleteItemsInFolder(folderID); 861 deleteItemsInFolder(folderID);
862 } 862 }
863 863
864 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) 864 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID)
865 { 865 {
866 lock (m_dbLock) 866 lock (m_dbLock)
diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs
index 81a0e83..2043dae 100644
--- a/OpenSim/Data/MySQL/MySQLMigrations.cs
+++ b/OpenSim/Data/MySQL/MySQLMigrations.cs
@@ -39,16 +39,16 @@ namespace OpenSim.Data.MySQL
39{ 39{
40 /// <summary>This is a MySQL-customized migration processor. The only difference is in how 40 /// <summary>This is a MySQL-customized migration processor. The only difference is in how
41 /// it executes SQL scripts (using MySqlScript instead of MyCommand) 41 /// it executes SQL scripts (using MySqlScript instead of MyCommand)
42 /// 42 ///
43 /// </summary> 43 /// </summary>
44 public class MySqlMigration : Migration 44 public class MySqlMigration : Migration
45 { 45 {
46 public MySqlMigration() 46 public MySqlMigration()
47 : base() 47 : base()
48 { 48 {
49 } 49 }
50 50
51 public MySqlMigration(DbConnection conn, Assembly assem, string subtype, string type) : 51 public MySqlMigration(DbConnection conn, Assembly assem, string subtype, string type) :
52 base(conn, assem, subtype, type) 52 base(conn, assem, subtype, type)
53 { 53 {
54 } 54 }
diff --git a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
index bafd204..7608858 100644
--- a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
+++ b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Data.MySQL
50 using (MySqlCommand cmd = new MySqlCommand()) 50 using (MySqlCommand cmd = new MySqlCommand())
51 { 51 {
52 cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm); 52 cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm);
53 53
54 ExecuteNonQuery(cmd); 54 ExecuteNonQuery(cmd);
55 } 55 }
56 56
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs
index 3f90639..70aca5f 100644
--- a/OpenSim/Data/MySQL/MySQLPresenceData.cs
+++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs
@@ -66,9 +66,9 @@ namespace OpenSim.Data.MySQL
66 using (MySqlCommand cmd = new MySqlCommand()) 66 using (MySqlCommand cmd = new MySqlCommand())
67 { 67 {
68 cmd.CommandText = String.Format("delete from {0} where `RegionID`=?RegionID", m_Realm); 68 cmd.CommandText = String.Format("delete from {0} where `RegionID`=?RegionID", m_Realm);
69 69
70 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString()); 70 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
71 71
72 ExecuteNonQuery(cmd); 72 ExecuteNonQuery(cmd);
73 } 73 }
74 } 74 }
@@ -85,10 +85,10 @@ namespace OpenSim.Data.MySQL
85 using (MySqlCommand cmd = new MySqlCommand()) 85 using (MySqlCommand cmd = new MySqlCommand())
86 { 86 {
87 cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, LastSeen=NOW() where `SessionID`=?SessionID", m_Realm); 87 cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, LastSeen=NOW() where `SessionID`=?SessionID", m_Realm);
88 88
89 cmd.Parameters.AddWithValue("?SessionID", sessionID.ToString()); 89 cmd.Parameters.AddWithValue("?SessionID", sessionID.ToString());
90 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString()); 90 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
91 91
92 if (ExecuteNonQuery(cmd) == 0) 92 if (ExecuteNonQuery(cmd) == 0)
93 return false; 93 return false;
94 } 94 }
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 99d4944..0e55285 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -410,7 +410,7 @@ namespace OpenSim.Data.MySQL
410 using (MySqlCommand cmd = new MySqlCommand(command)) 410 using (MySqlCommand cmd = new MySqlCommand(command))
411 { 411 {
412 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); 412 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
413 413
414 return RunCommand(cmd); 414 return RunCommand(cmd);
415 } 415 }
416 } 416 }
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 2aaa2ff..8278c0e 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Data.MySQL
55 /// <summary> 55 /// <summary>
56 /// This lock was being used to serialize database operations when the connection was shared, but this has 56 /// This lock was being used to serialize database operations when the connection was shared, but this has
57 /// been unnecessary for a long time after we switched to using MySQL's underlying connection pooling instead. 57 /// been unnecessary for a long time after we switched to using MySQL's underlying connection pooling instead.
58 /// FIXME: However, the locks remain in many places since they are effectively providing a level of 58 /// FIXME: However, the locks remain in many places since they are effectively providing a level of
59 /// transactionality. This should be replaced by more efficient database transactions which would not require 59 /// transactionality. This should be replaced by more efficient database transactions which would not require
60 /// unrelated operations to block each other or unrelated operations on the same tables from blocking each 60 /// unrelated operations to block each other or unrelated operations on the same tables from blocking each
61 /// other. 61 /// other.
@@ -268,7 +268,7 @@ namespace OpenSim.Data.MySQL
268 public virtual void RemoveObject(UUID obj, UUID regionUUID) 268 public virtual void RemoveObject(UUID obj, UUID regionUUID)
269 { 269 {
270// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID); 270// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID);
271 271
272 List<UUID> uuids = new List<UUID>(); 272 List<UUID> uuids = new List<UUID>();
273 273
274 // Formerly, this used to check the region UUID. 274 // Formerly, this used to check the region UUID.
@@ -509,7 +509,7 @@ namespace OpenSim.Data.MySQL
509 #region Prim Inventory Loading 509 #region Prim Inventory Loading
510 510
511 // Instead of attempting to LoadItems on every prim, 511 // Instead of attempting to LoadItems on every prim,
512 // most of which probably have no items... get a 512 // most of which probably have no items... get a
513 // list from DB of all prims which have items and 513 // list from DB of all prims which have items and
514 // LoadItems only on those 514 // LoadItems only on those
515 List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>(); 515 List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>();
@@ -807,7 +807,7 @@ namespace OpenSim.Data.MySQL
807 "UserLocationX, UserLocationY, UserLocationZ, " + 807 "UserLocationX, UserLocationY, UserLocationZ, " +
808 "UserLookAtX, UserLookAtY, UserLookAtZ, " + 808 "UserLookAtX, UserLookAtY, UserLookAtZ, " +
809 "AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " + 809 "AuthbuyerID, OtherCleanTime, Dwell, MediaType, MediaDescription, " +
810 "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " + 810 "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " +
811 "SeeAVs, AnyAVSounds, GroupAVSounds) values (" + 811 "SeeAVs, AnyAVSounds, GroupAVSounds) values (" +
812 "?UUID, ?RegionUUID, " + 812 "?UUID, ?RegionUUID, " +
813 "?LocalLandID, ?Bitmap, ?Name, ?Description, " + 813 "?LocalLandID, ?Bitmap, ?Name, ?Description, " +
@@ -1081,7 +1081,7 @@ namespace OpenSim.Data.MySQL
1081 cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY); 1081 cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
1082 cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock); 1082 cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
1083 cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds); 1083 cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
1084 1084
1085 ExecuteNonQuery(cmd); 1085 ExecuteNonQuery(cmd);
1086 } 1086 }
1087 } 1087 }
@@ -1273,7 +1273,7 @@ namespace OpenSim.Data.MySQL
1273 { 1273 {
1274 SceneObjectPart prim = new SceneObjectPart(); 1274 SceneObjectPart prim = new SceneObjectPart();
1275 1275
1276 // depending on the MySQL connector version, CHAR(36) may be already converted to Guid! 1276 // depending on the MySQL connector version, CHAR(36) may be already converted to Guid!
1277 prim.UUID = DBGuid.FromDB(row["UUID"]); 1277 prim.UUID = DBGuid.FromDB(row["UUID"]);
1278 prim.CreatorIdentification = (string)row["CreatorID"]; 1278 prim.CreatorIdentification = (string)row["CreatorID"];
1279 prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); 1279 prim.OwnerID = DBGuid.FromDB(row["OwnerID"]);
@@ -1401,11 +1401,11 @@ namespace OpenSim.Data.MySQL
1401 1401
1402 prim.CollisionSound = DBGuid.FromDB(row["CollisionSound"]); 1402 prim.CollisionSound = DBGuid.FromDB(row["CollisionSound"]);
1403 prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; 1403 prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"];
1404 1404
1405 prim.PassTouches = ((sbyte)row["PassTouches"] != 0); 1405 prim.PassTouches = ((sbyte)row["PassTouches"] != 0);
1406 prim.PassCollisions = ((sbyte)row["PassCollisions"] != 0); 1406 prim.PassCollisions = ((sbyte)row["PassCollisions"] != 0);
1407 prim.LinkNum = (int)row["LinkNumber"]; 1407 prim.LinkNum = (int)row["LinkNumber"];
1408 1408
1409 if (!(row["MediaURL"] is System.DBNull)) 1409 if (!(row["MediaURL"] is System.DBNull))
1410 prim.MediaUrl = (string)row["MediaURL"]; 1410 prim.MediaUrl = (string)row["MediaURL"];
1411 1411
@@ -1421,7 +1421,7 @@ namespace OpenSim.Data.MySQL
1421 if (!(row["DynAttrs"] is System.DBNull)) 1421 if (!(row["DynAttrs"] is System.DBNull))
1422 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); 1422 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1423 else 1423 else
1424 prim.DynAttrs = new DAMap(); 1424 prim.DynAttrs = new DAMap();
1425 1425
1426 if (!(row["KeyframeMotion"] is DBNull)) 1426 if (!(row["KeyframeMotion"] is DBNull))
1427 { 1427 {
@@ -1543,10 +1543,10 @@ namespace OpenSim.Data.MySQL
1543 newSettings.Covenant = DBGuid.FromDB(row["covenant"]); 1543 newSettings.Covenant = DBGuid.FromDB(row["covenant"]);
1544 newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]); 1544 newSettings.CovenantChangedDateTime = Convert.ToInt32(row["covenant_datetime"]);
1545 newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]); 1545 newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]);
1546 1546
1547 if (row["loaded_creation_id"] is DBNull) 1547 if (row["loaded_creation_id"] is DBNull)
1548 newSettings.LoadedCreationID = ""; 1548 newSettings.LoadedCreationID = "";
1549 else 1549 else
1550 newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; 1550 newSettings.LoadedCreationID = (String) row["loaded_creation_id"];
1551 1551
1552 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); 1552 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
@@ -2023,7 +2023,7 @@ namespace OpenSim.Data.MySQL
2023 2023
2024 s.State = (byte)(int)row["State"]; 2024 s.State = (byte)(int)row["State"];
2025 s.LastAttachPoint = (byte)(int)row["LastAttachPoint"]; 2025 s.LastAttachPoint = (byte)(int)row["LastAttachPoint"];
2026 2026
2027 if (!(row["Media"] is System.DBNull)) 2027 if (!(row["Media"] is System.DBNull))
2028 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 2028 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
2029 2029
@@ -2103,13 +2103,13 @@ namespace OpenSim.Data.MySQL
2103 "?flags, ?itemID, ?primID, ?assetID, " + 2103 "?flags, ?itemID, ?primID, ?assetID, " +
2104 "?parentFolderID, ?creatorID, ?ownerID, " + 2104 "?parentFolderID, ?creatorID, ?ownerID, " +
2105 "?groupID, ?lastOwnerID)"; 2105 "?groupID, ?lastOwnerID)";
2106 2106
2107 foreach (TaskInventoryItem item in items) 2107 foreach (TaskInventoryItem item in items)
2108 { 2108 {
2109 cmd.Parameters.Clear(); 2109 cmd.Parameters.Clear();
2110 2110
2111 FillItemCommand(cmd, item); 2111 FillItemCommand(cmd, item);
2112 2112
2113 ExecuteNonQuery(cmd); 2113 ExecuteNonQuery(cmd);
2114 } 2114 }
2115 } 2115 }
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
index c389ae4..8af2a3e 100644
--- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
@@ -40,39 +40,39 @@ namespace OpenSim.Data.MySQL
40 public class UserProfilesData: IProfilesData 40 public class UserProfilesData: IProfilesData
41 { 41 {
42 static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 #region Properites 44 #region Properites
45 string ConnectionString 45 string ConnectionString
46 { 46 {
47 get; set; 47 get; set;
48 } 48 }
49 49
50 protected virtual Assembly Assembly 50 protected virtual Assembly Assembly
51 { 51 {
52 get { return GetType().Assembly; } 52 get { return GetType().Assembly; }
53 } 53 }
54 54
55 #endregion Properties 55 #endregion Properties
56 56
57 #region class Member Functions 57 #region class Member Functions
58 public UserProfilesData(string connectionString) 58 public UserProfilesData(string connectionString)
59 { 59 {
60 ConnectionString = connectionString; 60 ConnectionString = connectionString;
61 Init(); 61 Init();
62 } 62 }
63 63
64 void Init() 64 void Init()
65 { 65 {
66 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 66 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
67 { 67 {
68 dbcon.Open(); 68 dbcon.Open();
69 69
70 Migration m = new Migration(dbcon, Assembly, "UserProfiles"); 70 Migration m = new Migration(dbcon, Assembly, "UserProfiles");
71 m.Update(); 71 m.Update();
72 } 72 }
73 } 73 }
74 #endregion Member Functions 74 #endregion Member Functions
75 75
76 #region Classifieds Queries 76 #region Classifieds Queries
77 /// <summary> 77 /// <summary>
78 /// Gets the classified records. 78 /// Gets the classified records.
@@ -86,7 +86,7 @@ namespace OpenSim.Data.MySQL
86 public OSDArray GetClassifiedRecords(UUID creatorId) 86 public OSDArray GetClassifiedRecords(UUID creatorId)
87 { 87 {
88 OSDArray data = new OSDArray(); 88 OSDArray data = new OSDArray();
89 89
90 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 90 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
91 { 91 {
92 string query = "SELECT classifieduuid, name FROM classifieds WHERE creatoruuid = ?Id"; 92 string query = "SELECT classifieduuid, name FROM classifieds WHERE creatoruuid = ?Id";
@@ -102,7 +102,7 @@ namespace OpenSim.Data.MySQL
102 { 102 {
103 OSDMap n = new OSDMap(); 103 OSDMap n = new OSDMap();
104 UUID Id = UUID.Zero; 104 UUID Id = UUID.Zero;
105 105
106 string Name = null; 106 string Name = null;
107 try 107 try
108 { 108 {
@@ -124,12 +124,12 @@ namespace OpenSim.Data.MySQL
124 } 124 }
125 return data; 125 return data;
126 } 126 }
127 127
128 public bool UpdateClassifiedRecord(UserClassifiedAdd ad, ref string result) 128 public bool UpdateClassifiedRecord(UserClassifiedAdd ad, ref string result)
129 { 129 {
130 string query = string.Empty; 130 string query = string.Empty;
131 131
132 132
133 query += "INSERT INTO classifieds ("; 133 query += "INSERT INTO classifieds (";
134 query += "`classifieduuid`,"; 134 query += "`classifieduuid`,";
135 query += "`creatoruuid`,"; 135 query += "`creatoruuid`,";
@@ -173,21 +173,21 @@ namespace OpenSim.Data.MySQL
173 query += "classifiedflags=?Flags, "; 173 query += "classifiedflags=?Flags, ";
174 query += "priceforlisting=?ListingPrice, "; 174 query += "priceforlisting=?ListingPrice, ";
175 query += "snapshotuuid=?SnapshotId"; 175 query += "snapshotuuid=?SnapshotId";
176 176
177 if(string.IsNullOrEmpty(ad.ParcelName)) 177 if(string.IsNullOrEmpty(ad.ParcelName))
178 ad.ParcelName = "Unknown"; 178 ad.ParcelName = "Unknown";
179 if(ad.ParcelId == null) 179 if(ad.ParcelId == null)
180 ad.ParcelId = UUID.Zero; 180 ad.ParcelId = UUID.Zero;
181 if(string.IsNullOrEmpty(ad.Description)) 181 if(string.IsNullOrEmpty(ad.Description))
182 ad.Description = "No Description"; 182 ad.Description = "No Description";
183 183
184 DateTime epoch = new DateTime(1970, 1, 1); 184 DateTime epoch = new DateTime(1970, 1, 1);
185 DateTime now = DateTime.Now; 185 DateTime now = DateTime.Now;
186 TimeSpan epochnow = now - epoch; 186 TimeSpan epochnow = now - epoch;
187 TimeSpan duration; 187 TimeSpan duration;
188 DateTime expiration; 188 DateTime expiration;
189 TimeSpan epochexp; 189 TimeSpan epochexp;
190 190
191 if(ad.Flags == 2) 191 if(ad.Flags == 2)
192 { 192 {
193 duration = new TimeSpan(7,0,0,0); 193 duration = new TimeSpan(7,0,0,0);
@@ -202,7 +202,7 @@ namespace OpenSim.Data.MySQL
202 } 202 }
203 ad.CreationDate = (int)epochnow.TotalSeconds; 203 ad.CreationDate = (int)epochnow.TotalSeconds;
204 ad.ExpirationDate = (int)epochexp.TotalSeconds; 204 ad.ExpirationDate = (int)epochexp.TotalSeconds;
205 205
206 try 206 try
207 { 207 {
208 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 208 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -225,7 +225,7 @@ namespace OpenSim.Data.MySQL
225 cmd.Parameters.AddWithValue("?ParcelName", ad.ParcelName.ToString()); 225 cmd.Parameters.AddWithValue("?ParcelName", ad.ParcelName.ToString());
226 cmd.Parameters.AddWithValue("?Flags", ad.Flags.ToString()); 226 cmd.Parameters.AddWithValue("?Flags", ad.Flags.ToString());
227 cmd.Parameters.AddWithValue("?ListingPrice", ad.Price.ToString ()); 227 cmd.Parameters.AddWithValue("?ListingPrice", ad.Price.ToString ());
228 228
229 cmd.ExecuteNonQuery(); 229 cmd.ExecuteNonQuery();
230 } 230 }
231 } 231 }
@@ -239,20 +239,20 @@ namespace OpenSim.Data.MySQL
239 } 239 }
240 return true; 240 return true;
241 } 241 }
242 242
243 public bool DeleteClassifiedRecord(UUID recordId) 243 public bool DeleteClassifiedRecord(UUID recordId)
244 { 244 {
245 string query = string.Empty; 245 string query = string.Empty;
246 246
247 query += "DELETE FROM classifieds WHERE "; 247 query += "DELETE FROM classifieds WHERE ";
248 query += "classifieduuid = ?recordId"; 248 query += "classifieduuid = ?recordId";
249 249
250 try 250 try
251 { 251 {
252 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 252 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
253 { 253 {
254 dbcon.Open(); 254 dbcon.Open();
255 255
256 using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) 256 using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
257 { 257 {
258 cmd.Parameters.AddWithValue("?recordId", recordId.ToString()); 258 cmd.Parameters.AddWithValue("?recordId", recordId.ToString());
@@ -268,14 +268,14 @@ namespace OpenSim.Data.MySQL
268 } 268 }
269 return true; 269 return true;
270 } 270 }
271 271
272 public bool GetClassifiedInfo(ref UserClassifiedAdd ad, ref string result) 272 public bool GetClassifiedInfo(ref UserClassifiedAdd ad, ref string result)
273 { 273 {
274 string query = string.Empty; 274 string query = string.Empty;
275 275
276 query += "SELECT * FROM classifieds WHERE "; 276 query += "SELECT * FROM classifieds WHERE ";
277 query += "classifieduuid = ?AdId"; 277 query += "classifieduuid = ?AdId";
278 278
279 try 279 try
280 { 280 {
281 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 281 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -284,7 +284,7 @@ namespace OpenSim.Data.MySQL
284 using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) 284 using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
285 { 285 {
286 cmd.Parameters.AddWithValue("?AdId", ad.ClassifiedId.ToString()); 286 cmd.Parameters.AddWithValue("?AdId", ad.ClassifiedId.ToString());
287 287
288 using (MySqlDataReader reader = cmd.ExecuteReader()) 288 using (MySqlDataReader reader = cmd.ExecuteReader())
289 { 289 {
290 if(reader.Read ()) 290 if(reader.Read ())
@@ -303,7 +303,7 @@ namespace OpenSim.Data.MySQL
303 ad.SimName = reader.GetString("simname"); 303 ad.SimName = reader.GetString("simname");
304 ad.GlobalPos = reader.GetString("posglobal"); 304 ad.GlobalPos = reader.GetString("posglobal");
305 ad.ParcelName = reader.GetString("parcelname"); 305 ad.ParcelName = reader.GetString("parcelname");
306 306
307 } 307 }
308 } 308 }
309 } 309 }
@@ -318,16 +318,16 @@ namespace OpenSim.Data.MySQL
318 return true; 318 return true;
319 } 319 }
320 #endregion Classifieds Queries 320 #endregion Classifieds Queries
321 321
322 #region Picks Queries 322 #region Picks Queries
323 public OSDArray GetAvatarPicks(UUID avatarId) 323 public OSDArray GetAvatarPicks(UUID avatarId)
324 { 324 {
325 string query = string.Empty; 325 string query = string.Empty;
326 326
327 query += "SELECT `pickuuid`,`name` FROM userpicks WHERE "; 327 query += "SELECT `pickuuid`,`name` FROM userpicks WHERE ";
328 query += "creatoruuid = ?Id"; 328 query += "creatoruuid = ?Id";
329 OSDArray data = new OSDArray(); 329 OSDArray data = new OSDArray();
330 330
331 try 331 try
332 { 332 {
333 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 333 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -336,7 +336,7 @@ namespace OpenSim.Data.MySQL
336 using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) 336 using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
337 { 337 {
338 cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); 338 cmd.Parameters.AddWithValue("?Id", avatarId.ToString());
339 339
340 using (MySqlDataReader reader = cmd.ExecuteReader()) 340 using (MySqlDataReader reader = cmd.ExecuteReader())
341 { 341 {
342 if(reader.HasRows) 342 if(reader.HasRows)
@@ -344,7 +344,7 @@ namespace OpenSim.Data.MySQL
344 while (reader.Read()) 344 while (reader.Read())
345 { 345 {
346 OSDMap record = new OSDMap(); 346 OSDMap record = new OSDMap();
347 347
348 record.Add("pickuuid",OSD.FromString((string)reader["pickuuid"])); 348 record.Add("pickuuid",OSD.FromString((string)reader["pickuuid"]));
349 record.Add("name",OSD.FromString((string)reader["name"])); 349 record.Add("name",OSD.FromString((string)reader["name"]));
350 data.Add(record); 350 data.Add(record);
@@ -361,16 +361,16 @@ namespace OpenSim.Data.MySQL
361 } 361 }
362 return data; 362 return data;
363 } 363 }
364 364
365 public UserProfilePick GetPickInfo(UUID avatarId, UUID pickId) 365 public UserProfilePick GetPickInfo(UUID avatarId, UUID pickId)
366 { 366 {
367 string query = string.Empty; 367 string query = string.Empty;
368 UserProfilePick pick = new UserProfilePick(); 368 UserProfilePick pick = new UserProfilePick();
369 369
370 query += "SELECT * FROM userpicks WHERE "; 370 query += "SELECT * FROM userpicks WHERE ";
371 query += "creatoruuid = ?CreatorId AND "; 371 query += "creatoruuid = ?CreatorId AND ";
372 query += "pickuuid = ?PickId"; 372 query += "pickuuid = ?PickId";
373 373
374 try 374 try
375 { 375 {
376 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 376 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -380,18 +380,18 @@ namespace OpenSim.Data.MySQL
380 { 380 {
381 cmd.Parameters.AddWithValue("?CreatorId", avatarId.ToString()); 381 cmd.Parameters.AddWithValue("?CreatorId", avatarId.ToString());
382 cmd.Parameters.AddWithValue("?PickId", pickId.ToString()); 382 cmd.Parameters.AddWithValue("?PickId", pickId.ToString());
383 383
384 using (MySqlDataReader reader = cmd.ExecuteReader()) 384 using (MySqlDataReader reader = cmd.ExecuteReader())
385 { 385 {
386 if(reader.HasRows) 386 if(reader.HasRows)
387 { 387 {
388 reader.Read(); 388 reader.Read();
389 389
390 string description = (string)reader["description"]; 390 string description = (string)reader["description"];
391 391
392 if (string.IsNullOrEmpty(description)) 392 if (string.IsNullOrEmpty(description))
393 description = "No description given."; 393 description = "No description given.";
394 394
395 UUID.TryParse((string)reader["pickuuid"], out pick.PickId); 395 UUID.TryParse((string)reader["pickuuid"], out pick.PickId);
396 UUID.TryParse((string)reader["creatoruuid"], out pick.CreatorId); 396 UUID.TryParse((string)reader["creatoruuid"], out pick.CreatorId);
397 UUID.TryParse((string)reader["parceluuid"], out pick.ParcelId); 397 UUID.TryParse((string)reader["parceluuid"], out pick.ParcelId);
@@ -419,11 +419,11 @@ namespace OpenSim.Data.MySQL
419 } 419 }
420 return pick; 420 return pick;
421 } 421 }
422 422
423 public bool UpdatePicksRecord(UserProfilePick pick) 423 public bool UpdatePicksRecord(UserProfilePick pick)
424 { 424 {
425 string query = string.Empty; 425 string query = string.Empty;
426 426
427 query += "INSERT INTO userpicks VALUES ("; 427 query += "INSERT INTO userpicks VALUES (";
428 query += "?PickId,"; 428 query += "?PickId,";
429 query += "?CreatorId,"; 429 query += "?CreatorId,";
@@ -449,7 +449,7 @@ namespace OpenSim.Data.MySQL
449 query += "pickuuid=?PickId,"; 449 query += "pickuuid=?PickId,";
450 query += "posglobal=?GlobalPos,"; 450 query += "posglobal=?GlobalPos,";
451 query += "gatekeeper=?Gatekeeper"; 451 query += "gatekeeper=?Gatekeeper";
452 452
453 try 453 try
454 { 454 {
455 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 455 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -471,7 +471,7 @@ namespace OpenSim.Data.MySQL
471 cmd.Parameters.AddWithValue("?Gatekeeper",pick.Gatekeeper); 471 cmd.Parameters.AddWithValue("?Gatekeeper",pick.Gatekeeper);
472 cmd.Parameters.AddWithValue("?SortOrder", pick.SortOrder.ToString ()); 472 cmd.Parameters.AddWithValue("?SortOrder", pick.SortOrder.ToString ());
473 cmd.Parameters.AddWithValue("?Enabled", pick.Enabled.ToString()); 473 cmd.Parameters.AddWithValue("?Enabled", pick.Enabled.ToString());
474 474
475 cmd.ExecuteNonQuery(); 475 cmd.ExecuteNonQuery();
476 } 476 }
477 } 477 }
@@ -484,24 +484,24 @@ namespace OpenSim.Data.MySQL
484 } 484 }
485 return true; 485 return true;
486 } 486 }
487 487
488 public bool DeletePicksRecord(UUID pickId) 488 public bool DeletePicksRecord(UUID pickId)
489 { 489 {
490 string query = string.Empty; 490 string query = string.Empty;
491 491
492 query += "DELETE FROM userpicks WHERE "; 492 query += "DELETE FROM userpicks WHERE ";
493 query += "pickuuid = ?PickId"; 493 query += "pickuuid = ?PickId";
494 494
495 try 495 try
496 { 496 {
497 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 497 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
498 { 498 {
499 dbcon.Open(); 499 dbcon.Open();
500 500
501 using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) 501 using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
502 { 502 {
503 cmd.Parameters.AddWithValue("?PickId", pickId.ToString()); 503 cmd.Parameters.AddWithValue("?PickId", pickId.ToString());
504 504
505 cmd.ExecuteNonQuery(); 505 cmd.ExecuteNonQuery();
506 } 506 }
507 } 507 }
@@ -515,12 +515,12 @@ namespace OpenSim.Data.MySQL
515 return true; 515 return true;
516 } 516 }
517 #endregion Picks Queries 517 #endregion Picks Queries
518 518
519 #region Avatar Notes Queries 519 #region Avatar Notes Queries
520 public bool GetAvatarNotes(ref UserProfileNotes notes) 520 public bool GetAvatarNotes(ref UserProfileNotes notes)
521 { // WIP 521 { // WIP
522 string query = string.Empty; 522 string query = string.Empty;
523 523
524 query += "SELECT `notes` FROM usernotes WHERE "; 524 query += "SELECT `notes` FROM usernotes WHERE ";
525 query += "useruuid = ?Id AND "; 525 query += "useruuid = ?Id AND ";
526 query += "targetuuid = ?TargetId"; 526 query += "targetuuid = ?TargetId";
@@ -534,7 +534,7 @@ namespace OpenSim.Data.MySQL
534 { 534 {
535 cmd.Parameters.AddWithValue("?Id", notes.UserId.ToString()); 535 cmd.Parameters.AddWithValue("?Id", notes.UserId.ToString());
536 cmd.Parameters.AddWithValue("?TargetId", notes.TargetId.ToString()); 536 cmd.Parameters.AddWithValue("?TargetId", notes.TargetId.ToString());
537 537
538 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 538 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
539 { 539 {
540 if(reader.HasRows) 540 if(reader.HasRows)
@@ -557,12 +557,12 @@ namespace OpenSim.Data.MySQL
557 } 557 }
558 return true; 558 return true;
559 } 559 }
560 560
561 public bool UpdateAvatarNotes(ref UserProfileNotes note, ref string result) 561 public bool UpdateAvatarNotes(ref UserProfileNotes note, ref string result)
562 { 562 {
563 string query = string.Empty; 563 string query = string.Empty;
564 bool remove; 564 bool remove;
565 565
566 if(string.IsNullOrEmpty(note.Notes)) 566 if(string.IsNullOrEmpty(note.Notes))
567 { 567 {
568 remove = true; 568 remove = true;
@@ -581,7 +581,7 @@ namespace OpenSim.Data.MySQL
581 query += "UPDATE "; 581 query += "UPDATE ";
582 query += "notes=?Notes"; 582 query += "notes=?Notes";
583 } 583 }
584 584
585 try 585 try
586 { 586 {
587 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 587 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -593,7 +593,7 @@ namespace OpenSim.Data.MySQL
593 cmd.Parameters.AddWithValue("?Notes", note.Notes); 593 cmd.Parameters.AddWithValue("?Notes", note.Notes);
594 cmd.Parameters.AddWithValue("?TargetId", note.TargetId.ToString ()); 594 cmd.Parameters.AddWithValue("?TargetId", note.TargetId.ToString ());
595 cmd.Parameters.AddWithValue("?UserId", note.UserId.ToString()); 595 cmd.Parameters.AddWithValue("?UserId", note.UserId.ToString());
596 596
597 cmd.ExecuteNonQuery(); 597 cmd.ExecuteNonQuery();
598 } 598 }
599 } 599 }
@@ -605,18 +605,18 @@ namespace OpenSim.Data.MySQL
605 return false; 605 return false;
606 } 606 }
607 return true; 607 return true;
608 608
609 } 609 }
610 #endregion Avatar Notes Queries 610 #endregion Avatar Notes Queries
611 611
612 #region Avatar Properties 612 #region Avatar Properties
613 public bool GetAvatarProperties(ref UserProfileProperties props, ref string result) 613 public bool GetAvatarProperties(ref UserProfileProperties props, ref string result)
614 { 614 {
615 string query = string.Empty; 615 string query = string.Empty;
616 616
617 query += "SELECT * FROM userprofile WHERE "; 617 query += "SELECT * FROM userprofile WHERE ";
618 query += "useruuid = ?Id"; 618 query += "useruuid = ?Id";
619 619
620 try 620 try
621 { 621 {
622 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 622 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -625,7 +625,7 @@ namespace OpenSim.Data.MySQL
625 using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) 625 using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
626 { 626 {
627 cmd.Parameters.AddWithValue("?Id", props.UserId.ToString()); 627 cmd.Parameters.AddWithValue("?Id", props.UserId.ToString());
628 628
629 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 629 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
630 { 630 {
631 if(reader.HasRows) 631 if(reader.HasRows)
@@ -649,7 +649,7 @@ namespace OpenSim.Data.MySQL
649 { 649 {
650 m_log.DebugFormat("[PROFILES_DATA]" + 650 m_log.DebugFormat("[PROFILES_DATA]" +
651 ": No data for {0}", props.UserId); 651 ": No data for {0}", props.UserId);
652 652
653 props.WebUrl = string.Empty; 653 props.WebUrl = string.Empty;
654 props.ImageId = UUID.Zero; 654 props.ImageId = UUID.Zero;
655 props.AboutText = string.Empty; 655 props.AboutText = string.Empty;
@@ -730,11 +730,11 @@ namespace OpenSim.Data.MySQL
730 } 730 }
731 return true; 731 return true;
732 } 732 }
733 733
734 public bool UpdateAvatarProperties(ref UserProfileProperties props, ref string result) 734 public bool UpdateAvatarProperties(ref UserProfileProperties props, ref string result)
735 { 735 {
736 string query = string.Empty; 736 string query = string.Empty;
737 737
738 query += "UPDATE userprofile SET "; 738 query += "UPDATE userprofile SET ";
739 query += "profileURL=?profileURL, "; 739 query += "profileURL=?profileURL, ";
740 query += "profileImage=?image, "; 740 query += "profileImage=?image, ";
@@ -742,7 +742,7 @@ namespace OpenSim.Data.MySQL
742 query += "profileFirstImage=?firstlifeimage,"; 742 query += "profileFirstImage=?firstlifeimage,";
743 query += "profileFirstText=?firstlifetext "; 743 query += "profileFirstText=?firstlifetext ";
744 query += "WHERE useruuid=?uuid"; 744 query += "WHERE useruuid=?uuid";
745 745
746 try 746 try
747 { 747 {
748 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 748 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -756,7 +756,7 @@ namespace OpenSim.Data.MySQL
756 cmd.Parameters.AddWithValue("?firstlifeimage", props.FirstLifeImageId.ToString()); 756 cmd.Parameters.AddWithValue("?firstlifeimage", props.FirstLifeImageId.ToString());
757 cmd.Parameters.AddWithValue("?firstlifetext", props.FirstLifeText); 757 cmd.Parameters.AddWithValue("?firstlifetext", props.FirstLifeText);
758 cmd.Parameters.AddWithValue("?uuid", props.UserId.ToString()); 758 cmd.Parameters.AddWithValue("?uuid", props.UserId.ToString());
759 759
760 cmd.ExecuteNonQuery(); 760 cmd.ExecuteNonQuery();
761 } 761 }
762 } 762 }
@@ -765,18 +765,18 @@ namespace OpenSim.Data.MySQL
765 { 765 {
766 m_log.ErrorFormat("[PROFILES_DATA]" + 766 m_log.ErrorFormat("[PROFILES_DATA]" +
767 ": AgentPropertiesUpdate exception {0}", e.Message); 767 ": AgentPropertiesUpdate exception {0}", e.Message);
768 768
769 return false; 769 return false;
770 } 770 }
771 return true; 771 return true;
772 } 772 }
773 #endregion Avatar Properties 773 #endregion Avatar Properties
774 774
775 #region Avatar Interests 775 #region Avatar Interests
776 public bool UpdateAvatarInterests(UserProfileProperties up, ref string result) 776 public bool UpdateAvatarInterests(UserProfileProperties up, ref string result)
777 { 777 {
778 string query = string.Empty; 778 string query = string.Empty;
779 779
780 query += "UPDATE userprofile SET "; 780 query += "UPDATE userprofile SET ";
781 query += "profileWantToMask=?WantMask, "; 781 query += "profileWantToMask=?WantMask, ";
782 query += "profileWantToText=?WantText,"; 782 query += "profileWantToText=?WantText,";
@@ -784,7 +784,7 @@ namespace OpenSim.Data.MySQL
784 query += "profileSkillsText=?SkillsText, "; 784 query += "profileSkillsText=?SkillsText, ";
785 query += "profileLanguages=?Languages "; 785 query += "profileLanguages=?Languages ";
786 query += "WHERE useruuid=?uuid"; 786 query += "WHERE useruuid=?uuid";
787 787
788 try 788 try
789 { 789 {
790 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 790 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -798,7 +798,7 @@ namespace OpenSim.Data.MySQL
798 cmd.Parameters.AddWithValue("?SkillsText", up.SkillsText); 798 cmd.Parameters.AddWithValue("?SkillsText", up.SkillsText);
799 cmd.Parameters.AddWithValue("?Languages", up.Language); 799 cmd.Parameters.AddWithValue("?Languages", up.Language);
800 cmd.Parameters.AddWithValue("?uuid", up.UserId.ToString()); 800 cmd.Parameters.AddWithValue("?uuid", up.UserId.ToString());
801 801
802 cmd.ExecuteNonQuery(); 802 cmd.ExecuteNonQuery();
803 } 803 }
804 } 804 }
@@ -820,8 +820,8 @@ namespace OpenSim.Data.MySQL
820 string query = "SELECT `snapshotuuid` FROM {0} WHERE `creatoruuid` = ?Id"; 820 string query = "SELECT `snapshotuuid` FROM {0} WHERE `creatoruuid` = ?Id";
821 821
822 // Get classified image assets 822 // Get classified image assets
823 823
824 824
825 try 825 try
826 { 826 {
827 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 827 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -831,7 +831,7 @@ namespace OpenSim.Data.MySQL
831 using (MySqlCommand cmd = new MySqlCommand(string.Format (query,"`classifieds`"), dbcon)) 831 using (MySqlCommand cmd = new MySqlCommand(string.Format (query,"`classifieds`"), dbcon))
832 { 832 {
833 cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); 833 cmd.Parameters.AddWithValue("?Id", avatarId.ToString());
834 834
835 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 835 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
836 { 836 {
837 if(reader.HasRows) 837 if(reader.HasRows)
@@ -850,7 +850,7 @@ namespace OpenSim.Data.MySQL
850 using (MySqlCommand cmd = new MySqlCommand(string.Format (query,"`userpicks`"), dbcon)) 850 using (MySqlCommand cmd = new MySqlCommand(string.Format (query,"`userpicks`"), dbcon))
851 { 851 {
852 cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); 852 cmd.Parameters.AddWithValue("?Id", avatarId.ToString());
853 853
854 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 854 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
855 { 855 {
856 if(reader.HasRows) 856 if(reader.HasRows)
@@ -862,7 +862,7 @@ namespace OpenSim.Data.MySQL
862 } 862 }
863 } 863 }
864 } 864 }
865 865
866 dbcon.Close(); 866 dbcon.Close();
867 dbcon.Open(); 867 dbcon.Open();
868 868
@@ -871,7 +871,7 @@ namespace OpenSim.Data.MySQL
871 using (MySqlCommand cmd = new MySqlCommand(string.Format (query,"`userpicks`"), dbcon)) 871 using (MySqlCommand cmd = new MySqlCommand(string.Format (query,"`userpicks`"), dbcon))
872 { 872 {
873 cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); 873 cmd.Parameters.AddWithValue("?Id", avatarId.ToString());
874 874
875 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 875 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
876 { 876 {
877 if(reader.HasRows) 877 if(reader.HasRows)
@@ -893,7 +893,7 @@ namespace OpenSim.Data.MySQL
893 } 893 }
894 return data; 894 return data;
895 } 895 }
896 896
897 #region User Preferences 897 #region User Preferences
898 public bool GetUserPreferences(ref UserPreferences pref, ref string result) 898 public bool GetUserPreferences(ref UserPreferences pref, ref string result)
899 { 899 {
@@ -987,16 +987,16 @@ namespace OpenSim.Data.MySQL
987 return true; 987 return true;
988 } 988 }
989 #endregion User Preferences 989 #endregion User Preferences
990 990
991 #region Integration 991 #region Integration
992 public bool GetUserAppData(ref UserAppData props, ref string result) 992 public bool GetUserAppData(ref UserAppData props, ref string result)
993 { 993 {
994 string query = string.Empty; 994 string query = string.Empty;
995 995
996 query += "SELECT * FROM `userdata` WHERE "; 996 query += "SELECT * FROM `userdata` WHERE ";
997 query += "UserId = ?Id AND "; 997 query += "UserId = ?Id AND ";
998 query += "TagId = ?TagId"; 998 query += "TagId = ?TagId";
999 999
1000 try 1000 try
1001 { 1001 {
1002 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 1002 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
@@ -1006,7 +1006,7 @@ namespace OpenSim.Data.MySQL
1006 { 1006 {
1007 cmd.Parameters.AddWithValue("?Id", props.UserId.ToString()); 1007 cmd.Parameters.AddWithValue("?Id", props.UserId.ToString());
1008 cmd.Parameters.AddWithValue ("?TagId", props.TagId.ToString()); 1008 cmd.Parameters.AddWithValue ("?TagId", props.TagId.ToString());
1009 1009
1010 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 1010 using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
1011 { 1011 {
1012 if(reader.HasRows) 1012 if(reader.HasRows)
@@ -1022,7 +1022,7 @@ namespace OpenSim.Data.MySQL
1022 query += "?TagId,"; 1022 query += "?TagId,";
1023 query += "?DataKey,"; 1023 query += "?DataKey,";
1024 query += "?DataVal) "; 1024 query += "?DataVal) ";
1025 1025
1026 using (MySqlCommand put = new MySqlCommand(query, dbcon)) 1026 using (MySqlCommand put = new MySqlCommand(query, dbcon))
1027 { 1027 {
1028 put.Parameters.AddWithValue("?UserId", props.UserId.ToString()); 1028 put.Parameters.AddWithValue("?UserId", props.UserId.ToString());
@@ -1048,16 +1048,16 @@ namespace OpenSim.Data.MySQL
1048 } 1048 }
1049 1049
1050 public bool SetUserAppData(UserAppData props, ref string result) 1050 public bool SetUserAppData(UserAppData props, ref string result)
1051 { 1051 {
1052 string query = string.Empty; 1052 string query = string.Empty;
1053 1053
1054 query += "UPDATE userdata SET "; 1054 query += "UPDATE userdata SET ";
1055 query += "TagId = ?TagId, "; 1055 query += "TagId = ?TagId, ";
1056 query += "DataKey = ?DataKey, "; 1056 query += "DataKey = ?DataKey, ";
1057 query += "DataVal = ?DataVal WHERE "; 1057 query += "DataVal = ?DataVal WHERE ";
1058 query += "UserId = ?UserId AND "; 1058 query += "UserId = ?UserId AND ";
1059 query += "TagId = ?TagId"; 1059 query += "TagId = ?TagId";
1060 1060
1061 try 1061 try
1062 { 1062 {
1063 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString)) 1063 using (MySqlConnection dbcon = new MySqlConnection(ConnectionString))
diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs
index ec2bcc6..2c6acde 100644
--- a/OpenSim/Data/MySQL/MySQLXAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs
@@ -209,7 +209,7 @@ namespace OpenSim.Data.MySQL
209 { 209 {
210 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME); 210 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME);
211 m_log.WarnFormat( 211 m_log.WarnFormat(
212 "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 212 "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
213 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 213 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
214 } 214 }
215 215
@@ -218,7 +218,7 @@ namespace OpenSim.Data.MySQL
218 { 218 {
219 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); 219 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
220 m_log.WarnFormat( 220 m_log.WarnFormat(
221 "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 221 "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
222 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 222 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
223 } 223 }
224 224
@@ -341,7 +341,7 @@ namespace OpenSim.Data.MySQL
341 catch (Exception) 341 catch (Exception)
342 { 342 {
343 m_log.ErrorFormat( 343 m_log.ErrorFormat(
344 "[XASSET MYSQL DB]: Failure updating access_time for asset {0} with name {1}", 344 "[XASSET MYSQL DB]: Failure updating access_time for asset {0} with name {1}",
345 assetMetadata.ID, assetMetadata.Name); 345 assetMetadata.ID, assetMetadata.Name);
346 } 346 }
347 } 347 }
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
index 9a0044e..4e41fec 100644
--- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Data.MySQL
80 80
81 return m_Items.Store(item); 81 return m_Items.Store(item);
82 } 82 }
83 83
84 public bool DeleteFolders(string field, string val) 84 public bool DeleteFolders(string field, string val)
85 { 85 {
86 return m_Folders.Delete(field, val); 86 return m_Folders.Delete(field, val);
@@ -220,12 +220,12 @@ namespace OpenSim.Data.MySQL
220 220
221 cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); 221 cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString());
222 cmd.Parameters.AddWithValue("?AssetID", assetID.ToString()); 222 cmd.Parameters.AddWithValue("?AssetID", assetID.ToString());
223 223
224 using (IDataReader reader = cmd.ExecuteReader()) 224 using (IDataReader reader = cmd.ExecuteReader())
225 { 225 {
226 226
227 int perms = 0; 227 int perms = 0;
228 228
229 if (reader.Read()) 229 if (reader.Read())
230 { 230 {
231 perms = Convert.ToInt32(reader["inventoryCurrentPermissions"]); 231 perms = Convert.ToInt32(reader["inventoryCurrentPermissions"]);
diff --git a/OpenSim/Data/Null/NullEstateData.cs b/OpenSim/Data/Null/NullEstateData.cs
index 57592f1..9f22896 100755
--- a/OpenSim/Data/Null/NullEstateData.cs
+++ b/OpenSim/Data/Null/NullEstateData.cs
@@ -102,19 +102,19 @@ namespace OpenSim.Data.Null
102 { 102 {
103 return new EstateSettings(); 103 return new EstateSettings();
104 } 104 }
105 105
106 public List<EstateSettings> LoadEstateSettingsAll() 106 public List<EstateSettings> LoadEstateSettingsAll()
107 { 107 {
108 List<EstateSettings> allEstateSettings = new List<EstateSettings>(); 108 List<EstateSettings> allEstateSettings = new List<EstateSettings>();
109 allEstateSettings.Add(GetEstate()); 109 allEstateSettings.Add(GetEstate());
110 return allEstateSettings; 110 return allEstateSettings;
111 } 111 }
112 112
113 public List<int> GetEstatesAll() 113 public List<int> GetEstatesAll()
114 { 114 {
115 List<int> result = new List<int>(); 115 List<int> result = new List<int>();
116 result.Add((int)GetEstate().EstateID); 116 result.Add((int)GetEstate().EstateID);
117 return result; 117 return result;
118 } 118 }
119 119
120 public List<int> GetEstates(string search) 120 public List<int> GetEstates(string search)
diff --git a/OpenSim/Data/Null/NullFriendsData.cs b/OpenSim/Data/Null/NullFriendsData.cs
index 473999f..dc9cd38 100644
--- a/OpenSim/Data/Null/NullFriendsData.cs
+++ b/OpenSim/Data/Null/NullFriendsData.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Data.Null
79 { 79 {
80 return fdata.PrincipalID == userID.ToString(); 80 return fdata.PrincipalID == userID.ToString();
81 }); 81 });
82 82
83 if (lst != null) 83 if (lst != null)
84 { 84 {
85 lst.ForEach(f => 85 lst.ForEach(f =>
@@ -87,14 +87,14 @@ namespace OpenSim.Data.Null
87 FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID); 87 FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID);
88 if (f2 != null) 88 if (f2 != null)
89 f.Data["TheirFlags"] = f2.Data["Flags"]; 89 f.Data["TheirFlags"] = f2.Data["Flags"];
90 90
91 // m_log.DebugFormat( 91 // m_log.DebugFormat(
92 // "[NULL FRIENDS DATA]: Got {0} {1} {2} for {3}", 92 // "[NULL FRIENDS DATA]: Got {0} {1} {2} for {3}",
93 // f.Friend, f.Data["Flags"], f2 != null ? f.Data["TheirFlags"] : "not found!", f.PrincipalID); 93 // f.Friend, f.Data["Flags"], f2 != null ? f.Data["TheirFlags"] : "not found!", f.PrincipalID);
94 }); 94 });
95 95
96 // m_log.DebugFormat("[NULL FRIENDS DATA]: Got {0} friends for {1}", lst.Count, userID); 96 // m_log.DebugFormat("[NULL FRIENDS DATA]: Got {0} friends for {1}", lst.Count, userID);
97 97
98 return lst.ToArray(); 98 return lst.ToArray();
99 } 99 }
100 } 100 }
@@ -134,7 +134,7 @@ namespace OpenSim.Data.Null
134 // m_log.DebugFormat( 134 // m_log.DebugFormat(
135 // "[NULL FRIENDS DATA]: Deleting friend {0} {1} for {2}", 135 // "[NULL FRIENDS DATA]: Deleting friend {0} {1} for {2}",
136 // friend.Friend, friend.Data["Flags"], friend.PrincipalID); 136 // friend.Friend, friend.Data["Flags"], friend.PrincipalID);
137 137
138 m_Data.Remove(friend); 138 m_Data.Remove(friend);
139 return true; 139 return true;
140 } 140 }
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs
index aff0b0b..8c442c9 100644
--- a/OpenSim/Data/Null/NullPresenceData.cs
+++ b/OpenSim/Data/Null/NullPresenceData.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Data.Null
39 public class NullPresenceData : IPresenceData 39 public class NullPresenceData : IPresenceData
40 { 40 {
41// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 41// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 42
43 public static NullPresenceData Instance; 43 public static NullPresenceData Instance;
44 44
45 Dictionary<UUID, PresenceData> m_presenceData = new Dictionary<UUID, PresenceData>(); 45 Dictionary<UUID, PresenceData> m_presenceData = new Dictionary<UUID, PresenceData>();
@@ -100,7 +100,7 @@ namespace OpenSim.Data.Null
100 { 100 {
101 if (Instance != this) 101 if (Instance != this)
102 return Instance.ReportAgent(sessionID, regionID); 102 return Instance.ReportAgent(sessionID, regionID);
103 103
104 if (m_presenceData.ContainsKey(sessionID)) 104 if (m_presenceData.ContainsKey(sessionID))
105 { 105 {
106 m_presenceData[sessionID].RegionID = regionID; 106 m_presenceData[sessionID].RegionID = regionID;
@@ -129,7 +129,7 @@ namespace OpenSim.Data.Null
129// Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found")); 129// Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found"));
130 } 130 }
131 } 131 }
132 132
133 return presences.ToArray(); 133 return presences.ToArray();
134 } 134 }
135 else if (field == "SessionID") 135 else if (field == "SessionID")
@@ -172,7 +172,7 @@ namespace OpenSim.Data.Null
172 { 172 {
173// m_log.DebugFormat( 173// m_log.DebugFormat(
174// "[NULL PRESENCE DATA]: Deleting presence data for field {0} with parameter {1}", field, data); 174// "[NULL PRESENCE DATA]: Deleting presence data for field {0} with parameter {1}", field, data);
175 175
176 if (Instance != this) 176 if (Instance != this)
177 return Instance.Delete(field, data); 177 return Instance.Delete(field, data);
178 178
diff --git a/OpenSim/Data/Null/NullUserAccountData.cs b/OpenSim/Data/Null/NullUserAccountData.cs
index 241616b..6d2e05a 100644
--- a/OpenSim/Data/Null/NullUserAccountData.cs
+++ b/OpenSim/Data/Null/NullUserAccountData.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null
40 public class NullUserAccountData : IUserAccountData 40 public class NullUserAccountData : IUserAccountData
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private Dictionary<UUID, UserAccountData> m_DataByUUID = new Dictionary<UUID, UserAccountData>(); 44 private Dictionary<UUID, UserAccountData> m_DataByUUID = new Dictionary<UUID, UserAccountData>();
45 private Dictionary<string, UserAccountData> m_DataByName = new Dictionary<string, UserAccountData>(); 45 private Dictionary<string, UserAccountData> m_DataByName = new Dictionary<string, UserAccountData>();
46 private Dictionary<string, UserAccountData> m_DataByEmail = new Dictionary<string, UserAccountData>(); 46 private Dictionary<string, UserAccountData> m_DataByEmail = new Dictionary<string, UserAccountData>();
@@ -48,7 +48,7 @@ namespace OpenSim.Data.Null
48 public NullUserAccountData(string connectionString, string realm) 48 public NullUserAccountData(string connectionString, string realm)
49 { 49 {
50// m_log.DebugFormat( 50// m_log.DebugFormat(
51// "[NULL USER ACCOUNT DATA]: Initializing new NullUserAccountData with connectionString [{0}], realm [{1}]", 51// "[NULL USER ACCOUNT DATA]: Initializing new NullUserAccountData with connectionString [{0}], realm [{1}]",
52// connectionString, realm); 52// connectionString, realm);
53 } 53 }
54 54
@@ -65,12 +65,12 @@ namespace OpenSim.Data.Null
65// if (m_log.IsDebugEnabled) 65// if (m_log.IsDebugEnabled)
66// { 66// {
67// m_log.DebugFormat( 67// m_log.DebugFormat(
68// "[NULL USER ACCOUNT DATA]: Called Get with fields [{0}], values [{1}]", 68// "[NULL USER ACCOUNT DATA]: Called Get with fields [{0}], values [{1}]",
69// string.Join(", ", fields), string.Join(", ", values)); 69// string.Join(", ", fields), string.Join(", ", values));
70// } 70// }
71 71
72 UserAccountData[] userAccounts = new UserAccountData[0]; 72 UserAccountData[] userAccounts = new UserAccountData[0];
73 73
74 List<string> fieldsLst = new List<string>(fields); 74 List<string> fieldsLst = new List<string>(fields);
75 if (fieldsLst.Contains("PrincipalID")) 75 if (fieldsLst.Contains("PrincipalID"))
76 { 76 {
@@ -79,33 +79,33 @@ namespace OpenSim.Data.Null
79 if (UUID.TryParse(values[i], out id)) 79 if (UUID.TryParse(values[i], out id))
80 if (m_DataByUUID.ContainsKey(id)) 80 if (m_DataByUUID.ContainsKey(id))
81 userAccounts = new UserAccountData[] { m_DataByUUID[id] }; 81 userAccounts = new UserAccountData[] { m_DataByUUID[id] };
82 } 82 }
83 else if (fieldsLst.Contains("FirstName") && fieldsLst.Contains("LastName")) 83 else if (fieldsLst.Contains("FirstName") && fieldsLst.Contains("LastName"))
84 { 84 {
85 int findex = fieldsLst.IndexOf("FirstName"); 85 int findex = fieldsLst.IndexOf("FirstName");
86 int lindex = fieldsLst.IndexOf("LastName"); 86 int lindex = fieldsLst.IndexOf("LastName");
87 if (m_DataByName.ContainsKey(values[findex] + " " + values[lindex])) 87 if (m_DataByName.ContainsKey(values[findex] + " " + values[lindex]))
88 { 88 {
89 userAccounts = new UserAccountData[] { m_DataByName[values[findex] + " " + values[lindex]] }; 89 userAccounts = new UserAccountData[] { m_DataByName[values[findex] + " " + values[lindex]] };
90 } 90 }
91 } 91 }
92 else if (fieldsLst.Contains("Email")) 92 else if (fieldsLst.Contains("Email"))
93 { 93 {
94 int i = fieldsLst.IndexOf("Email"); 94 int i = fieldsLst.IndexOf("Email");
95 if (m_DataByEmail.ContainsKey(values[i])) 95 if (m_DataByEmail.ContainsKey(values[i]))
96 userAccounts = new UserAccountData[] { m_DataByEmail[values[i]] }; 96 userAccounts = new UserAccountData[] { m_DataByEmail[values[i]] };
97 } 97 }
98 98
99// if (m_log.IsDebugEnabled) 99// if (m_log.IsDebugEnabled)
100// { 100// {
101// StringBuilder sb = new StringBuilder(); 101// StringBuilder sb = new StringBuilder();
102// foreach (UserAccountData uad in userAccounts) 102// foreach (UserAccountData uad in userAccounts)
103// sb.AppendFormat("({0} {1} {2}) ", uad.FirstName, uad.LastName, uad.PrincipalID); 103// sb.AppendFormat("({0} {1} {2}) ", uad.FirstName, uad.LastName, uad.PrincipalID);
104// 104//
105// m_log.DebugFormat( 105// m_log.DebugFormat(
106// "[NULL USER ACCOUNT DATA]: Returning {0} user accounts out of {1}: [{2}]", userAccounts.Length, m_DataByName.Count, sb); 106// "[NULL USER ACCOUNT DATA]: Returning {0} user accounts out of {1}: [{2}]", userAccounts.Length, m_DataByName.Count, sb);
107// } 107// }
108 108
109 return userAccounts; 109 return userAccounts;
110 } 110 }
111 111
@@ -113,16 +113,16 @@ namespace OpenSim.Data.Null
113 { 113 {
114 if (data == null) 114 if (data == null)
115 return false; 115 return false;
116 116
117 m_log.DebugFormat( 117 m_log.DebugFormat(
118 "[NULL USER ACCOUNT DATA]: Storing user account {0} {1} {2} {3}", 118 "[NULL USER ACCOUNT DATA]: Storing user account {0} {1} {2} {3}",
119 data.FirstName, data.LastName, data.PrincipalID, this.GetHashCode()); 119 data.FirstName, data.LastName, data.PrincipalID, this.GetHashCode());
120 120
121 m_DataByUUID[data.PrincipalID] = data; 121 m_DataByUUID[data.PrincipalID] = data;
122 m_DataByName[data.FirstName + " " + data.LastName] = data; 122 m_DataByName[data.FirstName + " " + data.LastName] = data;
123 if (data.Data.ContainsKey("Email") && data.Data["Email"] != null && data.Data["Email"] != string.Empty) 123 if (data.Data.ContainsKey("Email") && data.Data["Email"] != null && data.Data["Email"] != string.Empty)
124 m_DataByEmail[data.Data["Email"]] = data; 124 m_DataByEmail[data.Data["Email"]] = data;
125 125
126// m_log.DebugFormat("m_DataByUUID count is {0}, m_DataByName count is {1}", m_DataByUUID.Count, m_DataByName.Count); 126// m_log.DebugFormat("m_DataByUUID count is {0}, m_DataByName count is {1}", m_DataByUUID.Count, m_DataByName.Count);
127 127
128 return true; 128 return true;
@@ -132,7 +132,7 @@ namespace OpenSim.Data.Null
132 { 132 {
133// m_log.DebugFormat( 133// m_log.DebugFormat(
134// "[NULL USER ACCOUNT DATA]: Called GetUsers with scope [{0}], query [{1}]", scopeID, query); 134// "[NULL USER ACCOUNT DATA]: Called GetUsers with scope [{0}], query [{1}]", scopeID, query);
135 135
136 string[] words = query.Split(new char[] { ' ' }); 136 string[] words = query.Split(new char[] { ' ' });
137 137
138 for (int i = 0; i < words.Length; i++) 138 for (int i = 0; i < words.Length; i++)
diff --git a/OpenSim/Data/PGSQL/PGSQLAssetData.cs b/OpenSim/Data/PGSQL/PGSQLAssetData.cs
index 81adb03..7b79521 100644
--- a/OpenSim/Data/PGSQL/PGSQLAssetData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLAssetData.cs
@@ -151,35 +151,35 @@ namespace OpenSim.Data.PGSQL
151 /// <param name="asset">the asset</param> 151 /// <param name="asset">the asset</param>
152 override public bool StoreAsset(AssetBase asset) 152 override public bool StoreAsset(AssetBase asset)
153 { 153 {
154 154
155 string sql = 155 string sql =
156 @"UPDATE assets set name = :name, description = :description, " + "\"assetType\" " + @" = :assetType, 156 @"UPDATE assets set name = :name, description = :description, " + "\"assetType\" " + @" = :assetType,
157 local = :local, temporary = :temporary, creatorid = :creatorid, data = :data 157 local = :local, temporary = :temporary, creatorid = :creatorid, data = :data
158 WHERE id=:id; 158 WHERE id=:id;
159 159
160 INSERT INTO assets 160 INSERT INTO assets
161 (id, name, description, " + "\"assetType\" " + @", local, 161 (id, name, description, " + "\"assetType\" " + @", local,
162 temporary, create_time, access_time, creatorid, asset_flags, data) 162 temporary, create_time, access_time, creatorid, asset_flags, data)
163 Select :id, :name, :description, :assetType, :local, 163 Select :id, :name, :description, :assetType, :local,
164 :temporary, :create_time, :access_time, :creatorid, :asset_flags, :data 164 :temporary, :create_time, :access_time, :creatorid, :asset_flags, :data
165 Where not EXISTS(SELECT * FROM assets WHERE id=:id) 165 Where not EXISTS(SELECT * FROM assets WHERE id=:id)
166 "; 166 ";
167 167
168 string assetName = asset.Name; 168 string assetName = asset.Name;
169 if (asset.Name.Length > AssetBase.MAX_ASSET_NAME) 169 if (asset.Name.Length > AssetBase.MAX_ASSET_NAME)
170 { 170 {
171 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME); 171 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME);
172 m_log.WarnFormat( 172 m_log.WarnFormat(
173 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 173 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
174 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 174 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
175 } 175 }
176 176
177 string assetDescription = asset.Description; 177 string assetDescription = asset.Description;
178 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC) 178 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
179 { 179 {
180 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); 180 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
181 m_log.WarnFormat( 181 m_log.WarnFormat(
182 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 182 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
183 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 183 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
184 } 184 }
185 185
@@ -278,7 +278,7 @@ namespace OpenSim.Data.PGSQL
278 { 278 {
279 List<AssetMetadata> retList = new List<AssetMetadata>(count); 279 List<AssetMetadata> retList = new List<AssetMetadata>(count);
280 string sql = @" SELECT id, name, description, " + "\"assetType\"" + @", temporary, creatorid 280 string sql = @" SELECT id, name, description, " + "\"assetType\"" + @", temporary, creatorid
281 FROM assets 281 FROM assets
282 order by id 282 order by id
283 limit :stop 283 limit :stop
284 offset :start;"; 284 offset :start;";
diff --git a/OpenSim/Data/PGSQL/PGSQLAuthenticationData.cs b/OpenSim/Data/PGSQL/PGSQLAuthenticationData.cs
index d174112..8f83309 100644
--- a/OpenSim/Data/PGSQL/PGSQLAuthenticationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLAuthenticationData.cs
@@ -145,7 +145,7 @@ namespace OpenSim.Data.PGSQL
145 updateBuilder.AppendFormat("\"{0}\" = :{0}",field); 145 updateBuilder.AppendFormat("\"{0}\" = :{0}",field);
146 146
147 first = false; 147 first = false;
148 148
149 cmd.Parameters.Add(m_database.CreateParameter("" + field, data.Data[field])); 149 cmd.Parameters.Add(m_database.CreateParameter("" + field, data.Data[field]));
150 } 150 }
151 151
@@ -154,7 +154,7 @@ namespace OpenSim.Data.PGSQL
154 cmd.CommandText = updateBuilder.ToString(); 154 cmd.CommandText = updateBuilder.ToString();
155 cmd.Connection = conn; 155 cmd.Connection = conn;
156 cmd.Parameters.Add(m_database.CreateParameter("principalID", data.PrincipalID)); 156 cmd.Parameters.Add(m_database.CreateParameter("principalID", data.PrincipalID));
157 157
158 conn.Open(); 158 conn.Open();
159 if (cmd.ExecuteNonQuery() < 1) 159 if (cmd.ExecuteNonQuery() < 1)
160 { 160 {
@@ -195,7 +195,7 @@ namespace OpenSim.Data.PGSQL
195 { 195 {
196 if (System.Environment.TickCount - m_LastExpire > 30000) 196 if (System.Environment.TickCount - m_LastExpire > 30000)
197 DoExpire(); 197 DoExpire();
198 198
199 string sql = "insert into tokens (uuid, token, validity) values (:principalID, :token, :lifetime)"; 199 string sql = "insert into tokens (uuid, token, validity) values (:principalID, :token, :lifetime)";
200 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) 200 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
201 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 201 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
diff --git a/OpenSim/Data/PGSQL/PGSQLAvatarData.cs b/OpenSim/Data/PGSQL/PGSQLAvatarData.cs
index d9c4905..3d56d4d 100644
--- a/OpenSim/Data/PGSQL/PGSQLAvatarData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLAvatarData.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Data.PGSQL
45 IAvatarData 45 IAvatarData
46 { 46 {
47// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 public PGSQLAvatarData(string connectionString, string realm) : 49 public PGSQLAvatarData(string connectionString, string realm) :
50 base(connectionString, realm, "Avatar") 50 base(connectionString, realm, "Avatar")
51 { 51 {
diff --git a/OpenSim/Data/PGSQL/PGSQLEstateData.cs b/OpenSim/Data/PGSQL/PGSQLEstateData.cs
index b5ca235..9489d6c 100644
--- a/OpenSim/Data/PGSQL/PGSQLEstateData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLEstateData.cs
@@ -594,7 +594,7 @@ namespace OpenSim.Data.PGSQL
594 594
595 public bool DeleteEstate(int estateID) 595 public bool DeleteEstate(int estateID)
596 { 596 {
597 // TODO: Implementation! 597 // TODO: Implementation!
598 return false; 598 return false;
599 } 599 }
600 #endregion 600 #endregion
diff --git a/OpenSim/Data/PGSQL/PGSQLFriendsData.cs b/OpenSim/Data/PGSQL/PGSQLFriendsData.cs
index a841353..58dffed 100644
--- a/OpenSim/Data/PGSQL/PGSQLFriendsData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLFriendsData.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Data.PGSQL
50 } 50 }
51 } 51 }
52 52
53 53
54 public override bool Delete(string principalID, string friend) 54 public override bool Delete(string principalID, string friend)
55 { 55 {
56 UUID princUUID = UUID.Zero; 56 UUID princUUID = UUID.Zero;
@@ -97,7 +97,7 @@ namespace OpenSim.Data.PGSQL
97 using (NpgsqlCommand cmd = new NpgsqlCommand()) 97 using (NpgsqlCommand cmd = new NpgsqlCommand())
98 { 98 {
99 99
100 cmd.CommandText = String.Format("select a.*,case when b.\"Flags\" is null then '-1' else b.\"Flags\" end as \"TheirFlags\" from {0} as a " + 100 cmd.CommandText = String.Format("select a.*,case when b.\"Flags\" is null then '-1' else b.\"Flags\" end as \"TheirFlags\" from {0} as a " +
101 " left join {0} as b on a.\"PrincipalID\" = b.\"Friend\" and a.\"Friend\" = b.\"PrincipalID\" " + 101 " left join {0} as b on a.\"PrincipalID\" = b.\"Friend\" and a.\"Friend\" = b.\"PrincipalID\" " +
102 " where a.\"PrincipalID\" = :PrincipalID", m_Realm); 102 " where a.\"PrincipalID\" = :PrincipalID", m_Realm);
103 cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID.ToString())); 103 cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID.ToString()));
@@ -111,6 +111,6 @@ namespace OpenSim.Data.PGSQL
111 { 111 {
112 return GetFriends(principalID); 112 return GetFriends(principalID);
113 } 113 }
114 114
115 } 115 }
116} 116}
diff --git a/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs b/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
index 061de22..5b24720 100644
--- a/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
+++ b/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Data.PGSQL
64 : base(connectionString) 64 : base(connectionString)
65 { 65 {
66 m_Realm = realm; 66 m_Realm = realm;
67 67
68 m_ConnectionString = connectionString; 68 m_ConnectionString = connectionString;
69 69
70 if (storeName != String.Empty) 70 if (storeName != String.Empty)
@@ -104,7 +104,7 @@ namespace OpenSim.Data.PGSQL
104 m_FieldTypes = new Dictionary<string, string>(); 104 m_FieldTypes = new Dictionary<string, string>();
105 105
106 string query = string.Format(@"select column_name,data_type 106 string query = string.Format(@"select column_name,data_type
107 from INFORMATION_SCHEMA.COLUMNS 107 from INFORMATION_SCHEMA.COLUMNS
108 where table_name = lower('{0}'); 108 where table_name = lower('{0}');
109 109
110 ", m_Realm); 110 ", m_Realm);
@@ -232,7 +232,7 @@ namespace OpenSim.Data.PGSQL
232 if (reader == null) 232 if (reader == null)
233 return new T[0]; 233 return new T[0];
234 234
235 CheckColumnNames(reader); 235 CheckColumnNames(reader);
236 236
237 while (reader.Read()) 237 while (reader.Read())
238 { 238 {
@@ -339,7 +339,7 @@ namespace OpenSim.Data.PGSQL
339 names.Add(fi.Name); 339 names.Add(fi.Name);
340 values.Add(":" + fi.Name); 340 values.Add(":" + fi.Name);
341 // Temporarily return more information about what field is unexpectedly null for 341 // Temporarily return more information about what field is unexpectedly null for
342 // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the 342 // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the
343 // InventoryTransferModule or we may be required to substitute a DBNull here. 343 // InventoryTransferModule or we may be required to substitute a DBNull here.
344 if (fi.GetValue(row) == null) 344 if (fi.GetValue(row) == null)
345 throw new NullReferenceException( 345 throw new NullReferenceException(
@@ -395,11 +395,11 @@ namespace OpenSim.Data.PGSQL
395 } 395 }
396 string where = String.Join(" AND ", terms.ToArray()); 396 string where = String.Join(" AND ", terms.ToArray());
397 query.AppendFormat(" WHERE {0} ", where); 397 query.AppendFormat(" WHERE {0} ", where);
398 398
399 } 399 }
400 cmd.Connection = conn; 400 cmd.Connection = conn;
401 cmd.CommandText = query.ToString(); 401 cmd.CommandText = query.ToString();
402 402
403 conn.Open(); 403 conn.Open();
404 if (cmd.ExecuteNonQuery() > 0) 404 if (cmd.ExecuteNonQuery() > 0)
405 { 405 {
@@ -416,7 +416,7 @@ namespace OpenSim.Data.PGSQL
416 query.Append("\") values (" + String.Join(",", values.ToArray()) + ")"); 416 query.Append("\") values (" + String.Join(",", values.ToArray()) + ")");
417 cmd.Connection = conn; 417 cmd.Connection = conn;
418 cmd.CommandText = query.ToString(); 418 cmd.CommandText = query.ToString();
419 419
420 // m_log.WarnFormat("[PGSQLGenericTable]: Inserting into {0} sql {1}", m_Realm, cmd.CommandText); 420 // m_log.WarnFormat("[PGSQLGenericTable]: Inserting into {0} sql {1}", m_Realm, cmd.CommandText);
421 421
422 if (conn.State != ConnectionState.Open) 422 if (conn.State != ConnectionState.Open)
diff --git a/OpenSim/Data/PGSQL/PGSQLGroupsData.cs b/OpenSim/Data/PGSQL/PGSQLGroupsData.cs
index e257e7c..6ef576b 100755
--- a/OpenSim/Data/PGSQL/PGSQLGroupsData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLGroupsData.cs
@@ -37,7 +37,7 @@ using Npgsql;
37namespace OpenSim.Data.PGSQL 37namespace OpenSim.Data.PGSQL
38{ 38{
39 public class PGSQLGroupsData : IGroupsData 39 public class PGSQLGroupsData : IGroupsData
40 { 40 {
41 private PGSqlGroupsGroupsHandler m_Groups; 41 private PGSqlGroupsGroupsHandler m_Groups;
42 private PGSqlGroupsMembershipHandler m_Membership; 42 private PGSqlGroupsMembershipHandler m_Membership;
43 private PGSqlGroupsRolesHandler m_Roles; 43 private PGSqlGroupsRolesHandler m_Roles;
@@ -83,17 +83,17 @@ namespace OpenSim.Data.PGSQL
83 83
84 public GroupData[] RetrieveGroups(string pattern) 84 public GroupData[] RetrieveGroups(string pattern)
85 { 85 {
86 86
87 if (string.IsNullOrEmpty(pattern)) // True for where clause 87 if (string.IsNullOrEmpty(pattern)) // True for where clause
88 { 88 {
89 pattern = " 1 ORDER BY lower(\"Name\") LIMIT 100"; 89 pattern = " 1 ORDER BY lower(\"Name\") LIMIT 100";
90 90
91 return m_Groups.Get(pattern); 91 return m_Groups.Get(pattern);
92 } 92 }
93 else 93 else
94 { 94 {
95 pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%') ORDER BY lower(\"Name\") LIMIT 100"; 95 pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%') ORDER BY lower(\"Name\") LIMIT 100";
96 96
97 return m_Groups.Get(pattern, new NpgsqlParameter("pattern", pattern)); 97 return m_Groups.Get(pattern, new NpgsqlParameter("pattern", pattern));
98 } 98 }
99 } 99 }
@@ -138,10 +138,10 @@ namespace OpenSim.Data.PGSQL
138 138
139 public bool DeleteMember(UUID groupID, string pricipalID) 139 public bool DeleteMember(UUID groupID, string pricipalID)
140 { 140 {
141 return m_Membership.Delete(new string[] { "GroupID", "PrincipalID" }, 141 return m_Membership.Delete(new string[] { "GroupID", "PrincipalID" },
142 new string[] { groupID.ToString(), pricipalID }); 142 new string[] { groupID.ToString(), pricipalID });
143 } 143 }
144 144
145 public int MemberCount(UUID groupID) 145 public int MemberCount(UUID groupID)
146 { 146 {
147 return (int)m_Membership.GetCount("GroupID", groupID.ToString()); 147 return (int)m_Membership.GetCount("GroupID", groupID.ToString());
@@ -173,7 +173,7 @@ namespace OpenSim.Data.PGSQL
173 173
174 public bool DeleteRole(UUID groupID, UUID roleID) 174 public bool DeleteRole(UUID groupID, UUID roleID)
175 { 175 {
176 return m_Roles.Delete(new string[] { "GroupID", "RoleID" }, 176 return m_Roles.Delete(new string[] { "GroupID", "RoleID" },
177 new string[] { groupID.ToString(), roleID.ToString() }); 177 new string[] { groupID.ToString(), roleID.ToString() });
178 } 178 }
179 179
@@ -365,7 +365,7 @@ namespace OpenSim.Data.PGSQL
365 get { return GetType().Assembly; } 365 get { return GetType().Assembly; }
366 } 366 }
367 367
368 public PGSqlGroupsGroupsHandler(string connectionString, string realm, string store) 368 public PGSqlGroupsGroupsHandler(string connectionString, string realm, string store)
369 : base(connectionString, realm, store) 369 : base(connectionString, realm, store)
370 { 370 {
371 } 371 }
@@ -380,7 +380,7 @@ namespace OpenSim.Data.PGSQL
380 get { return GetType().Assembly; } 380 get { return GetType().Assembly; }
381 } 381 }
382 382
383 public PGSqlGroupsMembershipHandler(string connectionString, string realm) 383 public PGSqlGroupsMembershipHandler(string connectionString, string realm)
384 : base(connectionString, realm, string.Empty) 384 : base(connectionString, realm, string.Empty)
385 { 385 {
386 } 386 }
@@ -395,7 +395,7 @@ namespace OpenSim.Data.PGSQL
395 get { return GetType().Assembly; } 395 get { return GetType().Assembly; }
396 } 396 }
397 397
398 public PGSqlGroupsRolesHandler(string connectionString, string realm) 398 public PGSqlGroupsRolesHandler(string connectionString, string realm)
399 : base(connectionString, realm, string.Empty) 399 : base(connectionString, realm, string.Empty)
400 { 400 {
401 } 401 }
@@ -410,7 +410,7 @@ namespace OpenSim.Data.PGSQL
410 get { return GetType().Assembly; } 410 get { return GetType().Assembly; }
411 } 411 }
412 412
413 public PGSqlGroupsRoleMembershipHandler(string connectionString, string realm) 413 public PGSqlGroupsRoleMembershipHandler(string connectionString, string realm)
414 : base(connectionString, realm, string.Empty) 414 : base(connectionString, realm, string.Empty)
415 { 415 {
416 } 416 }
@@ -425,7 +425,7 @@ namespace OpenSim.Data.PGSQL
425 get { return GetType().Assembly; } 425 get { return GetType().Assembly; }
426 } 426 }
427 427
428 public PGSqlGroupsInvitesHandler(string connectionString, string realm) 428 public PGSqlGroupsInvitesHandler(string connectionString, string realm)
429 : base(connectionString, realm, string.Empty) 429 : base(connectionString, realm, string.Empty)
430 { 430 {
431 } 431 }
@@ -436,7 +436,7 @@ namespace OpenSim.Data.PGSQL
436 using (NpgsqlCommand cmd = new NpgsqlCommand()) 436 using (NpgsqlCommand cmd = new NpgsqlCommand())
437 { 437 {
438 cmd.CommandText = String.Format("delete from {0} where \"TMStamp\" < CURRENT_DATE - INTERVAL '2 week'", m_Realm); 438 cmd.CommandText = String.Format("delete from {0} where \"TMStamp\" < CURRENT_DATE - INTERVAL '2 week'", m_Realm);
439 439
440 ExecuteNonQuery(cmd); 440 ExecuteNonQuery(cmd);
441 } 441 }
442 442
@@ -451,7 +451,7 @@ namespace OpenSim.Data.PGSQL
451 get { return GetType().Assembly; } 451 get { return GetType().Assembly; }
452 } 452 }
453 453
454 public PGSqlGroupsNoticesHandler(string connectionString, string realm) 454 public PGSqlGroupsNoticesHandler(string connectionString, string realm)
455 : base(connectionString, realm, string.Empty) 455 : base(connectionString, realm, string.Empty)
456 { 456 {
457 } 457 }
@@ -462,7 +462,7 @@ namespace OpenSim.Data.PGSQL
462 using (NpgsqlCommand cmd = new NpgsqlCommand()) 462 using (NpgsqlCommand cmd = new NpgsqlCommand())
463 { 463 {
464 cmd.CommandText = String.Format("delete from {0} where \"TMStamp\" < CURRENT_DATE - INTERVAL '2 week'", m_Realm); 464 cmd.CommandText = String.Format("delete from {0} where \"TMStamp\" < CURRENT_DATE - INTERVAL '2 week'", m_Realm);
465 465
466 ExecuteNonQuery(cmd); 466 ExecuteNonQuery(cmd);
467 } 467 }
468 468
@@ -477,7 +477,7 @@ namespace OpenSim.Data.PGSQL
477 get { return GetType().Assembly; } 477 get { return GetType().Assembly; }
478 } 478 }
479 479
480 public PGSqlGroupsPrincipalsHandler(string connectionString, string realm) 480 public PGSqlGroupsPrincipalsHandler(string connectionString, string realm)
481 : base(connectionString, realm, string.Empty) 481 : base(connectionString, realm, string.Empty)
482 { 482 {
483 } 483 }
diff --git a/OpenSim/Data/PGSQL/PGSQLInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLInventoryData.cs
index c999433..30fc5ea 100644
--- a/OpenSim/Data/PGSQL/PGSQLInventoryData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLInventoryData.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Data.PGSQL
69 { 69 {
70 m_connectionString = connectionString; 70 m_connectionString = connectionString;
71 database = new PGSQLManager(connectionString); 71 database = new PGSQLManager(connectionString);
72 72
73 //New migrations check of store 73 //New migrations check of store
74 database.CheckMigration(_migrationStore); 74 database.CheckMigration(_migrationStore);
75 } 75 }
@@ -190,8 +190,8 @@ namespace OpenSim.Data.PGSQL
190 /* NOTE: the implementation below is very inefficient (makes a separate request to get subfolders for 190 /* NOTE: the implementation below is very inefficient (makes a separate request to get subfolders for
191 * every found folder, recursively). Inventory code for other DBs has been already rewritten to get ALL 191 * every found folder, recursively). Inventory code for other DBs has been already rewritten to get ALL
192 * inventory for a specific user at once. 192 * inventory for a specific user at once.
193 * 193 *
194 * Meanwhile, one little thing is corrected: getFolderHierarchy(UUID.Zero) doesn't make sense and should never 194 * Meanwhile, one little thing is corrected: getFolderHierarchy(UUID.Zero) doesn't make sense and should never
195 * be used, so check for that and return an empty list. 195 * be used, so check for that and return an empty list.
196 */ 196 */
197 197
@@ -264,11 +264,11 @@ namespace OpenSim.Data.PGSQL
264 /// <param name="folder">Folder to update</param> 264 /// <param name="folder">Folder to update</param>
265 public void updateInventoryFolder(InventoryFolderBase folder) 265 public void updateInventoryFolder(InventoryFolderBase folder)
266 { 266 {
267 string sql = @"UPDATE inventoryfolders SET ""agentID"" = :agentID, 267 string sql = @"UPDATE inventoryfolders SET ""agentID"" = :agentID,
268 ""parentFolderID"" = :parentFolderID, 268 ""parentFolderID"" = :parentFolderID,
269 ""folderName"" = :folderName, 269 ""folderName"" = :folderName,
270 type = :type, 270 type = :type,
271 version = :version 271 version = :version
272 WHERE folderID = :folderID"; 272 WHERE folderID = :folderID";
273 273
274 string folderName = folder.Name; 274 string folderName = folder.Name;
@@ -337,7 +337,7 @@ namespace OpenSim.Data.PGSQL
337 cmd.Parameters.Add(database.CreateParameter("parentID", UUID.Zero)); 337 cmd.Parameters.Add(database.CreateParameter("parentID", UUID.Zero));
338 conn.Open(); 338 conn.Open();
339 subFolders = getFolderHierarchy(folderID, cmd); 339 subFolders = getFolderHierarchy(folderID, cmd);
340 340
341 341
342 //Delete all sub-folders 342 //Delete all sub-folders
343 foreach (InventoryFolderBase f in subFolders) 343 foreach (InventoryFolderBase f in subFolders)
@@ -403,7 +403,7 @@ namespace OpenSim.Data.PGSQL
403 } 403 }
404 } 404 }
405 } 405 }
406 406
407 m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID); 407 m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID);
408 return null; 408 return null;
409 } 409 }
@@ -420,24 +420,24 @@ namespace OpenSim.Data.PGSQL
420 return; 420 return;
421 } 421 }
422 422
423 string sql = @"INSERT INTO inventoryitems 423 string sql = @"INSERT INTO inventoryitems
424 (""inventoryID"", ""assetID"", ""assetType"", ""parentFolderID"", ""avatarID"", ""inventoryName"", 424 (""inventoryID"", ""assetID"", ""assetType"", ""parentFolderID"", ""avatarID"", ""inventoryName"",
425 ""inventoryDescription"", ""inventoryNextPermissions"", ""inventoryCurrentPermissions"", 425 ""inventoryDescription"", ""inventoryNextPermissions"", ""inventoryCurrentPermissions"",
426 ""invType"", ""creatorID"", ""inventoryBasePermissions"", ""inventoryEveryOnePermissions"", ""inventoryGroupPermissions"", 426 ""invType"", ""creatorID"", ""inventoryBasePermissions"", ""inventoryEveryOnePermissions"", ""inventoryGroupPermissions"",
427 ""salePrice"", ""SaleType"", ""creationDate"", ""groupID"", ""groupOwned"", flags) 427 ""salePrice"", ""SaleType"", ""creationDate"", ""groupID"", ""groupOwned"", flags)
428 VALUES 428 VALUES
429 (:inventoryID, :assetID, :assetType, :parentFolderID, :avatarID, :inventoryName, :inventoryDescription, 429 (:inventoryID, :assetID, :assetType, :parentFolderID, :avatarID, :inventoryName, :inventoryDescription,
430 :inventoryNextPermissions, :inventoryCurrentPermissions, :invType, :creatorID, 430 :inventoryNextPermissions, :inventoryCurrentPermissions, :invType, :creatorID,
431 :inventoryBasePermissions, :inventoryEveryOnePermissions, :inventoryGroupPermissions, :SalePrice, :SaleType, 431 :inventoryBasePermissions, :inventoryEveryOnePermissions, :inventoryGroupPermissions, :SalePrice, :SaleType,
432 :creationDate, :groupID, :groupOwned, :flags)"; 432 :creationDate, :groupID, :groupOwned, :flags)";
433 433
434 string itemName = item.Name; 434 string itemName = item.Name;
435 if (item.Name.Length > 64) 435 if (item.Name.Length > 64)
436 { 436 {
437 itemName = item.Name.Substring(0, 64); 437 itemName = item.Name.Substring(0, 64);
438 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters"); 438 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters");
439 } 439 }
440 440
441 string itemDesc = item.Description; 441 string itemDesc = item.Description;
442 if (item.Description.Length > 128) 442 if (item.Description.Length > 128)
443 { 443 {
@@ -502,25 +502,25 @@ namespace OpenSim.Data.PGSQL
502 /// <param name="item">Inventory item to update</param> 502 /// <param name="item">Inventory item to update</param>
503 public void updateInventoryItem(InventoryItemBase item) 503 public void updateInventoryItem(InventoryItemBase item)
504 { 504 {
505 string sql = @"UPDATE inventoryitems SET ""assetID"" = :assetID, 505 string sql = @"UPDATE inventoryitems SET ""assetID"" = :assetID,
506 ""assetType"" = :assetType, 506 ""assetType"" = :assetType,
507 ""parentFolderID"" = :parentFolderID, 507 ""parentFolderID"" = :parentFolderID,
508 ""avatarID"" = :avatarID, 508 ""avatarID"" = :avatarID,
509 ""inventoryName"" = :inventoryName, 509 ""inventoryName"" = :inventoryName,
510 ""inventoryDescription"" = :inventoryDescription, 510 ""inventoryDescription"" = :inventoryDescription,
511 ""inventoryNextPermissions"" = :inventoryNextPermissions, 511 ""inventoryNextPermissions"" = :inventoryNextPermissions,
512 ""inventoryCurrentPermissions"" = :inventoryCurrentPermissions, 512 ""inventoryCurrentPermissions"" = :inventoryCurrentPermissions,
513 ""invType"" = :invType, 513 ""invType"" = :invType,
514 ""creatorID"" = :creatorID, 514 ""creatorID"" = :creatorID,
515 ""inventoryBasePermissions"" = :inventoryBasePermissions, 515 ""inventoryBasePermissions"" = :inventoryBasePermissions,
516 ""inventoryEveryOnePermissions"" = :inventoryEveryOnePermissions, 516 ""inventoryEveryOnePermissions"" = :inventoryEveryOnePermissions,
517 ""inventoryGroupPermissions"" = :inventoryGroupPermissions, 517 ""inventoryGroupPermissions"" = :inventoryGroupPermissions,
518 ""salePrice"" = :SalePrice, 518 ""salePrice"" = :SalePrice,
519 ""saleType"" = :SaleType, 519 ""saleType"" = :SaleType,
520 ""creationDate"" = :creationDate, 520 ""creationDate"" = :creationDate,
521 ""groupID"" = :groupID, 521 ""groupID"" = :groupID,
522 ""groupOwned"" = :groupOwned, 522 ""groupOwned"" = :groupOwned,
523 flags = :flags 523 flags = :flags
524 WHERE ""inventoryID"" = :inventoryID"; 524 WHERE ""inventoryID"" = :inventoryID";
525 525
526 string itemName = item.Name; 526 string itemName = item.Name;
@@ -529,7 +529,7 @@ namespace OpenSim.Data.PGSQL
529 itemName = item.Name.Substring(0, 64); 529 itemName = item.Name.Substring(0, 64);
530 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters on update"); 530 m_log.Warn("[INVENTORY DB]: Name field truncated from " + item.Name.Length.ToString() + " to " + itemName.Length.ToString() + " characters on update");
531 } 531 }
532 532
533 string itemDesc = item.Description; 533 string itemDesc = item.Description;
534 if (item.Description.Length > 128) 534 if (item.Description.Length > 128)
535 { 535 {
diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs
index af5a7cd..276a37c 100644
--- a/OpenSim/Data/PGSQL/PGSQLManager.cs
+++ b/OpenSim/Data/PGSQL/PGSQLManager.cs
@@ -326,7 +326,7 @@ namespace OpenSim.Data.PGSQL
326 /// <param name="migrationStore">migrationStore.</param> 326 /// <param name="migrationStore">migrationStore.</param>
327 public void CheckMigration(string migrationStore) 327 public void CheckMigration(string migrationStore)
328 { 328 {
329 using (NpgsqlConnection connection = new NpgsqlConnection(connectionString)) 329 using (NpgsqlConnection connection = new NpgsqlConnection(connectionString))
330 { 330 {
331 connection.Open(); 331 connection.Open();
332 Assembly assem = GetType().Assembly; 332 Assembly assem = GetType().Assembly;
diff --git a/OpenSim/Data/PGSQL/PGSQLMigration.cs b/OpenSim/Data/PGSQL/PGSQLMigration.cs
index 709fde0..749a3f2 100644
--- a/OpenSim/Data/PGSQL/PGSQLMigration.cs
+++ b/OpenSim/Data/PGSQL/PGSQLMigration.cs
@@ -54,8 +54,8 @@ namespace OpenSim.Data.PGSQL
54 { 54 {
55 try 55 try
56 { 56 {
57 cmd.CommandText = "select version from migrations where name = '" + type + "' " + 57 cmd.CommandText = "select version from migrations where name = '" + type + "' " +
58 " order by version desc limit 1"; //Must be 58 " order by version desc limit 1"; //Must be
59 using (NpgsqlDataReader reader = cmd.ExecuteReader()) 59 using (NpgsqlDataReader reader = cmd.ExecuteReader())
60 { 60 {
61 if (reader.Read()) 61 if (reader.Read())
diff --git a/OpenSim/Data/PGSQL/PGSQLOfflineIMData.cs b/OpenSim/Data/PGSQL/PGSQLOfflineIMData.cs
index 82e5ed8..a0c3542 100644
--- a/OpenSim/Data/PGSQL/PGSQLOfflineIMData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLOfflineIMData.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Data.PGSQL
47 using (NpgsqlCommand cmd = new NpgsqlCommand()) 47 using (NpgsqlCommand cmd = new NpgsqlCommand())
48 { 48 {
49 cmd.CommandText = String.Format("delete from {0} where \"TMStamp\" < CURRENT_DATE - INTERVAL '2 week'", m_Realm); 49 cmd.CommandText = String.Format("delete from {0} where \"TMStamp\" < CURRENT_DATE - INTERVAL '2 week'", m_Realm);
50 50
51 ExecuteNonQuery(cmd); 51 ExecuteNonQuery(cmd);
52 } 52 }
53 53
diff --git a/OpenSim/Data/PGSQL/PGSQLPresenceData.cs b/OpenSim/Data/PGSQL/PGSQLPresenceData.cs
index 0376585..ebbe8d3 100755
--- a/OpenSim/Data/PGSQL/PGSQLPresenceData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLPresenceData.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Data.PGSQL
80 PresenceData[] pd = Get("SessionID", sessionID.ToString()); 80 PresenceData[] pd = Get("SessionID", sessionID.ToString());
81 if (pd.Length == 0) 81 if (pd.Length == 0)
82 return false; 82 return false;
83 83
84 if (regionID == UUID.Zero) 84 if (regionID == UUID.Zero)
85 return false; 85 return false;
86 86
@@ -103,7 +103,7 @@ namespace OpenSim.Data.PGSQL
103 public bool VerifyAgent(UUID agentId, UUID secureSessionID) 103 public bool VerifyAgent(UUID agentId, UUID secureSessionID)
104 { 104 {
105 PresenceData[] ret = Get("SecureSessionID", secureSessionID.ToString()); 105 PresenceData[] ret = Get("SecureSessionID", secureSessionID.ToString());
106 106
107 if (ret.Length == 0) 107 if (ret.Length == 0)
108 return false; 108 return false;
109 109
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
index fc352c3..1272e37 100644
--- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Data.PGSQL
57 get { return GetType().Assembly; } 57 get { return GetType().Assembly; }
58 } 58 }
59 59
60 public PGSQLRegionData(string connectionString, string realm) 60 public PGSQLRegionData(string connectionString, string realm)
61 { 61 {
62 m_Realm = realm; 62 m_Realm = realm;
63 m_ConnectionString = connectionString; 63 m_ConnectionString = connectionString;
@@ -77,7 +77,7 @@ namespace OpenSim.Data.PGSQL
77 m_FieldTypes = new Dictionary<string, string>(); 77 m_FieldTypes = new Dictionary<string, string>();
78 78
79 string query = string.Format(@"select column_name,data_type 79 string query = string.Format(@"select column_name,data_type
80 from INFORMATION_SCHEMA.COLUMNS 80 from INFORMATION_SCHEMA.COLUMNS
81 where table_name = lower('{0}'); 81 where table_name = lower('{0}');
82 82
83 ", m_Realm); 83 ", m_Realm);
@@ -107,7 +107,7 @@ namespace OpenSim.Data.PGSQL
107 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 107 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
108 { 108 {
109 cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName)); 109 cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName));
110 if (scopeID != UUID.Zero) 110 if (scopeID != UUID.Zero)
111 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); 111 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
112 conn.Open(); 112 conn.Open();
113 return RunCommand(cmd); 113 return RunCommand(cmd);
@@ -134,7 +134,7 @@ namespace OpenSim.Data.PGSQL
134 cmd.Parameters.Add(m_database.CreateParameter("startY", startY)); 134 cmd.Parameters.Add(m_database.CreateParameter("startY", startY));
135 cmd.Parameters.Add(m_database.CreateParameter("endX", endX)); 135 cmd.Parameters.Add(m_database.CreateParameter("endX", endX));
136 cmd.Parameters.Add(m_database.CreateParameter("endY", endY)); 136 cmd.Parameters.Add(m_database.CreateParameter("endY", endY));
137 if (scopeID != UUID.Zero) 137 if (scopeID != UUID.Zero)
138 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); 138 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
139 conn.Open(); 139 conn.Open();
140 ret = RunCommand(cmd); 140 ret = RunCommand(cmd);
@@ -167,7 +167,7 @@ namespace OpenSim.Data.PGSQL
167 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 167 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
168 { 168 {
169 cmd.Parameters.Add(m_database.CreateParameter("regionID", regionID)); 169 cmd.Parameters.Add(m_database.CreateParameter("regionID", regionID));
170 if (scopeID != UUID.Zero) 170 if (scopeID != UUID.Zero)
171 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); 171 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
172 conn.Open(); 172 conn.Open();
173 List<RegionData> ret = RunCommand(cmd); 173 List<RegionData> ret = RunCommand(cmd);
@@ -196,7 +196,7 @@ namespace OpenSim.Data.PGSQL
196 cmd.Parameters.Add(m_database.CreateParameter("startY", qstartY)); 196 cmd.Parameters.Add(m_database.CreateParameter("startY", qstartY));
197 cmd.Parameters.Add(m_database.CreateParameter("endX", endX)); 197 cmd.Parameters.Add(m_database.CreateParameter("endX", endX));
198 cmd.Parameters.Add(m_database.CreateParameter("endY", endY)); 198 cmd.Parameters.Add(m_database.CreateParameter("endY", endY));
199 if (scopeID != UUID.Zero) 199 if (scopeID != UUID.Zero)
200 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); 200 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
201 conn.Open(); 201 conn.Open();
202 202
@@ -298,7 +298,7 @@ namespace OpenSim.Data.PGSQL
298 { 298 {
299 299
300 string update = "update " + m_Realm + " set \"locX\"=:posX, \"locY\"=:posY, \"sizeX\"=:sizeX, \"sizeY\"=:sizeY "; 300 string update = "update " + m_Realm + " set \"locX\"=:posX, \"locY\"=:posY, \"sizeX\"=:sizeX, \"sizeY\"=:sizeY ";
301 301
302 foreach (string field in fields) 302 foreach (string field in fields)
303 { 303 {
304 304
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index 902aae0..33d12bd 100755
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -110,11 +110,11 @@ namespace OpenSim.Data.PGSQL
110 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>(); 110 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
111 SceneObjectGroup grp = null; 111 SceneObjectGroup grp = null;
112 112
113 string sql = @"SELECT *, 113 string sql = @"SELECT *,
114 CASE WHEN prims.""UUID"" = prims.""SceneGroupID"" THEN 0 ELSE 1 END as sort 114 CASE WHEN prims.""UUID"" = prims.""SceneGroupID"" THEN 0 ELSE 1 END as sort
115 FROM prims 115 FROM prims
116 LEFT JOIN primshapes ON prims.""UUID"" = primshapes.""UUID"" 116 LEFT JOIN primshapes ON prims.""UUID"" = primshapes.""UUID""
117 WHERE ""RegionUUID"" = :RegionUUID 117 WHERE ""RegionUUID"" = :RegionUUID
118 ORDER BY ""SceneGroupID"" asc, sort asc, ""LinkNumber"" asc"; 118 ORDER BY ""SceneGroupID"" asc, sort asc, ""LinkNumber"" asc";
119 119
120 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 120 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -146,7 +146,7 @@ namespace OpenSim.Data.PGSQL
146 // There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are 146 // There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are
147 // recorded as the root prim (for which the UUID must equal the persisted group UUID). In 147 // recorded as the root prim (for which the UUID must equal the persisted group UUID). In
148 // this case, force the UUID to be the same as the group UUID so that at least these can be 148 // this case, force the UUID to be the same as the group UUID so that at least these can be
149 // deleted (we need to change the UUID so that any other prims in the linkset can also be 149 // deleted (we need to change the UUID so that any other prims in the linkset can also be
150 // deleted). 150 // deleted).
151 if (sceneObjectPart.UUID != groupID && groupID != UUID.Zero) 151 if (sceneObjectPart.UUID != groupID && groupID != UUID.Zero)
152 { 152 {
@@ -178,7 +178,7 @@ namespace OpenSim.Data.PGSQL
178 objects[grp.UUID] = grp; 178 objects[grp.UUID] = grp;
179 179
180 // Instead of attempting to LoadItems on every prim, 180 // Instead of attempting to LoadItems on every prim,
181 // most of which probably have no items... get a 181 // most of which probably have no items... get a
182 // list from DB of all prims which have items and 182 // list from DB of all prims which have items and
183 // LoadItems only on those 183 // LoadItems only on those
184 List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>(); 184 List<SceneObjectPart> primsWithInventory = new List<SceneObjectPart>();
@@ -331,52 +331,52 @@ namespace OpenSim.Data.PGSQL
331 private void StoreSceneObjectPrim(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID) 331 private void StoreSceneObjectPrim(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID)
332 { 332 {
333 //Big query to update or insert a new prim. 333 //Big query to update or insert a new prim.
334 334
335 string queryPrims = @" 335 string queryPrims = @"
336 UPDATE prims SET 336 UPDATE prims SET
337 ""CreationDate"" = :CreationDate, ""Name"" = :Name, ""Text"" = :Text, ""Description"" = :Description, ""SitName"" = :SitName, 337 ""CreationDate"" = :CreationDate, ""Name"" = :Name, ""Text"" = :Text, ""Description"" = :Description, ""SitName"" = :SitName,
338 ""TouchName"" = :TouchName, ""ObjectFlags"" = :ObjectFlags, ""OwnerMask"" = :OwnerMask, ""NextOwnerMask"" = :NextOwnerMask, ""GroupMask"" = :GroupMask, 338 ""TouchName"" = :TouchName, ""ObjectFlags"" = :ObjectFlags, ""OwnerMask"" = :OwnerMask, ""NextOwnerMask"" = :NextOwnerMask, ""GroupMask"" = :GroupMask,
339 ""EveryoneMask"" = :EveryoneMask, ""BaseMask"" = :BaseMask, ""PositionX"" = :PositionX, ""PositionY"" = :PositionY, ""PositionZ"" = :PositionZ, 339 ""EveryoneMask"" = :EveryoneMask, ""BaseMask"" = :BaseMask, ""PositionX"" = :PositionX, ""PositionY"" = :PositionY, ""PositionZ"" = :PositionZ,
340 ""GroupPositionX"" = :GroupPositionX, ""GroupPositionY"" = :GroupPositionY, ""GroupPositionZ"" = :GroupPositionZ, ""VelocityX"" = :VelocityX, 340 ""GroupPositionX"" = :GroupPositionX, ""GroupPositionY"" = :GroupPositionY, ""GroupPositionZ"" = :GroupPositionZ, ""VelocityX"" = :VelocityX,
341 ""VelocityY"" = :VelocityY, ""VelocityZ"" = :VelocityZ, ""AngularVelocityX"" = :AngularVelocityX, ""AngularVelocityY"" = :AngularVelocityY, 341 ""VelocityY"" = :VelocityY, ""VelocityZ"" = :VelocityZ, ""AngularVelocityX"" = :AngularVelocityX, ""AngularVelocityY"" = :AngularVelocityY,
342 ""AngularVelocityZ"" = :AngularVelocityZ, ""AccelerationX"" = :AccelerationX, ""AccelerationY"" = :AccelerationY, 342 ""AngularVelocityZ"" = :AngularVelocityZ, ""AccelerationX"" = :AccelerationX, ""AccelerationY"" = :AccelerationY,
343 ""AccelerationZ"" = :AccelerationZ, ""RotationX"" = :RotationX, ""RotationY"" = :RotationY, ""RotationZ"" = :RotationZ, ""RotationW"" = :RotationW, 343 ""AccelerationZ"" = :AccelerationZ, ""RotationX"" = :RotationX, ""RotationY"" = :RotationY, ""RotationZ"" = :RotationZ, ""RotationW"" = :RotationW,
344 ""SitTargetOffsetX"" = :SitTargetOffsetX, ""SitTargetOffsetY"" = :SitTargetOffsetY, ""SitTargetOffsetZ"" = :SitTargetOffsetZ, 344 ""SitTargetOffsetX"" = :SitTargetOffsetX, ""SitTargetOffsetY"" = :SitTargetOffsetY, ""SitTargetOffsetZ"" = :SitTargetOffsetZ,
345 ""SitTargetOrientW"" = :SitTargetOrientW, ""SitTargetOrientX"" = :SitTargetOrientX, ""SitTargetOrientY"" = :SitTargetOrientY, 345 ""SitTargetOrientW"" = :SitTargetOrientW, ""SitTargetOrientX"" = :SitTargetOrientX, ""SitTargetOrientY"" = :SitTargetOrientY,
346 ""SitTargetOrientZ"" = :SitTargetOrientZ, ""RegionUUID"" = :RegionUUID, ""CreatorID"" = :CreatorID, ""OwnerID"" = :OwnerID, ""GroupID"" = :GroupID, 346 ""SitTargetOrientZ"" = :SitTargetOrientZ, ""RegionUUID"" = :RegionUUID, ""CreatorID"" = :CreatorID, ""OwnerID"" = :OwnerID, ""GroupID"" = :GroupID,
347 ""LastOwnerID"" = :LastOwnerID, ""SceneGroupID"" = :SceneGroupID, ""PayPrice"" = :PayPrice, ""PayButton1"" = :PayButton1, ""PayButton2"" = :PayButton2, 347 ""LastOwnerID"" = :LastOwnerID, ""SceneGroupID"" = :SceneGroupID, ""PayPrice"" = :PayPrice, ""PayButton1"" = :PayButton1, ""PayButton2"" = :PayButton2,
348 ""PayButton3"" = :PayButton3, ""PayButton4"" = :PayButton4, ""LoopedSound"" = :LoopedSound, ""LoopedSoundGain"" = :LoopedSoundGain, 348 ""PayButton3"" = :PayButton3, ""PayButton4"" = :PayButton4, ""LoopedSound"" = :LoopedSound, ""LoopedSoundGain"" = :LoopedSoundGain,
349 ""TextureAnimation"" = :TextureAnimation, ""OmegaX"" = :OmegaX, ""OmegaY"" = :OmegaY, ""OmegaZ"" = :OmegaZ, ""CameraEyeOffsetX"" = :CameraEyeOffsetX, 349 ""TextureAnimation"" = :TextureAnimation, ""OmegaX"" = :OmegaX, ""OmegaY"" = :OmegaY, ""OmegaZ"" = :OmegaZ, ""CameraEyeOffsetX"" = :CameraEyeOffsetX,
350 ""CameraEyeOffsetY"" = :CameraEyeOffsetY, ""CameraEyeOffsetZ"" = :CameraEyeOffsetZ, ""CameraAtOffsetX"" = :CameraAtOffsetX, 350 ""CameraEyeOffsetY"" = :CameraEyeOffsetY, ""CameraEyeOffsetZ"" = :CameraEyeOffsetZ, ""CameraAtOffsetX"" = :CameraAtOffsetX,
351 ""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook, 351 ""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook,
352 ""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice, 352 ""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice,
353 ""SaleType"" = :SaleType, ""ColorR"" = :ColorR, ""ColorG"" = :ColorG, ""ColorB"" = :ColorB, ""ColorA"" = :ColorA, ""ParticleSystem"" = :ParticleSystem, 353 ""SaleType"" = :SaleType, ""ColorR"" = :ColorR, ""ColorG"" = :ColorG, ""ColorB"" = :ColorB, ""ColorA"" = :ColorA, ""ParticleSystem"" = :ParticleSystem,
354 ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, 354 ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches,
355 ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, 355 ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs,
356 ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution 356 ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution
357 WHERE ""UUID"" = :UUID ; 357 WHERE ""UUID"" = :UUID ;
358 358
359 INSERT INTO 359 INSERT INTO
360 prims ( 360 prims (
361 ""UUID"", ""CreationDate"", ""Name"", ""Text"", ""Description"", ""SitName"", ""TouchName"", ""ObjectFlags"", ""OwnerMask"", ""NextOwnerMask"", ""GroupMask"", 361 ""UUID"", ""CreationDate"", ""Name"", ""Text"", ""Description"", ""SitName"", ""TouchName"", ""ObjectFlags"", ""OwnerMask"", ""NextOwnerMask"", ""GroupMask"",
362 ""EveryoneMask"", ""BaseMask"", ""PositionX"", ""PositionY"", ""PositionZ"", ""GroupPositionX"", ""GroupPositionY"", ""GroupPositionZ"", ""VelocityX"", 362 ""EveryoneMask"", ""BaseMask"", ""PositionX"", ""PositionY"", ""PositionZ"", ""GroupPositionX"", ""GroupPositionY"", ""GroupPositionZ"", ""VelocityX"",
363 ""VelocityY"", ""VelocityZ"", ""AngularVelocityX"", ""AngularVelocityY"", ""AngularVelocityZ"", ""AccelerationX"", ""AccelerationY"", ""AccelerationZ"", 363 ""VelocityY"", ""VelocityZ"", ""AngularVelocityX"", ""AngularVelocityY"", ""AngularVelocityZ"", ""AccelerationX"", ""AccelerationY"", ""AccelerationZ"",
364 ""RotationX"", ""RotationY"", ""RotationZ"", ""RotationW"", ""SitTargetOffsetX"", ""SitTargetOffsetY"", ""SitTargetOffsetZ"", ""SitTargetOrientW"", 364 ""RotationX"", ""RotationY"", ""RotationZ"", ""RotationW"", ""SitTargetOffsetX"", ""SitTargetOffsetY"", ""SitTargetOffsetZ"", ""SitTargetOrientW"",
365 ""SitTargetOrientX"", ""SitTargetOrientY"", ""SitTargetOrientZ"", ""RegionUUID"", ""CreatorID"", ""OwnerID"", ""GroupID"", ""LastOwnerID"", ""SceneGroupID"", 365 ""SitTargetOrientX"", ""SitTargetOrientY"", ""SitTargetOrientZ"", ""RegionUUID"", ""CreatorID"", ""OwnerID"", ""GroupID"", ""LastOwnerID"", ""SceneGroupID"",
366 ""PayPrice"", ""PayButton1"", ""PayButton2"", ""PayButton3"", ""PayButton4"", ""LoopedSound"", ""LoopedSoundGain"", ""TextureAnimation"", ""OmegaX"", 366 ""PayPrice"", ""PayButton1"", ""PayButton2"", ""PayButton3"", ""PayButton4"", ""LoopedSound"", ""LoopedSoundGain"", ""TextureAnimation"", ""OmegaX"",
367 ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", 367 ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"",
368 ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", 368 ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"",
369 ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", 369 ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"",
370 ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"" 370 ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution""
371 ) Select 371 ) Select
372 :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, 372 :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask,
373 :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, 373 :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX,
374 :VelocityY, :VelocityZ, :AngularVelocityX, :AngularVelocityY, :AngularVelocityZ, :AccelerationX, :AccelerationY, :AccelerationZ, 374 :VelocityY, :VelocityZ, :AngularVelocityX, :AngularVelocityY, :AngularVelocityZ, :AccelerationX, :AccelerationY, :AccelerationZ,
375 :RotationX, :RotationY, :RotationZ, :RotationW, :SitTargetOffsetX, :SitTargetOffsetY, :SitTargetOffsetZ, :SitTargetOrientW, 375 :RotationX, :RotationY, :RotationZ, :RotationW, :SitTargetOffsetX, :SitTargetOffsetY, :SitTargetOffsetZ, :SitTargetOrientW,
376 :SitTargetOrientX, :SitTargetOrientY, :SitTargetOrientZ, :RegionUUID, :CreatorID, :OwnerID, :GroupID, :LastOwnerID, :SceneGroupID, 376 :SitTargetOrientX, :SitTargetOrientY, :SitTargetOrientZ, :RegionUUID, :CreatorID, :OwnerID, :GroupID, :LastOwnerID, :SceneGroupID,
377 :PayPrice, :PayButton1, :PayButton2, :PayButton3, :PayButton4, :LoopedSound, :LoopedSoundGain, :TextureAnimation, :OmegaX, 377 :PayPrice, :PayButton1, :PayButton2, :PayButton3, :PayButton4, :LoopedSound, :LoopedSoundGain, :TextureAnimation, :OmegaX,
378 :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, 378 :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ,
379 :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, 379 :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA,
380 :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, 380 :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs,
381 :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution 381 :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution
382 where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); 382 where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID);
@@ -401,26 +401,26 @@ namespace OpenSim.Data.PGSQL
401 private void StoreSceneObjectPrimShapes(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID) 401 private void StoreSceneObjectPrimShapes(SceneObjectPart sceneObjectPart, NpgsqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID)
402 { 402 {
403 //Big query to or insert or update primshapes 403 //Big query to or insert or update primshapes
404 404
405 string queryPrimShapes = @" 405 string queryPrimShapes = @"
406 UPDATE primshapes SET 406 UPDATE primshapes SET
407 ""Shape"" = :Shape, ""ScaleX"" = :ScaleX, ""ScaleY"" = :ScaleY, ""ScaleZ"" = :ScaleZ, ""PCode"" = :PCode, ""PathBegin"" = :PathBegin, 407 ""Shape"" = :Shape, ""ScaleX"" = :ScaleX, ""ScaleY"" = :ScaleY, ""ScaleZ"" = :ScaleZ, ""PCode"" = :PCode, ""PathBegin"" = :PathBegin,
408 ""PathEnd"" = :PathEnd, ""PathScaleX"" = :PathScaleX, ""PathScaleY"" = :PathScaleY, ""PathShearX"" = :PathShearX, ""PathShearY"" = :PathShearY, 408 ""PathEnd"" = :PathEnd, ""PathScaleX"" = :PathScaleX, ""PathScaleY"" = :PathScaleY, ""PathShearX"" = :PathShearX, ""PathShearY"" = :PathShearY,
409 ""PathSkew"" = :PathSkew, ""PathCurve"" = :PathCurve, ""PathRadiusOffset"" = :PathRadiusOffset, ""PathRevolutions"" = :PathRevolutions, 409 ""PathSkew"" = :PathSkew, ""PathCurve"" = :PathCurve, ""PathRadiusOffset"" = :PathRadiusOffset, ""PathRevolutions"" = :PathRevolutions,
410 ""PathTaperX"" = :PathTaperX, ""PathTaperY"" = :PathTaperY, ""PathTwist"" = :PathTwist, ""PathTwistBegin"" = :PathTwistBegin, 410 ""PathTaperX"" = :PathTaperX, ""PathTaperY"" = :PathTaperY, ""PathTwist"" = :PathTwist, ""PathTwistBegin"" = :PathTwistBegin,
411 ""ProfileBegin"" = :ProfileBegin, ""ProfileEnd"" = :ProfileEnd, ""ProfileCurve"" = :ProfileCurve, ""ProfileHollow"" = :ProfileHollow, 411 ""ProfileBegin"" = :ProfileBegin, ""ProfileEnd"" = :ProfileEnd, ""ProfileCurve"" = :ProfileCurve, ""ProfileHollow"" = :ProfileHollow,
412 ""Texture"" = :Texture, ""ExtraParams"" = :ExtraParams, ""State"" = :State, ""Media"" = :Media 412 ""Texture"" = :Texture, ""ExtraParams"" = :ExtraParams, ""State"" = :State, ""Media"" = :Media
413 WHERE ""UUID"" = :UUID ; 413 WHERE ""UUID"" = :UUID ;
414 414
415 INSERT INTO 415 INSERT INTO
416 primshapes ( 416 primshapes (
417 ""UUID"", ""Shape"", ""ScaleX"", ""ScaleY"", ""ScaleZ"", ""PCode"", ""PathBegin"", ""PathEnd"", ""PathScaleX"", ""PathScaleY"", ""PathShearX"", ""PathShearY"", 417 ""UUID"", ""Shape"", ""ScaleX"", ""ScaleY"", ""ScaleZ"", ""PCode"", ""PathBegin"", ""PathEnd"", ""PathScaleX"", ""PathScaleY"", ""PathShearX"", ""PathShearY"",
418 ""PathSkew"", ""PathCurve"", ""PathRadiusOffset"", ""PathRevolutions"", ""PathTaperX"", ""PathTaperY"", ""PathTwist"", ""PathTwistBegin"", ""ProfileBegin"", 418 ""PathSkew"", ""PathCurve"", ""PathRadiusOffset"", ""PathRevolutions"", ""PathTaperX"", ""PathTaperY"", ""PathTwist"", ""PathTwistBegin"", ""ProfileBegin"",
419 ""ProfileEnd"", ""ProfileCurve"", ""ProfileHollow"", ""Texture"", ""ExtraParams"", ""State"", ""Media"" 419 ""ProfileEnd"", ""ProfileCurve"", ""ProfileHollow"", ""Texture"", ""ExtraParams"", ""State"", ""Media""
420 ) 420 )
421 Select 421 Select
422 :UUID, :Shape, :ScaleX, :ScaleY, :ScaleZ, :PCode, :PathBegin, :PathEnd, :PathScaleX, :PathScaleY, :PathShearX, :PathShearY, 422 :UUID, :Shape, :ScaleX, :ScaleY, :ScaleZ, :PCode, :PathBegin, :PathEnd, :PathScaleX, :PathScaleY, :PathShearX, :PathShearY,
423 :PathSkew, :PathCurve, :PathRadiusOffset, :PathRevolutions, :PathTaperX, :PathTaperY, :PathTwist, :PathTwistBegin, :ProfileBegin, 423 :PathSkew, :PathCurve, :PathRadiusOffset, :PathRevolutions, :PathTaperX, :PathTaperY, :PathTwist, :PathTwistBegin, :ProfileBegin,
424 :ProfileEnd, :ProfileCurve, :ProfileHollow, :Texture, :ExtraParams, :State, :Media 424 :ProfileEnd, :ProfileCurve, :ProfileHollow, :Texture, :ExtraParams, :State, :Media
425 where not EXISTS (SELECT ""UUID"" FROM primshapes WHERE ""UUID"" = :UUID); 425 where not EXISTS (SELECT ""UUID"" FROM primshapes WHERE ""UUID"" = :UUID);
426 "; 426 ";
@@ -500,7 +500,7 @@ namespace OpenSim.Data.PGSQL
500 sql = 500 sql =
501 @"INSERT INTO primitems ( 501 @"INSERT INTO primitems (
502 ""itemID"",""primID"",""assetID"",""parentFolderID"",""invType"",""assetType"",""name"",""description"",""creationDate"",""creatorID"",""ownerID"",""lastOwnerID"",""groupID"", 502 ""itemID"",""primID"",""assetID"",""parentFolderID"",""invType"",""assetType"",""name"",""description"",""creationDate"",""creatorID"",""ownerID"",""lastOwnerID"",""groupID"",
503 ""nextPermissions"",""currentPermissions"",""basePermissions"",""everyonePermissions"",""groupPermissions"",""flags"") 503 ""nextPermissions"",""currentPermissions"",""basePermissions"",""everyonePermissions"",""groupPermissions"",""flags"")
504 VALUES (:itemID,:primID,:assetID,:parentFolderID,:invType,:assetType,:name,:description,:creationDate,:creatorID,:ownerID, 504 VALUES (:itemID,:primID,:assetID,:parentFolderID,:invType,:assetType,:name,:description,:creationDate,:creatorID,:ownerID,
505 :lastOwnerID,:groupID,:nextPermissions,:currentPermissions,:basePermissions,:everyonePermissions,:groupPermissions,:flags)"; 505 :lastOwnerID,:groupID,:nextPermissions,:currentPermissions,:basePermissions,:everyonePermissions,:groupPermissions,:flags)";
506 506
@@ -538,7 +538,7 @@ namespace OpenSim.Data.PGSQL
538 { 538 {
539 TerrainData terrData = null; 539 TerrainData terrData = null;
540 540
541 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from terrain 541 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from terrain
542 where ""RegionUUID"" = :RegionUUID order by ""Revision"" desc limit 1; "; 542 where ""RegionUUID"" = :RegionUUID order by ""Revision"" desc limit 1; ";
543 543
544 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 544 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -577,7 +577,7 @@ namespace OpenSim.Data.PGSQL
577 { 577 {
578 TerrainData terrData = null; 578 TerrainData terrData = null;
579 579
580 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from bakedterrain 580 string sql = @"select ""RegionUUID"", ""Revision"", ""Heightfield"" from bakedterrain
581 where ""RegionUUID"" = :RegionUUID; "; 581 where ""RegionUUID"" = :RegionUUID; ";
582 582
583 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 583 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -1319,7 +1319,7 @@ namespace OpenSim.Data.PGSQL
1319 { 1319 {
1320 { 1320 {
1321 string sql = "DELETE FROM regionenvironment WHERE region_id = :region_id ;"; 1321 string sql = "DELETE FROM regionenvironment WHERE region_id = :region_id ;";
1322 1322
1323 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 1323 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
1324 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 1324 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
1325 { 1325 {
@@ -1420,17 +1420,17 @@ namespace OpenSim.Data.PGSQL
1420 { 1420 {
1421 //This method only updates region settings!!! First call LoadRegionSettings to create new region settings in DB 1421 //This method only updates region settings!!! First call LoadRegionSettings to create new region settings in DB
1422 sql = 1422 sql =
1423 @"UPDATE regionsettings SET block_terraform = :block_terraform ,block_fly = :block_fly ,allow_damage = :allow_damage 1423 @"UPDATE regionsettings SET block_terraform = :block_terraform ,block_fly = :block_fly ,allow_damage = :allow_damage
1424,restrict_pushing = :restrict_pushing ,allow_land_resell = :allow_land_resell ,allow_land_join_divide = :allow_land_join_divide 1424,restrict_pushing = :restrict_pushing ,allow_land_resell = :allow_land_resell ,allow_land_join_divide = :allow_land_join_divide
1425,block_show_in_search = :block_show_in_search ,agent_limit = :agent_limit ,object_bonus = :object_bonus ,maturity = :maturity 1425,block_show_in_search = :block_show_in_search ,agent_limit = :agent_limit ,object_bonus = :object_bonus ,maturity = :maturity
1426,disable_scripts = :disable_scripts ,disable_collisions = :disable_collisions ,disable_physics = :disable_physics 1426,disable_scripts = :disable_scripts ,disable_collisions = :disable_collisions ,disable_physics = :disable_physics
1427,terrain_texture_1 = :terrain_texture_1 ,terrain_texture_2 = :terrain_texture_2 ,terrain_texture_3 = :terrain_texture_3 1427,terrain_texture_1 = :terrain_texture_1 ,terrain_texture_2 = :terrain_texture_2 ,terrain_texture_3 = :terrain_texture_3
1428,terrain_texture_4 = :terrain_texture_4 ,elevation_1_nw = :elevation_1_nw ,elevation_2_nw = :elevation_2_nw 1428,terrain_texture_4 = :terrain_texture_4 ,elevation_1_nw = :elevation_1_nw ,elevation_2_nw = :elevation_2_nw
1429,elevation_1_ne = :elevation_1_ne ,elevation_2_ne = :elevation_2_ne ,elevation_1_se = :elevation_1_se ,elevation_2_se = :elevation_2_se 1429,elevation_1_ne = :elevation_1_ne ,elevation_2_ne = :elevation_2_ne ,elevation_1_se = :elevation_1_se ,elevation_2_se = :elevation_2_se
1430,elevation_1_sw = :elevation_1_sw ,elevation_2_sw = :elevation_2_sw ,water_height = :water_height ,terrain_raise_limit = :terrain_raise_limit 1430,elevation_1_sw = :elevation_1_sw ,elevation_2_sw = :elevation_2_sw ,water_height = :water_height ,terrain_raise_limit = :terrain_raise_limit
1431,terrain_lower_limit = :terrain_lower_limit ,use_estate_sun = :use_estate_sun ,fixed_sun = :fixed_sun ,sun_position = :sun_position 1431,terrain_lower_limit = :terrain_lower_limit ,use_estate_sun = :use_estate_sun ,fixed_sun = :fixed_sun ,sun_position = :sun_position
1432,covenant = :covenant ,covenant_datetime = :covenant_datetime, sunvectorx = :sunvectorx, sunvectory = :sunvectory, sunvectorz = :sunvectorz, 1432,covenant = :covenant ,covenant_datetime = :covenant_datetime, sunvectorx = :sunvectorx, sunvectory = :sunvectory, sunvectorz = :sunvectorz,
1433""Sandbox"" = :Sandbox, loaded_creation_datetime = :loaded_creation_datetime, loaded_creation_id = :loaded_creation_id, ""map_tile_ID"" = :TerrainImageID, 1433""Sandbox"" = :Sandbox, loaded_creation_datetime = :loaded_creation_datetime, loaded_creation_id = :loaded_creation_id, ""map_tile_ID"" = :TerrainImageID,
1434""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID 1434""TelehubObject"" = :telehubobject, ""parcel_tile_ID"" = :ParcelImageID
1435 WHERE ""regionUUID"" = :regionUUID"; 1435 WHERE ""regionUUID"" = :regionUUID";
1436 1436
@@ -1465,13 +1465,13 @@ namespace OpenSim.Data.PGSQL
1465 elevation_2_ne,elevation_1_se,elevation_2_se,elevation_1_sw,elevation_2_sw,water_height,terrain_raise_limit, 1465 elevation_2_ne,elevation_1_se,elevation_2_se,elevation_1_sw,elevation_2_sw,water_height,terrain_raise_limit,
1466 terrain_lower_limit,use_estate_sun,fixed_sun,sun_position,covenant,covenant_datetime,sunvectorx, sunvectory, sunvectorz, 1466 terrain_lower_limit,use_estate_sun,fixed_sun,sun_position,covenant,covenant_datetime,sunvectorx, sunvectory, sunvectorz,
1467 ""Sandbox"", loaded_creation_datetime, loaded_creation_id 1467 ""Sandbox"", loaded_creation_datetime, loaded_creation_id
1468 ) 1468 )
1469 VALUES 1469 VALUES
1470 (:regionUUID,:block_terraform,:block_fly,:allow_damage,:restrict_pushing,:allow_land_resell,:allow_land_join_divide, 1470 (:regionUUID,:block_terraform,:block_fly,:allow_damage,:restrict_pushing,:allow_land_resell,:allow_land_join_divide,
1471 :block_show_in_search,:agent_limit,:object_bonus,:maturity,:disable_scripts,:disable_collisions,:disable_physics, 1471 :block_show_in_search,:agent_limit,:object_bonus,:maturity,:disable_scripts,:disable_collisions,:disable_physics,
1472 :terrain_texture_1,:terrain_texture_2,:terrain_texture_3,:terrain_texture_4,:elevation_1_nw,:elevation_2_nw,:elevation_1_ne, 1472 :terrain_texture_1,:terrain_texture_2,:terrain_texture_3,:terrain_texture_4,:elevation_1_nw,:elevation_2_nw,:elevation_1_ne,
1473 :elevation_2_ne,:elevation_1_se,:elevation_2_se,:elevation_1_sw,:elevation_2_sw,:water_height,:terrain_raise_limit, 1473 :elevation_2_ne,:elevation_1_se,:elevation_2_se,:elevation_1_sw,:elevation_2_sw,:water_height,:terrain_raise_limit,
1474 :terrain_lower_limit,:use_estate_sun,:fixed_sun,:sun_position,:covenant, :covenant_datetime, :sunvectorx,:sunvectory, 1474 :terrain_lower_limit,:use_estate_sun,:fixed_sun,:sun_position,:covenant, :covenant_datetime, :sunvectorx,:sunvectory,
1475 :sunvectorz, :Sandbox, :loaded_creation_datetime, :loaded_creation_id )"; 1475 :sunvectorz, :Sandbox, :loaded_creation_datetime, :loaded_creation_id )";
1476 1476
1477 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 1477 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
@@ -1626,7 +1626,7 @@ namespace OpenSim.Data.PGSQL
1626 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); 1626 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
1627 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); 1627 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
1628 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); 1628 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
1629 1629
1630 newData.SeeAVs = Convert.ToBoolean(row["SeeAVs"]); 1630 newData.SeeAVs = Convert.ToBoolean(row["SeeAVs"]);
1631 newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]); 1631 newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]);
1632 newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]); 1632 newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]);
@@ -1789,7 +1789,7 @@ namespace OpenSim.Data.PGSQL
1789 if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "") 1789 if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "")
1790 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); 1790 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]);
1791 else 1791 else
1792 prim.DynAttrs = new DAMap(); 1792 prim.DynAttrs = new DAMap();
1793 1793
1794 prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); 1794 prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]);
1795 prim.Density = Convert.ToSingle(primRow["Density"]); 1795 prim.Density = Convert.ToSingle(primRow["Density"]);
@@ -2195,17 +2195,17 @@ namespace OpenSim.Data.PGSQL
2195 2195
2196 parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound)); 2196 parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound));
2197 parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume)); 2197 parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume));
2198 2198
2199 parameters.Add(_Database.CreateParameter("PassTouches", prim.PassTouches)); 2199 parameters.Add(_Database.CreateParameter("PassTouches", prim.PassTouches));
2200 2200
2201 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); 2201 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
2202 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); 2202 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
2203 2203
2204 if (prim.DynAttrs.CountNamespaces > 0) 2204 if (prim.DynAttrs.CountNamespaces > 0)
2205 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); 2205 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
2206 else 2206 else
2207 parameters.Add(_Database.CreateParameter("DynAttrs", null)); 2207 parameters.Add(_Database.CreateParameter("DynAttrs", null));
2208 2208
2209 parameters.Add(_Database.CreateParameter("PhysicsShapeType", prim.PhysicsShapeType)); 2209 parameters.Add(_Database.CreateParameter("PhysicsShapeType", prim.PhysicsShapeType));
2210 parameters.Add(_Database.CreateParameter("Density", (double)prim.Density)); 2210 parameters.Add(_Database.CreateParameter("Density", (double)prim.Density));
2211 parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier)); 2211 parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier));
diff --git a/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs b/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs
index a2b5a2a..64cfff0 100644
--- a/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLUserAccountData.cs
@@ -42,13 +42,13 @@ namespace OpenSim.Data.PGSQL
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 45
46 public PGSQLUserAccountData(string connectionString, string realm) : 46 public PGSQLUserAccountData(string connectionString, string realm) :
47 base(connectionString, realm, "UserAccount") 47 base(connectionString, realm, "UserAccount")
48 { 48 {
49 } 49 }
50 50
51 /* 51 /*
52 private string m_Realm; 52 private string m_Realm;
53 private List<string> m_ColumnNames = null; 53 private List<string> m_ColumnNames = null;
54 private PGSQLManager m_database; 54 private PGSQLManager m_database;
@@ -122,7 +122,7 @@ namespace OpenSim.Data.PGSQL
122 { 122 {
123 cmd.Parameters.Add(m_database.CreateParameter("principalID", principalID)); 123 cmd.Parameters.Add(m_database.CreateParameter("principalID", principalID));
124 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); 124 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
125 125
126 conn.Open(); 126 conn.Open();
127 using (NpgsqlDataReader result = cmd.ExecuteReader()) 127 using (NpgsqlDataReader result = cmd.ExecuteReader())
128 { 128 {
@@ -158,8 +158,8 @@ namespace OpenSim.Data.PGSQL
158 } 158 }
159 return null; 159 return null;
160 } 160 }
161 161
162 162
163 public override bool Store(UserAccountData data) 163 public override bool Store(UserAccountData data)
164 { 164 {
165 if (data.Data.ContainsKey("PrincipalID")) 165 if (data.Data.ContainsKey("PrincipalID"))
@@ -214,7 +214,7 @@ namespace OpenSim.Data.PGSQL
214 catch (Exception e){ 214 catch (Exception e){
215 m_log.ErrorFormat("[USER]: ERROR opened update user {0} ", e.Message); 215 m_log.ErrorFormat("[USER]: ERROR opened update user {0} ", e.Message);
216 } 216 }
217 217
218 218
219 if (conta < 1) 219 if (conta < 1)
220 { 220 {
@@ -242,14 +242,14 @@ namespace OpenSim.Data.PGSQL
242 } 242 }
243 return true; 243 return true;
244 } 244 }
245 245
246 246
247 public bool Store(UserAccountData data, UUID principalID, string token) 247 public bool Store(UserAccountData data, UUID principalID, string token)
248 { 248 {
249 return false; 249 return false;
250 } 250 }
251 251
252 252
253 public bool SetDataItem(UUID principalID, string item, string value) 253 public bool SetDataItem(UUID principalID, string item, string value)
254 { 254 {
255 string sql = string.Format(@"update {0} set {1} = :{1} where ""UUID"" = :UUID", m_Realm, item); 255 string sql = string.Format(@"update {0} set {1} = :{1} where ""UUID"" = :UUID", m_Realm, item);
@@ -299,7 +299,7 @@ namespace OpenSim.Data.PGSQL
299 299
300 string sql = ""; 300 string sql = "";
301 UUID scope_id; 301 UUID scope_id;
302 UUID.TryParse(scopeID.ToString(), out scope_id); 302 UUID.TryParse(scopeID.ToString(), out scope_id);
303 303
304 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) 304 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
305 using (NpgsqlCommand cmd = new NpgsqlCommand()) 305 using (NpgsqlCommand cmd = new NpgsqlCommand())
diff --git a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs
index f166976..75a51e2 100644
--- a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs
@@ -412,15 +412,15 @@ namespace OpenSim.Data.PGSQL
412 query = @"WITH upsert AS ( 412 query = @"WITH upsert AS (
413 UPDATE userpicks SET 413 UPDATE userpicks SET
414 pickuuid = :PickId, creatoruuid = :CreatorId, toppick = :TopPick, parceluuid = :ParcelId, 414 pickuuid = :PickId, creatoruuid = :CreatorId, toppick = :TopPick, parceluuid = :ParcelId,
415 name = :Name, description = :Desc, snapshotuuid = :SnapshotId, ""user"" = :User, 415 name = :Name, description = :Desc, snapshotuuid = :SnapshotId, ""user"" = :User,
416 originalname = :Original, simname = :SimName, posglobal = :GlobalPos, 416 originalname = :Original, simname = :SimName, posglobal = :GlobalPos,
417 sortorder = :SortOrder, enabled = :Enabled 417 sortorder = :SortOrder, enabled = :Enabled
418 RETURNING * ) 418 RETURNING * )
419 INSERT INTO userpicks (pickuuid,creatoruuid,toppick,parceluuid,name,description, 419 INSERT INTO userpicks (pickuuid,creatoruuid,toppick,parceluuid,name,description,
420 snapshotuuid,""user"",originalname,simname,posglobal,sortorder,enabled) 420 snapshotuuid,""user"",originalname,simname,posglobal,sortorder,enabled)
421 SELECT 421 SELECT
422 :PickId,:CreatorId,:TopPick,:ParcelId,:Name,:Desc,:SnapshotId,:User, 422 :PickId,:CreatorId,:TopPick,:ParcelId,:Name,:Desc,:SnapshotId,:User,
423 :Original,:SimName,:GlobalPos,:SortOrder,:Enabled 423 :Original,:SimName,:GlobalPos,:SortOrder,:Enabled
424 WHERE NOT EXISTS ( 424 WHERE NOT EXISTS (
425 SELECT * FROM upsert )"; 425 SELECT * FROM upsert )";
426 426
diff --git a/OpenSim/Data/PGSQL/PGSQLXAssetData.cs b/OpenSim/Data/PGSQL/PGSQLXAssetData.cs
index d3518cf..6e88489 100644
--- a/OpenSim/Data/PGSQL/PGSQLXAssetData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLXAssetData.cs
@@ -141,7 +141,7 @@ namespace OpenSim.Data.PGSQL
141 141
142 using (NpgsqlCommand cmd = new NpgsqlCommand( 142 using (NpgsqlCommand cmd = new NpgsqlCommand(
143 @"SELECT name, description, access_time, ""AssetType"", local, temporary, asset_flags, creatorid, data 143 @"SELECT name, description, access_time, ""AssetType"", local, temporary, asset_flags, creatorid, data
144 FROM XAssetsMeta 144 FROM XAssetsMeta
145 JOIN XAssetsData ON XAssetsMeta.hash = XAssetsData.Hash WHERE id=:ID", 145 JOIN XAssetsData ON XAssetsMeta.hash = XAssetsData.Hash WHERE id=:ID",
146 dbcon)) 146 dbcon))
147 { 147 {
@@ -179,7 +179,7 @@ namespace OpenSim.Data.PGSQL
179 WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue); 179 WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue);
180 // int compressedLength = asset.Data.Length; 180 // int compressedLength = asset.Data.Length;
181 asset.Data = outputStream.ToArray(); 181 asset.Data = outputStream.ToArray();
182 182
183 // m_log.DebugFormat( 183 // m_log.DebugFormat(
184 // "[XASSET DB]: Decompressed {0} {1} to {2} bytes from {3}", 184 // "[XASSET DB]: Decompressed {0} {1} to {2} bytes from {3}",
185 // asset.ID, asset.Name, asset.Data.Length, compressedLength); 185 // asset.ID, asset.Name, asset.Data.Length, compressedLength);
@@ -223,16 +223,16 @@ namespace OpenSim.Data.PGSQL
223 { 223 {
224 assetName = asset.Name.Substring(0, 64); 224 assetName = asset.Name.Substring(0, 64);
225 m_log.WarnFormat( 225 m_log.WarnFormat(
226 "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 226 "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
227 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 227 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
228 } 228 }
229 229
230 string assetDescription = asset.Description; 230 string assetDescription = asset.Description;
231 if (asset.Description.Length > 64) 231 if (asset.Description.Length > 64)
232 { 232 {
233 assetDescription = asset.Description.Substring(0, 64); 233 assetDescription = asset.Description.Substring(0, 64);
234 m_log.WarnFormat( 234 m_log.WarnFormat(
235 "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 235 "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
236 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 236 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
237 } 237 }
238 238
@@ -268,8 +268,8 @@ namespace OpenSim.Data.PGSQL
268 where not exists( Select id from XAssetsMeta where id = :ID); 268 where not exists( Select id from XAssetsMeta where id = :ID);
269 269
270 update XAssetsMeta 270 update XAssetsMeta
271 set id = :ID, hash = :Hash, name = :Name, description = :Description, 271 set id = :ID, hash = :Hash, name = :Name, description = :Description,
272 ""AssetType"" = :AssetType, local = :Local, temporary = :Temporary, create_time = :CreateTime, 272 ""AssetType"" = :AssetType, local = :Local, temporary = :Temporary, create_time = :CreateTime,
273 access_time = :AccessTime, asset_flags = :AssetFlags, creatorid = :CreatorID 273 access_time = :AccessTime, asset_flags = :AssetFlags, creatorid = :CreatorID
274 where id = :ID; 274 where id = :ID;
275 ", 275 ",
@@ -321,13 +321,13 @@ namespace OpenSim.Data.PGSQL
321 { 321 {
322 m_log.ErrorFormat("[XASSET DB]: PGSQL failure creating asset data {0} with name \"{1}\". Error: {2}", 322 m_log.ErrorFormat("[XASSET DB]: PGSQL failure creating asset data {0} with name \"{1}\". Error: {2}",
323 asset.FullID, asset.Name, e.Message); 323 asset.FullID, asset.Name, e.Message);
324 324
325 transaction.Rollback(); 325 transaction.Rollback();
326 326
327 return; 327 return;
328 } 328 }
329 } 329 }
330 330
331 transaction.Commit(); 331 transaction.Commit();
332 } 332 }
333 } 333 }
@@ -374,7 +374,7 @@ namespace OpenSim.Data.PGSQL
374 catch (Exception e) 374 catch (Exception e)
375 { 375 {
376 m_log.ErrorFormat( 376 m_log.ErrorFormat(
377 "[XASSET PGSQL DB]: Failure updating access_time for asset {0} with name {1} : {2}", 377 "[XASSET PGSQL DB]: Failure updating access_time for asset {0} with name {1} : {2}",
378 assetMetadata.ID, assetMetadata.Name, e.Message); 378 assetMetadata.ID, assetMetadata.Name, e.Message);
379 } 379 }
380 } 380 }
@@ -519,7 +519,7 @@ namespace OpenSim.Data.PGSQL
519 { 519 {
520 dbcon.Open(); 520 dbcon.Open();
521 using(NpgsqlCommand cmd = new NpgsqlCommand(@"SELECT name, description, access_time, ""AssetType"", temporary, id, asset_flags, creatorid 521 using(NpgsqlCommand cmd = new NpgsqlCommand(@"SELECT name, description, access_time, ""AssetType"", temporary, id, asset_flags, creatorid
522 FROM XAssetsMeta 522 FROM XAssetsMeta
523 LIMIT :start, :count",dbcon)) 523 LIMIT :start, :count",dbcon))
524 { 524 {
525 cmd.Parameters.Add(m_database.CreateParameter("start",start)); 525 cmd.Parameters.Add(m_database.CreateParameter("start",start));
diff --git a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs
index 959c2cf..55a1996 100644
--- a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs
@@ -197,16 +197,16 @@ namespace OpenSim.Data.PGSQL
197 using (NpgsqlCommand cmd = new NpgsqlCommand()) 197 using (NpgsqlCommand cmd = new NpgsqlCommand())
198 { 198 {
199/* 199/*
200 cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" 200 cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions""
201 from inventoryitems 201 from inventoryitems
202 where ""avatarID"" = :PrincipalID 202 where ""avatarID"" = :PrincipalID
203 and ""assetID"" = :AssetID 203 and ""assetID"" = :AssetID
204 group by ""assetID"" ", m_Realm); 204 group by ""assetID"" ", m_Realm);
205*/ 205*/
206 cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" 206 cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions""
207 from inventoryitems 207 from inventoryitems
208 where ""avatarID""::uuid = :PrincipalID 208 where ""avatarID""::uuid = :PrincipalID
209 and ""assetID"" = :AssetID 209 and ""assetID"" = :AssetID
210 group by ""assetID"" "); 210 group by ""assetID"" ");
211 211
212 cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID)); 212 cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID));
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 9c2bd2e..966d0b8 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -138,7 +138,7 @@ namespace OpenSim.Data.SQLite
138 { 138 {
139 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME); 139 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME);
140 m_log.WarnFormat( 140 m_log.WarnFormat(
141 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 141 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
142 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 142 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
143 } 143 }
144 144
@@ -147,7 +147,7 @@ namespace OpenSim.Data.SQLite
147 { 147 {
148 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); 148 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
149 m_log.WarnFormat( 149 m_log.WarnFormat(
150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
152 } 152 }
153 153
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
index 0428c11..8fb955c 100644
--- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Data.SQLite
45 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData 45 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 private string m_Realm; 49 private string m_Realm;
50 private List<string> m_ColumnNames; 50 private List<string> m_ColumnNames;
51 private int m_LastExpire; 51 private int m_LastExpire;
@@ -223,7 +223,7 @@ namespace OpenSim.Data.SQLite
223 if (System.Environment.TickCount - m_LastExpire > 30000) 223 if (System.Environment.TickCount - m_LastExpire > 30000)
224 DoExpire(); 224 DoExpire();
225 225
226 using (SqliteCommand cmd = new SqliteCommand("insert into tokens (UUID, token, validity) values ('" + principalID.ToString() + 226 using (SqliteCommand cmd = new SqliteCommand("insert into tokens (UUID, token, validity) values ('" + principalID.ToString() +
227 "', '" + token + "', datetime('now', 'localtime', '+" + lifetime.ToString() + " minutes'))")) 227 "', '" + token + "', datetime('now', 'localtime', '+" + lifetime.ToString() + " minutes'))"))
228 { 228 {
229 if (ExecuteNonQuery(cmd, m_Connection) > 0) 229 if (ExecuteNonQuery(cmd, m_Connection) > 0)
@@ -238,7 +238,7 @@ namespace OpenSim.Data.SQLite
238 if (System.Environment.TickCount - m_LastExpire > 30000) 238 if (System.Environment.TickCount - m_LastExpire > 30000)
239 DoExpire(); 239 DoExpire();
240 240
241 using (SqliteCommand cmd = new SqliteCommand("update tokens set validity = datetime('now', 'localtime', '+" + lifetime.ToString() + 241 using (SqliteCommand cmd = new SqliteCommand("update tokens set validity = datetime('now', 'localtime', '+" + lifetime.ToString() +
242 " minutes') where UUID = '" + principalID.ToString() + "' and token = '" + token + "' and validity > datetime('now', 'localtime')")) 242 " minutes') where UUID = '" + principalID.ToString() + "' and token = '" + token + "' and validity > datetime('now', 'localtime')"))
243 { 243 {
244 if (ExecuteNonQuery(cmd, m_Connection) > 0) 244 if (ExecuteNonQuery(cmd, m_Connection) > 0)
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index d51f2d4..0fcab21 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -190,7 +190,7 @@ namespace OpenSim.Data.SQLite
190 IDataReader r = null; 190 IDataReader r = null;
191 191
192 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 192 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
193 { 193 {
194 names.Remove("EstateID"); 194 names.Remove("EstateID");
195 195
196 string sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")"; 196 string sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")";
@@ -386,15 +386,15 @@ namespace OpenSim.Data.SQLite
386 return DoLoad(cmd, UUID.Zero, false); 386 return DoLoad(cmd, UUID.Zero, false);
387 } 387 }
388 } 388 }
389 389
390 public List<EstateSettings> LoadEstateSettingsAll() 390 public List<EstateSettings> LoadEstateSettingsAll()
391 { 391 {
392 List<EstateSettings> estateSettings = new List<EstateSettings>(); 392 List<EstateSettings> estateSettings = new List<EstateSettings>();
393 393
394 List<int> estateIds = GetEstatesAll(); 394 List<int> estateIds = GetEstatesAll();
395 foreach (int estateId in estateIds) 395 foreach (int estateId in estateIds)
396 estateSettings.Add(LoadEstateSettings(estateId)); 396 estateSettings.Add(LoadEstateSettings(estateId));
397 397
398 return estateSettings; 398 return estateSettings;
399 } 399 }
400 400
@@ -421,7 +421,7 @@ namespace OpenSim.Data.SQLite
421 421
422 return result; 422 return result;
423 } 423 }
424 424
425 public List<int> GetEstatesAll() 425 public List<int> GetEstatesAll()
426 { 426 {
427 List<int> result = new List<int>(); 427 List<int> result = new List<int>();
@@ -442,7 +442,7 @@ namespace OpenSim.Data.SQLite
442 } 442 }
443 r.Close(); 443 r.Close();
444 444
445 return result; 445 return result;
446 } 446 }
447 447
448 public List<int> GetEstatesByOwner(UUID ownerID) 448 public List<int> GetEstatesByOwner(UUID ownerID)
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 9fbeb10..a4b84b1 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -189,7 +189,7 @@ namespace OpenSim.Data.SQLite
189 m_Fields[name].SetValue(row, reader[name]); 189 m_Fields[name].SetValue(row, reader[name]);
190 } 190 }
191 } 191 }
192 192
193 if (m_DataField != null) 193 if (m_DataField != null)
194 { 194 {
195 Dictionary<string, string> data = 195 Dictionary<string, string> data =
@@ -268,7 +268,7 @@ namespace OpenSim.Data.SQLite
268 public virtual bool Delete(string field, string key) 268 public virtual bool Delete(string field, string key)
269 { 269 {
270 return Delete(new string[] { field }, new string[] { key }); 270 return Delete(new string[] { field }, new string[] { key });
271 } 271 }
272 272
273 public virtual bool Delete(string[] fields, string[] keys) 273 public virtual bool Delete(string[] fields, string[] keys)
274 { 274 {
diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs
index d8c52f8..987240c 100644
--- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Data.SQLite
43 { 43 {
44// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 public SQLiteGridUserData(string connectionString, string realm) 46 public SQLiteGridUserData(string connectionString, string realm)
47 : base(connectionString, realm, "GridUserStore") {} 47 : base(connectionString, realm, "GridUserStore") {}
48 48
49 public new GridUserData Get(string userID) 49 public new GridUserData Get(string userID)
diff --git a/OpenSim/Data/SQLite/SQLiteHGTravelData.cs b/OpenSim/Data/SQLite/SQLiteHGTravelData.cs
index db288b2..dd34710 100644
--- a/OpenSim/Data/SQLite/SQLiteHGTravelData.cs
+++ b/OpenSim/Data/SQLite/SQLiteHGTravelData.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Data.SQLite
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public SQLiteHGTravelData(string connectionString, string realm) 47 public SQLiteHGTravelData(string connectionString, string realm)
48 : base(connectionString, realm, "HGTravelStore") {} 48 : base(connectionString, realm, "HGTravelStore") {}
49 49
50 public HGTravelingData Get(UUID sessionID) 50 public HGTravelingData Get(UUID sessionID)
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 5cfc202..eec386f 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -707,7 +707,7 @@ namespace OpenSim.Data.SQLite
707 DataRow[] primsForRegion = prims.Select(byRegion); 707 DataRow[] primsForRegion = prims.Select(byRegion);
708// m_log.Info("[SQLITE REGION DB]: Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); 708// m_log.Info("[SQLITE REGION DB]: Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
709 709
710 // First, create all groups 710 // First, create all groups
711 foreach (DataRow primRow in primsForRegion) 711 foreach (DataRow primRow in primsForRegion)
712 { 712 {
713 try 713 try
@@ -733,12 +733,12 @@ namespace OpenSim.Data.SQLite
733 } 733 }
734 734
735 SceneObjectGroup group = new SceneObjectGroup(prim); 735 SceneObjectGroup group = new SceneObjectGroup(prim);
736 736
737 createdObjects.Add(group.UUID, group); 737 createdObjects.Add(group.UUID, group);
738 retvals.Add(group); 738 retvals.Add(group);
739 LoadItems(prim); 739 LoadItems(prim);
740 740
741 741
742 } 742 }
743 } 743 }
744 catch (Exception e) 744 catch (Exception e)
@@ -1298,7 +1298,7 @@ namespace OpenSim.Data.SQLite
1298 createCol(prims, "VolumeDetect", typeof(Int16)); 1298 createCol(prims, "VolumeDetect", typeof(Int16));
1299 1299
1300 createCol(prims, "MediaURL", typeof(String)); 1300 createCol(prims, "MediaURL", typeof(String));
1301 1301
1302 createCol(prims, "AttachedPosX", typeof(Double)); 1302 createCol(prims, "AttachedPosX", typeof(Double));
1303 createCol(prims, "AttachedPosY", typeof(Double)); 1303 createCol(prims, "AttachedPosY", typeof(Double));
1304 createCol(prims, "AttachedPosZ", typeof(Double)); 1304 createCol(prims, "AttachedPosZ", typeof(Double));
@@ -1795,7 +1795,7 @@ namespace OpenSim.Data.SQLite
1795// m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); 1795// m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
1796 prim.MediaUrl = (string)row["MediaURL"]; 1796 prim.MediaUrl = (string)row["MediaURL"];
1797 } 1797 }
1798 1798
1799 prim.AttachedPos = new Vector3( 1799 prim.AttachedPos = new Vector3(
1800 Convert.ToSingle(row["AttachedPosX"]), 1800 Convert.ToSingle(row["AttachedPosX"]),
1801 Convert.ToSingle(row["AttachedPosY"]), 1801 Convert.ToSingle(row["AttachedPosY"]),
@@ -1806,7 +1806,7 @@ namespace OpenSim.Data.SQLite
1806 { 1806 {
1807 //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType()); 1807 //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType());
1808 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); 1808 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1809 } 1809 }
1810 else 1810 else
1811 { 1811 {
1812 prim.DynAttrs = new DAMap(); 1812 prim.DynAttrs = new DAMap();
@@ -1818,7 +1818,7 @@ namespace OpenSim.Data.SQLite
1818 prim.Friction = Convert.ToSingle(row["Friction"]); 1818 prim.Friction = Convert.ToSingle(row["Friction"]);
1819 prim.Restitution = Convert.ToSingle(row["Restitution"]); 1819 prim.Restitution = Convert.ToSingle(row["Restitution"]);
1820 1820
1821 1821
1822 if (!(row["KeyframeMotion"] is DBNull)) 1822 if (!(row["KeyframeMotion"] is DBNull))
1823 { 1823 {
1824 Byte[] data = (byte[])row["KeyframeMotion"]; 1824 Byte[] data = (byte[])row["KeyframeMotion"];
@@ -2532,7 +2532,7 @@ namespace OpenSim.Data.SQLite
2532 2532
2533 if (!(row["Media"] is System.DBNull)) 2533 if (!(row["Media"] is System.DBNull))
2534 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 2534 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
2535 2535
2536 return s; 2536 return s;
2537 } 2537 }
2538 2538
diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
index 91d62ce..1b79185 100644
--- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Data.SQLite
75 } 75 }
76 else 76 else
77 { 77 {
78 cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{3}%')", 78 cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{3}%')",
79 m_Realm, scopeID.ToString(), words[0], words[1]); 79 m_Realm, scopeID.ToString(), words[0], words[1]);
80 } 80 }
81 81
diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
index 2dfdba3..13aac79 100644
--- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
@@ -46,43 +46,43 @@ namespace OpenSim.Data.SQLite
46 { 46 {
47 private static readonly ILog m_log = 47 private static readonly ILog m_log =
48 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 private SqliteConnection m_connection; 50 private SqliteConnection m_connection;
51 private string m_connectionString; 51 private string m_connectionString;
52 52
53 private Dictionary<string, FieldInfo> m_FieldMap = 53 private Dictionary<string, FieldInfo> m_FieldMap =
54 new Dictionary<string, FieldInfo>(); 54 new Dictionary<string, FieldInfo>();
55 55
56 protected virtual Assembly Assembly 56 protected virtual Assembly Assembly
57 { 57 {
58 get { return GetType().Assembly; } 58 get { return GetType().Assembly; }
59 } 59 }
60 60
61 public SQLiteUserProfilesData() 61 public SQLiteUserProfilesData()
62 { 62 {
63 } 63 }
64 64
65 public SQLiteUserProfilesData(string connectionString) 65 public SQLiteUserProfilesData(string connectionString)
66 { 66 {
67 Initialise(connectionString); 67 Initialise(connectionString);
68 } 68 }
69 69
70 public void Initialise(string connectionString) 70 public void Initialise(string connectionString)
71 { 71 {
72 if (Util.IsWindows()) 72 if (Util.IsWindows())
73 Util.LoadArchSpecificWindowsDll("sqlite3.dll"); 73 Util.LoadArchSpecificWindowsDll("sqlite3.dll");
74 74
75 m_connectionString = connectionString; 75 m_connectionString = connectionString;
76 76
77 m_log.Info("[PROFILES_DATA]: Sqlite - connecting: "+m_connectionString); 77 m_log.Info("[PROFILES_DATA]: Sqlite - connecting: "+m_connectionString);
78 78
79 m_connection = new SqliteConnection(m_connectionString); 79 m_connection = new SqliteConnection(m_connectionString);
80 m_connection.Open(); 80 m_connection.Open();
81 81
82 Migration m = new Migration(m_connection, Assembly, "UserProfiles"); 82 Migration m = new Migration(m_connection, Assembly, "UserProfiles");
83 m.Update(); 83 m.Update();
84 } 84 }
85 85
86 private string[] FieldList 86 private string[] FieldList
87 { 87 {
88 get { return new List<string>(m_FieldMap.Keys).ToArray(); } 88 get { return new List<string>(m_FieldMap.Keys).ToArray(); }
@@ -123,7 +123,7 @@ namespace OpenSim.Data.SQLite
123 } 123 }
124 124
125 reader.Close(); 125 reader.Close();
126 126
127 return data; 127 return data;
128 } 128 }
129 public bool UpdateClassifiedRecord(UserClassifiedAdd ad, ref string result) 129 public bool UpdateClassifiedRecord(UserClassifiedAdd ad, ref string result)
@@ -162,21 +162,21 @@ namespace OpenSim.Data.SQLite
162 query += ":ParcelName,"; 162 query += ":ParcelName,";
163 query += ":Flags,"; 163 query += ":Flags,";
164 query += ":ListingPrice ) "; 164 query += ":ListingPrice ) ";
165 165
166 if(string.IsNullOrEmpty(ad.ParcelName)) 166 if(string.IsNullOrEmpty(ad.ParcelName))
167 ad.ParcelName = "Unknown"; 167 ad.ParcelName = "Unknown";
168 if(ad.ParcelId == null) 168 if(ad.ParcelId == null)
169 ad.ParcelId = UUID.Zero; 169 ad.ParcelId = UUID.Zero;
170 if(string.IsNullOrEmpty(ad.Description)) 170 if(string.IsNullOrEmpty(ad.Description))
171 ad.Description = "No Description"; 171 ad.Description = "No Description";
172 172
173 DateTime epoch = new DateTime(1970, 1, 1); 173 DateTime epoch = new DateTime(1970, 1, 1);
174 DateTime now = DateTime.Now; 174 DateTime now = DateTime.Now;
175 TimeSpan epochnow = now - epoch; 175 TimeSpan epochnow = now - epoch;
176 TimeSpan duration; 176 TimeSpan duration;
177 DateTime expiration; 177 DateTime expiration;
178 TimeSpan epochexp; 178 TimeSpan epochexp;
179 179
180 if(ad.Flags == 2) 180 if(ad.Flags == 2)
181 { 181 {
182 duration = new TimeSpan(7,0,0,0); 182 duration = new TimeSpan(7,0,0,0);
@@ -211,7 +211,7 @@ namespace OpenSim.Data.SQLite
211 cmd.Parameters.AddWithValue(":ParcelName", ad.ParcelName.ToString()); 211 cmd.Parameters.AddWithValue(":ParcelName", ad.ParcelName.ToString());
212 cmd.Parameters.AddWithValue(":Flags", ad.Flags.ToString()); 212 cmd.Parameters.AddWithValue(":Flags", ad.Flags.ToString());
213 cmd.Parameters.AddWithValue(":ListingPrice", ad.Price.ToString ()); 213 cmd.Parameters.AddWithValue(":ListingPrice", ad.Price.ToString ());
214 214
215 cmd.ExecuteNonQuery(); 215 cmd.ExecuteNonQuery();
216 } 216 }
217 } 217 }
@@ -227,17 +227,17 @@ namespace OpenSim.Data.SQLite
227 public bool DeleteClassifiedRecord(UUID recordId) 227 public bool DeleteClassifiedRecord(UUID recordId)
228 { 228 {
229 string query = string.Empty; 229 string query = string.Empty;
230 230
231 query += "DELETE FROM classifieds WHERE "; 231 query += "DELETE FROM classifieds WHERE ";
232 query += "classifieduuid = :ClasifiedId"; 232 query += "classifieduuid = :ClasifiedId";
233 233
234 try 234 try
235 { 235 {
236 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 236 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
237 { 237 {
238 cmd.CommandText = query; 238 cmd.CommandText = query;
239 cmd.Parameters.AddWithValue(":ClassifiedId", recordId.ToString()); 239 cmd.Parameters.AddWithValue(":ClassifiedId", recordId.ToString());
240 240
241 cmd.ExecuteNonQuery(); 241 cmd.ExecuteNonQuery();
242 } 242 }
243 } 243 }
@@ -254,17 +254,17 @@ namespace OpenSim.Data.SQLite
254 { 254 {
255 IDataReader reader = null; 255 IDataReader reader = null;
256 string query = string.Empty; 256 string query = string.Empty;
257 257
258 query += "SELECT * FROM classifieds WHERE "; 258 query += "SELECT * FROM classifieds WHERE ";
259 query += "classifieduuid = :AdId"; 259 query += "classifieduuid = :AdId";
260 260
261 try 261 try
262 { 262 {
263 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 263 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
264 { 264 {
265 cmd.CommandText = query; 265 cmd.CommandText = query;
266 cmd.Parameters.AddWithValue(":AdId", ad.ClassifiedId.ToString()); 266 cmd.Parameters.AddWithValue(":AdId", ad.ClassifiedId.ToString());
267 267
268 using (reader = cmd.ExecuteReader()) 268 using (reader = cmd.ExecuteReader())
269 { 269 {
270 if(reader.Read ()) 270 if(reader.Read ())
@@ -299,24 +299,24 @@ namespace OpenSim.Data.SQLite
299 { 299 {
300 IDataReader reader = null; 300 IDataReader reader = null;
301 string query = string.Empty; 301 string query = string.Empty;
302 302
303 query += "SELECT `pickuuid`,`name` FROM userpicks WHERE "; 303 query += "SELECT `pickuuid`,`name` FROM userpicks WHERE ";
304 query += "creatoruuid = :Id"; 304 query += "creatoruuid = :Id";
305 OSDArray data = new OSDArray(); 305 OSDArray data = new OSDArray();
306 306
307 try 307 try
308 { 308 {
309 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 309 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
310 { 310 {
311 cmd.CommandText = query; 311 cmd.CommandText = query;
312 cmd.Parameters.AddWithValue(":Id", avatarId.ToString()); 312 cmd.Parameters.AddWithValue(":Id", avatarId.ToString());
313 313
314 using (reader = cmd.ExecuteReader()) 314 using (reader = cmd.ExecuteReader())
315 { 315 {
316 while (reader.Read()) 316 while (reader.Read())
317 { 317 {
318 OSDMap record = new OSDMap(); 318 OSDMap record = new OSDMap();
319 319
320 record.Add("pickuuid",OSD.FromString((string)reader["pickuuid"])); 320 record.Add("pickuuid",OSD.FromString((string)reader["pickuuid"]));
321 record.Add("name",OSD.FromString((string)reader["name"])); 321 record.Add("name",OSD.FromString((string)reader["name"]));
322 data.Add(record); 322 data.Add(record);
@@ -336,11 +336,11 @@ namespace OpenSim.Data.SQLite
336 IDataReader reader = null; 336 IDataReader reader = null;
337 string query = string.Empty; 337 string query = string.Empty;
338 UserProfilePick pick = new UserProfilePick(); 338 UserProfilePick pick = new UserProfilePick();
339 339
340 query += "SELECT * FROM userpicks WHERE "; 340 query += "SELECT * FROM userpicks WHERE ";
341 query += "creatoruuid = :CreatorId AND "; 341 query += "creatoruuid = :CreatorId AND ";
342 query += "pickuuid = :PickId"; 342 query += "pickuuid = :PickId";
343 343
344 try 344 try
345 { 345 {
346 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 346 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -348,17 +348,17 @@ namespace OpenSim.Data.SQLite
348 cmd.CommandText = query; 348 cmd.CommandText = query;
349 cmd.Parameters.AddWithValue(":CreatorId", avatarId.ToString()); 349 cmd.Parameters.AddWithValue(":CreatorId", avatarId.ToString());
350 cmd.Parameters.AddWithValue(":PickId", pickId.ToString()); 350 cmd.Parameters.AddWithValue(":PickId", pickId.ToString());
351 351
352 using (reader = cmd.ExecuteReader()) 352 using (reader = cmd.ExecuteReader())
353 { 353 {
354 354
355 while (reader.Read()) 355 while (reader.Read())
356 { 356 {
357 string description = (string)reader["description"]; 357 string description = (string)reader["description"];
358 358
359 if (string.IsNullOrEmpty(description)) 359 if (string.IsNullOrEmpty(description))
360 description = "No description given."; 360 description = "No description given.";
361 361
362 UUID.TryParse((string)reader["pickuuid"], out pick.PickId); 362 UUID.TryParse((string)reader["pickuuid"], out pick.PickId);
363 UUID.TryParse((string)reader["creatoruuid"], out pick.CreatorId); 363 UUID.TryParse((string)reader["creatoruuid"], out pick.CreatorId);
364 UUID.TryParse((string)reader["parceluuid"], out pick.ParcelId); 364 UUID.TryParse((string)reader["parceluuid"], out pick.ParcelId);
@@ -385,7 +385,7 @@ namespace OpenSim.Data.SQLite
385 } 385 }
386 386
387 public bool UpdatePicksRecord(UserProfilePick pick) 387 public bool UpdatePicksRecord(UserProfilePick pick)
388 { 388 {
389 string query = string.Empty; 389 string query = string.Empty;
390 390
391 query += "INSERT OR REPLACE INTO userpicks ("; 391 query += "INSERT OR REPLACE INTO userpicks (";
@@ -416,7 +416,7 @@ namespace OpenSim.Data.SQLite
416 query += ":GlobalPos,"; 416 query += ":GlobalPos,";
417 query += ":SortOrder,"; 417 query += ":SortOrder,";
418 query += ":Enabled) "; 418 query += ":Enabled) ";
419 419
420 try 420 try
421 { 421 {
422 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 422 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -456,10 +456,10 @@ namespace OpenSim.Data.SQLite
456 public bool DeletePicksRecord(UUID pickId) 456 public bool DeletePicksRecord(UUID pickId)
457 { 457 {
458 string query = string.Empty; 458 string query = string.Empty;
459 459
460 query += "DELETE FROM userpicks WHERE "; 460 query += "DELETE FROM userpicks WHERE ";
461 query += "pickuuid = :PickId"; 461 query += "pickuuid = :PickId";
462 462
463 try 463 try
464 { 464 {
465 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 465 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -479,15 +479,15 @@ namespace OpenSim.Data.SQLite
479 } 479 }
480 480
481 public bool GetAvatarNotes(ref UserProfileNotes notes) 481 public bool GetAvatarNotes(ref UserProfileNotes notes)
482 { 482 {
483 IDataReader reader = null; 483 IDataReader reader = null;
484 string query = string.Empty; 484 string query = string.Empty;
485 485
486 query += "SELECT `notes` FROM usernotes WHERE "; 486 query += "SELECT `notes` FROM usernotes WHERE ";
487 query += "useruuid = :Id AND "; 487 query += "useruuid = :Id AND ";
488 query += "targetuuid = :TargetId"; 488 query += "targetuuid = :TargetId";
489 OSDArray data = new OSDArray(); 489 OSDArray data = new OSDArray();
490 490
491 try 491 try
492 { 492 {
493 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 493 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -495,7 +495,7 @@ namespace OpenSim.Data.SQLite
495 cmd.CommandText = query; 495 cmd.CommandText = query;
496 cmd.Parameters.AddWithValue(":Id", notes.UserId.ToString()); 496 cmd.Parameters.AddWithValue(":Id", notes.UserId.ToString());
497 cmd.Parameters.AddWithValue(":TargetId", notes.TargetId.ToString()); 497 cmd.Parameters.AddWithValue(":TargetId", notes.TargetId.ToString());
498 498
499 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 499 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
500 { 500 {
501 while (reader.Read()) 501 while (reader.Read())
@@ -514,10 +514,10 @@ namespace OpenSim.Data.SQLite
514 } 514 }
515 515
516 public bool UpdateAvatarNotes(ref UserProfileNotes note, ref string result) 516 public bool UpdateAvatarNotes(ref UserProfileNotes note, ref string result)
517 { 517 {
518 string query = string.Empty; 518 string query = string.Empty;
519 bool remove; 519 bool remove;
520 520
521 if(string.IsNullOrEmpty(note.Notes)) 521 if(string.IsNullOrEmpty(note.Notes))
522 { 522 {
523 remove = true; 523 remove = true;
@@ -533,7 +533,7 @@ namespace OpenSim.Data.SQLite
533 query += ":TargetId,"; 533 query += ":TargetId,";
534 query += ":Notes )"; 534 query += ":Notes )";
535 } 535 }
536 536
537 try 537 try
538 { 538 {
539 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 539 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -544,7 +544,7 @@ namespace OpenSim.Data.SQLite
544 cmd.Parameters.AddWithValue(":Notes", note.Notes); 544 cmd.Parameters.AddWithValue(":Notes", note.Notes);
545 cmd.Parameters.AddWithValue(":TargetId", note.TargetId.ToString ()); 545 cmd.Parameters.AddWithValue(":TargetId", note.TargetId.ToString ());
546 cmd.Parameters.AddWithValue(":UserId", note.UserId.ToString()); 546 cmd.Parameters.AddWithValue(":UserId", note.UserId.ToString());
547 547
548 cmd.ExecuteNonQuery(); 548 cmd.ExecuteNonQuery();
549 } 549 }
550 } 550 }
@@ -561,7 +561,7 @@ namespace OpenSim.Data.SQLite
561 { 561 {
562 IDataReader reader = null; 562 IDataReader reader = null;
563 string query = string.Empty; 563 string query = string.Empty;
564 564
565 query += "SELECT * FROM userprofile WHERE "; 565 query += "SELECT * FROM userprofile WHERE ";
566 query += "useruuid = :Id"; 566 query += "useruuid = :Id";
567 567
@@ -569,7 +569,7 @@ namespace OpenSim.Data.SQLite
569 { 569 {
570 cmd.CommandText = query; 570 cmd.CommandText = query;
571 cmd.Parameters.AddWithValue(":Id", props.UserId.ToString()); 571 cmd.Parameters.AddWithValue(":Id", props.UserId.ToString());
572 572
573 573
574 try 574 try
575 { 575 {
@@ -611,7 +611,7 @@ namespace OpenSim.Data.SQLite
611 props.Language = string.Empty; 611 props.Language = string.Empty;
612 props.PublishProfile = false; 612 props.PublishProfile = false;
613 props.PublishMature = false; 613 props.PublishMature = false;
614 614
615 query = "INSERT INTO userprofile ("; 615 query = "INSERT INTO userprofile (";
616 query += "useruuid, "; 616 query += "useruuid, ";
617 query += "profilePartner, "; 617 query += "profilePartner, ";
@@ -659,7 +659,7 @@ namespace OpenSim.Data.SQLite
659 put.Parameters.AddWithValue(":profileAboutText", props.AboutText); 659 put.Parameters.AddWithValue(":profileAboutText", props.AboutText);
660 put.Parameters.AddWithValue(":profileFirstImage", props.FirstLifeImageId.ToString()); 660 put.Parameters.AddWithValue(":profileFirstImage", props.FirstLifeImageId.ToString());
661 put.Parameters.AddWithValue(":profileFirstText", props.FirstLifeText); 661 put.Parameters.AddWithValue(":profileFirstText", props.FirstLifeText);
662 662
663 put.ExecuteNonQuery(); 663 put.ExecuteNonQuery();
664 } 664 }
665 } 665 }
@@ -668,9 +668,9 @@ namespace OpenSim.Data.SQLite
668 } 668 }
669 669
670 public bool UpdateAvatarProperties(ref UserProfileProperties props, ref string result) 670 public bool UpdateAvatarProperties(ref UserProfileProperties props, ref string result)
671 { 671 {
672 string query = string.Empty; 672 string query = string.Empty;
673 673
674 query += "UPDATE userprofile SET "; 674 query += "UPDATE userprofile SET ";
675 query += "profileURL=:profileURL, "; 675 query += "profileURL=:profileURL, ";
676 query += "profileImage=:image, "; 676 query += "profileImage=:image, ";
@@ -678,7 +678,7 @@ namespace OpenSim.Data.SQLite
678 query += "profileFirstImage=:firstlifeimage,"; 678 query += "profileFirstImage=:firstlifeimage,";
679 query += "profileFirstText=:firstlifetext "; 679 query += "profileFirstText=:firstlifetext ";
680 query += "WHERE useruuid=:uuid"; 680 query += "WHERE useruuid=:uuid";
681 681
682 try 682 try
683 { 683 {
684 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 684 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -690,7 +690,7 @@ namespace OpenSim.Data.SQLite
690 cmd.Parameters.AddWithValue(":firstlifeimage", props.FirstLifeImageId.ToString()); 690 cmd.Parameters.AddWithValue(":firstlifeimage", props.FirstLifeImageId.ToString());
691 cmd.Parameters.AddWithValue(":firstlifetext", props.FirstLifeText); 691 cmd.Parameters.AddWithValue(":firstlifetext", props.FirstLifeText);
692 cmd.Parameters.AddWithValue(":uuid", props.UserId.ToString()); 692 cmd.Parameters.AddWithValue(":uuid", props.UserId.ToString());
693 693
694 cmd.ExecuteNonQuery(); 694 cmd.ExecuteNonQuery();
695 } 695 }
696 } 696 }
@@ -698,16 +698,16 @@ namespace OpenSim.Data.SQLite
698 { 698 {
699 m_log.ErrorFormat("[PROFILES_DATA]" + 699 m_log.ErrorFormat("[PROFILES_DATA]" +
700 ": AgentPropertiesUpdate exception {0}", e.Message); 700 ": AgentPropertiesUpdate exception {0}", e.Message);
701 701
702 return false; 702 return false;
703 } 703 }
704 return true; 704 return true;
705 } 705 }
706 706
707 public bool UpdateAvatarInterests(UserProfileProperties up, ref string result) 707 public bool UpdateAvatarInterests(UserProfileProperties up, ref string result)
708 { 708 {
709 string query = string.Empty; 709 string query = string.Empty;
710 710
711 query += "UPDATE userprofile SET "; 711 query += "UPDATE userprofile SET ";
712 query += "profileWantToMask=:WantMask, "; 712 query += "profileWantToMask=:WantMask, ";
713 query += "profileWantToText=:WantText,"; 713 query += "profileWantToText=:WantText,";
@@ -715,7 +715,7 @@ namespace OpenSim.Data.SQLite
715 query += "profileSkillsText=:SkillsText, "; 715 query += "profileSkillsText=:SkillsText, ";
716 query += "profileLanguages=:Languages "; 716 query += "profileLanguages=:Languages ";
717 query += "WHERE useruuid=:uuid"; 717 query += "WHERE useruuid=:uuid";
718 718
719 try 719 try
720 { 720 {
721 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 721 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -727,7 +727,7 @@ namespace OpenSim.Data.SQLite
727 cmd.Parameters.AddWithValue(":SkillsText", up.SkillsText); 727 cmd.Parameters.AddWithValue(":SkillsText", up.SkillsText);
728 cmd.Parameters.AddWithValue(":Languages", up.Language); 728 cmd.Parameters.AddWithValue(":Languages", up.Language);
729 cmd.Parameters.AddWithValue(":uuid", up.UserId.ToString()); 729 cmd.Parameters.AddWithValue(":uuid", up.UserId.ToString());
730 730
731 cmd.ExecuteNonQuery(); 731 cmd.ExecuteNonQuery();
732 } 732 }
733 } 733 }
@@ -741,17 +741,17 @@ namespace OpenSim.Data.SQLite
741 return true; 741 return true;
742 } 742 }
743 743
744 744
745 public bool UpdateUserPreferences(ref UserPreferences pref, ref string result) 745 public bool UpdateUserPreferences(ref UserPreferences pref, ref string result)
746 { 746 {
747 string query = string.Empty; 747 string query = string.Empty;
748 748
749 query += "UPDATE usersettings SET "; 749 query += "UPDATE usersettings SET ";
750 query += "imviaemail=:ImViaEmail, "; 750 query += "imviaemail=:ImViaEmail, ";
751 query += "visible=:Visible, "; 751 query += "visible=:Visible, ";
752 query += "email=:EMail "; 752 query += "email=:EMail ";
753 query += "WHERE useruuid=:uuid"; 753 query += "WHERE useruuid=:uuid";
754 754
755 try 755 try
756 { 756 {
757 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 757 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -761,7 +761,7 @@ namespace OpenSim.Data.SQLite
761 cmd.Parameters.AddWithValue(":Visible", pref.Visible); 761 cmd.Parameters.AddWithValue(":Visible", pref.Visible);
762 cmd.Parameters.AddWithValue(":EMail", pref.EMail); 762 cmd.Parameters.AddWithValue(":EMail", pref.EMail);
763 cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString()); 763 cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString());
764 764
765 cmd.ExecuteNonQuery(); 765 cmd.ExecuteNonQuery();
766 } 766 }
767 } 767 }
@@ -779,20 +779,20 @@ namespace OpenSim.Data.SQLite
779 { 779 {
780 IDataReader reader = null; 780 IDataReader reader = null;
781 string query = string.Empty; 781 string query = string.Empty;
782 782
783 query += "SELECT imviaemail,visible,email FROM "; 783 query += "SELECT imviaemail,visible,email FROM ";
784 query += "usersettings WHERE "; 784 query += "usersettings WHERE ";
785 query += "useruuid = :Id"; 785 query += "useruuid = :Id";
786 786
787 OSDArray data = new OSDArray(); 787 OSDArray data = new OSDArray();
788 788
789 try 789 try
790 { 790 {
791 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 791 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
792 { 792 {
793 cmd.CommandText = query; 793 cmd.CommandText = query;
794 cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString()); 794 cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString());
795 795
796 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 796 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
797 { 797 {
798 if(reader.Read()) 798 if(reader.Read())
@@ -805,13 +805,13 @@ namespace OpenSim.Data.SQLite
805 { 805 {
806 query = "INSERT INTO usersettings VALUES "; 806 query = "INSERT INTO usersettings VALUES ";
807 query += "(:Id,'false','false', :Email)"; 807 query += "(:Id,'false','false', :Email)";
808 808
809 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) 809 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand())
810 { 810 {
811 put.Parameters.AddWithValue(":Id", pref.UserId.ToString()); 811 put.Parameters.AddWithValue(":Id", pref.UserId.ToString());
812 put.Parameters.AddWithValue(":Email", pref.EMail); 812 put.Parameters.AddWithValue(":Email", pref.EMail);
813 put.ExecuteNonQuery(); 813 put.ExecuteNonQuery();
814 814
815 } 815 }
816 } 816 }
817 } 817 }
@@ -831,11 +831,11 @@ namespace OpenSim.Data.SQLite
831 { 831 {
832 IDataReader reader = null; 832 IDataReader reader = null;
833 string query = string.Empty; 833 string query = string.Empty;
834 834
835 query += "SELECT * FROM `userdata` WHERE "; 835 query += "SELECT * FROM `userdata` WHERE ";
836 query += "UserId = :Id AND "; 836 query += "UserId = :Id AND ";
837 query += "TagId = :TagId"; 837 query += "TagId = :TagId";
838 838
839 try 839 try
840 { 840 {
841 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 841 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -843,7 +843,7 @@ namespace OpenSim.Data.SQLite
843 cmd.CommandText = query; 843 cmd.CommandText = query;
844 cmd.Parameters.AddWithValue(":Id", props.UserId.ToString()); 844 cmd.Parameters.AddWithValue(":Id", props.UserId.ToString());
845 cmd.Parameters.AddWithValue (":TagId", props.TagId.ToString()); 845 cmd.Parameters.AddWithValue (":TagId", props.TagId.ToString());
846 846
847 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 847 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
848 { 848 {
849 if(reader.Read()) 849 if(reader.Read())
@@ -858,7 +858,7 @@ namespace OpenSim.Data.SQLite
858 query += ":TagId,"; 858 query += ":TagId,";
859 query += ":DataKey,"; 859 query += ":DataKey,";
860 query += ":DataVal) "; 860 query += ":DataVal) ";
861 861
862 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) 862 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand())
863 { 863 {
864 put.Parameters.AddWithValue(":Id", props.UserId.ToString()); 864 put.Parameters.AddWithValue(":Id", props.UserId.ToString());
@@ -882,16 +882,16 @@ namespace OpenSim.Data.SQLite
882 return true; 882 return true;
883 } 883 }
884 public bool SetUserAppData(UserAppData props, ref string result) 884 public bool SetUserAppData(UserAppData props, ref string result)
885 { 885 {
886 string query = string.Empty; 886 string query = string.Empty;
887 887
888 query += "UPDATE userdata SET "; 888 query += "UPDATE userdata SET ";
889 query += "TagId = :TagId, "; 889 query += "TagId = :TagId, ";
890 query += "DataKey = :DataKey, "; 890 query += "DataKey = :DataKey, ";
891 query += "DataVal = :DataVal WHERE "; 891 query += "DataVal = :DataVal WHERE ";
892 query += "UserId = :UserId AND "; 892 query += "UserId = :UserId AND ";
893 query += "TagId = :TagId"; 893 query += "TagId = :TagId";
894 894
895 try 895 try
896 { 896 {
897 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 897 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
@@ -918,17 +918,17 @@ namespace OpenSim.Data.SQLite
918 IDataReader reader = null; 918 IDataReader reader = null;
919 OSDArray data = new OSDArray(); 919 OSDArray data = new OSDArray();
920 string query = "SELECT `snapshotuuid` FROM {0} WHERE `creatoruuid` = :Id"; 920 string query = "SELECT `snapshotuuid` FROM {0} WHERE `creatoruuid` = :Id";
921 921
922 // Get classified image assets 922 // Get classified image assets
923 923
924 924
925 try 925 try
926 { 926 {
927 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 927 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
928 { 928 {
929 cmd.CommandText = query; 929 cmd.CommandText = query;
930 cmd.Parameters.AddWithValue(":Id", avatarId.ToString()); 930 cmd.Parameters.AddWithValue(":Id", avatarId.ToString());
931 931
932 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 932 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
933 { 933 {
934 while(reader.Read()) 934 while(reader.Read())
@@ -942,7 +942,7 @@ namespace OpenSim.Data.SQLite
942 { 942 {
943 cmd.CommandText = query; 943 cmd.CommandText = query;
944 cmd.Parameters.AddWithValue(":Id", avatarId.ToString()); 944 cmd.Parameters.AddWithValue(":Id", avatarId.ToString());
945 945
946 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 946 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
947 { 947 {
948 if(reader.Read()) 948 if(reader.Read())
@@ -951,14 +951,14 @@ namespace OpenSim.Data.SQLite
951 } 951 }
952 } 952 }
953 } 953 }
954 954
955 query = "SELECT `profileImage`, `profileFirstImage` FROM `userprofile` WHERE `useruuid` = :Id"; 955 query = "SELECT `profileImage`, `profileFirstImage` FROM `userprofile` WHERE `useruuid` = :Id";
956 956
957 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) 957 using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand())
958 { 958 {
959 cmd.CommandText = query; 959 cmd.CommandText = query;
960 cmd.Parameters.AddWithValue(":Id", avatarId.ToString()); 960 cmd.Parameters.AddWithValue(":Id", avatarId.ToString());
961 961
962 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) 962 using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
963 { 963 {
964 if(reader.Read()) 964 if(reader.Read())
diff --git a/OpenSim/Data/SQLite/SQLiteUtils.cs b/OpenSim/Data/SQLite/SQLiteUtils.cs
index ca5861f..1218ebb 100644
--- a/OpenSim/Data/SQLite/SQLiteUtils.cs
+++ b/OpenSim/Data/SQLite/SQLiteUtils.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Data.SQLite
49 **********************************************************************/ 49 **********************************************************************/
50 50
51 /// <summary> 51 /// <summary>
52 /// 52 ///
53 /// </summary> 53 /// </summary>
54 /// <param name="dt"></param> 54 /// <param name="dt"></param>
55 /// <param name="name"></param> 55 /// <param name="name"></param>
@@ -147,7 +147,7 @@ namespace OpenSim.Data.SQLite
147 } 147 }
148 148
149 /// <summary> 149 /// <summary>
150 /// 150 ///
151 /// </summary> 151 /// </summary>
152 /// <param name="dt">Data Table</param> 152 /// <param name="dt">Data Table</param>
153 /// <returns></returns> 153 /// <returns></returns>
@@ -191,7 +191,7 @@ namespace OpenSim.Data.SQLite
191 /// lines for defining SqliteParameters to 2 parameters: 191 /// lines for defining SqliteParameters to 2 parameters:
192 /// column name and database type. 192 /// column name and database type.
193 /// </para> 193 /// </para>
194 /// 194 ///
195 /// <para> 195 /// <para>
196 /// It assumes certain conventions like :param as the param 196 /// It assumes certain conventions like :param as the param
197 /// name to replace in parametrized queries, and that source 197 /// name to replace in parametrized queries, and that source
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
index 2a0a8f6..7f44a65 100644
--- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
+++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Data.SQLite
107 public bool DeleteItems(string[] fields, string[] vals) 107 public bool DeleteItems(string[] fields, string[] vals)
108 { 108 {
109 return m_Items.Delete(fields, vals); 109 return m_Items.Delete(fields, vals);
110 } 110 }
111 111
112 public bool MoveItem(string id, string newParent) 112 public bool MoveItem(string id, string newParent)
113 { 113 {
@@ -302,7 +302,7 @@ namespace OpenSim.Data.SQLite
302 { 302 {
303// m_log.DebugFormat("[MYSQL ITEM HANDLER]: Incrementing version on folder {0}", folderID); 303// m_log.DebugFormat("[MYSQL ITEM HANDLER]: Incrementing version on folder {0}", folderID);
304// Util.PrintCallStack(); 304// Util.PrintCallStack();
305 305
306 using (SqliteCommand cmd = new SqliteCommand()) 306 using (SqliteCommand cmd = new SqliteCommand())
307 { 307 {
308 cmd.CommandText = "update inventoryfolders set version=version+1 where folderID = ?folderID"; 308 cmd.CommandText = "update inventoryfolders set version=version+1 where folderID = ?folderID";
diff --git a/OpenSim/Data/Tests/AssetTests.cs b/OpenSim/Data/Tests/AssetTests.cs
index 5982a09..70880cf 100644
--- a/OpenSim/Data/Tests/AssetTests.cs
+++ b/OpenSim/Data/Tests/AssetTests.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Data.Tests
110 public void T010_StoreReadVerifyAssets() 110 public void T010_StoreReadVerifyAssets()
111 { 111 {
112 TestHelpers.InMethod(); 112 TestHelpers.InMethod();
113 113
114 AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString()); 114 AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1.ToString());
115 AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString()); 115 AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2.ToString());
116 AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString()); 116 AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3.ToString());
@@ -128,7 +128,7 @@ namespace OpenSim.Data.Tests
128 a1.UploadAttempts = 0; 128 a1.UploadAttempts = 0;
129 a2.UploadAttempts = 0; 129 a2.UploadAttempts = 0;
130 a3.UploadAttempts = 0; 130 a3.UploadAttempts = 0;
131 131
132 AssetBase a1a = m_db.GetAsset(uuid1); 132 AssetBase a1a = m_db.GetAsset(uuid1);
133 a1a.UploadAttempts = 0; 133 a1a.UploadAttempts = 0;
134 Assert.That(a1a, Constraints.PropertyCompareConstraint(a1)); 134 Assert.That(a1a, Constraints.PropertyCompareConstraint(a1));
@@ -190,7 +190,7 @@ namespace OpenSim.Data.Tests
190 public void T020_CheckForWeirdCreatorID() 190 public void T020_CheckForWeirdCreatorID()
191 { 191 {
192 TestHelpers.InMethod(); 192 TestHelpers.InMethod();
193 193
194 // It is expected that eventually the CreatorID might be an arbitrary string (an URI) 194 // It is expected that eventually the CreatorID might be an arbitrary string (an URI)
195 // rather than a valid UUID (?). This test is to make sure that the database layer does not 195 // rather than a valid UUID (?). This test is to make sure that the database layer does not
196 // attempt to convert CreatorID to GUID, but just passes it both ways as a string. 196 // attempt to convert CreatorID to GUID, but just passes it both ways as a string.
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs
index acfebd0..79691e4 100644
--- a/OpenSim/Data/Tests/BasicDataServiceTest.cs
+++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs
@@ -41,11 +41,11 @@ using System.Reflection;
41 41
42namespace OpenSim.Data.Tests 42namespace OpenSim.Data.Tests
43{ 43{
44 /// <summary>This is a base class for testing any Data service for any DBMS. 44 /// <summary>This is a base class for testing any Data service for any DBMS.
45 /// Requires NUnit 2.5 or better (to support the generics). 45 /// Requires NUnit 2.5 or better (to support the generics).
46 /// </summary> 46 /// </summary>
47 /// <remarks> 47 /// <remarks>
48 /// FIXME: Should extend OpenSimTestCase but compile on mono 2.4.3 currently fails with 48 /// FIXME: Should extend OpenSimTestCase but compile on mono 2.4.3 currently fails with
49 /// AssetTests`2 : System.MemberAccessException : Cannot create an instance of OpenSim.Data.Tests.AssetTests`2[TConn,TAssetData] because Type.ContainsGenericParameters is true. 49 /// AssetTests`2 : System.MemberAccessException : Cannot create an instance of OpenSim.Data.Tests.AssetTests`2[TConn,TAssetData] because Type.ContainsGenericParameters is true.
50 /// and similar on EstateTests, InventoryTests and RegionTests. 50 /// and similar on EstateTests, InventoryTests and RegionTests.
51 /// Runs fine with mono 2.10.8.1, so easiest thing is to wait until min Mono version uplifts. 51 /// Runs fine with mono 2.10.8.1, so easiest thing is to wait until min Mono version uplifts.
@@ -60,7 +60,7 @@ namespace OpenSim.Data.Tests
60 private TService m_service; 60 private TService m_service;
61 private string m_file; 61 private string m_file;
62 62
63 // TODO: Is this in the right place here? 63 // TODO: Is this in the right place here?
64 // Later: apparently it's not, but does it matter here? 64 // Later: apparently it's not, but does it matter here?
65// protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 65// protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
66 66
@@ -68,7 +68,7 @@ namespace OpenSim.Data.Tests
68 68
69 public BasicDataServiceTest() 69 public BasicDataServiceTest()
70 : this("") 70 : this("")
71 { 71 {
72 } 72 }
73 73
74 public BasicDataServiceTest(string conn) 74 public BasicDataServiceTest(string conn)
@@ -226,7 +226,7 @@ namespace OpenSim.Data.Tests
226 } 226 }
227 } 227 }
228 228
229 /// <summary>Clear tables listed as parameters (without dropping them). 229 /// <summary>Clear tables listed as parameters (without dropping them).
230 /// </summary> 230 /// </summary>
231 /// <param name="tables"></param> 231 /// <param name="tables"></param>
232 protected virtual void ResetMigrations(params string[] stores) 232 protected virtual void ResetMigrations(params string[] stores)
@@ -251,7 +251,7 @@ namespace OpenSim.Data.Tests
251 } 251 }
252 } 252 }
253 253
254 /// <summary>Clear tables listed as parameters (without dropping them). 254 /// <summary>Clear tables listed as parameters (without dropping them).
255 /// </summary> 255 /// </summary>
256 /// <param name="tables"></param> 256 /// <param name="tables"></param>
257 protected virtual void ClearTables(params string[] tables) 257 protected virtual void ClearTables(params string[] tables)
diff --git a/OpenSim/Data/Tests/DefaultTestConns.cs b/OpenSim/Data/Tests/DefaultTestConns.cs
index 7c47bdd..5ad238b 100644
--- a/OpenSim/Data/Tests/DefaultTestConns.cs
+++ b/OpenSim/Data/Tests/DefaultTestConns.cs
@@ -39,16 +39,16 @@ namespace OpenSim.Data.Tests
39 /// a connection string for testing one of the supported databases. 39 /// a connection string for testing one of the supported databases.
40 /// The connections must be in the section [TestConnections] with names matching the connection class 40 /// The connections must be in the section [TestConnections] with names matching the connection class
41 /// name for the specific database, e.g.: 41 /// name for the specific database, e.g.:
42 /// 42 ///
43 /// [TestConnections] 43 /// [TestConnections]
44 /// MySqlConnection="..." 44 /// MySqlConnection="..."
45 /// SqlConnection="..." 45 /// SqlConnection="..."
46 /// SqliteConnection="..." 46 /// SqliteConnection="..."
47 /// 47 ///
48 /// Note that the conn string may also be set explicitly in the [TestCase()] attribute of test classes 48 /// Note that the conn string may also be set explicitly in the [TestCase()] attribute of test classes
49 /// based on BasicDataServiceTest.cs. 49 /// based on BasicDataServiceTest.cs.
50 /// </summary> 50 /// </summary>
51 51
52 static class DefaultTestConns 52 static class DefaultTestConns
53 { 53 {
54 private static Dictionary<Type, string> conns = new Dictionary<Type, string>(); 54 private static Dictionary<Type, string> conns = new Dictionary<Type, string>();
@@ -63,8 +63,8 @@ namespace OpenSim.Data.Tests
63 Assembly asm = Assembly.GetExecutingAssembly(); 63 Assembly asm = Assembly.GetExecutingAssembly();
64 string sType = connType.Name; 64 string sType = connType.Name;
65 65
66 // Note: when running from NUnit, the DLL is located in some temp dir, so how do we get 66 // Note: when running from NUnit, the DLL is located in some temp dir, so how do we get
67 // to the INI file? Ok, so put it into the resources! 67 // to the INI file? Ok, so put it into the resources!
68 // string iniName = Path.Combine(Path.GetDirectoryName(asm.Location), "TestDataConnections.ini"); 68 // string iniName = Path.Combine(Path.GetDirectoryName(asm.Location), "TestDataConnections.ini");
69 69
70 string[] allres = asm.GetManifestResourceNames(); 70 string[] allres = asm.GetManifestResourceNames();
diff --git a/OpenSim/Data/Tests/EstateTests.cs b/OpenSim/Data/Tests/EstateTests.cs
index e2b2d12..cf3f2b4 100644
--- a/OpenSim/Data/Tests/EstateTests.cs
+++ b/OpenSim/Data/Tests/EstateTests.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Data.Tests
100 public void T010_EstateSettingsSimpleStorage_MinimumParameterSet() 100 public void T010_EstateSettingsSimpleStorage_MinimumParameterSet()
101 { 101 {
102 TestHelpers.InMethod(); 102 TestHelpers.InMethod();
103 103
104 EstateSettingsSimpleStorage( 104 EstateSettingsSimpleStorage(
105 REGION_ID, 105 REGION_ID,
106 DataTestUtil.STRING_MIN, 106 DataTestUtil.STRING_MIN,
@@ -133,7 +133,7 @@ namespace OpenSim.Data.Tests
133 public void T011_EstateSettingsSimpleStorage_MaximumParameterSet() 133 public void T011_EstateSettingsSimpleStorage_MaximumParameterSet()
134 { 134 {
135 TestHelpers.InMethod(); 135 TestHelpers.InMethod();
136 136
137 EstateSettingsSimpleStorage( 137 EstateSettingsSimpleStorage(
138 REGION_ID, 138 REGION_ID,
139 DataTestUtil.STRING_MAX(64), 139 DataTestUtil.STRING_MAX(64),
@@ -166,7 +166,7 @@ namespace OpenSim.Data.Tests
166 public void T012_EstateSettingsSimpleStorage_AccurateParameterSet() 166 public void T012_EstateSettingsSimpleStorage_AccurateParameterSet()
167 { 167 {
168 TestHelpers.InMethod(); 168 TestHelpers.InMethod();
169 169
170 EstateSettingsSimpleStorage( 170 EstateSettingsSimpleStorage(
171 REGION_ID, 171 REGION_ID,
172 DataTestUtil.STRING_MAX(1), 172 DataTestUtil.STRING_MAX(1),
@@ -199,7 +199,7 @@ namespace OpenSim.Data.Tests
199 public void T012_EstateSettingsRandomStorage() 199 public void T012_EstateSettingsRandomStorage()
200 { 200 {
201 TestHelpers.InMethod(); 201 TestHelpers.InMethod();
202 202
203 // Letting estate store generate rows to database for us 203 // Letting estate store generate rows to database for us
204 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); 204 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
205 new PropertyScrambler<EstateSettings>() 205 new PropertyScrambler<EstateSettings>()
@@ -220,7 +220,7 @@ namespace OpenSim.Data.Tests
220 public void T020_EstateSettingsManagerList() 220 public void T020_EstateSettingsManagerList()
221 { 221 {
222 TestHelpers.InMethod(); 222 TestHelpers.InMethod();
223 223
224 // Letting estate store generate rows to database for us 224 // Letting estate store generate rows to database for us
225 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); 225 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
226 226
@@ -241,7 +241,7 @@ namespace OpenSim.Data.Tests
241 public void T021_EstateSettingsUserList() 241 public void T021_EstateSettingsUserList()
242 { 242 {
243 TestHelpers.InMethod(); 243 TestHelpers.InMethod();
244 244
245 // Letting estate store generate rows to database for us 245 // Letting estate store generate rows to database for us
246 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); 246 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
247 247
@@ -262,7 +262,7 @@ namespace OpenSim.Data.Tests
262 public void T022_EstateSettingsGroupList() 262 public void T022_EstateSettingsGroupList()
263 { 263 {
264 TestHelpers.InMethod(); 264 TestHelpers.InMethod();
265 265
266 // Letting estate store generate rows to database for us 266 // Letting estate store generate rows to database for us
267 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); 267 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
268 268
@@ -283,7 +283,7 @@ namespace OpenSim.Data.Tests
283 public void T022_EstateSettingsBanList() 283 public void T022_EstateSettingsBanList()
284 { 284 {
285 TestHelpers.InMethod(); 285 TestHelpers.InMethod();
286 286
287 // Letting estate store generate rows to database for us 287 // Letting estate store generate rows to database for us
288 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true); 288 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
289 289
@@ -310,7 +310,7 @@ namespace OpenSim.Data.Tests
310 310
311 #endregion 311 #endregion
312 312
313 #region Parametrizable Test Implementations 313 #region Parametrizable Test Implementations
314 314
315 private void EstateSettingsSimpleStorage( 315 private void EstateSettingsSimpleStorage(
316 UUID regionId, 316 UUID regionId,
diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs
index e4ec5c1..da6e7d4 100644
--- a/OpenSim/Data/Tests/InventoryTests.cs
+++ b/OpenSim/Data/Tests/InventoryTests.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Data.Tests
46{ 46{
47 [TestFixture(Description = "Inventory store tests (MySQL)")] 47 [TestFixture(Description = "Inventory store tests (MySQL)")]
48 public class MySqlInventoryTests : InventoryTests<MySqlConnection, MySQLInventoryData> 48 public class MySqlInventoryTests : InventoryTests<MySqlConnection, MySQLInventoryData>
49 { 49 {
50 } 50 }
51 51
52 public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore> 52 public class InventoryTests<TConn, TInvStore> : BasicDataServiceTest<TConn, TInvStore>
@@ -102,7 +102,7 @@ namespace OpenSim.Data.Tests
102 public void T001_LoadEmpty() 102 public void T001_LoadEmpty()
103 { 103 {
104 TestHelpers.InMethod(); 104 TestHelpers.InMethod();
105 105
106 Assert.That(db.getInventoryFolder(zero), Is.Null); 106 Assert.That(db.getInventoryFolder(zero), Is.Null);
107 Assert.That(db.getInventoryFolder(folder1), Is.Null); 107 Assert.That(db.getInventoryFolder(folder1), Is.Null);
108 Assert.That(db.getInventoryFolder(folder2), Is.Null); 108 Assert.That(db.getInventoryFolder(folder2), Is.Null);
@@ -122,7 +122,7 @@ namespace OpenSim.Data.Tests
122 public void T010_FolderNonParent() 122 public void T010_FolderNonParent()
123 { 123 {
124 TestHelpers.InMethod(); 124 TestHelpers.InMethod();
125 125
126 InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2); 126 InventoryFolderBase f1 = NewFolder(folder2, folder1, owner1, name2);
127 // the folder will go in 127 // the folder will go in
128 db.addInventoryFolder(f1); 128 db.addInventoryFolder(f1);
@@ -134,7 +134,7 @@ namespace OpenSim.Data.Tests
134 public void T011_FolderCreate() 134 public void T011_FolderCreate()
135 { 135 {
136 TestHelpers.InMethod(); 136 TestHelpers.InMethod();
137 137
138 InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1); 138 InventoryFolderBase f1 = NewFolder(folder1, zero, owner1, name1);
139 // TODO: this is probably wrong behavior, but is what we have 139 // TODO: this is probably wrong behavior, but is what we have
140 // db.updateInventoryFolder(f1); 140 // db.updateInventoryFolder(f1);
@@ -159,7 +159,7 @@ namespace OpenSim.Data.Tests
159 public void T012_FolderList() 159 public void T012_FolderList()
160 { 160 {
161 TestHelpers.InMethod(); 161 TestHelpers.InMethod();
162 162
163 InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3); 163 InventoryFolderBase f2 = NewFolder(folder3, folder1, owner1, name3);
164 db.addInventoryFolder(f2); 164 db.addInventoryFolder(f2);
165 165
@@ -175,7 +175,7 @@ namespace OpenSim.Data.Tests
175 public void T013_FolderHierarchy() 175 public void T013_FolderHierarchy()
176 { 176 {
177 TestHelpers.InMethod(); 177 TestHelpers.InMethod();
178 178
179 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned) 179 int n = db.getFolderHierarchy(zero).Count; // (for dbg - easier to see what's returned)
180 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 180 Assert.That(n, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
181 n = db.getFolderHierarchy(folder1).Count; 181 n = db.getFolderHierarchy(folder1).Count;
@@ -190,7 +190,7 @@ namespace OpenSim.Data.Tests
190 public void T014_MoveFolder() 190 public void T014_MoveFolder()
191 { 191 {
192 TestHelpers.InMethod(); 192 TestHelpers.InMethod();
193 193
194 InventoryFolderBase f2 = db.getInventoryFolder(folder2); 194 InventoryFolderBase f2 = db.getInventoryFolder(folder2);
195 f2.ParentID = folder3; 195 f2.ParentID = folder3;
196 db.moveInventoryFolder(f2); 196 db.moveInventoryFolder(f2);
@@ -206,7 +206,7 @@ namespace OpenSim.Data.Tests
206 public void T015_FolderHierarchy() 206 public void T015_FolderHierarchy()
207 { 207 {
208 TestHelpers.InMethod(); 208 TestHelpers.InMethod();
209 209
210 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))"); 210 Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(zero).Count, Is.EqualTo(0))");
211 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))"); 211 Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2), "Assert.That(db.getFolderHierarchy(folder1).Count, Is.EqualTo(2))");
212 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))"); 212 Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0), "Assert.That(db.getFolderHierarchy(folder2).Count, Is.EqualTo(0))");
@@ -219,7 +219,7 @@ namespace OpenSim.Data.Tests
219 public void T100_NoItems() 219 public void T100_NoItems()
220 { 220 {
221 TestHelpers.InMethod(); 221 TestHelpers.InMethod();
222 222
223 Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))"); 223 Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(zero).Count, Is.EqualTo(0))");
224 Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))"); 224 Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder1).Count, Is.EqualTo(0))");
225 Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))"); 225 Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0), "Assert.That(db.getInventoryInFolder(folder2).Count, Is.EqualTo(0))");
@@ -233,7 +233,7 @@ namespace OpenSim.Data.Tests
233 public void T101_CreatItems() 233 public void T101_CreatItems()
234 { 234 {
235 TestHelpers.InMethod(); 235 TestHelpers.InMethod();
236 236
237 db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1)); 237 db.addInventoryItem(NewItem(item1, folder3, owner1, iname1, asset1));
238 db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2)); 238 db.addInventoryItem(NewItem(item2, folder3, owner1, iname2, asset2));
239 db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3)); 239 db.addInventoryItem(NewItem(item3, folder3, owner1, iname3, asset3));
@@ -244,7 +244,7 @@ namespace OpenSim.Data.Tests
244 public void T102_CompareItems() 244 public void T102_CompareItems()
245 { 245 {
246 TestHelpers.InMethod(); 246 TestHelpers.InMethod();
247 247
248 InventoryItemBase i1 = db.getInventoryItem(item1); 248 InventoryItemBase i1 = db.getInventoryItem(item1);
249 InventoryItemBase i2 = db.getInventoryItem(item2); 249 InventoryItemBase i2 = db.getInventoryItem(item2);
250 InventoryItemBase i3 = db.getInventoryItem(item3); 250 InventoryItemBase i3 = db.getInventoryItem(item3);
@@ -263,7 +263,7 @@ namespace OpenSim.Data.Tests
263 public void T103_UpdateItem() 263 public void T103_UpdateItem()
264 { 264 {
265 TestHelpers.InMethod(); 265 TestHelpers.InMethod();
266 266
267 // TODO: probably shouldn't have the ability to have an 267 // TODO: probably shouldn't have the ability to have an
268 // owner of an item in a folder not owned by the user 268 // owner of an item in a folder not owned by the user
269 269
@@ -283,7 +283,7 @@ namespace OpenSim.Data.Tests
283 public void T104_RandomUpdateItem() 283 public void T104_RandomUpdateItem()
284 { 284 {
285 TestHelpers.InMethod(); 285 TestHelpers.InMethod();
286 286
287 PropertyScrambler<InventoryFolderBase> folderScrambler = 287 PropertyScrambler<InventoryFolderBase> folderScrambler =
288 new PropertyScrambler<InventoryFolderBase>() 288 new PropertyScrambler<InventoryFolderBase>()
289 .DontScramble(x => x.Owner) 289 .DontScramble(x => x.Owner)
@@ -342,7 +342,7 @@ namespace OpenSim.Data.Tests
342 public void T999_StillNull() 342 public void T999_StillNull()
343 { 343 {
344 TestHelpers.InMethod(); 344 TestHelpers.InMethod();
345 345
346 // After all tests are run, these should still return no results 346 // After all tests are run, these should still return no results
347 Assert.That(db.getInventoryFolder(zero), Is.Null); 347 Assert.That(db.getInventoryFolder(zero), Is.Null);
348 Assert.That(db.getInventoryItem(zero), Is.Null); 348 Assert.That(db.getInventoryItem(zero), Is.Null);
diff --git a/OpenSim/Data/Tests/PropertyScrambler.cs b/OpenSim/Data/Tests/PropertyScrambler.cs
index e0f5862..0d291df 100644
--- a/OpenSim/Data/Tests/PropertyScrambler.cs
+++ b/OpenSim/Data/Tests/PropertyScrambler.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Data.Tests
42 public class PropertyScrambler<T> 42 public class PropertyScrambler<T>
43 { 43 {
44 readonly System.Collections.Generic.List<string> membersToNotScramble = new List<string>(); 44 readonly System.Collections.Generic.List<string> membersToNotScramble = new List<string>();
45 45
46 private void AddExpressionToNotScrableList(Expression expression) 46 private void AddExpressionToNotScrableList(Expression expression)
47 { 47 {
48 UnaryExpression unaryExpression = expression as UnaryExpression; 48 UnaryExpression unaryExpression = expression as UnaryExpression;
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs
index e1503d0..4f81594 100644
--- a/OpenSim/Data/Tests/RegionTests.cs
+++ b/OpenSim/Data/Tests/RegionTests.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Data.Tests
83 public UUID item3 = UUID.Random(); 83 public UUID item3 = UUID.Random();
84 84
85 public static Random random = new Random(); 85 public static Random random = new Random();
86 86
87 public string itemname1 = "item1"; 87 public string itemname1 = "item1";
88 88
89 public uint localID = 1; 89 public uint localID = 1;
@@ -111,10 +111,10 @@ namespace OpenSim.Data.Tests
111 111
112 private void ClearDB() 112 private void ClearDB()
113 { 113 {
114 string[] reg_tables = new string[] { 114 string[] reg_tables = new string[] {
115 "prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings" 115 "prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings"
116 }; 116 };
117 117
118 if (m_rebuildDB) 118 if (m_rebuildDB)
119 { 119 {
120 DropTables(reg_tables); 120 DropTables(reg_tables);
@@ -145,7 +145,7 @@ namespace OpenSim.Data.Tests
145 public void T001_LoadEmpty() 145 public void T001_LoadEmpty()
146 { 146 {
147 TestHelpers.InMethod(); 147 TestHelpers.InMethod();
148 148
149 List<SceneObjectGroup> objs = db.LoadObjects(region1); 149 List<SceneObjectGroup> objs = db.LoadObjects(region1);
150 List<SceneObjectGroup> objs3 = db.LoadObjects(region3); 150 List<SceneObjectGroup> objs3 = db.LoadObjects(region3);
151 List<LandData> land = db.LoadLandObjects(region1); 151 List<LandData> land = db.LoadLandObjects(region1);
@@ -154,21 +154,21 @@ namespace OpenSim.Data.Tests
154 Assert.That(objs3.Count, Is.EqualTo(0), "Assert.That(objs3.Count, Is.EqualTo(0))"); 154 Assert.That(objs3.Count, Is.EqualTo(0), "Assert.That(objs3.Count, Is.EqualTo(0))");
155 Assert.That(land.Count, Is.EqualTo(0), "Assert.That(land.Count, Is.EqualTo(0))"); 155 Assert.That(land.Count, Is.EqualTo(0), "Assert.That(land.Count, Is.EqualTo(0))");
156 } 156 }
157 157
158 // SOG round trips 158 // SOG round trips
159 // * store objects, make sure they save 159 // * store objects, make sure they save
160 // * update 160 // * update
161 161
162 [Test] 162 [Test]
163 public void T010_StoreSimpleObject() 163 public void T010_StoreSimpleObject()
164 { 164 {
165 TestHelpers.InMethod(); 165 TestHelpers.InMethod();
166 166
167 SceneObjectGroup sog = NewSOG("object1", prim1, region1); 167 SceneObjectGroup sog = NewSOG("object1", prim1, region1);
168 SceneObjectGroup sog2 = NewSOG("object2", prim2, region1); 168 SceneObjectGroup sog2 = NewSOG("object2", prim2, region1);
169 169
170 // in case the objects don't store 170 // in case the objects don't store
171 try 171 try
172 { 172 {
173 db.StoreObject(sog, region1); 173 db.StoreObject(sog, region1);
174 } 174 }
@@ -177,8 +177,8 @@ namespace OpenSim.Data.Tests
177 m_log.Error(e.ToString()); 177 m_log.Error(e.ToString());
178 Assert.Fail(); 178 Assert.Fail();
179 } 179 }
180 180
181 try 181 try
182 { 182 {
183 db.StoreObject(sog2, region1); 183 db.StoreObject(sog2, region1);
184 } 184 }
@@ -190,15 +190,15 @@ namespace OpenSim.Data.Tests
190 190
191 // This tests the ADO.NET driver 191 // This tests the ADO.NET driver
192 List<SceneObjectGroup> objs = db.LoadObjects(region1); 192 List<SceneObjectGroup> objs = db.LoadObjects(region1);
193 193
194 Assert.That(objs.Count, Is.EqualTo(2), "Assert.That(objs.Count, Is.EqualTo(2))"); 194 Assert.That(objs.Count, Is.EqualTo(2), "Assert.That(objs.Count, Is.EqualTo(2))");
195 } 195 }
196 196
197 [Test] 197 [Test]
198 public void T011_ObjectNames() 198 public void T011_ObjectNames()
199 { 199 {
200 TestHelpers.InMethod(); 200 TestHelpers.InMethod();
201 201
202 List<SceneObjectGroup> objs = db.LoadObjects(region1); 202 List<SceneObjectGroup> objs = db.LoadObjects(region1);
203 foreach (SceneObjectGroup sog in objs) 203 foreach (SceneObjectGroup sog in objs)
204 { 204 {
@@ -207,12 +207,12 @@ namespace OpenSim.Data.Tests
207 Assert.That(p.Name, Is.EqualTo(p.Description), "Assert.That(p.Name, Is.EqualTo(p.Description))"); 207 Assert.That(p.Name, Is.EqualTo(p.Description), "Assert.That(p.Name, Is.EqualTo(p.Description))");
208 } 208 }
209 } 209 }
210 210
211 [Test] 211 [Test]
212 public void T012_SceneParts() 212 public void T012_SceneParts()
213 { 213 {
214 TestHelpers.InMethod(); 214 TestHelpers.InMethod();
215 215
216 UUID tmp0 = UUID.Random(); 216 UUID tmp0 = UUID.Random();
217 UUID tmp1 = UUID.Random(); 217 UUID tmp1 = UUID.Random();
218 UUID tmp2 = UUID.Random(); 218 UUID tmp2 = UUID.Random();
@@ -225,10 +225,10 @@ namespace OpenSim.Data.Tests
225 sog.AddPart(p1); 225 sog.AddPart(p1);
226 sog.AddPart(p2); 226 sog.AddPart(p2);
227 sog.AddPart(p3); 227 sog.AddPart(p3);
228 228
229 SceneObjectPart[] parts = sog.Parts; 229 SceneObjectPart[] parts = sog.Parts;
230 Assert.That(parts.Length,Is.EqualTo(4), "Assert.That(parts.Length,Is.EqualTo(4))"); 230 Assert.That(parts.Length,Is.EqualTo(4), "Assert.That(parts.Length,Is.EqualTo(4))");
231 231
232 db.StoreObject(sog, newregion); 232 db.StoreObject(sog, newregion);
233 List<SceneObjectGroup> sogs = db.LoadObjects(newregion); 233 List<SceneObjectGroup> sogs = db.LoadObjects(newregion);
234 Assert.That(sogs.Count,Is.EqualTo(1), "Assert.That(sogs.Count,Is.EqualTo(1))"); 234 Assert.That(sogs.Count,Is.EqualTo(1), "Assert.That(sogs.Count,Is.EqualTo(1))");
@@ -236,18 +236,18 @@ namespace OpenSim.Data.Tests
236 236
237 SceneObjectPart[] newparts = newsog.Parts; 237 SceneObjectPart[] newparts = newsog.Parts;
238 Assert.That(newparts.Length,Is.EqualTo(4), "Assert.That(newparts.Length,Is.EqualTo(4))"); 238 Assert.That(newparts.Length,Is.EqualTo(4), "Assert.That(newparts.Length,Is.EqualTo(4))");
239 239
240 Assert.That(newsog.ContainsPart(tmp0), "Assert.That(newsog.ContainsPart(tmp0))"); 240 Assert.That(newsog.ContainsPart(tmp0), "Assert.That(newsog.ContainsPart(tmp0))");
241 Assert.That(newsog.ContainsPart(tmp1), "Assert.That(newsog.ContainsPart(tmp1))"); 241 Assert.That(newsog.ContainsPart(tmp1), "Assert.That(newsog.ContainsPart(tmp1))");
242 Assert.That(newsog.ContainsPart(tmp2), "Assert.That(newsog.ContainsPart(tmp2))"); 242 Assert.That(newsog.ContainsPart(tmp2), "Assert.That(newsog.ContainsPart(tmp2))");
243 Assert.That(newsog.ContainsPart(tmp3), "Assert.That(newsog.ContainsPart(tmp3))"); 243 Assert.That(newsog.ContainsPart(tmp3), "Assert.That(newsog.ContainsPart(tmp3))");
244 } 244 }
245 245
246 [Test] 246 [Test]
247 public void T013_DatabasePersistency() 247 public void T013_DatabasePersistency()
248 { 248 {
249 TestHelpers.InMethod(); 249 TestHelpers.InMethod();
250 250
251 // Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data 251 // Sets all ScenePart parameters, stores and retrieves them, then check for consistency with initial data
252 // The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored 252 // The commented Asserts are the ones that are unchangeable (when storing on the database, their "Set" values are ignored
253 // The ObjectFlags is an exception, if it is entered incorrectly, the object IS REJECTED on the database silently. 253 // The ObjectFlags is an exception, if it is entered incorrectly, the object IS REJECTED on the database silently.
@@ -298,7 +298,7 @@ namespace OpenSim.Data.Tests
298 298
299 SceneObjectPart sop = new SceneObjectPart(); 299 SceneObjectPart sop = new SceneObjectPart();
300 SceneObjectGroup sog = new SceneObjectGroup(sop); 300 SceneObjectGroup sog = new SceneObjectGroup(sop);
301 301
302 sop.RegionHandle = regionh; 302 sop.RegionHandle = regionh;
303 sop.UUID = uuid; 303 sop.UUID = uuid;
304 sop.LocalId = localid; 304 sop.LocalId = localid;
@@ -360,10 +360,10 @@ namespace OpenSim.Data.Tests
360 Assert.That(linknum,Is.EqualTo(sop.LinkNum), "Assert.That(linknum,Is.EqualTo(sop.LinkNum))"); 360 Assert.That(linknum,Is.EqualTo(sop.LinkNum), "Assert.That(linknum,Is.EqualTo(sop.LinkNum))");
361 Assert.That(clickaction,Is.EqualTo(sop.ClickAction), "Assert.That(clickaction,Is.EqualTo(sop.ClickAction))"); 361 Assert.That(clickaction,Is.EqualTo(sop.ClickAction), "Assert.That(clickaction,Is.EqualTo(sop.ClickAction))");
362 Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))"); 362 Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
363 363
364 // This is necessary or object will not be inserted in DB 364 // This is necessary or object will not be inserted in DB
365 sop.Flags = PrimFlags.None; 365 sop.Flags = PrimFlags.None;
366 366
367 // Inserts group in DB 367 // Inserts group in DB
368 db.StoreObject(sog,region3); 368 db.StoreObject(sog,region3);
369 List<SceneObjectGroup> sogs = db.LoadObjects(region3); 369 List<SceneObjectGroup> sogs = db.LoadObjects(region3);
@@ -372,7 +372,7 @@ namespace OpenSim.Data.Tests
372 db.StoreObject(sog,region3); 372 db.StoreObject(sog,region3);
373 sogs = db.LoadObjects(region3); 373 sogs = db.LoadObjects(region3);
374 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))"); 374 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
375 375
376 376
377 // Tests if the parameters were inserted correctly 377 // Tests if the parameters were inserted correctly
378 SceneObjectPart p = sogs[0].RootPart; 378 SceneObjectPart p = sogs[0].RootPart;
@@ -414,12 +414,12 @@ namespace OpenSim.Data.Tests
414 Assert.That(pbshap.ProfileEnd, Is.EqualTo(p.Shape.ProfileEnd), "Assert.That(pbshap.ProfileEnd, Is.EqualTo(p.Shape.ProfileEnd))"); 414 Assert.That(pbshap.ProfileEnd, Is.EqualTo(p.Shape.ProfileEnd), "Assert.That(pbshap.ProfileEnd, Is.EqualTo(p.Shape.ProfileEnd))");
415 Assert.That(pbshap.ProfileHollow, Is.EqualTo(p.Shape.ProfileHollow), "Assert.That(pbshap.ProfileHollow, Is.EqualTo(p.Shape.ProfileHollow))"); 415 Assert.That(pbshap.ProfileHollow, Is.EqualTo(p.Shape.ProfileHollow), "Assert.That(pbshap.ProfileHollow, Is.EqualTo(p.Shape.ProfileHollow))");
416 } 416 }
417 417
418 [Test] 418 [Test]
419 public void T014_UpdateObject() 419 public void T014_UpdateObject()
420 { 420 {
421 TestHelpers.InMethod(); 421 TestHelpers.InMethod();
422 422
423 string text1 = "object1 text"; 423 string text1 = "object1 text";
424 SceneObjectGroup sog = FindSOG("object1", region1); 424 SceneObjectGroup sog = FindSOG("object1", region1);
425 sog.RootPart.Text = text1; 425 sog.RootPart.Text = text1;
@@ -459,7 +459,7 @@ namespace OpenSim.Data.Tests
459 PrimitiveBaseShape pbshap = new PrimitiveBaseShape(); 459 PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
460 pbshap = PrimitiveBaseShape.Default; 460 pbshap = PrimitiveBaseShape.Default;
461 Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next()); 461 Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
462 462
463 // Updates the region with new values 463 // Updates the region with new values
464 SceneObjectGroup sog2 = FindSOG("Adam West", region3); 464 SceneObjectGroup sog2 = FindSOG("Adam West", region3);
465 Assert.That(sog2,Is.Not.Null); 465 Assert.That(sog2,Is.Not.Null);
@@ -488,11 +488,11 @@ namespace OpenSim.Data.Tests
488 sog2.RootPart.LinkNum = linknum; 488 sog2.RootPart.LinkNum = linknum;
489 sog2.RootPart.ClickAction = clickaction; 489 sog2.RootPart.ClickAction = clickaction;
490 sog2.RootPart.Scale = scale; 490 sog2.RootPart.Scale = scale;
491 491
492 db.StoreObject(sog2, region3); 492 db.StoreObject(sog2, region3);
493 List<SceneObjectGroup> sogs = db.LoadObjects(region3); 493 List<SceneObjectGroup> sogs = db.LoadObjects(region3);
494 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))"); 494 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
495 495
496 SceneObjectGroup retsog = FindSOG("West Adam", region3); 496 SceneObjectGroup retsog = FindSOG("West Adam", region3);
497 Assert.That(retsog,Is.Not.Null); 497 Assert.That(retsog,Is.Not.Null);
498 SceneObjectPart p = retsog.RootPart; 498 SceneObjectPart p = retsog.RootPart;
@@ -519,7 +519,7 @@ namespace OpenSim.Data.Tests
519 Assert.That(clickaction,Is.EqualTo(p.ClickAction), "Assert.That(clickaction,Is.EqualTo(p.ClickAction))"); 519 Assert.That(clickaction,Is.EqualTo(p.ClickAction), "Assert.That(clickaction,Is.EqualTo(p.ClickAction))");
520 Assert.That(scale,Is.EqualTo(p.Scale), "Assert.That(scale,Is.EqualTo(p.Scale))"); 520 Assert.That(scale,Is.EqualTo(p.Scale), "Assert.That(scale,Is.EqualTo(p.Scale))");
521 } 521 }
522 522
523 /// <summary> 523 /// <summary>
524 /// Test storage and retrieval of a scene object with a large number of parts. 524 /// Test storage and retrieval of a scene object with a large number of parts.
525 /// </summary> 525 /// </summary>
@@ -527,12 +527,12 @@ namespace OpenSim.Data.Tests
527 public void T015_LargeSceneObjects() 527 public void T015_LargeSceneObjects()
528 { 528 {
529 TestHelpers.InMethod(); 529 TestHelpers.InMethod();
530 530
531 UUID id = UUID.Random(); 531 UUID id = UUID.Random();
532 Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>(); 532 Dictionary<UUID, SceneObjectPart> mydic = new Dictionary<UUID, SceneObjectPart>();
533 SceneObjectGroup sog = NewSOG("Test SOG", id, region4); 533 SceneObjectGroup sog = NewSOG("Test SOG", id, region4);
534 mydic.Add(sog.RootPart.UUID,sog.RootPart); 534 mydic.Add(sog.RootPart.UUID,sog.RootPart);
535 for (int i = 0; i < 30; i++) 535 for (int i = 0; i < 30; i++)
536 { 536 {
537 UUID tmp = UUID.Random(); 537 UUID tmp = UUID.Random();
538 SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp); 538 SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp);
@@ -542,20 +542,20 @@ namespace OpenSim.Data.Tests
542 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); 542 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
543 Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next()); 543 Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next());
544 Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next()); 544 Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next());
545 545
546 sop.GroupPosition = groupos; 546 sop.GroupPosition = groupos;
547 sop.RotationOffset = rotoff; 547 sop.RotationOffset = rotoff;
548 sop.OffsetPosition = offset; 548 sop.OffsetPosition = offset;
549 sop.Velocity = velocity; 549 sop.Velocity = velocity;
550 sop.AngularVelocity = angvelo; 550 sop.AngularVelocity = angvelo;
551 sop.Acceleration = accel; 551 sop.Acceleration = accel;
552 552
553 mydic.Add(tmp,sop); 553 mydic.Add(tmp,sop);
554 sog.AddPart(sop); 554 sog.AddPart(sop);
555 } 555 }
556 556
557 db.StoreObject(sog, region4); 557 db.StoreObject(sog, region4);
558 558
559 SceneObjectGroup retsog = FindSOG("Test SOG", region4); 559 SceneObjectGroup retsog = FindSOG("Test SOG", region4);
560 SceneObjectPart[] parts = retsog.Parts; 560 SceneObjectPart[] parts = retsog.Parts;
561 for (int i = 0; i < 30; i++) 561 for (int i = 0; i < 30; i++)
@@ -574,7 +574,7 @@ namespace OpenSim.Data.Tests
574 public void T016_RandomSogWithSceneParts() 574 public void T016_RandomSogWithSceneParts()
575 { 575 {
576 TestHelpers.InMethod(); 576 TestHelpers.InMethod();
577 577
578 PropertyScrambler<SceneObjectPart> scrambler = 578 PropertyScrambler<SceneObjectPart> scrambler =
579 new PropertyScrambler<SceneObjectPart>() 579 new PropertyScrambler<SceneObjectPart>()
580 .DontScramble(x => x.UUID); 580 .DontScramble(x => x.UUID);
@@ -634,22 +634,22 @@ namespace OpenSim.Data.Tests
634 SceneObjectGroup sog = FindSOG(name, region1); 634 SceneObjectGroup sog = FindSOG(name, region1);
635 if (sog == null) 635 if (sog == null)
636 { 636 {
637 sog = NewSOG(name, prim1, region1); 637 sog = NewSOG(name, prim1, region1);
638 db.StoreObject(sog, region1); 638 db.StoreObject(sog, region1);
639 } 639 }
640 return sog; 640 return sog;
641 } 641 }
642 642
643 // NOTE: it is a bad practice to rely on some of the previous tests having been run before. 643 // NOTE: it is a bad practice to rely on some of the previous tests having been run before.
644 // If the tests are run manually, one at a time, each starts with full class init (DB cleared). 644 // If the tests are run manually, one at a time, each starts with full class init (DB cleared).
645 // Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order. 645 // Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order.
646 // We shouldn't expect to find anything in the DB if we haven't put it there *in the same test*! 646 // We shouldn't expect to find anything in the DB if we haven't put it there *in the same test*!
647 647
648 [Test] 648 [Test]
649 public void T020_PrimInventoryEmpty() 649 public void T020_PrimInventoryEmpty()
650 { 650 {
651 TestHelpers.InMethod(); 651 TestHelpers.InMethod();
652 652
653 SceneObjectGroup sog = GetMySOG("object1"); 653 SceneObjectGroup sog = GetMySOG("object1");
654 TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); 654 TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
655 Assert.That(t, Is.Null); 655 Assert.That(t, Is.Null);
@@ -673,14 +673,14 @@ namespace OpenSim.Data.Tests
673 public void T021_PrimInventoryBasic() 673 public void T021_PrimInventoryBasic()
674 { 674 {
675 TestHelpers.InMethod(); 675 TestHelpers.InMethod();
676 676
677 SceneObjectGroup sog = GetMySOG("object1"); 677 SceneObjectGroup sog = GetMySOG("object1");
678 InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero); 678 InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
679 679
680 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True); 680 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True);
681 TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); 681 TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
682 Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))"); 682 Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))");
683 683
684 StoreInventory(sog); 684 StoreInventory(sog);
685 685
686 SceneObjectGroup sog1 = FindSOG("object1", region1); 686 SceneObjectGroup sog1 = FindSOG("object1", region1);
@@ -708,12 +708,12 @@ namespace OpenSim.Data.Tests
708 t = sog.GetInventoryItem(sog.RootPart.LocalId, item1); 708 t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
709 Assert.That(t, Is.Null); 709 Assert.That(t, Is.Null);
710 } 710 }
711 711
712 [Test] 712 [Test]
713 public void T025_PrimInventoryPersistency() 713 public void T025_PrimInventoryPersistency()
714 { 714 {
715 TestHelpers.InMethod(); 715 TestHelpers.InMethod();
716 716
717 InventoryItemBase i = new InventoryItemBase(); 717 InventoryItemBase i = new InventoryItemBase();
718 UUID id = UUID.Random(); 718 UUID id = UUID.Random();
719 i.ID = id; 719 i.ID = id;
@@ -752,11 +752,11 @@ namespace OpenSim.Data.Tests
752 i.Flags = flags; 752 i.Flags = flags;
753 int creationd = random.Next(); 753 int creationd = random.Next();
754 i.CreationDate = creationd; 754 i.CreationDate = creationd;
755 755
756 SceneObjectGroup sog = GetMySOG("object1"); 756 SceneObjectGroup sog = GetMySOG("object1");
757 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True); 757 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, i, zero), Is.True);
758 TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id); 758 TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id);
759 759
760 Assert.That(t.Name, Is.EqualTo(name), "Assert.That(t.Name, Is.EqualTo(name))"); 760 Assert.That(t.Name, Is.EqualTo(name), "Assert.That(t.Name, Is.EqualTo(name))");
761 Assert.That(t.AssetID,Is.EqualTo(assetid), "Assert.That(t.AssetID,Is.EqualTo(assetid))"); 761 Assert.That(t.AssetID,Is.EqualTo(assetid), "Assert.That(t.AssetID,Is.EqualTo(assetid))");
762 Assert.That(t.BasePermissions,Is.EqualTo(baseperm), "Assert.That(t.BasePermissions,Is.EqualTo(baseperm))"); 762 Assert.That(t.BasePermissions,Is.EqualTo(baseperm), "Assert.That(t.BasePermissions,Is.EqualTo(baseperm))");
@@ -780,13 +780,13 @@ namespace OpenSim.Data.Tests
780 Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID), "Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID))"); 780 Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID), "Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID))");
781 Assert.That(t.ParentPartID,Is.EqualTo(sog.RootPart.UUID), "Assert.That(t.ParentPartID,Is.EqualTo(sog.RootPart.UUID))"); 781 Assert.That(t.ParentPartID,Is.EqualTo(sog.RootPart.UUID), "Assert.That(t.ParentPartID,Is.EqualTo(sog.RootPart.UUID))");
782 } 782 }
783 783
784 [Test] 784 [Test]
785 [ExpectedException(typeof(ArgumentException))] 785 [ExpectedException(typeof(ArgumentException))]
786 public void T026_PrimInventoryMany() 786 public void T026_PrimInventoryMany()
787 { 787 {
788 TestHelpers.InMethod(); 788 TestHelpers.InMethod();
789 789
790 UUID i1,i2,i3,i4; 790 UUID i1,i2,i3,i4;
791 i1 = UUID.Random(); 791 i1 = UUID.Random();
792 i2 = UUID.Random(); 792 i2 = UUID.Random();
@@ -796,14 +796,14 @@ namespace OpenSim.Data.Tests
796 InventoryItemBase ib2 = NewItem(i2, zero, zero, RandomName(), zero); 796 InventoryItemBase ib2 = NewItem(i2, zero, zero, RandomName(), zero);
797 InventoryItemBase ib3 = NewItem(i3, zero, zero, RandomName(), zero); 797 InventoryItemBase ib3 = NewItem(i3, zero, zero, RandomName(), zero);
798 InventoryItemBase ib4 = NewItem(i4, zero, zero, RandomName(), zero); 798 InventoryItemBase ib4 = NewItem(i4, zero, zero, RandomName(), zero);
799 799
800 SceneObjectGroup sog = FindSOG("object1", region1); 800 SceneObjectGroup sog = FindSOG("object1", region1);
801 801
802 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib1, zero), Is.True); 802 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib1, zero), Is.True);
803 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib2, zero), Is.True); 803 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib2, zero), Is.True);
804 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib3, zero), Is.True); 804 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib3, zero), Is.True);
805 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib4, zero), Is.True); 805 Assert.That(sog.AddInventoryItem(zero, sog.RootPart.LocalId, ib4, zero), Is.True);
806 806
807 TaskInventoryItem t1 = sog.GetInventoryItem(sog.RootPart.LocalId, i1); 807 TaskInventoryItem t1 = sog.GetInventoryItem(sog.RootPart.LocalId, i1);
808 Assert.That(t1.Name, Is.EqualTo(ib1.Name), "Assert.That(t1.Name, Is.EqualTo(ib1.Name))"); 808 Assert.That(t1.Name, Is.EqualTo(ib1.Name), "Assert.That(t1.Name, Is.EqualTo(ib1.Name))");
809 TaskInventoryItem t2 = sog.GetInventoryItem(sog.RootPart.LocalId, i2); 809 TaskInventoryItem t2 = sog.GetInventoryItem(sog.RootPart.LocalId, i2);
@@ -818,7 +818,7 @@ namespace OpenSim.Data.Tests
818 public void T052_RemoveObject() 818 public void T052_RemoveObject()
819 { 819 {
820 TestHelpers.InMethod(); 820 TestHelpers.InMethod();
821 821
822 db.RemoveObject(prim1, region1); 822 db.RemoveObject(prim1, region1);
823 SceneObjectGroup sog = FindSOG("object1", region1); 823 SceneObjectGroup sog = FindSOG("object1", region1);
824 Assert.That(sog, Is.Null); 824 Assert.That(sog, Is.Null);
@@ -828,7 +828,7 @@ namespace OpenSim.Data.Tests
828 public void T100_DefaultRegionInfo() 828 public void T100_DefaultRegionInfo()
829 { 829 {
830 TestHelpers.InMethod(); 830 TestHelpers.InMethod();
831 831
832 RegionSettings r1 = db.LoadRegionSettings(region1); 832 RegionSettings r1 = db.LoadRegionSettings(region1);
833 Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))"); 833 Assert.That(r1.RegionUUID, Is.EqualTo(region1), "Assert.That(r1.RegionUUID, Is.EqualTo(region1))");
834 834
@@ -840,7 +840,7 @@ namespace OpenSim.Data.Tests
840 public void T101_UpdateRegionInfo() 840 public void T101_UpdateRegionInfo()
841 { 841 {
842 TestHelpers.InMethod(); 842 TestHelpers.InMethod();
843 843
844 int agentlimit = random.Next(); 844 int agentlimit = random.Next();
845 double objectbonus = random.Next(); 845 double objectbonus = random.Next();
846 int maturity = random.Next(); 846 int maturity = random.Next();
@@ -900,9 +900,9 @@ namespace OpenSim.Data.Tests
900 r1.FixedSun = true; 900 r1.FixedSun = true;
901 r1.SunPosition = sunpos; 901 r1.SunPosition = sunpos;
902 r1.Covenant = cov; 902 r1.Covenant = cov;
903 903
904 db.StoreRegionSettings(r1); 904 db.StoreRegionSettings(r1);
905 905
906 RegionSettings r1a = db.LoadRegionSettings(region1); 906 RegionSettings r1a = db.LoadRegionSettings(region1);
907 Assert.That(r1a.RegionUUID, Is.EqualTo(region1), "Assert.That(r1a.RegionUUID, Is.EqualTo(region1))"); 907 Assert.That(r1a.RegionUUID, Is.EqualTo(region1), "Assert.That(r1a.RegionUUID, Is.EqualTo(region1))");
908 Assert.That(r1a.BlockTerraform,Is.True); 908 Assert.That(r1a.BlockTerraform,Is.True);
@@ -939,14 +939,14 @@ namespace OpenSim.Data.Tests
939 //Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid), "Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid))"); 939 //Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid), "Assert.That(r1a.TerrainImageID,Is.EqualTo(terimgid))");
940 Assert.That(r1a.FixedSun,Is.True); 940 Assert.That(r1a.FixedSun,Is.True);
941 Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))"); 941 Assert.That(r1a.SunPosition, Is.EqualTo(sunpos), "Assert.That(r1a.SunPosition, Is.EqualTo(sunpos))");
942 Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))"); 942 Assert.That(r1a.Covenant, Is.EqualTo(cov), "Assert.That(r1a.Covenant, Is.EqualTo(cov))");
943 } 943 }
944 944
945 [Test] 945 [Test]
946 public void T300_NoTerrain() 946 public void T300_NoTerrain()
947 { 947 {
948 TestHelpers.InMethod(); 948 TestHelpers.InMethod();
949 949
950 Assert.That(db.LoadTerrain(zero), Is.Null); 950 Assert.That(db.LoadTerrain(zero), Is.Null);
951 Assert.That(db.LoadTerrain(region1), Is.Null); 951 Assert.That(db.LoadTerrain(region1), Is.Null);
952 Assert.That(db.LoadTerrain(region2), Is.Null); 952 Assert.That(db.LoadTerrain(region2), Is.Null);
@@ -957,13 +957,13 @@ namespace OpenSim.Data.Tests
957 public void T301_CreateTerrain() 957 public void T301_CreateTerrain()
958 { 958 {
959 TestHelpers.InMethod(); 959 TestHelpers.InMethod();
960 960
961 double[,] t1 = GenTerrain(height1); 961 double[,] t1 = GenTerrain(height1);
962 db.StoreTerrain(t1, region1); 962 db.StoreTerrain(t1, region1);
963 963
964 // store terrain is async 964 // store terrain is async
965 Thread.Sleep(1000); 965 Thread.Sleep(1000);
966 966
967 Assert.That(db.LoadTerrain(zero), Is.Null); 967 Assert.That(db.LoadTerrain(zero), Is.Null);
968 Assert.That(db.LoadTerrain(region1), Is.Not.Null); 968 Assert.That(db.LoadTerrain(region1), Is.Not.Null);
969 Assert.That(db.LoadTerrain(region2), Is.Null); 969 Assert.That(db.LoadTerrain(region2), Is.Null);
@@ -974,7 +974,7 @@ namespace OpenSim.Data.Tests
974 public void T302_FetchTerrain() 974 public void T302_FetchTerrain()
975 { 975 {
976 TestHelpers.InMethod(); 976 TestHelpers.InMethod();
977 977
978 double[,] baseterrain1 = GenTerrain(height1); 978 double[,] baseterrain1 = GenTerrain(height1);
979 double[,] baseterrain2 = GenTerrain(height2); 979 double[,] baseterrain2 = GenTerrain(height2);
980 double[,] t1 = db.LoadTerrain(region1); 980 double[,] t1 = db.LoadTerrain(region1);
@@ -986,7 +986,7 @@ namespace OpenSim.Data.Tests
986 public void T303_UpdateTerrain() 986 public void T303_UpdateTerrain()
987 { 987 {
988 TestHelpers.InMethod(); 988 TestHelpers.InMethod();
989 989
990 double[,] baseterrain1 = GenTerrain(height1); 990 double[,] baseterrain1 = GenTerrain(height1);
991 double[,] baseterrain2 = GenTerrain(height2); 991 double[,] baseterrain2 = GenTerrain(height2);
992 db.StoreTerrain(baseterrain2, region1); 992 db.StoreTerrain(baseterrain2, region1);
@@ -1003,7 +1003,7 @@ namespace OpenSim.Data.Tests
1003 public void T400_EmptyLand() 1003 public void T400_EmptyLand()
1004 { 1004 {
1005 TestHelpers.InMethod(); 1005 TestHelpers.InMethod();
1006 1006
1007 Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))"); 1007 Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(zero).Count, Is.EqualTo(0))");
1008 Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))"); 1008 Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region1).Count, Is.EqualTo(0))");
1009 Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0))"); 1009 Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0), "Assert.That(db.LoadLandObjects(region2).Count, Is.EqualTo(0))");
@@ -1025,15 +1025,15 @@ namespace OpenSim.Data.Tests
1025 for (int x = 0; x < Constants.RegionSize; x++) 1025 for (int x = 0; x < Constants.RegionSize; x++)
1026 for (int y = 0; y < Constants.RegionSize; y++) 1026 for (int y = 0; y < Constants.RegionSize; y++)
1027 terret[x,y] = value; 1027 terret[x,y] = value;
1028 1028
1029 return terret; 1029 return terret;
1030 } 1030 }
1031 1031
1032 private bool CompareTerrain(double[,] one, double[,] two) 1032 private bool CompareTerrain(double[,] one, double[,] two)
1033 { 1033 {
1034 for (int x = 0; x < Constants.RegionSize; x++) 1034 for (int x = 0; x < Constants.RegionSize; x++)
1035 for (int y = 0; y < Constants.RegionSize; y++) 1035 for (int y = 0; y < Constants.RegionSize; y++)
1036 if (one[x,y] != two[x,y]) 1036 if (one[x,y] != two[x,y])
1037 return false; 1037 return false;
1038 1038
1039 return true; 1039 return true;
@@ -1053,12 +1053,12 @@ namespace OpenSim.Data.Tests
1053 // common failure case is people adding new fields that aren't 1053 // common failure case is people adding new fields that aren't
1054 // initialized, but have non-null db constraints. We should 1054 // initialized, but have non-null db constraints. We should
1055 // honestly be passing more and more null things in here. 1055 // honestly be passing more and more null things in here.
1056 // 1056 //
1057 // Please note that in Sqlite.BuildPrim there is a commented out inline version 1057 // Please note that in Sqlite.BuildPrim there is a commented out inline version
1058 // of this so you can debug and step through the build process and check the fields 1058 // of this so you can debug and step through the build process and check the fields
1059 // 1059 //
1060 // Real World Value: Tests for situation where extending a SceneObjectGroup/SceneObjectPart 1060 // Real World Value: Tests for situation where extending a SceneObjectGroup/SceneObjectPart
1061 // causes the application to crash at the database layer because of null values 1061 // causes the application to crash at the database layer because of null values
1062 // in NOT NULL fields 1062 // in NOT NULL fields
1063 // 1063 //
1064 private SceneObjectGroup NewSOG(string name, UUID uuid, UUID regionId) 1064 private SceneObjectGroup NewSOG(string name, UUID uuid, UUID regionId)
@@ -1082,7 +1082,7 @@ namespace OpenSim.Data.Tests
1082 1082
1083 return sog; 1083 return sog;
1084 } 1084 }
1085 1085
1086 private SceneObjectPart NewSOP(string name, UUID uuid) 1086 private SceneObjectPart NewSOP(string name, UUID uuid)
1087 { 1087 {
1088 SceneObjectPart sop = new SceneObjectPart(); 1088 SceneObjectPart sop = new SceneObjectPart();
@@ -1096,7 +1096,7 @@ namespace OpenSim.Data.Tests
1096 return sop; 1096 return sop;
1097 } 1097 }
1098 1098
1099 // These are copied from the Inventory Item tests 1099 // These are copied from the Inventory Item tests
1100 1100
1101 private InventoryItemBase NewItem(UUID id, UUID parent, UUID owner, string name, UUID asset) 1101 private InventoryItemBase NewItem(UUID id, UUID parent, UUID owner, string name, UUID asset)
1102 { 1102 {
@@ -1114,7 +1114,7 @@ namespace OpenSim.Data.Tests
1114 private static string RandomName() 1114 private static string RandomName()
1115 { 1115 {
1116 StringBuilder name = new StringBuilder(); 1116 StringBuilder name = new StringBuilder();
1117 int size = random.Next(5,12); 1117 int size = random.Next(5,12);
1118 char ch ; 1118 char ch ;
1119 for (int i=0; i<size; i++) 1119 for (int i=0; i<size; i++)
1120 { 1120 {
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index 4529944..5a9eeb5 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Framework
77 public bool child; 77 public bool child;
78 78
79 /// <summary> 79 /// <summary>
80 /// Number given to the client when they log-in that they provide 80 /// Number given to the client when they log-in that they provide
81 /// as credentials to the UDP server 81 /// as credentials to the UDP server
82 /// </summary> 82 /// </summary>
83 public uint circuitcode; 83 public uint circuitcode;
@@ -328,7 +328,7 @@ namespace OpenSim.Framework
328 Vector3.TryParse(args["start_pos"].AsString(), out startpos); 328 Vector3.TryParse(args["start_pos"].AsString(), out startpos);
329 329
330 //m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos); 330 //m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
331 331
332 try 332 try
333 { 333 {
334 // Unpack various appearance elements 334 // Unpack various appearance elements
@@ -353,7 +353,7 @@ namespace OpenSim.Framework
353 { 353 {
354 m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message); 354 m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message);
355 } 355 }
356 356
357 ServiceURLs = new Dictionary<string, object>(); 357 ServiceURLs = new Dictionary<string, object>();
358 // Try parse the new way, OSDMap 358 // Try parse the new way, OSDMap
359 if (args.ContainsKey("serviceurls") && args["serviceurls"] != null && (args["serviceurls"]).Type == OSDType.Map) 359 if (args.ContainsKey("serviceurls") && args["serviceurls"] != null && (args["serviceurls"]).Type == OSDType.Map)
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs
index 6c5b15c..87c4a78 100644
--- a/OpenSim/Framework/AnimationSet.cs
+++ b/OpenSim/Framework/AnimationSet.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Framework
84 it.GroupPermissions = 0; 84 it.GroupPermissions = 0;
85 it.EveryOnePermissions = 0; 85 it.EveryOnePermissions = 0;
86 } 86 }
87 87
88 public int AnimationCount { get; private set; } 88 public int AnimationCount { get; private set; }
89 private Dictionary<string, KeyValuePair<string, UUID>> m_animations = new Dictionary<string, KeyValuePair<string, UUID>>(); 89 private Dictionary<string, KeyValuePair<string, UUID>> m_animations = new Dictionary<string, KeyValuePair<string, UUID>>();
90 90
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index 87fd04a..88edf2f 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Framework
112 { 112 {
113 get 113 get
114 { 114 {
115 return 115 return
116 IsTextualAsset && ( 116 IsTextualAsset && (
117 Type != (sbyte)AssetType.Notecard 117 Type != (sbyte)AssetType.Notecard
118 && Type != (sbyte)AssetType.CallingCard 118 && Type != (sbyte)AssetType.CallingCard
@@ -137,7 +137,7 @@ namespace OpenSim.Framework
137 { 137 {
138 get 138 get
139 { 139 {
140 return 140 return
141 (Type == (sbyte)AssetType.Animation || 141 (Type == (sbyte)AssetType.Animation ||
142 Type == (sbyte)AssetType.Gesture || 142 Type == (sbyte)AssetType.Gesture ||
143 Type == (sbyte)AssetType.Simstate || 143 Type == (sbyte)AssetType.Simstate ||
@@ -282,7 +282,7 @@ namespace OpenSim.Framework
282 282
283 return m_id; 283 return m_id;
284 } 284 }
285 285
286 set 286 set
287 { 287 {
288 UUID uuid = UUID.Zero; 288 UUID uuid = UUID.Zero;
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
index d269e5d..b6ea077 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.AssetLoader.Filesystem")] 8[assembly: AssemblyTitle("OpenSim.Framework.AssetLoader.Filesystem")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Framework/AssetRequestToClient.cs b/OpenSim/Framework/AssetRequestToClient.cs
index d602c1f..3dfbb91 100644
--- a/OpenSim/Framework/AssetRequestToClient.cs
+++ b/OpenSim/Framework/AssetRequestToClient.cs
@@ -31,10 +31,10 @@ namespace OpenSim.Framework
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// This class was created to refactor OutPacket out of AssetCache 33 /// This class was created to refactor OutPacket out of AssetCache
34 /// There is a conflict between 34 /// There is a conflict between
35 /// OpenSim.Framework.Communications.Cache.AssetRequest and OpenSim.Framework.AssetRequest 35 /// OpenSim.Framework.Communications.Cache.AssetRequest and OpenSim.Framework.AssetRequest
36 /// and unifying them results in a prebuild chicken and egg problem with OpenSim.Framework requiring 36 /// and unifying them results in a prebuild chicken and egg problem with OpenSim.Framework requiring
37 /// OpenSim.Framework.Communications.Cache while OpenSim.Framework.Communications.Cache 37 /// OpenSim.Framework.Communications.Cache while OpenSim.Framework.Communications.Cache
38 /// requiring OpenSim.Framework 38 /// requiring OpenSim.Framework
39 /// </summary> 39 /// </summary>
40 public class AssetRequestToClient 40 public class AssetRequestToClient
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 07c739d..77a7621 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Framework
53 // should be only used as initial default value ( V1 viewers ) 53 // should be only used as initial default value ( V1 viewers )
54 public readonly static int VISUALPARAM_COUNT = 218; 54 public readonly static int VISUALPARAM_COUNT = 218;
55 55
56// public readonly static int TEXTURE_COUNT = 21 56// public readonly static int TEXTURE_COUNT = 21
57 // 21 bad, make it be updated as libovm gets update 57 // 21 bad, make it be updated as libovm gets update
58 // also keeping in sync with it 58 // also keeping in sync with it
59 public readonly static int TEXTURE_COUNT = Primitive.TextureEntry.MAX_FACES; 59 public readonly static int TEXTURE_COUNT = Primitive.TextureEntry.MAX_FACES;
@@ -121,7 +121,7 @@ namespace OpenSim.Framework
121 get { return m_avatarHeight; } 121 get { return m_avatarHeight; }
122 set { m_avatarHeight = value; } 122 set { m_avatarHeight = value; }
123 } 123 }
124 124
125 public virtual WearableCacheItem[] WearableCacheItems 125 public virtual WearableCacheItem[] WearableCacheItems
126 { 126 {
127 get { return m_cacheitems; } 127 get { return m_cacheitems; }
@@ -219,7 +219,7 @@ namespace OpenSim.Framework
219 m_wearables[i] = new AvatarWearable(); 219 m_wearables[i] = new AvatarWearable();
220 AvatarWearable wearable = appearance.Wearables[i]; 220 AvatarWearable wearable = appearance.Wearables[i];
221 for (int j = 0; j < wearable.Count; j++) 221 for (int j = 0; j < wearable.Count; j++)
222 m_wearables[i].Add(wearable[j].ItemID, wearable[j].AssetID); 222 m_wearables[i].Add(wearable[j].ItemID, wearable[j].AssetID);
223 } 223 }
224 } 224 }
225 else 225 else
@@ -291,18 +291,18 @@ namespace OpenSim.Framework
291 public virtual void ResetAppearance() 291 public virtual void ResetAppearance()
292 { 292 {
293// m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance"); 293// m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance");
294 294
295 m_serial = 0; 295 m_serial = 0;
296 296
297 SetDefaultTexture(); 297 SetDefaultTexture();
298 298
299 //for (int i = 0; i < BAKE_INDICES.Length; i++) 299 //for (int i = 0; i < BAKE_INDICES.Length; i++)
300 // { 300 // {
301 // int idx = BAKE_INDICES[i]; 301 // int idx = BAKE_INDICES[i];
302 // m_texture.FaceTextures[idx].TextureID = UUID.Zero; 302 // m_texture.FaceTextures[idx].TextureID = UUID.Zero;
303 // } 303 // }
304 } 304 }
305 305
306 protected virtual void SetDefaultParams() 306 protected virtual void SetDefaultParams()
307 { 307 {
308 m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; 308 m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 };
@@ -319,14 +319,14 @@ namespace OpenSim.Framework
319 public virtual void ResetBakedTextures() 319 public virtual void ResetBakedTextures()
320 { 320 {
321 SetDefaultTexture(); 321 SetDefaultTexture();
322 322
323 //for (int i = 0; i < BAKE_INDICES.Length; i++) 323 //for (int i = 0; i < BAKE_INDICES.Length; i++)
324 // { 324 // {
325 // int idx = BAKE_INDICES[i]; 325 // int idx = BAKE_INDICES[i];
326 // m_texture.FaceTextures[idx].TextureID = UUID.Zero; 326 // m_texture.FaceTextures[idx].TextureID = UUID.Zero;
327 // } 327 // }
328 } 328 }
329 329
330 protected virtual void SetDefaultTexture() 330 protected virtual void SetDefaultTexture()
331 { 331 {
332 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); 332 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
@@ -371,7 +371,7 @@ namespace OpenSim.Framework
371 } 371 }
372 372
373 m_texture = textureEntry; 373 m_texture = textureEntry;
374 374
375 return changed; 375 return changed;
376 } 376 }
377 377
@@ -531,14 +531,14 @@ namespace OpenSim.Framework
531 { 531 {
532 lock (m_attachments) 532 lock (m_attachments)
533 { 533 {
534 List<AvatarAttachment> alist = new List<AvatarAttachment>(); 534 List<AvatarAttachment> alist = new List<AvatarAttachment>();
535 foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments) 535 foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
536 { 536 {
537 foreach (AvatarAttachment attach in kvp.Value) 537 foreach (AvatarAttachment attach in kvp.Value)
538 alist.Add(new AvatarAttachment(attach)); 538 alist.Add(new AvatarAttachment(attach));
539 } 539 }
540 return alist; 540 return alist;
541 } 541 }
542 } 542 }
543 543
544 internal void AppendAttachment(AvatarAttachment attach) 544 internal void AppendAttachment(AvatarAttachment attach)
@@ -551,7 +551,7 @@ namespace OpenSim.Framework
551 { 551 {
552 if (!m_attachments.ContainsKey(attach.AttachPoint)) 552 if (!m_attachments.ContainsKey(attach.AttachPoint))
553 m_attachments[attach.AttachPoint] = new List<AvatarAttachment>(); 553 m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
554 554
555 foreach (AvatarAttachment prev in m_attachments[attach.AttachPoint]) 555 foreach (AvatarAttachment prev in m_attachments[attach.AttachPoint])
556 { 556 {
557 if (prev.ItemID == attach.ItemID) 557 if (prev.ItemID == attach.ItemID)
@@ -608,7 +608,7 @@ namespace OpenSim.Framework
608 m_attachments.Remove(attachpoint); 608 m_attachments.Remove(attachpoint);
609 return true; 609 return true;
610 } 610 }
611 611
612 return false; 612 return false;
613 } 613 }
614 614
@@ -622,13 +622,13 @@ namespace OpenSim.Framework
622 if (existingAttachment != null) 622 if (existingAttachment != null)
623 { 623 {
624// m_log.DebugFormat( 624// m_log.DebugFormat(
625// "[AVATAR APPEARANCE]: Found existing attachment for {0}, asset {1} at point {2}", 625// "[AVATAR APPEARANCE]: Found existing attachment for {0}, asset {1} at point {2}",
626// existingAttachment.ItemID, existingAttachment.AssetID, existingAttachment.AttachPoint); 626// existingAttachment.ItemID, existingAttachment.AssetID, existingAttachment.AttachPoint);
627 627
628 if (existingAttachment.AssetID != UUID.Zero && existingAttachment.AttachPoint == (attachpoint & 0x7F)) 628 if (existingAttachment.AssetID != UUID.Zero && existingAttachment.AttachPoint == (attachpoint & 0x7F))
629 { 629 {
630 m_log.DebugFormat( 630 m_log.DebugFormat(
631 "[AVATAR APPEARANCE]: Ignoring attempt to attach an already attached item {0} at point {1}", 631 "[AVATAR APPEARANCE]: Ignoring attempt to attach an already attached item {0} at point {1}",
632 item, attachpoint); 632 item, attachpoint);
633 633
634 return false; 634 return false;
@@ -640,7 +640,7 @@ namespace OpenSim.Framework
640 DetachAttachment(existingAttachment.ItemID); 640 DetachAttachment(existingAttachment.ItemID);
641 } 641 }
642 } 642 }
643 643
644 // check if this is an append or a replace, 0x80 marks it as an append 644 // check if this is an append or a replace, 0x80 marks it as an append
645 if ((attachpoint & 0x80) > 0) 645 if ((attachpoint & 0x80) > 0)
646 { 646 {
@@ -701,16 +701,16 @@ namespace OpenSim.Framework
701 if (index >= 0) 701 if (index >= 0)
702 { 702 {
703// m_log.DebugFormat( 703// m_log.DebugFormat(
704// "[AVATAR APPEARANCE]: Detaching attachment {0}, index {1}, point {2}", 704// "[AVATAR APPEARANCE]: Detaching attachment {0}, index {1}, point {2}",
705// m_attachments[kvp.Key][index].ItemID, index, m_attachments[kvp.Key][index].AttachPoint); 705// m_attachments[kvp.Key][index].ItemID, index, m_attachments[kvp.Key][index].AttachPoint);
706 706
707 // Remove it from the list of attachments at that attach point 707 // Remove it from the list of attachments at that attach point
708 m_attachments[kvp.Key].RemoveAt(index); 708 m_attachments[kvp.Key].RemoveAt(index);
709 709
710 // And remove the list if there are no more attachments here 710 // And remove the list if there are no more attachments here
711 if (m_attachments[kvp.Key].Count == 0) 711 if (m_attachments[kvp.Key].Count == 0)
712 m_attachments.Remove(kvp.Key); 712 m_attachments.Remove(kvp.Key);
713 713
714 return true; 714 return true;
715 } 715 }
716 } 716 }
@@ -867,7 +867,7 @@ namespace OpenSim.Framework
867 { 867 {
868 AvatarAttachment att = new AvatarAttachment((OSDMap)attachs[i]); 868 AvatarAttachment att = new AvatarAttachment((OSDMap)attachs[i]);
869 AppendAttachment(att); 869 AppendAttachment(att);
870 870
871// m_log.DebugFormat( 871// m_log.DebugFormat(
872// "[AVATAR APPEARANCE]: Unpacked attachment itemID {0}, assetID {1}, point {2}", 872// "[AVATAR APPEARANCE]: Unpacked attachment itemID {0}, assetID {1}, point {2}",
873// att.ItemID, att.AssetID, att.AttachPoint); 873// att.ItemID, att.AssetID, att.AttachPoint);
@@ -1644,14 +1644,14 @@ namespace OpenSim.Framework
1644 SHAPE_EYELID_INNER_CORNER_UP = 214, 1644 SHAPE_EYELID_INNER_CORNER_UP = 214,
1645 SKIRT_SKIRT_RED = 215, 1645 SKIRT_SKIRT_RED = 215,
1646 SKIRT_SKIRT_GREEN = 216, 1646 SKIRT_SKIRT_GREEN = 216,
1647 SKIRT_SKIRT_BLUE = 217, 1647 SKIRT_SKIRT_BLUE = 217,
1648 1648
1649 /// <summary> 1649 /// <summary>
1650 /// Avatar Physics section. These are 0 type visual params which get transmitted. 1650 /// Avatar Physics section. These are 0 type visual params which get transmitted.
1651 /// </summary> 1651 /// </summary>
1652 1652
1653 /// <summary> 1653 /// <summary>
1654 /// Breast Part 1 1654 /// Breast Part 1
1655 /// </summary> 1655 /// </summary>
1656 BREAST_PHYSICS_MASS = 218, 1656 BREAST_PHYSICS_MASS = 218,
1657 BREAST_PHYSICS_GRAVITY = 219, 1657 BREAST_PHYSICS_GRAVITY = 219,
@@ -1697,7 +1697,7 @@ namespace OpenSim.Framework
1697 BREAST_PHYSICS_LEFTRIGHT_GAIN = 249, 1697 BREAST_PHYSICS_LEFTRIGHT_GAIN = 249,
1698 BREAST_PHYSICS_LEFTRIGHT_DAMPING = 250, 1698 BREAST_PHYSICS_LEFTRIGHT_DAMPING = 250,
1699 1699
1700 // Ubit: 07/96/2013 new parameters 1700 // Ubit: 07/96/2013 new parameters
1701 _APPEARANCEMESSAGE_VERSION = 251, //ID 11000 1701 _APPEARANCEMESSAGE_VERSION = 251, //ID 11000
1702 1702
1703 SHAPE_HOVER = 252, //ID 11001 1703 SHAPE_HOVER = 252, //ID 11001
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index 7bc46ed..0e8f960 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -96,7 +96,7 @@ namespace OpenSim.Framework
96 96
97// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1"); 97// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
98// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007"); 98// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
99 99
100 protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>(); 100 protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
101 protected List<UUID> m_ids = new List<UUID>(); 101 protected List<UUID> m_ids = new List<UUID>();
102 102
@@ -234,10 +234,10 @@ namespace OpenSim.Framework
234 { 234 {
235 defaultWearables[i] = new AvatarWearable(); 235 defaultWearables[i] = new AvatarWearable();
236 } 236 }
237 237
238 // Body 238 // Body
239 defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET); 239 defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET);
240 240
241 // Hair 241 // Hair
242 defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET); 242 defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET);
243 243
@@ -252,7 +252,7 @@ namespace OpenSim.Framework
252 252
253 // Pants 253 // Pants
254 defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET); 254 defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET);
255 255
256// // Alpha 256// // Alpha
257// defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); 257// defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET);
258 258
diff --git a/OpenSim/Framework/BasicDOSProtector.cs b/OpenSim/Framework/BasicDOSProtector.cs
index 89bfa94..f1ff18f 100644
--- a/OpenSim/Framework/BasicDOSProtector.cs
+++ b/OpenSim/Framework/BasicDOSProtector.cs
@@ -31,7 +31,7 @@ using log4net;
31 31
32namespace OpenSim.Framework 32namespace OpenSim.Framework
33{ 33{
34 34
35 public class BasicDOSProtector 35 public class BasicDOSProtector
36 { 36 {
37 public enum ThrottleAction 37 public enum ThrottleAction
@@ -43,7 +43,7 @@ namespace OpenSim.Framework
43 private readonly BasicDosProtectorOptions _options; 43 private readonly BasicDosProtectorOptions _options;
44 private readonly Dictionary<string, CircularBuffer<int>> _deeperInspection; // per client request checker 44 private readonly Dictionary<string, CircularBuffer<int>> _deeperInspection; // per client request checker
45 private readonly Dictionary<string, int> _tempBlocked; // blocked list 45 private readonly Dictionary<string, int> _tempBlocked; // blocked list
46 private readonly Dictionary<string, int> _sessions; 46 private readonly Dictionary<string, int> _sessions;
47 private readonly System.Timers.Timer _forgetTimer; // Cleanup timer 47 private readonly System.Timers.Timer _forgetTimer; // Cleanup timer
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private readonly System.Threading.ReaderWriterLockSlim _blockLockSlim = new System.Threading.ReaderWriterLockSlim(); 49 private readonly System.Threading.ReaderWriterLockSlim _blockLockSlim = new System.Threading.ReaderWriterLockSlim();
@@ -133,7 +133,7 @@ namespace OpenSim.Framework
133 else 133 else
134 throw new System.Security.SecurityException("Throttled"); 134 throw new System.Security.SecurityException("Throttled");
135 } 135 }
136 136
137 _blockLockSlim.ExitReadLock(); 137 _blockLockSlim.ExitReadLock();
138 138
139 lock (_generalRequestTimes) 139 lock (_generalRequestTimes)
@@ -169,10 +169,10 @@ namespace OpenSim.Framework
169 _blockLockSlim.ExitWriteLock(); 169 _blockLockSlim.ExitWriteLock();
170 170
171 } 171 }
172 172
173 173
174 } 174 }
175 else 175 else
176 ProcessConcurrency(key, endpoint); 176 ProcessConcurrency(key, endpoint);
177 } 177 }
178 if (_generalRequestTimes.Size == _generalRequestTimes.Capacity && 178 if (_generalRequestTimes.Size == _generalRequestTimes.Capacity &&
@@ -194,7 +194,7 @@ namespace OpenSim.Framework
194 _sessionLockSlim.EnterWriteLock(); 194 _sessionLockSlim.EnterWriteLock();
195 if (_sessions.ContainsKey(key)) 195 if (_sessions.ContainsKey(key))
196 _sessions[key] = _sessions[key] + 1; 196 _sessions[key] = _sessions[key] + 1;
197 else 197 else
198 _sessions.Add(key,1); 198 _sessions.Add(key,1);
199 _sessionLockSlim.ExitWriteLock(); 199 _sessionLockSlim.ExitWriteLock();
200 } 200 }
@@ -209,7 +209,7 @@ namespace OpenSim.Framework
209 } 209 }
210 else 210 else
211 _sessions.Add(key, 1); 211 _sessions.Add(key, 1);
212 212
213 _sessionLockSlim.ExitWriteLock(); 213 _sessionLockSlim.ExitWriteLock();
214 } 214 }
215 215
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs
index f6861e4..2461049 100644
--- a/OpenSim/Framework/BlockingQueue.cs
+++ b/OpenSim/Framework/BlockingQueue.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
65 65
66 if (m_pqueue.Count > 0) 66 if (m_pqueue.Count > 0)
67 return m_pqueue.Dequeue(); 67 return m_pqueue.Dequeue();
68 68
69 if (m_queue.Count > 0) 69 if (m_queue.Count > 0)
70 return m_queue.Dequeue(); 70 return m_queue.Dequeue();
71 return default(T); 71 return default(T);
diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs
index 80f5ff4..7ccc320 100644
--- a/OpenSim/Framework/Cache.cs
+++ b/OpenSim/Framework/Cache.cs
@@ -356,10 +356,10 @@ namespace OpenSim.Framework
356 Expire(true); 356 Expire(true);
357 return null; 357 return null;
358 } 358 }
359 359
360 item.hits++; 360 item.hits++;
361 item.lastUsed = DateTime.UtcNow; 361 item.lastUsed = DateTime.UtcNow;
362 362
363 Expire(true); 363 Expire(true);
364 } 364 }
365 365
diff --git a/OpenSim/Framework/CapsUtil.cs b/OpenSim/Framework/CapsUtil.cs
index 4baf505..020f6e2 100644
--- a/OpenSim/Framework/CapsUtil.cs
+++ b/OpenSim/Framework/CapsUtil.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Framework
43 { 43 {
44 return "CAPS/" + capsObjectPath + "0000/"; 44 return "CAPS/" + capsObjectPath + "0000/";
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
48 /// Get a random CAPS object path component that will be used as the identifying part of all future CAPS requests 48 /// Get a random CAPS object path component that will be used as the identifying part of all future CAPS requests
49 /// </summary> 49 /// </summary>
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 61c870e..0e5eaf2 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -332,7 +332,7 @@ namespace OpenSim.Framework
332 public Vector3 UpAxis; 332 public Vector3 UpAxis;
333 333
334 /// <summary> 334 /// <summary>
335 /// Signal on a V2 teleport that Scene.IncomingChildAgentDataUpdate(AgentData ad) should wait for the 335 /// Signal on a V2 teleport that Scene.IncomingChildAgentDataUpdate(AgentData ad) should wait for the
336 /// scene presence to become root (triggered when the viewer sends a CompleteAgentMovement UDP packet after 336 /// scene presence to become root (triggered when the viewer sends a CompleteAgentMovement UDP packet after
337 /// establishing the connection triggered by it's receipt of a TeleportFinish EQ message). 337 /// establishing the connection triggered by it's receipt of a TeleportFinish EQ message).
338 /// </summary> 338 /// </summary>
@@ -434,7 +434,7 @@ namespace OpenSim.Framework
434 args["active_group_name"] = OSD.FromString(ActiveGroupName); 434 args["active_group_name"] = OSD.FromString(ActiveGroupName);
435 if(ActiveGroupTitle != null) 435 if(ActiveGroupTitle != null)
436 args["active_group_title"] = OSD.FromString(ActiveGroupTitle); 436 args["active_group_title"] = OSD.FromString(ActiveGroupTitle);
437 437
438 if (ChildrenCapSeeds != null && ChildrenCapSeeds.Count > 0) 438 if (ChildrenCapSeeds != null && ChildrenCapSeeds.Count > 0)
439 { 439 {
440 OSDArray childrenSeeds = new OSDArray(ChildrenCapSeeds.Count); 440 OSDArray childrenSeeds = new OSDArray(ChildrenCapSeeds.Count);
@@ -623,7 +623,7 @@ namespace OpenSim.Framework
623 623
624 if (args.ContainsKey("active_group_name") && args["active_group_name"] != null) 624 if (args.ContainsKey("active_group_name") && args["active_group_name"] != null)
625 ActiveGroupName = args["active_group_name"].AsString(); 625 ActiveGroupName = args["active_group_name"].AsString();
626 626
627 if(args.ContainsKey("active_group_title") && args["active_group_title"] != null) 627 if(args.ContainsKey("active_group_title") && args["active_group_title"] != null)
628 ActiveGroupTitle = args["active_group_title"].AsString(); 628 ActiveGroupTitle = args["active_group_title"].AsString();
629 629
@@ -843,7 +843,7 @@ namespace OpenSim.Framework
843 843
844 public class CompleteAgentData : AgentData 844 public class CompleteAgentData : AgentData
845 { 845 {
846 public override OSDMap Pack(EntityTransferContext ctx) 846 public override OSDMap Pack(EntityTransferContext ctx)
847 { 847 {
848 return base.Pack(ctx); 848 return base.Pack(ctx);
849 } 849 }
diff --git a/OpenSim/Framework/CircularBuffer.cs b/OpenSim/Framework/CircularBuffer.cs
index e919337..e101938 100644
--- a/OpenSim/Framework/CircularBuffer.cs
+++ b/OpenSim/Framework/CircularBuffer.cs
@@ -1,21 +1,21 @@
1/* 1/*
2Copyright (c) 2012, Alex Regueiro 2Copyright (c) 2012, Alex Regueiro
3All rights reserved. 3All rights reserved.
4Redistribution and use in source and binary forms, with or without modification, are permitted provided that the 4Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
5following conditions are met: 5following conditions are met:
6 6
7Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 8Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
9in the documentation and/or other materials provided with the distribution. 9in the documentation and/or other materials provided with the distribution.
10 10
11THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 11THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
12BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 12BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 13IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
14OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 14OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
15OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 15OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
16OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 16OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
17POSSIBILITY OF SUCH DAMAGE. 17POSSIBILITY OF SUCH DAMAGE.
18*/ 18*/
19using System; 19using System;
20using System.Collections; 20using System.Collections;
21using System.Collections.Generic; 21using System.Collections.Generic;
diff --git a/OpenSim/Framework/CnmMemoryCache.cs b/OpenSim/Framework/CnmMemoryCache.cs
index 92af331..f996cb0 100644
--- a/OpenSim/Framework/CnmMemoryCache.cs
+++ b/OpenSim/Framework/CnmMemoryCache.cs
@@ -36,14 +36,14 @@ namespace OpenSim.Framework
36 /// Cenome memory based cache to store key/value pairs (elements) limited time and/or limited size. 36 /// Cenome memory based cache to store key/value pairs (elements) limited time and/or limited size.
37 /// </summary> 37 /// </summary>
38 /// <typeparam name="TKey"> 38 /// <typeparam name="TKey">
39 /// The type of keys in the cache. 39 /// The type of keys in the cache.
40 /// </typeparam> 40 /// </typeparam>
41 /// <typeparam name="TValue"> 41 /// <typeparam name="TValue">
42 /// The type of values in the dictionary. 42 /// The type of values in the dictionary.
43 /// </typeparam> 43 /// </typeparam>
44 /// <remarks> 44 /// <remarks>
45 /// <para> 45 /// <para>
46 /// Cenome memory cache stores elements to hash table generations. When new element is being added to cache, and new size would exceed 46 /// Cenome memory cache stores elements to hash table generations. When new element is being added to cache, and new size would exceed
47 /// maximal allowed size or maximal amount of allowed element count, then elements in oldest generation are deleted. Last access time 47 /// maximal allowed size or maximal amount of allowed element count, then elements in oldest generation are deleted. Last access time
48 /// is also tracked in generation level - thus it is possible that some elements are staying in cache far beyond their expiration time. 48 /// is also tracked in generation level - thus it is possible that some elements are staying in cache far beyond their expiration time.
49 /// If elements in older generations are accessed through <see cref="TryGetValue"/> method, they are moved to newest generation. 49 /// If elements in older generations are accessed through <see cref="TryGetValue"/> method, they are moved to newest generation.
@@ -176,7 +176,7 @@ namespace OpenSim.Framework
176 } 176 }
177 177
178 /// <summary> 178 /// <summary>
179 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 179 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
180 /// </summary> 180 /// </summary>
181 /// <param name="maximalSize"> 181 /// <param name="maximalSize">
182 /// Maximal cache size. 182 /// Maximal cache size.
@@ -201,7 +201,7 @@ namespace OpenSim.Framework
201 } 201 }
202 202
203 /// <summary> 203 /// <summary>
204 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 204 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
205 /// </summary> 205 /// </summary>
206 /// <param name="maximalSize"> 206 /// <param name="maximalSize">
207 /// Maximal cache size. 207 /// Maximal cache size.
@@ -218,7 +218,7 @@ namespace OpenSim.Framework
218 } 218 }
219 219
220 /// <summary> 220 /// <summary>
221 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 221 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
222 /// </summary> 222 /// </summary>
223 /// <param name="maximalSize"> 223 /// <param name="maximalSize">
224 /// Maximal cache size. 224 /// Maximal cache size.
@@ -336,7 +336,7 @@ namespace OpenSim.Framework
336 /// </summary> 336 /// </summary>
337 private void CheckExpired() 337 private void CheckExpired()
338 { 338 {
339 // Do this only one in every m_operationsBetweenTimeChecks 339 // Do this only one in every m_operationsBetweenTimeChecks
340 // Fetching time is using several millisecons - it is better not to do all time. 340 // Fetching time is using several millisecons - it is better not to do all time.
341 m_operationsBetweenTimeChecks--; 341 m_operationsBetweenTimeChecks--;
342 if (m_operationsBetweenTimeChecks <= 0) 342 if (m_operationsBetweenTimeChecks <= 0)
@@ -394,7 +394,7 @@ namespace OpenSim.Framework
394 new IEnumerator<KeyValuePair<TKey, TValue>>[2]; 394 new IEnumerator<KeyValuePair<TKey, TValue>>[2];
395 395
396 /// <summary> 396 /// <summary>
397 /// Initializes a new instance of the <see cref="Enumerator"/> class. 397 /// Initializes a new instance of the <see cref="Enumerator"/> class.
398 /// </summary> 398 /// </summary>
399 /// <param name="cache"> 399 /// <param name="cache">
400 /// The cache. 400 /// The cache.
@@ -456,7 +456,7 @@ namespace OpenSim.Framework
456 /// <see langword="true"/>if the enumerator was successfully advanced to the next element; <see langword="false"/> if the enumerator has passed the end of the collection. 456 /// <see langword="true"/>if the enumerator was successfully advanced to the next element; <see langword="false"/> if the enumerator has passed the end of the collection.
457 /// </returns> 457 /// </returns>
458 /// <exception cref="T:System.InvalidOperationException"> 458 /// <exception cref="T:System.InvalidOperationException">
459 /// The collection was modified after the enumerator was created. 459 /// The collection was modified after the enumerator was created.
460 /// </exception> 460 /// </exception>
461 /// <filterpriority>2</filterpriority> 461 /// <filterpriority>2</filterpriority>
462 public bool MoveNext() 462 public bool MoveNext()
@@ -479,7 +479,7 @@ namespace OpenSim.Framework
479 /// Sets the enumerator to its initial position, which is before the first element in the collection. 479 /// Sets the enumerator to its initial position, which is before the first element in the collection.
480 /// </summary> 480 /// </summary>
481 /// <exception cref="T:System.InvalidOperationException"> 481 /// <exception cref="T:System.InvalidOperationException">
482 /// The collection was modified after the enumerator was created. 482 /// The collection was modified after the enumerator was created.
483 /// </exception> 483 /// </exception>
484 /// <filterpriority>2</filterpriority> 484 /// <filterpriority>2</filterpriority>
485 public void Reset() 485 public void Reset()
@@ -548,7 +548,7 @@ namespace OpenSim.Framework
548 private DateTime m_expirationTime1; 548 private DateTime m_expirationTime1;
549 549
550 /// <summary> 550 /// <summary>
551 /// Index to first free element. 551 /// Index to first free element.
552 /// </summary> 552 /// </summary>
553 private int m_firstFreeElement; 553 private int m_firstFreeElement;
554 554
@@ -681,8 +681,8 @@ namespace OpenSim.Framework
681 /// Next element in chain. 681 /// Next element in chain.
682 /// </summary> 682 /// </summary>
683 /// <remarks> 683 /// <remarks>
684 /// When element have value (something is stored to it), this is index of 684 /// When element have value (something is stored to it), this is index of
685 /// next element with same bucket index. When element is free, this 685 /// next element with same bucket index. When element is free, this
686 /// is index of next element in free element's list. 686 /// is index of next element in free element's list.
687 /// </remarks> 687 /// </remarks>
688 public int Next; 688 public int Next;
@@ -696,7 +696,7 @@ namespace OpenSim.Framework
696 public long Size; 696 public long Size;
697 697
698 /// <summary> 698 /// <summary>
699 /// Element's value. 699 /// Element's value.
700 /// </summary> 700 /// </summary>
701 /// <remarks> 701 /// <remarks>
702 /// It is possible that this value is <see langword="null"/> even when element 702 /// It is possible that this value is <see langword="null"/> even when element
@@ -812,7 +812,7 @@ namespace OpenSim.Framework
812 /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. 812 /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
813 /// </returns> 813 /// </returns>
814 /// <exception cref="InvalidOperationException"> 814 /// <exception cref="InvalidOperationException">
815 /// The collection was modified after the enumerator was created. 815 /// The collection was modified after the enumerator was created.
816 /// </exception> 816 /// </exception>
817 public bool MoveNext() 817 public bool MoveNext()
818 { 818 {
@@ -841,7 +841,7 @@ namespace OpenSim.Framework
841 /// Sets the enumerator to its initial position, which is before the first element in the collection. 841 /// Sets the enumerator to its initial position, which is before the first element in the collection.
842 /// </summary> 842 /// </summary>
843 /// <exception cref="InvalidOperationException"> 843 /// <exception cref="InvalidOperationException">
844 /// The collection was modified after the enumerator was created. 844 /// The collection was modified after the enumerator was created.
845 /// </exception> 845 /// </exception>
846 /// <filterpriority>2</filterpriority> 846 /// <filterpriority>2</filterpriority>
847 public void Reset() 847 public void Reset()
@@ -931,7 +931,7 @@ namespace OpenSim.Framework
931 /// The key to locate in the <see cref="IGeneration"/>. 931 /// The key to locate in the <see cref="IGeneration"/>.
932 /// </param> 932 /// </param>
933 /// <returns> 933 /// <returns>
934 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>; 934 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>;
935 /// otherwise <see langword="false"/>. 935 /// otherwise <see langword="false"/>.
936 /// </returns> 936 /// </returns>
937 public bool Contains(int bucketIndex, TKey key) 937 public bool Contains(int bucketIndex, TKey key)
@@ -1014,7 +1014,7 @@ namespace OpenSim.Framework
1014 /// </returns> 1014 /// </returns>
1015 /// <remarks> 1015 /// <remarks>
1016 /// <para> 1016 /// <para>
1017 /// If element was already existing in generation and new element size fits to collection limits, 1017 /// If element was already existing in generation and new element size fits to collection limits,
1018 /// then it's value is replaced with new one and size information is updated. If element didn't 1018 /// then it's value is replaced with new one and size information is updated. If element didn't
1019 /// exists in generation before, then generation must have empty space for a new element and 1019 /// exists in generation before, then generation must have empty space for a new element and
1020 /// size must fit generation's limits, before element is added to generation. 1020 /// size must fit generation's limits, before element is added to generation.
@@ -1070,7 +1070,7 @@ namespace OpenSim.Framework
1070 if (Size - m_elements[ elementIndex ].Size + size > m_cache.m_generationMaxSize) 1070 if (Size - m_elements[ elementIndex ].Size + size > m_cache.m_generationMaxSize)
1071 { 1071 {
1072 // Generation is full 1072 // Generation is full
1073 // Remove existing element, because generation is going to be recycled to 1073 // Remove existing element, because generation is going to be recycled to
1074 // old generation and element is stored to new generation 1074 // old generation and element is stored to new generation
1075 RemoveElement(bucketIndex, elementIndex, previousIndex); 1075 RemoveElement(bucketIndex, elementIndex, previousIndex);
1076 return false; 1076 return false;
@@ -1110,12 +1110,12 @@ namespace OpenSim.Framework
1110 /// <remarks> 1110 /// <remarks>
1111 /// <para> 1111 /// <para>
1112 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/> 1112 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/>
1113 /// are set to default value (default(TValue) and 0). 1113 /// are set to default value (default(TValue) and 0).
1114 /// </para> 1114 /// </para>
1115 /// </remarks> 1115 /// </remarks>
1116 public bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size) 1116 public bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size)
1117 { 1117 {
1118 // Find entry index, 1118 // Find entry index,
1119 int previousIndex; 1119 int previousIndex;
1120 int elementIndex = FindElementIndex(bucketIndex, key, m_newGeneration, out previousIndex); 1120 int elementIndex = FindElementIndex(bucketIndex, key, m_newGeneration, out previousIndex);
1121 if (elementIndex == -1) 1121 if (elementIndex == -1)
@@ -1166,7 +1166,7 @@ namespace OpenSim.Framework
1166 /// </para> 1166 /// </para>
1167 /// <para> 1167 /// <para>
1168 /// There are two kind generations: "new generation" and "old generation(s)". All new elements 1168 /// There are two kind generations: "new generation" and "old generation(s)". All new elements
1169 /// are added to "new generation". 1169 /// are added to "new generation".
1170 /// </para> 1170 /// </para>
1171 /// </remarks> 1171 /// </remarks>
1172 protected interface IGeneration : IEnumerable<KeyValuePair<TKey, TValue>> 1172 protected interface IGeneration : IEnumerable<KeyValuePair<TKey, TValue>>
@@ -1211,7 +1211,7 @@ namespace OpenSim.Framework
1211 /// The key to locate in the <see cref="IGeneration"/>. 1211 /// The key to locate in the <see cref="IGeneration"/>.
1212 /// </param> 1212 /// </param>
1213 /// <returns> 1213 /// <returns>
1214 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>; 1214 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>;
1215 /// otherwise <see langword="false"/>. 1215 /// otherwise <see langword="false"/>.
1216 /// </returns> 1216 /// </returns>
1217 bool Contains(int bucketIndex, TKey key); 1217 bool Contains(int bucketIndex, TKey key);
@@ -1259,7 +1259,7 @@ namespace OpenSim.Framework
1259 /// </returns> 1259 /// </returns>
1260 /// <remarks> 1260 /// <remarks>
1261 /// <para> 1261 /// <para>
1262 /// If element was already existing in generation and new element size fits to collection limits, 1262 /// If element was already existing in generation and new element size fits to collection limits,
1263 /// then it's value is replaced with new one and size information is updated. If element didn't 1263 /// then it's value is replaced with new one and size information is updated. If element didn't
1264 /// exists in generation before, then generation must have empty space for a new element and 1264 /// exists in generation before, then generation must have empty space for a new element and
1265 /// size must fit generation's limits, before element is added to generation. 1265 /// size must fit generation's limits, before element is added to generation.
@@ -1288,7 +1288,7 @@ namespace OpenSim.Framework
1288 /// <remarks> 1288 /// <remarks>
1289 /// <para> 1289 /// <para>
1290 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/> 1290 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/>
1291 /// are set to default value (default(TValue) and 0). 1291 /// are set to default value (default(TValue) and 0).
1292 /// </para> 1292 /// </para>
1293 /// </remarks> 1293 /// </remarks>
1294 bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size); 1294 bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size);
@@ -1303,8 +1303,8 @@ namespace OpenSim.Framework
1303 /// </summary> 1303 /// </summary>
1304 /// <remarks> 1304 /// <remarks>
1305 /// <para> 1305 /// <para>
1306 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1306 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1307 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1307 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1308 /// </para> 1308 /// </para>
1309 /// </remarks> 1309 /// </remarks>
1310 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/> 1310 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/>
@@ -1324,13 +1324,13 @@ namespace OpenSim.Framework
1324 /// </value> 1324 /// </value>
1325 /// <remarks> 1325 /// <remarks>
1326 /// <para> 1326 /// <para>
1327 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 1327 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
1328 /// and it is not accessed through <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> method or element's value is 1328 /// and it is not accessed through <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> method or element's value is
1329 /// not replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method, then it is automatically removed from the 1329 /// not replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method, then it is automatically removed from the
1330 /// <see cref="ICnmCache{TKey,TValue}"/>. 1330 /// <see cref="ICnmCache{TKey,TValue}"/>.
1331 /// </para> 1331 /// </para>
1332 /// <para> 1332 /// <para>
1333 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time, 1333 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time,
1334 /// because total size or count of elements stored to cache is larger than <see cref="ICnmCache{TKey,TValue}.MaxSize"/> or <see cref="ICnmCache{TKey,TValue}.MaxCount"/>. 1334 /// because total size or count of elements stored to cache is larger than <see cref="ICnmCache{TKey,TValue}.MaxSize"/> or <see cref="ICnmCache{TKey,TValue}.MaxCount"/>.
1335 /// </para> 1335 /// </para>
1336 /// <para> 1336 /// <para>
@@ -1375,17 +1375,17 @@ namespace OpenSim.Framework
1375 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements. 1375 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements.
1376 /// </summary> 1376 /// </summary>
1377 /// <value> 1377 /// <value>
1378 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited; 1378 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited;
1379 /// otherwise, <see langword="false"/>. 1379 /// otherwise, <see langword="false"/>.
1380 /// </value> 1380 /// </value>
1381 /// <remarks> 1381 /// <remarks>
1382 /// <para> 1382 /// <para>
1383 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1383 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1384 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1384 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1385 /// </para> 1385 /// </para>
1386 /// </remarks> 1386 /// </remarks>
1387 /// <seealso cref="ICnmCache{TKey,TValue}.Count"/> 1387 /// <seealso cref="ICnmCache{TKey,TValue}.Count"/>
1388 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/> 1388 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/>
1389 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 1389 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
1390 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 1390 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
1391 public bool IsCountLimited 1391 public bool IsCountLimited
@@ -1397,13 +1397,13 @@ namespace OpenSim.Framework
1397 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements. 1397 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements.
1398 /// </summary> 1398 /// </summary>
1399 /// <value> 1399 /// <value>
1400 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited; 1400 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited;
1401 /// otherwise, <see langword="false"/>. 1401 /// otherwise, <see langword="false"/>.
1402 /// </value> 1402 /// </value>
1403 /// <remarks> 1403 /// <remarks>
1404 /// <para> 1404 /// <para>
1405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1407 /// </para> 1407 /// </para>
1408 /// </remarks> 1408 /// </remarks>
1409 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1409 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -1420,12 +1420,12 @@ namespace OpenSim.Framework
1420 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe). 1420 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe).
1421 /// </summary> 1421 /// </summary>
1422 /// <value> 1422 /// <value>
1423 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe); 1423 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe);
1424 /// otherwise, <see langword="false"/>. 1424 /// otherwise, <see langword="false"/>.
1425 /// </value> 1425 /// </value>
1426 /// <remarks> 1426 /// <remarks>
1427 /// <para> 1427 /// <para>
1428 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use 1428 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use
1429 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class 1429 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class
1430 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object. 1430 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object.
1431 /// </para> 1431 /// </para>
@@ -1441,13 +1441,13 @@ namespace OpenSim.Framework
1441 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 1441 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
1442 /// </summary> 1442 /// </summary>
1443 /// <value> 1443 /// <value>
1444 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 1444 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
1445 /// otherwise, <see langword="false"/>. 1445 /// otherwise, <see langword="false"/>.
1446 /// </value> 1446 /// </value>
1447 /// <remarks> 1447 /// <remarks>
1448 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="ICnmCache{TKey,TValue}.Set"/> 1448 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="ICnmCache{TKey,TValue}.Set"/>
1449 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from 1449 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
1450 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 1450 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
1451 /// stay longer in cache. 1451 /// stay longer in cache.
1452 /// </remarks> 1452 /// </remarks>
1453 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 1453 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
@@ -1463,13 +1463,13 @@ namespace OpenSim.Framework
1463 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>. 1463 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>.
1464 /// </summary> 1464 /// </summary>
1465 /// <value> 1465 /// <value>
1466 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements; 1466 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements;
1467 /// otherwise maximal allowed count of elements. 1467 /// otherwise maximal allowed count of elements.
1468 /// </value> 1468 /// </value>
1469 /// <remarks> 1469 /// <remarks>
1470 /// <para> 1470 /// <para>
1471 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1471 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1472 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1472 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1473 /// </para> 1473 /// </para>
1474 /// </remarks> 1474 /// </remarks>
1475 public int MaxCount 1475 public int MaxCount
@@ -1496,7 +1496,7 @@ namespace OpenSim.Framework
1496 /// </value> 1496 /// </value>
1497 /// <remarks> 1497 /// <remarks>
1498 /// <para> 1498 /// <para>
1499 /// If element's size is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is 1499 /// If element's size is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is
1500 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>. 1500 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>.
1501 /// </para> 1501 /// </para>
1502 /// </remarks> 1502 /// </remarks>
@@ -1522,8 +1522,8 @@ namespace OpenSim.Framework
1522 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 1522 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
1523 /// </para> 1523 /// </para>
1524 /// <para> 1524 /// <para>
1525 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1525 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1526 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1526 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1527 /// </para> 1527 /// </para>
1528 /// </remarks> 1528 /// </remarks>
1529 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1529 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -1556,11 +1556,11 @@ namespace OpenSim.Framework
1556 /// Normally bytes, but can be any suitable unit of measure. 1556 /// Normally bytes, but can be any suitable unit of measure.
1557 /// </para> 1557 /// </para>
1558 /// <para> 1558 /// <para>
1559 /// Element's size is given when element is added or replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method. 1559 /// Element's size is given when element is added or replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method.
1560 /// </para> 1560 /// </para>
1561 /// <para> 1561 /// <para>
1562 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1562 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1563 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1563 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1564 /// </para> 1564 /// </para>
1565 /// </remarks> 1565 /// </remarks>
1566 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1566 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -1581,8 +1581,8 @@ namespace OpenSim.Framework
1581 /// </value> 1581 /// </value>
1582 /// <remarks> 1582 /// <remarks>
1583 /// <para> 1583 /// <para>
1584 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 1584 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
1585 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to 1585 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to
1586 /// <see cref="ICnmCache{TKey,TValue}"/>. 1586 /// <see cref="ICnmCache{TKey,TValue}"/>.
1587 /// </para> 1587 /// </para>
1588 /// </remarks> 1588 /// </remarks>
@@ -1735,7 +1735,7 @@ namespace OpenSim.Framework
1735 } 1735 }
1736 1736
1737 /// <summary> 1737 /// <summary>
1738 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to 1738 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to
1739 /// <see cref="ICnmCache{TKey,TValue}"/>. 1739 /// <see cref="ICnmCache{TKey,TValue}"/>.
1740 /// </summary> 1740 /// </summary>
1741 /// <param name="key"> 1741 /// <param name="key">
@@ -1748,7 +1748,7 @@ namespace OpenSim.Framework
1748 /// The element's size. Normally bytes, but can be any suitable unit of measure. 1748 /// The element's size. Normally bytes, but can be any suitable unit of measure.
1749 /// </param> 1749 /// </param>
1750 /// <returns> 1750 /// <returns>
1751 /// <see langword="true"/>if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>; 1751 /// <see langword="true"/>if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>;
1752 /// otherwise <see langword="false"/>. 1752 /// otherwise <see langword="false"/>.
1753 /// </returns> 1753 /// </returns>
1754 /// <exception cref="ArgumentNullException"> 1754 /// <exception cref="ArgumentNullException">
@@ -1759,17 +1759,17 @@ namespace OpenSim.Framework
1759 /// </exception> 1759 /// </exception>
1760 /// <remarks> 1760 /// <remarks>
1761 /// <para> 1761 /// <para>
1762 /// If element's <paramref name="size"/> is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is 1762 /// If element's <paramref name="size"/> is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is
1763 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is 1763 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is
1764 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>. 1764 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>.
1765 /// </para> 1765 /// </para>
1766 /// <para> 1766 /// <para>
1767 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1767 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1768 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 1768 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
1769 /// </para> 1769 /// </para>
1770 /// <para> 1770 /// <para>
1771 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1771 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1772 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 1772 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
1773 /// </para> 1773 /// </para>
1774 /// </remarks> 1774 /// </remarks>
1775 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 1775 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
@@ -1809,15 +1809,15 @@ namespace OpenSim.Framework
1809 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>. 1809 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>.
1810 /// </summary> 1810 /// </summary>
1811 /// <returns> 1811 /// <returns>
1812 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 1812 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
1813 /// the specified key; otherwise, <see langword="false"/>. 1813 /// the specified key; otherwise, <see langword="false"/>.
1814 /// </returns> 1814 /// </returns>
1815 /// <param name="key"> 1815 /// <param name="key">
1816 /// The key whose <paramref name="value"/> to get. 1816 /// The key whose <paramref name="value"/> to get.
1817 /// </param> 1817 /// </param>
1818 /// <param name="value"> 1818 /// <param name="value">
1819 /// When this method returns, the value associated with the specified <paramref name="key"/>, 1819 /// When this method returns, the value associated with the specified <paramref name="key"/>,
1820 /// if the <paramref name="key"/> is found; otherwise, the 1820 /// if the <paramref name="key"/> is found; otherwise, the
1821 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized. 1821 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized.
1822 /// </param> 1822 /// </param>
1823 /// <exception cref="ArgumentNullException"> 1823 /// <exception cref="ArgumentNullException">
diff --git a/OpenSim/Framework/CnmSynchronizedCache.cs b/OpenSim/Framework/CnmSynchronizedCache.cs
index 2bafbe9..b33f4f7 100644
--- a/OpenSim/Framework/CnmSynchronizedCache.cs
+++ b/OpenSim/Framework/CnmSynchronizedCache.cs
@@ -36,10 +36,10 @@ namespace OpenSim.Framework
36 /// Synchronized Cenome cache wrapper. 36 /// Synchronized Cenome cache wrapper.
37 /// </summary> 37 /// </summary>
38 /// <typeparam name="TKey"> 38 /// <typeparam name="TKey">
39 /// The type of keys in the cache. 39 /// The type of keys in the cache.
40 /// </typeparam> 40 /// </typeparam>
41 /// <typeparam name="TValue"> 41 /// <typeparam name="TValue">
42 /// The type of values in the cache. 42 /// The type of values in the cache.
43 /// </typeparam> 43 /// </typeparam>
44 /// <remarks> 44 /// <remarks>
45 /// <para> 45 /// <para>
@@ -60,7 +60,7 @@ namespace OpenSim.Framework
60 private readonly object m_syncRoot; 60 private readonly object m_syncRoot;
61 61
62 /// <summary> 62 /// <summary>
63 /// Initializes a new instance of the <see cref="CnmSynchronizedCache{TKey,TValue}"/> class. 63 /// Initializes a new instance of the <see cref="CnmSynchronizedCache{TKey,TValue}"/> class.
64 /// Initializes a new instance of the <see cref="CnmSynchronizedCache{TKey,TValue}"/> class. 64 /// Initializes a new instance of the <see cref="CnmSynchronizedCache{TKey,TValue}"/> class.
65 /// </summary> 65 /// </summary>
66 /// <param name="cache"> 66 /// <param name="cache">
@@ -73,13 +73,13 @@ namespace OpenSim.Framework
73 } 73 }
74 74
75 /// <summary> 75 /// <summary>
76 /// Returns a <see cref="ICnmCache{TKey,TValue}"/> wrapper that is synchronized (thread safe). 76 /// Returns a <see cref="ICnmCache{TKey,TValue}"/> wrapper that is synchronized (thread safe).
77 /// </summary> 77 /// </summary>
78 /// <param name="cache"> 78 /// <param name="cache">
79 /// The <see cref="ICnmCache{TKey,TValue}"/> to synchronize. 79 /// The <see cref="ICnmCache{TKey,TValue}"/> to synchronize.
80 /// </param> 80 /// </param>
81 /// <returns> 81 /// <returns>
82 /// A <see cref="ICnmCache{TKey,TValue}"/> wrapper that is synchronized (thread safe). 82 /// A <see cref="ICnmCache{TKey,TValue}"/> wrapper that is synchronized (thread safe).
83 /// </returns> 83 /// </returns>
84 /// <exception cref="ArgumentNullException"> 84 /// <exception cref="ArgumentNullException">
85 /// <paramref name="cache"/>is null. 85 /// <paramref name="cache"/>is null.
@@ -125,7 +125,7 @@ namespace OpenSim.Framework
125 } 125 }
126 126
127 /// <summary> 127 /// <summary>
128 /// Finalizes an instance of the <see cref="SynchronizedEnumerator"/> class. 128 /// Finalizes an instance of the <see cref="SynchronizedEnumerator"/> class.
129 /// </summary> 129 /// </summary>
130 ~SynchronizedEnumerator() 130 ~SynchronizedEnumerator()
131 { 131 {
@@ -184,7 +184,7 @@ namespace OpenSim.Framework
184 /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. 184 /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
185 /// </returns> 185 /// </returns>
186 /// <exception cref="InvalidOperationException"> 186 /// <exception cref="InvalidOperationException">
187 /// The collection was modified after the enumerator was created. 187 /// The collection was modified after the enumerator was created.
188 /// </exception> 188 /// </exception>
189 public bool MoveNext() 189 public bool MoveNext()
190 { 190 {
@@ -195,7 +195,7 @@ namespace OpenSim.Framework
195 /// Sets the enumerator to its initial position, which is before the first element in the collection. 195 /// Sets the enumerator to its initial position, which is before the first element in the collection.
196 /// </summary> 196 /// </summary>
197 /// <exception cref="InvalidOperationException"> 197 /// <exception cref="InvalidOperationException">
198 /// The collection was modified after the enumerator was created. 198 /// The collection was modified after the enumerator was created.
199 /// </exception> 199 /// </exception>
200 public void Reset() 200 public void Reset()
201 { 201 {
@@ -214,8 +214,8 @@ namespace OpenSim.Framework
214 /// </summary> 214 /// </summary>
215 /// <remarks> 215 /// <remarks>
216 /// <para> 216 /// <para>
217 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 217 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
218 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 218 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
219 /// </para> 219 /// </para>
220 /// </remarks> 220 /// </remarks>
221 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/> 221 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/>
@@ -241,13 +241,13 @@ namespace OpenSim.Framework
241 /// </value> 241 /// </value>
242 /// <remarks> 242 /// <remarks>
243 /// <para> 243 /// <para>
244 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 244 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
245 /// and it is not accessed through <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> method or element's value is 245 /// and it is not accessed through <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> method or element's value is
246 /// not replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method, then it is automatically removed from the 246 /// not replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method, then it is automatically removed from the
247 /// <see cref="ICnmCache{TKey,TValue}"/>. 247 /// <see cref="ICnmCache{TKey,TValue}"/>.
248 /// </para> 248 /// </para>
249 /// <para> 249 /// <para>
250 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time, 250 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time,
251 /// because total size or count of elements stored to cache is larger than <see cref="ICnmCache{TKey,TValue}.MaxSize"/> or <see cref="ICnmCache{TKey,TValue}.MaxCount"/>. 251 /// because total size or count of elements stored to cache is larger than <see cref="ICnmCache{TKey,TValue}.MaxSize"/> or <see cref="ICnmCache{TKey,TValue}.MaxCount"/>.
252 /// </para> 252 /// </para>
253 /// <para> 253 /// <para>
@@ -291,17 +291,17 @@ namespace OpenSim.Framework
291 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements. 291 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements.
292 /// </summary> 292 /// </summary>
293 /// <value> 293 /// <value>
294 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited; 294 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited;
295 /// otherwise, <see langword="false"/>. 295 /// otherwise, <see langword="false"/>.
296 /// </value> 296 /// </value>
297 /// <remarks> 297 /// <remarks>
298 /// <para> 298 /// <para>
299 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 299 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
300 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 300 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
301 /// </para> 301 /// </para>
302 /// </remarks> 302 /// </remarks>
303 /// <seealso cref="ICnmCache{TKey,TValue}.Count"/> 303 /// <seealso cref="ICnmCache{TKey,TValue}.Count"/>
304 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/> 304 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/>
305 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 305 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
306 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 306 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
307 public bool IsCountLimited 307 public bool IsCountLimited
@@ -319,13 +319,13 @@ namespace OpenSim.Framework
319 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements. 319 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements.
320 /// </summary> 320 /// </summary>
321 /// <value> 321 /// <value>
322 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited; 322 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited;
323 /// otherwise, <see langword="false"/>. 323 /// otherwise, <see langword="false"/>.
324 /// </value> 324 /// </value>
325 /// <remarks> 325 /// <remarks>
326 /// <para> 326 /// <para>
327 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 327 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
328 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 328 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
329 /// </para> 329 /// </para>
330 /// </remarks> 330 /// </remarks>
331 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 331 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -348,12 +348,12 @@ namespace OpenSim.Framework
348 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe). 348 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe).
349 /// </summary> 349 /// </summary>
350 /// <value> 350 /// <value>
351 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe); 351 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe);
352 /// otherwise, <see langword="false"/>. 352 /// otherwise, <see langword="false"/>.
353 /// </value> 353 /// </value>
354 /// <remarks> 354 /// <remarks>
355 /// <para> 355 /// <para>
356 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use 356 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use
357 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class 357 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class
358 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object. 358 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object.
359 /// </para> 359 /// </para>
@@ -369,13 +369,13 @@ namespace OpenSim.Framework
369 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 369 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
370 /// </summary> 370 /// </summary>
371 /// <value> 371 /// <value>
372 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 372 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
373 /// otherwise, <see langword="false"/>. 373 /// otherwise, <see langword="false"/>.
374 /// </value> 374 /// </value>
375 /// <remarks> 375 /// <remarks>
376 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="ICnmCache{TKey,TValue}.Set"/> 376 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="ICnmCache{TKey,TValue}.Set"/>
377 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from 377 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
378 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 378 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
379 /// stay longer in cache. 379 /// stay longer in cache.
380 /// </remarks> 380 /// </remarks>
381 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 381 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
@@ -397,13 +397,13 @@ namespace OpenSim.Framework
397 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>. 397 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>.
398 /// </summary> 398 /// </summary>
399 /// <value> 399 /// <value>
400 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements; 400 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements;
401 /// otherwise maximal allowed count of elements. 401 /// otherwise maximal allowed count of elements.
402 /// </value> 402 /// </value>
403 /// <remarks> 403 /// <remarks>
404 /// <para> 404 /// <para>
405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
407 /// </para> 407 /// </para>
408 /// </remarks> 408 /// </remarks>
409 public int MaxCount 409 public int MaxCount
@@ -433,7 +433,7 @@ namespace OpenSim.Framework
433 /// </value> 433 /// </value>
434 /// <remarks> 434 /// <remarks>
435 /// <para> 435 /// <para>
436 /// If element's size is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is 436 /// If element's size is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is
437 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>. 437 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>.
438 /// </para> 438 /// </para>
439 /// </remarks> 439 /// </remarks>
@@ -463,8 +463,8 @@ namespace OpenSim.Framework
463 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 463 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
464 /// </para> 464 /// </para>
465 /// <para> 465 /// <para>
466 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 466 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
467 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 467 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
468 /// </para> 468 /// </para>
469 /// </remarks> 469 /// </remarks>
470 /// <exception cref="ArgumentOutOfRangeException">value is less than 0.</exception> 470 /// <exception cref="ArgumentOutOfRangeException">value is less than 0.</exception>
@@ -501,11 +501,11 @@ namespace OpenSim.Framework
501 /// Normally bytes, but can be any suitable unit of measure. 501 /// Normally bytes, but can be any suitable unit of measure.
502 /// </para> 502 /// </para>
503 /// <para> 503 /// <para>
504 /// Element's size is given when element is added or replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method. 504 /// Element's size is given when element is added or replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method.
505 /// </para> 505 /// </para>
506 /// <para> 506 /// <para>
507 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 507 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
508 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 508 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
509 /// </para> 509 /// </para>
510 /// </remarks> 510 /// </remarks>
511 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 511 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -532,8 +532,8 @@ namespace OpenSim.Framework
532 /// </value> 532 /// </value>
533 /// <remarks> 533 /// <remarks>
534 /// <para> 534 /// <para>
535 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 535 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
536 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to 536 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to
537 /// <see cref="ICnmCache{TKey,TValue}"/>. 537 /// <see cref="ICnmCache{TKey,TValue}"/>.
538 /// </para> 538 /// </para>
539 /// </remarks> 539 /// </remarks>
@@ -647,7 +647,7 @@ namespace OpenSim.Framework
647 } 647 }
648 648
649 /// <summary> 649 /// <summary>
650 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to 650 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to
651 /// <see cref="ICnmCache{TKey,TValue}"/>. 651 /// <see cref="ICnmCache{TKey,TValue}"/>.
652 /// </summary> 652 /// </summary>
653 /// <param name="key"> 653 /// <param name="key">
@@ -660,7 +660,7 @@ namespace OpenSim.Framework
660 /// The element's size. Normally bytes, but can be any suitable unit of measure. 660 /// The element's size. Normally bytes, but can be any suitable unit of measure.
661 /// </param> 661 /// </param>
662 /// <returns> 662 /// <returns>
663 /// <see langword="true"/>if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>; 663 /// <see langword="true"/>if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>;
664 /// otherwise <see langword="false"/>. 664 /// otherwise <see langword="false"/>.
665 /// </returns> 665 /// </returns>
666 /// <exception cref="ArgumentNullException"> 666 /// <exception cref="ArgumentNullException">
@@ -671,17 +671,17 @@ namespace OpenSim.Framework
671 /// </exception> 671 /// </exception>
672 /// <remarks> 672 /// <remarks>
673 /// <para> 673 /// <para>
674 /// If element's <paramref name="size"/> is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is 674 /// If element's <paramref name="size"/> is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is
675 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is 675 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is
676 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>. 676 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>.
677 /// </para> 677 /// </para>
678 /// <para> 678 /// <para>
679 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 679 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
680 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 680 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
681 /// </para> 681 /// </para>
682 /// <para> 682 /// <para>
683 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 683 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
684 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 684 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
685 /// </para> 685 /// </para>
686 /// </remarks> 686 /// </remarks>
687 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 687 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
@@ -703,15 +703,15 @@ namespace OpenSim.Framework
703 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>. 703 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>.
704 /// </summary> 704 /// </summary>
705 /// <returns> 705 /// <returns>
706 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 706 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
707 /// the specified key; otherwise, <see langword="false"/>. 707 /// the specified key; otherwise, <see langword="false"/>.
708 /// </returns> 708 /// </returns>
709 /// <param name="key"> 709 /// <param name="key">
710 /// The key whose <paramref name="value"/> to get. 710 /// The key whose <paramref name="value"/> to get.
711 /// </param> 711 /// </param>
712 /// <param name="value"> 712 /// <param name="value">
713 /// When this method returns, the value associated with the specified <paramref name="key"/>, 713 /// When this method returns, the value associated with the specified <paramref name="key"/>,
714 /// if the <paramref name="key"/> is found; otherwise, the 714 /// if the <paramref name="key"/> is found; otherwise, the
715 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized. 715 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized.
716 /// </param> 716 /// </param>
717 /// <exception cref="ArgumentNullException"> 717 /// <exception cref="ArgumentNullException">
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 6b7cdf8..52360b4 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -52,27 +52,27 @@ namespace OpenSim.Framework.Console
52 /// The module from which this command comes 52 /// The module from which this command comes
53 /// </value> 53 /// </value>
54 public string module; 54 public string module;
55 55
56 /// <value> 56 /// <value>
57 /// Whether the module is shared 57 /// Whether the module is shared
58 /// </value> 58 /// </value>
59 public bool shared; 59 public bool shared;
60 60
61 /// <value> 61 /// <value>
62 /// Very short BNF description 62 /// Very short BNF description
63 /// </value> 63 /// </value>
64 public string help_text; 64 public string help_text;
65 65
66 /// <value> 66 /// <value>
67 /// Longer one line help text 67 /// Longer one line help text
68 /// </value> 68 /// </value>
69 public string long_help; 69 public string long_help;
70 70
71 /// <value> 71 /// <value>
72 /// Full descriptive help for this command 72 /// Full descriptive help for this command
73 /// </value> 73 /// </value>
74 public string descriptive_help; 74 public string descriptive_help;
75 75
76 /// <value> 76 /// <value>
77 /// The method to invoke for this command 77 /// The method to invoke for this command
78 /// </value> 78 /// </value>
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Console
106 { 106 {
107 List<string> help = new List<string>(); 107 List<string> help = new List<string>();
108 List<string> helpParts = new List<string>(cmd); 108 List<string> helpParts = new List<string>(cmd);
109 109
110 // Remove initial help keyword 110 // Remove initial help keyword
111 helpParts.RemoveAt(0); 111 helpParts.RemoveAt(0);
112 112
@@ -154,7 +154,7 @@ namespace OpenSim.Framework.Console
154 154
155 return help; 155 return help;
156 } 156 }
157 157
158 /// <summary> 158 /// <summary>
159 /// See if we can find the requested command in order to display longer help 159 /// See if we can find the requested command in order to display longer help
160 /// </summary> 160 /// </summary>
@@ -171,23 +171,23 @@ namespace OpenSim.Framework.Console
171 help.Insert(0, ItemHelpText); 171 help.Insert(0, ItemHelpText);
172 return help; 172 return help;
173 } 173 }
174 174
175 Dictionary<string, object> dict = tree; 175 Dictionary<string, object> dict = tree;
176 while (helpParts.Count > 0) 176 while (helpParts.Count > 0)
177 { 177 {
178 string helpPart = helpParts[0]; 178 string helpPart = helpParts[0];
179 179
180 if (!dict.ContainsKey(helpPart)) 180 if (!dict.ContainsKey(helpPart))
181 break; 181 break;
182 182
183 //m_log.Debug("Found {0}", helpParts[0]); 183 //m_log.Debug("Found {0}", helpParts[0]);
184 184
185 if (dict[helpPart] is Dictionary<string, Object>) 185 if (dict[helpPart] is Dictionary<string, Object>)
186 dict = (Dictionary<string, object>)dict[helpPart]; 186 dict = (Dictionary<string, object>)dict[helpPart];
187 187
188 helpParts.RemoveAt(0); 188 helpParts.RemoveAt(0);
189 } 189 }
190 190
191 // There was a command for the given help string 191 // There was a command for the given help string
192 if (dict.ContainsKey(String.Empty)) 192 if (dict.ContainsKey(String.Empty))
193 { 193 {
@@ -200,14 +200,14 @@ namespace OpenSim.Framework.Console
200 // If we do have some descriptive help then insert a spacing line before for readability. 200 // If we do have some descriptive help then insert a spacing line before for readability.
201 if (descriptiveHelp != string.Empty) 201 if (descriptiveHelp != string.Empty)
202 help.Add(string.Empty); 202 help.Add(string.Empty);
203 203
204 help.Add(commandInfo.descriptive_help); 204 help.Add(commandInfo.descriptive_help);
205 } 205 }
206 else 206 else
207 { 207 {
208 help.Add(string.Format("No help is available for {0}", originalHelpRequest)); 208 help.Add(string.Format("No help is available for {0}", originalHelpRequest));
209 } 209 }
210 210
211 return help; 211 return help;
212 } 212 }
213 213
@@ -268,7 +268,7 @@ namespace OpenSim.Framework.Console
268// } 268// }
269// return result; 269// return result;
270// } 270// }
271 271
272 /// <summary> 272 /// <summary>
273 /// Add a command to those which can be invoked from the console. 273 /// Add a command to those which can be invoked from the console.
274 /// </summary> 274 /// </summary>
@@ -299,7 +299,7 @@ namespace OpenSim.Framework.Console
299 string[] parts = Parser.Parse(command); 299 string[] parts = Parser.Parse(command);
300 300
301 Dictionary<string, Object> current = tree; 301 Dictionary<string, Object> current = tree;
302 302
303 foreach (string part in parts) 303 foreach (string part in parts)
304 { 304 {
305 if (current.ContainsKey(part)) 305 if (current.ContainsKey(part))
@@ -326,7 +326,7 @@ namespace OpenSim.Framework.Console
326 326
327 return; 327 return;
328 } 328 }
329 329
330 info = new CommandInfo(); 330 info = new CommandInfo();
331 info.module = module; 331 info.module = module;
332 info.shared = shared; 332 info.shared = shared;
@@ -471,7 +471,7 @@ namespace OpenSim.Framework.Console
471 471
472 return null; 472 return null;
473 } 473 }
474 474
475 public bool HasCommand(string command) 475 public bool HasCommand(string command)
476 { 476 {
477 string[] result; 477 string[] result;
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 2d8e723..64cddea 100755
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Framework.Console
67 { 67 {
68 System.Console.WriteLine(text); 68 System.Console.WriteLine(text);
69 } 69 }
70 70
71 public virtual void OutputFormat(string format, params object[] components) 71 public virtual void OutputFormat(string format, params object[] components)
72 { 72 {
73 Output(string.Format(format, components)); 73 Output(string.Format(format, components));
@@ -86,7 +86,7 @@ namespace OpenSim.Framework.Console
86 86
87 return ret; 87 return ret;
88 } 88 }
89 89
90 public string CmdPrompt(string p, List<char> excludedCharacters) 90 public string CmdPrompt(string p, List<char> excludedCharacters)
91 { 91 {
92 bool itisdone = false; 92 bool itisdone = false;
@@ -95,7 +95,7 @@ namespace OpenSim.Framework.Console
95 { 95 {
96 itisdone = true; 96 itisdone = true;
97 ret = CmdPrompt(p); 97 ret = CmdPrompt(p);
98 98
99 foreach (char c in excludedCharacters) 99 foreach (char c in excludedCharacters)
100 { 100 {
101 if (ret.Contains(c.ToString())) 101 if (ret.Contains(c.ToString()))
@@ -117,7 +117,7 @@ namespace OpenSim.Framework.Console
117 { 117 {
118 itisdone = true; 118 itisdone = true;
119 ret = CmdPrompt(p, def); 119 ret = CmdPrompt(p, def);
120 120
121 if (ret == String.Empty) 121 if (ret == String.Empty)
122 { 122 {
123 ret = def; 123 ret = def;
diff --git a/OpenSim/Framework/Console/ConsoleUtil.cs b/OpenSim/Framework/Console/ConsoleUtil.cs
index 44f6dc1..bfa05a2 100644
--- a/OpenSim/Framework/Console/ConsoleUtil.cs
+++ b/OpenSim/Framework/Console/ConsoleUtil.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Framework.Console
40 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 public const int LocalIdNotFound = 0; 42 public const int LocalIdNotFound = 0;
43 43
44 /// <summary> 44 /// <summary>
45 /// Used by modules to display stock co-ordinate help, though possibly this should be under some general section 45 /// Used by modules to display stock co-ordinate help, though possibly this should be under some general section
46 /// rather than in each help summary. 46 /// rather than in each help summary.
@@ -57,10 +57,10 @@ namespace OpenSim.Framework.Console
57 show object pos ,20,20 to ,40,40 57 show object pos ,20,20 to ,40,40
58 delete object pos ,,30 to ,,~ 58 delete object pos ,,30 to ,,~
59 show object pos ,,-~ to ,,30"; 59 show object pos ,,-~ to ,,30";
60 60
61 public const string MinRawConsoleVectorValue = "-~"; 61 public const string MinRawConsoleVectorValue = "-~";
62 public const string MaxRawConsoleVectorValue = "~"; 62 public const string MaxRawConsoleVectorValue = "~";
63 63
64 public const string VectorSeparator = ","; 64 public const string VectorSeparator = ",";
65 public static char[] VectorSeparatorChars = VectorSeparator.ToCharArray(); 65 public static char[] VectorSeparatorChars = VectorSeparator.ToCharArray();
66 66
@@ -81,7 +81,7 @@ namespace OpenSim.Framework.Console
81 81
82 return true; 82 return true;
83 } 83 }
84 84
85 /// <summary> 85 /// <summary>
86 /// Try to parse a console UUID from the console. 86 /// Try to parse a console UUID from the console.
87 /// </summary> 87 /// </summary>
@@ -101,7 +101,7 @@ namespace OpenSim.Framework.Console
101 101
102 return false; 102 return false;
103 } 103 }
104 104
105 return true; 105 return true;
106 } 106 }
107 107
@@ -259,7 +259,7 @@ namespace OpenSim.Framework.Console
259 259
260 return false; 260 return false;
261 } 261 }
262 262
263 /// <summary> 263 /// <summary>
264 /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3 264 /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3
265 /// </summary> 265 /// </summary>
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Console
270 { 270 {
271 return TryParseConsoleVector(rawConsoleVector, c => float.MinValue.ToString(), out vector); 271 return TryParseConsoleVector(rawConsoleVector, c => float.MinValue.ToString(), out vector);
272 } 272 }
273 273
274 /// <summary> 274 /// <summary>
275 /// Convert a maximum vector input from the console to an OpenMetaverse.Vector3 275 /// Convert a maximum vector input from the console to an OpenMetaverse.Vector3
276 /// </summary> 276 /// </summary>
@@ -281,7 +281,7 @@ namespace OpenSim.Framework.Console
281 { 281 {
282 return TryParseConsoleVector(rawConsoleVector, c => float.MaxValue.ToString(), out vector); 282 return TryParseConsoleVector(rawConsoleVector, c => float.MaxValue.ToString(), out vector);
283 } 283 }
284 284
285 /// <summary> 285 /// <summary>
286 /// Convert a vector input from the console to an OpenMetaverse.Vector3 286 /// Convert a vector input from the console to an OpenMetaverse.Vector3
287 /// </summary> 287 /// </summary>
@@ -354,10 +354,10 @@ namespace OpenSim.Framework.Console
354 string rawConsoleVector, int dimensions, Func<string, string> blankComponentFunc) 354 string rawConsoleVector, int dimensions, Func<string, string> blankComponentFunc)
355 { 355 {
356 List<string> components = rawConsoleVector.Split(VectorSeparatorChars).ToList(); 356 List<string> components = rawConsoleVector.Split(VectorSeparatorChars).ToList();
357 357
358 if (components.Count < 1 || components.Count > dimensions) 358 if (components.Count < 1 || components.Count > dimensions)
359 return null; 359 return null;
360 360
361 if (components.Count < dimensions) 361 if (components.Count < dimensions)
362 { 362 {
363 if (blankComponentFunc == null) 363 if (blankComponentFunc == null)
@@ -380,7 +380,7 @@ namespace OpenSim.Framework.Console
380 else 380 else
381 return c; 381 return c;
382 }); 382 });
383 383
384 return string.Join(VectorSeparator, cookedComponents.ToArray()); 384 return string.Join(VectorSeparator, cookedComponents.ToArray());
385 } 385 }
386 } 386 }
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index 28293c0..73f0323 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Console
51 private const string LOGLEVEL_NONE = "(none)"; 51 private const string LOGLEVEL_NONE = "(none)";
52 52
53 // Used to extract categories for colourization. 53 // Used to extract categories for colourization.
54 private Regex m_categoryRegex 54 private Regex m_categoryRegex
55 = new Regex( 55 = new Regex(
56 @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)", RegexOptions.Singleline | RegexOptions.Compiled); 56 @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)", RegexOptions.Singleline | RegexOptions.Compiled);
57 57
@@ -167,15 +167,15 @@ namespace OpenSim.Framework.Console
167 { 167 {
168 System.Console.CursorLeft = 0; 168 System.Console.CursorLeft = 0;
169 } 169 }
170 else 170 else
171 { 171 {
172 int bufferWidth = System.Console.BufferWidth; 172 int bufferWidth = System.Console.BufferWidth;
173 173
174 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) 174 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
175 if (bufferWidth > 0 && left >= bufferWidth) 175 if (bufferWidth > 0 && left >= bufferWidth)
176 System.Console.CursorLeft = bufferWidth - 1; 176 System.Console.CursorLeft = bufferWidth - 1;
177 } 177 }
178 178
179 if (top < 0) 179 if (top < 0)
180 { 180 {
181 top = 0; 181 top = 0;
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console
183 else 183 else
184 { 184 {
185 int bufferHeight = System.Console.BufferHeight; 185 int bufferHeight = System.Console.BufferHeight;
186 186
187 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) 187 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
188 if (bufferHeight > 0 && top >= bufferHeight) 188 if (bufferHeight > 0 && top >= bufferHeight)
189 top = bufferHeight - 1; 189 top = bufferHeight - 1;
@@ -216,14 +216,14 @@ namespace OpenSim.Framework.Console
216 { 216 {
217 System.Console.CursorTop = 0; 217 System.Console.CursorTop = 0;
218 } 218 }
219 else 219 else
220 { 220 {
221 int bufferHeight = System.Console.BufferHeight; 221 int bufferHeight = System.Console.BufferHeight;
222 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) 222 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
223 if (bufferHeight > 0 && top >= bufferHeight) 223 if (bufferHeight > 0 && top >= bufferHeight)
224 System.Console.CursorTop = bufferHeight - 1; 224 System.Console.CursorTop = bufferHeight - 1;
225 } 225 }
226 226
227 if (left < 0) 227 if (left < 0)
228 { 228 {
229 left = 0; 229 left = 0;
@@ -339,7 +339,7 @@ namespace OpenSim.Framework.Console
339 string outText = text; 339 string outText = text;
340 340
341 if (level != LOGLEVEL_NONE) 341 if (level != LOGLEVEL_NONE)
342 { 342 {
343 MatchCollection matches = m_categoryRegex.Matches(text); 343 MatchCollection matches = m_categoryRegex.Matches(text);
344 344
345 if (matches.Count == 1) 345 if (matches.Count == 1)
@@ -364,7 +364,7 @@ namespace OpenSim.Framework.Console
364 WriteColorText(ConsoleColor.Yellow, outText); 364 WriteColorText(ConsoleColor.Yellow, outText);
365 else 365 else
366 System.Console.Write(outText); 366 System.Console.Write(outText);
367 367
368 System.Console.WriteLine(); 368 System.Console.WriteLine();
369 } 369 }
370 370
@@ -551,7 +551,7 @@ namespace OpenSim.Framework.Console
551 } 551 }
552 552
553 string commandLine = m_commandLine.ToString(); 553 string commandLine = m_commandLine.ToString();
554 554
555 if (isCommand) 555 if (isCommand)
556 { 556 {
557 string[] cmd = Commands.Resolve(Parser.Parse(commandLine)); 557 string[] cmd = Commands.Resolve(Parser.Parse(commandLine));
@@ -573,7 +573,7 @@ namespace OpenSim.Framework.Console
573 // If we're not echoing to screen (e.g. a password) then we probably don't want it in history 573 // If we're not echoing to screen (e.g. a password) then we probably don't want it in history
574 if (m_echo && commandLine != "") 574 if (m_echo && commandLine != "")
575 AddToHistory(commandLine); 575 AddToHistory(commandLine);
576 576
577 return commandLine; 577 return commandLine;
578 default: 578 default:
579 break; 579 break;
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs
index 1a142df..e1ff720 100644
--- a/OpenSim/Framework/Console/MockConsole.cs
+++ b/OpenSim/Framework/Console/MockConsole.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Framework.Console
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// This is a Fake console that's used when setting up the Scene in Unit Tests 37 /// This is a Fake console that's used when setting up the Scene in Unit Tests
38 /// Don't use this except for Unit Testing or you're in for a world of hurt when the 38 /// Don't use this except for Unit Testing or you're in for a world of hurt when the
39 /// sim gets to ReadLine 39 /// sim gets to ReadLine
40 /// </summary> 40 /// </summary>
41 public class MockConsole : ICommandConsole 41 public class MockConsole : ICommandConsole
@@ -56,7 +56,7 @@ namespace OpenSim.Framework.Console
56 56
57 public string ReadLine(string p, bool isCommand, bool e) { return ""; } 57 public string ReadLine(string p, bool isCommand, bool e) { return ""; }
58 58
59 public object ConsoleScene { 59 public object ConsoleScene {
60 get { return null; } 60 get { return null; }
61 set {} 61 set {}
62 } 62 }
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index 9049b4b..f59c902 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -46,93 +46,93 @@ namespace OpenSim.Framework.Console
46 // 46 //
47 public class RemoteConsole : CommandConsole 47 public class RemoteConsole : CommandConsole
48 { 48 {
49 // Connection specific data, indexed by a session ID 49 // Connection specific data, indexed by a session ID
50 // we create when a client connects. 50 // we create when a client connects.
51 protected class ConsoleConnection 51 protected class ConsoleConnection
52 { 52 {
53 // Last activity from the client 53 // Last activity from the client
54 public int last; 54 public int last;
55 55
56 // Last line of scrollback posted to this client 56 // Last line of scrollback posted to this client
57 public long lastLineSeen; 57 public long lastLineSeen;
58 58
59 // True if this is a new connection, e.g. has never 59 // True if this is a new connection, e.g. has never
60 // displayed a prompt to the user. 60 // displayed a prompt to the user.
61 public bool newConnection = true; 61 public bool newConnection = true;
62 } 62 }
63 63
64 // A line in the scrollback buffer. 64 // A line in the scrollback buffer.
65 protected class ScrollbackEntry 65 protected class ScrollbackEntry
66 { 66 {
67 // The line number of this entry 67 // The line number of this entry
68 public long lineNumber; 68 public long lineNumber;
69 69
70 // The text to send to the client 70 // The text to send to the client
71 public string text; 71 public string text;
72 72
73 // The level this should be logged as. Omitted for 73 // The level this should be logged as. Omitted for
74 // prompts and input echo. 74 // prompts and input echo.
75 public string level; 75 public string level;
76 76
77 // True if the text above is a prompt, e.g. the 77 // True if the text above is a prompt, e.g. the
78 // client should turn on the cursor / accept input 78 // client should turn on the cursor / accept input
79 public bool isPrompt; 79 public bool isPrompt;
80 80
81 // True if the requested input is a command. A 81 // True if the requested input is a command. A
82 // client may offer help or validate input if 82 // client may offer help or validate input if
83 // this is set. If false, input should be sent 83 // this is set. If false, input should be sent
84 // as typed. 84 // as typed.
85 public bool isCommand; 85 public bool isCommand;
86 86
87 // True if this text represents a line of text that 87 // True if this text represents a line of text that
88 // was input in response to a prompt. A client should 88 // was input in response to a prompt. A client should
89 // turn off the cursor and refrain from sending commands 89 // turn off the cursor and refrain from sending commands
90 // until a new prompt is received. 90 // until a new prompt is received.
91 public bool isInput; 91 public bool isInput;
92 } 92 }
93 93
94 // Data that is relevant to all connections 94 // Data that is relevant to all connections
95 95
96 // The scrollback buffer 96 // The scrollback buffer
97 protected List<ScrollbackEntry> m_Scrollback = new List<ScrollbackEntry>(); 97 protected List<ScrollbackEntry> m_Scrollback = new List<ScrollbackEntry>();
98 98
99 // Monotonously incrementing line number. This may eventually 99 // Monotonously incrementing line number. This may eventually
100 // wrap. No provision is made for that case because 64 bits 100 // wrap. No provision is made for that case because 64 bits
101 // is a long, long time. 101 // is a long, long time.
102 protected long m_lineNumber = 0; 102 protected long m_lineNumber = 0;
103 103
104 // These two variables allow us to send the correct 104 // These two variables allow us to send the correct
105 // information about the prompt status to the client, 105 // information about the prompt status to the client,
106 // irrespective of what may have run off the top of the 106 // irrespective of what may have run off the top of the
107 // scrollback buffer; 107 // scrollback buffer;
108 protected bool m_expectingInput = false; 108 protected bool m_expectingInput = false;
109 protected bool m_expectingCommand = true; 109 protected bool m_expectingCommand = true;
110 protected string m_lastPromptUsed; 110 protected string m_lastPromptUsed;
111 111
112 // This is the list of things received from clients. 112 // This is the list of things received from clients.
113 // Note: Race conditions can happen. If a client sends 113 // Note: Race conditions can happen. If a client sends
114 // something while nothing is expected, it will be 114 // something while nothing is expected, it will be
115 // intepreted as input to the next prompt. For 115 // intepreted as input to the next prompt. For
116 // commands this is largely correct. For other prompts, 116 // commands this is largely correct. For other prompts,
117 // YMMV. 117 // YMMV.
118 // TODO: Find a better way to fix this 118 // TODO: Find a better way to fix this
119 protected List<string> m_InputData = new List<string>(); 119 protected List<string> m_InputData = new List<string>();
120 120
121 // Event to allow ReadLine to wait synchronously even though 121 // Event to allow ReadLine to wait synchronously even though
122 // everthing else is asynchronous here. 122 // everthing else is asynchronous here.
123 protected ManualResetEvent m_DataEvent = new ManualResetEvent(false); 123 protected ManualResetEvent m_DataEvent = new ManualResetEvent(false);
124 124
125 // The list of sessions we maintain. Unlike other console types, 125 // The list of sessions we maintain. Unlike other console types,
126 // multiple users on the same console are explicitly allowed. 126 // multiple users on the same console are explicitly allowed.
127 protected Dictionary<UUID, ConsoleConnection> m_Connections = 127 protected Dictionary<UUID, ConsoleConnection> m_Connections =
128 new Dictionary<UUID, ConsoleConnection>(); 128 new Dictionary<UUID, ConsoleConnection>();
129 129
130 // Timer to control expiration of sessions that have been 130 // Timer to control expiration of sessions that have been
131 // disconnected. 131 // disconnected.
132 protected System.Timers.Timer m_expireTimer = new System.Timers.Timer(5000); 132 protected System.Timers.Timer m_expireTimer = new System.Timers.Timer(5000);
133 133
134 // The less interesting stuff that makes the actual server 134 // The less interesting stuff that makes the actual server
135 // work. 135 // work.
136 protected IHttpServer m_Server = null; 136 protected IHttpServer m_Server = null;
137 protected IConfigSource m_Config = null; 137 protected IConfigSource m_Config = null;
138 138
@@ -143,130 +143,130 @@ namespace OpenSim.Framework.Console
143 143
144 public RemoteConsole(string defaultPrompt) : base(defaultPrompt) 144 public RemoteConsole(string defaultPrompt) : base(defaultPrompt)
145 { 145 {
146 // There is something wrong with this architecture. 146 // There is something wrong with this architecture.
147 // A prompt is sent on every single input, so why have this? 147 // A prompt is sent on every single input, so why have this?
148 // TODO: Investigate and fix. 148 // TODO: Investigate and fix.
149 m_lastPromptUsed = defaultPrompt; 149 m_lastPromptUsed = defaultPrompt;
150 150
151 // Start expiration of sesssions. 151 // Start expiration of sesssions.
152 m_expireTimer.Elapsed += DoExpire; 152 m_expireTimer.Elapsed += DoExpire;
153 m_expireTimer.Start(); 153 m_expireTimer.Start();
154 } 154 }
155 155
156 public void ReadConfig(IConfigSource config) 156 public void ReadConfig(IConfigSource config)
157 { 157 {
158 m_Config = config; 158 m_Config = config;
159 159
160 // We're pulling this from the 'Network' section for legacy 160 // We're pulling this from the 'Network' section for legacy
161 // compatibility. However, this is so essentially insecure 161 // compatibility. However, this is so essentially insecure
162 // that TLS and client certs should be used instead of 162 // that TLS and client certs should be used instead of
163 // a username / password. 163 // a username / password.
164 IConfig netConfig = m_Config.Configs["Network"]; 164 IConfig netConfig = m_Config.Configs["Network"];
165 165
166 if (netConfig == null) 166 if (netConfig == null)
167 return; 167 return;
168 168
169 // Get the username and password. 169 // Get the username and password.
170 m_UserName = netConfig.GetString("ConsoleUser", String.Empty); 170 m_UserName = netConfig.GetString("ConsoleUser", String.Empty);
171 m_Password = netConfig.GetString("ConsolePass", String.Empty); 171 m_Password = netConfig.GetString("ConsolePass", String.Empty);
172 172
173 // Woefully underdocumented, this is what makes javascript 173 // Woefully underdocumented, this is what makes javascript
174 // console clients work. Set to "*" for anywhere or (better) 174 // console clients work. Set to "*" for anywhere or (better)
175 // to specific addresses. 175 // to specific addresses.
176 m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", String.Empty); 176 m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", String.Empty);
177 } 177 }
178 178
179 public void SetServer(IHttpServer server) 179 public void SetServer(IHttpServer server)
180 { 180 {
181 // This is called by the framework to give us the server 181 // This is called by the framework to give us the server
182 // instance (means: port) to work with. 182 // instance (means: port) to work with.
183 m_Server = server; 183 m_Server = server;
184 184
185 // Add our handlers 185 // Add our handlers
186 m_Server.AddHTTPHandler("/StartSession/", HandleHttpStartSession); 186 m_Server.AddHTTPHandler("/StartSession/", HandleHttpStartSession);
187 m_Server.AddHTTPHandler("/CloseSession/", HandleHttpCloseSession); 187 m_Server.AddHTTPHandler("/CloseSession/", HandleHttpCloseSession);
188 m_Server.AddHTTPHandler("/SessionCommand/", HandleHttpSessionCommand); 188 m_Server.AddHTTPHandler("/SessionCommand/", HandleHttpSessionCommand);
189 } 189 }
190 190
191 public override void Output(string text, string level) 191 public override void Output(string text, string level)
192 { 192 {
193 Output(text, level, false, false, false); 193 Output(text, level, false, false, false);
194 } 194 }
195 195
196 protected void Output(string text, string level, bool isPrompt, bool isCommand, bool isInput) 196 protected void Output(string text, string level, bool isPrompt, bool isCommand, bool isInput)
197 { 197 {
198 // Increment the line number. It was 0 and they start at 1 198 // Increment the line number. It was 0 and they start at 1
199 // so we need to pre-increment. 199 // so we need to pre-increment.
200 m_lineNumber++; 200 m_lineNumber++;
201 201
202 // Create and populate the new entry. 202 // Create and populate the new entry.
203 ScrollbackEntry newEntry = new ScrollbackEntry(); 203 ScrollbackEntry newEntry = new ScrollbackEntry();
204 204
205 newEntry.lineNumber = m_lineNumber; 205 newEntry.lineNumber = m_lineNumber;
206 newEntry.text = text; 206 newEntry.text = text;
207 newEntry.level = level; 207 newEntry.level = level;
208 newEntry.isPrompt = isPrompt; 208 newEntry.isPrompt = isPrompt;
209 newEntry.isCommand = isCommand; 209 newEntry.isCommand = isCommand;
210 newEntry.isInput = isInput; 210 newEntry.isInput = isInput;
211 211
212 // Add a line to the scrollback. In some cases, that may not 212 // Add a line to the scrollback. In some cases, that may not
213 // actually be a line of text. 213 // actually be a line of text.
214 lock (m_Scrollback) 214 lock (m_Scrollback)
215 { 215 {
216 // Prune the scrollback to the length se send as connect 216 // Prune the scrollback to the length se send as connect
217 // burst to give the user some context. 217 // burst to give the user some context.
218 while (m_Scrollback.Count >= 1000) 218 while (m_Scrollback.Count >= 1000)
219 m_Scrollback.RemoveAt(0); 219 m_Scrollback.RemoveAt(0);
220 220
221 m_Scrollback.Add(newEntry); 221 m_Scrollback.Add(newEntry);
222 } 222 }
223 223
224 // Let the rest of the system know we have output something. 224 // Let the rest of the system know we have output something.
225 FireOnOutput(text.Trim()); 225 FireOnOutput(text.Trim());
226 226
227 // Also display it for debugging. 227 // Also display it for debugging.
228 System.Console.WriteLine(text.Trim()); 228 System.Console.WriteLine(text.Trim());
229 } 229 }
230 230
231 public override void Output(string text) 231 public override void Output(string text)
232 { 232 {
233 // Output plain (non-logging style) text. 233 // Output plain (non-logging style) text.
234 Output(text, String.Empty, false, false, false); 234 Output(text, String.Empty, false, false, false);
235 } 235 }
236 236
237 public override string ReadLine(string p, bool isCommand, bool e) 237 public override string ReadLine(string p, bool isCommand, bool e)
238 { 238 {
239 // Output the prompt an prepare to wait. This 239 // Output the prompt an prepare to wait. This
240 // is called on a dedicated console thread and 240 // is called on a dedicated console thread and
241 // needs to be synchronous. Old architecture but 241 // needs to be synchronous. Old architecture but
242 // not worth upgrading. 242 // not worth upgrading.
243 if (isCommand) 243 if (isCommand)
244 { 244 {
245 m_expectingInput = true; 245 m_expectingInput = true;
246 m_expectingCommand = true; 246 m_expectingCommand = true;
247 Output(p, String.Empty, true, true, false); 247 Output(p, String.Empty, true, true, false);
248 m_lastPromptUsed = p; 248 m_lastPromptUsed = p;
249 } 249 }
250 else 250 else
251 { 251 {
252 m_expectingInput = true; 252 m_expectingInput = true;
253 Output(p, String.Empty, true, false, false); 253 Output(p, String.Empty, true, false, false);
254 } 254 }
255 255
256 256
257 // Here is where we wait for the user to input something. 257 // Here is where we wait for the user to input something.
258 m_DataEvent.WaitOne(); 258 m_DataEvent.WaitOne();
259 259
260 string cmdinput; 260 string cmdinput;
261 261
262 // Check for empty input. Read input if not empty. 262 // Check for empty input. Read input if not empty.
263 lock (m_InputData) 263 lock (m_InputData)
264 { 264 {
265 if (m_InputData.Count == 0) 265 if (m_InputData.Count == 0)
266 { 266 {
267 m_DataEvent.Reset(); 267 m_DataEvent.Reset();
268 m_expectingInput = false; 268 m_expectingInput = false;
269 m_expectingCommand = false; 269 m_expectingCommand = false;
270 270
271 return ""; 271 return "";
272 } 272 }
@@ -278,19 +278,19 @@ namespace OpenSim.Framework.Console
278 278
279 } 279 }
280 280
281 m_expectingInput = false; 281 m_expectingInput = false;
282 m_expectingCommand = false; 282 m_expectingCommand = false;
283 283
284 // Echo to all the other users what we have done. This 284 // Echo to all the other users what we have done. This
285 // will also go to ourselves. 285 // will also go to ourselves.
286 Output (cmdinput, String.Empty, false, false, true); 286 Output (cmdinput, String.Empty, false, false, true);
287 287
288 // If this is a command, we need to resolve and execute it. 288 // If this is a command, we need to resolve and execute it.
289 if (isCommand) 289 if (isCommand)
290 { 290 {
291 // This call will actually execute the command and create 291 // This call will actually execute the command and create
292 // any output associated with it. The core just gets an 292 // any output associated with it. The core just gets an
293 // empty string so it will call again immediately. 293 // empty string so it will call again immediately.
294 string[] cmd = Commands.Resolve(Parser.Parse(cmdinput)); 294 string[] cmd = Commands.Resolve(Parser.Parse(cmdinput));
295 295
296 if (cmd.Length != 0) 296 if (cmd.Length != 0)
@@ -306,11 +306,11 @@ namespace OpenSim.Framework.Console
306 } 306 }
307 } 307 }
308 308
309 // Return the raw input string if not a command. 309 // Return the raw input string if not a command.
310 return cmdinput; 310 return cmdinput;
311 } 311 }
312 312
313 // Very simplistic static access control header. 313 // Very simplistic static access control header.
314 protected Hashtable CheckOrigin(Hashtable result) 314 protected Hashtable CheckOrigin(Hashtable result)
315 { 315 {
316 if (!string.IsNullOrEmpty(m_AllowedOrigin)) 316 if (!string.IsNullOrEmpty(m_AllowedOrigin))
@@ -338,21 +338,21 @@ namespace OpenSim.Framework.Console
338 338
339 protected void DoExpire(Object sender, ElapsedEventArgs e) 339 protected void DoExpire(Object sender, ElapsedEventArgs e)
340 { 340 {
341 // Iterate the list of console connections and find those we 341 // Iterate the list of console connections and find those we
342 // haven't heard from for longer then the longpoll interval. 342 // haven't heard from for longer then the longpoll interval.
343 // Remove them. 343 // Remove them.
344 List<UUID> expired = new List<UUID>(); 344 List<UUID> expired = new List<UUID>();
345 345
346 lock (m_Connections) 346 lock (m_Connections)
347 { 347 {
348 // Mark the expired ones 348 // Mark the expired ones
349 foreach (KeyValuePair<UUID, ConsoleConnection> kvp in m_Connections) 349 foreach (KeyValuePair<UUID, ConsoleConnection> kvp in m_Connections)
350 { 350 {
351 if (System.Environment.TickCount - kvp.Value.last > 500000) 351 if (System.Environment.TickCount - kvp.Value.last > 500000)
352 expired.Add(kvp.Key); 352 expired.Add(kvp.Key);
353 } 353 }
354 354
355 // Delete them 355 // Delete them
356 foreach (UUID id in expired) 356 foreach (UUID id in expired)
357 { 357 {
358 m_Connections.Remove(id); 358 m_Connections.Remove(id);
@@ -361,10 +361,10 @@ namespace OpenSim.Framework.Console
361 } 361 }
362 } 362 }
363 363
364 // Start a new session. 364 // Start a new session.
365 protected Hashtable HandleHttpStartSession(Hashtable request) 365 protected Hashtable HandleHttpStartSession(Hashtable request)
366 { 366 {
367 // The login is in the form of a http form post 367 // The login is in the form of a http form post
368 Hashtable post = DecodePostString(request["body"].ToString()); 368 Hashtable post = DecodePostString(request["body"].ToString());
369 Hashtable reply = new Hashtable(); 369 Hashtable reply = new Hashtable();
370 370
@@ -372,7 +372,7 @@ namespace OpenSim.Framework.Console
372 reply["int_response_code"] = 401; 372 reply["int_response_code"] = 401;
373 reply["content_type"] = "text/plain"; 373 reply["content_type"] = "text/plain";
374 374
375 // Check user name and password 375 // Check user name and password
376 if (m_UserName == String.Empty) 376 if (m_UserName == String.Empty)
377 return reply; 377 return reply;
378 378
@@ -385,28 +385,28 @@ namespace OpenSim.Framework.Console
385 return reply; 385 return reply;
386 } 386 }
387 387
388 // Set up the new console connection record 388 // Set up the new console connection record
389 ConsoleConnection c = new ConsoleConnection(); 389 ConsoleConnection c = new ConsoleConnection();
390 c.last = System.Environment.TickCount; 390 c.last = System.Environment.TickCount;
391 c.lastLineSeen = 0; 391 c.lastLineSeen = 0;
392 392
393 // Assign session ID 393 // Assign session ID
394 UUID sessionID = UUID.Random(); 394 UUID sessionID = UUID.Random();
395 395
396 // Add connection to list. 396 // Add connection to list.
397 lock (m_Connections) 397 lock (m_Connections)
398 { 398 {
399 m_Connections[sessionID] = c; 399 m_Connections[sessionID] = c;
400 } 400 }
401 401
402 // This call is a CAP. The URL is the authentication. 402 // This call is a CAP. The URL is the authentication.
403 string uri = "/ReadResponses/" + sessionID.ToString() + "/"; 403 string uri = "/ReadResponses/" + sessionID.ToString() + "/";
404 404
405 m_Server.AddPollServiceHTTPHandler( 405 m_Server.AddPollServiceHTTPHandler(
406 uri, new PollServiceEventArgs(null, uri, HasEvents, GetEvents, NoEvents, sessionID,25000)); // 25 secs timeout 406 uri, new PollServiceEventArgs(null, uri, HasEvents, GetEvents, NoEvents, sessionID,25000)); // 25 secs timeout
407 407
408 // Our reply is an XML document. 408 // Our reply is an XML document.
409 // TODO: Change this to Linq.Xml 409 // TODO: Change this to Linq.Xml
410 XmlDocument xmldoc = new XmlDocument(); 410 XmlDocument xmldoc = new XmlDocument();
411 XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, 411 XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
412 "", ""); 412 "", "");
@@ -429,7 +429,7 @@ namespace OpenSim.Framework.Console
429 429
430 rootElement.AppendChild(MainConsole.Instance.Commands.GetXml(xmldoc)); 430 rootElement.AppendChild(MainConsole.Instance.Commands.GetXml(xmldoc));
431 431
432 // Set up the response and check origin 432 // Set up the response and check origin
433 reply["str_response_string"] = xmldoc.InnerXml; 433 reply["str_response_string"] = xmldoc.InnerXml;
434 reply["int_response_code"] = 200; 434 reply["int_response_code"] = 200;
435 reply["content_type"] = "text/xml"; 435 reply["content_type"] = "text/xml";
@@ -438,7 +438,7 @@ namespace OpenSim.Framework.Console
438 return reply; 438 return reply;
439 } 439 }
440 440
441 // Client closes session. Clean up. 441 // Client closes session. Clean up.
442 protected Hashtable HandleHttpCloseSession(Hashtable request) 442 protected Hashtable HandleHttpCloseSession(Hashtable request)
443 { 443 {
444 Hashtable post = DecodePostString(request["body"].ToString()); 444 Hashtable post = DecodePostString(request["body"].ToString());
@@ -487,7 +487,7 @@ namespace OpenSim.Framework.Console
487 return reply; 487 return reply;
488 } 488 }
489 489
490 // Command received from the client. 490 // Command received from the client.
491 protected Hashtable HandleHttpSessionCommand(Hashtable request) 491 protected Hashtable HandleHttpSessionCommand(Hashtable request)
492 { 492 {
493 Hashtable post = DecodePostString(request["body"].ToString()); 493 Hashtable post = DecodePostString(request["body"].ToString());
@@ -497,7 +497,7 @@ namespace OpenSim.Framework.Console
497 reply["int_response_code"] = 404; 497 reply["int_response_code"] = 404;
498 reply["content_type"] = "text/plain"; 498 reply["content_type"] = "text/plain";
499 499
500 // Check the ID 500 // Check the ID
501 if (post["ID"] == null) 501 if (post["ID"] == null)
502 return reply; 502 return reply;
503 503
@@ -505,25 +505,25 @@ namespace OpenSim.Framework.Console
505 if (!UUID.TryParse(post["ID"].ToString(), out id)) 505 if (!UUID.TryParse(post["ID"].ToString(), out id))
506 return reply; 506 return reply;
507 507
508 // Find the connection for that ID. 508 // Find the connection for that ID.
509 lock (m_Connections) 509 lock (m_Connections)
510 { 510 {
511 if (!m_Connections.ContainsKey(id)) 511 if (!m_Connections.ContainsKey(id))
512 return reply; 512 return reply;
513 } 513 }
514 514
515 // Empty post. Just error out. 515 // Empty post. Just error out.
516 if (post["COMMAND"] == null) 516 if (post["COMMAND"] == null)
517 return reply; 517 return reply;
518 518
519 // Place the input data in the buffer. 519 // Place the input data in the buffer.
520 lock (m_InputData) 520 lock (m_InputData)
521 { 521 {
522 m_DataEvent.Set(); 522 m_DataEvent.Set();
523 m_InputData.Add(post["COMMAND"].ToString()); 523 m_InputData.Add(post["COMMAND"].ToString());
524 } 524 }
525 525
526 // Create the XML reply document. 526 // Create the XML reply document.
527 XmlDocument xmldoc = new XmlDocument(); 527 XmlDocument xmldoc = new XmlDocument();
528 XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, 528 XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
529 "", ""); 529 "", "");
@@ -547,7 +547,7 @@ namespace OpenSim.Framework.Console
547 return reply; 547 return reply;
548 } 548 }
549 549
550 // Decode a HTTP form post to a Hashtable 550 // Decode a HTTP form post to a Hashtable
551 protected Hashtable DecodePostString(string data) 551 protected Hashtable DecodePostString(string data)
552 { 552 {
553 Hashtable result = new Hashtable(); 553 Hashtable result = new Hashtable();
@@ -565,14 +565,14 @@ namespace OpenSim.Framework.Console
565 565
566 if (elems.Length > 1) 566 if (elems.Length > 1)
567 value = System.Web.HttpUtility.UrlDecode(elems[1]); 567 value = System.Web.HttpUtility.UrlDecode(elems[1]);
568 568
569 result[name] = value; 569 result[name] = value;
570 } 570 }
571 571
572 return result; 572 return result;
573 } 573 }
574 574
575 // Close the CAP receiver for the responses for a given client. 575 // Close the CAP receiver for the responses for a given client.
576 public void CloseConnection(UUID id) 576 public void CloseConnection(UUID id)
577 { 577 {
578 try 578 try
@@ -586,8 +586,8 @@ namespace OpenSim.Framework.Console
586 } 586 }
587 } 587 }
588 588
589 // Check if there is anything to send. Return true if this client has 589 // Check if there is anything to send. Return true if this client has
590 // lines pending. 590 // lines pending.
591 protected bool HasEvents(UUID RequestID, UUID sessionID) 591 protected bool HasEvents(UUID RequestID, UUID sessionID)
592 { 592 {
593 ConsoleConnection c = null; 593 ConsoleConnection c = null;
@@ -604,10 +604,10 @@ namespace OpenSim.Framework.Console
604 return false; 604 return false;
605 } 605 }
606 606
607 // Send all pending output to the client. 607 // Send all pending output to the client.
608 protected Hashtable GetEvents(UUID RequestID, UUID sessionID) 608 protected Hashtable GetEvents(UUID RequestID, UUID sessionID)
609 { 609 {
610 // Find the connection that goes with this client. 610 // Find the connection that goes with this client.
611 ConsoleConnection c = null; 611 ConsoleConnection c = null;
612 612
613 lock (m_Connections) 613 lock (m_Connections)
@@ -617,14 +617,14 @@ namespace OpenSim.Framework.Console
617 c = m_Connections[sessionID]; 617 c = m_Connections[sessionID];
618 } 618 }
619 619
620 // If we have nothing to send, send the no events response. 620 // If we have nothing to send, send the no events response.
621 c.last = System.Environment.TickCount; 621 c.last = System.Environment.TickCount;
622 if (c.lastLineSeen >= m_lineNumber) 622 if (c.lastLineSeen >= m_lineNumber)
623 return NoEvents(RequestID, UUID.Zero); 623 return NoEvents(RequestID, UUID.Zero);
624 624
625 Hashtable result = new Hashtable(); 625 Hashtable result = new Hashtable();
626 626
627 // Create the response document. 627 // Create the response document.
628 XmlDocument xmldoc = new XmlDocument(); 628 XmlDocument xmldoc = new XmlDocument();
629 XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, 629 XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
630 "", ""); 630 "", "");
@@ -648,29 +648,29 @@ namespace OpenSim.Framework.Console
648 648
649 for (long i = sendStart ; i < m_lineNumber ; i++) 649 for (long i = sendStart ; i < m_lineNumber ; i++)
650 { 650 {
651 ScrollbackEntry e = m_Scrollback[(int)(i - startLine)]; 651 ScrollbackEntry e = m_Scrollback[(int)(i - startLine)];
652 652
653 XmlElement res = xmldoc.CreateElement("", "Line", ""); 653 XmlElement res = xmldoc.CreateElement("", "Line", "");
654 res.SetAttribute("Number", e.lineNumber.ToString()); 654 res.SetAttribute("Number", e.lineNumber.ToString());
655 res.SetAttribute("Level", e.level); 655 res.SetAttribute("Level", e.level);
656 // Don't include these for the scrollback, we'll send the 656 // Don't include these for the scrollback, we'll send the
657 // real state later. 657 // real state later.
658 if (!c.newConnection) 658 if (!c.newConnection)
659 { 659 {
660 res.SetAttribute("Prompt", e.isPrompt ? "true" : "false"); 660 res.SetAttribute("Prompt", e.isPrompt ? "true" : "false");
661 res.SetAttribute("Command", e.isCommand ? "true" : "false"); 661 res.SetAttribute("Command", e.isCommand ? "true" : "false");
662 res.SetAttribute("Input", e.isInput ? "true" : "false"); 662 res.SetAttribute("Input", e.isInput ? "true" : "false");
663 } 663 }
664 else if (i == m_lineNumber - 1) // Last line for a new connection 664 else if (i == m_lineNumber - 1) // Last line for a new connection
665 { 665 {
666 res.SetAttribute("Prompt", m_expectingInput ? "true" : "false"); 666 res.SetAttribute("Prompt", m_expectingInput ? "true" : "false");
667 res.SetAttribute("Command", m_expectingCommand ? "true" : "false"); 667 res.SetAttribute("Command", m_expectingCommand ? "true" : "false");
668 res.SetAttribute("Input", (!m_expectingInput) ? "true" : "false"); 668 res.SetAttribute("Input", (!m_expectingInput) ? "true" : "false");
669 } 669 }
670 else 670 else
671 { 671 {
672 res.SetAttribute("Input", e.isInput ? "true" : "false"); 672 res.SetAttribute("Input", e.isInput ? "true" : "false");
673 } 673 }
674 674
675 res.AppendChild(xmldoc.CreateTextNode(e.text)); 675 res.AppendChild(xmldoc.CreateTextNode(e.text));
676 676
@@ -679,7 +679,7 @@ namespace OpenSim.Framework.Console
679 } 679 }
680 680
681 c.lastLineSeen = m_lineNumber; 681 c.lastLineSeen = m_lineNumber;
682 c.newConnection = false; 682 c.newConnection = false;
683 683
684 xmldoc.AppendChild(rootElement); 684 xmldoc.AppendChild(rootElement);
685 685
@@ -693,8 +693,8 @@ namespace OpenSim.Framework.Console
693 return result; 693 return result;
694 } 694 }
695 695
696 // This is really just a no-op. It generates what is sent 696 // This is really just a no-op. It generates what is sent
697 // to the client if the poll times out without any events. 697 // to the client if the poll times out without any events.
698 protected Hashtable NoEvents(UUID RequestID, UUID id) 698 protected Hashtable NoEvents(UUID RequestID, UUID id)
699 { 699 {
700 Hashtable result = new Hashtable(); 700 Hashtable result = new Hashtable();
diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs
index 4995a92..1915fa5 100644
--- a/OpenSim/Framework/DAMap.cs
+++ b/OpenSim/Framework/DAMap.cs
@@ -63,9 +63,9 @@ namespace OpenSim.Framework
63 { 63 {
64 get { return m_map; } 64 get { return m_map; }
65 set { m_map = value; } 65 set { m_map = value; }
66 } 66 }
67 67
68 public XmlSchema GetSchema() { return null; } 68 public XmlSchema GetSchema() { return null; }
69 69
70 public static DAMap FromXml(string rawXml) 70 public static DAMap FromXml(string rawXml)
71 { 71 {
@@ -73,19 +73,19 @@ namespace OpenSim.Framework
73 map.ReadXml(rawXml); 73 map.ReadXml(rawXml);
74 return map; 74 return map;
75 } 75 }
76 76
77 public void ReadXml(XmlReader reader) 77 public void ReadXml(XmlReader reader)
78 { 78 {
79 ReadXml(reader.ReadInnerXml()); 79 ReadXml(reader.ReadInnerXml());
80 } 80 }
81 81
82 public void ReadXml(string rawXml) 82 public void ReadXml(string rawXml)
83 { 83 {
84 // System.Console.WriteLine("Trying to deserialize [{0}]", rawXml); 84 // System.Console.WriteLine("Trying to deserialize [{0}]", rawXml);
85 85
86 lock (this) 86 lock (this)
87 { 87 {
88 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); 88 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml);
89 SanitiseMap(this); 89 SanitiseMap(this);
90 } 90 }
91 } 91 }
@@ -104,7 +104,7 @@ namespace OpenSim.Framework
104 public void CopyFrom(DAMap other) 104 public void CopyFrom(DAMap other)
105 { 105 {
106 // Deep copy 106 // Deep copy
107 107
108 string data = null; 108 string data = null;
109 lock (other) 109 lock (other)
110 { 110 {
@@ -113,7 +113,7 @@ namespace OpenSim.Framework
113 data = OSDParser.SerializeLLSDXmlString(other.m_map); 113 data = OSDParser.SerializeLLSDXmlString(other.m_map);
114 } 114 }
115 } 115 }
116 116
117 lock (this) 117 lock (this)
118 { 118 {
119 if (data == null) 119 if (data == null)
@@ -185,9 +185,9 @@ namespace OpenSim.Framework
185 /// <summary> 185 /// <summary>
186 /// Get the number of stores. 186 /// Get the number of stores.
187 /// </summary> 187 /// </summary>
188 public int CountStores 188 public int CountStores
189 { 189 {
190 get 190 get
191 { 191 {
192 int count = 0; 192 int count = 0;
193 193
@@ -263,8 +263,8 @@ namespace OpenSim.Framework
263 throw new Exception("Minimum namespace length is " + MIN_NAMESPACE_LENGTH); 263 throw new Exception("Minimum namespace length is " + MIN_NAMESPACE_LENGTH);
264 } 264 }
265 265
266 public bool ContainsStore(string ns, string storeName) 266 public bool ContainsStore(string ns, string storeName)
267 { 267 {
268 OSD namespaceOsd; 268 OSD namespaceOsd;
269 269
270 lock (this) 270 lock (this)
@@ -276,7 +276,7 @@ namespace OpenSim.Framework
276 } 276 }
277 277
278 return false; 278 return false;
279 } 279 }
280 280
281 public bool TryGetStore(string ns, string storeName, out OSDMap store) 281 public bool TryGetStore(string ns, string storeName, out OSDMap store)
282 { 282 {
@@ -297,17 +297,17 @@ namespace OpenSim.Framework
297 297
298 store = null; 298 store = null;
299 return false; 299 return false;
300 } 300 }
301 301
302 public void Clear() 302 public void Clear()
303 { 303 {
304 lock (this) 304 lock (this)
305 m_map.Clear(); 305 m_map.Clear();
306 } 306 }
307 307
308 public bool RemoveStore(string ns, string storeName) 308 public bool RemoveStore(string ns, string storeName)
309 { 309 {
310 OSD namespaceOsd; 310 OSD namespaceOsd;
311 311
312 lock (this) 312 lock (this)
313 { 313 {
@@ -323,6 +323,6 @@ namespace OpenSim.Framework
323 } 323 }
324 324
325 return false; 325 return false;
326 } 326 }
327 } 327 }
328} \ No newline at end of file 328} \ No newline at end of file
diff --git a/OpenSim/Framework/DOMap.cs b/OpenSim/Framework/DOMap.cs
index f5b650b..033cbf9 100644
--- a/OpenSim/Framework/DOMap.cs
+++ b/OpenSim/Framework/DOMap.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework
47 public class DOMap 47 public class DOMap
48 { 48 {
49 private IDictionary<string, object> m_map; 49 private IDictionary<string, object> m_map;
50 50
51 public void Add(string ns, string objName, object dynObj) 51 public void Add(string ns, string objName, object dynObj)
52 { 52 {
53 DAMap.ValidateNamespace(ns); 53 DAMap.ValidateNamespace(ns);
diff --git a/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs b/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs
index 4ff8cba..55ec13e 100644
--- a/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs
+++ b/OpenSim/Framework/DoubleDictionaryThreadAbortSafe.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Framework
69 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 69 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
70 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 70 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
71 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 71 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
72 try {} 72 try {}
73 finally 73 finally
74 { 74 {
75 rwLock.EnterWriteLock(); 75 rwLock.EnterWriteLock();
@@ -90,10 +90,10 @@ namespace OpenSim.Framework
90 Dictionary1[key1] = value; 90 Dictionary1[key1] = value;
91 Dictionary2[key2] = value; 91 Dictionary2[key2] = value;
92 } 92 }
93 finally 93 finally
94 { 94 {
95 if (gotLock) 95 if (gotLock)
96 rwLock.ExitWriteLock(); 96 rwLock.ExitWriteLock();
97 } 97 }
98 } 98 }
99 99
@@ -107,7 +107,7 @@ namespace OpenSim.Framework
107 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 107 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
108 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 108 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
109 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 109 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
110 try {} 110 try {}
111 finally 111 finally
112 { 112 {
113 rwLock.EnterWriteLock(); 113 rwLock.EnterWriteLock();
@@ -117,10 +117,10 @@ namespace OpenSim.Framework
117 Dictionary1.Remove(key1); 117 Dictionary1.Remove(key1);
118 success = Dictionary2.Remove(key2); 118 success = Dictionary2.Remove(key2);
119 } 119 }
120 finally 120 finally
121 { 121 {
122 if (gotLock) 122 if (gotLock)
123 rwLock.ExitWriteLock(); 123 rwLock.ExitWriteLock();
124 } 124 }
125 125
126 return success; 126 return success;
@@ -136,7 +136,7 @@ namespace OpenSim.Framework
136 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 136 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
137 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 137 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
138 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 138 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
139 try {} 139 try {}
140 finally 140 finally
141 { 141 {
142 rwLock.EnterWriteLock(); 142 rwLock.EnterWriteLock();
@@ -159,10 +159,10 @@ namespace OpenSim.Framework
159 } 159 }
160 } 160 }
161 } 161 }
162 finally 162 finally
163 { 163 {
164 if (gotLock) 164 if (gotLock)
165 rwLock.ExitWriteLock(); 165 rwLock.ExitWriteLock();
166 } 166 }
167 167
168 return found; 168 return found;
@@ -178,7 +178,7 @@ namespace OpenSim.Framework
178 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 178 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
179 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 179 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
180 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 180 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
181 try {} 181 try {}
182 finally 182 finally
183 { 183 {
184 rwLock.EnterWriteLock(); 184 rwLock.EnterWriteLock();
@@ -201,10 +201,10 @@ namespace OpenSim.Framework
201 } 201 }
202 } 202 }
203 } 203 }
204 finally 204 finally
205 { 205 {
206 if (gotLock) 206 if (gotLock)
207 rwLock.ExitWriteLock(); 207 rwLock.ExitWriteLock();
208 } 208 }
209 209
210 return found; 210 return found;
@@ -219,7 +219,7 @@ namespace OpenSim.Framework
219 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 219 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
220 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 220 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
221 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 221 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
222 try {} 222 try {}
223 finally 223 finally
224 { 224 {
225 rwLock.EnterWriteLock(); 225 rwLock.EnterWriteLock();
@@ -229,10 +229,10 @@ namespace OpenSim.Framework
229 Dictionary1.Clear(); 229 Dictionary1.Clear();
230 Dictionary2.Clear(); 230 Dictionary2.Clear();
231 } 231 }
232 finally 232 finally
233 { 233 {
234 if (gotLock) 234 if (gotLock)
235 rwLock.ExitWriteLock(); 235 rwLock.ExitWriteLock();
236 } 236 }
237 } 237 }
238 238
@@ -256,24 +256,24 @@ namespace OpenSim.Framework
256 bool success; 256 bool success;
257 bool gotLock = false; 257 bool gotLock = false;
258 258
259 try 259 try
260 { 260 {
261 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 261 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
262 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 262 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
263 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 263 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
264 try {} 264 try {}
265 finally 265 finally
266 { 266 {
267 rwLock.EnterReadLock(); 267 rwLock.EnterReadLock();
268 gotLock = true; 268 gotLock = true;
269 } 269 }
270 270
271 success = Dictionary1.TryGetValue(key, out value); 271 success = Dictionary1.TryGetValue(key, out value);
272 } 272 }
273 finally 273 finally
274 { 274 {
275 if (gotLock) 275 if (gotLock)
276 rwLock.ExitReadLock(); 276 rwLock.ExitReadLock();
277 } 277 }
278 278
279 return success; 279 return success;
@@ -284,24 +284,24 @@ namespace OpenSim.Framework
284 bool success; 284 bool success;
285 bool gotLock = false; 285 bool gotLock = false;
286 286
287 try 287 try
288 { 288 {
289 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 289 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
290 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 290 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
291 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 291 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
292 try {} 292 try {}
293 finally 293 finally
294 { 294 {
295 rwLock.EnterReadLock(); 295 rwLock.EnterReadLock();
296 gotLock = true; 296 gotLock = true;
297 } 297 }
298 298
299 success = Dictionary2.TryGetValue(key, out value); 299 success = Dictionary2.TryGetValue(key, out value);
300 } 300 }
301 finally 301 finally
302 { 302 {
303 if (gotLock) 303 if (gotLock)
304 rwLock.ExitReadLock(); 304 rwLock.ExitReadLock();
305 } 305 }
306 306
307 return success; 307 return success;
@@ -316,7 +316,7 @@ namespace OpenSim.Framework
316 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 316 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
317 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 317 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
318 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 318 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
319 try {} 319 try {}
320 finally 320 finally
321 { 321 {
322 rwLock.EnterReadLock(); 322 rwLock.EnterReadLock();
@@ -326,10 +326,10 @@ namespace OpenSim.Framework
326 foreach (TValue value in Dictionary1.Values) 326 foreach (TValue value in Dictionary1.Values)
327 action(value); 327 action(value);
328 } 328 }
329 finally 329 finally
330 { 330 {
331 if (gotLock) 331 if (gotLock)
332 rwLock.ExitReadLock(); 332 rwLock.ExitReadLock();
333 } 333 }
334 } 334 }
335 335
@@ -342,7 +342,7 @@ namespace OpenSim.Framework
342 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 342 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
343 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 343 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
344 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 344 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
345 try {} 345 try {}
346 finally 346 finally
347 { 347 {
348 rwLock.EnterReadLock(); 348 rwLock.EnterReadLock();
@@ -352,10 +352,10 @@ namespace OpenSim.Framework
352 foreach (KeyValuePair<TKey1, TValue> entry in Dictionary1) 352 foreach (KeyValuePair<TKey1, TValue> entry in Dictionary1)
353 action(entry); 353 action(entry);
354 } 354 }
355 finally 355 finally
356 { 356 {
357 if (gotLock) 357 if (gotLock)
358 rwLock.ExitReadLock(); 358 rwLock.ExitReadLock();
359 } 359 }
360 } 360 }
361 361
@@ -368,7 +368,7 @@ namespace OpenSim.Framework
368 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 368 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
369 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 369 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
370 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 370 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
371 try {} 371 try {}
372 finally 372 finally
373 { 373 {
374 rwLock.EnterReadLock(); 374 rwLock.EnterReadLock();
@@ -378,10 +378,10 @@ namespace OpenSim.Framework
378 foreach (KeyValuePair<TKey2, TValue> entry in Dictionary2) 378 foreach (KeyValuePair<TKey2, TValue> entry in Dictionary2)
379 action(entry); 379 action(entry);
380 } 380 }
381 finally 381 finally
382 { 382 {
383 if (gotLock) 383 if (gotLock)
384 rwLock.ExitReadLock(); 384 rwLock.ExitReadLock();
385 } 385 }
386 } 386 }
387 387
@@ -394,7 +394,7 @@ namespace OpenSim.Framework
394 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 394 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
395 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 395 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
396 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 396 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
397 try {} 397 try {}
398 finally 398 finally
399 { 399 {
400 rwLock.EnterReadLock(); 400 rwLock.EnterReadLock();
@@ -407,10 +407,10 @@ namespace OpenSim.Framework
407 return value; 407 return value;
408 } 408 }
409 } 409 }
410 finally 410 finally
411 { 411 {
412 if (gotLock) 412 if (gotLock)
413 rwLock.ExitReadLock(); 413 rwLock.ExitReadLock();
414 } 414 }
415 415
416 return default(TValue); 416 return default(TValue);
@@ -426,7 +426,7 @@ namespace OpenSim.Framework
426 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 426 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
427 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 427 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
428 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 428 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
429 try {} 429 try {}
430 finally 430 finally
431 { 431 {
432 rwLock.EnterReadLock(); 432 rwLock.EnterReadLock();
@@ -439,10 +439,10 @@ namespace OpenSim.Framework
439 list.Add(value); 439 list.Add(value);
440 } 440 }
441 } 441 }
442 finally 442 finally
443 { 443 {
444 if (gotLock) 444 if (gotLock)
445 rwLock.ExitReadLock(); 445 rwLock.ExitReadLock();
446 } 446 }
447 447
448 return list; 448 return list;
@@ -458,7 +458,7 @@ namespace OpenSim.Framework
458 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing 458 // Avoid an asynchronous Thread.Abort() from possibly never existing an acquired lock by placing
459 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot 459 // the acquision inside the main try. The inner finally block is needed because thread aborts cannot
460 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly). 460 // interrupt code in these blocks (hence gotLock is guaranteed to be set correctly).
461 try {} 461 try {}
462 finally 462 finally
463 { 463 {
464 rwLock.EnterUpgradeableReadLock(); 464 rwLock.EnterUpgradeableReadLock();
@@ -482,7 +482,7 @@ namespace OpenSim.Framework
482 482
483 try 483 try
484 { 484 {
485 try {} 485 try {}
486 finally 486 finally
487 { 487 {
488 rwLock.EnterUpgradeableReadLock(); 488 rwLock.EnterUpgradeableReadLock();
@@ -495,16 +495,16 @@ namespace OpenSim.Framework
495 for (int i = 0; i < list2.Count; i++) 495 for (int i = 0; i < list2.Count; i++)
496 Dictionary2.Remove(list2[i]); 496 Dictionary2.Remove(list2[i]);
497 } 497 }
498 finally 498 finally
499 { 499 {
500 if (gotWriteLock) 500 if (gotWriteLock)
501 rwLock.ExitWriteLock(); 501 rwLock.ExitWriteLock();
502 } 502 }
503 } 503 }
504 finally 504 finally
505 { 505 {
506 if (gotUpgradeableLock) 506 if (gotUpgradeableLock)
507 rwLock.ExitUpgradeableReadLock(); 507 rwLock.ExitUpgradeableReadLock();
508 } 508 }
509 509
510 return list.Count; 510 return list.Count;
diff --git a/OpenSim/Framework/EstateBan.cs b/OpenSim/Framework/EstateBan.cs
index ebed794..12a92bb 100644
--- a/OpenSim/Framework/EstateBan.cs
+++ b/OpenSim/Framework/EstateBan.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Framework
43 { 43 {
44 get 44 get
45 { 45 {
46 return m_estateID; 46 return m_estateID;
47 } 47 }
48 set 48 set
49 { 49 {
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 844230b..7134cbf 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -430,7 +430,7 @@ namespace OpenSim.Framework
430 { 430 {
431 if (ban == null) 431 if (ban == null)
432 return; 432 return;
433 if (!IsBanned(ban.BannedUserID, 32) && 433 if (!IsBanned(ban.BannedUserID, 32) &&
434 (l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans 434 (l_EstateBans.Count < (int)Constants.EstateAccessLimits.EstateBans)) //Ignore age-based bans
435 l_EstateBans.Add(ban); 435 l_EstateBans.Add(ban);
436 } 436 }
diff --git a/OpenSim/Framework/GridInstantMessage.cs b/OpenSim/Framework/GridInstantMessage.cs
index 6954c64..1605005 100644
--- a/OpenSim/Framework/GridInstantMessage.cs
+++ b/OpenSim/Framework/GridInstantMessage.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Framework
67 binaryBucket = im.binaryBucket; 67 binaryBucket = im.binaryBucket;
68 RegionID = im.RegionID; 68 RegionID = im.RegionID;
69 ParentEstateID = im.ParentEstateID; 69 ParentEstateID = im.ParentEstateID;
70 70
71 if (addTimestamp) 71 if (addTimestamp)
72 timestamp = (uint)Util.UnixTimeSinceEpoch(); 72 timestamp = (uint)Util.UnixTimeSinceEpoch();
73 } 73 }
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 1541b3a..1267993 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Framework
60 public delegate void ObjectAttach( 60 public delegate void ObjectAttach(
61 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); 61 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
62 62
63 public delegate void ModifyTerrain(UUID user, 63 public delegate void ModifyTerrain(UUID user,
64 float height, float seconds, byte size, byte action, float north, float west, float south, float east, 64 float height, float seconds, byte size, byte action, float north, float west, float south, float east,
65 UUID agentId); 65 UUID agentId);
66 66
@@ -473,46 +473,46 @@ namespace OpenSim.Framework
473 public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client); 473 public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client);
474 474
475 public delegate void AgentFOV(IClientAPI client, float verticalAngle); 475 public delegate void AgentFOV(IClientAPI client, float verticalAngle);
476 476
477 public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int type, uint flags); 477 public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int type, uint flags);
478 478
479 public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name); 479 public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name);
480 480
481 public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); 481 public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
482 482
483 public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target); 483 public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target);
484 484
485 public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target); 485 public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target);
486 486
487 public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); 487 public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
488 488
489 public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); 489 public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
490 490
491 public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string Summary, UUID reporter); 491 public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string Summary, UUID reporter);
492 492
493 public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); 493 public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY);
494 494
495 public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter); 495 public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter);
496 496
497 public delegate void SaveStateHandler(IClientAPI client,UUID agentID); 497 public delegate void SaveStateHandler(IClientAPI client,UUID agentID);
498 498
499 public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID); 499 public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID);
500 500
501 public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); 501 public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
502 502
503 public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); 503 public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
504 504
505 public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID); 505 public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID);
506 506
507 public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID); 507 public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID);
508 508
509 public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); 509 public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
510 510
511 public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); 511 public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID);
512 512
513 513
514 public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID); 514 public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID);
515 515
516 public delegate void SendPostcard(IClientAPI client); 516 public delegate void SendPostcard(IClientAPI client);
517 public delegate void ChangeInventoryItemFlags(IClientAPI client, UUID itemID, uint flags); 517 public delegate void ChangeInventoryItemFlags(IClientAPI client, UUID itemID, uint flags);
518 518
@@ -763,7 +763,7 @@ namespace OpenSim.Framework
763 /// Only set for root agents. 763 /// Only set for root agents.
764 /// </remarks> 764 /// </remarks>
765 bool IsLoggingOut { get; set; } 765 bool IsLoggingOut { get; set; }
766 766
767 bool SendLogoutPacketWhenClosing { set; } 767 bool SendLogoutPacketWhenClosing { set; }
768 768
769 // [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")] 769 // [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
@@ -1034,7 +1034,7 @@ namespace OpenSim.Framework
1034 event MuteListRequest OnMuteListRequest; 1034 event MuteListRequest OnMuteListRequest;
1035 1035
1036 event PlacesQuery OnPlacesQuery; 1036 event PlacesQuery OnPlacesQuery;
1037 1037
1038 event FindAgentUpdate OnFindAgent; 1038 event FindAgentUpdate OnFindAgent;
1039 event TrackAgentUpdate OnTrackAgent; 1039 event TrackAgentUpdate OnTrackAgent;
1040 event NewUserReport OnUserReport; 1040 event NewUserReport OnUserReport;
@@ -1079,12 +1079,12 @@ namespace OpenSim.Framework
1079 void Close(bool sendStop, bool force); 1079 void Close(bool sendStop, bool force);
1080 1080
1081 void Kick(string message); 1081 void Kick(string message);
1082 1082
1083 /// <summary> 1083 /// <summary>
1084 /// Start processing for this client. 1084 /// Start processing for this client.
1085 /// </summary> 1085 /// </summary>
1086 void Start(); 1086 void Start();
1087 1087
1088 void Stop(); 1088 void Stop();
1089 1089
1090 // void ActivateGesture(UUID assetId, UUID gestureId); 1090 // void ActivateGesture(UUID assetId, UUID gestureId);
@@ -1155,7 +1155,7 @@ namespace OpenSim.Framework
1155 void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look); 1155 void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
1156 1156
1157 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); 1157 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
1158 1158
1159 /// <summary> 1159 /// <summary>
1160 /// Return circuit information for this client. 1160 /// Return circuit information for this client.
1161 /// </summary> 1161 /// </summary>
@@ -1223,10 +1223,10 @@ namespace OpenSim.Framework
1223 /// <summary> 1223 /// <summary>
1224 /// Used by the server to inform the client of new inventory items and folders. 1224 /// Used by the server to inform the client of new inventory items and folders.
1225 /// </summary> 1225 /// </summary>
1226 /// 1226 ///
1227 /// If the node is a folder then the contents will be transferred 1227 /// If the node is a folder then the contents will be transferred
1228 /// (including all descendent folders) as well as the folder itself. 1228 /// (including all descendent folders) as well as the folder itself.
1229 /// 1229 ///
1230 /// <param name="node"></param> 1230 /// <param name="node"></param>
1231 void SendBulkUpdateInventory(InventoryNodeBase node); 1231 void SendBulkUpdateInventory(InventoryNodeBase node);
1232 1232
@@ -1289,7 +1289,7 @@ namespace OpenSim.Framework
1289 /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param> 1289 /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param>
1290 void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, 1290 void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear,
1291 float OrbitalPosition); 1291 float OrbitalPosition);
1292 1292
1293 void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); 1293 void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
1294 void SendViewerTime(int phase); 1294 void SendViewerTime(int phase);
1295 1295
@@ -1357,7 +1357,7 @@ namespace OpenSim.Framework
1357 void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); 1357 void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
1358 1358
1359 /// <summary> 1359 /// <summary>
1360 /// Send the next packet for a series of packets making up a single texture, 1360 /// Send the next packet for a series of packets making up a single texture,
1361 /// as established by SendImageFirstPart() 1361 /// as established by SendImageFirstPart()
1362 /// </summary> 1362 /// </summary>
1363 /// <param name="partNumber"></param> 1363 /// <param name="partNumber"></param>
@@ -1481,7 +1481,7 @@ namespace OpenSim.Framework
1481 void SendParcelDwellReply(int localID, UUID parcelID, float dwell); 1481 void SendParcelDwellReply(int localID, UUID parcelID, float dwell);
1482 1482
1483 void SendUserInfoReply(bool imViaEmail, bool visible, string email); 1483 void SendUserInfoReply(bool imViaEmail, bool visible, string email);
1484 1484
1485 void SendUseCachedMuteList(); 1485 void SendUseCachedMuteList();
1486 1486
1487 void SendMuteListUpdate(string filename); 1487 void SendMuteListUpdate(string filename);
@@ -1495,13 +1495,13 @@ namespace OpenSim.Framework
1495 void SendRebakeAvatarTextures(UUID textureID); 1495 void SendRebakeAvatarTextures(UUID textureID);
1496 1496
1497 void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages); 1497 void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages);
1498 1498
1499 void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt); 1499 void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt);
1500 1500
1501 void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier); 1501 void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier);
1502 1502
1503 void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); 1503 void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt);
1504 1504
1505 void SendChangeUserRights(UUID agentID, UUID friendID, int rights); 1505 void SendChangeUserRights(UUID agentID, UUID friendID, int rights);
1506 void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId); 1506 void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId);
1507 1507
diff --git a/OpenSim/Framework/ICnmCache.cs b/OpenSim/Framework/ICnmCache.cs
index 27b9c56..69b5b42 100644
--- a/OpenSim/Framework/ICnmCache.cs
+++ b/OpenSim/Framework/ICnmCache.cs
@@ -34,10 +34,10 @@ namespace OpenSim.Framework
34 /// Represent generic cache to store key/value pairs (elements) limited by time, size and count of elements. 34 /// Represent generic cache to store key/value pairs (elements) limited by time, size and count of elements.
35 /// </summary> 35 /// </summary>
36 /// <typeparam name="TKey"> 36 /// <typeparam name="TKey">
37 /// The type of keys in the cache. 37 /// The type of keys in the cache.
38 /// </typeparam> 38 /// </typeparam>
39 /// <typeparam name="TValue"> 39 /// <typeparam name="TValue">
40 /// The type of values in the cache. 40 /// The type of values in the cache.
41 /// </typeparam> 41 /// </typeparam>
42 /// <remarks> 42 /// <remarks>
43 /// <para> 43 /// <para>
@@ -51,8 +51,8 @@ namespace OpenSim.Framework
51 /// <item> 51 /// <item>
52 /// <term>Time</term> 52 /// <term>Time</term>
53 /// <description> 53 /// <description>
54 /// Element that is not accessed through <see cref="TryGetValue"/> or <see cref="Set"/> in last <see cref="ExpirationTime"/> are 54 /// Element that is not accessed through <see cref="TryGetValue"/> or <see cref="Set"/> in last <see cref="ExpirationTime"/> are
55 /// removed from the cache automatically. Depending on implementation of the cache some of elements may stay longer in cache. 55 /// removed from the cache automatically. Depending on implementation of the cache some of elements may stay longer in cache.
56 /// <see cref="IsTimeLimited"/> returns <see langword="true"/>, if cache is limited by time. 56 /// <see cref="IsTimeLimited"/> returns <see langword="true"/>, if cache is limited by time.
57 /// </description> 57 /// </description>
58 /// </item> 58 /// </item>
@@ -60,7 +60,7 @@ namespace OpenSim.Framework
60 /// <term>Count</term> 60 /// <term>Count</term>
61 /// <description> 61 /// <description>
62 /// When adding an new element to cache that already have <see cref="MaxCount"/> of elements, cache will remove less recently 62 /// When adding an new element to cache that already have <see cref="MaxCount"/> of elements, cache will remove less recently
63 /// used element(s) from the cache, until element fits to cache. 63 /// used element(s) from the cache, until element fits to cache.
64 /// <see cref="IsCountLimited"/> returns <see langword="true"/>, if cache is limiting element count. 64 /// <see cref="IsCountLimited"/> returns <see langword="true"/>, if cache is limiting element count.
65 /// </description> 65 /// </description>
66 /// </item> 66 /// </item>
@@ -69,8 +69,8 @@ namespace OpenSim.Framework
69 /// <description> 69 /// <description>
70 /// <description> 70 /// <description>
71 /// When adding an new element to cache that already have <see cref="MaxSize"/> of elements, cache will remove less recently 71 /// When adding an new element to cache that already have <see cref="MaxSize"/> of elements, cache will remove less recently
72 /// used element(s) from the cache, until element fits to cache. 72 /// used element(s) from the cache, until element fits to cache.
73 /// <see cref="IsSizeLimited"/> returns <see langword="true"/>, if cache is limiting total size of elements. 73 /// <see cref="IsSizeLimited"/> returns <see langword="true"/>, if cache is limiting total size of elements.
74 /// Normally size is bytes used by element in the cache. But it can be any other suitable unit of measure. 74 /// Normally size is bytes used by element in the cache. But it can be any other suitable unit of measure.
75 /// </description> 75 /// </description>
76 /// </description> 76 /// </description>
@@ -84,8 +84,8 @@ namespace OpenSim.Framework
84 /// </summary> 84 /// </summary>
85 /// <remarks> 85 /// <remarks>
86 /// <para> 86 /// <para>
87 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 87 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
88 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 88 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
89 /// </para> 89 /// </para>
90 /// </remarks> 90 /// </remarks>
91 /// <seealso cref="MaxCount"/> 91 /// <seealso cref="MaxCount"/>
@@ -102,13 +102,13 @@ namespace OpenSim.Framework
102 /// </value> 102 /// </value>
103 /// <remarks> 103 /// <remarks>
104 /// <para> 104 /// <para>
105 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ExpirationTime"/> 105 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ExpirationTime"/>
106 /// and it is not accessed through <see cref="TryGetValue"/> method or element's value is 106 /// and it is not accessed through <see cref="TryGetValue"/> method or element's value is
107 /// not replaced by <see cref="Set"/> method, then it is automatically removed from the 107 /// not replaced by <see cref="Set"/> method, then it is automatically removed from the
108 /// <see cref="ICnmCache{TKey,TValue}"/>. 108 /// <see cref="ICnmCache{TKey,TValue}"/>.
109 /// </para> 109 /// </para>
110 /// <para> 110 /// <para>
111 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time, 111 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time,
112 /// because total size or count of elements stored to cache is larger than <see cref="MaxSize"/> or <see cref="MaxCount"/>. 112 /// because total size or count of elements stored to cache is larger than <see cref="MaxSize"/> or <see cref="MaxCount"/>.
113 /// </para> 113 /// </para>
114 /// <para> 114 /// <para>
@@ -135,12 +135,12 @@ namespace OpenSim.Framework
135 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe). 135 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe).
136 /// </summary> 136 /// </summary>
137 /// <value> 137 /// <value>
138 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe); 138 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe);
139 /// otherwise, <see langword="false"/>. 139 /// otherwise, <see langword="false"/>.
140 /// </value> 140 /// </value>
141 /// <remarks> 141 /// <remarks>
142 /// <para> 142 /// <para>
143 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use 143 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use
144 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class 144 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class
145 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object. 145 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object.
146 /// </para> 146 /// </para>
@@ -153,17 +153,17 @@ namespace OpenSim.Framework
153 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements. 153 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements.
154 /// </summary> 154 /// </summary>
155 /// <value> 155 /// <value>
156 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited; 156 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited;
157 /// otherwise, <see langword="false"/>. 157 /// otherwise, <see langword="false"/>.
158 /// </value> 158 /// </value>
159 /// <remarks> 159 /// <remarks>
160 /// <para> 160 /// <para>
161 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 161 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
162 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 162 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
163 /// </para> 163 /// </para>
164 /// </remarks> 164 /// </remarks>
165 /// <seealso cref="Count"/> 165 /// <seealso cref="Count"/>
166 /// <seealso cref="MaxCount"/> 166 /// <seealso cref="MaxCount"/>
167 /// <seealso cref="IsSizeLimited"/> 167 /// <seealso cref="IsSizeLimited"/>
168 /// <seealso cref="IsTimeLimited"/> 168 /// <seealso cref="IsTimeLimited"/>
169 bool IsCountLimited { get; } 169 bool IsCountLimited { get; }
@@ -172,13 +172,13 @@ namespace OpenSim.Framework
172 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements. 172 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements.
173 /// </summary> 173 /// </summary>
174 /// <value> 174 /// <value>
175 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited; 175 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited;
176 /// otherwise, <see langword="false"/>. 176 /// otherwise, <see langword="false"/>.
177 /// </value> 177 /// </value>
178 /// <remarks> 178 /// <remarks>
179 /// <para> 179 /// <para>
180 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 180 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
181 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 181 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
182 /// </para> 182 /// </para>
183 /// </remarks> 183 /// </remarks>
184 /// <seealso cref="MaxElementSize"/> 184 /// <seealso cref="MaxElementSize"/>
@@ -192,13 +192,13 @@ namespace OpenSim.Framework
192 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 192 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
193 /// </summary> 193 /// </summary>
194 /// <value> 194 /// <value>
195 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 195 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
196 /// otherwise, <see langword="false"/>. 196 /// otherwise, <see langword="false"/>.
197 /// </value> 197 /// </value>
198 /// <remarks> 198 /// <remarks>
199 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="Set"/> 199 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="Set"/>
200 /// or <see cref="TryGetValue"/> methods in <see cref="ExpirationTime"/> , then element is automatically removed from 200 /// or <see cref="TryGetValue"/> methods in <see cref="ExpirationTime"/> , then element is automatically removed from
201 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 201 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
202 /// stay longer in cache. 202 /// stay longer in cache.
203 /// </remarks> 203 /// </remarks>
204 /// <seealso cref="ExpirationTime"/> 204 /// <seealso cref="ExpirationTime"/>
@@ -206,18 +206,18 @@ namespace OpenSim.Framework
206 /// <seealso cref="IsCountLimited"/> 206 /// <seealso cref="IsCountLimited"/>
207 /// <seealso cref="IsSizeLimited"/> 207 /// <seealso cref="IsSizeLimited"/>
208 bool IsTimeLimited { get; } 208 bool IsTimeLimited { get; }
209 209
210 /// <summary> 210 /// <summary>
211 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>. 211 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>.
212 /// </summary> 212 /// </summary>
213 /// <value> 213 /// <value>
214 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements; 214 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements;
215 /// otherwise maximal allowed count of elements. 215 /// otherwise maximal allowed count of elements.
216 /// </value> 216 /// </value>
217 /// <remarks> 217 /// <remarks>
218 /// <para> 218 /// <para>
219 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 219 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
220 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 220 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
221 /// </para> 221 /// </para>
222 /// </remarks> 222 /// </remarks>
223 int MaxCount { get; set; } 223 int MaxCount { get; set; }
@@ -230,7 +230,7 @@ namespace OpenSim.Framework
230 /// </value> 230 /// </value>
231 /// <remarks> 231 /// <remarks>
232 /// <para> 232 /// <para>
233 /// If element's size is larger than <see cref="MaxElementSize"/>, then element is 233 /// If element's size is larger than <see cref="MaxElementSize"/>, then element is
234 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>. 234 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>.
235 /// </para> 235 /// </para>
236 /// </remarks> 236 /// </remarks>
@@ -251,8 +251,8 @@ namespace OpenSim.Framework
251 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 251 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
252 /// </para> 252 /// </para>
253 /// <para> 253 /// <para>
254 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 254 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
255 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 255 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
256 /// </para> 256 /// </para>
257 /// </remarks> 257 /// </remarks>
258 /// <exception cref="ArgumentOutOfRangeException">value is less than 0.</exception> 258 /// <exception cref="ArgumentOutOfRangeException">value is less than 0.</exception>
@@ -272,11 +272,11 @@ namespace OpenSim.Framework
272 /// Normally bytes, but can be any suitable unit of measure. 272 /// Normally bytes, but can be any suitable unit of measure.
273 /// </para> 273 /// </para>
274 /// <para> 274 /// <para>
275 /// Element's size is given when element is added or replaced by <see cref="Set"/> method. 275 /// Element's size is given when element is added or replaced by <see cref="Set"/> method.
276 /// </para> 276 /// </para>
277 /// <para> 277 /// <para>
278 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 278 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
279 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 279 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
280 /// </para> 280 /// </para>
281 /// </remarks> 281 /// </remarks>
282 /// <seealso cref="MaxElementSize"/> 282 /// <seealso cref="MaxElementSize"/>
@@ -294,8 +294,8 @@ namespace OpenSim.Framework
294 /// </value> 294 /// </value>
295 /// <remarks> 295 /// <remarks>
296 /// <para> 296 /// <para>
297 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 297 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
298 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to 298 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to
299 /// <see cref="ICnmCache{TKey,TValue}"/>. 299 /// <see cref="ICnmCache{TKey,TValue}"/>.
300 /// </para> 300 /// </para>
301 /// </remarks> 301 /// </remarks>
@@ -367,7 +367,7 @@ namespace OpenSim.Framework
367 void RemoveRange(IEnumerable<TKey> keys); 367 void RemoveRange(IEnumerable<TKey> keys);
368 368
369 /// <summary> 369 /// <summary>
370 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to 370 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to
371 /// <see cref="ICnmCache{TKey,TValue}"/>. 371 /// <see cref="ICnmCache{TKey,TValue}"/>.
372 /// </summary> 372 /// </summary>
373 /// <param name="key"> 373 /// <param name="key">
@@ -380,7 +380,7 @@ namespace OpenSim.Framework
380 /// The element's size. Normally bytes, but can be any suitable unit of measure. 380 /// The element's size. Normally bytes, but can be any suitable unit of measure.
381 /// </param> 381 /// </param>
382 /// <returns> 382 /// <returns>
383 /// <see langword="true"/> if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>; 383 /// <see langword="true"/> if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>;
384 /// otherwise <see langword="false"/>. 384 /// otherwise <see langword="false"/>.
385 /// </returns> 385 /// </returns>
386 /// <exception cref="ArgumentNullException"> 386 /// <exception cref="ArgumentNullException">
@@ -391,17 +391,17 @@ namespace OpenSim.Framework
391 /// </exception> 391 /// </exception>
392 /// <remarks> 392 /// <remarks>
393 /// <para> 393 /// <para>
394 /// If element's <paramref name="size"/> is larger than <see cref="MaxElementSize"/>, then element is 394 /// If element's <paramref name="size"/> is larger than <see cref="MaxElementSize"/>, then element is
395 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is 395 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is
396 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>. 396 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>.
397 /// </para> 397 /// </para>
398 /// <para> 398 /// <para>
399 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 399 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
400 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 400 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
401 /// </para> 401 /// </para>
402 /// <para> 402 /// <para>
403 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 403 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
404 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 404 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
405 /// </para> 405 /// </para>
406 /// </remarks> 406 /// </remarks>
407 /// <seealso cref="IsSizeLimited"/> 407 /// <seealso cref="IsSizeLimited"/>
@@ -417,15 +417,15 @@ namespace OpenSim.Framework
417 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>. 417 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>.
418 /// </summary> 418 /// </summary>
419 /// <returns> 419 /// <returns>
420 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 420 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
421 /// the specified key; otherwise, <see langword="false"/>. 421 /// the specified key; otherwise, <see langword="false"/>.
422 /// </returns> 422 /// </returns>
423 /// <param name="key"> 423 /// <param name="key">
424 /// The key whose <paramref name="value"/> to get. 424 /// The key whose <paramref name="value"/> to get.
425 /// </param> 425 /// </param>
426 /// <param name="value"> 426 /// <param name="value">
427 /// When this method returns, the value associated with the specified <paramref name="key"/>, 427 /// When this method returns, the value associated with the specified <paramref name="key"/>,
428 /// if the <paramref name="key"/> is found; otherwise, the 428 /// if the <paramref name="key"/> is found; otherwise, the
429 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized. 429 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized.
430 /// </param> 430 /// </param>
431 /// <exception cref="ArgumentNullException"> 431 /// <exception cref="ArgumentNullException">
diff --git a/OpenSim/Framework/ILandChannel.cs b/OpenSim/Framework/ILandChannel.cs
index 63cc7eb..44a24b9 100644
--- a/OpenSim/Framework/ILandChannel.cs
+++ b/OpenSim/Framework/ILandChannel.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Framework.Interfaces
38 /// </summary> 38 /// </summary>
39 /// <returns></returns> 39 /// <returns></returns>
40 List<ILandObject> AllParcels(); 40 List<ILandObject> AllParcels();
41 41
42 /// <summary> 42 /// <summary>
43 /// Get the parcel at the specified point 43 /// Get the parcel at the specified point
44 /// </summary> 44 /// </summary>
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Interfaces
75 /// <param name="localID"></param> 75 /// <param name="localID"></param>
76 /// <returns></returns> 76 /// <returns></returns>
77 ILandObject GetLandObject(int localID); 77 ILandObject GetLandObject(int localID);
78 78
79 /// <summary> 79 /// <summary>
80 /// Clear the land channel of all parcels. 80 /// Clear the land channel of all parcels.
81 /// </summary> 81 /// </summary>
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Interfaces
83 /// If true, set up a default parcel covering the whole region owned by the estate owner. 83 /// If true, set up a default parcel covering the whole region owned by the estate owner.
84 /// </param> 84 /// </param>
85 void Clear(bool setupDefaultParcel); 85 void Clear(bool setupDefaultParcel);
86 86
87 bool IsForcefulBansAllowed(); 87 bool IsForcefulBansAllowed();
88 void UpdateLandObject(int localID, LandData data); 88 void UpdateLandObject(int localID, LandData data);
89 void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient); 89 void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index af072fe..f3b850d 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -43,33 +43,33 @@ namespace OpenSim.Framework
43 LandData LandData { get; set; } 43 LandData LandData { get; set; }
44 bool[,] LandBitmap { get; set; } 44 bool[,] LandBitmap { get; set; }
45 UUID RegionUUID { get; } 45 UUID RegionUUID { get; }
46 46
47 /// <summary> 47 /// <summary>
48 /// Prim counts for this land object. 48 /// Prim counts for this land object.
49 /// </summary> 49 /// </summary>
50 IPrimCounts PrimCounts { get; set; } 50 IPrimCounts PrimCounts { get; set; }
51 51
52 /// <summary> 52 /// <summary>
53 /// The start point for the land object. This is the northern-most point as one scans land working from 53 /// The start point for the land object. This is the northern-most point as one scans land working from
54 /// west to east. 54 /// west to east.
55 /// </summary> 55 /// </summary>
56 Vector2 StartPoint { get; } 56 Vector2 StartPoint { get; }
57 57
58 /// <summary> 58 /// <summary>
59 /// The end point for the land object. This is the southern-most point as one scans land working from 59 /// The end point for the land object. This is the southern-most point as one scans land working from
60 /// west to east. 60 /// west to east.
61 /// </summary> 61 /// </summary>
62 Vector2 EndPoint { get; } 62 Vector2 EndPoint { get; }
63 63
64 // a estimation of a parcel center. 64 // a estimation of a parcel center.
65 Vector2 CenterPoint { get; } 65 Vector2 CenterPoint { get; }
66 66
67 // get positions 67 // get positions
68 Vector2? GetNearestPoint(Vector3 pos); 68 Vector2? GetNearestPoint(Vector3 pos);
69 Vector2? GetNearestPointAlongDirection(Vector3 pos, Vector3 pdirection); 69 Vector2? GetNearestPointAlongDirection(Vector3 pos, Vector3 pdirection);
70 70
71 bool ContainsPoint(int x, int y); 71 bool ContainsPoint(int x, int y);
72 72
73 ILandObject Copy(); 73 ILandObject Copy();
74 74
75 void SendLandUpdateToAvatarsOverMe(); 75 void SendLandUpdateToAvatarsOverMe();
@@ -97,16 +97,16 @@ namespace OpenSim.Framework
97 /// </summary> 97 /// </summary>
98 /// <returns>The bitmap created.</returns> 98 /// <returns>The bitmap created.</returns>
99 bool[,] BasicFullRegionLandBitmap(); 99 bool[,] BasicFullRegionLandBitmap();
100 100
101 /// <summary> 101 /// <summary>
102 /// Create a square land bitmap. 102 /// Create a square land bitmap.
103 /// </summary> 103 /// </summary>
104 /// <remarks> 104 /// <remarks>
105 /// Land co-ordinates are zero indexed. The inputs are treated as points. So if you want to create a bitmap 105 /// Land co-ordinates are zero indexed. The inputs are treated as points. So if you want to create a bitmap
106 /// that covers an entire 256 x 256m region apart from a strip of land on the east, then you would need to 106 /// that covers an entire 256 x 256m region apart from a strip of land on the east, then you would need to
107 /// specify start_x = 0, start_y = 0, end_x = 252 (or anything up to 255), end_y = 255. 107 /// specify start_x = 0, start_y = 0, end_x = 252 (or anything up to 255), end_y = 255.
108 /// 108 ///
109 /// At the moment, the smallest parcel of land is 4m x 4m, so if the 109 /// At the moment, the smallest parcel of land is 4m x 4m, so if the
110 /// region is 256 x 256m (the SL size), the bitmap returned will start at (0,0) and end at (63,63). 110 /// region is 256 x 256m (the SL size), the bitmap returned will start at (0,0) and end at (63,63).
111 /// The value of the set_value needs to be true to define an active parcel of the given size. 111 /// The value of the set_value needs to be true to define an active parcel of the given size.
112 /// </remarks> 112 /// </remarks>
@@ -117,7 +117,7 @@ namespace OpenSim.Framework
117 /// <param name="set_value"></param> 117 /// <param name="set_value"></param>
118 /// <returns>The bitmap created.</returns> 118 /// <returns>The bitmap created.</returns>
119 bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true); 119 bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true);
120 120
121 bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); 121 bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
122 122
123 /// <summary> 123 /// <summary>
@@ -153,7 +153,7 @@ namespace OpenSim.Framework
153 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> 153 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param>
154 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt;</param> 154 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt;</param>
155 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param> 155 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param>
156 /// <returns>New parcel bitmap</returns> 156 /// <returns>New parcel bitmap</returns>
157 bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax); 157 bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax);
158 158
159 byte[] ConvertLandBitmapToBytes(); 159 byte[] ConvertLandBitmapToBytes();
@@ -177,7 +177,7 @@ namespace OpenSim.Framework
177 /// </summary> 177 /// </summary>
178 /// <param name="url"></param> 178 /// <param name="url"></param>
179 void SetMediaUrl(string url); 179 void SetMediaUrl(string url);
180 180
181 /// <summary> 181 /// <summary>
182 /// Set the music url for this land parcel 182 /// Set the music url for this land parcel
183 /// </summary> 183 /// </summary>
diff --git a/OpenSim/Framework/IPrimCounts.cs b/OpenSim/Framework/IPrimCounts.cs
index 3e12348..3b62ad3 100644
--- a/OpenSim/Framework/IPrimCounts.cs
+++ b/OpenSim/Framework/IPrimCounts.cs
@@ -35,12 +35,12 @@ namespace OpenSim.Framework
35 /// Parcel owner owned prims 35 /// Parcel owner owned prims
36 /// </summary> 36 /// </summary>
37 int Owner { get; } 37 int Owner { get; }
38 38
39 /// <summary> 39 /// <summary>
40 /// Parcel group owned prims 40 /// Parcel group owned prims
41 /// </summary> 41 /// </summary>
42 int Group { get; } 42 int Group { get; }
43 43
44 /// <summary> 44 /// <summary>
45 /// Prims owned by others (not parcel owner or parcel group). 45 /// Prims owned by others (not parcel owner or parcel group).
46 /// </summary> 46 /// </summary>
@@ -48,19 +48,19 @@ namespace OpenSim.Framework
48 48
49 /// <summary> 49 /// <summary>
50 /// Selected prims 50 /// Selected prims
51 /// </summary> 51 /// </summary>
52 int Selected { get; } 52 int Selected { get; }
53 53
54 /// <summary> 54 /// <summary>
55 /// Total prims on the parcel. 55 /// Total prims on the parcel.
56 /// </summary> 56 /// </summary>
57 int Total { get; } 57 int Total { get; }
58 58
59 /// <summary> 59 /// <summary>
60 /// Prims on the simulator that are owned by the parcel owner, even if they are in other parcels. 60 /// Prims on the simulator that are owned by the parcel owner, even if they are in other parcels.
61 /// </summary> 61 /// </summary>
62 int Simulator { get; } 62 int Simulator { get; }
63 63
64 /// <summary> 64 /// <summary>
65 /// Prims per individual users. 65 /// Prims per individual users.
66 /// </summary> 66 /// </summary>
diff --git a/OpenSim/Framework/IRegistryCore.cs b/OpenSim/Framework/IRegistryCore.cs
index a94b65d..cf3ecc0 100644
--- a/OpenSim/Framework/IRegistryCore.cs
+++ b/OpenSim/Framework/IRegistryCore.cs
@@ -31,7 +31,7 @@ using System.Text;
31 31
32namespace OpenSim.Framework 32namespace OpenSim.Framework
33{ 33{
34 public interface IRegistryCore 34 public interface IRegistryCore
35 { 35 {
36 T Get<T>(); 36 T Get<T>();
37 void RegisterInterface<T>(T iface); 37 void RegisterInterface<T>(T iface);
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index e1b6d1e..37a064f 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Framework
40 Crashed = 2, 40 Crashed = 2,
41 Starting = 3, 41 Starting = 3,
42 }; 42 };
43 43
44 /// <value> 44 /// <value>
45 /// Indicate what action to take on an object derez request 45 /// Indicate what action to take on an object derez request
46 /// </value> 46 /// </value>
@@ -118,7 +118,7 @@ namespace OpenSim.Framework
118 /// </summary> 118 /// </summary>
119 /// <param name="mod"></param> 119 /// <param name="mod"></param>
120 void RegisterModuleInterface<M>(M mod); 120 void RegisterModuleInterface<M>(M mod);
121 121
122 void StackModuleInterface<M>(M mod); 122 void StackModuleInterface<M>(M mod);
123 123
124 /// <summary> 124 /// <summary>
diff --git a/OpenSim/Framework/ISceneAgent.cs b/OpenSim/Framework/ISceneAgent.cs
index c8424e3..5534e24 100644
--- a/OpenSim/Framework/ISceneAgent.cs
+++ b/OpenSim/Framework/ISceneAgent.cs
@@ -81,6 +81,6 @@ namespace OpenSim.Framework
81 /// Direction in which the scene presence is looking. 81 /// Direction in which the scene presence is looking.
82 /// </summary> 82 /// </summary>
83 /// <remarks>Will be Vector3.Zero for a child agent.</remarks> 83 /// <remarks>Will be Vector3.Zero for a child agent.</remarks>
84 Vector3 Lookat { get; } 84 Vector3 Lookat { get; }
85 } 85 }
86} \ No newline at end of file 86} \ No newline at end of file
diff --git a/OpenSim/Framework/InventoryFolderImpl.cs b/OpenSim/Framework/InventoryFolderImpl.cs
index 139776b..d14f3be 100644
--- a/OpenSim/Framework/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/InventoryFolderImpl.cs
@@ -314,7 +314,7 @@ namespace OpenSim.Framework
314 /// XPath like expression 314 /// XPath like expression
315 /// 315 ///
316 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 316 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
317 /// 317 ///
318 /// <param name="path"> 318 /// <param name="path">
319 /// The path to the required folder. 319 /// The path to the required folder.
320 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. 320 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index f9fd752..c359a0c 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -34,17 +34,17 @@ namespace OpenSim.Framework
34 /// Inventory Item - contains all the properties associated with an individual inventory piece. 34 /// Inventory Item - contains all the properties associated with an individual inventory piece.
35 /// </summary> 35 /// </summary>
36 public class InventoryItemBase : InventoryNodeBase, ICloneable 36 public class InventoryItemBase : InventoryNodeBase, ICloneable
37 { 37 {
38 /// <value> 38 /// <value>
39 /// The inventory type of the item. This is slightly different from the asset type in some situations. 39 /// The inventory type of the item. This is slightly different from the asset type in some situations.
40 /// </value> 40 /// </value>
41 public int InvType 41 public int InvType
42 { 42 {
43 get 43 get
44 { 44 {
45 return m_invType; 45 return m_invType;
46 } 46 }
47 47
48 set 48 set
49 { 49 {
50 m_invType = value; 50 m_invType = value;
@@ -55,13 +55,13 @@ namespace OpenSim.Framework
55 /// <value> 55 /// <value>
56 /// The folder this item is contained in 56 /// The folder this item is contained in
57 /// </value> 57 /// </value>
58 public UUID Folder 58 public UUID Folder
59 { 59 {
60 get 60 get
61 { 61 {
62 return m_folder; 62 return m_folder;
63 } 63 }
64 64
65 set 65 set
66 { 66 {
67 m_folder = value; 67 m_folder = value;
@@ -72,17 +72,17 @@ namespace OpenSim.Framework
72 /// <value> 72 /// <value>
73 /// The creator of this item 73 /// The creator of this item
74 /// </value> 74 /// </value>
75 public string CreatorId 75 public string CreatorId
76 { 76 {
77 get 77 get
78 { 78 {
79 return m_creatorId; 79 return m_creatorId;
80 } 80 }
81 81
82 set 82 set
83 { 83 {
84 m_creatorId = value; 84 m_creatorId = value;
85 85
86 if ((m_creatorId == null) || !UUID.TryParse(m_creatorId, out m_creatorIdAsUuid)) 86 if ((m_creatorId == null) || !UUID.TryParse(m_creatorId, out m_creatorIdAsUuid))
87 m_creatorIdAsUuid = UUID.Zero; 87 m_creatorIdAsUuid = UUID.Zero;
88 } 88 }
@@ -92,7 +92,7 @@ namespace OpenSim.Framework
92 /// <value> 92 /// <value>
93 /// The CreatorId expressed as a UUID. 93 /// The CreatorId expressed as a UUID.
94 /// </value> 94 /// </value>
95 public UUID CreatorIdAsUuid 95 public UUID CreatorIdAsUuid
96 { 96 {
97 get 97 get
98 { 98 {
@@ -161,13 +161,13 @@ namespace OpenSim.Framework
161 /// <value> 161 /// <value>
162 /// The description of the inventory item (must be less than 64 characters) 162 /// The description of the inventory item (must be less than 64 characters)
163 /// </value> 163 /// </value>
164 public string Description 164 public string Description
165 { 165 {
166 get 166 get
167 { 167 {
168 return m_description; 168 return m_description;
169 } 169 }
170 170
171 set 171 set
172 { 172 {
173 m_description = value; 173 m_description = value;
@@ -178,13 +178,13 @@ namespace OpenSim.Framework
178 /// <value> 178 /// <value>
179 /// 179 ///
180 /// </value> 180 /// </value>
181 public uint NextPermissions 181 public uint NextPermissions
182 { 182 {
183 get 183 get
184 { 184 {
185 return m_nextPermissions; 185 return m_nextPermissions;
186 } 186 }
187 187
188 set 188 set
189 { 189 {
190 m_nextPermissions = value; 190 m_nextPermissions = value;
@@ -195,13 +195,13 @@ namespace OpenSim.Framework
195 /// <value> 195 /// <value>
196 /// A mask containing permissions for the current owner (cannot be enforced) 196 /// A mask containing permissions for the current owner (cannot be enforced)
197 /// </value> 197 /// </value>
198 public uint CurrentPermissions 198 public uint CurrentPermissions
199 { 199 {
200 get 200 get
201 { 201 {
202 return m_currentPermissions; 202 return m_currentPermissions;
203 } 203 }
204 204
205 set 205 set
206 { 206 {
207 m_currentPermissions = value; 207 m_currentPermissions = value;
@@ -212,13 +212,13 @@ namespace OpenSim.Framework
212 /// <value> 212 /// <value>
213 /// 213 ///
214 /// </value> 214 /// </value>
215 public uint BasePermissions 215 public uint BasePermissions
216 { 216 {
217 get 217 get
218 { 218 {
219 return m_basePermissions; 219 return m_basePermissions;
220 } 220 }
221 221
222 set 222 set
223 { 223 {
224 m_basePermissions = value; 224 m_basePermissions = value;
@@ -229,13 +229,13 @@ namespace OpenSim.Framework
229 /// <value> 229 /// <value>
230 /// 230 ///
231 /// </value> 231 /// </value>
232 public uint EveryOnePermissions 232 public uint EveryOnePermissions
233 { 233 {
234 get 234 get
235 { 235 {
236 return m_everyonePermissions; 236 return m_everyonePermissions;
237 } 237 }
238 238
239 set 239 set
240 { 240 {
241 m_everyonePermissions = value; 241 m_everyonePermissions = value;
@@ -246,13 +246,13 @@ namespace OpenSim.Framework
246 /// <value> 246 /// <value>
247 /// 247 ///
248 /// </value> 248 /// </value>
249 public uint GroupPermissions 249 public uint GroupPermissions
250 { 250 {
251 get 251 get
252 { 252 {
253 return m_groupPermissions; 253 return m_groupPermissions;
254 } 254 }
255 255
256 set 256 set
257 { 257 {
258 m_groupPermissions = value; 258 m_groupPermissions = value;
@@ -263,13 +263,13 @@ namespace OpenSim.Framework
263 /// <value> 263 /// <value>
264 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) 264 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
265 /// </value> 265 /// </value>
266 public int AssetType 266 public int AssetType
267 { 267 {
268 get 268 get
269 { 269 {
270 return m_assetType; 270 return m_assetType;
271 } 271 }
272 272
273 set 273 set
274 { 274 {
275 m_assetType = value; 275 m_assetType = value;
@@ -280,13 +280,13 @@ namespace OpenSim.Framework
280 /// <value> 280 /// <value>
281 /// The UUID of the associated asset on the asset server 281 /// The UUID of the associated asset on the asset server
282 /// </value> 282 /// </value>
283 public UUID AssetID 283 public UUID AssetID
284 { 284 {
285 get 285 get
286 { 286 {
287 return m_assetID; 287 return m_assetID;
288 } 288 }
289 289
290 set 290 set
291 { 291 {
292 m_assetID = value; 292 m_assetID = value;
@@ -297,13 +297,13 @@ namespace OpenSim.Framework
297 /// <value> 297 /// <value>
298 /// 298 ///
299 /// </value> 299 /// </value>
300 public UUID GroupID 300 public UUID GroupID
301 { 301 {
302 get 302 get
303 { 303 {
304 return m_groupID; 304 return m_groupID;
305 } 305 }
306 306
307 set 307 set
308 { 308 {
309 m_groupID = value; 309 m_groupID = value;
@@ -314,13 +314,13 @@ namespace OpenSim.Framework
314 /// <value> 314 /// <value>
315 /// 315 ///
316 /// </value> 316 /// </value>
317 public bool GroupOwned 317 public bool GroupOwned
318 { 318 {
319 get 319 get
320 { 320 {
321 return m_groupOwned; 321 return m_groupOwned;
322 } 322 }
323 323
324 set 324 set
325 { 325 {
326 m_groupOwned = value; 326 m_groupOwned = value;
@@ -331,13 +331,13 @@ namespace OpenSim.Framework
331 /// <value> 331 /// <value>
332 /// 332 ///
333 /// </value> 333 /// </value>
334 public int SalePrice 334 public int SalePrice
335 { 335 {
336 get 336 get
337 { 337 {
338 return m_salePrice; 338 return m_salePrice;
339 } 339 }
340 340
341 set 341 set
342 { 342 {
343 m_salePrice = value; 343 m_salePrice = value;
@@ -348,13 +348,13 @@ namespace OpenSim.Framework
348 /// <value> 348 /// <value>
349 /// 349 ///
350 /// </value> 350 /// </value>
351 public byte SaleType 351 public byte SaleType
352 { 352 {
353 get 353 get
354 { 354 {
355 return m_saleType; 355 return m_saleType;
356 } 356 }
357 357
358 set 358 set
359 { 359 {
360 m_saleType = value; 360 m_saleType = value;
@@ -365,13 +365,13 @@ namespace OpenSim.Framework
365 /// <value> 365 /// <value>
366 /// 366 ///
367 /// </value> 367 /// </value>
368 public uint Flags 368 public uint Flags
369 { 369 {
370 get 370 get
371 { 371 {
372 return m_flags; 372 return m_flags;
373 } 373 }
374 374
375 set 375 set
376 { 376 {
377 m_flags = value; 377 m_flags = value;
@@ -382,13 +382,13 @@ namespace OpenSim.Framework
382 /// <value> 382 /// <value>
383 /// 383 ///
384 /// </value> 384 /// </value>
385 public int CreationDate 385 public int CreationDate
386 { 386 {
387 get 387 get
388 { 388 {
389 return m_creationDate; 389 return m_creationDate;
390 } 390 }
391 391
392 set 392 set
393 { 393 {
394 m_creationDate = value; 394 m_creationDate = value;
diff --git a/OpenSim/Framework/InventoryNodeBase.cs b/OpenSim/Framework/InventoryNodeBase.cs
index 31c3fd1..9ef36b7 100644
--- a/OpenSim/Framework/InventoryNodeBase.cs
+++ b/OpenSim/Framework/InventoryNodeBase.cs
@@ -41,19 +41,19 @@ namespace OpenSim.Framework
41 { 41 {
42 get { return m_name; } 42 get { return m_name; }
43 set { m_name = value; } 43 set { m_name = value; }
44 } 44 }
45 private string m_name = string.Empty; 45 private string m_name = string.Empty;
46 46
47 /// <summary> 47 /// <summary>
48 /// A UUID containing the ID for the inventory node itself 48 /// A UUID containing the ID for the inventory node itself
49 /// </summary> 49 /// </summary>
50 public UUID ID 50 public UUID ID
51 { 51 {
52 get { return m_id; } 52 get { return m_id; }
53 set { m_id = value; } 53 set { m_id = value; }
54 } 54 }
55 private UUID m_id; 55 private UUID m_id;
56 56
57 /// <summary> 57 /// <summary>
58 /// The agent who's inventory this is contained by 58 /// The agent who's inventory this is contained by
59 /// </summary> 59 /// </summary>
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index cfefe3e..13d2977 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -411,7 +411,7 @@ namespace OpenSim.Framework
411 } 411 }
412 412
413 /// <summary> 413 /// <summary>
414 /// Determines if people are able to teleport where they please on the parcel or if they 414 /// Determines if people are able to teleport where they please on the parcel or if they
415 /// get constrainted to a specific point on teleport within the parcel 415 /// get constrainted to a specific point on teleport within the parcel
416 /// </summary> 416 /// </summary>
417 public byte LandingType 417 public byte LandingType
@@ -667,7 +667,7 @@ namespace OpenSim.Framework
667 } 667 }
668 668
669 /// <summary> 669 /// <summary>
670 /// When teleporting is restricted to a certain point, this is the location 670 /// When teleporting is restricted to a certain point, this is the location
671 /// that the user will be redirected to 671 /// that the user will be redirected to
672 /// </summary> 672 /// </summary>
673 public Vector3 UserLocation 673 public Vector3 UserLocation
@@ -683,7 +683,7 @@ namespace OpenSim.Framework
683 } 683 }
684 684
685 /// <summary> 685 /// <summary>
686 /// When teleporting is restricted to a certain point, this is the rotation 686 /// When teleporting is restricted to a certain point, this is the rotation
687 /// that the user will be positioned 687 /// that the user will be positioned
688 /// </summary> 688 /// </summary>
689 public Vector3 UserLookAt 689 public Vector3 UserLookAt
@@ -699,7 +699,7 @@ namespace OpenSim.Framework
699 } 699 }
700 700
701 /// <summary> 701 /// <summary>
702 /// Autoreturn number of minutes to return SceneObjectGroup that are owned by someone who doesn't own 702 /// Autoreturn number of minutes to return SceneObjectGroup that are owned by someone who doesn't own
703 /// the parcel and isn't set to the same 'group' as the parcel. 703 /// the parcel and isn't set to the same 'group' as the parcel.
704 /// </summary> 704 /// </summary>
705 public int OtherCleanTime 705 public int OtherCleanTime
diff --git a/OpenSim/Framework/Lazy.cs b/OpenSim/Framework/Lazy.cs
index 91de4bd..ea07d0e 100644
--- a/OpenSim/Framework/Lazy.cs
+++ b/OpenSim/Framework/Lazy.cs
@@ -14,10 +14,10 @@
14// distribute, sublicense, and/or sell copies of the Software, and to 14// distribute, sublicense, and/or sell copies of the Software, and to
15// permit persons to whom the Software is furnished to do so, subject to 15// permit persons to whom the Software is furnished to do so, subject to
16// the following conditions: 16// the following conditions:
17// 17//
18// The above copyright notice and this permission notice shall be 18// The above copyright notice and this permission notice shall be
19// included in all copies or substantial portions of the Software. 19// included in all copies or substantial portions of the Software.
20// 20//
21// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/OpenSim/Framework/LocklessQueue.cs b/OpenSim/Framework/LocklessQueue.cs
index 7ccbba7..21b8178 100644
--- a/OpenSim/Framework/LocklessQueue.cs
+++ b/OpenSim/Framework/LocklessQueue.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Framework
102 } 102 }
103 else 103 else
104 { 104 {
105 item = oldHeadNext.Item; 105 item = oldHeadNext.Item;
106 haveAdvancedHead = CAS(ref head, oldHead, oldHeadNext); 106 haveAdvancedHead = CAS(ref head, oldHead, oldHeadNext);
107 if (haveAdvancedHead) 107 if (haveAdvancedHead)
108 { 108 {
diff --git a/OpenSim/Framework/MapAndArray.cs b/OpenSim/Framework/MapAndArray.cs
index c98d3cc..32d6978 100644
--- a/OpenSim/Framework/MapAndArray.cs
+++ b/OpenSim/Framework/MapAndArray.cs
@@ -45,9 +45,9 @@ namespace OpenSim.Framework
45 45
46 /// <summary>Number of values currently stored in the collection</summary> 46 /// <summary>Number of values currently stored in the collection</summary>
47 public int Count { get { return m_array.Length; } } 47 public int Count { get { return m_array.Length; } }
48 /// <summary>NOTE: This collection is thread safe. You do not need to 48 /// <summary>NOTE: This collection is thread safe. You do not need to
49 /// acquire a lock to add, remove, or enumerate entries. This 49 /// acquire a lock to add, remove, or enumerate entries. This
50 /// synchronization object should only be locked for larger 50 /// synchronization object should only be locked for larger
51 /// transactions</summary> 51 /// transactions</summary>
52 public object SyncRoot { get { return m_syncRoot; } } 52 public object SyncRoot { get { return m_syncRoot; } }
53 53
@@ -92,7 +92,7 @@ namespace OpenSim.Framework
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// Adds a key/value pair to the collection. This will throw an 95 /// Adds a key/value pair to the collection. This will throw an
96 /// exception if the key is already present in the collection 96 /// exception if the key is already present in the collection
97 /// </summary> 97 /// </summary>
98 /// <param name="key">Key to add or update</param> 98 /// <param name="key">Key to add or update</param>
@@ -166,7 +166,7 @@ namespace OpenSim.Framework
166 /// Gets a reference to the immutable array of values stored in this 166 /// Gets a reference to the immutable array of values stored in this
167 /// collection. This array is thread safe for iteration 167 /// collection. This array is thread safe for iteration
168 /// </summary> 168 /// </summary>
169 /// <returns>A thread safe reference ton an array of all of the stored 169 /// <returns>A thread safe reference ton an array of all of the stored
170 /// values</returns> 170 /// values</returns>
171 public TValue[] GetArray() 171 public TValue[] GetArray()
172 { 172 {
@@ -175,7 +175,7 @@ namespace OpenSim.Framework
175 175
176 private void CreateArray() 176 private void CreateArray()
177 { 177 {
178 // Rebuild the array from the dictionary. This method must be 178 // Rebuild the array from the dictionary. This method must be
179 // called from inside a lock 179 // called from inside a lock
180 TValue[] array = new TValue[m_dict.Count]; 180 TValue[] array = new TValue[m_dict.Count];
181 int i = 0; 181 int i = 0;
diff --git a/OpenSim/Framework/MapItemReplyStruct.cs b/OpenSim/Framework/MapItemReplyStruct.cs
index c8693ae..348a240 100644
--- a/OpenSim/Framework/MapItemReplyStruct.cs
+++ b/OpenSim/Framework/MapItemReplyStruct.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Framework
60 map["Extra2"] = OSD.FromInteger(Extra2); 60 map["Extra2"] = OSD.FromInteger(Extra2);
61 return map; 61 return map;
62 } 62 }
63 63
64 public void FromOSD(OSDMap map) 64 public void FromOSD(OSDMap map)
65 { 65 {
66 x = (uint) map["X"].AsInteger(); 66 x = (uint) map["X"].AsInteger();
diff --git a/OpenSim/Framework/MetricsCollector.cs b/OpenSim/Framework/MetricsCollector.cs
index c8f4a33..391f57e 100644
--- a/OpenSim/Framework/MetricsCollector.cs
+++ b/OpenSim/Framework/MetricsCollector.cs
@@ -42,23 +42,23 @@ namespace OpenSim.Framework
42 } 42 }
43 } 43 }
44 44
45 45
46 struct MetricsBucket<T> 46 struct MetricsBucket<T>
47 { 47 {
48 public T value; 48 public T value;
49 public int count; 49 public int count;
50 } 50 }
51 51
52 52
53 /// <summary> 53 /// <summary>
54 /// Collects metrics in a sliding window. 54 /// Collects metrics in a sliding window.
55 /// </summary> 55 /// </summary>
56 /// <remarks> 56 /// <remarks>
57 /// MetricsCollector provides the current Sum of the metrics that it collects. It can easily be extended 57 /// MetricsCollector provides the current Sum of the metrics that it collects. It can easily be extended
58 /// to provide the Average, too. It uses a sliding window to keep these values current. 58 /// to provide the Average, too. It uses a sliding window to keep these values current.
59 /// 59 ///
60 /// This class is not thread-safe. 60 /// This class is not thread-safe.
61 /// 61 ///
62 /// Subclass MetricsCollector to have it use a concrete value type. Override the abstract methods. 62 /// Subclass MetricsCollector to have it use a concrete value type. Override the abstract methods.
63 /// </remarks> 63 /// </remarks>
64 public abstract class MetricsCollector<T> 64 public abstract class MetricsCollector<T>
diff --git a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
index 8c2bec6..e513abd 100644
--- a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Framework.Monitoring
78 78
79 return sb.ToString(); 79 return sb.ToString();
80 } 80 }
81 81
82 public virtual string XReport(string uptime, string version) 82 public virtual string XReport(string uptime, string version)
83 { 83 {
84 return (string) Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0).ToString() ; 84 return (string) Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0).ToString() ;
diff --git a/OpenSim/Framework/Monitoring/Checks/Check.cs b/OpenSim/Framework/Monitoring/Checks/Check.cs
index 594386a..9a1bd45 100644
--- a/OpenSim/Framework/Monitoring/Checks/Check.cs
+++ b/OpenSim/Framework/Monitoring/Checks/Check.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Monitoring
79 string category, 79 string category,
80 string container, 80 string container,
81 Func<Check, bool> checkFunc, 81 Func<Check, bool> checkFunc,
82 StatVerbosity verbosity) 82 StatVerbosity verbosity)
83 { 83 {
84 if (ChecksManager.SubCommands.Contains(category)) 84 if (ChecksManager.SubCommands.Contains(category))
85 throw new Exception( 85 throw new Exception(
@@ -108,9 +108,9 @@ namespace OpenSim.Framework.Monitoring
108 public virtual string ToConsoleString() 108 public virtual string ToConsoleString()
109 { 109 {
110 return string.Format( 110 return string.Format(
111 "{0}.{1}.{2} - {3}", 111 "{0}.{1}.{2} - {3}",
112 Category, 112 Category,
113 Container, 113 Container,
114 ShortName, 114 ShortName,
115 Description); 115 Description);
116 } 116 }
diff --git a/OpenSim/Framework/Monitoring/Interfaces/IStatsCollector.cs b/OpenSim/Framework/Monitoring/Interfaces/IStatsCollector.cs
index 40df562..e326e8b 100644
--- a/OpenSim/Framework/Monitoring/Interfaces/IStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/Interfaces/IStatsCollector.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Monitoring
39 /// </summary> 39 /// </summary>
40 /// <returns></returns> 40 /// <returns></returns>
41 string Report(); 41 string Report();
42 42
43 /// <summary> 43 /// <summary>
44 /// Report back collected statistical information in json 44 /// Report back collected statistical information in json
45 /// </summary> 45 /// </summary>
diff --git a/OpenSim/Framework/Monitoring/JobEngine.cs b/OpenSim/Framework/Monitoring/JobEngine.cs
index df6b806..0a39e4b 100644
--- a/OpenSim/Framework/Monitoring/JobEngine.cs
+++ b/OpenSim/Framework/Monitoring/JobEngine.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Monitoring
49 /// <summary> 49 /// <summary>
50 /// Is this engine running? 50 /// Is this engine running?
51 /// </summary> 51 /// </summary>
52 public bool IsRunning { get; private set; } 52 public bool IsRunning { get; private set; }
53 53
54 /// <summary> 54 /// <summary>
55 /// The current job that the engine is running. 55 /// The current job that the engine is running.
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Monitoring
73 /// Controls whether we need to warn in the log about exceeding the max queue size. 73 /// Controls whether we need to warn in the log about exceeding the max queue size.
74 /// </summary> 74 /// </summary>
75 /// <remarks> 75 /// <remarks>
76 /// This is flipped to false once queue max has been exceeded and back to true when it falls below max, in 76 /// This is flipped to false once queue max has been exceeded and back to true when it falls below max, in
77 /// order to avoid spamming the log with lots of warnings. 77 /// order to avoid spamming the log with lots of warnings.
78 /// </remarks> 78 /// </remarks>
79 private bool m_warnOverMaxQueue = true; 79 private bool m_warnOverMaxQueue = true;
@@ -120,7 +120,7 @@ namespace OpenSim.Framework.Monitoring
120 } 120 }
121 121
122 public void Stop() 122 public void Stop()
123 { 123 {
124 lock (JobLock) 124 lock (JobLock)
125 { 125 {
126 try 126 try
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Monitoring
150 /// Make a job. 150 /// Make a job.
151 /// </summary> 151 /// </summary>
152 /// <remarks> 152 /// <remarks>
153 /// We provide this method to replace the constructor so that we can later pool job objects if necessary to 153 /// We provide this method to replace the constructor so that we can later pool job objects if necessary to
154 /// reduce memory churn. Normally one would directly call QueueJob() with parameters anyway. 154 /// reduce memory churn. Normally one would directly call QueueJob() with parameters anyway.
155 /// </remarks> 155 /// </remarks>
156 /// <returns></returns> 156 /// <returns></returns>
@@ -304,7 +304,7 @@ namespace OpenSim.Framework.Monitoring
304 CommonId = commonId; 304 CommonId = commonId;
305 Action = action; 305 Action = action;
306 } 306 }
307 307
308 /// <summary> 308 /// <summary>
309 /// Make a job. It needs to be separately queued. 309 /// Make a job. It needs to be separately queued.
310 /// </summary> 310 /// </summary>
diff --git a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
index 756e4ed..2ff2014 100644
--- a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.Monitoring")] 8[assembly: AssemblyTitle("OpenSim.Framework.Monitoring")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
index be4a8b4..3391240 100644
--- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
@@ -167,18 +167,18 @@ namespace OpenSim.Framework.Monitoring
167 } 167 }
168 168
169 MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerThreadpool, 169 MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerThreadpool,
170 s => 170 s =>
171 { 171 {
172 int workerThreads, iocpThreads; 172 int workerThreads, iocpThreads;
173 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads); 173 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads);
174 s.Value = workerThreads; 174 s.Value = workerThreads;
175 }); 175 });
176 176
177 MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerThreadpool, 177 MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerThreadpool,
178 s => 178 s =>
179 { 179 {
180 int workerThreads, iocpThreads; 180 int workerThreads, iocpThreads;
181 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads); 181 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads);
182 s.Value = iocpThreads; 182 s.Value = iocpThreads;
183 }); 183 });
184 184
@@ -193,10 +193,10 @@ namespace OpenSim.Framework.Monitoring
193 } 193 }
194 194
195 MakeStat( 195 MakeStat(
196 "HTTPRequestsMade", 196 "HTTPRequestsMade",
197 "Number of outbound HTTP requests made", 197 "Number of outbound HTTP requests made",
198 "requests", 198 "requests",
199 ContainerNetwork, 199 ContainerNetwork,
200 s => s.Value = WebUtil.RequestNumber, 200 s => s.Value = WebUtil.RequestNumber,
201 MeasuresOfInterest.AverageChangeOverTime); 201 MeasuresOfInterest.AverageChangeOverTime);
202 202
@@ -294,7 +294,7 @@ namespace OpenSim.Framework.Monitoring
294 }); 294 });
295 } 295 }
296 296
297 // Notes on performance counters: 297 // Notes on performance counters:
298 // "How To Read Performance Counters": http://blogs.msdn.com/b/bclteam/archive/2006/06/02/618156.aspx 298 // "How To Read Performance Counters": http://blogs.msdn.com/b/bclteam/archive/2006/06/02/618156.aspx
299 // "How to get the CPU Usage in C#": http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c 299 // "How to get the CPU Usage in C#": http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c
300 // "Mono Performance Counters": http://www.mono-project.com/Mono_Performance_Counters 300 // "Mono Performance Counters": http://www.mono-project.com/Mono_Performance_Counters
diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
index 08c2409..88a0297 100755
--- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
@@ -90,17 +90,17 @@ namespace OpenSim.Framework.Monitoring
90// /// haven't yet been implemented... 90// /// haven't yet been implemented...
91// /// </summary> 91// /// </summary>
92// public long AssetsInCache { get { return assetsInCache; } } 92// public long AssetsInCache { get { return assetsInCache; } }
93// 93//
94// /// <value> 94// /// <value>
95// /// Currently unused 95// /// Currently unused
96// /// </value> 96// /// </value>
97// public long TexturesInCache { get { return texturesInCache; } } 97// public long TexturesInCache { get { return texturesInCache; } }
98// 98//
99// /// <value> 99// /// <value>
100// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit 100// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
101// /// </value> 101// /// </value>
102// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 102// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
103// 103//
104// /// <value> 104// /// <value>
105// /// Currently unused 105// /// Currently unused
106// /// </value> 106// /// </value>
@@ -127,7 +127,7 @@ namespace OpenSim.Framework.Monitoring
127 public float PendingUploads { get { return pendingUploads; } } 127 public float PendingUploads { get { return pendingUploads; } }
128 public float ActiveScripts { get { return activeScripts; } } 128 public float ActiveScripts { get { return activeScripts; } }
129 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } 129 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
130 130
131// /// <summary> 131// /// <summary>
132// /// This is the time it took for the last asset request made in response to a cache miss. 132// /// This is the time it took for the last asset request made in response to a cache miss.
133// /// </summary> 133// /// </summary>
@@ -177,7 +177,7 @@ namespace OpenSim.Framework.Monitoring
177// assetsInCache++; 177// assetsInCache++;
178// //assetCacheMemoryUsage += asset.Data.Length; 178// //assetCacheMemoryUsage += asset.Data.Length;
179// } 179// }
180// 180//
181// public void RemoveAsset(UUID uuid) 181// public void RemoveAsset(UUID uuid)
182// { 182// {
183// assetsInCache--; 183// assetsInCache--;
@@ -204,7 +204,7 @@ namespace OpenSim.Framework.Monitoring
204// texturesInCache = 0; 204// texturesInCache = 0;
205// textureCacheMemoryUsage = 0; 205// textureCacheMemoryUsage = 0;
206// } 206// }
207// 207//
208// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts) 208// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
209// { 209// {
210// assetRequestTimeAfterCacheMiss = ts; 210// assetRequestTimeAfterCacheMiss = ts;
@@ -306,7 +306,7 @@ namespace OpenSim.Framework.Monitoring
306 StringBuilder sb = new StringBuilder(Environment.NewLine); 306 StringBuilder sb = new StringBuilder(Environment.NewLine);
307// sb.Append("ASSET STATISTICS"); 307// sb.Append("ASSET STATISTICS");
308// sb.Append(Environment.NewLine); 308// sb.Append(Environment.NewLine);
309 309
310 /* 310 /*
311 sb.Append( 311 sb.Append(
312 string.Format( 312 string.Format(
@@ -342,7 +342,7 @@ Asset service request failures: {3}" + Environment.NewLine,
342 List<Stat> stats = StatsManager.GetStatsFromEachContainer("clientstack", "ClientLogoutsDueToNoReceives"); 342 List<Stat> stats = StatsManager.GetStatsFromEachContainer("clientstack", "ClientLogoutsDueToNoReceives");
343 343
344 sb.AppendFormat( 344 sb.AppendFormat(
345 "Client logouts due to no data receive timeout: {0}\n\n", 345 "Client logouts due to no data receive timeout: {0}\n\n",
346 stats != null ? stats.Sum(s => s.Value).ToString() : "unknown"); 346 stats != null ? stats.Sum(s => s.Value).ToString() : "unknown");
347 347
348// sb.Append(Environment.NewLine); 348// sb.Append(Environment.NewLine);
@@ -443,10 +443,10 @@ Asset service request failures: {3}" + Environment.NewLine,
443 foreach (ProcessThread currentThread in 443 foreach (ProcessThread currentThread in
444 Process.GetCurrentProcess().Threads) 444 Process.GetCurrentProcess().Threads)
445 { 445 {
446 // A known issue with the current process .Threads property is 446 // A known issue with the current process .Threads property is
447 // that it can return null threads, thus don't count those as 447 // that it can return null threads, thus don't count those as
448 // running threads and prevent the program function from failing 448 // running threads and prevent the program function from failing
449 if (currentThread != null && 449 if (currentThread != null &&
450 currentThread.ThreadState == ThreadState.Running) 450 currentThread.ThreadState == ThreadState.Running)
451 { 451 {
452 numberThreadsRunning++; 452 numberThreadsRunning++;
@@ -505,7 +505,7 @@ Asset service request failures: {3}" + Environment.NewLine,
505 "{0:0.##}", numberThreadsRunning)); 505 "{0:0.##}", numberThreadsRunning));
506 args["ProcMem"] = OSD.FromString(String.Format("{0:#,###,###.##}", 506 args["ProcMem"] = OSD.FromString(String.Format("{0:#,###,###.##}",
507 memUsage)); 507 memUsage));
508 508
509 return args; 509 return args;
510 } 510 }
511 } 511 }
@@ -531,12 +531,12 @@ Asset service request failures: {3}" + Environment.NewLine,
531 { 531 {
532 return m_statsProvider.GetStats(); 532 return m_statsProvider.GetStats();
533 } 533 }
534 534
535 public string XReport(string uptime, string version) 535 public string XReport(string uptime, string version)
536 { 536 {
537 return ""; 537 return "";
538 } 538 }
539 539
540 public OSDMap OReport(string uptime, string version) 540 public OSDMap OReport(string uptime, string version)
541 { 541 {
542 OSDMap ret = new OSDMap(); 542 OSDMap ret = new OSDMap();
diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs
index 916fa53..2402acd 100644
--- a/OpenSim/Framework/Monitoring/Stats/Stat.cs
+++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs
@@ -121,17 +121,17 @@ namespace OpenSim.Framework.Monitoring
121 string container, 121 string container,
122 StatType type, 122 StatType type,
123 Action<Stat> pullAction, 123 Action<Stat> pullAction,
124 StatVerbosity verbosity) 124 StatVerbosity verbosity)
125 : this( 125 : this(
126 shortName, 126 shortName,
127 name, 127 name,
128 description, 128 description,
129 unitName, 129 unitName,
130 category, 130 category,
131 container, 131 container,
132 type, 132 type,
133 MeasuresOfInterest.None, 133 MeasuresOfInterest.None,
134 pullAction, 134 pullAction,
135 verbosity) 135 verbosity)
136 { 136 {
137 } 137 }
@@ -227,11 +227,11 @@ namespace OpenSim.Framework.Monitoring
227 { 227 {
228 StringBuilder sb = new StringBuilder(); 228 StringBuilder sb = new StringBuilder();
229 sb.AppendFormat( 229 sb.AppendFormat(
230 "{0}.{1}.{2} : {3}{4}", 230 "{0}.{1}.{2} : {3}{4}",
231 Category, 231 Category,
232 Container, 232 Container,
233 ShortName, 233 ShortName,
234 Value, 234 Value,
235 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName)); 235 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
236 236
237 AppendMeasuresOfInterest(sb); 237 AppendMeasuresOfInterest(sb);
@@ -290,7 +290,7 @@ namespace OpenSim.Framework.Monitoring
290 lock (m_samples) 290 lock (m_samples)
291 { 291 {
292 // m_log.DebugFormat( 292 // m_log.DebugFormat(
293 // "[STAT]: Samples for {0} are {1}", 293 // "[STAT]: Samples for {0} are {1}",
294 // Name, string.Join(",", m_samples.Select(s => s.ToString()).ToArray())); 294 // Name, string.Join(",", m_samples.Select(s => s.ToString()).ToArray()));
295 295
296 foreach (double s in m_samples) 296 foreach (double s in m_samples)
@@ -326,9 +326,9 @@ namespace OpenSim.Framework.Monitoring
326 if (ComputeMeasuresOfInterest(out lastChangeOverTime, out averageChangeOverTime)) 326 if (ComputeMeasuresOfInterest(out lastChangeOverTime, out averageChangeOverTime))
327 { 327 {
328 sb.AppendFormat( 328 sb.AppendFormat(
329 ", {0:0.##}{1}/s, {2:0.##}{3}/s", 329 ", {0:0.##}{1}/s, {2:0.##}{3}/s",
330 lastChangeOverTime, 330 lastChangeOverTime,
331 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName), 331 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName),
332 averageChangeOverTime, 332 averageChangeOverTime,
333 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName)); 333 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
334 } 334 }
diff --git a/OpenSim/Framework/Monitoring/StatsLogger.cs b/OpenSim/Framework/Monitoring/StatsLogger.cs
index 15a37aa..b719af9 100644
--- a/OpenSim/Framework/Monitoring/StatsLogger.cs
+++ b/OpenSim/Framework/Monitoring/StatsLogger.cs
@@ -99,13 +99,13 @@ namespace OpenSim.Framework.Monitoring
99 } 99 }
100 100
101 string path = cmd[2]; 101 string path = cmd[2];
102 102
103 using (StreamWriter sw = new StreamWriter(path, true)) 103 using (StreamWriter sw = new StreamWriter(path, true))
104 { 104 {
105 foreach (string line in GetReport()) 105 foreach (string line in GetReport())
106 sw.WriteLine(line); 106 sw.WriteLine(line);
107 } 107 }
108 108
109 MainConsole.Instance.OutputFormat("Stats saved to file {0}", path); 109 MainConsole.Instance.OutputFormat("Stats saved to file {0}", path);
110 } 110 }
111 111
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 30926d8..55c3276 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -274,7 +274,7 @@ namespace OpenSim.Framework.Monitoring
274 { 274 {
275 if (!(string.IsNullOrEmpty(pContainerName) || pContainerName == AllSubCommand || pContainerName == contName)) 275 if (!(string.IsNullOrEmpty(pContainerName) || pContainerName == AllSubCommand || pContainerName == contName))
276 continue; 276 continue;
277 277
278 OSDMap statMap = new OSDMap(); 278 OSDMap statMap = new OSDMap();
279 279
280 SortedDictionary<string, Stat> theStats = RegisteredStats[catName][contName]; 280 SortedDictionary<string, Stat> theStats = RegisteredStats[catName][contName];
@@ -398,7 +398,7 @@ namespace OpenSim.Framework.Monitoring
398 { 398 {
399 if (!TryGetStatParents(stat, out category, out container)) 399 if (!TryGetStatParents(stat, out category, out container))
400 return false; 400 return false;
401 401
402 if(container != null) 402 if(container != null)
403 { 403 {
404 container.Remove(stat.ShortName); 404 container.Remove(stat.ShortName);
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs
index ff439f5..9cc61ee 100644
--- a/OpenSim/Framework/Monitoring/Watchdog.cs
+++ b/OpenSim/Framework/Monitoring/Watchdog.cs
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Monitoring
96 FirstTick = Environment.TickCount & Int32.MaxValue; 96 FirstTick = Environment.TickCount & Int32.MaxValue;
97 LastTick = FirstTick; 97 LastTick = FirstTick;
98 98
99 Stat 99 Stat
100 = new Stat( 100 = new Stat(
101 name, 101 name,
102 string.Format("Last update of thread {0}", name), 102 string.Format("Last update of thread {0}", name),
diff --git a/OpenSim/Framework/Monitoring/WorkManager.cs b/OpenSim/Framework/Monitoring/WorkManager.cs
index a7a03a0..43130f9 100644
--- a/OpenSim/Framework/Monitoring/WorkManager.cs
+++ b/OpenSim/Framework/Monitoring/WorkManager.cs
@@ -36,16 +36,16 @@ namespace OpenSim.Framework.Monitoring
36 /// Manages various work items in the simulator. 36 /// Manages various work items in the simulator.
37 /// </summary> 37 /// </summary>
38 /// <remarks> 38 /// <remarks>
39 /// Currently, here work can be started 39 /// Currently, here work can be started
40 /// * As a long-running and monitored thread. 40 /// * As a long-running and monitored thread.
41 /// * In a thread that will never timeout but where the job is expected to eventually complete. 41 /// * In a thread that will never timeout but where the job is expected to eventually complete.
42 /// * In a threadpool thread that will timeout if it takes a very long time to complete (> 10 mins). 42 /// * In a threadpool thread that will timeout if it takes a very long time to complete (> 10 mins).
43 /// * As a job which will be run in a single-threaded job engine. Such jobs must not incorporate delays (sleeps, 43 /// * As a job which will be run in a single-threaded job engine. Such jobs must not incorporate delays (sleeps,
44 /// network waits, etc.). 44 /// network waits, etc.).
45 /// 45 ///
46 /// This is an evolving approach to better manage the work that OpenSimulator is asked to do from a very diverse 46 /// This is an evolving approach to better manage the work that OpenSimulator is asked to do from a very diverse
47 /// range of sources (client actions, incoming network, outgoing network calls, etc.). 47 /// range of sources (client actions, incoming network, outgoing network calls, etc.).
48 /// 48 ///
49 /// Util.FireAndForget is still available to insert jobs in the threadpool, though this is equivalent to 49 /// Util.FireAndForget is still available to insert jobs in the threadpool, though this is equivalent to
50 /// WorkManager.RunInThreadPool(). 50 /// WorkManager.RunInThreadPool().
51 /// </remarks> 51 /// </remarks>
@@ -122,7 +122,7 @@ namespace OpenSim.Framework.Monitoring
122 thread.Priority = priority; 122 thread.Priority = priority;
123 thread.IsBackground = isBackground; 123 thread.IsBackground = isBackground;
124 thread.Name = name; 124 thread.Name = name;
125 125
126 Watchdog.ThreadWatchdogInfo twi 126 Watchdog.ThreadWatchdogInfo twi
127 = new Watchdog.ThreadWatchdogInfo(thread, timeout, name) 127 = new Watchdog.ThreadWatchdogInfo(thread, timeout, name)
128 { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; 128 { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod };
@@ -144,7 +144,7 @@ namespace OpenSim.Framework.Monitoring
144 /// <param name="name">Name of the thread</param> 144 /// <param name="name">Name of the thread</param>
145 public static void RunInThread(WaitCallback callback, object obj, string name, bool log = false) 145 public static void RunInThread(WaitCallback callback, object obj, string name, bool log = false)
146 { 146 {
147 if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest) 147 if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
148 { 148 {
149 Culture.SetCurrentCulture(); 149 Culture.SetCurrentCulture();
150 callback(obj); 150 callback(obj);
@@ -169,7 +169,7 @@ namespace OpenSim.Framework.Monitoring
169 } 169 }
170 170
171 /// <summary> 171 /// <summary>
172 /// Run the callback via a threadpool thread. 172 /// Run the callback via a threadpool thread.
173 /// </summary> 173 /// </summary>
174 /// <remarks> 174 /// <remarks>
175 /// Such jobs may run after some delay but must always complete. 175 /// Such jobs may run after some delay but must always complete.
@@ -188,17 +188,17 @@ namespace OpenSim.Framework.Monitoring
188 /// <remarks> 188 /// <remarks>
189 /// This differs from direct scheduling (e.g. Util.FireAndForget) in that a job can be run in the job 189 /// This differs from direct scheduling (e.g. Util.FireAndForget) in that a job can be run in the job
190 /// engine if it is running, where all jobs are currently performed in sequence on a single thread. This is 190 /// engine if it is running, where all jobs are currently performed in sequence on a single thread. This is
191 /// to prevent observed overload and server freeze problems when there are hundreds of connections which all attempt to 191 /// to prevent observed overload and server freeze problems when there are hundreds of connections which all attempt to
192 /// perform work at once (e.g. in conference situations). With lower numbers of connections, the small 192 /// perform work at once (e.g. in conference situations). With lower numbers of connections, the small
193 /// delay in performing jobs in sequence rather than concurrently has not been notiecable in testing, though a future more 193 /// delay in performing jobs in sequence rather than concurrently has not been notiecable in testing, though a future more
194 /// sophisticated implementation could perform jobs concurrently when the server is under low load. 194 /// sophisticated implementation could perform jobs concurrently when the server is under low load.
195 /// 195 ///
196 /// However, be advised that some callers of this function rely on all jobs being performed in sequence if any 196 /// However, be advised that some callers of this function rely on all jobs being performed in sequence if any
197 /// jobs are performed in sequence (i.e. if jobengine is active or not). Therefore, expanding the jobengine 197 /// jobs are performed in sequence (i.e. if jobengine is active or not). Therefore, expanding the jobengine
198 /// beyond a single thread will require considerable thought. 198 /// beyond a single thread will require considerable thought.
199 /// 199 ///
200 /// Also, any jobs submitted must be guaranteed to complete within a reasonable timeframe (e.g. they cannot 200 /// Also, any jobs submitted must be guaranteed to complete within a reasonable timeframe (e.g. they cannot
201 /// incorporate a network delay with a long timeout). At the moment, work that could suffer such issues 201 /// incorporate a network delay with a long timeout). At the moment, work that could suffer such issues
202 /// should still be run directly with RunInThread(), Util.FireAndForget(), etc. This is another area where 202 /// should still be run directly with RunInThread(), Util.FireAndForget(), etc. This is another area where
203 /// the job engine could be improved and so CPU utilization improved by better management of concurrency within 203 /// the job engine could be improved and so CPU utilization improved by better management of concurrency within
204 /// OpenSimulator. 204 /// OpenSimulator.
@@ -212,10 +212,10 @@ namespace OpenSim.Framework.Monitoring
212 /// <param name="log">If set to true then extra logging is performed.</param> 212 /// <param name="log">If set to true then extra logging is performed.</param>
213 public static void RunJob( 213 public static void RunJob(
214 string jobType, WaitCallback callback, object obj, string name, 214 string jobType, WaitCallback callback, object obj, string name,
215 bool canRunInThisThread = false, bool mustNotTimeout = false, 215 bool canRunInThisThread = false, bool mustNotTimeout = false,
216 bool log = false) 216 bool log = false)
217 { 217 {
218 if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest) 218 if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
219 { 219 {
220 Culture.SetCurrentCulture(); 220 Culture.SetCurrentCulture();
221 callback(obj); 221 callback(obj);
@@ -273,16 +273,16 @@ namespace OpenSim.Framework.Monitoring
273 MainConsole.Instance.Output("Usage: debug jobengine log <level>"); 273 MainConsole.Instance.Output("Usage: debug jobengine log <level>");
274 return; 274 return;
275 } 275 }
276 276
277 // int logLevel; 277 // int logLevel;
278 int logLevel = int.Parse(args[3]); 278 int logLevel = int.Parse(args[3]);
279 // if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel)) 279 // if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel))
280 // { 280 // {
281 JobEngine.LogLevel = logLevel; 281 JobEngine.LogLevel = logLevel;
282 MainConsole.Instance.OutputFormat("Set debug log level to {0}", JobEngine.LogLevel); 282 MainConsole.Instance.OutputFormat("Set debug log level to {0}", JobEngine.LogLevel);
283 // } 283 // }
284 } 284 }
285 else 285 else
286 { 286 {
287 MainConsole.Instance.OutputFormat("Unrecognized job engine subcommand {0}", subCommand); 287 MainConsole.Instance.OutputFormat("Unrecognized job engine subcommand {0}", subCommand);
288 } 288 }
diff --git a/OpenSim/Framework/NetworkUtil.cs b/OpenSim/Framework/NetworkUtil.cs
index 2e94b0d..93c9446 100644
--- a/OpenSim/Framework/NetworkUtil.cs
+++ b/OpenSim/Framework/NetworkUtil.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Framework
40 /// Handles NAT translation in a 'manner of speaking' 40 /// Handles NAT translation in a 'manner of speaking'
41 /// Allows you to return multiple different external 41 /// Allows you to return multiple different external
42 /// hostnames depending on the requestors network 42 /// hostnames depending on the requestors network
43 /// 43 ///
44 /// This enables standard port forwarding techniques 44 /// This enables standard port forwarding techniques
45 /// to work correctly with OpenSim. 45 /// to work correctly with OpenSim.
46 /// </summary> 46 /// </summary>
@@ -145,7 +145,7 @@ namespace OpenSim.Framework
145 byte[] subnetBytes = subnet.Value.GetAddressBytes(); 145 byte[] subnetBytes = subnet.Value.GetAddressBytes();
146 byte[] localBytes = subnet.Key.GetAddressBytes(); 146 byte[] localBytes = subnet.Key.GetAddressBytes();
147 byte[] destBytes = destination.GetAddressBytes(); 147 byte[] destBytes = destination.GetAddressBytes();
148 148
149 if (subnetBytes.Length != destBytes.Length || subnetBytes.Length != localBytes.Length) 149 if (subnetBytes.Length != destBytes.Length || subnetBytes.Length != localBytes.Length)
150 return null; 150 return null;
151 151
diff --git a/OpenSim/Framework/OutboundUrlFilter.cs b/OpenSim/Framework/OutboundUrlFilter.cs
index baa3647..ee4707f 100644
--- a/OpenSim/Framework/OutboundUrlFilter.cs
+++ b/OpenSim/Framework/OutboundUrlFilter.cs
@@ -49,8 +49,8 @@ namespace OpenSim.Framework
49 private List<IPEndPoint> m_blacklistExceptionEndPoints; 49 private List<IPEndPoint> m_blacklistExceptionEndPoints;
50 50
51 public OutboundUrlFilter( 51 public OutboundUrlFilter(
52 string name, 52 string name,
53 List<IPNetwork> blacklistNetworks, List<IPEndPoint> blacklistEndPoints, 53 List<IPNetwork> blacklistNetworks, List<IPEndPoint> blacklistEndPoints,
54 List<IPNetwork> blacklistExceptionNetworks, List<IPEndPoint> blacklistExceptionEndPoints) 54 List<IPNetwork> blacklistExceptionNetworks, List<IPEndPoint> blacklistExceptionEndPoints)
55 { 55 {
56 Name = name; 56 Name = name;
@@ -79,7 +79,7 @@ namespace OpenSim.Framework
79 if (networkConfig != null) 79 if (networkConfig != null)
80 { 80 {
81 configBlacklist = networkConfig.GetString("OutboundDisallowForUserScripts", configBlacklist); 81 configBlacklist = networkConfig.GetString("OutboundDisallowForUserScripts", configBlacklist);
82 configBlacklistExceptions 82 configBlacklistExceptions
83 = networkConfig.GetString("OutboundDisallowForUserScriptsExcept", configBlacklistExceptions); 83 = networkConfig.GetString("OutboundDisallowForUserScriptsExcept", configBlacklistExceptions);
84 } 84 }
85 85
@@ -98,7 +98,7 @@ namespace OpenSim.Framework
98 string fullConfigEntry, string filterName, out List<IPNetwork> networks, out List<IPEndPoint> endPoints) 98 string fullConfigEntry, string filterName, out List<IPNetwork> networks, out List<IPEndPoint> endPoints)
99 { 99 {
100 // Parse blacklist 100 // Parse blacklist
101 string[] configBlacklistEntries 101 string[] configBlacklistEntries
102 = fullConfigEntry.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); 102 = fullConfigEntry.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
103 103
104 configBlacklistEntries = configBlacklistEntries.Select(e => e.Trim()).ToArray(); 104 configBlacklistEntries = configBlacklistEntries.Select(e => e.Trim()).ToArray();
@@ -129,7 +129,7 @@ namespace OpenSim.Framework
129 if (!Uri.TryCreate("http://" + configEntry, UriKind.Absolute, out configEntryUri)) 129 if (!Uri.TryCreate("http://" + configEntry, UriKind.Absolute, out configEntryUri))
130 { 130 {
131 m_log.ErrorFormat( 131 m_log.ErrorFormat(
132 "[OUTBOUND URL FILTER]: EndPoint entry [{0}] is invalid endpoint for {1}", 132 "[OUTBOUND URL FILTER]: EndPoint entry [{0}] is invalid endpoint for {1}",
133 configEntry, filterName); 133 configEntry, filterName);
134 134
135 continue; 135 continue;
@@ -184,14 +184,14 @@ namespace OpenSim.Framework
184 foreach (IPEndPoint ep in endPoints) 184 foreach (IPEndPoint ep in endPoints)
185 { 185 {
186// m_log.DebugFormat( 186// m_log.DebugFormat(
187// "[OUTBOUND URL FILTER]: Checking [{0}:{1}] against endpoint [{2}]", 187// "[OUTBOUND URL FILTER]: Checking [{0}:{1}] against endpoint [{2}]",
188// addr, port, ep); 188// addr, port, ep);
189 189
190 if (addr.Equals(ep.Address) && port == ep.Port) 190 if (addr.Equals(ep.Address) && port == ep.Port)
191 { 191 {
192// m_log.DebugFormat( 192// m_log.DebugFormat(
193// "[OUTBOUND URL FILTER]: Found [{0}:{1}] in endpoint [{2}]", addr, port, ep); 193// "[OUTBOUND URL FILTER]: Found [{0}:{1}] in endpoint [{2}]", addr, port, ep);
194 194
195 return true; 195 return true;
196 } 196 }
197 } 197 }
@@ -228,7 +228,7 @@ namespace OpenSim.Framework
228// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found [{0}] in blacklist for {1}", url, Name); 228// m_log.DebugFormat("[OUTBOUND URL FILTER]: Found [{0}] in blacklist for {1}", url, Name);
229 229
230 // Check blacklist exceptions 230 // Check blacklist exceptions
231 allowed 231 allowed
232 = OutboundUrlFilter.IsInNetwork( 232 = OutboundUrlFilter.IsInNetwork(
233 addr, url.Port, m_blacklistExceptionNetworks, m_blacklistExceptionEndPoints, Name); 233 addr, url.Port, m_blacklistExceptionNetworks, m_blacklistExceptionEndPoints, Name);
234 234
diff --git a/OpenSim/Framework/PluginManager.cs b/OpenSim/Framework/PluginManager.cs
index 0117096..0c94fcb 100644
--- a/OpenSim/Framework/PluginManager.cs
+++ b/OpenSim/Framework/PluginManager.cs
@@ -44,17 +44,17 @@ namespace OpenSim.Framework
44 /// <summary> 44 /// <summary>
45 /// Manager for registries and plugins 45 /// Manager for registries and plugins
46 /// </summary> 46 /// </summary>
47 public class PluginManager : SetupService 47 public class PluginManager : SetupService
48 { 48 {
49 public AddinRegistry PluginRegistry; 49 public AddinRegistry PluginRegistry;
50 50
51 public PluginManager(AddinRegistry registry): base (registry) 51 public PluginManager(AddinRegistry registry): base (registry)
52 { 52 {
53 PluginRegistry = registry; 53 PluginRegistry = registry;
54 54
55 } 55 }
56 56
57 /// <summary> 57 /// <summary>
58 /// Installs the plugin. 58 /// Installs the plugin.
59 /// </summary> 59 /// </summary>
60 /// <returns> 60 /// <returns>
@@ -97,14 +97,14 @@ namespace OpenSim.Framework
97 Addin addin = PluginRegistry.GetAddin(aentry.Addin.Id); 97 Addin addin = PluginRegistry.GetAddin(aentry.Addin.Id);
98 PluginRegistry.DisableAddin(addin.Id); 98 PluginRegistry.DisableAddin(addin.Id);
99 addin.Enabled = false; 99 addin.Enabled = false;
100 100
101 MainConsole.Instance.Output("Installation Success"); 101 MainConsole.Instance.Output("Installation Success");
102 ListInstalledAddins(out res); 102 ListInstalledAddins(out res);
103 result = res; 103 result = res;
104 return true; 104 return true;
105 } 105 }
106 else 106 else
107 { 107 {
108 MainConsole.Instance.Output("Installation Failed"); 108 MainConsole.Instance.Output("Installation Failed");
109 result = res; 109 result = res;
110 return false; 110 return false;
@@ -159,11 +159,11 @@ namespace OpenSim.Framework
159 { 159 {
160 Dictionary<string, object> res = new Dictionary<string, object>(); 160 Dictionary<string, object> res = new Dictionary<string, object>();
161 161
162 Addin[] addins = GetSortedAddinList("RobustPlugin"); 162 Addin[] addins = GetSortedAddinList("RobustPlugin");
163 if(addins.Count() < 1) 163 if(addins.Count() < 1)
164 { 164 {
165 MainConsole.Instance.Output("Error!"); 165 MainConsole.Instance.Output("Error!");
166 } 166 }
167 int count = 0; 167 int count = 0;
168 foreach (Addin addin in addins) 168 foreach (Addin addin in addins)
169 { 169 {
@@ -377,7 +377,7 @@ namespace OpenSim.Framework
377 r["enabled"] = rep.Enabled == true ? true : false; 377 r["enabled"] = rep.Enabled == true ? true : false;
378 r["name"] = rep.Name; 378 r["name"] = rep.Name;
379 r["url"] = rep.Url; 379 r["url"] = rep.Url;
380 380
381 res.Add(count.ToString(), r); 381 res.Add(count.ToString(), r);
382 count++; 382 count++;
383 } 383 }
@@ -493,7 +493,7 @@ namespace OpenSim.Framework
493 } 493 }
494 494
495 495
496 496
497 #region Util 497 #region Util
498 private void Testing() 498 private void Testing()
499 { 499 {
@@ -537,15 +537,15 @@ namespace OpenSim.Framework
537 537
538 ArrayList xlist = new ArrayList(); 538 ArrayList xlist = new ArrayList();
539 ArrayList list = new ArrayList(); 539 ArrayList list = new ArrayList();
540 try 540 try
541 { 541 {
542 list.AddRange(PluginRegistry.GetAddins()); 542 list.AddRange(PluginRegistry.GetAddins());
543 } 543 }
544 catch (Exception) 544 catch (Exception)
545 { 545 {
546 Addin[] x = xlist.ToArray(typeof(Addin)) as Addin[]; 546 Addin[] x = xlist.ToArray(typeof(Addin)) as Addin[];
547 return x; 547 return x;
548 } 548 }
549 549
550 foreach (Addin addin in list) 550 foreach (Addin addin in list)
551 { 551 {
@@ -559,5 +559,5 @@ namespace OpenSim.Framework
559 return addins; 559 return addins;
560 } 560 }
561 #endregion Util 561 #endregion Util
562 } 562 }
563} 563}
diff --git a/OpenSim/Framework/PrimeNumberHelper.cs b/OpenSim/Framework/PrimeNumberHelper.cs
index 477c274..5a1b3b2 100644
--- a/OpenSim/Framework/PrimeNumberHelper.cs
+++ b/OpenSim/Framework/PrimeNumberHelper.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Framework
35 public static class PrimeNumberHelper 35 public static class PrimeNumberHelper
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// Precalculated prime numbers. 38 /// Precalculated prime numbers.
39 /// </summary> 39 /// </summary>
40 private static readonly int[] Primes = new int[] 40 private static readonly int[] Primes = new int[]
41 { 41 {
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 6a12a45..29985d2 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -238,8 +238,8 @@ namespace OpenSim.Framework
238 SculptTexture = prim.Sculpt.SculptTexture; 238 SculptTexture = prim.Sculpt.SculptTexture;
239 SculptType = (byte)prim.Sculpt.Type; 239 SculptType = (byte)prim.Sculpt.Type;
240 } 240 }
241 else 241 else
242 { 242 {
243 SculptType = (byte)OpenMetaverse.SculptType.None; 243 SculptType = (byte)OpenMetaverse.SculptType.None;
244 } 244 }
245 } 245 }
diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs
index fec01da..5b9185e 100644
--- a/OpenSim/Framework/PriorityQueue.cs
+++ b/OpenSim/Framework/PriorityQueue.cs
@@ -57,11 +57,11 @@ namespace OpenSim.Framework
57 private Dictionary<uint, LookupItem> m_lookupTable; 57 private Dictionary<uint, LookupItem> m_lookupTable;
58 58
59 // internal state used to ensure the deqeues are spread across the priority 59 // internal state used to ensure the deqeues are spread across the priority
60 // queues "fairly". queuecounts is the amount to pull from each queue in 60 // queues "fairly". queuecounts is the amount to pull from each queue in
61 // each pass. weighted towards the higher priority queues 61 // each pass. weighted towards the higher priority queues
62 private uint m_nextQueue = 0; 62 private uint m_nextQueue = 0;
63 private uint m_countFromQueue = 0; 63 private uint m_countFromQueue = 0;
64 // first queues are imediate, so no counts 64 // first queues are imediate, so no counts
65// private uint[] m_queueCounts = { 0, 0, 8, 4, 4, 2, 2, 2, 2, 1, 1, 1 }; 65// private uint[] m_queueCounts = { 0, 0, 8, 4, 4, 2, 2, 2, 2, 1, 1, 1 };
66 private uint[] m_queueCounts = {0, 0, 8, 8, 5, 4, 3, 2, 1, 1, 1, 1}; 66 private uint[] m_queueCounts = {0, 0, 8, 8, 5, 4, 3, 2, 1, 1, 1, 1};
67 // this is ava, ava, attach, <10m, 20,40,80,160m,320,640,1280, + 67 // this is ava, ava, attach, <10m, 20,40,80,160m,320,640,1280, +
@@ -105,7 +105,7 @@ namespace OpenSim.Framework
105 int count = 0; 105 int count = 0;
106 for (int i = 0; i < m_heaps.Length; ++i) 106 for (int i = 0; i < m_heaps.Length; ++i)
107 count += m_heaps[i].Count; 107 count += m_heaps[i].Count;
108 108
109 return count; 109 return count;
110 } 110 }
111 } 111 }
@@ -170,26 +170,26 @@ namespace OpenSim.Framework
170 return true; 170 return true;
171 } 171 }
172 } 172 }
173 173
174 // To get the fair queing, we cycle through each of the 174 // To get the fair queing, we cycle through each of the
175 // queues when finding an element to dequeue. 175 // queues when finding an element to dequeue.
176 // We pull (NumberOfQueues - QueueIndex) items from each queue in order 176 // We pull (NumberOfQueues - QueueIndex) items from each queue in order
177 // to give lower numbered queues a higher priority and higher percentage 177 // to give lower numbered queues a higher priority and higher percentage
178 // of the bandwidth. 178 // of the bandwidth.
179 179
180 // Check for more items to be pulled from the current queue 180 // Check for more items to be pulled from the current queue
181 if (m_heaps[m_nextQueue].Count > 0 && m_countFromQueue > 0) 181 if (m_heaps[m_nextQueue].Count > 0 && m_countFromQueue > 0)
182 { 182 {
183 m_countFromQueue--; 183 m_countFromQueue--;
184 184
185 MinHeapItem item = m_heaps[m_nextQueue].RemoveMin(); 185 MinHeapItem item = m_heaps[m_nextQueue].RemoveMin();
186 m_lookupTable.Remove(item.Value.Entity.LocalId); 186 m_lookupTable.Remove(item.Value.Entity.LocalId);
187 timeinqueue = Util.EnvironmentTickCountSubtract(item.EntryTime); 187 timeinqueue = Util.EnvironmentTickCountSubtract(item.EntryTime);
188 value = item.Value; 188 value = item.Value;
189 189
190 return true; 190 return true;
191 } 191 }
192 192
193 // Find the next non-immediate queue with updates in it 193 // Find the next non-immediate queue with updates in it
194 for (uint i = NumberOfImmediateQueues; i < NumberOfQueues; ++i) 194 for (uint i = NumberOfImmediateQueues; i < NumberOfQueues; ++i)
195 { 195 {
@@ -198,7 +198,7 @@ namespace OpenSim.Framework
198 m_nextQueue = NumberOfImmediateQueues; 198 m_nextQueue = NumberOfImmediateQueues;
199 199
200 m_countFromQueue = m_queueCounts[m_nextQueue]; 200 m_countFromQueue = m_queueCounts[m_nextQueue];
201 201
202 if (m_heaps[m_nextQueue].Count > 0) 202 if (m_heaps[m_nextQueue].Count > 0)
203 { 203 {
204 m_countFromQueue--; 204 m_countFromQueue--;
@@ -218,7 +218,7 @@ namespace OpenSim.Framework
218 218
219 /// <summary> 219 /// <summary>
220 /// Reapply the prioritization function to each of the updates currently 220 /// Reapply the prioritization function to each of the updates currently
221 /// stored in the priority queues. 221 /// stored in the priority queues.
222 /// </summary 222 /// </summary
223 public void Reprioritize(UpdatePriorityHandler handler) 223 public void Reprioritize(UpdatePriorityHandler handler)
224 { 224 {
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 8f754a5..99e97e8 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -376,7 +376,7 @@ namespace OpenSim.Framework
376 } 376 }
377 377
378 public string MaptileStaticFile { get; private set; } 378 public string MaptileStaticFile { get; private set; }
379 379
380 /// <summary> 380 /// <summary>
381 /// The port by which http communication occurs with the region (most noticeably, CAPS communication) 381 /// The port by which http communication occurs with the region (most noticeably, CAPS communication)
382 /// </summary> 382 /// </summary>
@@ -389,17 +389,17 @@ namespace OpenSim.Framework
389 /// <summary> 389 /// <summary>
390 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) 390 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName)
391 /// </summary> 391 /// </summary>
392 392
393 public string ServerURI 393 public string ServerURI
394 { 394 {
395 get { 395 get {
396 if ( m_serverURI != string.Empty ) { 396 if ( m_serverURI != string.Empty ) {
397 return m_serverURI; 397 return m_serverURI;
398 } else { 398 } else {
399 return "http://" + m_externalHostName + ":" + m_httpPort + "/"; 399 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
400 } 400 }
401 } 401 }
402 set { 402 set {
403 if ( value.EndsWith("/") ) { 403 if ( value.EndsWith("/") ) {
404 m_serverURI = value; 404 m_serverURI = value;
405 } else { 405 } else {
@@ -749,10 +749,10 @@ namespace OpenSim.Framework
749 749
750 m_physPrimMax = config.GetInt("PhysicalPrimMax", 0); 750 m_physPrimMax = config.GetInt("PhysicalPrimMax", 0);
751 allKeys.Remove("PhysicalPrimMax"); 751 allKeys.Remove("PhysicalPrimMax");
752 752
753 m_clampPrimSize = config.GetBoolean("ClampPrimSize", false); 753 m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
754 allKeys.Remove("ClampPrimSize"); 754 allKeys.Remove("ClampPrimSize");
755 755
756 m_objectCapacity = config.GetInt("MaxPrims", 15000); 756 m_objectCapacity = config.GetInt("MaxPrims", 15000);
757 allKeys.Remove("MaxPrims"); 757 allKeys.Remove("MaxPrims");
758 758
@@ -766,12 +766,12 @@ namespace OpenSim.Framework
766 string mapTileStaticUUID = config.GetString("MaptileStaticUUID", UUID.Zero.ToString()); 766 string mapTileStaticUUID = config.GetString("MaptileStaticUUID", UUID.Zero.ToString());
767 if (UUID.TryParse(mapTileStaticUUID.Trim(), out m_maptileStaticUUID)) 767 if (UUID.TryParse(mapTileStaticUUID.Trim(), out m_maptileStaticUUID))
768 { 768 {
769 config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString()); 769 config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
770 } 770 }
771 771
772 MaptileStaticFile = config.GetString("MaptileStaticFile", String.Empty); 772 MaptileStaticFile = config.GetString("MaptileStaticFile", String.Empty);
773 allKeys.Remove("MaptileStaticFile"); 773 allKeys.Remove("MaptileStaticFile");
774 774
775 #endregion 775 #endregion
776 776
777 AgentCapacity = config.GetInt("MaxAgents", 100); 777 AgentCapacity = config.GetInt("MaxAgents", 100);
@@ -919,10 +919,10 @@ namespace OpenSim.Framework
919 919
920 if (m_physPrimMin > 0) 920 if (m_physPrimMin > 0)
921 config.Set("PhysicalPrimMax", m_physPrimMin); 921 config.Set("PhysicalPrimMax", m_physPrimMin);
922 922
923 if (m_physPrimMax > 0) 923 if (m_physPrimMax > 0)
924 config.Set("PhysicalPrimMax", m_physPrimMax); 924 config.Set("PhysicalPrimMax", m_physPrimMax);
925 925
926 config.Set("ClampPrimSize", m_clampPrimSize.ToString()); 926 config.Set("ClampPrimSize", m_clampPrimSize.ToString());
927 927
928 if (m_objectCapacity > 0) 928 if (m_objectCapacity > 0)
@@ -1038,7 +1038,7 @@ namespace OpenSim.Framework
1038 1038
1039 configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 1039 configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
1040 "Free form string describing the type of region", String.Empty, true); 1040 "Free form string describing the type of region", String.Empty, true);
1041 1041
1042 configMember.addConfigurationOption("region_static_maptile", ConfigurationOption.ConfigurationTypes.TYPE_UUID, 1042 configMember.addConfigurationOption("region_static_maptile", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1043 "UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true); 1043 "UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true);
1044 } 1044 }
@@ -1090,7 +1090,7 @@ namespace OpenSim.Framework
1090 1090
1091 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 1091 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1092 "Max objects this sim will hold", "15000", true); 1092 "Max objects this sim will hold", "15000", true);
1093 1093
1094 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 1094 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1095 "Max avatars this sim will hold", "100", true); 1095 "Max avatars this sim will hold", "100", true);
1096 1096
@@ -1307,8 +1307,8 @@ namespace OpenSim.Framework
1307 kvp["http_port"] = HttpPort.ToString(); 1307 kvp["http_port"] = HttpPort.ToString();
1308 kvp["internal_ip_address"] = InternalEndPoint.Address.ToString(); 1308 kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
1309 kvp["internal_port"] = InternalEndPoint.Port.ToString(); 1309 kvp["internal_port"] = InternalEndPoint.Port.ToString();
1310 // TODO: Remove in next major version 1310 // TODO: Remove in next major version
1311 kvp["alternate_ports"] = "False"; 1311 kvp["alternate_ports"] = "False";
1312 kvp["server_uri"] = ServerURI; 1312 kvp["server_uri"] = ServerURI;
1313 1313
1314 return kvp; 1314 return kvp;
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index dec01ea..c2947a2 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Framework
91 string[] parts = str.Split(','); 91 string[] parts = str.Split(',');
92 if (parts.Length != 3) 92 if (parts.Length != 3)
93 throw new ArgumentException("Invalid string: " + str); 93 throw new ArgumentException("Invalid string: " + str);
94 94
95 SpawnPoint sp = new SpawnPoint(); 95 SpawnPoint sp = new SpawnPoint();
96 sp.Yaw = float.Parse(parts[0]); 96 sp.Yaw = float.Parse(parts[0]);
97 sp.Pitch = float.Parse(parts[1]); 97 sp.Pitch = float.Parse(parts[1]);
@@ -105,7 +105,7 @@ namespace OpenSim.Framework
105 public delegate void SaveDelegate(RegionSettings rs); 105 public delegate void SaveDelegate(RegionSettings rs);
106 106
107 public event SaveDelegate OnSave; 107 public event SaveDelegate OnSave;
108 108
109 /// <value> 109 /// <value>
110 /// These appear to be terrain textures that are shipped with the client. 110 /// These appear to be terrain textures that are shipped with the client.
111 /// </value> 111 /// </value>
@@ -454,24 +454,24 @@ namespace OpenSim.Framework
454 get { return m_LoadedCreationDateTime; } 454 get { return m_LoadedCreationDateTime; }
455 set { m_LoadedCreationDateTime = value; } 455 set { m_LoadedCreationDateTime = value; }
456 } 456 }
457 457
458 public String LoadedCreationDate 458 public String LoadedCreationDate
459 { 459 {
460 get 460 get
461 { 461 {
462 TimeSpan ts = new TimeSpan(0, 0, LoadedCreationDateTime); 462 TimeSpan ts = new TimeSpan(0, 0, LoadedCreationDateTime);
463 DateTime stamp = new DateTime(1970, 1, 1) + ts; 463 DateTime stamp = new DateTime(1970, 1, 1) + ts;
464 return stamp.ToLongDateString(); 464 return stamp.ToLongDateString();
465 } 465 }
466 } 466 }
467 467
468 public String LoadedCreationTime 468 public String LoadedCreationTime
469 { 469 {
470 get 470 get
471 { 471 {
472 TimeSpan ts = new TimeSpan(0, 0, LoadedCreationDateTime); 472 TimeSpan ts = new TimeSpan(0, 0, LoadedCreationDateTime);
473 DateTime stamp = new DateTime(1970, 1, 1) + ts; 473 DateTime stamp = new DateTime(1970, 1, 1) + ts;
474 return stamp.ToLongTimeString(); 474 return stamp.ToLongTimeString();
475 } 475 }
476 } 476 }
477 477
diff --git a/OpenSim/Framework/RestClient.cs b/OpenSim/Framework/RestClient.cs
index 26237de..0166d9d 100644
--- a/OpenSim/Framework/RestClient.cs
+++ b/OpenSim/Framework/RestClient.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Framework
156 public void Dispose() 156 public void Dispose()
157 { 157 {
158 Dispose(true); 158 Dispose(true);
159 GC.SuppressFinalize(this); 159 GC.SuppressFinalize(this);
160 } 160 }
161 161
162 protected virtual void Dispose(bool disposing) 162 protected virtual void Dispose(bool disposing)
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs
index e66d5be..9458625 100644
--- a/OpenSim/Framework/SLUtil.cs
+++ b/OpenSim/Framework/SLUtil.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Framework
44 Material = -2 44 Material = -2
45 } 45 }
46 46
47 47
48 #region SL / file extension / content-type conversions 48 #region SL / file extension / content-type conversions
49 49
50 /// <summary> 50 /// <summary>
@@ -175,10 +175,10 @@ namespace OpenSim.Framework
175 new TypeMapping(AssetType.Folder, FolderType.CurrentOutfit, "application/vnd.ll.currentoutfitfolder", "currentoutfitfolder"), 175 new TypeMapping(AssetType.Folder, FolderType.CurrentOutfit, "application/vnd.ll.currentoutfitfolder", "currentoutfitfolder"),
176 new TypeMapping(AssetType.Folder, FolderType.Outfit, "application/vnd.ll.outfitfolder", "outfitfolder"), 176 new TypeMapping(AssetType.Folder, FolderType.Outfit, "application/vnd.ll.outfitfolder", "outfitfolder"),
177 new TypeMapping(AssetType.Folder, FolderType.MyOutfits, "application/vnd.ll.myoutfitsfolder", "myoutfitsfolder"), 177 new TypeMapping(AssetType.Folder, FolderType.MyOutfits, "application/vnd.ll.myoutfitsfolder", "myoutfitsfolder"),
178 178
179 // This next mappping is an asset to inventory item mapping. 179 // This next mappping is an asset to inventory item mapping.
180 // Note: LL stores folders as assets of type Folder = 8, and it has a corresponding InventoryType = 8 180 // Note: LL stores folders as assets of type Folder = 8, and it has a corresponding InventoryType = 8
181 // OpenSim doesn't store folders as assets, so this mapping should only be used when parsing things from the viewer to the server 181 // OpenSim doesn't store folders as assets, so this mapping should only be used when parsing things from the viewer to the server
182 new TypeMapping(AssetType.Folder, InventoryType.Folder, "application/vnd.ll.folder", "folder"), 182 new TypeMapping(AssetType.Folder, InventoryType.Folder, "application/vnd.ll.folder", "folder"),
183 183
184 // OpenSim specific 184 // OpenSim specific
@@ -198,7 +198,7 @@ namespace OpenSim.Framework
198 inventory2Content = new Dictionary<sbyte, string>(); 198 inventory2Content = new Dictionary<sbyte, string>();
199 content2Asset = new Dictionary<string, sbyte>(); 199 content2Asset = new Dictionary<string, sbyte>();
200 content2Inventory = new Dictionary<string, sbyte>(); 200 content2Inventory = new Dictionary<string, sbyte>();
201 201
202 foreach (TypeMapping mapping in MAPPINGS) 202 foreach (TypeMapping mapping in MAPPINGS)
203 { 203 {
204 sbyte assetType = mapping.AssetTypeCode; 204 sbyte assetType = mapping.AssetTypeCode;
@@ -226,7 +226,7 @@ namespace OpenSim.Framework
226 } 226 }
227 } 227 }
228 } 228 }
229 229
230 public static string SLAssetTypeToContentType(int assetType) 230 public static string SLAssetTypeToContentType(int assetType)
231 { 231 {
232 string contentType; 232 string contentType;
@@ -406,7 +406,7 @@ namespace OpenSim.Framework
406 if(data[0] == "inv_item") 406 if(data[0] == "inv_item")
407 { 407 {
408 skipInventoryItem(reader); 408 skipInventoryItem(reader);
409 } 409 }
410 else if (line.IndexOf('{') >= 0) 410 else if (line.IndexOf('{') >= 0)
411 { 411 {
412 throw new NotANotecardFormatException(reader.LineNumber); 412 throw new NotANotecardFormatException(reader.LineNumber);
@@ -462,7 +462,7 @@ namespace OpenSim.Framework
462 { 462 {
463 int length = Int32.Parse(data[2]); 463 int length = Int32.Parse(data[2]);
464 notecardString = reader.getBlock(length); 464 notecardString = reader.getBlock(length);
465 } 465 }
466 else if (line.IndexOf('{') >= 0) 466 else if (line.IndexOf('{') >= 0)
467 { 467 {
468 throw new NotANotecardFormatException(reader.LineNumber); 468 throw new NotANotecardFormatException(reader.LineNumber);
diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs
index ab3c285..9081411 100644
--- a/OpenSim/Framework/Serialization/ArchiveConstants.cs
+++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs
@@ -72,12 +72,12 @@ namespace OpenSim.Framework.Serialization
72 /// Path for region settings. 72 /// Path for region settings.
73 /// </value> 73 /// </value>
74 public const string SETTINGS_PATH = "settings/"; 74 public const string SETTINGS_PATH = "settings/";
75 75
76 /// <value> 76 /// <value>
77 /// Path for region settings. 77 /// Path for region settings.
78 /// </value> 78 /// </value>
79 public const string LANDDATA_PATH = "landdata/"; 79 public const string LANDDATA_PATH = "landdata/";
80 80
81 /// <value> 81 /// <value>
82 /// Path for user profiles 82 /// Path for user profiles
83 /// </value> 83 /// </value>
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
index 55640ac..1523fa9 100644
--- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
+++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
@@ -106,13 +106,13 @@ namespace OpenSim.Framework.Serialization.External
106 { 106 {
107 errors = true; 107 errors = true;
108 parseExceptionAction(nodeToFill, nodeName, e); 108 parseExceptionAction(nodeToFill, nodeName, e);
109 109
110 if (xtr.EOF) 110 if (xtr.EOF)
111 { 111 {
112 m_log.Debug("[ExternalRepresentationUtils]: Aborting ExecuteReadProcessors due to unexpected end of XML"); 112 m_log.Debug("[ExternalRepresentationUtils]: Aborting ExecuteReadProcessors due to unexpected end of XML");
113 break; 113 break;
114 } 114 }
115 115
116 if (++numErrors == 10) 116 if (++numErrors == 10)
117 { 117 {
118 m_log.Debug("[ExternalRepresentationUtils]: Aborting ExecuteReadProcessors due to too many parsing errors"); 118 m_log.Debug("[ExternalRepresentationUtils]: Aborting ExecuteReadProcessors due to too many parsing errors");
@@ -369,7 +369,7 @@ namespace OpenSim.Framework.Serialization.External
369 break; 369 break;
370 370
371 case XmlNodeType.XmlDeclaration: 371 case XmlNodeType.XmlDeclaration:
372 // For various reasons, not all serializations have xml declarations (or consistent ones) 372 // For various reasons, not all serializations have xml declarations (or consistent ones)
373 // and as it's embedded inside a byte stream we don't need it anyway, so ignore. 373 // and as it's embedded inside a byte stream we don't need it anyway, so ignore.
374 break; 374 break;
375 375
diff --git a/OpenSim/Framework/Serialization/External/OspResolver.cs b/OpenSim/Framework/Serialization/External/OspResolver.cs
index fa7160f..a1e9d55 100644
--- a/OpenSim/Framework/Serialization/External/OspResolver.cs
+++ b/OpenSim/Framework/Serialization/External/OspResolver.cs
@@ -35,13 +35,13 @@ using OpenSim.Services.Interfaces;
35namespace OpenSim.Framework.Serialization 35namespace OpenSim.Framework.Serialization
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for 38 /// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for
39 /// identifying user profiles or supplying a simple name if no profile is available. 39 /// identifying user profiles or supplying a simple name if no profile is available.
40 /// </summary> 40 /// </summary>
41 public class OspResolver 41 public class OspResolver
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 public const string OSPA_PREFIX = "ospa:"; 45 public const string OSPA_PREFIX = "ospa:";
46 public const string OSPA_NAME_KEY = "n"; 46 public const string OSPA_NAME_KEY = "n";
47 public const string OSPA_NAME_VALUE_SEPARATOR = " "; 47 public const string OSPA_NAME_VALUE_SEPARATOR = " ";
@@ -76,7 +76,7 @@ namespace OpenSim.Framework.Serialization
76 76
77 return null; 77 return null;
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// Make an OSPA given a user name 81 /// Make an OSPA given a user name
82 /// </summary> 82 /// </summary>
@@ -89,17 +89,17 @@ namespace OpenSim.Framework.Serialization
89 89
90// m_log.DebugFormat("[OSP RESOLVER]: Made OSPA {0} for {1} {2}", ospa, firstName, lastName); 90// m_log.DebugFormat("[OSP RESOLVER]: Made OSPA {0} for {1} {2}", ospa, firstName, lastName);
91// System.Console.WriteLine("[OSP RESOLVER]: Made OSPA {0} for {1} {2}", ospa, firstName, lastName); 91// System.Console.WriteLine("[OSP RESOLVER]: Made OSPA {0} for {1} {2}", ospa, firstName, lastName);
92 92
93 return ospa; 93 return ospa;
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Resolve an osp string into the most suitable internal OpenSim identifier. 97 /// Resolve an osp string into the most suitable internal OpenSim identifier.
98 /// </summary> 98 /// </summary>
99 /// 99 ///
100 /// In some cases this will be a UUID if a suitable profile exists on the system. In other cases, this may 100 /// In some cases this will be a UUID if a suitable profile exists on the system. In other cases, this may
101 /// just return the same identifier after creating a temporary profile. 101 /// just return the same identifier after creating a temporary profile.
102 /// 102 ///
103 /// <param name="ospa"></param> 103 /// <param name="ospa"></param>
104 /// <param name="commsManager"></param> 104 /// <param name="commsManager"></param>
105 /// <returns> 105 /// <returns>
@@ -111,14 +111,14 @@ namespace OpenSim.Framework.Serialization
111 if (!ospa.StartsWith(OSPA_PREFIX)) 111 if (!ospa.StartsWith(OSPA_PREFIX))
112 { 112 {
113// m_log.DebugFormat("[OSP RESOLVER]: ResolveOspa() got unrecognized format [{0}]", ospa); 113// m_log.DebugFormat("[OSP RESOLVER]: ResolveOspa() got unrecognized format [{0}]", ospa);
114 return UUID.Zero; 114 return UUID.Zero;
115 } 115 }
116 116
117// m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); 117// m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa);
118 118
119 string ospaMeat = ospa.Substring(OSPA_PREFIX.Length); 119 string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
120 string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY); 120 string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY);
121 121
122 foreach (string tuple in ospaTuples) 122 foreach (string tuple in ospaTuples)
123 { 123 {
124 int tupleSeparatorIndex = tuple.IndexOf(OSPA_PAIR_SEPARATOR); 124 int tupleSeparatorIndex = tuple.IndexOf(OSPA_PAIR_SEPARATOR);
@@ -128,17 +128,17 @@ namespace OpenSim.Framework.Serialization
128 m_log.WarnFormat("[OSP RESOLVER]: Ignoring non-tuple component {0} in OSPA {1}", tuple, ospa); 128 m_log.WarnFormat("[OSP RESOLVER]: Ignoring non-tuple component {0} in OSPA {1}", tuple, ospa);
129 continue; 129 continue;
130 } 130 }
131 131
132 string key = tuple.Remove(tupleSeparatorIndex).Trim(); 132 string key = tuple.Remove(tupleSeparatorIndex).Trim();
133 string value = tuple.Substring(tupleSeparatorIndex + 1).Trim(); 133 string value = tuple.Substring(tupleSeparatorIndex + 1).Trim();
134 134
135 if (OSPA_NAME_KEY == key) 135 if (OSPA_NAME_KEY == key)
136 return ResolveOspaName(value, userService); 136 return ResolveOspaName(value, userService);
137 } 137 }
138 138
139 return UUID.Zero; 139 return UUID.Zero;
140 } 140 }
141 141
142 /// <summary> 142 /// <summary>
143 /// Hash a profile name into a UUID 143 /// Hash a profile name into a UUID
144 /// </summary> 144 /// </summary>
@@ -148,7 +148,7 @@ namespace OpenSim.Framework.Serialization
148 { 148 {
149 return new UUID(Utils.MD5(Encoding.Unicode.GetBytes(name)), 0); 149 return new UUID(Utils.MD5(Encoding.Unicode.GetBytes(name)), 0);
150 } 150 }
151 151
152 /// <summary> 152 /// <summary>
153 /// Resolve an OSPI name by querying existing persistent user profiles. If there is no persistent user profile 153 /// Resolve an OSPI name by querying existing persistent user profiles. If there is no persistent user profile
154 /// then a temporary user profile is inserted in the cache. 154 /// then a temporary user profile is inserted in the cache.
@@ -164,13 +164,13 @@ namespace OpenSim.Framework.Serialization
164 return UUID.Zero; 164 return UUID.Zero;
165 165
166 int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR); 166 int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR);
167 167
168 if (nameSeparatorIndex < 0) 168 if (nameSeparatorIndex < 0)
169 { 169 {
170 m_log.WarnFormat("[OSP RESOLVER]: Ignoring unseparated name {0}", name); 170 m_log.WarnFormat("[OSP RESOLVER]: Ignoring unseparated name {0}", name);
171 return UUID.Zero; 171 return UUID.Zero;
172 } 172 }
173 173
174 string firstName = name.Remove(nameSeparatorIndex).TrimEnd(); 174 string firstName = name.Remove(nameSeparatorIndex).TrimEnd();
175 string lastName = name.Substring(nameSeparatorIndex + 1).TrimStart(); 175 string lastName = name.Substring(nameSeparatorIndex + 1).TrimStart();
176 176
@@ -178,14 +178,14 @@ namespace OpenSim.Framework.Serialization
178 if (account != null) 178 if (account != null)
179 { 179 {
180// m_log.DebugFormat( 180// m_log.DebugFormat(
181// "[OSP RESOLVER]: Found user account with uuid {0} for {1} {2}", 181// "[OSP RESOLVER]: Found user account with uuid {0} for {1} {2}",
182// account.PrincipalID, firstName, lastName); 182// account.PrincipalID, firstName, lastName);
183 183
184 return account.PrincipalID; 184 return account.PrincipalID;
185 } 185 }
186// else 186// else
187// { 187// {
188// m_log.DebugFormat("[OSP RESOLVER]: No resolved OSPA user account for {0}", name); 188// m_log.DebugFormat("[OSP RESOLVER]: No resolved OSPA user account for {0}", name);
189// } 189// }
190 190
191 // XXX: Disable temporary user profile creation for now as implementation is incomplete - justincc 191 // XXX: Disable temporary user profile creation for now as implementation is incomplete - justincc
@@ -194,11 +194,11 @@ namespace OpenSim.Framework.Serialization
194 tempUserProfile.FirstName = firstName; 194 tempUserProfile.FirstName = firstName;
195 tempUserProfile.SurName = lastName; 195 tempUserProfile.SurName = lastName;
196 tempUserProfile.ID = HashName(tempUserProfile.Name); 196 tempUserProfile.ID = HashName(tempUserProfile.Name);
197 197
198 m_log.DebugFormat( 198 m_log.DebugFormat(
199 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID); 199 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
200 commsManager.UserService.AddTemporaryUserProfile(tempUserProfile); 200 commsManager.UserService.AddTemporaryUserProfile(tempUserProfile);
201 201
202 return tempUserProfile.ID; 202 return tempUserProfile.ID;
203 */ 203 */
204 204
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
index 19468c3..617c451 100644
--- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework.Serialization.External
50 { 50 {
51 return Deserialize(Encoding.ASCII.GetString(serializedSettings, 0, serializedSettings.Length)); 51 return Deserialize(Encoding.ASCII.GetString(serializedSettings, 0, serializedSettings.Length));
52 } 52 }
53 53
54 /// <summary> 54 /// <summary>
55 /// Deserialize settings 55 /// Deserialize settings
56 /// </summary> 56 /// </summary>
@@ -60,14 +60,14 @@ namespace OpenSim.Framework.Serialization.External
60 public static RegionSettings Deserialize(string serializedSettings) 60 public static RegionSettings Deserialize(string serializedSettings)
61 { 61 {
62 RegionSettings settings = new RegionSettings(); 62 RegionSettings settings = new RegionSettings();
63 63
64 StringReader sr = new StringReader(serializedSettings); 64 StringReader sr = new StringReader(serializedSettings);
65 XmlTextReader xtr = new XmlTextReader(sr); 65 XmlTextReader xtr = new XmlTextReader(sr);
66 66
67 xtr.ReadStartElement("RegionSettings"); 67 xtr.ReadStartElement("RegionSettings");
68 68
69 xtr.ReadStartElement("General"); 69 xtr.ReadStartElement("General");
70 70
71 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement) 71 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
72 { 72 {
73 switch (xtr.Name) 73 switch (xtr.Name)
@@ -113,10 +113,10 @@ namespace OpenSim.Framework.Serialization.External
113 break; 113 break;
114 } 114 }
115 } 115 }
116 116
117 xtr.ReadEndElement(); 117 xtr.ReadEndElement();
118 xtr.ReadStartElement("GroundTextures"); 118 xtr.ReadStartElement("GroundTextures");
119 119
120 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement) 120 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
121 { 121 {
122 switch (xtr.Name) 122 switch (xtr.Name)
@@ -159,10 +159,10 @@ namespace OpenSim.Framework.Serialization.External
159 break; 159 break;
160 } 160 }
161 } 161 }
162 162
163 xtr.ReadEndElement(); 163 xtr.ReadEndElement();
164 xtr.ReadStartElement("Terrain"); 164 xtr.ReadStartElement("Terrain");
165 165
166 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement) 166 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
167 { 167 {
168 switch (xtr.Name) 168 switch (xtr.Name)
@@ -212,19 +212,19 @@ namespace OpenSim.Framework.Serialization.External
212 212
213 xtr.Close(); 213 xtr.Close();
214 sr.Close(); 214 sr.Close();
215 215
216 return settings; 216 return settings;
217 } 217 }
218 218
219 public static string Serialize(RegionSettings settings) 219 public static string Serialize(RegionSettings settings)
220 { 220 {
221 StringWriter sw = new StringWriter(); 221 StringWriter sw = new StringWriter();
222 XmlTextWriter xtw = new XmlTextWriter(sw); 222 XmlTextWriter xtw = new XmlTextWriter(sw);
223 xtw.Formatting = Formatting.Indented; 223 xtw.Formatting = Formatting.Indented;
224 xtw.WriteStartDocument(); 224 xtw.WriteStartDocument();
225 225
226 xtw.WriteStartElement("RegionSettings"); 226 xtw.WriteStartElement("RegionSettings");
227 227
228 xtw.WriteStartElement("General"); 228 xtw.WriteStartElement("General");
229 xtw.WriteElementString("AllowDamage", settings.AllowDamage.ToString()); 229 xtw.WriteElementString("AllowDamage", settings.AllowDamage.ToString());
230 xtw.WriteElementString("AllowLandResell", settings.AllowLandResell.ToString()); 230 xtw.WriteElementString("AllowLandResell", settings.AllowLandResell.ToString());
@@ -255,7 +255,7 @@ namespace OpenSim.Framework.Serialization.External
255 xtw.WriteElementString("ElevationHighSE", settings.Elevation2SE.ToString()); 255 xtw.WriteElementString("ElevationHighSE", settings.Elevation2SE.ToString());
256 xtw.WriteElementString("ElevationHighNE", settings.Elevation2NE.ToString()); 256 xtw.WriteElementString("ElevationHighNE", settings.Elevation2NE.ToString());
257 xtw.WriteEndElement(); 257 xtw.WriteEndElement();
258 258
259 xtw.WriteStartElement("Terrain"); 259 xtw.WriteStartElement("Terrain");
260 xtw.WriteElementString("WaterHeight", settings.WaterHeight.ToString()); 260 xtw.WriteElementString("WaterHeight", settings.WaterHeight.ToString());
261 xtw.WriteElementString("TerrainRaiseLimit", settings.TerrainRaiseLimit.ToString()); 261 xtw.WriteElementString("TerrainRaiseLimit", settings.TerrainRaiseLimit.ToString());
@@ -275,12 +275,12 @@ namespace OpenSim.Framework.Serialization.External
275 xtw.WriteElementString("SpawnPoint", sp.ToString()); 275 xtw.WriteElementString("SpawnPoint", sp.ToString());
276 } 276 }
277 xtw.WriteEndElement(); 277 xtw.WriteEndElement();
278 278
279 xtw.WriteEndElement(); 279 xtw.WriteEndElement();
280 280
281 xtw.Close(); 281 xtw.Close();
282 sw.Close(); 282 sw.Close();
283 283
284 return sw.ToString(); 284 return sw.ToString();
285 } 285 }
286 } 286 }
diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
index 994cede..9b02553 100644
--- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
@@ -36,9 +36,9 @@ using log4net;
36using OpenMetaverse; 36using OpenMetaverse;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Services.Interfaces; 38using OpenSim.Services.Interfaces;
39 39
40namespace OpenSim.Framework.Serialization.External 40namespace OpenSim.Framework.Serialization.External
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// Serialize and deserialize user inventory items as an external format. 43 /// Serialize and deserialize user inventory items as an external format.
44 /// </summary> 44 /// </summary>
@@ -49,14 +49,14 @@ namespace OpenSim.Framework.Serialization.External
49 private static Dictionary<string, Action<InventoryItemBase, XmlReader>> m_InventoryItemXmlProcessors 49 private static Dictionary<string, Action<InventoryItemBase, XmlReader>> m_InventoryItemXmlProcessors
50 = new Dictionary<string, Action<InventoryItemBase, XmlReader>>(); 50 = new Dictionary<string, Action<InventoryItemBase, XmlReader>>();
51 51
52 #region InventoryItemBase Processor initialization 52 #region InventoryItemBase Processor initialization
53 static UserInventoryItemSerializer() 53 static UserInventoryItemSerializer()
54 { 54 {
55 m_InventoryItemXmlProcessors.Add("Name", ProcessName); 55 m_InventoryItemXmlProcessors.Add("Name", ProcessName);
56 m_InventoryItemXmlProcessors.Add("ID", ProcessID); 56 m_InventoryItemXmlProcessors.Add("ID", ProcessID);
57 m_InventoryItemXmlProcessors.Add("InvType", ProcessInvType); 57 m_InventoryItemXmlProcessors.Add("InvType", ProcessInvType);
58 m_InventoryItemXmlProcessors.Add("CreatorUUID", ProcessCreatorUUID); 58 m_InventoryItemXmlProcessors.Add("CreatorUUID", ProcessCreatorUUID);
59 m_InventoryItemXmlProcessors.Add("CreatorID", ProcessCreatorID); 59 m_InventoryItemXmlProcessors.Add("CreatorID", ProcessCreatorID);
60 m_InventoryItemXmlProcessors.Add("CreatorData", ProcessCreatorData); 60 m_InventoryItemXmlProcessors.Add("CreatorData", ProcessCreatorData);
61 m_InventoryItemXmlProcessors.Add("CreationDate", ProcessCreationDate); 61 m_InventoryItemXmlProcessors.Add("CreationDate", ProcessCreationDate);
62 m_InventoryItemXmlProcessors.Add("Owner", ProcessOwner); 62 m_InventoryItemXmlProcessors.Add("Owner", ProcessOwner);
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Serialization.External
73 m_InventoryItemXmlProcessors.Add("GroupID", ProcessGroupID); 73 m_InventoryItemXmlProcessors.Add("GroupID", ProcessGroupID);
74 m_InventoryItemXmlProcessors.Add("GroupOwned", ProcessGroupOwned); 74 m_InventoryItemXmlProcessors.Add("GroupOwned", ProcessGroupOwned);
75 } 75 }
76 #endregion 76 #endregion
77 77
78 #region InventoryItemBase Processors 78 #region InventoryItemBase Processors
79 private static void ProcessName(InventoryItemBase item, XmlReader reader) 79 private static void ProcessName(InventoryItemBase item, XmlReader reader)
@@ -189,7 +189,7 @@ namespace OpenSim.Framework.Serialization.External
189 { 189 {
190 return Deserialize(Encoding.ASCII.GetString(serialization, 0, serialization.Length)); 190 return Deserialize(Encoding.ASCII.GetString(serialization, 0, serialization.Length));
191 } 191 }
192 192
193 /// <summary> 193 /// <summary>
194 /// Deserialize settings 194 /// Deserialize settings
195 /// </summary> 195 /// </summary>
@@ -212,8 +212,8 @@ namespace OpenSim.Framework.Serialization.External
212 212
213 //m_log.DebugFormat("[XXX]: parsed InventoryItemBase {0} - {1}", obj.Name, obj.UUID); 213 //m_log.DebugFormat("[XXX]: parsed InventoryItemBase {0} - {1}", obj.Name, obj.UUID);
214 return item; 214 return item;
215 } 215 }
216 216
217 public static string Serialize(InventoryItemBase inventoryItem, Dictionary<string, object> options, IUserAccountService userAccountService) 217 public static string Serialize(InventoryItemBase inventoryItem, Dictionary<string, object> options, IUserAccountService userAccountService)
218 { 218 {
219 StringWriter sw = new StringWriter(); 219 StringWriter sw = new StringWriter();
@@ -294,11 +294,11 @@ namespace OpenSim.Framework.Serialization.External
294 } 294 }
295 295
296 writer.WriteEndElement(); 296 writer.WriteEndElement();
297 297
298 writer.Close(); 298 writer.Close();
299 sw.Close(); 299 sw.Close();
300 300
301 return sw.ToString(); 301 return sw.ToString();
302 } 302 }
303 } 303 }
304} 304}
diff --git a/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs b/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs
index c685a15..34eaa99 100644
--- a/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs
@@ -42,31 +42,31 @@ namespace OpenSim.Framework.Serialization.External
42 { 42 {
43 public const int MAJOR_VERSION = 0; 43 public const int MAJOR_VERSION = 0;
44 public const int MINOR_VERSION = 1; 44 public const int MINOR_VERSION = 1;
45 45
46 public static string Serialize(UUID userID, string firstName, string lastName) 46 public static string Serialize(UUID userID, string firstName, string lastName)
47 { 47 {
48 StringWriter sw = new StringWriter(); 48 StringWriter sw = new StringWriter();
49 XmlTextWriter xtw = new XmlTextWriter(sw); 49 XmlTextWriter xtw = new XmlTextWriter(sw);
50 xtw.Formatting = Formatting.Indented; 50 xtw.Formatting = Formatting.Indented;
51 xtw.WriteStartDocument(); 51 xtw.WriteStartDocument();
52 52
53 xtw.WriteStartElement("user_profile"); 53 xtw.WriteStartElement("user_profile");
54 xtw.WriteAttributeString("major_version", MAJOR_VERSION.ToString()); 54 xtw.WriteAttributeString("major_version", MAJOR_VERSION.ToString());
55 xtw.WriteAttributeString("minor_version", MINOR_VERSION.ToString()); 55 xtw.WriteAttributeString("minor_version", MINOR_VERSION.ToString());
56 56
57 xtw.WriteElementString("name", firstName + " " + lastName); 57 xtw.WriteElementString("name", firstName + " " + lastName);
58 xtw.WriteElementString("id", userID.ToString()); 58 xtw.WriteElementString("id", userID.ToString());
59 xtw.WriteElementString("about", ""); 59 xtw.WriteElementString("about", "");
60 60
61 // Not sure if we're storing this yet, need to take a look 61 // Not sure if we're storing this yet, need to take a look
62// xtw.WriteElementString("Url", profile.Url); 62// xtw.WriteElementString("Url", profile.Url);
63 // or, indeed, interests 63 // or, indeed, interests
64 64
65 xtw.WriteEndElement(); 65 xtw.WriteEndElement();
66 66
67 xtw.Close(); 67 xtw.Close();
68 sw.Close(); 68 sw.Close();
69 69
70 return sw.ToString(); 70 return sw.ToString();
71 } 71 }
72 } 72 }
diff --git a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
index f2060ab..7dfb87b 100644
--- a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.Serialization")] 8[assembly: AssemblyTitle("OpenSim.Framework.Serialization")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
index 2a3bc48..a5c3d0a 100644
--- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Framework.Serialization
113 lock (m_bw) 113 lock (m_bw)
114 { 114 {
115 m_bw.Write(finalZeroPadding); 115 m_bw.Write(finalZeroPadding);
116 116
117 m_bw.Flush(); 117 m_bw.Flush();
118 m_bw.Close(); 118 m_bw.Close();
119 } 119 }
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Serialization
149 { 149 {
150// m_log.DebugFormat( 150// m_log.DebugFormat(
151// "[TAR ARCHIVE WRITER]: Data for {0} is {1} bytes", filePath, (null == data ? "null" : data.Length.ToString())); 151// "[TAR ARCHIVE WRITER]: Data for {0} is {1} bytes", filePath, (null == data ? "null" : data.Length.ToString()));
152 152
153 byte[] header = new byte[512]; 153 byte[] header = new byte[512];
154 154
155 // file path field (100) 155 // file path field (100)
@@ -208,18 +208,18 @@ namespace OpenSim.Framework.Serialization
208 { 208 {
209 // Write out header 209 // Write out header
210 m_bw.Write(header); 210 m_bw.Write(header);
211 211
212 // Write out data 212 // Write out data
213 // An IOException occurs if we try to write out an empty array in Mono 2.6 213 // An IOException occurs if we try to write out an empty array in Mono 2.6
214 if (data.Length > 0) 214 if (data.Length > 0)
215 m_bw.Write(data); 215 m_bw.Write(data);
216 216
217 if (data.Length % 512 != 0) 217 if (data.Length % 512 != 0)
218 { 218 {
219 int paddingRequired = 512 - (data.Length % 512); 219 int paddingRequired = 512 - (data.Length % 512);
220 220
221 //m_log.DebugFormat("[TAR ARCHIVE WRITER]: Padding data with {0} bytes", paddingRequired); 221 //m_log.DebugFormat("[TAR ARCHIVE WRITER]: Padding data with {0} bytes", paddingRequired);
222 222
223 byte[] padding = new byte[paddingRequired]; 223 byte[] padding = new byte[paddingRequired];
224 m_bw.Write(padding); 224 m_bw.Write(padding);
225 } 225 }
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 1d4deac..f761813 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -68,9 +68,9 @@ namespace OpenSim.Framework.Servers
68 68
69 private int m_periodDiagnosticTimerMS = 60 * 60 * 1000; 69 private int m_periodDiagnosticTimerMS = 60 * 60 * 1000;
70 private Timer m_periodicDiagnosticsTimer = new Timer(60 * 60 * 1000); 70 private Timer m_periodicDiagnosticsTimer = new Timer(60 * 60 * 1000);
71 71
72 /// <summary> 72 /// <summary>
73 /// Random uuid for private data 73 /// Random uuid for private data
74 /// </summary> 74 /// </summary>
75 protected string m_osSecret = String.Empty; 75 protected string m_osSecret = String.Empty;
76 76
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.Servers
85 // Random uuid for private data 85 // Random uuid for private data
86 m_osSecret = UUID.Random().ToString(); 86 m_osSecret = UUID.Random().ToString();
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// Must be overriden by child classes for their own server specific startup behaviour. 90 /// Must be overriden by child classes for their own server specific startup behaviour.
91 /// </summary> 91 /// </summary>
@@ -104,10 +104,10 @@ namespace OpenSim.Framework.Servers
104 m_periodicDiagnosticsTimer.Interval = m_periodDiagnosticTimerMS; 104 m_periodicDiagnosticsTimer.Interval = m_periodDiagnosticTimerMS;
105 m_periodicDiagnosticsTimer.Enabled = true; 105 m_periodicDiagnosticsTimer.Enabled = true;
106 } 106 }
107 } 107 }
108 108
109 protected override void ShutdownSpecific() 109 protected override void ShutdownSpecific()
110 { 110 {
111 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting..."); 111 m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
112 112
113 RemovePIDFile(); 113 RemovePIDFile();
@@ -117,12 +117,12 @@ namespace OpenSim.Framework.Servers
117 if (!SuppressExit) 117 if (!SuppressExit)
118 Environment.Exit(0); 118 Environment.Exit(0);
119 } 119 }
120 120
121 /// <summary> 121 /// <summary>
122 /// Provides a list of help topics that are available. Overriding classes should append their topics to the 122 /// Provides a list of help topics that are available. Overriding classes should append their topics to the
123 /// information returned when the base method is called. 123 /// information returned when the base method is called.
124 /// </summary> 124 /// </summary>
125 /// 125 ///
126 /// <returns> 126 /// <returns>
127 /// A list of strings that represent different help topics on which more information is available 127 /// A list of strings that represent different help topics on which more information is available
128 /// </returns> 128 /// </returns>
@@ -148,7 +148,7 @@ namespace OpenSim.Framework.Servers
148 public virtual void Startup() 148 public virtual void Startup()
149 { 149 {
150 m_log.Info("[STARTUP]: Beginning startup processing"); 150 m_log.Info("[STARTUP]: Beginning startup processing");
151 151
152 m_log.Info("[STARTUP]: version: " + m_version + Environment.NewLine); 152 m_log.Info("[STARTUP]: version: " + m_version + Environment.NewLine);
153 // clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and 153 // clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and
154 // the clr version number doesn't match the project version number under Mono. 154 // the clr version number doesn't match the project version number under Mono.
@@ -156,7 +156,7 @@ namespace OpenSim.Framework.Servers
156 m_log.InfoFormat( 156 m_log.InfoFormat(
157 "[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n", 157 "[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n",
158 Environment.OSVersion, Environment.OSVersion.Platform, Util.Is64BitProcess() ? "64" : "32"); 158 Environment.OSVersion, Environment.OSVersion.Platform, Util.Is64BitProcess() ? "64" : "32");
159 159
160 try 160 try
161 { 161 {
162 StartupSpecific(); 162 StartupSpecific();
@@ -167,18 +167,18 @@ namespace OpenSim.Framework.Servers
167 (e.Message == null || e.Message == String.Empty) ? "Unknown reason":e.Message ); 167 (e.Message == null || e.Message == String.Empty) ? "Unknown reason":e.Message );
168 Environment.Exit(1); 168 Environment.Exit(1);
169 } 169 }
170 170
171 TimeSpan timeTaken = DateTime.Now - m_startuptime; 171 TimeSpan timeTaken = DateTime.Now - m_startuptime;
172 172
173// MainConsole.Instance.OutputFormat( 173// MainConsole.Instance.OutputFormat(
174// "PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS ONCE SCRIPTS HAVE STARTED. Non-script portion of startup took {0}m {1}s.", 174// "PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS ONCE SCRIPTS HAVE STARTED. Non-script portion of startup took {0}m {1}s.",
175// timeTaken.Minutes, timeTaken.Seconds); 175// timeTaken.Minutes, timeTaken.Seconds);
176 } 176 }
177 177
178 public string osSecret 178 public string osSecret
179 { 179 {
180 // Secret uuid for the simulator 180 // Secret uuid for the simulator
181 get { return m_osSecret; } 181 get { return m_osSecret; }
182 } 182 }
183 183
184 public string StatReport(IOSHttpRequest httpRequest) 184 public string StatReport(IOSHttpRequest httpRequest)
@@ -187,8 +187,8 @@ namespace OpenSim.Framework.Servers
187 if (httpRequest.Query.ContainsKey("callback")) 187 if (httpRequest.Query.ContainsKey("callback"))
188 { 188 {
189 return httpRequest.Query["callback"].ToString() + "(" + StatsManager.SimExtraStats.XReport((DateTime.Now - m_startuptime).ToString() , m_version) + ");"; 189 return httpRequest.Query["callback"].ToString() + "(" + StatsManager.SimExtraStats.XReport((DateTime.Now - m_startuptime).ToString() , m_version) + ");";
190 } 190 }
191 else 191 else
192 { 192 {
193 return StatsManager.SimExtraStats.XReport((DateTime.Now - m_startuptime).ToString() , m_version); 193 return StatsManager.SimExtraStats.XReport((DateTime.Now - m_startuptime).ToString() , m_version);
194 } 194 }
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index e431042..fb92b92 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Servers.HttpServer
58 58
59 /// <summary> 59 /// <summary>
60 /// This is a pending websocket request before it got an sucessful upgrade response. 60 /// This is a pending websocket request before it got an sucessful upgrade response.
61 /// The consumer must call handler.HandshakeAndUpgrade() to signal to the handler to 61 /// The consumer must call handler.HandshakeAndUpgrade() to signal to the handler to
62 /// start the connection and optionally provide an origin authentication method. 62 /// start the connection and optionally provide an origin authentication method.
63 /// </summary> 63 /// </summary>
64 /// <param name="servicepath"></param> 64 /// <param name="servicepath"></param>
@@ -104,7 +104,7 @@ namespace OpenSim.Framework.Servers.HttpServer
104 new Dictionary<string, PollServiceEventArgs>(); 104 new Dictionary<string, PollServiceEventArgs>();
105 105
106 protected Dictionary<string, WebSocketRequestDelegate> m_WebSocketHandlers = 106 protected Dictionary<string, WebSocketRequestDelegate> m_WebSocketHandlers =
107 new Dictionary<string, WebSocketRequestDelegate>(); 107 new Dictionary<string, WebSocketRequestDelegate>();
108 108
109 protected uint m_port; 109 protected uint m_port;
110 protected uint m_sslport; 110 protected uint m_sslport;
@@ -253,7 +253,7 @@ namespace OpenSim.Framework.Servers.HttpServer
253 return new List<string>(m_rpcHandlers.Keys); 253 return new List<string>(m_rpcHandlers.Keys);
254 } 254 }
255 255
256 // JsonRPC 256 // JsonRPC
257 public bool AddJsonRPCHandler(string method, JsonRPCMethod handler) 257 public bool AddJsonRPCHandler(string method, JsonRPCMethod handler)
258 { 258 {
259 lock(jsonRpcHandlers) 259 lock(jsonRpcHandlers)
@@ -459,11 +459,11 @@ namespace OpenSim.Framework.Servers.HttpServer
459 dWebSocketRequestDelegate(req.Url.AbsolutePath, new WebSocketHttpServerHandler(req, context, 8192)); 459 dWebSocketRequestDelegate(req.Url.AbsolutePath, new WebSocketHttpServerHandler(req, context, 8192));
460 return; 460 return;
461 } 461 }
462 462
463 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); 463 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
464 resp.ReuseContext = true; 464 resp.ReuseContext = true;
465// resp.ReuseContext = false; 465// resp.ReuseContext = false;
466 HandleRequest(req, resp); 466 HandleRequest(req, resp);
467 467
468 // !!!HACK ALERT!!! 468 // !!!HACK ALERT!!!
469 // There seems to be a bug in the underlying http code that makes subsequent requests 469 // There seems to be a bug in the underlying http code that makes subsequent requests
@@ -554,7 +554,7 @@ namespace OpenSim.Framework.Servers.HttpServer
554 LogIncomingToStreamHandler(request, requestHandler); 554 LogIncomingToStreamHandler(request, requestHandler);
555 555
556 response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. 556 response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type.
557 557
558 if (requestHandler is IStreamedRequestHandler) 558 if (requestHandler is IStreamedRequestHandler)
559 { 559 {
560 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; 560 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
@@ -630,16 +630,16 @@ namespace OpenSim.Framework.Servers.HttpServer
630 case "text/html": 630 case "text/html":
631 if (DebugLevel >= 3) 631 if (DebugLevel >= 3)
632 LogIncomingToContentTypeHandler(request); 632 LogIncomingToContentTypeHandler(request);
633 633
634 buffer = HandleHTTPRequest(request, response); 634 buffer = HandleHTTPRequest(request, response);
635 break; 635 break;
636 636
637 case "application/llsd+xml": 637 case "application/llsd+xml":
638 case "application/xml+llsd": 638 case "application/xml+llsd":
639 case "application/llsd+json": 639 case "application/llsd+json":
640 if (DebugLevel >= 3) 640 if (DebugLevel >= 3)
641 LogIncomingToContentTypeHandler(request); 641 LogIncomingToContentTypeHandler(request);
642 642
643 buffer = HandleLLSDRequests(request, response); 643 buffer = HandleLLSDRequests(request, response);
644 break; 644 break;
645 645
@@ -649,7 +649,7 @@ namespace OpenSim.Framework.Servers.HttpServer
649 649
650 buffer = HandleJsonRpcRequests(request, response); 650 buffer = HandleJsonRpcRequests(request, response);
651 break; 651 break;
652 652
653 case "text/xml": 653 case "text/xml":
654 case "application/xml": 654 case "application/xml":
655 case "application/json": 655 case "application/json":
@@ -666,7 +666,7 @@ namespace OpenSim.Framework.Servers.HttpServer
666 { 666 {
667 if (DebugLevel >= 3) 667 if (DebugLevel >= 3)
668 LogIncomingToContentTypeHandler(request); 668 LogIncomingToContentTypeHandler(request);
669 669
670 buffer = HandleLLSDRequests(request, response); 670 buffer = HandleLLSDRequests(request, response);
671 } 671 }
672 // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); 672 // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl);
@@ -674,18 +674,18 @@ namespace OpenSim.Framework.Servers.HttpServer
674 { 674 {
675 if (DebugLevel >= 3) 675 if (DebugLevel >= 3)
676 LogIncomingToContentTypeHandler(request); 676 LogIncomingToContentTypeHandler(request);
677 677
678 buffer = HandleHTTPRequest(request, response); 678 buffer = HandleHTTPRequest(request, response);
679 } 679 }
680 else 680 else
681 { 681 {
682 if (DebugLevel >= 3) 682 if (DebugLevel >= 3)
683 LogIncomingToXmlRpcHandler(request); 683 LogIncomingToXmlRpcHandler(request);
684 684
685 // generic login request. 685 // generic login request.
686 buffer = HandleXmlRpcRequests(request, response); 686 buffer = HandleXmlRpcRequests(request, response);
687 } 687 }
688 688
689 break; 689 break;
690 } 690 }
691 } 691 }
@@ -972,7 +972,7 @@ namespace OpenSim.Framework.Servers.HttpServer
972// private bool TryGetAgentHandler(OSHttpRequest request, OSHttpResponse response, out IHttpAgentHandler agentHandler) 972// private bool TryGetAgentHandler(OSHttpRequest request, OSHttpResponse response, out IHttpAgentHandler agentHandler)
973// { 973// {
974// agentHandler = null; 974// agentHandler = null;
975// 975//
976// lock (m_agentHandlers) 976// lock (m_agentHandlers)
977// { 977// {
978// foreach (IHttpAgentHandler handler in m_agentHandlers.Values) 978// foreach (IHttpAgentHandler handler in m_agentHandlers.Values)
@@ -1171,7 +1171,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1171 return buffer; 1171 return buffer;
1172 } 1172 }
1173 1173
1174 // JsonRpc (v2.0 only) 1174 // JsonRpc (v2.0 only)
1175 // Batch requests not yet supported 1175 // Batch requests not yet supported
1176 private byte[] HandleJsonRpcRequests(OSHttpRequest request, OSHttpResponse response) 1176 private byte[] HandleJsonRpcRequests(OSHttpRequest request, OSHttpResponse response)
1177 { 1177 {
@@ -1188,7 +1188,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1188 jsonRpcResponse.Error.Code = ErrorCode.InternalError; 1188 jsonRpcResponse.Error.Code = ErrorCode.InternalError;
1189 jsonRpcResponse.Error.Message = e.Message; 1189 jsonRpcResponse.Error.Message = e.Message;
1190 } 1190 }
1191 1191
1192 requestStream.Close(); 1192 requestStream.Close();
1193 1193
1194 if (jsonRpcRequest != null) 1194 if (jsonRpcRequest != null)
@@ -1253,7 +1253,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1253 string responseData = string.Empty; 1253 string responseData = string.Empty;
1254 1254
1255 responseData = jsonRpcResponse.Serialize(); 1255 responseData = jsonRpcResponse.Serialize();
1256 1256
1257 byte[] buffer = Encoding.UTF8.GetBytes(responseData); 1257 byte[] buffer = Encoding.UTF8.GetBytes(responseData);
1258 return buffer; 1258 return buffer;
1259 } 1259 }
@@ -1533,7 +1533,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1533 } 1533 }
1534 } 1534 }
1535 } 1535 }
1536 1536
1537 if (String.IsNullOrEmpty(bestMatch)) 1537 if (String.IsNullOrEmpty(bestMatch))
1538 { 1538 {
1539 llsdHandler = null; 1539 llsdHandler = null;
@@ -1899,8 +1899,8 @@ namespace OpenSim.Framework.Servers.HttpServer
1899 response.SendChunked = false; 1899 response.SendChunked = false;
1900 response.ContentLength64 = buffer.Length; 1900 response.ContentLength64 = buffer.Length;
1901 response.ContentEncoding = Encoding.UTF8; 1901 response.ContentEncoding = Encoding.UTF8;
1902 1902
1903 1903
1904 return buffer; 1904 return buffer;
1905 } 1905 }
1906 1906
@@ -1977,7 +1977,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1977 throw e; 1977 throw e;
1978 } 1978 }
1979 1979
1980 m_requestsProcessedStat 1980 m_requestsProcessedStat
1981 = new Stat( 1981 = new Stat(
1982 "HTTPRequestsServed", 1982 "HTTPRequestsServed",
1983 "Number of inbound HTTP requests processed", 1983 "Number of inbound HTTP requests processed",
@@ -1989,7 +1989,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1989 MeasuresOfInterest.AverageChangeOverTime, 1989 MeasuresOfInterest.AverageChangeOverTime,
1990 stat => stat.Value = RequestNumber, 1990 stat => stat.Value = RequestNumber,
1991 StatVerbosity.Debug); 1991 StatVerbosity.Debug);
1992 1992
1993 StatsManager.RegisterStat(m_requestsProcessedStat); 1993 StatsManager.RegisterStat(m_requestsProcessedStat);
1994 } 1994 }
1995 1995
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
index d4a1ec3..01d95e9 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
@@ -69,13 +69,13 @@ namespace OpenSim.Framework.Servers.HttpServer
69 { 69 {
70 StatsManager.RegisterStat( 70 StatsManager.RegisterStat(
71 new Stat( 71 new Stat(
72 "requests", 72 "requests",
73 "requests", 73 "requests",
74 "Number of requests received by this service endpoint", 74 "Number of requests received by this service endpoint",
75 "requests", 75 "requests",
76 "service", 76 "service",
77 string.Format("{0}:{1}", httpMethod, path), 77 string.Format("{0}:{1}", httpMethod, path),
78 StatType.Pull, 78 StatType.Pull,
79 MeasuresOfInterest.AverageChangeOverTime, 79 MeasuresOfInterest.AverageChangeOverTime,
80 s => s.Value = RequestsReceived, 80 s => s.Value = RequestsReceived,
81 StatVerbosity.Debug)); 81 StatVerbosity.Debug));
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
index 41aa19b..7fc9f0b 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Servers.HttpServer
47 : base(httpMethod, path, name, description) {} 47 : base(httpMethod, path, name, description) {}
48 48
49 protected BaseStreamHandler(string httpMethod, string path, IServiceAuth auth) 49 protected BaseStreamHandler(string httpMethod, string path, IServiceAuth auth)
50 : base(httpMethod, path, null, null) 50 : base(httpMethod, path, null, null)
51 { 51 {
52 m_Auth = auth; 52 m_Auth = auth;
53 } 53 }
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Servers.HttpServer
62 HttpStatusCode statusCode; 62 HttpStatusCode statusCode;
63 63
64 if (!m_Auth.Authenticate(httpRequest.Headers, httpResponse.AddHeader, out statusCode)) 64 if (!m_Auth.Authenticate(httpRequest.Headers, httpResponse.AddHeader, out statusCode))
65 { 65 {
66 httpResponse.StatusCode = (int)statusCode; 66 httpResponse.StatusCode = (int)statusCode;
67 httpResponse.ContentType = "text/plain"; 67 httpResponse.ContentType = "text/plain";
68 return new byte[0]; 68 return new byte[0];
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs
index 1b88545..9619e03 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Servers.HttpServer
37 /// </remarks> 37 /// </remarks>
38 public abstract class BaseStreamHandlerBasicDOSProtector : BaseRequestHandler, IStreamedRequestHandler 38 public abstract class BaseStreamHandlerBasicDOSProtector : BaseRequestHandler, IStreamedRequestHandler
39 { 39 {
40 40
41 private readonly BasicDosProtectorOptions _options; 41 private readonly BasicDosProtectorOptions _options;
42 private readonly BasicDOSProtector _dosProtector; 42 private readonly BasicDOSProtector _dosProtector;
43 43
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.Servers.HttpServer
63 result = ThrottledRequest(path, request, httpRequest, httpResponse); 63 result = ThrottledRequest(path, request, httpRequest, httpResponse);
64 if (_options.MaxConcurrentSessions > 0) 64 if (_options.MaxConcurrentSessions > 0)
65 _dosProtector.ProcessEnd(clientstring, endpoint); 65 _dosProtector.ProcessEnd(clientstring, endpoint);
66 66
67 RequestsHandled++; 67 RequestsHandled++;
68 68
69 return result; 69 return result;
@@ -81,7 +81,7 @@ namespace OpenSim.Framework.Servers.HttpServer
81 return new byte[0]; 81 return new byte[0];
82 } 82 }
83 83
84 84
85 private string GetRemoteAddr(IOSHttpRequest httpRequest) 85 private string GetRemoteAddr(IOSHttpRequest httpRequest)
86 { 86 {
87 string remoteaddr = string.Empty; 87 string remoteaddr = string.Empty;
@@ -101,7 +101,7 @@ namespace OpenSim.Framework.Servers.HttpServer
101 clientstring = GetRemoteAddr(httpRequest); 101 clientstring = GetRemoteAddr(httpRequest);
102 102
103 return clientstring; 103 return clientstring;
104 104
105 } 105 }
106 } 106 }
107} 107}
diff --git a/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs b/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
index cd4b8ff..98d33e4 100644
--- a/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
+++ b/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Framework.Servers.HttpServer
33 { 33 {
34 private readonly GenericHTTPMethod _normalMethod; 34 private readonly GenericHTTPMethod _normalMethod;
35 private readonly GenericHTTPMethod _throttledMethod; 35 private readonly GenericHTTPMethod _throttledMethod;
36 36
37 private readonly BasicDosProtectorOptions _options; 37 private readonly BasicDosProtectorOptions _options;
38 private readonly BasicDOSProtector _dosProtector; 38 private readonly BasicDOSProtector _dosProtector;
39 39
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Servers.HttpServer
41 { 41 {
42 _normalMethod = normalMethod; 42 _normalMethod = normalMethod;
43 _throttledMethod = throttledMethod; 43 _throttledMethod = throttledMethod;
44 44
45 _options = options; 45 _options = options;
46 _dosProtector = new BasicDOSProtector(_options); 46 _dosProtector = new BasicDOSProtector(_options);
47 } 47 }
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Servers.HttpServer
60 60
61 return process; 61 return process;
62 } 62 }
63 63
64 private string GetRemoteAddr(Hashtable request) 64 private string GetRemoteAddr(Hashtable request)
65 { 65 {
66 string remoteaddr = ""; 66 string remoteaddr = "";
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
index d162bc1..3a04074 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
@@ -45,26 +45,26 @@ namespace OpenSim.Framework.Servers.HttpServer
45// // the handlers - it is NOT required to be an actual agent header 45// // the handlers - it is NOT required to be an actual agent header
46// // value. 46// // value.
47// bool AddAgentHandler(string agent, IHttpAgentHandler handler); 47// bool AddAgentHandler(string agent, IHttpAgentHandler handler);
48 48
49 /// <summary> 49 /// <summary>
50 /// Add a handler for an HTTP request. 50 /// Add a handler for an HTTP request.
51 /// </summary> 51 /// </summary>
52 /// <remarks> 52 /// <remarks>
53 /// This handler can actually be invoked either as 53 /// This handler can actually be invoked either as
54 /// 54 ///
55 /// http://<hostname>:<port>/?method=<methodName> 55 /// http://<hostname>:<port>/?method=<methodName>
56 /// 56 ///
57 /// or 57 /// or
58 /// 58 ///
59 /// http://<hostname>:<port><method> 59 /// http://<hostname>:<port><method>
60 /// 60 ///
61 /// if the method name starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region 61 /// if the method name starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region
62 /// server will register a handler that can be invoked with either 62 /// server will register a handler that can be invoked with either
63 /// 63 ///
64 /// http://localhost:9000/?method=/object/ 64 /// http://localhost:9000/?method=/object/
65 /// 65 ///
66 /// or 66 /// or
67 /// 67 ///
68 /// http://localhost:9000/object/ 68 /// http://localhost:9000/object/
69 /// 69 ///
70 /// In addition, the handler invoked by the HTTP server for any request is the one when best matches the request 70 /// In addition, the handler invoked by the HTTP server for any request is the one when best matches the request
@@ -87,7 +87,7 @@ namespace OpenSim.Framework.Servers.HttpServer
87 /// <param name="handler">handle the LLSD response</param> 87 /// <param name="handler">handle the LLSD response</param>
88 /// <returns></returns> 88 /// <returns></returns>
89 bool AddLLSDHandler(string path, LLSDMethod handler); 89 bool AddLLSDHandler(string path, LLSDMethod handler);
90 90
91 /// <summary> 91 /// <summary>
92 /// Add a stream handler to the http server. If the handler already exists, then nothing happens. 92 /// Add a stream handler to the http server. If the handler already exists, then nothing happens.
93 /// </summary> 93 /// </summary>
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Servers.HttpServer
98 bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive); 98 bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive);
99 99
100 bool AddJsonRPCHandler(string method, JsonRPCMethod handler); 100 bool AddJsonRPCHandler(string method, JsonRPCMethod handler);
101 101
102 /// <summary> 102 /// <summary>
103 /// Websocket HTTP server handlers. 103 /// Websocket HTTP server handlers.
104 /// </summary> 104 /// </summary>
@@ -108,7 +108,7 @@ namespace OpenSim.Framework.Servers.HttpServer
108 108
109 109
110 void RemoveWebSocketHandler(string servicepath); 110 void RemoveWebSocketHandler(string servicepath);
111 111
112 /// <summary> 112 /// <summary>
113 /// Gets the XML RPC handler for given method name 113 /// Gets the XML RPC handler for given method name
114 /// </summary> 114 /// </summary>
@@ -125,7 +125,7 @@ namespace OpenSim.Framework.Servers.HttpServer
125// /// <param name="handler"></param> 125// /// <param name="handler"></param>
126// /// <returns></returns> 126// /// <returns></returns>
127// bool RemoveAgentHandler(string agent, IHttpAgentHandler handler); 127// bool RemoveAgentHandler(string agent, IHttpAgentHandler handler);
128 128
129 /// <summary> 129 /// <summary>
130 /// Remove an HTTP handler 130 /// Remove an HTTP handler
131 /// </summary> 131 /// </summary>
@@ -134,15 +134,15 @@ namespace OpenSim.Framework.Servers.HttpServer
134 void RemoveHTTPHandler(string httpMethod, string path); 134 void RemoveHTTPHandler(string httpMethod, string path);
135 135
136 void RemovePollServiceHTTPHandler(string httpMethod, string path); 136 void RemovePollServiceHTTPHandler(string httpMethod, string path);
137 137
138 bool RemoveLLSDHandler(string path, LLSDMethod handler); 138 bool RemoveLLSDHandler(string path, LLSDMethod handler);
139 139
140 void RemoveStreamHandler(string httpMethod, string path); 140 void RemoveStreamHandler(string httpMethod, string path);
141 141
142 void RemoveXmlRPCHandler(string method); 142 void RemoveXmlRPCHandler(string method);
143 143
144 void RemoveJsonRPCHandler(string method); 144 void RemoveJsonRPCHandler(string method);
145 145
146 string GetHTTP404(string host); 146 string GetHTTP404(string host);
147 147
148 string GetHTTP500(); 148 string GetHTTP500();
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs
index b8541cb..62d92fb 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Servers.HttpServer
83 { 83 {
84 void Handle(string path, Stream request, Stream response, IOSHttpRequest httpReqbuest, IOSHttpResponse httpResponse); 84 void Handle(string path, Stream request, Stream response, IOSHttpRequest httpReqbuest, IOSHttpResponse httpResponse);
85 } 85 }
86 86
87 public interface IGenericHTTPHandler : IRequestHandler 87 public interface IGenericHTTPHandler : IRequestHandler
88 { 88 {
89 Hashtable Handle(string path, Hashtable request); 89 Hashtable Handle(string path, Hashtable request);
diff --git a/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs
index f3faf4f..411ee31 100644
--- a/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/JsonRpcRequestManager.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Framework.Servers.HttpServer
43 public class JsonRpcRequestManager 43 public class JsonRpcRequestManager
44 { 44 {
45 static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public JsonRpcRequestManager() 47 public JsonRpcRequestManager()
48 { 48 {
49 } 49 }
@@ -188,6 +188,6 @@ namespace OpenSim.Framework.Servers.HttpServer
188 188
189 return true; 189 return true;
190 } 190 }
191 191
192 } 192 }
193} 193}
diff --git a/OpenSim/Framework/Servers/HttpServer/JsonRpcResponse.cs b/OpenSim/Framework/Servers/HttpServer/JsonRpcResponse.cs
index 2c50587..91d284b 100644
--- a/OpenSim/Framework/Servers/HttpServer/JsonRpcResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/JsonRpcResponse.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Framework.Servers.HttpServer
144 { 144 {
145 145
146 } 146 }
147 return result; 147 return result;
148 } 148 }
149 } 149 }
150} 150}
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index 05ec6dc..1a6b8cf 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -155,11 +155,11 @@ namespace OpenSim.Framework.Servers.HttpServer
155 private string _userAgent; 155 private string _userAgent;
156 156
157 internal IHttpRequest IHttpRequest 157 internal IHttpRequest IHttpRequest
158 { 158 {
159 get { return _request; } 159 get { return _request; }
160 } 160 }
161 161
162 internal IHttpClientContext IHttpClientContext 162 internal IHttpClientContext IHttpClientContext
163 { 163 {
164 get { return _context; } 164 get { return _context; }
165 } 165 }
@@ -192,19 +192,19 @@ namespace OpenSim.Framework.Servers.HttpServer
192 // ignore 192 // ignore
193 } 193 }
194 } 194 }
195 195
196 if (null != req.Headers["content-type"]) 196 if (null != req.Headers["content-type"])
197 _contentType = _request.Headers["content-type"]; 197 _contentType = _request.Headers["content-type"];
198 if (null != req.Headers["user-agent"]) 198 if (null != req.Headers["user-agent"])
199 _userAgent = req.Headers["user-agent"]; 199 _userAgent = req.Headers["user-agent"];
200 200
201 if (null != req.Headers["remote_addr"]) 201 if (null != req.Headers["remote_addr"])
202 { 202 {
203 try 203 try
204 { 204 {
205 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]); 205 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]);
206 // sometimes req.Headers["remote_port"] returns a comma separated list, so use 206 // sometimes req.Headers["remote_port"] returns a comma separated list, so use
207 // the first one in the list and log it 207 // the first one in the list and log it
208 string[] strPorts = req.Headers["remote_port"].Split(new char[] { ',' }); 208 string[] strPorts = req.Headers["remote_port"].Split(new char[] { ',' });
209 if (strPorts.Length > 1) 209 if (strPorts.Length > 1)
210 { 210 {
@@ -216,7 +216,7 @@ namespace OpenSim.Framework.Servers.HttpServer
216 } 216 }
217 catch (FormatException) 217 catch (FormatException)
218 { 218 {
219 _log.ErrorFormat("[OSHttpRequest]: format exception on addr/port {0}:{1}, ignoring", 219 _log.ErrorFormat("[OSHttpRequest]: format exception on addr/port {0}:{1}, ignoring",
220 req.Headers["remote_addr"], req.Headers["remote_port"]); 220 req.Headers["remote_addr"], req.Headers["remote_port"]);
221 } 221 }
222 } 222 }
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
index ccf9c91..d7744fc 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Framework.Servers.HttpServer
115 115
116 public bool KeepAlive 116 public bool KeepAlive
117 { 117 {
118 get 118 get
119 { 119 {
120 return _httpResponse.Connection == ConnectionType.KeepAlive; 120 return _httpResponse.Connection == ConnectionType.KeepAlive;
121 } 121 }
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs
index a736c8b..88e3068 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Framework.Servers.HttpServer
91 /// 300 Redirect: different presentation forms available, take a pick 91 /// 300 Redirect: different presentation forms available, take a pick
92 /// </summary> 92 /// </summary>
93 RedirectMultipleChoices = 300, 93 RedirectMultipleChoices = 300,
94 94
95 /// <summary> 95 /// <summary>
96 /// 301 Redirect: requested resource has moved and now lives somewhere else 96 /// 301 Redirect: requested resource has moved and now lives somewhere else
97 /// </summary> 97 /// </summary>
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index 3fd3bf7..8ace7a9 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -46,14 +46,14 @@ namespace OpenSim.Framework.Servers.HttpServer
46 public RequestMethod Request; 46 public RequestMethod Request;
47 public UUID Id; 47 public UUID Id;
48 public int TimeOutms; 48 public int TimeOutms;
49 public EventType Type; 49 public EventType Type;
50 50
51 public enum EventType : int 51 public enum EventType : int
52 { 52 {
53 LongPoll = 0, 53 LongPoll = 0,
54 LslHttp = 1, 54 LslHttp = 1,
55 Inventory = 2, 55 Inventory = 2,
56 Texture = 3, 56 Texture = 3,
57 Mesh = 4 57 Mesh = 4
58 } 58 }
59 59
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index ffcad0f..936146d 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Framework.Servers.HttpServer
80 startInfo.ThreadPoolName = "PoolService"; 80 startInfo.ThreadPoolName = "PoolService";
81 81
82 m_threadPool = new SmartThreadPool(startInfo); 82 m_threadPool = new SmartThreadPool(startInfo);
83 83
84 } 84 }
85 85
86 public void Start() 86 public void Start()
@@ -109,7 +109,7 @@ namespace OpenSim.Framework.Servers.HttpServer
109 true, 109 true,
110 null, 110 null,
111 1000 * 60 * 10); 111 1000 * 60 * 10);
112 112
113 113
114 } 114 }
115 115
diff --git a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
index 398179f..9b663ba 100644
--- a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.Servers.HttpServer")] 8[assembly: AssemblyTitle("OpenSim.Framework.Servers.HttpServer")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
index ad69cd2..68073c1 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
@@ -291,5 +291,5 @@ namespace OpenSim.Framework.Servers.HttpServer
291 serializer.Serialize(xmlWriter, response); 291 serializer.Serialize(xmlWriter, response);
292 } 292 }
293 } 293 }
294 } 294 }
295} \ No newline at end of file 295} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs b/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
index c2925e3..c8af90f 100644
--- a/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Servers.HttpServer
75 public event PongDelegate OnPong; 75 public event PongDelegate OnPong;
76 76
77 /// <summary> 77 /// <summary>
78 /// This is a regular HTTP Request... This may be removed in the future. 78 /// This is a regular HTTP Request... This may be removed in the future.
79 /// </summary> 79 /// </summary>
80// public event RegularHttpRequestDelegate OnRegularHttpRequest; 80// public event RegularHttpRequestDelegate OnRegularHttpRequest;
81 81
@@ -93,9 +93,9 @@ namespace OpenSim.Framework.Servers.HttpServer
93 /// When the websocket is closed, this will be fired. 93 /// When the websocket is closed, this will be fired.
94 /// </summary> 94 /// </summary>
95 public event CloseDelegate OnClose; 95 public event CloseDelegate OnClose;
96 96
97 /// <summary> 97 /// <summary>
98 /// Set this delegate to allow your module to validate the origin of the 98 /// Set this delegate to allow your module to validate the origin of the
99 /// Websocket request. Primary line of defense against cross site scripting 99 /// Websocket request. Primary line of defense against cross site scripting
100 /// </summary> 100 /// </summary>
101 public ValidateHandshake HandshakeValidateMethodOverride = null; 101 public ValidateHandshake HandshakeValidateMethodOverride = null;
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.Servers.HttpServer
181 { 181 {
182 throw new InvalidOperationException("The socket has been shutdown"); 182 throw new InvalidOperationException("The socket has been shutdown");
183 } 183 }
184 } 184 }
185 set 185 set
186 { 186 {
187 if (_networkContext != null && _networkContext.Socket != null) 187 if (_networkContext != null && _networkContext.Socket != null)
@@ -194,8 +194,8 @@ namespace OpenSim.Framework.Servers.HttpServer
194 } 194 }
195 195
196 /// <summary> 196 /// <summary>
197 /// This triggers the websocket to start the upgrade process... 197 /// This triggers the websocket to start the upgrade process...
198 /// This is a Generalized Networking 'common sense' helper method. Some people expect to call Start() instead 198 /// This is a Generalized Networking 'common sense' helper method. Some people expect to call Start() instead
199 /// of the more context appropriate HandshakeAndUpgrade() 199 /// of the more context appropriate HandshakeAndUpgrade()
200 /// </summary> 200 /// </summary>
201 public void Start() 201 public void Start()
@@ -261,7 +261,7 @@ namespace OpenSim.Framework.Servers.HttpServer
261 acceptKey = GenerateAcceptKey(websocketKey); 261 acceptKey = GenerateAcceptKey(websocketKey);
262 string rawaccept = string.Format(HandshakeAcceptText, acceptKey); 262 string rawaccept = string.Format(HandshakeAcceptText, acceptKey);
263 SendUpgradeSuccess(rawaccept); 263 SendUpgradeSuccess(rawaccept);
264 264
265 265
266 } 266 }
267 else 267 else
@@ -282,7 +282,7 @@ namespace OpenSim.Framework.Servers.HttpServer
282 } 282 }
283 283
284 /// <summary> 284 /// <summary>
285 /// Generates a handshake response key string based on the client's 285 /// Generates a handshake response key string based on the client's
286 /// provided key to prove to the client that we're allowing the Websocket 286 /// provided key to prove to the client that we're allowing the Websocket
287 /// upgrade of our own free will and we were not coerced into doing it. 287 /// upgrade of our own free will and we were not coerced into doing it.
288 /// </summary> 288 /// </summary>
@@ -298,7 +298,7 @@ namespace OpenSim.Framework.Servers.HttpServer
298 SHA1 hashobj = SHA1.Create(); 298 SHA1 hashobj = SHA1.Create();
299 string ret = Convert.ToBase64String(hashobj.ComputeHash(Encoding.UTF8.GetBytes(acceptkey))); 299 string ret = Convert.ToBase64String(hashobj.ComputeHash(Encoding.UTF8.GetBytes(acceptkey)));
300 hashobj.Clear(); 300 hashobj.Clear();
301 301
302 return ret; 302 return ret;
303 } 303 }
304 304
@@ -310,11 +310,11 @@ namespace OpenSim.Framework.Servers.HttpServer
310 { 310 {
311 // Create a new websocket state so we can keep track of data in between network reads. 311 // Create a new websocket state so we can keep track of data in between network reads.
312 WebSocketState socketState = new WebSocketState() { ReceivedBytes = new List<byte>(), Header = WebsocketFrameHeader.HeaderDefault(), FrameComplete = true}; 312 WebSocketState socketState = new WebSocketState() { ReceivedBytes = new List<byte>(), Header = WebsocketFrameHeader.HeaderDefault(), FrameComplete = true};
313 313
314 byte[] bhandshakeResponse = Encoding.UTF8.GetBytes(pHandshakeResponse); 314 byte[] bhandshakeResponse = Encoding.UTF8.GetBytes(pHandshakeResponse);
315 315
316 316
317 317
318 318
319 try 319 try
320 { 320 {
@@ -324,7 +324,7 @@ namespace OpenSim.Framework.Servers.HttpServer
324 } 324 }
325 // Begin reading the TCP stream before writing the Upgrade success message to the other side of the stream. 325 // Begin reading the TCP stream before writing the Upgrade success message to the other side of the stream.
326 _networkContext.Stream.BeginRead(_buffer, 0, _bufferLength, OnReceive, socketState); 326 _networkContext.Stream.BeginRead(_buffer, 0, _bufferLength, OnReceive, socketState);
327 327
328 // Write the upgrade handshake success message 328 // Write the upgrade handshake success message
329 _networkContext.Stream.Write(bhandshakeResponse, 0, bhandshakeResponse.Length); 329 _networkContext.Stream.Write(bhandshakeResponse, 0, bhandshakeResponse.Length);
330 _networkContext.Stream.Flush(); 330 _networkContext.Stream.Flush();
@@ -345,7 +345,7 @@ namespace OpenSim.Framework.Servers.HttpServer
345 catch (ObjectDisposedException) 345 catch (ObjectDisposedException)
346 { 346 {
347 Close(string.Empty); 347 Close(string.Empty);
348 } 348 }
349 } 349 }
350 350
351 /// <summary> 351 /// <summary>
@@ -369,7 +369,7 @@ namespace OpenSim.Framework.Servers.HttpServer
369 369
370 /// <summary> 370 /// <summary>
371 /// This is our ugly Async OnReceive event handler. 371 /// This is our ugly Async OnReceive event handler.
372 /// This chunks the input stream based on the length of the provided buffer and processes out 372 /// This chunks the input stream based on the length of the provided buffer and processes out
373 /// as many frames as it can. It then moves the unprocessed data to the beginning of the buffer. 373 /// as many frames as it can. It then moves the unprocessed data to the beginning of the buffer.
374 /// </summary> 374 /// </summary>
375 /// <param name="ar">Our Async State from beginread</param> 375 /// <param name="ar">Our Async State from beginread</param>
@@ -390,7 +390,7 @@ namespace OpenSim.Framework.Servers.HttpServer
390 390
391 if (_bufferPosition > _bufferLength) 391 if (_bufferPosition > _bufferLength)
392 { 392 {
393 // Message too big for chunksize.. not sure how this happened... 393 // Message too big for chunksize.. not sure how this happened...
394 //Close(string.Empty); 394 //Close(string.Empty);
395 } 395 }
396 396
@@ -413,7 +413,7 @@ namespace OpenSim.Framework.Servers.HttpServer
413 if (pheader.PayloadLen > (ulong) _maxPayloadBytes) 413 if (pheader.PayloadLen > (ulong) _maxPayloadBytes)
414 { 414 {
415 Close("Invalid Payload size"); 415 Close("Invalid Payload size");
416 416
417 return; 417 return;
418 } 418 }
419 if (pheader.PayloadLen > 0) 419 if (pheader.PayloadLen > 0)
@@ -487,7 +487,7 @@ namespace OpenSim.Framework.Servers.HttpServer
487 _socketState.ReceivedBytes.Clear(); 487 _socketState.ReceivedBytes.Clear();
488 _socketState.ExpectedBytes = 0; 488 _socketState.ExpectedBytes = 0;
489 // do some processing 489 // do some processing
490 } 490 }
491 } 491 }
492 } 492 }
493 if (offset > 0) 493 if (offset > 0)
@@ -504,7 +504,7 @@ namespace OpenSim.Framework.Servers.HttpServer
504 } 504 }
505 else 505 else
506 { 506 {
507 // We can't read the stream anymore... 507 // We can't read the stream anymore...
508 } 508 }
509 } 509 }
510 catch (IOException) 510 catch (IOException)
@@ -533,7 +533,7 @@ namespace OpenSim.Framework.Servers.HttpServer
533 textMessageFrame.Header.Opcode = WebSocketReader.OpCode.Text; 533 textMessageFrame.Header.Opcode = WebSocketReader.OpCode.Text;
534 textMessageFrame.Header.IsEnd = true; 534 textMessageFrame.Header.IsEnd = true;
535 SendSocket(textMessageFrame.ToBytes()); 535 SendSocket(textMessageFrame.ToBytes());
536 536
537 } 537 }
538 538
539 public void SendData(byte[] data) 539 public void SendData(byte[] data)
@@ -657,7 +657,7 @@ namespace OpenSim.Framework.Servers.HttpServer
657 SendSocket(pongFrame.ToBytes()); 657 SendSocket(pongFrame.ToBytes());
658 break; 658 break;
659 case WebSocketReader.OpCode.Pong: 659 case WebSocketReader.OpCode.Pong:
660 660
661 PongDelegate pongD = OnPong; 661 PongDelegate pongD = OnPong;
662 if (pongD != null) 662 if (pongD != null)
663 { 663 {
@@ -701,7 +701,7 @@ namespace OpenSim.Framework.Servers.HttpServer
701 { 701 {
702 textD(this, new WebsocketTextEventArgs() { Data = Encoding.UTF8.GetString(psocketState.ReceivedBytes.ToArray()) }); 702 textD(this, new WebsocketTextEventArgs() { Data = Encoding.UTF8.GetString(psocketState.ReceivedBytes.ToArray()) });
703 } 703 }
704 704
705 // Send Done Event! 705 // Send Done Event!
706 } 706 }
707 break; 707 break;
@@ -719,7 +719,7 @@ namespace OpenSim.Framework.Servers.HttpServer
719 { 719 {
720 if (psocketState.ContinuationFrame.Header.Opcode == WebSocketReader.OpCode.Text) 720 if (psocketState.ContinuationFrame.Header.Opcode == WebSocketReader.OpCode.Text)
721 { 721 {
722 // Send Done event 722 // Send Done event
723 TextDelegate textD = OnText; 723 TextDelegate textD = OnText;
724 if (textD != null) 724 if (textD != null)
725 { 725 {
@@ -744,9 +744,9 @@ namespace OpenSim.Framework.Servers.HttpServer
744 break; 744 break;
745 case WebSocketReader.OpCode.Close: 745 case WebSocketReader.OpCode.Close:
746 Close(string.Empty); 746 Close(string.Empty);
747 747
748 break; 748 break;
749 749
750 } 750 }
751 psocketState.Header.SetDefault(); 751 psocketState.Header.SetDefault();
752 psocketState.ReceivedBytes.Clear(); 752 psocketState.ReceivedBytes.Clear();
@@ -837,12 +837,12 @@ namespace OpenSim.Framework.Servers.HttpServer
837 } 837 }
838 838
839 /// <summary> 839 /// <summary>
840 /// Attempts to read a header off the provided buffer. Returns true, exports a WebSocketFrameheader, 840 /// Attempts to read a header off the provided buffer. Returns true, exports a WebSocketFrameheader,
841 /// and an int to move the buffer forward when it reads a header. False when it can't read a header 841 /// and an int to move the buffer forward when it reads a header. False when it can't read a header
842 /// </summary> 842 /// </summary>
843 /// <param name="pBuffer">Bytes read from the stream</param> 843 /// <param name="pBuffer">Bytes read from the stream</param>
844 /// <param name="pOffset">Starting place in the stream to begin trying to read from</param> 844 /// <param name="pOffset">Starting place in the stream to begin trying to read from</param>
845 /// <param name="length">Lenth in the stream to try and read from. Provided for cases where the 845 /// <param name="length">Lenth in the stream to try and read from. Provided for cases where the
846 /// buffer's length is larger then the data in it</param> 846 /// buffer's length is larger then the data in it</param>
847 /// <param name="oHeader">Outputs the read WebSocket frame header</param> 847 /// <param name="oHeader">Outputs the read WebSocket frame header</param>
848 /// <param name="moveBuffer">Informs the calling stream to move the buffer forward</param> 848 /// <param name="moveBuffer">Informs the calling stream to move the buffer forward</param>
@@ -897,7 +897,7 @@ namespace OpenSim.Framework.Servers.HttpServer
897 oHeader.PayloadLen = BitConverter.ToUInt16(pBuffer, pOffset + index); 897 oHeader.PayloadLen = BitConverter.ToUInt16(pBuffer, pOffset + index);
898 index += 2; 898 index += 2;
899 break; 899 break;
900 case 127: // we got more this is a bigger frame 900 case 127: // we got more this is a bigger frame
901 // 8 bytes - uint64 - most significant bit 0 network byte order 901 // 8 bytes - uint64 - most significant bit 0 network byte order
902 minumheadersize += 8; 902 minumheadersize += 8;
903 if (length < minumheadersize) 903 if (length < minumheadersize)
@@ -909,7 +909,7 @@ namespace OpenSim.Framework.Servers.HttpServer
909 oHeader.PayloadLen = BitConverter.ToUInt64(pBuffer, pOffset + index); 909 oHeader.PayloadLen = BitConverter.ToUInt64(pBuffer, pOffset + index);
910 index += 8; 910 index += 8;
911 break; 911 break;
912 912
913 } 913 }
914 //oHeader.PayloadLeft = oHeader.PayloadLen; // Start the count in case it's chunked over the network. This is different then frame fragmentation 914 //oHeader.PayloadLeft = oHeader.PayloadLen; // Start the count in case it's chunked over the network. This is different then frame fragmentation
915 if (oHeader.IsMasked) 915 if (oHeader.IsMasked)
@@ -937,9 +937,9 @@ namespace OpenSim.Framework.Servers.HttpServer
937 /* 937 /*
938 * RFC6455 938 * RFC6455
939nib 0 1 2 3 4 5 6 7 939nib 0 1 2 3 4 5 6 7
940byt 0 1 2 3 940byt 0 1 2 3
941dec 0 1 2 3 941dec 0 1 2 3
942 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 942 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
943 +-+-+-+-+-------+-+-------------+-------------------------------+ 943 +-+-+-+-+-------+-+-------------+-------------------------------+
944 |F|R|R|R| opcode|M| Payload len | Extended payload length | 944 |F|R|R|R| opcode|M| Payload len | Extended payload length |
945 |I|S|S|S| (4) |A| (7) | (16/64) + 945 |I|S|S|S| (4) |A| (7) | (16/64) +
@@ -963,7 +963,7 @@ dec 0 1 2 3
963 public static readonly WebSocketFrame DefaultFrame = new WebSocketFrame(){Header = new WebsocketFrameHeader(),WebSocketPayload = new byte[0]}; 963 public static readonly WebSocketFrame DefaultFrame = new WebSocketFrame(){Header = new WebsocketFrameHeader(),WebSocketPayload = new byte[0]};
964 public WebsocketFrameHeader Header; 964 public WebsocketFrameHeader Header;
965 public byte[] WebSocketPayload; 965 public byte[] WebSocketPayload;
966 966
967 public byte[] ToBytes() 967 public byte[] ToBytes()
968 { 968 {
969 Header.PayloadLen = (ulong)WebSocketPayload.Length; 969 Header.PayloadLen = (ulong)WebSocketPayload.Length;
@@ -991,7 +991,7 @@ dec 0 1 2 3
991 public int Mask; 991 public int Mask;
992 /* 992 /*
993byt 0 1 2 3 993byt 0 1 2 3
994 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 994 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
995 +---------------+---------------+---------------+---------------+ 995 +---------------+---------------+---------------+---------------+
996 | Octal 1 | Octal 2 | Octal 3 | Octal 4 | 996 | Octal 1 | Octal 2 | Octal 3 | Octal 4 |
997 +---------------+---------------+---------------+---------------+ 997 +---------------+---------------+---------------+---------------+
@@ -1002,11 +1002,11 @@ byt 0 1 2 3
1002 1002
1003 public UInt64 PayloadLen; 1003 public UInt64 PayloadLen;
1004 //public UInt64 PayloadLeft; 1004 //public UInt64 PayloadLeft;
1005 // Payload is X + Y 1005 // Payload is X + Y
1006 //public UInt64 ExtensionDataLength; 1006 //public UInt64 ExtensionDataLength;
1007 //public UInt64 ApplicationDataLength; 1007 //public UInt64 ApplicationDataLength;
1008 public static readonly WebsocketFrameHeader ZeroHeader = WebsocketFrameHeader.HeaderDefault(); 1008 public static readonly WebsocketFrameHeader ZeroHeader = WebsocketFrameHeader.HeaderDefault();
1009 1009
1010 public void SetDefault() 1010 public void SetDefault()
1011 { 1011 {
1012 1012
@@ -1025,16 +1025,16 @@ byt 0 1 2 3
1025 /// <summary> 1025 /// <summary>
1026 /// Returns a byte array representing the Frame header 1026 /// Returns a byte array representing the Frame header
1027 /// </summary> 1027 /// </summary>
1028 /// <param name="payload">This is the frame data payload. The header describes the size of the payload. 1028 /// <param name="payload">This is the frame data payload. The header describes the size of the payload.
1029 /// If payload is null, a Zero sized payload is assumed</param> 1029 /// If payload is null, a Zero sized payload is assumed</param>
1030 /// <returns>Returns a byte array representing the frame header</returns> 1030 /// <returns>Returns a byte array representing the frame header</returns>
1031 public byte[] ToBytes(byte[] payload) 1031 public byte[] ToBytes(byte[] payload)
1032 { 1032 {
1033 List<byte> result = new List<byte>(); 1033 List<byte> result = new List<byte>();
1034 1034
1035 // Squeeze in our opcode and our ending bit. 1035 // Squeeze in our opcode and our ending bit.
1036 result.Add((byte)((byte)Opcode | (IsEnd?0x80:0x00) )); 1036 result.Add((byte)((byte)Opcode | (IsEnd?0x80:0x00) ));
1037 1037
1038 // Again with the three different byte interpretations of size.. 1038 // Again with the three different byte interpretations of size..
1039 1039
1040 //bytesize 1040 //bytesize
@@ -1056,7 +1056,7 @@ byt 0 1 2 3
1056 Array.Reverse(payloadLengthByte); 1056 Array.Reverse(payloadLengthByte);
1057 result.AddRange(payloadLengthByte); 1057 result.AddRange(payloadLengthByte);
1058 } 1058 }
1059 1059
1060 // Only add a payload if it's not null 1060 // Only add a payload if it's not null
1061 if (payload != null) 1061 if (payload != null)
1062 { 1062 {
@@ -1155,5 +1155,5 @@ byt 0 1 2 3
1155 1155
1156 } 1156 }
1157 1157
1158 1158
1159} 1159}
diff --git a/OpenSim/Framework/Servers/HttpServer/XmlRpcBasicDOSProtector.cs b/OpenSim/Framework/Servers/HttpServer/XmlRpcBasicDOSProtector.cs
index f212208..6b2c0ab 100644
--- a/OpenSim/Framework/Servers/HttpServer/XmlRpcBasicDOSProtector.cs
+++ b/OpenSim/Framework/Servers/HttpServer/XmlRpcBasicDOSProtector.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
36 { 36 {
37 private readonly XmlRpcMethod _normalMethod; 37 private readonly XmlRpcMethod _normalMethod;
38 private readonly XmlRpcMethod _throttledMethod; 38 private readonly XmlRpcMethod _throttledMethod;
39 39
40 private readonly BasicDosProtectorOptions _options; 40 private readonly BasicDosProtectorOptions _options;
41 private readonly BasicDOSProtector _dosProtector; 41 private readonly BasicDOSProtector _dosProtector;
42 42
@@ -44,7 +44,7 @@ namespace OpenSim.Framework.Servers.HttpServer
44 { 44 {
45 _normalMethod = normalMethod; 45 _normalMethod = normalMethod;
46 _throttledMethod = throttledMethod; 46 _throttledMethod = throttledMethod;
47 47
48 _options = options; 48 _options = options;
49 _dosProtector = new BasicDOSProtector(_options); 49 _dosProtector = new BasicDOSProtector(_options);
50 50
@@ -87,5 +87,5 @@ namespace OpenSim.Framework.Servers.HttpServer
87 87
88 } 88 }
89 89
90 90
91} 91}
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index 57931d4..ea7b2b5 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -223,11 +223,11 @@ namespace OpenSim.Framework.Servers
223 { 223 {
224 handlers.AppendFormat( 224 handlers.AppendFormat(
225 "Registered HTTP Handlers for server at {0}:{1}\n", httpServer.ListenIPAddress, httpServer.Port); 225 "Registered HTTP Handlers for server at {0}:{1}\n", httpServer.ListenIPAddress, httpServer.Port);
226 226
227 handlers.AppendFormat("* XMLRPC:\n"); 227 handlers.AppendFormat("* XMLRPC:\n");
228 foreach (String s in httpServer.GetXmlRpcHandlerKeys()) 228 foreach (String s in httpServer.GetXmlRpcHandlerKeys())
229 handlers.AppendFormat("\t{0}\n", s); 229 handlers.AppendFormat("\t{0}\n", s);
230 230
231 handlers.AppendFormat("* HTTP:\n"); 231 handlers.AppendFormat("* HTTP:\n");
232 foreach (String s in httpServer.GetHTTPHandlerKeys()) 232 foreach (String s in httpServer.GetHTTPHandlerKeys())
233 handlers.AppendFormat("\t{0}\n", s); 233 handlers.AppendFormat("\t{0}\n", s);
@@ -235,19 +235,19 @@ namespace OpenSim.Framework.Servers
235 handlers.AppendFormat("* HTTP (poll):\n"); 235 handlers.AppendFormat("* HTTP (poll):\n");
236 foreach (String s in httpServer.GetPollServiceHandlerKeys()) 236 foreach (String s in httpServer.GetPollServiceHandlerKeys())
237 handlers.AppendFormat("\t{0}\n", s); 237 handlers.AppendFormat("\t{0}\n", s);
238 238
239 handlers.AppendFormat("* JSONRPC:\n"); 239 handlers.AppendFormat("* JSONRPC:\n");
240 foreach (String s in httpServer.GetJsonRpcHandlerKeys()) 240 foreach (String s in httpServer.GetJsonRpcHandlerKeys())
241 handlers.AppendFormat("\t{0}\n", s); 241 handlers.AppendFormat("\t{0}\n", s);
242 242
243// handlers.AppendFormat("* Agent:\n"); 243// handlers.AppendFormat("* Agent:\n");
244// foreach (String s in httpServer.GetAgentHandlerKeys()) 244// foreach (String s in httpServer.GetAgentHandlerKeys())
245// handlers.AppendFormat("\t{0}\n", s); 245// handlers.AppendFormat("\t{0}\n", s);
246 246
247 handlers.AppendFormat("* LLSD:\n"); 247 handlers.AppendFormat("* LLSD:\n");
248 foreach (String s in httpServer.GetLLSDHandlerKeys()) 248 foreach (String s in httpServer.GetLLSDHandlerKeys())
249 handlers.AppendFormat("\t{0}\n", s); 249 handlers.AppendFormat("\t{0}\n", s);
250 250
251 handlers.AppendFormat("* StreamHandlers ({0}):\n", httpServer.GetStreamHandlerKeys().Count); 251 handlers.AppendFormat("* StreamHandlers ({0}):\n", httpServer.GetStreamHandlerKeys().Count);
252 foreach (String s in httpServer.GetStreamHandlerKeys()) 252 foreach (String s in httpServer.GetStreamHandlerKeys())
253 handlers.AppendFormat("\t{0}\n", s); 253 handlers.AppendFormat("\t{0}\n", s);
@@ -334,7 +334,7 @@ namespace OpenSim.Framework.Servers
334 { 334 {
335 if (port == 0) 335 if (port == 0)
336 return Instance; 336 return Instance;
337 337
338 if (instance != null && port == Instance.Port) 338 if (instance != null && port == Instance.Port)
339 return Instance; 339 return Instance;
340 340
diff --git a/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs b/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs
index 792c62e..4469e7c 100644
--- a/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Servers/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.Servers")] 8[assembly: AssemblyTitle("OpenSim.Framework.Servers")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index 7b806a4..8965e71 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Framework.Servers
56 protected ICommandConsole m_console; 56 protected ICommandConsole m_console;
57 57
58 protected OpenSimAppender m_consoleAppender; 58 protected OpenSimAppender m_consoleAppender;
59 protected FileAppender m_logFileAppender; 59 protected FileAppender m_logFileAppender;
60 60
61 protected DateTime m_startuptime; 61 protected DateTime m_startuptime;
62 protected string m_startupDirectory = Environment.CurrentDirectory; 62 protected string m_startupDirectory = Environment.CurrentDirectory;
@@ -81,7 +81,7 @@ namespace OpenSim.Framework.Servers
81 { 81 {
82 if (File.Exists(path)) 82 if (File.Exists(path))
83 m_log.ErrorFormat( 83 m_log.ErrorFormat(
84 "[SERVER BASE]: Previous pid file {0} still exists on startup. Possibly previously unclean shutdown.", 84 "[SERVER BASE]: Previous pid file {0} still exists on startup. Possibly previously unclean shutdown.",
85 path); 85 path);
86 86
87 try 87 try
@@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
103 m_log.Warn(string.Format("[SERVER BASE]: Could not create PID file at {0} ", path), e); 103 m_log.Warn(string.Format("[SERVER BASE]: Could not create PID file at {0} ", path), e);
104 } 104 }
105 } 105 }
106 106
107 protected void RemovePIDFile() 107 protected void RemovePIDFile()
108 { 108 {
109 if (m_pidFile != String.Empty) 109 if (m_pidFile != String.Empty)
@@ -166,11 +166,11 @@ namespace OpenSim.Framework.Servers
166 { 166 {
167 // FIXME: This should be done through an interface rather than casting. 167 // FIXME: This should be done through an interface rather than casting.
168 m_consoleAppender.Console = (ConsoleBase)m_console; 168 m_consoleAppender.Console = (ConsoleBase)m_console;
169 169
170 // If there is no threshold set then the threshold is effectively everything. 170 // If there is no threshold set then the threshold is effectively everything.
171 if (null == m_consoleAppender.Threshold) 171 if (null == m_consoleAppender.Threshold)
172 m_consoleAppender.Threshold = Level.All; 172 m_consoleAppender.Threshold = Level.All;
173 173
174 Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold)); 174 Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold));
175 } 175 }
176 176
@@ -205,11 +205,11 @@ namespace OpenSim.Framework.Servers
205 "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow); 205 "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow);
206 206
207 m_console.Commands.AddCommand( 207 m_console.Commands.AddCommand(
208 "General", false, "get log level", "get log level", "Get the current console logging level", 208 "General", false, "get log level", "get log level", "Get the current console logging level",
209 (mod, cmd) => ShowLogLevel()); 209 (mod, cmd) => ShowLogLevel());
210 210
211 m_console.Commands.AddCommand( 211 m_console.Commands.AddCommand(
212 "General", false, "set log level", "set log level <level>", 212 "General", false, "set log level", "set log level <level>",
213 "Set the console logging level for this session.", HandleSetLogLevel); 213 "Set the console logging level for this session.", HandleSetLogLevel);
214 214
215 m_console.Commands.AddCommand( 215 m_console.Commands.AddCommand(
@@ -222,14 +222,14 @@ namespace OpenSim.Framework.Servers
222 "config get [<section>] [<key>]", 222 "config get [<section>] [<key>]",
223 "Synonym for config show", 223 "Synonym for config show",
224 HandleConfig); 224 HandleConfig);
225 225
226 m_console.Commands.AddCommand( 226 m_console.Commands.AddCommand(
227 "General", false, "config show", 227 "General", false, "config show",
228 "config show [<section>] [<key>]", 228 "config show [<section>] [<key>]",
229 "Show config information", 229 "Show config information",
230 "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine 230 "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine
231 + "If a section is given but not a field, then all fields in that section are printed.", 231 + "If a section is given but not a field, then all fields in that section are printed.",
232 HandleConfig); 232 HandleConfig);
233 233
234 m_console.Commands.AddCommand( 234 m_console.Commands.AddCommand(
235 "General", false, "config save", 235 "General", false, "config save",
@@ -280,7 +280,7 @@ namespace OpenSim.Framework.Servers
280 "debug threadpool status", 280 "debug threadpool status",
281 "Show current debug threadpool parameters.", 281 "Show current debug threadpool parameters.",
282 HandleDebugThreadpoolStatus); 282 HandleDebugThreadpoolStatus);
283 283
284 m_console.Commands.AddCommand( 284 m_console.Commands.AddCommand(
285 "Debug", false, "debug threadpool level", 285 "Debug", false, "debug threadpool level",
286 "debug threadpool level 0.." + Util.MAX_THREADPOOL_LEVEL, 286 "debug threadpool level 0.." + Util.MAX_THREADPOOL_LEVEL,
@@ -332,7 +332,7 @@ namespace OpenSim.Framework.Servers
332 { 332 {
333 WebUtil.SerializeOSDRequestsPerEndpoint = networkConfig.GetBoolean("SerializeOSDRequests", false); 333 WebUtil.SerializeOSDRequestsPerEndpoint = networkConfig.GetBoolean("SerializeOSDRequests", false);
334 } 334 }
335 335
336 m_serverStatsCollector = new ServerStatsCollector(); 336 m_serverStatsCollector = new ServerStatsCollector();
337 m_serverStatsCollector.Initialise(configSource); 337 m_serverStatsCollector.Initialise(configSource);
338 m_serverStatsCollector.Start(); 338 m_serverStatsCollector.Start();
@@ -432,7 +432,7 @@ namespace OpenSim.Framework.Servers
432 432
433 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads); 433 ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads);
434 Notice("Available worker threads: {0}", workerThreads); 434 Notice("Available worker threads: {0}", workerThreads);
435 Notice("Available IOCP threads: {0}", iocpThreads); 435 Notice("Available IOCP threads: {0}", iocpThreads);
436 } 436 }
437 437
438 private void HandleDebugThreadpoolSet(string module, string[] args) 438 private void HandleDebugThreadpoolSet(string module, string[] args)
@@ -488,7 +488,7 @@ namespace OpenSim.Framework.Servers
488 fail = true; 488 fail = true;
489 } 489 }
490 } 490 }
491 491
492 if (fail) 492 if (fail)
493 { 493 {
494 Notice("ERROR: Could not set {0} {1} threads to {2}", poolType, bound, newThreads); 494 Notice("ERROR: Could not set {0} {1} threads to {2}", poolType, bound, newThreads);
@@ -582,7 +582,7 @@ namespace OpenSim.Framework.Servers
582 if (cmdparams.Length > 0) 582 if (cmdparams.Length > 0)
583 { 583 {
584 string firstParam = cmdparams[0].ToLower(); 584 string firstParam = cmdparams[0].ToLower();
585 585
586 switch (firstParam) 586 switch (firstParam)
587 { 587 {
588 case "set": 588 case "set":
@@ -633,12 +633,12 @@ namespace OpenSim.Framework.Servers
633 { 633 {
634 Notice("[{0}]", config.Name); 634 Notice("[{0}]", config.Name);
635 foreach (string key in config.GetKeys()) 635 foreach (string key in config.GetKeys())
636 Notice(" {0} = {1}", key, config.GetString(key)); 636 Notice(" {0} = {1}", key, config.GetString(key));
637 } 637 }
638 else 638 else
639 { 639 {
640 Notice( 640 Notice(
641 "config get {0} {1} : {2}", 641 "config get {0} {1} : {2}",
642 cmdparams[1], cmdparams[2], config.GetString(cmdparams[2])); 642 cmdparams[1], cmdparams[2], config.GetString(cmdparams[2]));
643 } 643 }
644 } 644 }
@@ -692,10 +692,10 @@ namespace OpenSim.Framework.Servers
692 } 692 }
693 693
694 string rawLevel = cmd[3]; 694 string rawLevel = cmd[3];
695 695
696 ILoggerRepository repository = LogManager.GetRepository(); 696 ILoggerRepository repository = LogManager.GetRepository();
697 Level consoleLevel = repository.LevelMap[rawLevel]; 697 Level consoleLevel = repository.LevelMap[rawLevel];
698 698
699 if (consoleLevel != null) 699 if (consoleLevel != null)
700 m_consoleAppender.Threshold = consoleLevel; 700 m_consoleAppender.Threshold = consoleLevel;
701 else 701 else
@@ -770,9 +770,9 @@ namespace OpenSim.Framework.Servers
770 protected void ShowInfo() 770 protected void ShowInfo()
771 { 771 {
772 Notice(GetVersionText()); 772 Notice(GetVersionText());
773 Notice("Startup directory: " + m_startupDirectory); 773 Notice("Startup directory: " + m_startupDirectory);
774 if (null != m_consoleAppender) 774 if (null != m_consoleAppender)
775 Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold)); 775 Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold));
776 } 776 }
777 777
778 /// <summary> 778 /// <summary>
@@ -873,7 +873,7 @@ namespace OpenSim.Framework.Servers
873 873
874 public string GetVersionText() 874 public string GetVersionText()
875 { 875 {
876 return String.Format("Version: {0} (SIMULATION/{1} - SIMULATION/{2})", 876 return String.Format("Version: {0} (SIMULATION/{1} - SIMULATION/{2})",
877 m_version, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax); 877 m_version, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax);
878 } 878 }
879 879
@@ -898,7 +898,7 @@ namespace OpenSim.Framework.Servers
898 foreach (Watchdog.ThreadWatchdogInfo twi in threads) 898 foreach (Watchdog.ThreadWatchdogInfo twi in threads)
899 { 899 {
900 Thread t = twi.Thread; 900 Thread t = twi.Thread;
901 901
902 sb.AppendFormat( 902 sb.AppendFormat(
903 reportFormat, 903 reportFormat,
904 t.ManagedThreadId, 904 t.ManagedThreadId,
@@ -1005,7 +1005,7 @@ namespace OpenSim.Framework.Servers
1005 MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId); 1005 MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
1006 else 1006 else
1007 MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId); 1007 MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
1008 } 1008 }
1009 1009
1010 /// <summary> 1010 /// <summary>
1011 /// Console output is only possible if a console has been established. 1011 /// Console output is only possible if a console has been established.
@@ -1020,13 +1020,13 @@ namespace OpenSim.Framework.Servers
1020 m_console.Output(msg); 1020 m_console.Output(msg);
1021 } 1021 }
1022 } 1022 }
1023 1023
1024 /// <summary> 1024 /// <summary>
1025 /// Console output is only possible if a console has been established. 1025 /// Console output is only possible if a console has been established.
1026 /// That is something that cannot be determined within this class. So 1026 /// That is something that cannot be determined within this class. So
1027 /// all attempts to use the console MUST be verified. 1027 /// all attempts to use the console MUST be verified.
1028 /// </summary> 1028 /// </summary>
1029 /// <param name="format"></param> 1029 /// <param name="format"></param>
1030 /// <param name="components"></param> 1030 /// <param name="components"></param>
1031 protected void Notice(string format, params object[] components) 1031 protected void Notice(string format, params object[] components)
1032 { 1032 {
diff --git a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs
index 60533cd..e5f7043 100644
--- a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs
+++ b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs
@@ -92,87 +92,87 @@ namespace OpenSim.Framework.Servers.Tests
92 public class TestHttpRequest: IHttpRequest 92 public class TestHttpRequest: IHttpRequest
93 { 93 {
94 private string _uriPath; 94 private string _uriPath;
95 public bool BodyIsComplete 95 public bool BodyIsComplete
96 { 96 {
97 get { return true; } 97 get { return true; }
98 } 98 }
99 public string[] AcceptTypes 99 public string[] AcceptTypes
100 { 100 {
101 get {return _acceptTypes; } 101 get {return _acceptTypes; }
102 } 102 }
103 private string[] _acceptTypes; 103 private string[] _acceptTypes;
104 public Stream Body 104 public Stream Body
105 { 105 {
106 get { return _body; } 106 get { return _body; }
107 set { _body = value;} 107 set { _body = value;}
108 } 108 }
109 private Stream _body; 109 private Stream _body;
110 public ConnectionType Connection 110 public ConnectionType Connection
111 { 111 {
112 get { return _connection; } 112 get { return _connection; }
113 set { _connection = value; } 113 set { _connection = value; }
114 } 114 }
115 private ConnectionType _connection; 115 private ConnectionType _connection;
116 public int ContentLength 116 public int ContentLength
117 { 117 {
118 get { return _contentLength; } 118 get { return _contentLength; }
119 set { _contentLength = value; } 119 set { _contentLength = value; }
120 } 120 }
121 private int _contentLength; 121 private int _contentLength;
122 public NameValueCollection Headers 122 public NameValueCollection Headers
123 { 123 {
124 get { return _headers; } 124 get { return _headers; }
125 } 125 }
126 private NameValueCollection _headers = new NameValueCollection(); 126 private NameValueCollection _headers = new NameValueCollection();
127 public string HttpVersion 127 public string HttpVersion
128 { 128 {
129 get { return _httpVersion; } 129 get { return _httpVersion; }
130 set { _httpVersion = value; } 130 set { _httpVersion = value; }
131 } 131 }
132 private string _httpVersion = null; 132 private string _httpVersion = null;
133 public string Method 133 public string Method
134 { 134 {
135 get { return _method; } 135 get { return _method; }
136 set { _method = value; } 136 set { _method = value; }
137 } 137 }
138 private string _method = null; 138 private string _method = null;
139 public HttpInput QueryString 139 public HttpInput QueryString
140 { 140 {
141 get { return _queryString; } 141 get { return _queryString; }
142 } 142 }
143 private HttpInput _queryString = null; 143 private HttpInput _queryString = null;
144 public Uri Uri 144 public Uri Uri
145 { 145 {
146 get { return _uri; } 146 get { return _uri; }
147 set { _uri = value; } 147 set { _uri = value; }
148 } 148 }
149 private Uri _uri = null; 149 private Uri _uri = null;
150 public string[] UriParts 150 public string[] UriParts
151 { 151 {
152 get { return _uri.Segments; } 152 get { return _uri.Segments; }
153 } 153 }
154 public HttpParam Param 154 public HttpParam Param
155 { 155 {
156 get { return null; } 156 get { return null; }
157 } 157 }
158 public HttpForm Form 158 public HttpForm Form
159 { 159 {
160 get { return null; } 160 get { return null; }
161 } 161 }
162 public bool IsAjax 162 public bool IsAjax
163 { 163 {
164 get { return false; } 164 get { return false; }
165 } 165 }
166 public RequestCookies Cookies 166 public RequestCookies Cookies
167 { 167 {
168 get { return null; } 168 get { return null; }
169 } 169 }
170 170
171 public TestHttpRequest() {} 171 public TestHttpRequest() {}
172 172
173 public TestHttpRequest(string contentEncoding, string contentType, string userAgent, 173 public TestHttpRequest(string contentEncoding, string contentType, string userAgent,
174 string remoteAddr, string remotePort, string[] acceptTypes, 174 string remoteAddr, string remotePort, string[] acceptTypes,
175 ConnectionType connectionType, int contentLength, Uri uri) 175 ConnectionType connectionType, int contentLength, Uri uri)
176 { 176 {
177 _headers["content-encoding"] = contentEncoding; 177 _headers["content-encoding"] = contentEncoding;
178 _headers["content-type"] = contentType; 178 _headers["content-type"] = contentType;
@@ -192,7 +192,7 @@ namespace OpenSim.Framework.Servers.Tests
192 { 192 {
193 _headers.Add(name, value); 193 _headers.Add(name, value);
194 } 194 }
195 public int AddToBody(byte[] bytes, int offset, int length) 195 public int AddToBody(byte[] bytes, int offset, int length)
196 { 196 {
197 return 0; 197 return 0;
198 } 198 }
@@ -223,7 +223,7 @@ namespace OpenSim.Framework.Servers.Tests
223 set 223 set
224 { 224 {
225 _uriPath = value; 225 _uriPath = value;
226 226
227 } 227 }
228 } 228 }
229 229
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Servers.Tests
231 231
232 public class TestHttpResponse: IHttpResponse 232 public class TestHttpResponse: IHttpResponse
233 { 233 {
234 public Stream Body 234 public Stream Body
235 { 235 {
236 get { return _body; } 236 get { return _body; }
237 237
@@ -239,14 +239,14 @@ namespace OpenSim.Framework.Servers.Tests
239 } 239 }
240 private Stream _body; 240 private Stream _body;
241 241
242 public string ProtocolVersion 242 public string ProtocolVersion
243 { 243 {
244 get { return _protocolVersion; } 244 get { return _protocolVersion; }
245 set { _protocolVersion = value; } 245 set { _protocolVersion = value; }
246 } 246 }
247 private string _protocolVersion; 247 private string _protocolVersion;
248 248
249 public bool Chunked 249 public bool Chunked
250 { 250 {
251 get { return _chunked; } 251 get { return _chunked; }
252 252
@@ -254,7 +254,7 @@ namespace OpenSim.Framework.Servers.Tests
254 } 254 }
255 private bool _chunked; 255 private bool _chunked;
256 256
257 public ConnectionType Connection 257 public ConnectionType Connection
258 { 258 {
259 get { return _connection; } 259 get { return _connection; }
260 260
@@ -262,7 +262,7 @@ namespace OpenSim.Framework.Servers.Tests
262 } 262 }
263 private ConnectionType _connection; 263 private ConnectionType _connection;
264 264
265 public Encoding Encoding 265 public Encoding Encoding
266 { 266 {
267 get { return _encoding; } 267 get { return _encoding; }
268 268
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Servers.Tests
270 } 270 }
271 private Encoding _encoding; 271 private Encoding _encoding;
272 272
273 public int KeepAlive 273 public int KeepAlive
274 { 274 {
275 get { return _keepAlive; } 275 get { return _keepAlive; }
276 276
@@ -278,7 +278,7 @@ namespace OpenSim.Framework.Servers.Tests
278 } 278 }
279 private int _keepAlive; 279 private int _keepAlive;
280 280
281 public HttpStatusCode Status 281 public HttpStatusCode Status
282 { 282 {
283 get { return _status; } 283 get { return _status; }
284 284
@@ -286,7 +286,7 @@ namespace OpenSim.Framework.Servers.Tests
286 } 286 }
287 private HttpStatusCode _status; 287 private HttpStatusCode _status;
288 288
289 public string Reason 289 public string Reason
290 { 290 {
291 get { return _reason; } 291 get { return _reason; }
292 292
@@ -294,7 +294,7 @@ namespace OpenSim.Framework.Servers.Tests
294 } 294 }
295 private string _reason; 295 private string _reason;
296 296
297 public long ContentLength 297 public long ContentLength
298 { 298 {
299 get { return _contentLength; } 299 get { return _contentLength; }
300 300
@@ -302,7 +302,7 @@ namespace OpenSim.Framework.Servers.Tests
302 } 302 }
303 private long _contentLength; 303 private long _contentLength;
304 304
305 public string ContentType 305 public string ContentType
306 { 306 {
307 get { return _contentType; } 307 get { return _contentType; }
308 308
@@ -310,19 +310,19 @@ namespace OpenSim.Framework.Servers.Tests
310 } 310 }
311 private string _contentType; 311 private string _contentType;
312 312
313 public bool HeadersSent 313 public bool HeadersSent
314 { 314 {
315 get { return _headersSent; } 315 get { return _headersSent; }
316 } 316 }
317 private bool _headersSent; 317 private bool _headersSent;
318 318
319 public bool Sent 319 public bool Sent
320 { 320 {
321 get { return _sent; } 321 get { return _sent; }
322 } 322 }
323 private bool _sent; 323 private bool _sent;
324 324
325 public ResponseCookies Cookies 325 public ResponseCookies Cookies
326 { 326 {
327 get { return _cookies; } 327 get { return _cookies; }
328 } 328 }
@@ -335,25 +335,25 @@ namespace OpenSim.Framework.Servers.Tests
335 } 335 }
336 336
337 public void AddHeader(string name, string value) {} 337 public void AddHeader(string name, string value) {}
338 public void Send() 338 public void Send()
339 { 339 {
340 if (!_headersSent) SendHeaders(); 340 if (!_headersSent) SendHeaders();
341 if (_sent) throw new InvalidOperationException("stuff already sent"); 341 if (_sent) throw new InvalidOperationException("stuff already sent");
342 _sent = true; 342 _sent = true;
343 } 343 }
344 344
345 public void SendBody(byte[] buffer, int offset, int count) 345 public void SendBody(byte[] buffer, int offset, int count)
346 { 346 {
347 if (!_headersSent) SendHeaders(); 347 if (!_headersSent) SendHeaders();
348 _sent = true; 348 _sent = true;
349 } 349 }
350 public void SendBody(byte[] buffer) 350 public void SendBody(byte[] buffer)
351 { 351 {
352 if (!_headersSent) SendHeaders(); 352 if (!_headersSent) SendHeaders();
353 _sent = true; 353 _sent = true;
354 } 354 }
355 355
356 public void SendHeaders() 356 public void SendHeaders()
357 { 357 {
358 if (_headersSent) throw new InvalidOperationException("headers already sent"); 358 if (_headersSent) throw new InvalidOperationException("headers already sent");
359 _headersSent = true; 359 _headersSent = true;
@@ -362,7 +362,7 @@ namespace OpenSim.Framework.Servers.Tests
362 public void Redirect(Uri uri) {} 362 public void Redirect(Uri uri) {}
363 public void Redirect(string url) {} 363 public void Redirect(string url) {}
364 } 364 }
365 365
366 366
367 public OSHttpRequest req0; 367 public OSHttpRequest req0;
368 public OSHttpRequest req1; 368 public OSHttpRequest req1;
@@ -374,22 +374,22 @@ namespace OpenSim.Framework.Servers.Tests
374 [TestFixtureSetUp] 374 [TestFixtureSetUp]
375 public void Init() 375 public void Init()
376 { 376 {
377 TestHttpRequest threq0 = new TestHttpRequest("utf-8", "text/xml", "OpenSim Test Agent", "192.168.0.1", "4711", 377 TestHttpRequest threq0 = new TestHttpRequest("utf-8", "text/xml", "OpenSim Test Agent", "192.168.0.1", "4711",
378 new string[] {"text/xml"}, 378 new string[] {"text/xml"},
379 ConnectionType.KeepAlive, 4711, 379 ConnectionType.KeepAlive, 4711,
380 new Uri("http://127.0.0.1/admin/inventory/Dr+Who/Tardis")); 380 new Uri("http://127.0.0.1/admin/inventory/Dr+Who/Tardis"));
381 threq0.Method = "GET"; 381 threq0.Method = "GET";
382 threq0.HttpVersion = HttpHelper.HTTP10; 382 threq0.HttpVersion = HttpHelper.HTTP10;
383 383
384 TestHttpRequest threq1 = new TestHttpRequest("utf-8", "text/xml", "OpenSim Test Agent", "192.168.0.1", "4711", 384 TestHttpRequest threq1 = new TestHttpRequest("utf-8", "text/xml", "OpenSim Test Agent", "192.168.0.1", "4711",
385 new string[] {"text/xml"}, 385 new string[] {"text/xml"},
386 ConnectionType.KeepAlive, 4711, 386 ConnectionType.KeepAlive, 4711,
387 new Uri("http://127.0.0.1/admin/inventory/Dr+Who/Tardis?a=0&b=1&c=2")); 387 new Uri("http://127.0.0.1/admin/inventory/Dr+Who/Tardis?a=0&b=1&c=2"));
388 threq1.Method = "POST"; 388 threq1.Method = "POST";
389 threq1.HttpVersion = HttpHelper.HTTP11; 389 threq1.HttpVersion = HttpHelper.HTTP11;
390 threq1.Headers["x-wuff"] = "wuffwuff"; 390 threq1.Headers["x-wuff"] = "wuffwuff";
391 threq1.Headers["www-authenticate"] = "go away"; 391 threq1.Headers["www-authenticate"] = "go away";
392 392
393 req0 = new OSHttpRequest(new TestHttpClientContext(false), threq0); 393 req0 = new OSHttpRequest(new TestHttpClientContext(false), threq0);
394 req1 = new OSHttpRequest(new TestHttpClientContext(false), threq1); 394 req1 = new OSHttpRequest(new TestHttpClientContext(false), threq1);
395 395
diff --git a/OpenSim/Framework/ServiceAuth/BasicHttpAuthentication.cs b/OpenSim/Framework/ServiceAuth/BasicHttpAuthentication.cs
index 512ac4f..9126cfb 100644
--- a/OpenSim/Framework/ServiceAuth/BasicHttpAuthentication.cs
+++ b/OpenSim/Framework/ServiceAuth/BasicHttpAuthentication.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Framework.ServiceAuth
56 { 56 {
57// remove_me = section; 57// remove_me = section;
58 m_Username = Util.GetConfigVarFromSections<string>(config, "HttpAuthUsername", new string[] { "Network", section }, string.Empty); 58 m_Username = Util.GetConfigVarFromSections<string>(config, "HttpAuthUsername", new string[] { "Network", section }, string.Empty);
59 m_Password = Util.GetConfigVarFromSections<string>(config, "HttpAuthPassword", new string[] { "Network", section }, string.Empty); 59 m_Password = Util.GetConfigVarFromSections<string>(config, "HttpAuthPassword", new string[] { "Network", section }, string.Empty);
60 string str = m_Username + ":" + m_Password; 60 string str = m_Username + ":" + m_Password;
61 byte[] encData_byte = Util.UTF8.GetBytes(str); 61 byte[] encData_byte = Util.UTF8.GetBytes(str);
62 62
diff --git a/OpenSim/Framework/ServiceAuth/CompoundAuthentication.cs b/OpenSim/Framework/ServiceAuth/CompoundAuthentication.cs
index a49952c..79d6ff4 100644
--- a/OpenSim/Framework/ServiceAuth/CompoundAuthentication.cs
+++ b/OpenSim/Framework/ServiceAuth/CompoundAuthentication.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Framework.ServiceAuth
56 m_authentications.Remove(auth); 56 m_authentications.Remove(auth);
57 } 57 }
58 58
59 public void AddAuthorization(NameValueCollection headers) 59 public void AddAuthorization(NameValueCollection headers)
60 { 60 {
61 foreach (IServiceAuth auth in m_authentications) 61 foreach (IServiceAuth auth in m_authentications)
62 auth.AddAuthorization(headers); 62 auth.AddAuthorization(headers);
diff --git a/OpenSim/Framework/SimStats.cs b/OpenSim/Framework/SimStats.cs
index a811187..f19a270 100644
--- a/OpenSim/Framework/SimStats.cs
+++ b/OpenSim/Framework/SimStats.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Framework
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Enapsulate statistics for a simulator/scene. 34 /// Enapsulate statistics for a simulator/scene.
35 /// 35 ///
36 /// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats 36 /// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats
37 /// storage. 37 /// storage.
38 /// </summary> 38 /// </summary>
@@ -49,7 +49,7 @@ namespace OpenSim.Framework
49 get { return m_regionY; } 49 get { return m_regionY; }
50 } 50 }
51 private uint m_regionY; 51 private uint m_regionY;
52 52
53 public SimStatsPacket.RegionBlock RegionBlock 53 public SimStatsPacket.RegionBlock RegionBlock
54 { 54 {
55 get { return m_regionBlock; } 55 get { return m_regionBlock; }
@@ -73,7 +73,7 @@ namespace OpenSim.Framework
73 get { return m_regionFlags; } 73 get { return m_regionFlags; }
74 } 74 }
75 private uint m_regionFlags; 75 private uint m_regionFlags;
76 76
77 public uint ObjectCapacity 77 public uint ObjectCapacity
78 { 78 {
79 get { return m_objectCapacity; } 79 get { return m_objectCapacity; }
@@ -85,9 +85,9 @@ namespace OpenSim.Framework
85 get { return regionUUID; } 85 get { return regionUUID; }
86 } 86 }
87 private UUID regionUUID; 87 private UUID regionUUID;
88 88
89 public SimStats( 89 public SimStats(
90 uint regionX, uint regionY, uint regionFlags, uint objectCapacity, 90 uint regionX, uint regionY, uint regionFlags, uint objectCapacity,
91 SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock, 91 SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock,
92 SimStatsPacket.StatBlock[] ExtraStatsBlock, UUID pRUUID) 92 SimStatsPacket.StatBlock[] ExtraStatsBlock, UUID pRUUID)
93 { 93 {
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs
index c270d98..223d91f 100644
--- a/OpenSim/Framework/TaskInventoryDictionary.cs
+++ b/OpenSim/Framework/TaskInventoryDictionary.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Framework
52 52
53 private static XmlSerializer tiiSerializer = new XmlSerializer(typeof (TaskInventoryItem)); 53 private static XmlSerializer tiiSerializer = new XmlSerializer(typeof (TaskInventoryItem));
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
56 private Thread LockedByThread; 56 private Thread LockedByThread;
57// private string WriterStack; 57// private string WriterStack;
58 58
@@ -98,7 +98,7 @@ namespace OpenSim.Framework
98 if (!LockedByThread.IsAlive) 98 if (!LockedByThread.IsAlive)
99 { 99 {
100 //Locked by dead thread, reset. 100 //Locked by dead thread, reset.
101 m_itemLock = new System.Threading.ReaderWriterLockSlim(); 101 m_itemLock = new System.Threading.ReaderWriterLockSlim();
102 } 102 }
103 } 103 }
104 104
@@ -146,7 +146,7 @@ namespace OpenSim.Framework
146// {} 146// {}
147 m_itemLock.ExitWriteLock(); 147 m_itemLock.ExitWriteLock();
148 } 148 }
149 149
150 while (!m_itemLock.TryEnterReadLock(60000)) 150 while (!m_itemLock.TryEnterReadLock(60000))
151 { 151 {
152 m_log.Error("Thread lock detected while trying to aquire READ lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed."); 152 m_log.Error("Thread lock detected while trying to aquire READ lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed.");
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index b195bbe..1cc32b3 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Framework
73 private UUID _loadedID = UUID.Zero; 73 private UUID _loadedID = UUID.Zero;
74 74
75 private bool _ownerChanged = false; 75 private bool _ownerChanged = false;
76 76
77 public UUID AssetID { 77 public UUID AssetID {
78 get { 78 get {
79 return _assetID; 79 return _assetID;
diff --git a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
index e8ae728..5ad0030 100644
--- a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
+++ b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Tests
96 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FOOT_SIZE] = 45; 96 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FOOT_SIZE] = 45;
97 97
98 98
99 // head 99 // head
100 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_SIZE] = 255; 100 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_SIZE] = 255;
101 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_SQUASH_STRETCH_HEAD] = 0; // head stretch 101 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_SQUASH_STRETCH_HEAD] = 0; // head stretch
102 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_SHAPE] = 155; 102 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_SHAPE] = 155;
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Tests
106 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FACE_SHEAR] = 127; 106 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FACE_SHEAR] = 127;
107 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FOREHEAD_ANGLE] = 104; 107 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FOREHEAD_ANGLE] = 104;
108 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BIG_BROW] = 94; 108 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BIG_BROW] = 94;
109 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_PUFFY_UPPER_CHEEKS] = 0; // upper cheeks 109 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_PUFFY_UPPER_CHEEKS] = 0; // upper cheeks
110 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_DOUBLE_CHIN] = 122; // lower cheeks 110 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_DOUBLE_CHIN] = 122; // lower cheeks
111 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HIGH_CHEEK_BONES] = 130; 111 VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HIGH_CHEEK_BONES] = 130;
112 112
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Tests
232 /// <summary> 232 /// <summary>
233 /// Test to ensure that the serialization format is the same and the underlying types don't change without notice 233 /// Test to ensure that the serialization format is the same and the underlying types don't change without notice
234 /// oldSerialization is just a json serialization of the OSDMap packed for the AgentCircuitData. 234 /// oldSerialization is just a json serialization of the OSDMap packed for the AgentCircuitData.
235 /// The idea is that if the current json serializer cannot parse the old serialization, then the underlying types 235 /// The idea is that if the current json serializer cannot parse the old serialization, then the underlying types
236 /// have changed and are incompatible. 236 /// have changed and are incompatible.
237 /// </summary> 237 /// </summary>
238 [Test] 238 [Test]
@@ -319,7 +319,7 @@ namespace OpenSim.Framework.Tests
319 string str = OSDParser.SerializeJsonString(map); 319 string str = OSDParser.SerializeJsonString(map);
320 //System.Console.WriteLine(str); 320 //System.Console.WriteLine(str);
321 map2 = (OSDMap) OSDParser.DeserializeJson(str); 321 map2 = (OSDMap) OSDParser.DeserializeJson(str);
322 } 322 }
323 catch (System.NullReferenceException) 323 catch (System.NullReferenceException)
324 { 324 {
325 //spurious litjson errors :P 325 //spurious litjson errors :P
diff --git a/OpenSim/Framework/Tests/AgentCircuitManagerTests.cs b/OpenSim/Framework/Tests/AgentCircuitManagerTests.cs
index ae132c8..b572afc 100644
--- a/OpenSim/Framework/Tests/AgentCircuitManagerTests.cs
+++ b/OpenSim/Framework/Tests/AgentCircuitManagerTests.cs
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Tests
183 183
184 resp = agentCircuitManager.AuthenticateSession(UUID.Random(), AgentId1, circuitcode1); 184 resp = agentCircuitManager.AuthenticateSession(UUID.Random(), AgentId1, circuitcode1);
185 Assert.That(!resp.Authorised); 185 Assert.That(!resp.Authorised);
186 186
187 resp = agentCircuitManager.AuthenticateSession(SessionId1, AgentId1, circuitcode2); 187 resp = agentCircuitManager.AuthenticateSession(SessionId1, AgentId1, circuitcode2);
188 Assert.That(!resp.Authorised); 188 Assert.That(!resp.Authorised);
189 189
diff --git a/OpenSim/Framework/Tests/AnimationTests.cs b/OpenSim/Framework/Tests/AnimationTests.cs
index d8f17d0..daf8611 100644
--- a/OpenSim/Framework/Tests/AnimationTests.cs
+++ b/OpenSim/Framework/Tests/AnimationTests.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Framework.Tests
84 anim4.AnimID = anim2.AnimID; 84 anim4.AnimID = anim2.AnimID;
85 anim4.ObjectID = anim2.ObjectID; 85 anim4.ObjectID = anim2.ObjectID;
86 anim4.SequenceNum = anim2.SequenceNum; 86 anim4.SequenceNum = anim2.SequenceNum;
87 87
88 Assert.That(anim4.ObjectID == objUUID2 && anim4.AnimID == animUUID2 && anim4.SequenceNum == 1, "void constructor and manual field population failed to set the properties correctly."); 88 Assert.That(anim4.ObjectID == objUUID2 && anim4.AnimID == animUUID2 && anim4.SequenceNum == 1, "void constructor and manual field population failed to set the properties correctly.");
89 } 89 }
90 } 90 }
diff --git a/OpenSim/Framework/Tests/CacheTests.cs b/OpenSim/Framework/Tests/CacheTests.cs
index c709860..a92ff3c 100644
--- a/OpenSim/Framework/Tests/CacheTests.cs
+++ b/OpenSim/Framework/Tests/CacheTests.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Framework.Tests
70 Assert.That(citem == null, "Item should not be in Cache"); 70 Assert.That(citem == null, "Item should not be in Cache");
71 } 71 }
72 72
73 73
74 [Test] 74 [Test]
75 public void ExpireItemManually() 75 public void ExpireItemManually()
76 { 76 {
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Tests
96 cachedItem.Store(foo); 96 cachedItem.Store(foo);
97 cache.Store(cacheItemUUID.ToString(), cachedItem); 97 cache.Store(cacheItemUUID.ToString(), cachedItem);
98 cache.Clear(); 98 cache.Clear();
99 99
100 object citem = cache.Get(cacheItemUUID.ToString()); 100 object citem = cache.Get(cacheItemUUID.ToString());
101 Assert.That(citem == null, "Item should not be in Cache because we manually invalidated it"); 101 Assert.That(citem == null, "Item should not be in Cache because we manually invalidated it");
102 } 102 }
diff --git a/OpenSim/Framework/Tests/LocationTest.cs b/OpenSim/Framework/Tests/LocationTest.cs
index 3d5d1d2..5e84026 100644
--- a/OpenSim/Framework/Tests/LocationTest.cs
+++ b/OpenSim/Framework/Tests/LocationTest.cs
@@ -85,6 +85,6 @@ namespace OpenSim.Framework.Tests
85 Assert.That(TestLocation2.Equals(cln), "Cloned object failed .Equals(obj) Test"); 85 Assert.That(TestLocation2.Equals(cln), "Cloned object failed .Equals(obj) Test");
86 86
87 } 87 }
88 88
89 } 89 }
90} 90}
diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
index d8072c7..bde7056 100644
--- a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
+++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Tests
110 && position2.Center == position1.Center 110 && position2.Center == position1.Center
111 && position2.RegionHandle == position1.RegionHandle 111 && position2.RegionHandle == position1.RegionHandle
112 && position2.Far == position1.Far 112 && position2.Far == position1.Far
113 113
114 ,"Copy From ChildAgentDataUpdate failed"); 114 ,"Copy From ChildAgentDataUpdate failed");
115 115
116 position2 = new AgentPosition(); 116 position2 = new AgentPosition();
@@ -148,13 +148,13 @@ namespace OpenSim.Framework.Tests
148// string time = settings.LoadedCreationTime; 148// string time = settings.LoadedCreationTime;
149 149
150 Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire"); 150 Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire");
151 151
152 } 152 }
153 public void RegionSaveFired(RegionSettings settings) 153 public void RegionSaveFired(RegionSettings settings)
154 { 154 {
155 m_RegionSettingsOnSaveEventFired = true; 155 m_RegionSettingsOnSaveEventFired = true;
156 } 156 }
157 157
158 [Test] 158 [Test]
159 public void InventoryItemBaseConstructorTest01() 159 public void InventoryItemBaseConstructorTest01()
160 { 160 {
@@ -164,7 +164,7 @@ namespace OpenSim.Framework.Tests
164 164
165 UUID ItemID = UUID.Random(); 165 UUID ItemID = UUID.Random();
166 UUID OwnerID = UUID.Random(); 166 UUID OwnerID = UUID.Random();
167 167
168 InventoryItemBase b2 = new InventoryItemBase(ItemID); 168 InventoryItemBase b2 = new InventoryItemBase(ItemID);
169 Assert.That(b2.ID == ItemID, "ID constructor should create an inventory item with ID = ItemID"); 169 Assert.That(b2.ID == ItemID, "ID constructor should create an inventory item with ID = ItemID");
170 Assert.That(b2.Owner == UUID.Zero, "ID constructor should create an inventory item with Owner = UUID.Zero"); 170 Assert.That(b2.Owner == UUID.Zero, "ID constructor should create an inventory item with Owner = UUID.Zero");
@@ -268,7 +268,7 @@ namespace OpenSim.Framework.Tests
268 Assert.That(fld.ID == uuid1, "ID,Owner constructor failed to save value in ID field."); 268 Assert.That(fld.ID == uuid1, "ID,Owner constructor failed to save value in ID field.");
269 Assert.That(fld.Owner == uuid2, "ID,Owner constructor failed to save value in ID field."); 269 Assert.That(fld.Owner == uuid2, "ID,Owner constructor failed to save value in ID field.");
270 } 270 }
271 271
272 [Test] 272 [Test]
273 public void AsssetBaseConstructorTest01() 273 public void AsssetBaseConstructorTest01()
274 { 274 {
@@ -304,6 +304,6 @@ namespace OpenSim.Framework.Tests
304 Culture.SetCurrentCulture(); 304 Culture.SetCurrentCulture();
305 Assert.That(Thread.CurrentThread.CurrentCulture.Name == ci.Name, "SetCurrentCulture failed to set thread culture to en-US"); 305 Assert.That(Thread.CurrentThread.CurrentCulture.Name == ci.Name, "SetCurrentCulture failed to set thread culture to en-US");
306 306
307 } 307 }
308 } 308 }
309} 309}
diff --git a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs
index 82e13e5..cc30fb9 100644
--- a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs
+++ b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs
@@ -127,9 +127,9 @@ namespace OpenSim.Framework.Tests
127 127
128 int[] nonprimes = { 128 int[] nonprimes = {
129 4, 6, 8, 10, 14, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 129 4, 6, 8, 10, 14, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88,
130 96, 366, 372, 378, 382, 388, 396, 400, 408, 418, 420, 430, 432, 438, 442, 448, 456, 460, 462, 130 96, 366, 372, 378, 382, 388, 396, 400, 408, 418, 420, 430, 432, 438, 442, 448, 456, 460, 462,
131 466, 478, 486, 490, 498, 502, 508, 856, 858, 862, 876, 880, 882, 886, 906, 910, 918, 928, 936, 131 466, 478, 486, 490, 498, 502, 508, 856, 858, 862, 876, 880, 882, 886, 906, 910, 918, 928, 936,
132 940, 946, 952, 966, 970, 976, 982, 990, 996, 1008, 1740, 1746, 1752, 1758, 4650, 4656, 4662, 132 940, 946, 952, 966, 970, 976, 982, 990, 996, 1008, 1740, 1746, 1752, 1758, 4650, 4656, 4662,
133 4672, 4678, 4690, 7740, 7752, 7756, 7758, 7788, 7792, 7816, 7822, 7828, 7840, 7852, 7866, 7872, 133 4672, 4678, 4690, 7740, 7752, 7756, 7758, 7788, 7792, 7816, 7822, 7828, 7840, 7852, 7866, 7872,
134 7876, 7878, 7882, 7900, 7906, 7918 134 7876, 7878, 7882, 7900, 7906, 7918
135 }; 135 };
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs
index 14b9d2f..b3d79ee 100644
--- a/OpenSim/Framework/Tests/UtilTest.cs
+++ b/OpenSim/Framework/Tests/UtilTest.cs
@@ -233,7 +233,7 @@ namespace OpenSim.Framework.Tests
233 "application/vnd.ll.clothing", 233 "application/vnd.ll.clothing",
234 "application/vnd.ll.gesture" 234 "application/vnd.ll.gesture"
235 }; 235 };
236 236
237 for (int i=0;i<inventorytypes.Length;i++) 237 for (int i=0;i<inventorytypes.Length;i++)
238 { 238 {
239 Assert.AreEqual(invcontenttypes[i], SLUtil.SLInvTypeToContentType(inventorytypes[i]), 239 Assert.AreEqual(invcontenttypes[i], SLUtil.SLInvTypeToContentType(inventorytypes[i]),
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs
index f7069a5..d8fa629 100644
--- a/OpenSim/Framework/UserProfileData.cs
+++ b/OpenSim/Framework/UserProfileData.cs
@@ -159,12 +159,12 @@ namespace OpenSim.Framework
159 /// </summary> 159 /// </summary>
160 public virtual ulong HomeRegion 160 public virtual ulong HomeRegion
161 { 161 {
162 get 162 get
163 { 163 {
164 return Util.RegionWorldLocToHandle(Util.RegionToWorldLoc(m_homeRegionX), Util.RegionToWorldLoc(m_homeRegionY)); 164 return Util.RegionWorldLocToHandle(Util.RegionToWorldLoc(m_homeRegionX), Util.RegionToWorldLoc(m_homeRegionY));
165 // return Utils.UIntsToLong( m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize); 165 // return Utils.UIntsToLong( m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize);
166 } 166 }
167 167
168 set 168 set
169 { 169 {
170 uint regionWorldLocX, regionWorldLocY; 170 uint regionWorldLocX, regionWorldLocY;
@@ -212,7 +212,7 @@ namespace OpenSim.Framework
212 get { return m_surname; } 212 get { return m_surname; }
213 set { m_surname = value; } 213 set { m_surname = value; }
214 } 214 }
215 215
216 /// <value> 216 /// <value>
217 /// The concatentation of the various name components. 217 /// The concatentation of the various name components.
218 /// </value> 218 /// </value>
diff --git a/OpenSim/Framework/UserProfiles.cs b/OpenSim/Framework/UserProfiles.cs
index 4ed890b..7c6a6fe 100644
--- a/OpenSim/Framework/UserProfiles.cs
+++ b/OpenSim/Framework/UserProfiles.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework
50 public byte Flags = 0; 50 public byte Flags = 0;
51 public int Price = 0; 51 public int Price = 0;
52 } 52 }
53 53
54 public class UserProfileProperties 54 public class UserProfileProperties
55 { 55 {
56 public UUID UserId = UUID.Zero; 56 public UUID UserId = UUID.Zero;
@@ -68,7 +68,7 @@ namespace OpenSim.Framework
68 public UUID FirstLifeImageId = UUID.Zero; 68 public UUID FirstLifeImageId = UUID.Zero;
69 public string FirstLifeText = string.Empty; 69 public string FirstLifeText = string.Empty;
70 } 70 }
71 71
72 public class UserProfilePick 72 public class UserProfilePick
73 { 73 {
74 public UUID PickId = UUID.Zero; 74 public UUID PickId = UUID.Zero;
@@ -86,7 +86,7 @@ namespace OpenSim.Framework
86 public int SortOrder = 0; 86 public int SortOrder = 0;
87 public bool Enabled = false; 87 public bool Enabled = false;
88 } 88 }
89 89
90 public class UserProfileNotes 90 public class UserProfileNotes
91 { 91 {
92 public UUID UserId; 92 public UUID UserId;
@@ -101,7 +101,7 @@ namespace OpenSim.Framework
101 public bool Visible = false; 101 public bool Visible = false;
102 public string EMail = string.Empty; 102 public string EMail = string.Empty;
103 } 103 }
104 104
105 public class UserAccountProperties 105 public class UserAccountProperties
106 { 106 {
107 public string EmailAddress = string.Empty; 107 public string EmailAddress = string.Empty;
@@ -110,13 +110,13 @@ namespace OpenSim.Framework
110 public string Password = string.Empty; 110 public string Password = string.Empty;
111 public string UserId = string.Empty; 111 public string UserId = string.Empty;
112 } 112 }
113 113
114 public class UserAccountAuth 114 public class UserAccountAuth
115 { 115 {
116 public string UserId = UUID.Zero.ToString(); 116 public string UserId = UUID.Zero.ToString();
117 public string Password = string.Empty; 117 public string Password = string.Empty;
118 } 118 }
119 119
120 public class UserAppData 120 public class UserAppData
121 { 121 {
122 public string TagId = string.Empty; 122 public string TagId = string.Empty;
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 89cf045..6d679f2 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Framework
59{ 59{
60 [Flags] 60 [Flags]
61 public enum PermissionMask : uint 61 public enum PermissionMask : uint
62 { 62 {
63 None = 0, 63 None = 0,
64 64
65 // folded perms 65 // folded perms
@@ -112,7 +112,7 @@ namespace OpenSim.Framework
112 public STPStartInfo STPStartInfo { get; set; } 112 public STPStartInfo STPStartInfo { get; set; }
113 public WIGStartInfo WIGStartInfo { get; set; } 113 public WIGStartInfo WIGStartInfo { get; set; }
114 public bool IsIdle { get; set; } 114 public bool IsIdle { get; set; }
115 public bool IsShuttingDown { get; set; } 115 public bool IsShuttingDown { get; set; }
116 public int MaxThreads { get; set; } 116 public int MaxThreads { get; set; }
117 public int MinThreads { get; set; } 117 public int MinThreads { get; set; }
118 public int InUseThreads { get; set; } 118 public int InUseThreads { get; set; }
@@ -230,7 +230,7 @@ namespace OpenSim.Framework
230 public static Encoding UTF8NoBomEncoding = new UTF8Encoding(false); 230 public static Encoding UTF8NoBomEncoding = new UTF8Encoding(false);
231 231
232 /// <value> 232 /// <value>
233 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) 233 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards)
234 /// </value> 234 /// </value>
235 public static UUID BLANK_TEXTURE_UUID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); 235 public static UUID BLANK_TEXTURE_UUID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
236 236
@@ -280,7 +280,7 @@ namespace OpenSim.Framework
280 /// </summary> 280 /// </summary>
281 /// <param name="a">A 3d vector</param> 281 /// <param name="a">A 3d vector</param>
282 /// <returns>A new vector which is normalized form of the vector</returns> 282 /// <returns>A new vector which is normalized form of the vector</returns>
283 283
284 public static Vector3 GetNormalizedVector(Vector3 a) 284 public static Vector3 GetNormalizedVector(Vector3 a)
285 { 285 {
286 Vector3 v = new Vector3(a.X, a.Y, a.Z); 286 Vector3 v = new Vector3(a.X, a.Y, a.Z);
@@ -371,7 +371,7 @@ namespace OpenSim.Framework
371 // Regions are identified with a 'handle' made up of its world coordinates packed into a ulong. 371 // Regions are identified with a 'handle' made up of its world coordinates packed into a ulong.
372 // Region handles are based on the coordinate of the region corner with lower X and Y 372 // Region handles are based on the coordinate of the region corner with lower X and Y
373 // var regions need more work than this to get that right corner from a generic world position 373 // var regions need more work than this to get that right corner from a generic world position
374 // this corner must be on a grid point 374 // this corner must be on a grid point
375 public static ulong RegionWorldLocToHandle(uint X, uint Y) 375 public static ulong RegionWorldLocToHandle(uint X, uint Y)
376 { 376 {
377 ulong handle = X & 0xffffff00; // make sure it matchs grid coord points. 377 ulong handle = X & 0xffffff00; // make sure it matchs grid coord points.
@@ -450,7 +450,7 @@ namespace OpenSim.Framework
450 450
451 string host; 451 string host;
452 uint port = 80; 452 uint port = 80;
453 453
454 string[] parts = inputName.Split(new char[] { ':' }); 454 string[] parts = inputName.Split(new char[] { ':' });
455 int indx; 455 int indx;
456 if(parts.Length == 0) 456 if(parts.Length == 0)
@@ -470,7 +470,7 @@ namespace OpenSim.Framework
470 else 470 else
471 { 471 {
472 host = parts[0]; 472 host = parts[0];
473 473
474 if (parts.Length >= 2) 474 if (parts.Length >= 2)
475 { 475 {
476 indx = parts[1].IndexOf('/'); 476 indx = parts[1].IndexOf('/');
@@ -875,8 +875,8 @@ namespace OpenSim.Framework
875 /// <param name="newx">New region x-coord</param> 875 /// <param name="newx">New region x-coord</param>
876 /// <param name="oldy">Old region y-coord</param> 876 /// <param name="oldy">Old region y-coord</param>
877 /// <param name="newy">New region y-coord</param> 877 /// <param name="newy">New region y-coord</param>
878 /// <returns></returns> 878 /// <returns></returns>
879 public static bool IsOutsideView(float drawdist, uint oldx, uint newx, uint oldy, uint newy, 879 public static bool IsOutsideView(float drawdist, uint oldx, uint newx, uint oldy, uint newy,
880 int oldsizex, int oldsizey, int newsizex, int newsizey) 880 int oldsizex, int oldsizey, int newsizex, int newsizey)
881 { 881 {
882 // we still need to make sure we see new region 1stNeighbors 882 // we still need to make sure we see new region 1stNeighbors
@@ -1267,7 +1267,7 @@ namespace OpenSim.Framework
1267 1267
1268 /// <summary> 1268 /// <summary>
1269 /// Gets the value of a configuration variable by looking into 1269 /// Gets the value of a configuration variable by looking into
1270 /// multiple sections in order. The latter sections overwrite 1270 /// multiple sections in order. The latter sections overwrite
1271 /// any values previously found. 1271 /// any values previously found.
1272 /// </summary> 1272 /// </summary>
1273 /// <typeparam name="T">Type of the variable</typeparam> 1273 /// <typeparam name="T">Type of the variable</typeparam>
@@ -1282,7 +1282,7 @@ namespace OpenSim.Framework
1282 1282
1283 /// <summary> 1283 /// <summary>
1284 /// Gets the value of a configuration variable by looking into 1284 /// Gets the value of a configuration variable by looking into
1285 /// multiple sections in order. The latter sections overwrite 1285 /// multiple sections in order. The latter sections overwrite
1286 /// any values previously found. 1286 /// any values previously found.
1287 /// </summary> 1287 /// </summary>
1288 /// <remarks> 1288 /// <remarks>
@@ -1338,7 +1338,7 @@ namespace OpenSim.Framework
1338 ConfigSource.ExpandKeyValues(); 1338 ConfigSource.ExpandKeyValues();
1339 } 1339 }
1340 } 1340 }
1341 1341
1342 public static T ReadSettingsFromIniFile<T>(IConfig config, T settingsClass) 1342 public static T ReadSettingsFromIniFile<T>(IConfig config, T settingsClass)
1343 { 1343 {
1344 Type settingsType = settingsClass.GetType(); 1344 Type settingsType = settingsClass.GetType();
@@ -1449,7 +1449,7 @@ namespace OpenSim.Framework
1449 1449
1450 if (File.Exists(configFile)) 1450 if (File.Exists(configFile))
1451 { 1451 {
1452 // Merge 1452 // Merge
1453 config.Merge(new IniConfigSource(configFile)); 1453 config.Merge(new IniConfigSource(configFile));
1454 config.ExpandKeyValues(); 1454 config.ExpandKeyValues();
1455 configFilePath = configFile; 1455 configFilePath = configFile;
@@ -1598,7 +1598,7 @@ namespace OpenSim.Framework
1598 } 1598 }
1599 1599
1600 memory.Position = 0; 1600 memory.Position = 0;
1601 1601
1602 byte[] compressed = new byte[memory.Length]; 1602 byte[] compressed = new byte[memory.Length];
1603 memory.Read(compressed, 0, compressed.Length); 1603 memory.Read(compressed, 0, compressed.Length);
1604 1604
@@ -1645,7 +1645,7 @@ namespace OpenSim.Framework
1645 const int readSize = 256; 1645 const int readSize = 256;
1646 byte[] buffer = new byte[readSize]; 1646 byte[] buffer = new byte[readSize];
1647 MemoryStream ms = new MemoryStream(); 1647 MemoryStream ms = new MemoryStream();
1648 1648
1649 int count = inputStream.Read(buffer, 0, readSize); 1649 int count = inputStream.Read(buffer, 0, readSize);
1650 1650
1651 while (count > 0) 1651 while (count > 0)
@@ -1731,10 +1731,10 @@ namespace OpenSim.Framework
1731 regionHandle = Utils.BytesToUInt64(bytes); 1731 regionHandle = Utils.BytesToUInt64(bytes);
1732 x = Utils.BytesToUInt(bytes, 8) & 0xffff; 1732 x = Utils.BytesToUInt(bytes, 8) & 0xffff;
1733 y = Utils.BytesToUInt(bytes, 12) & 0xffff; 1733 y = Utils.BytesToUInt(bytes, 12) & 0xffff;
1734 // validation may fail, just reducing the odds of using a real UUID as encoded parcel 1734 // validation may fail, just reducing the odds of using a real UUID as encoded parcel
1735 return ( bytes[0] == 0 && bytes[4] == 0 && // handler x,y multiples of 256 1735 return ( bytes[0] == 0 && bytes[4] == 0 && // handler x,y multiples of 256
1736 bytes[9] < 64 && bytes[13] < 64 && // positions < 16km 1736 bytes[9] < 64 && bytes[13] < 64 && // positions < 16km
1737 bytes[14] == 0 && bytes[15] == 0); 1737 bytes[14] == 0 && bytes[15] == 0);
1738 } 1738 }
1739 1739
1740 public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y, out uint z) 1740 public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y, out uint z)
@@ -1757,7 +1757,7 @@ namespace OpenSim.Framework
1757 x += rx; 1757 x += rx;
1758 y += ry; 1758 y += ry;
1759 } 1759 }
1760 1760
1761 /// <summary> 1761 /// <summary>
1762 /// Get operating system information if available. Returns only the first 45 characters of information 1762 /// Get operating system information if available. Returns only the first 45 characters of information
1763 /// </summary> 1763 /// </summary>
@@ -1776,12 +1776,12 @@ namespace OpenSim.Framework
1776// { 1776// {
1777// os = ReadEtcIssue(); 1777// os = ReadEtcIssue();
1778// } 1778// }
1779// 1779//
1780// if (os.Length > 45) 1780// if (os.Length > 45)
1781// { 1781// {
1782// os = os.Substring(0, 45); 1782// os = os.Substring(0, 45);
1783// } 1783// }
1784 1784
1785 return os; 1785 return os;
1786 } 1786 }
1787 1787
@@ -1993,7 +1993,7 @@ namespace OpenSim.Framework
1993 vol = vcomps[0]; 1993 vol = vcomps[0];
1994 } 1994 }
1995 } 1995 }
1996 1996
1997 string[] comps = path.Split(new char[] {Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar}, StringSplitOptions.RemoveEmptyEntries); 1997 string[] comps = path.Split(new char[] {Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar}, StringSplitOptions.RemoveEmptyEntries);
1998 1998
1999 // Glob 1999 // Glob
@@ -2095,7 +2095,7 @@ namespace OpenSim.Framework
2095 2095
2096 if (!str.EndsWith("\0")) 2096 if (!str.EndsWith("\0"))
2097 str += "\0"; 2097 str += "\0";
2098 2098
2099 // Because this is UTF-8 encoding and not ASCII, it's possible we 2099 // Because this is UTF-8 encoding and not ASCII, it's possible we
2100 // might have gotten an oversized array even after the string trim 2100 // might have gotten an oversized array even after the string trim
2101 byte[] data = UTF8.GetBytes(str); 2101 byte[] data = UTF8.GetBytes(str);
@@ -2354,7 +2354,7 @@ namespace OpenSim.Framework
2354 throw new NotImplementedException(); 2354 throw new NotImplementedException();
2355 } 2355 }
2356 } 2356 }
2357 2357
2358 /// <summary> 2358 /// <summary>
2359 /// Additional information about threads in the main thread pool. Used to time how long the 2359 /// Additional information about threads in the main thread pool. Used to time how long the
2360 /// thread has been running, and abort it if it has timed-out. 2360 /// thread has been running, and abort it if it has timed-out.
@@ -2365,7 +2365,7 @@ namespace OpenSim.Framework
2365 public string StackTrace { get; set; } 2365 public string StackTrace { get; set; }
2366 private string context; 2366 private string context;
2367 public bool LogThread { get; set; } 2367 public bool LogThread { get; set; }
2368 2368
2369 public IWorkItemResult WorkItem { get; set; } 2369 public IWorkItemResult WorkItem { get; set; }
2370 public Thread Thread { get; set; } 2370 public Thread Thread { get; set; }
2371 public bool Running { get; set; } 2371 public bool Running { get; set; }
@@ -2470,7 +2470,7 @@ namespace OpenSim.Framework
2470 public static Dictionary<string, int> GetFireAndForgetCallsMade() 2470 public static Dictionary<string, int> GetFireAndForgetCallsMade()
2471 { 2471 {
2472 return new Dictionary<string, int>(m_fireAndForgetCallsMade); 2472 return new Dictionary<string, int>(m_fireAndForgetCallsMade);
2473 } 2473 }
2474 2474
2475 private static Dictionary<string, int> m_fireAndForgetCallsMade = new Dictionary<string, int>(); 2475 private static Dictionary<string, int> m_fireAndForgetCallsMade = new Dictionary<string, int>();
2476 2476
@@ -2490,7 +2490,7 @@ namespace OpenSim.Framework
2490 { 2490 {
2491 FireAndForget(callback, obj, null); 2491 FireAndForget(callback, obj, null);
2492 } 2492 }
2493 2493
2494 public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context) 2494 public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context)
2495 { 2495 {
2496 Interlocked.Increment(ref numTotalThreadFuncsCalled); 2496 Interlocked.Increment(ref numTotalThreadFuncsCalled);
@@ -2511,19 +2511,19 @@ namespace OpenSim.Framework
2511 WaitCallback realCallback; 2511 WaitCallback realCallback;
2512 2512
2513 bool loggingEnabled = LogThreadPool > 0; 2513 bool loggingEnabled = LogThreadPool > 0;
2514 2514
2515 long threadFuncNum = Interlocked.Increment(ref nextThreadFuncNum); 2515 long threadFuncNum = Interlocked.Increment(ref nextThreadFuncNum);
2516 ThreadInfo threadInfo = new ThreadInfo(threadFuncNum, context); 2516 ThreadInfo threadInfo = new ThreadInfo(threadFuncNum, context);
2517 2517
2518 if (FireAndForgetMethod == FireAndForgetMethod.RegressionTest) 2518 if (FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
2519 { 2519 {
2520 // If we're running regression tests, then we want any exceptions to rise up to the test code. 2520 // If we're running regression tests, then we want any exceptions to rise up to the test code.
2521 realCallback = 2521 realCallback =
2522 o => 2522 o =>
2523 { 2523 {
2524 Culture.SetCurrentCulture(); 2524 Culture.SetCurrentCulture();
2525 callback(o); 2525 callback(o);
2526 2526
2527 if (context != null) 2527 if (context != null)
2528 m_fireAndForgetCallsInProgress[context]--; 2528 m_fireAndForgetCallsInProgress[context]--;
2529 }; 2529 };
@@ -2666,7 +2666,7 @@ namespace OpenSim.Framework
2666 if (stackTrace.Contains("BeginFireQueueEmpty")) 2666 if (stackTrace.Contains("BeginFireQueueEmpty"))
2667 return false; 2667 return false;
2668 } 2668 }
2669 2669
2670 return true; 2670 return true;
2671 } 2671 }
2672 2672
@@ -2679,7 +2679,7 @@ namespace OpenSim.Framework
2679 { 2679 {
2680 string src = Environment.StackTrace; 2680 string src = Environment.StackTrace;
2681 string[] lines = src.Split(new string[] { Environment.NewLine }, StringSplitOptions.None); 2681 string[] lines = src.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
2682 2682
2683 StringBuilder dest = new StringBuilder(src.Length); 2683 StringBuilder dest = new StringBuilder(src.Length);
2684 2684
2685 bool started = false; 2685 bool started = false;
@@ -2724,11 +2724,11 @@ namespace OpenSim.Framework
2724 /// trace. And pausing another thread can cause a deadlock. This method attempts to 2724 /// trace. And pausing another thread can cause a deadlock. This method attempts to
2725 /// avoid deadlock by using a short timeout (200ms), after which it gives up and 2725 /// avoid deadlock by using a short timeout (200ms), after which it gives up and
2726 /// returns 'null' instead of the stack trace. 2726 /// returns 'null' instead of the stack trace.
2727 /// 2727 ///
2728 /// Take from: http://stackoverflow.com/a/14935378 2728 /// Take from: http://stackoverflow.com/a/14935378
2729 /// 2729 ///
2730 /// WARNING: this doesn't work in Mono. See https://bugzilla.novell.com/show_bug.cgi?id=571691 2730 /// WARNING: this doesn't work in Mono. See https://bugzilla.novell.com/show_bug.cgi?id=571691
2731 /// 2731 ///
2732 /// </remarks> 2732 /// </remarks>
2733 /// <returns>The stack trace, or null if failed to get it</returns> 2733 /// <returns>The stack trace, or null if failed to get it</returns>
2734 private static StackTrace GetStackTrace(Thread targetThread) 2734 private static StackTrace GetStackTrace(Thread targetThread)
@@ -2829,7 +2829,7 @@ namespace OpenSim.Framework
2829 /// <summary> 2829 /// <summary>
2830 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive 2830 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
2831 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap 2831 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
2832 /// for the callers. 2832 /// for the callers.
2833 /// This trims it to a 12 day interval so don't let your frame time get too long. 2833 /// This trims it to a 12 day interval so don't let your frame time get too long.
2834 /// </summary> 2834 /// </summary>
2835 /// <returns></returns> 2835 /// <returns></returns>
@@ -3186,7 +3186,7 @@ namespace OpenSim.Framework
3186 if (parts.Length == 2) 3186 if (parts.Length == 2)
3187 return CalcUniversalIdentifier(id, agentsURI, parts[0] + " " + parts[1]); 3187 return CalcUniversalIdentifier(id, agentsURI, parts[0] + " " + parts[1]);
3188 } 3188 }
3189 3189
3190 return CalcUniversalIdentifier(id, agentsURI, firstName + " " + lastName); 3190 return CalcUniversalIdentifier(id, agentsURI, firstName + " " + lastName);
3191 } 3191 }
3192 3192
@@ -3286,10 +3286,10 @@ namespace OpenSim.Framework
3286 3286
3287 public virtual int Count 3287 public virtual int Count
3288 { 3288 {
3289 get 3289 get
3290 { 3290 {
3291 lock (m_syncRoot) 3291 lock (m_syncRoot)
3292 return m_highQueue.Count + m_lowQueue.Count; 3292 return m_highQueue.Count + m_lowQueue.Count;
3293 } 3293 }
3294 } 3294 }
3295 3295
diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs
index 7bb0351..1e6efe5 100644
--- a/OpenSim/Framework/VersionInfo.cs
+++ b/OpenSim/Framework/VersionInfo.cs
@@ -58,10 +58,10 @@ namespace OpenSim
58 } 58 }
59 59
60 public const int VERSIONINFO_VERSION_LENGTH = 27; 60 public const int VERSIONINFO_VERSION_LENGTH = 27;
61 61
62 /// <value> 62 /// <value>
63 /// This is the external interface version. It is separate from the OpenSimulator project version. 63 /// This is the external interface version. It is separate from the OpenSimulator project version.
64 /// 64 ///
65 /// </value> 65 /// </value>
66 /// Commented because it's not used anymore, see below for new 66 /// Commented because it's not used anymore, see below for new
67 /// versioning method. 67 /// versioning method.
@@ -70,18 +70,18 @@ namespace OpenSim
70 /// <summary> 70 /// <summary>
71 /// This rules versioning regarding teleports, and compatibility between simulators in that regard. 71 /// This rules versioning regarding teleports, and compatibility between simulators in that regard.
72 /// </summary> 72 /// </summary>
73 /// 73 ///
74 /// <remarks> 74 /// <remarks>
75 /// The protocol version that we will use for outgoing transfers 75 /// The protocol version that we will use for outgoing transfers
76 /// Valid values are 76 /// Valid values are
77 /// "SIMULATION/0.3" 77 /// "SIMULATION/0.3"
78 /// - This is the latest, and it supports teleports to variable-sized regions 78 /// - This is the latest, and it supports teleports to variable-sized regions
79 /// - Older versions can teleport to this one, but only if the destination region 79 /// - Older versions can teleport to this one, but only if the destination region
80 /// is 256x256 80 /// is 256x256
81 /// "SIMULATION/0.2" 81 /// "SIMULATION/0.2"
82 /// - A source simulator which only implements "SIMULATION/0.1" can still teleport here 82 /// - A source simulator which only implements "SIMULATION/0.1" can still teleport here
83 /// - this protocol is more efficient than "SIMULATION/0.1" 83 /// - this protocol is more efficient than "SIMULATION/0.1"
84 /// "SIMULATION/0.1" 84 /// "SIMULATION/0.1"
85 /// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. 85 /// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
86 /// </remarks> 86 /// </remarks>
87 public readonly static float SimulationServiceVersionAcceptedMin = 0.3f; 87 public readonly static float SimulationServiceVersionAcceptedMin = 0.3f;
diff --git a/OpenSim/Framework/WearableCacheItem.cs b/OpenSim/Framework/WearableCacheItem.cs
index 966a6bc..ccaf69e 100644
--- a/OpenSim/Framework/WearableCacheItem.cs
+++ b/OpenSim/Framework/WearableCacheItem.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework
47 WearableCacheItem[] retitems = new WearableCacheItem[itemmax]; 47 WearableCacheItem[] retitems = new WearableCacheItem[itemmax];
48 for (uint i=0;i<itemmax;i++) 48 for (uint i=0;i<itemmax;i++)
49 retitems[i] = new WearableCacheItem() {CacheId = UUID.Zero, TextureID = UUID.Zero, TextureIndex = i}; 49 retitems[i] = new WearableCacheItem() {CacheId = UUID.Zero, TextureID = UUID.Zero, TextureIndex = i};
50 return retitems; 50 return retitems;
51 } 51 }
52 52
53 public static WearableCacheItem[] FromOSD(OSD pInput, IAssetCache dataCache) 53 public static WearableCacheItem[] FromOSD(OSD pInput, IAssetCache dataCache)
@@ -64,7 +64,7 @@ namespace OpenSim.Framework
64 CacheId = item["cacheid"].AsUUID(), 64 CacheId = item["cacheid"].AsUUID(),
65 TextureID = item["textureid"].AsUUID() 65 TextureID = item["textureid"].AsUUID()
66 }); 66 });
67 67
68 if (dataCache != null && item.ContainsKey("assetdata")) 68 if (dataCache != null && item.ContainsKey("assetdata"))
69 { 69 {
70 AssetBase asset = new AssetBase(item["textureid"].AsUUID(),"BakedTexture",(sbyte)AssetType.Texture,UUID.Zero.ToString()); 70 AssetBase asset = new AssetBase(item["textureid"].AsUUID(),"BakedTexture",(sbyte)AssetType.Texture,UUID.Zero.ToString());
@@ -181,7 +181,7 @@ namespace OpenSim.Framework
181 pcache[idx].TextureAsset = asset; 181 pcache[idx].TextureAsset = asset;
182 } 182 }
183 else 183 else
184 */ 184 */
185 pcache[idx].TextureAsset = null; 185 pcache[idx].TextureAsset = null;
186 } 186 }
187 } 187 }
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index f927e69..12f58fe 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -247,7 +247,7 @@ namespace OpenSim.Framework
247 request.MaximumAutomaticRedirections = 10; 247 request.MaximumAutomaticRedirections = 10;
248 request.ReadWriteTimeout = timeout / 4; 248 request.ReadWriteTimeout = timeout / 4;
249 request.Headers[OSHeaderRequestID] = reqnum.ToString(); 249 request.Headers[OSHeaderRequestID] = reqnum.ToString();
250 250
251 // If there is some input, write it into the request 251 // If there is some input, write it into the request
252 if (data != null) 252 if (data != null)
253 { 253 {
@@ -261,7 +261,7 @@ namespace OpenSim.Framework
261 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); 261 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer);
262 262
263 request.ContentType = rpc ? "application/json-rpc" : "application/json"; 263 request.ContentType = rpc ? "application/json-rpc" : "application/json";
264 264
265 if (compressed) 265 if (compressed)
266 { 266 {
267 request.Headers["X-Content-Encoding"] = "gzip"; // can't set "Content-Encoding" because old OpenSims fail if they get an unrecognized Content-Encoding 267 request.Headers["X-Content-Encoding"] = "gzip"; // can't set "Content-Encoding" because old OpenSims fail if they get an unrecognized Content-Encoding
@@ -294,7 +294,7 @@ namespace OpenSim.Framework
294 requestStream.Write(buffer, 0, buffer.Length); //Send it 294 requestStream.Write(buffer, 0, buffer.Length); //Send it
295 } 295 }
296 } 296 }
297 297
298 // capture how much time was spent writing, this may seem silly 298 // capture how much time was spent writing, this may seem silly
299 // but with the number concurrent requests, this often blocks 299 // but with the number concurrent requests, this often blocks
300 tickdata = Util.EnvironmentTickCountSubtract(tickstart); 300 tickdata = Util.EnvironmentTickCountSubtract(tickstart);
@@ -354,7 +354,7 @@ namespace OpenSim.Framework
354 reqnum, tickdiff, tickdata); 354 reqnum, tickdiff, tickdata);
355 } 355 }
356 } 356 }
357 357
358 m_log.DebugFormat( 358 m_log.DebugFormat(
359 "[LOGHTTP]: JSON-RPC request {0} {1} to {2} FAILED: {3}", reqnum, method, url, errorMessage); 359 "[LOGHTTP]: JSON-RPC request {0} {1} to {2} FAILED: {3}", reqnum, method, url, errorMessage);
360 360
@@ -378,7 +378,7 @@ namespace OpenSim.Framework
378 result["success"] = OSD.FromBoolean(true); 378 result["success"] = OSD.FromBoolean(true);
379 result["_RawResult"] = OSD.FromString(response); 379 result["_RawResult"] = OSD.FromString(response);
380 result["_Result"] = new OSDMap(); 380 result["_Result"] = new OSDMap();
381 381
382 if (response.Equals("true",System.StringComparison.OrdinalIgnoreCase)) 382 if (response.Equals("true",System.StringComparison.OrdinalIgnoreCase))
383 return result; 383 return result;
384 384
@@ -389,7 +389,7 @@ namespace OpenSim.Framework
389 return result; 389 return result;
390 } 390 }
391 391
392 try 392 try
393 { 393 {
394 OSD responseOSD = OSDParser.Deserialize(response); 394 OSD responseOSD = OSDParser.Deserialize(response);
395 if (responseOSD.Type == OSDType.Map) 395 if (responseOSD.Type == OSDType.Map)
@@ -403,10 +403,10 @@ namespace OpenSim.Framework
403 // don't need to treat this as an error... we're just guessing anyway 403 // don't need to treat this as an error... we're just guessing anyway
404// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message); 404// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
405 } 405 }
406 406
407 return result; 407 return result;
408 } 408 }
409 409
410 #endregion JSONRequest 410 #endregion JSONRequest
411 411
412 #region FormRequest 412 #region FormRequest
@@ -419,7 +419,7 @@ namespace OpenSim.Framework
419 { 419 {
420 return ServiceFormRequest(url,data, 30000); 420 return ServiceFormRequest(url,data, 30000);
421 } 421 }
422 422
423 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) 423 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
424 { 424 {
425 lock (EndPointLock(url)) 425 lock (EndPointLock(url))
@@ -436,7 +436,7 @@ namespace OpenSim.Framework
436 if (DebugLevel >= 3) 436 if (DebugLevel >= 3)
437 m_log.DebugFormat("[LOGHTTP]: HTTP OUT {0} ServiceForm '{1}' to {2}", 437 m_log.DebugFormat("[LOGHTTP]: HTTP OUT {0} ServiceForm '{1}' to {2}",
438 reqnum, method, url); 438 reqnum, method, url);
439 439
440 string errorMessage = "unknown error"; 440 string errorMessage = "unknown error";
441 int tickstart = Util.EnvironmentTickCount(); 441 int tickstart = Util.EnvironmentTickCount();
442 int tickdata = 0; 442 int tickdata = 0;
@@ -451,7 +451,7 @@ namespace OpenSim.Framework
451 request.MaximumAutomaticRedirections = 10; 451 request.MaximumAutomaticRedirections = 10;
452 request.ReadWriteTimeout = timeout / 4; 452 request.ReadWriteTimeout = timeout / 4;
453 request.Headers[OSHeaderRequestID] = reqnum.ToString(); 453 request.Headers[OSHeaderRequestID] = reqnum.ToString();
454 454
455 if (data != null) 455 if (data != null)
456 { 456 {
457 queryString = BuildQueryString(data); 457 queryString = BuildQueryString(data);
@@ -460,7 +460,7 @@ namespace OpenSim.Framework
460 LogOutgoingDetail("SEND", reqnum, queryString); 460 LogOutgoingDetail("SEND", reqnum, queryString);
461 461
462 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString); 462 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString);
463 463
464 request.ContentLength = buffer.Length; 464 request.ContentLength = buffer.Length;
465 request.ContentType = "application/x-www-form-urlencoded"; 465 request.ContentType = "application/x-www-form-urlencoded";
466 using (Stream requestStream = request.GetRequestStream()) 466 using (Stream requestStream = request.GetRequestStream())
@@ -538,7 +538,7 @@ namespace OpenSim.Framework
538 } 538 }
539 539
540 #endregion FormRequest 540 #endregion FormRequest
541 541
542 #region Uri 542 #region Uri
543 543
544 /// <summary> 544 /// <summary>
@@ -591,7 +591,7 @@ namespace OpenSim.Framework
591 } 591 }
592 592
593 /// <summary> 593 /// <summary>
594 /// Appends a query string to a Uri that may or may not have existing 594 /// Appends a query string to a Uri that may or may not have existing
595 /// query parameters 595 /// query parameters
596 /// </summary> 596 /// </summary>
597 /// <param name="uri">Uri to append the query to</param> 597 /// <param name="uri">Uri to append the query to</param>
@@ -643,7 +643,7 @@ namespace OpenSim.Framework
643 } 643 }
644 644
645 /// <summary> 645 /// <summary>
646 /// 646 ///
647 /// </summary> 647 /// </summary>
648 /// <param name="collection"></param> 648 /// <param name="collection"></param>
649 /// <param name="key"></param> 649 /// <param name="key"></param>
@@ -662,12 +662,12 @@ namespace OpenSim.Framework
662 #region Stream 662 #region Stream
663 663
664 /// <summary> 664 /// <summary>
665 /// Copies the contents of one stream to another, starting at the 665 /// Copies the contents of one stream to another, starting at the
666 /// current position of each stream 666 /// current position of each stream
667 /// </summary> 667 /// </summary>
668 /// <param name="copyFrom">The stream to copy from, at the position 668 /// <param name="copyFrom">The stream to copy from, at the position
669 /// where copying should begin</param> 669 /// where copying should begin</param>
670 /// <param name="copyTo">The stream to copy to, at the position where 670 /// <param name="copyTo">The stream to copy to, at the position where
671 /// bytes should be written</param> 671 /// bytes should be written</param>
672 /// <param name="maximumBytesToCopy">The maximum bytes to copy</param> 672 /// <param name="maximumBytesToCopy">The maximum bytes to copy</param>
673 /// <returns>The total number of bytes copied</returns> 673 /// <returns>The total number of bytes copied</returns>
@@ -811,7 +811,7 @@ namespace OpenSim.Framework
811 /// </param> 811 /// </param>
812 /// <param name="maxConnections"></param> 812 /// <param name="maxConnections"></param>
813 /// <returns> 813 /// <returns>
814 /// The response. If there was an internal exception or the request timed out, 814 /// The response. If there was an internal exception or the request timed out,
815 /// then the default(TResponse) is returned. 815 /// then the default(TResponse) is returned.
816 /// </returns> 816 /// </returns>
817 public static void MakeRequest<TRequest, TResponse>(string verb, 817 public static void MakeRequest<TRequest, TResponse>(string verb,
@@ -909,7 +909,7 @@ namespace OpenSim.Framework
909 // If the server returns a 404, this appears to trigger a System.Net.WebException even though that isn't 909 // If the server returns a 404, this appears to trigger a System.Net.WebException even though that isn't
910 // documented in MSDN 910 // documented in MSDN
911 using (WebResponse response = request.EndGetResponse(res2)) 911 using (WebResponse response = request.EndGetResponse(res2))
912 { 912 {
913 try 913 try
914 { 914 {
915 using (Stream respStream = response.GetResponseStream()) 915 using (Stream respStream = response.GetResponseStream())
@@ -930,7 +930,7 @@ namespace OpenSim.Framework
930 if (e.Response is HttpWebResponse) 930 if (e.Response is HttpWebResponse)
931 { 931 {
932 using (HttpWebResponse httpResponse = (HttpWebResponse)e.Response) 932 using (HttpWebResponse httpResponse = (HttpWebResponse)e.Response)
933 { 933 {
934 if (httpResponse.StatusCode != HttpStatusCode.NotFound) 934 if (httpResponse.StatusCode != HttpStatusCode.NotFound)
935 { 935 {
936 // We don't appear to be handling any other status codes, so log these feailures to that 936 // We don't appear to be handling any other status codes, so log these feailures to that
@@ -955,7 +955,7 @@ namespace OpenSim.Framework
955 "[ASYNC REQUEST]: Request {0} {1} failed with exception {2}{3}", 955 "[ASYNC REQUEST]: Request {0} {1} failed with exception {2}{3}",
956 verb, requestUrl, e.Message, e.StackTrace); 956 verb, requestUrl, e.Message, e.StackTrace);
957 } 957 }
958 958
959 // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString()); 959 // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString());
960 960
961 try 961 try
@@ -968,7 +968,7 @@ namespace OpenSim.Framework
968 "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}{3}", 968 "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}{3}",
969 verb, requestUrl, e.Message, e.StackTrace); 969 verb, requestUrl, e.Message, e.StackTrace);
970 } 970 }
971 971
972 }, null); 972 }, null);
973 } 973 }
974 974
@@ -997,7 +997,7 @@ namespace OpenSim.Framework
997 } 997 }
998 } 998 }
999 finally 999 finally
1000 { 1000 {
1001 if (buffer != null) 1001 if (buffer != null)
1002 buffer.Dispose(); 1002 buffer.Dispose();
1003 } 1003 }
@@ -1168,7 +1168,7 @@ namespace OpenSim.Framework
1168 /// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) 1168 /// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds)
1169 /// </param> 1169 /// </param>
1170 /// <returns> 1170 /// <returns>
1171 /// The response. If there was an internal exception or the request timed out, 1171 /// The response. If there was an internal exception or the request timed out,
1172 /// then the default(TResponse) is returned. 1172 /// then the default(TResponse) is returned.
1173 /// </returns> 1173 /// </returns>
1174 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout) 1174 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
@@ -1191,7 +1191,7 @@ namespace OpenSim.Framework
1191 /// </param> 1191 /// </param>
1192 /// <param name="maxConnections"></param> 1192 /// <param name="maxConnections"></param>
1193 /// <returns> 1193 /// <returns>
1194 /// The response. If there was an internal exception or the request timed out, 1194 /// The response. If there was an internal exception or the request timed out,
1195 /// then the default(TResponse) is returned. 1195 /// then the default(TResponse) is returned.
1196 /// </returns> 1196 /// </returns>
1197 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections) 1197 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections)
@@ -1210,7 +1210,7 @@ namespace OpenSim.Framework
1210 /// </param> 1210 /// </param>
1211 /// <param name="maxConnections"></param> 1211 /// <param name="maxConnections"></param>
1212 /// <returns> 1212 /// <returns>
1213 /// The response. If there was an internal exception or the request timed out, 1213 /// The response. If there was an internal exception or the request timed out,
1214 /// then the default(TResponse) is returned. 1214 /// then the default(TResponse) is returned.
1215 /// </returns> 1215 /// </returns>
1216 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections, IServiceAuth auth) 1216 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections, IServiceAuth auth)
@@ -1375,7 +1375,7 @@ namespace OpenSim.Framework
1375 1375
1376 return deserial; 1376 return deserial;
1377 } 1377 }
1378 1378
1379 public static class XMLResponseHelper 1379 public static class XMLResponseHelper
1380 { 1380 {
1381 public static TResponse LogAndDeserialize<TRequest, TResponse>(int reqnum, Stream respStream, long contentLength) 1381 public static TResponse LogAndDeserialize<TRequest, TResponse>(int reqnum, Stream respStream, long contentLength)
@@ -1400,7 +1400,7 @@ namespace OpenSim.Framework
1400 } 1400 }
1401 } 1401 }
1402 1402
1403 1403
1404 public static class XMLRPCRequester 1404 public static class XMLRPCRequester
1405 { 1405 {
1406 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 1406 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -1444,7 +1444,7 @@ namespace OpenSim.Framework
1444 { 1444 {
1445 m_log.Error("Error parsing XML-RPC response", e); 1445 m_log.Error("Error parsing XML-RPC response", e);
1446 } 1446 }
1447 1447
1448 if (Resp.IsFault) 1448 if (Resp.IsFault)
1449 { 1449 {
1450 m_log.DebugFormat( 1450 m_log.DebugFormat(
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index e441cc8..5cb6a88 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -86,9 +86,9 @@ namespace OpenSim
86 if (logConfigFile != String.Empty) 86 if (logConfigFile != String.Empty)
87 { 87 {
88 XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile)); 88 XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile));
89 m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file", 89 m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file",
90 logConfigFile); 90 logConfigFile);
91 } 91 }
92 else 92 else
93 { 93 {
94 XmlConfigurator.Configure(); 94 XmlConfigurator.Configure();
@@ -104,22 +104,22 @@ namespace OpenSim
104 "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset"); 104 "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset");
105 105
106 // Verify the Threadpool allocates or uses enough worker and IO completion threads 106 // Verify the Threadpool allocates or uses enough worker and IO completion threads
107 // .NET 2.0, workerthreads default to 50 * numcores 107 // .NET 2.0, workerthreads default to 50 * numcores
108 // .NET 3.0, workerthreads defaults to 250 * numcores 108 // .NET 3.0, workerthreads defaults to 250 * numcores
109 // .NET 4.0, workerthreads are dynamic based on bitness and OS resources 109 // .NET 4.0, workerthreads are dynamic based on bitness and OS resources
110 // Max IO Completion threads are 1000 on all 3 CLRs 110 // Max IO Completion threads are 1000 on all 3 CLRs
111 // 111 //
112 // Mono 2.10.9 to at least Mono 3.1, workerthreads default to 100 * numcores, iocp threads to 4 * numcores 112 // Mono 2.10.9 to at least Mono 3.1, workerthreads default to 100 * numcores, iocp threads to 4 * numcores
113 int workerThreadsMin = 500; 113 int workerThreadsMin = 500;
114 int workerThreadsMax = 1000; // may need further adjustment to match other CLR 114 int workerThreadsMax = 1000; // may need further adjustment to match other CLR
115 int iocpThreadsMin = 1000; 115 int iocpThreadsMin = 1000;
116 int iocpThreadsMax = 2000; // may need further adjustment to match other CLR 116 int iocpThreadsMax = 2000; // may need further adjustment to match other CLR
117 117
118 { 118 {
119 int currentMinWorkerThreads, currentMinIocpThreads; 119 int currentMinWorkerThreads, currentMinIocpThreads;
120 System.Threading.ThreadPool.GetMinThreads(out currentMinWorkerThreads, out currentMinIocpThreads); 120 System.Threading.ThreadPool.GetMinThreads(out currentMinWorkerThreads, out currentMinIocpThreads);
121 m_log.InfoFormat( 121 m_log.InfoFormat(
122 "[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads", 122 "[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads",
123 currentMinWorkerThreads, currentMinIocpThreads); 123 currentMinWorkerThreads, currentMinIocpThreads);
124 } 124 }
125 125
@@ -138,30 +138,30 @@ namespace OpenSim
138 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max worker threads to {0}",workerThreads); 138 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max worker threads to {0}",workerThreads);
139 } 139 }
140 140
141 // Increase the number of IOCP threads available. 141 // Increase the number of IOCP threads available.
142 // Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17) 142 // Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17)
143 if (iocpThreads < iocpThreadsMin) 143 if (iocpThreads < iocpThreadsMin)
144 { 144 {
145 iocpThreads = iocpThreadsMin; 145 iocpThreads = iocpThreadsMin;
146 m_log.InfoFormat("[OPENSIM MAIN]: Bumping up max IOCP threads to {0}",iocpThreads); 146 m_log.InfoFormat("[OPENSIM MAIN]: Bumping up max IOCP threads to {0}",iocpThreads);
147 } 147 }
148 // Make sure we don't overallocate IOCP threads and thrash system resources 148 // Make sure we don't overallocate IOCP threads and thrash system resources
149 if ( iocpThreads > iocpThreadsMax ) 149 if ( iocpThreads > iocpThreadsMax )
150 { 150 {
151 iocpThreads = iocpThreadsMax; 151 iocpThreads = iocpThreadsMax;
152 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max IOCP completion threads to {0}",iocpThreads); 152 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max IOCP completion threads to {0}",iocpThreads);
153 } 153 }
154 // set the resulting worker and IO completion thread counts back to ThreadPool 154 // set the resulting worker and IO completion thread counts back to ThreadPool
155 if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) ) 155 if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) )
156 { 156 {
157 m_log.InfoFormat( 157 m_log.InfoFormat(
158 "[OPENSIM MAIN]: Threadpool set to {0} max worker threads and {1} max IOCP threads", 158 "[OPENSIM MAIN]: Threadpool set to {0} max worker threads and {1} max IOCP threads",
159 workerThreads, iocpThreads); 159 workerThreads, iocpThreads);
160 } 160 }
161 else 161 else
162 { 162 {
163 m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect."); 163 m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect.");
164 } 164 }
165 165
166 // Check if the system is compatible with OpenSimulator. 166 // Check if the system is compatible with OpenSimulator.
167 // Ensures that the minimum system requirements are met 167 // Ensures that the minimum system requirements are met
@@ -179,7 +179,7 @@ namespace OpenSim
179 Culture.SetCurrentCulture(); 179 Culture.SetCurrentCulture();
180 180
181 // Validate that the user has the most basic configuration done 181 // Validate that the user has the most basic configuration done
182 // If not, offer to do the most basic configuration for them warning them along the way of the importance of 182 // If not, offer to do the most basic configuration for them warning them along the way of the importance of
183 // reading these files. 183 // reading these files.
184 /* 184 /*
185 m_log.Info("Checking for reguired configuration...\n"); 185 m_log.Info("Checking for reguired configuration...\n");
@@ -188,13 +188,13 @@ namespace OpenSim
188 || (File.Exists(Path.Combine(Util.configDir(), "opensim.ini"))) 188 || (File.Exists(Path.Combine(Util.configDir(), "opensim.ini")))
189 || (File.Exists(Path.Combine(Util.configDir(), "openSim.ini"))) 189 || (File.Exists(Path.Combine(Util.configDir(), "openSim.ini")))
190 || (File.Exists(Path.Combine(Util.configDir(), "Opensim.ini"))); 190 || (File.Exists(Path.Combine(Util.configDir(), "Opensim.ini")));
191 191
192 bool StanaloneCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "StandaloneCommon.ini")); 192 bool StanaloneCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "StandaloneCommon.ini"));
193 bool StanaloneCommon_lowercased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "standalonecommon.ini")); 193 bool StanaloneCommon_lowercased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "standalonecommon.ini"));
194 bool GridCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "GridCommon.ini")); 194 bool GridCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "GridCommon.ini"));
195 bool GridCommon_lowerCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "gridcommon.ini")); 195 bool GridCommon_lowerCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "gridcommon.ini"));
196 196
197 if ((OpenSim_Ini) 197 if ((OpenSim_Ini)
198 && ( 198 && (
199 (StanaloneCommon_ProperCased 199 (StanaloneCommon_ProperCased
200 || StanaloneCommon_lowercased 200 || StanaloneCommon_lowercased
@@ -212,7 +212,7 @@ namespace OpenSim
212 "yes"); 212 "yes");
213 if (resp == "yes") 213 if (resp == "yes")
214 { 214 {
215 215
216 if (!(OpenSim_Ini)) 216 if (!(OpenSim_Ini))
217 { 217 {
218 try 218 try
@@ -312,7 +312,7 @@ namespace OpenSim
312 m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false); 312 m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false);
313 313
314 // load Crash directory config 314 // load Crash directory config
315 m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir); 315 m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
316 316
317 if (background) 317 if (background)
318 { 318 {
@@ -320,9 +320,9 @@ namespace OpenSim
320 m_sim.Startup(); 320 m_sim.Startup();
321 } 321 }
322 else 322 else
323 { 323 {
324 m_sim = new OpenSim(configSource); 324 m_sim = new OpenSim(configSource);
325 325
326 m_sim.Startup(); 326 m_sim.Startup();
327 327
328 while (true) 328 while (true)
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 4f141a6..62bd4f4 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -43,10 +43,10 @@ namespace OpenSim
43 public class ConfigurationLoader 43 public class ConfigurationLoader
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 /// <summary> 47 /// <summary>
48 /// Various Config settings the region needs to start 48 /// Various Config settings the region needs to start
49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, 49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
50 /// StorageDLL, Storage Connection String, Estate connection String, Client Stack 50 /// StorageDLL, Storage Connection String, Estate connection String, Client Stack
51 /// Standalone settings. 51 /// Standalone settings.
52 /// </summary> 52 /// </summary>
@@ -188,7 +188,7 @@ namespace OpenSim
188 { 188 {
189 iniFileExists = true; 189 iniFileExists = true;
190 AddIncludes(overrideConfig, overrideSources); 190 AddIncludes(overrideConfig, overrideSources);
191 } 191 }
192 } 192 }
193 m_config.Source.Merge(overrideConfig.Source); 193 m_config.Source.Merge(overrideConfig.Source);
194 } 194 }
@@ -198,7 +198,7 @@ namespace OpenSim
198 { 198 {
199 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 199 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
200 Environment.Exit(1); 200 Environment.Exit(1);
201 } 201 }
202 else if (!iniFileExists) 202 else if (!iniFileExists)
203 { 203 {
204 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 204 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
@@ -257,14 +257,14 @@ namespace OpenSim
257 string path = Path.Combine(basepath, chunkWithoutWildcards); 257 string path = Path.Combine(basepath, chunkWithoutWildcards);
258 path = Path.GetFullPath(path) + chunkWithWildcards; 258 path = Path.GetFullPath(path) + chunkWithWildcards;
259 string[] paths = Util.Glob(path); 259 string[] paths = Util.Glob(path);
260 260
261 // If the include path contains no wildcards, then warn the user that it wasn't found. 261 // If the include path contains no wildcards, then warn the user that it wasn't found.
262 if (wildcardIndex == -1 && paths.Length == 0) 262 if (wildcardIndex == -1 && paths.Length == 0)
263 { 263 {
264 m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path); 264 m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path);
265 } 265 }
266 else 266 else
267 { 267 {
268 foreach (string p in paths) 268 foreach (string p in paths)
269 { 269 {
270 if (!sources.Contains(p)) 270 if (!sources.Contains(p))
@@ -377,7 +377,7 @@ namespace OpenSim
377 m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); 377 m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
378 m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); 378 m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
379 379
380 m_configSettings.ClientstackDll 380 m_configSettings.ClientstackDll
381 = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 381 = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
382 } 382 }
383 383
diff --git a/OpenSim/Region/Application/IApplicationPlugin.cs b/OpenSim/Region/Application/IApplicationPlugin.cs
index a3fa66c..ff3f5d7 100644
--- a/OpenSim/Region/Application/IApplicationPlugin.cs
+++ b/OpenSim/Region/Application/IApplicationPlugin.cs
@@ -43,7 +43,7 @@ namespace OpenSim
43 void Initialise(OpenSimBase openSim); 43 void Initialise(OpenSimBase openSim);
44 44
45 /// <summary> 45 /// <summary>
46 /// Called when the application loading is completed 46 /// Called when the application loading is completed
47 /// </summary> 47 /// </summary>
48 void PostInitialise(); 48 void PostInitialise();
49 } 49 }
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index d9fdcde..8022b1e 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -135,7 +135,7 @@ namespace OpenSim
135 { 135 {
136 // Wait for a signal to be delivered 136 // Wait for a signal to be delivered
137 int index = Mono.Unix.UnixSignal.WaitAny (signals, -1); 137 int index = Mono.Unix.UnixSignal.WaitAny (signals, -1);
138 138
139 //Mono.Unix.Native.Signum signal = signals [index].Signum; 139 //Mono.Unix.Native.Signum signal = signals [index].Signum;
140 MainConsole.Instance.RunCommand("shutdown"); 140 MainConsole.Instance.RunCommand("shutdown");
141 } 141 }
@@ -273,17 +273,17 @@ namespace OpenSim
273 273
274 m_console.Commands.AddCommand("General", false, "change region", 274 m_console.Commands.AddCommand("General", false, "change region",
275 "change region <region name>", 275 "change region <region name>",
276 "Change current console region", 276 "Change current console region",
277 ChangeSelectedRegion); 277 ChangeSelectedRegion);
278 278
279 m_console.Commands.AddCommand("Archiving", false, "save xml", 279 m_console.Commands.AddCommand("Archiving", false, "save xml",
280 "save xml [<file name>]", 280 "save xml [<file name>]",
281 "Save a region's data in XML format", 281 "Save a region's data in XML format",
282 SaveXml); 282 SaveXml);
283 283
284 m_console.Commands.AddCommand("Archiving", false, "save xml2", 284 m_console.Commands.AddCommand("Archiving", false, "save xml2",
285 "save xml2 [<file name>]", 285 "save xml2 [<file name>]",
286 "Save a region's data in XML2 format", 286 "Save a region's data in XML2 format",
287 SaveXml2); 287 SaveXml2);
288 288
289 m_console.Commands.AddCommand("Archiving", false, "load xml", 289 m_console.Commands.AddCommand("Archiving", false, "load xml",
@@ -293,12 +293,12 @@ namespace OpenSim
293 293
294 m_console.Commands.AddCommand("Archiving", false, "load xml2", 294 m_console.Commands.AddCommand("Archiving", false, "load xml2",
295 "load xml2 [<file name>]", 295 "load xml2 [<file name>]",
296 "Load a region's data from XML2 format", 296 "Load a region's data from XML2 format",
297 LoadXml2); 297 LoadXml2);
298 298
299 m_console.Commands.AddCommand("Archiving", false, "save prims xml2", 299 m_console.Commands.AddCommand("Archiving", false, "save prims xml2",
300 "save prims xml2 [<prim name> <file name>]", 300 "save prims xml2 [<prim name> <file name>]",
301 "Save named prim to XML2", 301 "Save named prim to XML2",
302 SavePrimsXml2); 302 SavePrimsXml2);
303 303
304 m_console.Commands.AddCommand("Archiving", false, "load oar", 304 m_console.Commands.AddCommand("Archiving", false, "load oar",
@@ -352,7 +352,7 @@ namespace OpenSim
352 352
353 m_console.Commands.AddCommand("Objects", false, "edit scale", 353 m_console.Commands.AddCommand("Objects", false, "edit scale",
354 "edit scale <name> <x> <y> <z>", 354 "edit scale <name> <x> <y> <z>",
355 "Change the scale of a named prim", 355 "Change the scale of a named prim",
356 HandleEditScale); 356 HandleEditScale);
357 357
358 m_console.Commands.AddCommand("Objects", false, "rotate scene", 358 m_console.Commands.AddCommand("Objects", false, "rotate scene",
@@ -379,44 +379,44 @@ namespace OpenSim
379 379
380 m_console.Commands.AddCommand("Users", false, "show users", 380 m_console.Commands.AddCommand("Users", false, "show users",
381 "show users [full]", 381 "show users [full]",
382 "Show user data for users currently on the region", 382 "Show user data for users currently on the region",
383 "Without the 'full' option, only users actually on the region are shown." 383 "Without the 'full' option, only users actually on the region are shown."
384 + " With the 'full' option child agents of users in neighbouring regions are also shown.", 384 + " With the 'full' option child agents of users in neighbouring regions are also shown.",
385 HandleShow); 385 HandleShow);
386 386
387 m_console.Commands.AddCommand("Comms", false, "show connections", 387 m_console.Commands.AddCommand("Comms", false, "show connections",
388 "show connections", 388 "show connections",
389 "Show connection data", 389 "Show connection data",
390 HandleShow); 390 HandleShow);
391 391
392 m_console.Commands.AddCommand("Comms", false, "show circuits", 392 m_console.Commands.AddCommand("Comms", false, "show circuits",
393 "show circuits", 393 "show circuits",
394 "Show agent circuit data", 394 "Show agent circuit data",
395 HandleShow); 395 HandleShow);
396 396
397 m_console.Commands.AddCommand("Comms", false, "show pending-objects", 397 m_console.Commands.AddCommand("Comms", false, "show pending-objects",
398 "show pending-objects", 398 "show pending-objects",
399 "Show # of objects on the pending queues of all scene viewers", 399 "Show # of objects on the pending queues of all scene viewers",
400 HandleShow); 400 HandleShow);
401 401
402 m_console.Commands.AddCommand("General", false, "show modules", 402 m_console.Commands.AddCommand("General", false, "show modules",
403 "show modules", 403 "show modules",
404 "Show module data", 404 "Show module data",
405 HandleShow); 405 HandleShow);
406 406
407 m_console.Commands.AddCommand("Regions", false, "show regions", 407 m_console.Commands.AddCommand("Regions", false, "show regions",
408 "show regions", 408 "show regions",
409 "Show region data", 409 "Show region data",
410 HandleShow); 410 HandleShow);
411 411
412 m_console.Commands.AddCommand("Regions", false, "show ratings", 412 m_console.Commands.AddCommand("Regions", false, "show ratings",
413 "show ratings", 413 "show ratings",
414 "Show rating data", 414 "Show rating data",
415 HandleShow); 415 HandleShow);
416 416
417 m_console.Commands.AddCommand("Objects", false, "backup", 417 m_console.Commands.AddCommand("Objects", false, "backup",
418 "backup", 418 "backup",
419 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", 419 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.",
420 RunCommand); 420 RunCommand);
421 421
422 m_console.Commands.AddCommand("Regions", false, "create region", 422 m_console.Commands.AddCommand("Regions", false, "create region",
@@ -430,22 +430,22 @@ namespace OpenSim
430 430
431 m_console.Commands.AddCommand("Regions", false, "restart", 431 m_console.Commands.AddCommand("Regions", false, "restart",
432 "restart", 432 "restart",
433 "Restart the currently selected region(s) in this instance", 433 "Restart the currently selected region(s) in this instance",
434 RunCommand); 434 RunCommand);
435 435
436 m_console.Commands.AddCommand("General", false, "command-script", 436 m_console.Commands.AddCommand("General", false, "command-script",
437 "command-script <script>", 437 "command-script <script>",
438 "Run a command script from file", 438 "Run a command script from file",
439 RunCommand); 439 RunCommand);
440 440
441 m_console.Commands.AddCommand("Regions", false, "remove-region", 441 m_console.Commands.AddCommand("Regions", false, "remove-region",
442 "remove-region <name>", 442 "remove-region <name>",
443 "Remove a region from this simulator", 443 "Remove a region from this simulator",
444 RunCommand); 444 RunCommand);
445 445
446 m_console.Commands.AddCommand("Regions", false, "delete-region", 446 m_console.Commands.AddCommand("Regions", false, "delete-region",
447 "delete-region <name>", 447 "delete-region <name>",
448 "Delete a region from disk", 448 "Delete a region from disk",
449 RunCommand); 449 RunCommand);
450 450
451 m_console.Commands.AddCommand("Estates", false, "estate create", 451 m_console.Commands.AddCommand("Estates", false, "estate create",
@@ -476,7 +476,7 @@ namespace OpenSim
476 { 476 {
477 RunCommandScript(m_shutdownCommandsFile); 477 RunCommandScript(m_shutdownCommandsFile);
478 } 478 }
479 479
480 base.ShutdownSpecific(); 480 base.ShutdownSpecific();
481 } 481 }
482 482
@@ -515,7 +515,7 @@ namespace OpenSim
515 private void KickUserCommand(string module, string[] cmdparams) 515 private void KickUserCommand(string module, string[] cmdparams)
516 { 516 {
517 bool force = false; 517 bool force = false;
518 518
519 OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; }); 519 OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; });
520 520
521 List<string> mainParams = options.Parse(cmdparams); 521 List<string> mainParams = options.Parse(cmdparams);
@@ -612,7 +612,7 @@ namespace OpenSim
612 MainConsole.Instance.Output(usage); 612 MainConsole.Instance.Output(usage);
613 return; 613 return;
614 } 614 }
615 615
616 float angle = (float)(Convert.ToSingle(args[2]) / 180.0 * Math.PI); 616 float angle = (float)(Convert.ToSingle(args[2]) / 180.0 * Math.PI);
617 OpenMetaverse.Quaternion rot = OpenMetaverse.Quaternion.CreateFromAxisAngle(0, 0, 1, angle); 617 OpenMetaverse.Quaternion rot = OpenMetaverse.Quaternion.CreateFromAxisAngle(0, 0, 1, angle);
618 618
@@ -624,7 +624,7 @@ namespace OpenSim
624 624
625 Vector3 center = new Vector3(centerX, centerY, 0.0f); 625 Vector3 center = new Vector3(centerX, centerY, 0.0f);
626 626
627 SceneManager.ForEachSelectedScene(delegate(Scene scene) 627 SceneManager.ForEachSelectedScene(delegate(Scene scene)
628 { 628 {
629 scene.ForEachSOG(delegate(SceneObjectGroup sog) 629 scene.ForEachSOG(delegate(SceneObjectGroup sog)
630 { 630 {
@@ -776,8 +776,8 @@ namespace OpenSim
776 CreateRegion(regInfo, true, out scene); 776 CreateRegion(regInfo, true, out scene);
777 777
778 if (changed) 778 if (changed)
779 m_estateDataService.StoreEstateSettings(regInfo.EstateSettings); 779 m_estateDataService.StoreEstateSettings(regInfo.EstateSettings);
780 780
781 scene.Start(); 781 scene.Start();
782 } 782 }
783 783
@@ -880,8 +880,8 @@ namespace OpenSim
880 protected override void HandleRestartRegion(RegionInfo whichRegion) 880 protected override void HandleRestartRegion(RegionInfo whichRegion)
881 { 881 {
882 base.HandleRestartRegion(whichRegion); 882 base.HandleRestartRegion(whichRegion);
883 883
884 // Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the 884 // Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the
885 // m_console.ConsoleScene to null (indicating all scenes). 885 // m_console.ConsoleScene to null (indicating all scenes).
886 if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name) 886 if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name)
887 SceneManager.TrySetCurrentScene(whichRegion.RegionName); 887 SceneManager.TrySetCurrentScene(whichRegion.RegionName);
@@ -914,7 +914,7 @@ namespace OpenSim
914 { 914 {
915 agents = SceneManager.GetCurrentSceneAvatars(); 915 agents = SceneManager.GetCurrentSceneAvatars();
916 } 916 }
917 917
918 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); 918 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count));
919 919
920 MainConsole.Instance.Output( 920 MainConsole.Instance.Output(
@@ -960,7 +960,7 @@ namespace OpenSim
960 960
961 case "modules": 961 case "modules":
962 SceneManager.ForEachSelectedScene( 962 SceneManager.ForEachSelectedScene(
963 scene => 963 scene =>
964 { 964 {
965 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); 965 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
966 966
@@ -996,16 +996,16 @@ namespace OpenSim
996 cdt.AddColumn("Ready?", 6); 996 cdt.AddColumn("Ready?", 6);
997 cdt.AddColumn("Estate", ConsoleDisplayUtil.EstateNameSize); 997 cdt.AddColumn("Estate", ConsoleDisplayUtil.EstateNameSize);
998 SceneManager.ForEachScene( 998 SceneManager.ForEachScene(
999 scene => 999 scene =>
1000 { 1000 {
1001 RegionInfo ri = scene.RegionInfo; 1001 RegionInfo ri = scene.RegionInfo;
1002 cdt.AddRow( 1002 cdt.AddRow(
1003 ri.RegionName, 1003 ri.RegionName,
1004 ri.RegionID, 1004 ri.RegionID,
1005 string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY), 1005 string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY),
1006 string.Format("{0}x{1}", ri.RegionSizeX, ri.RegionSizeY), 1006 string.Format("{0}x{1}", ri.RegionSizeX, ri.RegionSizeY),
1007 ri.InternalEndPoint.Port, 1007 ri.InternalEndPoint.Port,
1008 scene.Ready ? "Yes" : "No", 1008 scene.Ready ? "Yes" : "No",
1009 ri.EstateSettings.EstateName); 1009 ri.EstateSettings.EstateName);
1010 } 1010 }
1011 ); 1011 );
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 8499a90..b33e2c2 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -85,7 +85,7 @@ namespace OpenSim
85 85
86 protected string proxyUrl; 86 protected string proxyUrl;
87 protected int proxyOffset = 0; 87 protected int proxyOffset = 0;
88 88
89 public string userStatsURI = String.Empty; 89 public string userStatsURI = String.Empty;
90 public string managedStatsURI = String.Empty; 90 public string managedStatsURI = String.Empty;
91 91
@@ -125,7 +125,7 @@ namespace OpenSim
125 { 125 {
126 get { return m_EnvConfigSource; } 126 get { return m_EnvConfigSource; }
127 } 127 }
128 128
129 public uint HttpServerPort 129 public uint HttpServerPort
130 { 130 {
131 get { return m_httpServerPort; } 131 get { return m_httpServerPort; }
@@ -210,7 +210,7 @@ namespace OpenSim
210 } 210 }
211 211
212 /// <summary> 212 /// <summary>
213 /// Performs startup specific to the region server, including initialization of the scene 213 /// Performs startup specific to the region server, including initialization of the scene
214 /// such as loading configuration from disk. 214 /// such as loading configuration from disk.
215 /// </summary> 215 /// </summary>
216 protected override void StartupSpecific() 216 protected override void StartupSpecific()
@@ -228,7 +228,7 @@ namespace OpenSim
228 string pidFile = startupConfig.GetString("PIDFile", String.Empty); 228 string pidFile = startupConfig.GetString("PIDFile", String.Empty);
229 if (pidFile != String.Empty) 229 if (pidFile != String.Empty)
230 CreatePIDFile(pidFile); 230 CreatePIDFile(pidFile);
231 231
232 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); 232 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
233 233
234 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); 234 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
@@ -254,11 +254,11 @@ namespace OpenSim
254 if (m_simulationDataService == null) 254 if (m_simulationDataService == null)
255 throw new Exception( 255 throw new Exception(
256 string.Format( 256 string.Format(
257 "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.", 257 "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.",
258 module)); 258 module));
259 259
260 // Load the estate data service 260 // Load the estate data service
261 module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty); 261 module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty);
262 if (String.IsNullOrEmpty(module)) 262 if (String.IsNullOrEmpty(module))
263 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section"); 263 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section");
264 264
@@ -268,7 +268,7 @@ namespace OpenSim
268 if (m_estateDataService == null) 268 if (m_estateDataService == null)
269 throw new Exception( 269 throw new Exception(
270 string.Format( 270 string.Format(
271 "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.", 271 "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.",
272 module)); 272 module));
273 } 273 }
274 274
@@ -405,9 +405,9 @@ namespace OpenSim
405 // set initial ServerURI 405 // set initial ServerURI
406 regionInfo.HttpPort = m_httpServerPort; 406 regionInfo.HttpPort = m_httpServerPort;
407 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; 407 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/";
408 408
409 regionInfo.osSecret = m_osSecret; 409 regionInfo.osSecret = m_osSecret;
410 410
411 if ((proxyUrl.Length > 0) && (portadd_flag)) 411 if ((proxyUrl.Length > 0) && (portadd_flag))
412 { 412 {
413 // set proxy url to RegionInfo 413 // set proxy url to RegionInfo
@@ -461,17 +461,17 @@ namespace OpenSim
461 461
462 // Prims have to be loaded after module configuration since some modules may be invoked during the load 462 // Prims have to be loaded after module configuration since some modules may be invoked during the load
463 scene.LoadPrimsFromStorage(regionInfo.originRegionID); 463 scene.LoadPrimsFromStorage(regionInfo.originRegionID);
464 464
465 // TODO : Try setting resource for region xstats here on scene 465 // TODO : Try setting resource for region xstats here on scene
466 MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo)); 466 MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo));
467 467
468 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 468 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
469 scene.EventManager.TriggerParcelPrimCountUpdate(); 469 scene.EventManager.TriggerParcelPrimCountUpdate();
470 470
471 if (scene.SnmpService != null) 471 if (scene.SnmpService != null)
472 { 472 {
473 scene.SnmpService.BootInfo("Grid Registration in progress", scene); 473 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
474 } 474 }
475 475
476 try 476 try
477 { 477 {
@@ -480,7 +480,7 @@ namespace OpenSim
480 catch (Exception e) 480 catch (Exception e)
481 { 481 {
482 m_log.ErrorFormat( 482 m_log.ErrorFormat(
483 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 483 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
484 e.Message, e.StackTrace); 484 e.Message, e.StackTrace);
485 485
486 if (scene.SnmpService != null) 486 if (scene.SnmpService != null)
@@ -608,7 +608,7 @@ namespace OpenSim
608 608
609 if (rawEstateOwnerUuid == null) 609 if (rawEstateOwnerUuid == null)
610 rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); 610 rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
611 611
612 UUID estateOwnerUuid = UUID.Zero; 612 UUID estateOwnerUuid = UUID.Zero;
613 if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid)) 613 if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
614 { 614 {
@@ -671,7 +671,7 @@ namespace OpenSim
671 scene.DeleteAllSceneObjects(); 671 scene.DeleteAllSceneObjects();
672 SceneManager.CloseScene(scene); 672 SceneManager.CloseScene(scene);
673 //ShutdownClientServer(scene.RegionInfo); 673 //ShutdownClientServer(scene.RegionInfo);
674 674
675 if (!cleanup) 675 if (!cleanup)
676 return; 676 return;
677 677
@@ -733,7 +733,7 @@ namespace OpenSim
733 SceneManager.CloseScene(scene); 733 SceneManager.CloseScene(scene);
734 //ShutdownClientServer(scene.RegionInfo); 734 //ShutdownClientServer(scene.RegionInfo);
735 } 735 }
736 736
737 /// <summary> 737 /// <summary>
738 /// Remove a region from the simulator without deleting it permanently. 738 /// Remove a region from the simulator without deleting it permanently.
739 /// </summary> 739 /// </summary>
@@ -745,7 +745,7 @@ namespace OpenSim
745 if (SceneManager.TryGetScene(name, out target)) 745 if (SceneManager.TryGetScene(name, out target))
746 CloseRegion(target); 746 CloseRegion(target);
747 } 747 }
748 748
749 /// <summary> 749 /// <summary>
750 /// Create a scene and its initial base structures. 750 /// Create a scene and its initial base structures.
751 /// </summary> 751 /// </summary>
@@ -781,15 +781,15 @@ namespace OpenSim
781 IEstateDataService estateDataService, AgentCircuitManager circuitManager) 781 IEstateDataService estateDataService, AgentCircuitManager circuitManager)
782 { 782 {
783 return new Scene( 783 return new Scene(
784 regionInfo, circuitManager, 784 regionInfo, circuitManager,
785 simDataService, estateDataService, 785 simDataService, estateDataService,
786 Config, m_version); 786 Config, m_version);
787 } 787 }
788 788
789 protected virtual void HandleRestartRegion(RegionInfo whichRegion) 789 protected virtual void HandleRestartRegion(RegionInfo whichRegion)
790 { 790 {
791 m_log.InfoFormat( 791 m_log.InfoFormat(
792 "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", 792 "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
793 whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); 793 whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY);
794 794
795 //ShutdownClientServer(whichRegion); 795 //ShutdownClientServer(whichRegion);
@@ -824,18 +824,18 @@ namespace OpenSim
824 824
825 /// <summary> 825 /// <summary>
826 /// Handler to supply the current extended status of this sim 826 /// Handler to supply the current extended status of this sim
827 /// Sends the statistical data in a json serialization 827 /// Sends the statistical data in a json serialization
828 /// </summary> 828 /// </summary>
829 public class XSimStatusHandler : BaseStreamHandler 829 public class XSimStatusHandler : BaseStreamHandler
830 { 830 {
831 OpenSimBase m_opensim; 831 OpenSimBase m_opensim;
832 832
833 public XSimStatusHandler(OpenSimBase sim) 833 public XSimStatusHandler(OpenSimBase sim)
834 : base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus") 834 : base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus")
835 { 835 {
836 m_opensim = sim; 836 m_opensim = sim;
837 } 837 }
838 838
839 protected override byte[] ProcessRequest(string path, Stream request, 839 protected override byte[] ProcessRequest(string path, Stream request,
840 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 840 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
841 { 841 {
@@ -850,20 +850,20 @@ namespace OpenSim
850 850
851 /// <summary> 851 /// <summary>
852 /// Handler to supply the current extended status of this sim to a user configured URI 852 /// Handler to supply the current extended status of this sim to a user configured URI
853 /// Sends the statistical data in a json serialization 853 /// Sends the statistical data in a json serialization
854 /// If the request contains a key, "callback" the response will be wrappend in the 854 /// If the request contains a key, "callback" the response will be wrappend in the
855 /// associated value for jsonp used with ajax/javascript 855 /// associated value for jsonp used with ajax/javascript
856 /// </summary> 856 /// </summary>
857 protected class UXSimStatusHandler : BaseStreamHandler 857 protected class UXSimStatusHandler : BaseStreamHandler
858 { 858 {
859 OpenSimBase m_opensim; 859 OpenSimBase m_opensim;
860 860
861 public UXSimStatusHandler(OpenSimBase sim) 861 public UXSimStatusHandler(OpenSimBase sim)
862 : base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus") 862 : base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus")
863 { 863 {
864 m_opensim = sim; 864 m_opensim = sim;
865 } 865 }
866 866
867 protected override byte[] ProcessRequest(string path, Stream request, 867 protected override byte[] ProcessRequest(string path, Stream request,
868 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 868 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
869 { 869 {
@@ -956,7 +956,7 @@ namespace OpenSim
956 { 956 {
957 regionnum = SceneManager.Scenes.Count; 957 regionnum = SceneManager.Scenes.Count;
958 } 958 }
959 959
960 /// <summary> 960 /// <summary>
961 /// Create an estate with an initial region. 961 /// Create an estate with an initial region.
962 /// </summary> 962 /// </summary>
@@ -983,19 +983,19 @@ namespace OpenSim
983 MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName); 983 MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName);
984 return false; 984 return false;
985 } 985 }
986 986
987 regInfo.EstateSettings.EstateName = newName; 987 regInfo.EstateSettings.EstateName = newName;
988 988
989 // FIXME: Later on, the scene constructor will reload the estate settings no matter what. 989 // FIXME: Later on, the scene constructor will reload the estate settings no matter what.
990 // Therefore, we need to do an initial save here otherwise the new estate name will be reset 990 // Therefore, we need to do an initial save here otherwise the new estate name will be reset
991 // back to the default. The reloading of estate settings by scene could be eliminated if it 991 // back to the default. The reloading of estate settings by scene could be eliminated if it
992 // knows that the passed in settings in RegionInfo are already valid. Also, it might be 992 // knows that the passed in settings in RegionInfo are already valid. Also, it might be
993 // possible to eliminate some additional later saves made by callers of this method. 993 // possible to eliminate some additional later saves made by callers of this method.
994 EstateDataService.StoreEstateSettings(regInfo.EstateSettings); 994 EstateDataService.StoreEstateSettings(regInfo.EstateSettings);
995 995
996 return true; 996 return true;
997 } 997 }
998 998
999 /// <summary> 999 /// <summary>
1000 /// Load the estate information for the provided RegionInfo object. 1000 /// Load the estate information for the provided RegionInfo object.
1001 /// </summary> 1001 /// </summary>
@@ -1009,8 +1009,8 @@ namespace OpenSim
1009 return false; // estate info in the database did not change 1009 return false; // estate info in the database did not change
1010 1010
1011 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); 1011 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
1012 1012
1013 List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll(); 1013 List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
1014 Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>(); 1014 Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>();
1015 1015
1016 foreach (EstateSettings estate in estates) 1016 foreach (EstateSettings estate in estates)
@@ -1103,12 +1103,12 @@ namespace OpenSim
1103 MainConsole.Instance.Output("Joining the estate failed. Please try again."); 1103 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
1104 } 1104 }
1105 } 1105 }
1106 } 1106 }
1107 1107
1108 return true; // need to update the database 1108 return true; // need to update the database
1109 } 1109 }
1110 } 1110 }
1111 1111
1112 public class OpenSimConfigSource 1112 public class OpenSimConfigSource
1113 { 1113 {
1114 public IConfigSource Source; 1114 public IConfigSource Source;
diff --git a/OpenSim/Region/Application/Properties/AssemblyInfo.cs b/OpenSim/Region/Application/Properties/AssemblyInfo.cs
index b3efce0..09772d3 100644
--- a/OpenSim/Region/Application/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Application/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim")] 9[assembly: AssemblyTitle("OpenSim")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs
index ba92fd6..83a9fff 100644
--- a/OpenSim/Region/Application/RegionApplicationBase.cs
+++ b/OpenSim/Region/Application/RegionApplicationBase.cs
@@ -57,9 +57,9 @@ namespace OpenSim
57 public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } } 57 public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } }
58 public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } } 58 public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } }
59 public IEstateDataService EstateDataService { get { return m_estateDataService; } } 59 public IEstateDataService EstateDataService { get { return m_estateDataService; } }
60 60
61 protected abstract void Initialize(); 61 protected abstract void Initialize();
62 62
63 protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); 63 protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
64 64
65 protected override void StartupSpecific() 65 protected override void StartupSpecific()
@@ -68,11 +68,11 @@ namespace OpenSim
68 68
69 Initialize(); 69 Initialize();
70 70
71 m_httpServer 71 m_httpServer
72 = new BaseHttpServer( 72 = new BaseHttpServer(
73 m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, 73 m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
74 m_networkServersInfo.HttpSSLCN); 74 m_networkServersInfo.HttpSSLCN);
75 75
76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) 76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
77 { 77 {
78 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); 78 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
@@ -107,7 +107,7 @@ namespace OpenSim
107 server.Start(); 107 server.Start();
108 } 108 }
109 } 109 }
110 110
111 base.StartupSpecific(); 111 base.StartupSpecific();
112 } 112 }
113 113
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs
index aabdb51..8f65a69 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.LindenCaps
133 { 133 {
134 data = new AgentPrefs(agent); 134 data = new AgentPrefs(agent);
135 } 135 }
136 136
137 if (req.ContainsKey("access_prefs")) 137 if (req.ContainsKey("access_prefs"))
138 { 138 {
139 OSDMap accessPrefs = (OSDMap)req["access_prefs"]; // We could check with ContainsKey... 139 OSDMap accessPrefs = (OSDMap)req["access_prefs"]; // We could check with ContainsKey...
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs
index bbadc55..e3c430c 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.Linden
53 public class AvatarPickerSearchModule : INonSharedRegionModule 53 public class AvatarPickerSearchModule : INonSharedRegionModule
54 { 54 {
55// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 private Scene m_scene; 57 private Scene m_scene;
58 private IPeople m_People; 58 private IPeople m_People;
59 private bool m_Enabled = false; 59 private bool m_Enabled = false;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 14a4873..8cb40e1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.ClientStack.Linden
97 private ModelCost m_ModelCost; 97 private ModelCost m_ModelCost;
98 98
99 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. 99 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
100 100
101 // These are callbacks which will be setup by the scene so that we can update scene data when we 101 // These are callbacks which will be setup by the scene so that we can update scene data when we
102 // receive capability calls 102 // receive capability calls
103 public NewInventoryItem AddNewInventoryItem = null; 103 public NewInventoryItem AddNewInventoryItem = null;
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ClientStack.Linden
119 119
120 private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory 120 private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory
121 // may not be visible till relog 121 // may not be visible till relog
122 122
123 private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!! 123 private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!!
124 private UUID m_testAssetsCreatorID = UUID.Zero; 124 private UUID m_testAssetsCreatorID = UUID.Zero;
125 125
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden
138 processUpload = 3 138 processUpload = 3
139 } 139 }
140 private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle; 140 private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle;
141 141
142 public BunchOfCaps(Scene scene, UUID agentID, Caps caps) 142 public BunchOfCaps(Scene scene, UUID agentID, Caps caps)
143 { 143 {
144 m_Scene = scene; 144 m_Scene = scene;
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden
147 147
148 // create a model upload cost provider 148 // create a model upload cost provider
149 m_ModelCost = new ModelCost(scene); 149 m_ModelCost = new ModelCost(scene);
150 150
151 m_PrimScaleMin = m_ModelCost.PrimScaleMin; 151 m_PrimScaleMin = m_ModelCost.PrimScaleMin;
152 152
153 IConfigSource config = m_Scene.Config; 153 IConfigSource config = m_Scene.Config;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.ClientStack.Linden
216 216
217 public string GetNewCapPath() 217 public string GetNewCapPath()
218 { 218 {
219 return "/CAPS/" + UUID.Random(); 219 return "/CAPS/" + UUID.Random();
220 } 220 }
221 221
222 /// <summary> 222 /// <summary>
@@ -271,7 +271,7 @@ namespace OpenSim.Region.ClientStack.Linden
271 "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null); 271 "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null);
272 m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); 272 m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler);
273 } 273 }
274 274
275 if(m_AllowCapGroupMemberData) 275 if(m_AllowCapGroupMemberData)
276 { 276 {
277 IRequestHandler GroupMemberDataHandler = new RestStreamHandler( 277 IRequestHandler GroupMemberDataHandler = new RestStreamHandler(
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ClientStack.Linden
314 IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler( 314 IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler(
315 "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null); 315 "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null);
316 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler); 316 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler);
317 317
318 } 318 }
319 catch (Exception e) 319 catch (Exception e)
320 { 320 {
@@ -568,8 +568,8 @@ namespace OpenSim.Region.ClientStack.Linden
568 { 568 {
569 string error; 569 string error;
570 int modelcost; 570 int modelcost;
571 571
572 572
573 if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost, 573 if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost,
574 meshcostdata, out error, ref warning)) 574 meshcostdata, out error, ref warning))
575 { 575 {
@@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.Linden
639 client.SendAgentAlertMessage(warning, true); 639 client.SendAgentAlertMessage(warning, true);
640 } 640 }
641 } 641 }
642 642
643 string assetDes = llsdRequest.description; 643 string assetDes = llsdRequest.description;
644 UUID newAsset = UUID.Random(); 644 UUID newAsset = UUID.Random();
645 UUID newInvItem = UUID.Random(); 645 UUID newInvItem = UUID.Random();
@@ -813,7 +813,7 @@ namespace OpenSim.Region.ClientStack.Linden
813 813
814 List<UUID> textures = new List<UUID>(); 814 List<UUID> textures = new List<UUID>();
815 815
816 816
817// if (doTextInv) 817// if (doTextInv)
818 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); 818 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
819 819
@@ -895,7 +895,7 @@ namespace OpenSim.Region.ClientStack.Linden
895 meshAvatarSkeletons.Add(curAvSkeleton); 895 meshAvatarSkeletons.Add(curAvSkeleton);
896 meshAvatarColliders.Add(curAvCollider); 896 meshAvatarColliders.Add(curAvCollider);
897 897
898 // test code 898 // test code
899 if (curAvSkeleton && client != null) 899 if (curAvSkeleton && client != null)
900 { 900 {
901 string name = assetName; 901 string name = assetName;
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.ClientStack.Linden
1054 prim.LastOwnerID = creatorID; 1054 prim.LastOwnerID = creatorID;
1055 prim.RezzerID = creatorID; 1055 prim.RezzerID = creatorID;
1056 prim.CreationDate = Util.UnixTimeSinceEpoch(); 1056 prim.CreationDate = Util.UnixTimeSinceEpoch();
1057 1057
1058 if (grp == null) 1058 if (grp == null)
1059 prim.Name = assetName; 1059 prim.Name = assetName;
1060 else 1060 else
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.ClientStack.Linden
1437 public string GetObjectCost(string request, string path, 1437 public string GetObjectCost(string request, string path,
1438 string param, IOSHttpRequest httpRequest, 1438 string param, IOSHttpRequest httpRequest,
1439 IOSHttpResponse httpResponse) 1439 IOSHttpResponse httpResponse)
1440 { 1440 {
1441 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); 1441 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
1442 OSDMap resp = new OSDMap(); 1442 OSDMap resp = new OSDMap();
1443 1443
@@ -1446,7 +1446,7 @@ namespace OpenSim.Region.ClientStack.Linden
1446 for (int i = 0; i < object_ids.Count; i++) 1446 for (int i = 0; i < object_ids.Count; i++)
1447 { 1447 {
1448 UUID uuid = object_ids[i].AsUUID(); 1448 UUID uuid = object_ids[i].AsUUID();
1449 1449
1450 SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid); 1450 SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid);
1451 SceneObjectGroup grp = null; 1451 SceneObjectGroup grp = null;
1452 if (part != null) 1452 if (part != null)
@@ -1479,7 +1479,7 @@ namespace OpenSim.Region.ClientStack.Linden
1479 resp[UUID.Zero.ToString()] = object_data; 1479 resp[UUID.Zero.ToString()] = object_data;
1480 } 1480 }
1481 string response = OSDParser.SerializeLLSDXmlString(resp); 1481 string response = OSDParser.SerializeLLSDXmlString(resp);
1482 return response; 1482 return response;
1483 } 1483 }
1484 1484
1485 public string ResourceCostSelected(string request, string path, 1485 public string ResourceCostSelected(string request, string path,
@@ -1548,7 +1548,7 @@ namespace OpenSim.Region.ClientStack.Linden
1548 resp["selected"] = object_data; 1548 resp["selected"] = object_data;
1549// resp["transaction_id"] = "undef"; 1549// resp["transaction_id"] = "undef";
1550 string response = OSDParser.SerializeLLSDXmlString(resp); 1550 string response = OSDParser.SerializeLLSDXmlString(resp);
1551 return response; 1551 return response;
1552 } 1552 }
1553 1553
1554 public string UpdateAgentInformation(string request, string path, 1554 public string UpdateAgentInformation(string request, string path,
@@ -1564,7 +1564,7 @@ namespace OpenSim.Region.ClientStack.Linden
1564 resp["access_prefs"] = accessPrefs; 1564 resp["access_prefs"] = accessPrefs;
1565 1565
1566 string response = OSDParser.SerializeLLSDXmlString(resp); 1566 string response = OSDParser.SerializeLLSDXmlString(resp);
1567 return response; 1567 return response;
1568 } 1568 }
1569 1569
1570 public bool OSDMapTOVector3(OSDMap map, out Vector3 v) 1570 public bool OSDMapTOVector3(OSDMap map, out Vector3 v)
@@ -1598,19 +1598,19 @@ namespace OpenSim.Region.ClientStack.Linden
1598 1598
1599 IClientAPI client = null; 1599 IClientAPI client = null;
1600 ScenePresence sp; 1600 ScenePresence sp;
1601 1601
1602 while(true) 1602 while(true)
1603 { 1603 {
1604 if(m_Scene.GridUserService == null) 1604 if(m_Scene.GridUserService == null)
1605 break; 1605 break;
1606 1606
1607 if(m_Scene.UserManagementModule == null) 1607 if(m_Scene.UserManagementModule == null)
1608 break; 1608 break;
1609 1609
1610 m_Scene.TryGetScenePresence(m_AgentID, out sp); 1610 m_Scene.TryGetScenePresence(m_AgentID, out sp);
1611 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) 1611 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
1612 break; 1612 break;
1613 1613
1614 client = sp.ControllingClient; 1614 client = sp.ControllingClient;
1615 1615
1616 if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID)) 1616 if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID))
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.ClientStack.Linden
1637 ILandObject land = m_Scene.LandChannel.GetLandObject(pos); 1637 ILandObject land = m_Scene.LandChannel.GetLandObject(pos);
1638 if(land == null) 1638 if(land == null)
1639 break; 1639 break;
1640 1640
1641 ulong gpowers = client.GetGroupPowers(land.LandData.GroupID); 1641 ulong gpowers = client.GetGroupPowers(land.LandData.GroupID);
1642 SceneObjectGroup telehub = null; 1642 SceneObjectGroup telehub = null;
1643 if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) 1643 if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
@@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ClientStack.Linden
1648 !m_Scene.Permissions.IsGod(m_AgentID) && 1648 !m_Scene.Permissions.IsGod(m_AgentID) &&
1649 m_AgentID != land.LandData.OwnerID && // (b) land owners can set home 1649 m_AgentID != land.LandData.OwnerID && // (b) land owners can set home
1650 // (c) members of the land-associated group in roles that can set home 1650 // (c) members of the land-associated group in roles that can set home
1651 ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) && 1651 ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) &&
1652 // (d) parcels with telehubs can be the home of anyone 1652 // (d) parcels with telehubs can be the home of anyone
1653 (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) 1653 (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y)))
1654 { 1654 {
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.ClientStack.Linden
1675 1675
1676 break; 1676 break;
1677 } 1677 }
1678 1678
1679 string response; 1679 string response;
1680 1680
1681 if(fail) 1681 if(fail)
@@ -1728,11 +1728,11 @@ namespace OpenSim.Region.ClientStack.Linden
1728 m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>(); 1728 m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>();
1729 if(m_GroupsModule == null) 1729 if(m_GroupsModule == null)
1730 break; 1730 break;
1731 1731
1732 m_Scene.TryGetScenePresence(m_AgentID, out sp); 1732 m_Scene.TryGetScenePresence(m_AgentID, out sp);
1733 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) 1733 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
1734 break; 1734 break;
1735 1735
1736 client = sp.ControllingClient; 1736 client = sp.ControllingClient;
1737 1737
1738 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); 1738 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
@@ -1866,12 +1866,12 @@ namespace OpenSim.Region.ClientStack.Linden
1866 OSDMap osdname = new OSDMap(); 1866 OSDMap osdname = new OSDMap();
1867 if(parts[0] == "Unknown") 1867 if(parts[0] == "Unknown")
1868 { 1868 {
1869 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); 1869 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
1870 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); 1870 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
1871 } 1871 }
1872 else 1872 else
1873 { 1873 {
1874 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); 1874 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
1875 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); 1875 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
1876 } 1876 }
1877 osdname["display_name"] = OSD.FromString(kvp.Value); 1877 osdname["display_name"] = OSD.FromString(kvp.Value);
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.ClientStack.Linden
1916 private string m_assetType = String.Empty; 1916 private string m_assetType = String.Empty;
1917 private int m_cost; 1917 private int m_cost;
1918 private string m_error = String.Empty; 1918 private string m_error = String.Empty;
1919 1919
1920 private Timer m_timeoutTimer = new Timer(); 1920 private Timer m_timeoutTimer = new Timer();
1921 private UUID m_texturesFolder; 1921 private UUID m_texturesFolder;
1922 private int m_nreqtextures; 1922 private int m_nreqtextures;
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.Linden
1928 private int m_groupMask; 1928 private int m_groupMask;
1929 private int m_everyoneMask; 1929 private int m_everyoneMask;
1930 1930
1931 1931
1932 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, 1932 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
1933 UUID parentFolderID, string invType, string assetType, string path, 1933 UUID parentFolderID, string invType, string assetType, string path,
1934 IHttpServer httpServer, bool dumpAssetsToFile, 1934 IHttpServer httpServer, bool dumpAssetsToFile,
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
index 5b4e0da..683c3d5 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.Linden
63 { 63 {
64 } 64 }
65 65
66 public void Close() { } 66 public void Close() { }
67 67
68 public void AddRegion(Scene scene) 68 public void AddRegion(Scene scene)
69 { 69 {
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.Linden
80 } 80 }
81 81
82 public void PostInitialise() { } 82 public void PostInitialise() { }
83 #endregion 83 #endregion
84 84
85 private void OnRegisterCaps(UUID agentID, Caps caps) 85 private void OnRegisterCaps(UUID agentID, Caps caps)
86 { 86 {
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
index fb22694..eb1ab45 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.Linden
51{ 51{
52 public struct ModelPrimLimits 52 public struct ModelPrimLimits
53 { 53 {
54 54
55 } 55 }
56 56
57 public class ModelCost 57 public class ModelCost
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.Linden
82 const float lowestSizeWth = 2f; // 3x 82 const float lowestSizeWth = 2f; // 3x
83 // favor potencially physical optimized meshs versus automatic decomposition 83 // favor potencially physical optimized meshs versus automatic decomposition
84 const float physMeshSizeWth = 6f; // counts 7x 84 const float physMeshSizeWth = 6f; // counts 7x
85 const float physHullSizeWth = 8f; // counts 9x 85 const float physHullSizeWth = 8f; // counts 9x
86 86
87 // stream cost area factors 87 // stream cost area factors
88 // more or less like SL 88 // more or less like SL
89 const float highLodFactor = 17.36f; 89 const float highLodFactor = 17.36f;
90 const float midLodFactor = 277.78f; 90 const float midLodFactor = 277.78f;
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack.Linden
108 PrimScaleMin = scene.m_minNonphys; 108 PrimScaleMin = scene.m_minNonphys;
109 NonPhysicalPrimScaleMax = scene.m_maxNonphys; 109 NonPhysicalPrimScaleMax = scene.m_maxNonphys;
110 PhysicalPrimScaleMax = scene.m_maxPhys; 110 PhysicalPrimScaleMax = scene.m_maxPhys;
111 ObjectLinkedPartsMax = scene.m_linksetCapacity; 111 ObjectLinkedPartsMax = scene.m_linksetCapacity;
112 } 112 }
113 113
114 public void Econfig(IConfig EconomyConfig) 114 public void Econfig(IConfig EconomyConfig)
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack.Linden
121 bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); 121 bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost);
122 } 122 }
123 123
124 // storage for a single mesh asset cost parameters 124 // storage for a single mesh asset cost parameters
125 private class ameshCostParam 125 private class ameshCostParam
126 { 126 {
127 // LOD sizes for size dependent streaming cost 127 // LOD sizes for size dependent streaming cost
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.Linden
140 // resources input LLSD request 140 // resources input LLSD request
141 // basicCost input region assets upload cost 141 // basicCost input region assets upload cost
142 // totalcost returns model total upload fee 142 // totalcost returns model total upload fee
143 // meshcostdata returns detailed costs for viewer 143 // meshcostdata returns detailed costs for viewer
144 // avatarSkeleton if mesh includes a avatar skeleton 144 // avatarSkeleton if mesh includes a avatar skeleton
145 // useAvatarCollider if we should use physics mesh for avatar 145 // useAvatarCollider if we should use physics mesh for avatar
146 public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, 146 public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost,
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden
150 error = string.Empty; 150 error = string.Empty;
151 151
152 bool avatarSkeleton = false; 152 bool avatarSkeleton = false;
153 153
154 if (resources == null || 154 if (resources == null ||
155 resources.instance_list == null || 155 resources.instance_list == null ||
156 resources.instance_list.Array.Count == 0) 156 resources.instance_list.Array.Count == 0)
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.Linden
203 if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) 203 if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0)
204 { 204 {
205 numberMeshs = resources.mesh_list.Array.Count; 205 numberMeshs = resources.mesh_list.Array.Count;
206 206
207 for (int i = 0; i < numberMeshs; i++) 207 for (int i = 0; i < numberMeshs; i++)
208 { 208 {
209 ameshCostParam curCost = new ameshCostParam(); 209 ameshCostParam curCost = new ameshCostParam();
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.Linden
230 } 230 }
231 231
232 // instances (prims) cost 232 // instances (prims) cost
233 233
234 234
235 int mesh; 235 int mesh;
236 int skipedSmall = 0; 236 int skipedSmall = 0;
@@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.Linden
331 331
332 // breakdown prices 332 // breakdown prices
333 // don't seem to be in use so removed code for now 333 // don't seem to be in use so removed code for now
334 334
335 return true; 335 return true;
336 } 336 }
337 337
@@ -404,7 +404,7 @@ namespace OpenSim.Region.ClientStack.Linden
404 int sksize = tmpmap["size"].AsInteger(); 404 int sksize = tmpmap["size"].AsInteger();
405 if(sksize > 0) 405 if(sksize > 0)
406 skeleton = true; 406 skeleton = true;
407 } 407 }
408 } 408 }
409 409
410 if (map.ContainsKey("physics_convex")) 410 if (map.ContainsKey("physics_convex"))
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.Linden
429 } 429 }
430 430
431 submesh_offset = -1; 431 submesh_offset = -1;
432 432
433 // only look for LOD meshs sizes 433 // only look for LOD meshs sizes
434 434
435 if (map.ContainsKey("high_lod")) 435 if (map.ContainsKey("high_lod"))
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
518 cost.physicsCost = 0.04f * phys_hullsvertices; 518 cost.physicsCost = 0.04f * phys_hullsvertices;
519 519
520 float sfee; 520 float sfee;
521 521
522 sfee = data.Length; // start with total compressed data size 522 sfee = data.Length; // start with total compressed data size
523 523
524 // penalize lod meshs that should be more builder optimized 524 // penalize lod meshs that should be more builder optimized
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack.Linden
535 535
536 // bytes to money 536 // bytes to money
537 sfee *= bytecost; 537 sfee *= bytecost;
538 538
539 cost.costFee = sfee; 539 cost.costFee = sfee;
540 return true; 540 return true;
541 } 541 }
@@ -675,7 +675,7 @@ namespace OpenSim.Region.ClientStack.Linden
675 return true; 675 return true;
676 } 676 }
677 677
678 // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length 678 // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length
679 private float streamingCost(ameshCostParam curCost, float sqdiam) 679 private float streamingCost(ameshCostParam curCost, float sqdiam)
680 { 680 {
681 // compute efective areas 681 // compute efective areas
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index ba3edd6..1feece1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -74,12 +74,12 @@ namespace OpenSim.Region.ClientStack.Linden
74 private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000); 74 private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000);
75 75
76 protected Scene m_scene; 76 protected Scene m_scene;
77 77
78 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 78 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
79 79
80 private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>(); 80 private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>();
81 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); 81 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
82 82
83 #region INonSharedRegionModule methods 83 #region INonSharedRegionModule methods
84 public virtual void Initialise(IConfigSource config) 84 public virtual void Initialise(IConfigSource config)
85 { 85 {
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ClientStack.Linden
170 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues) 170 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
171 { 171 {
172 MainConsole.Instance.OutputFormat( 172 MainConsole.Instance.OutputFormat(
173 "For agent {0} there are {1} messages queued for send.", 173 "For agent {0} there are {1} messages queued for send.",
174 kvp.Key, kvp.Value.Count); 174 kvp.Key, kvp.Value.Count);
175 } 175 }
176 } 176 }
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
189 { 189 {
190 if (DebugLevel > 0) 190 if (DebugLevel > 0)
191 m_log.DebugFormat( 191 m_log.DebugFormat(
192 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", 192 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
193 agentId, m_scene.RegionInfo.RegionName); 193 agentId, m_scene.RegionInfo.RegionName);
194 194
195 queues[agentId] = new Queue<OSD>(); 195 queues[agentId] = new Queue<OSD>();
@@ -238,13 +238,13 @@ namespace OpenSim.Region.ClientStack.Linden
238 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}", 238 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}",
239 avatarID, evMap["message"], m_scene.Name); 239 avatarID, evMap["message"], m_scene.Name);
240 } 240 }
241 } 241 }
242 catch (NullReferenceException e) 242 catch (NullReferenceException e)
243 { 243 {
244 m_log.Error("[EVENTQUEUE] Caught exception: " + e); 244 m_log.Error("[EVENTQUEUE] Caught exception: " + e);
245 return false; 245 return false;
246 } 246 }
247 247
248 return true; 248 return true;
249 } 249 }
250 250
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ClientStack.Linden
309 309
310 // push markers to handle old responses still waiting 310 // push markers to handle old responses still waiting
311 // this will cost at most viewer getting two forced noevents 311 // this will cost at most viewer getting two forced noevents
312 // even being a new queue better be safe 312 // even being a new queue better be safe
313 queue.Enqueue(null); 313 queue.Enqueue(null);
314 queue.Enqueue(null); // one should be enough 314 queue.Enqueue(null); // one should be enough
315 315
316 lock (m_AvatarQueueUUIDMapping) 316 lock (m_AvatarQueueUUIDMapping)
317 { 317 {
318 eventQueueGetUUID = UUID.Random(); 318 eventQueueGetUUID = UUID.Random();
@@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack.Linden
336 { 336 {
337 // push markers to handle old responses still waiting 337 // push markers to handle old responses still waiting
338 // this will cost at most viewer getting two forced noevents 338 // this will cost at most viewer getting two forced noevents
339 // even being a new queue better be safe 339 // even being a new queue better be safe
340 queue.Enqueue(null); 340 queue.Enqueue(null);
341 queue.Enqueue(null); // one should be enough 341 queue.Enqueue(null); // one should be enough
342 342
@@ -405,7 +405,7 @@ namespace OpenSim.Region.ClientStack.Linden
405 } 405 }
406 public void Drop(UUID requestID, UUID pAgentId) 406 public void Drop(UUID requestID, UUID pAgentId)
407 { 407 {
408 // do nothing for now, hope client close will do it 408 // do nothing for now, hope client close will do it
409 } 409 }
410 410
411 public Hashtable GetEvents(UUID requestID, UUID pAgentId) 411 public Hashtable GetEvents(UUID requestID, UUID pAgentId)
@@ -437,7 +437,7 @@ namespace OpenSim.Region.ClientStack.Linden
437 negativeID = true; 437 negativeID = true;
438 thisID = -thisID; 438 thisID = -thisID;
439 } 439 }
440 440
441 while (queue.Count > 0) 441 while (queue.Count > 0)
442 { 442 {
443 element = queue.Dequeue(); 443 element = queue.Dequeue();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.ClientStack.Linden
477 // if there where no elements before a marker send a NoEvents 477 // if there where no elements before a marker send a NoEvents
478 if (array.Count == 0) 478 if (array.Count == 0)
479 return NoEvents(requestID, pAgentId); 479 return NoEvents(requestID, pAgentId);
480 480
481 Hashtable responsedata = new Hashtable(); 481 Hashtable responsedata = new Hashtable();
482 responsedata["int_response_code"] = 200; 482 responsedata["int_response_code"] = 200;
483 responsedata["content_type"] = "application/xml"; 483 responsedata["content_type"] = "application/xml";
@@ -500,7 +500,7 @@ namespace OpenSim.Region.ClientStack.Linden
500 responsedata["http_protocol_version"] = "HTTP/1.0"; 500 responsedata["http_protocol_version"] = "HTTP/1.0";
501 return responsedata; 501 return responsedata;
502 } 502 }
503 503
504 public void DisableSimulator(ulong handle, UUID avatarID) 504 public void DisableSimulator(ulong handle, UUID avatarID)
505 { 505 {
506 OSD item = EventQueueHelper.DisableSimulator(handle); 506 OSD item = EventQueueHelper.DisableSimulator(handle);
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
518 } 518 }
519 519
520 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, 520 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath,
521 ulong regionHandle, int regionSizeX, int regionSizeY) 521 ulong regionHandle, int regionSizeX, int regionSizeY)
522 { 522 {
523 if (DebugLevel > 0) 523 if (DebugLevel > 0)
524 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}", 524 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}",
@@ -528,9 +528,9 @@ namespace OpenSim.Region.ClientStack.Linden
528 Enqueue(item, avatarID); 528 Enqueue(item, avatarID);
529 } 529 }
530 530
531 public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess, 531 public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess,
532 IPEndPoint regionExternalEndPoint, 532 IPEndPoint regionExternalEndPoint,
533 uint locationID, uint flags, string capsURL, 533 uint locationID, uint flags, string capsURL,
534 UUID avatarID, int regionSizeX, int regionSizeY) 534 UUID avatarID, int regionSizeX, int regionSizeY)
535 { 535 {
536 if (DebugLevel > 0) 536 if (DebugLevel > 0)
@@ -560,15 +560,15 @@ namespace OpenSim.Region.ClientStack.Linden
560 uint timeStamp, bool offline, int parentEstateID, Vector3 position, 560 uint timeStamp, bool offline, int parentEstateID, Vector3 position,
561 uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket) 561 uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket)
562 { 562 {
563 OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, 563 OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
564 timeStamp, offline, parentEstateID, position, ttl, transactionID, 564 timeStamp, offline, parentEstateID, position, ttl, transactionID,
565 fromGroup, binaryBucket); 565 fromGroup, binaryBucket);
566 Enqueue(item, toAgent); 566 Enqueue(item, toAgent);
567 //m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item); 567 //m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item);
568 568
569 } 569 }
570 570
571 public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, 571 public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
572 bool isModerator, bool textMute, bool isEnterorLeave) 572 bool isModerator, bool textMute, bool isEnterorLeave)
573 { 573 {
574 OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat, 574 OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat,
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
index 5e0bd71..e1e88ae 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.ClientStack.Linden
105 105
106 return BuildEvent("DisableSimulator", llsdBody); 106 return BuildEvent("DisableSimulator", llsdBody);
107 } 107 }
108 108
109 public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, 109 public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
110 IPEndPoint newRegionExternalEndPoint, 110 IPEndPoint newRegionExternalEndPoint,
111 string capsURL, UUID agentID, UUID sessionID, 111 string capsURL, UUID agentID, UUID sessionID,
@@ -194,13 +194,13 @@ namespace OpenSim.Region.ClientStack.Linden
194 script.Add("ItemID", OSD.FromUUID(itemID)); 194 script.Add("ItemID", OSD.FromUUID(itemID));
195 script.Add("Running", OSD.FromBoolean(running)); 195 script.Add("Running", OSD.FromBoolean(running));
196 script.Add("Mono", OSD.FromBoolean(mono)); 196 script.Add("Mono", OSD.FromBoolean(mono));
197 197
198 OSDArray scriptArr = new OSDArray(); 198 OSDArray scriptArr = new OSDArray();
199 scriptArr.Add(script); 199 scriptArr.Add(script);
200 200
201 OSDMap body = new OSDMap(); 201 OSDMap body = new OSDMap();
202 body.Add("Script", scriptArr); 202 body.Add("Script", scriptArr);
203 203
204 return BuildEvent("ScriptRunningReply", body); 204 return BuildEvent("ScriptRunningReply", body);
205 } 205 }
206 206
@@ -243,7 +243,7 @@ namespace OpenSim.Region.ClientStack.Linden
243 { 243 {
244 OSDMap messageParams = new OSDMap(15); 244 OSDMap messageParams = new OSDMap(15);
245 messageParams.Add("type", new OSDInteger((int)dialog)); 245 messageParams.Add("type", new OSDInteger((int)dialog));
246 246
247 OSDArray positionArray = new OSDArray(3); 247 OSDArray positionArray = new OSDArray(3);
248 positionArray.Add(OSD.FromReal(position.X)); 248 positionArray.Add(OSD.FromReal(position.X));
249 positionArray.Add(OSD.FromReal(position.Y)); 249 positionArray.Add(OSD.FromReal(position.Y));
@@ -423,7 +423,7 @@ namespace OpenSim.Region.ClientStack.Linden
423 QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); 423 QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID));
424 QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); 424 QueryDataMap.Add("ProductSku", OSD.FromInteger(0));
425 QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); 425 QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price));
426 426
427 QueryData.Add(QueryDataMap); 427 QueryData.Add(QueryDataMap);
428 } 428 }
429 body.Add("QueryData", QueryData); 429 body.Add("QueryData", QueryData);
@@ -444,7 +444,7 @@ namespace OpenSim.Region.ClientStack.Linden
444 public static OSD partPhysicsProperties(uint localID, byte physhapetype, 444 public static OSD partPhysicsProperties(uint localID, byte physhapetype,
445 float density, float friction, float bounce, float gravmod) 445 float density, float friction, float bounce, float gravmod)
446 { 446 {
447 447
448 OSDMap physinfo = new OSDMap(6); 448 OSDMap physinfo = new OSDMap(6);
449 physinfo["LocalID"] = localID; 449 physinfo["LocalID"] = localID;
450 physinfo["Density"] = density; 450 physinfo["Density"] = density;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index 1e629bd..ee3f4f1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
180 TestHelpers.InMethod(); 180 TestHelpers.InMethod();
181// TestHelpers.EnableLogging(); 181// TestHelpers.EnableLogging();
182 182
183 UUID npcId 183 UUID npcId
184 = m_npcMod.CreateNPC( 184 = m_npcMod.CreateNPC(
185 "John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance()); 185 "John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance());
186 186
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index f66ef57..ae18bc1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.Linden
55 { 55 {
56// private static readonly ILog m_log = 56// private static readonly ILog m_log =
57// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
58 58
59 private Scene m_scene; 59 private Scene m_scene;
60 private IAssetService m_AssetService; 60 private IAssetService m_AssetService;
61 private bool m_Enabled = true; 61 private bool m_Enabled = true;
@@ -64,7 +64,7 @@ namespace OpenSim.Region.ClientStack.Linden
64 private string m_URL2; 64 private string m_URL2;
65 private string m_RedirectURL = null; 65 private string m_RedirectURL = null;
66 private string m_RedirectURL2 = null; 66 private string m_RedirectURL2 = null;
67 67
68 struct aPollRequest 68 struct aPollRequest
69 { 69 {
70 public PollServiceMeshEventArgs thepoll; 70 public PollServiceMeshEventArgs thepoll;
@@ -132,7 +132,7 @@ namespace OpenSim.Region.ClientStack.Linden
132 return; 132 return;
133 133
134 m_scene = pScene; 134 m_scene = pScene;
135 135
136 m_assetService = pScene.AssetService; 136 m_assetService = pScene.AssetService;
137 } 137 }
138 138
@@ -342,7 +342,7 @@ namespace OpenSim.Region.ClientStack.Linden
342 { 342 {
343 string capUrl = "/CAPS/" + UUID.Random() + "/"; 343 string capUrl = "/CAPS/" + UUID.Random() + "/";
344 344
345 // Register this as a poll service 345 // Register this as a poll service
346 PollServiceMeshEventArgs args = new PollServiceMeshEventArgs(capUrl, agentID, m_scene); 346 PollServiceMeshEventArgs args = new PollServiceMeshEventArgs(capUrl, agentID, m_scene);
347 347
348 args.Type = PollServiceEventArgs.EventType.Mesh; 348 args.Type = PollServiceEventArgs.EventType.Mesh;
@@ -394,7 +394,7 @@ namespace OpenSim.Region.ClientStack.Linden
394 private readonly Scene m_scene; 394 private readonly Scene m_scene;
395 private ThrottleOutPacketType Throttle; 395 private ThrottleOutPacketType Throttle;
396 private readonly UUID User; 396 private readonly UUID User;
397 397
398 public MeshCapsDataThrottler(int pBytes, int max, int min, Scene pScene, UUID puser) 398 public MeshCapsDataThrottler(int pBytes, int max, int min, Scene pScene, UUID puser)
399 { 399 {
400 ThrottleBytes = pBytes; 400 ThrottleBytes = pBytes;
@@ -422,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden
422 // Normal 422 // Normal
423 if (BytesSent <= ThrottleBytes) 423 if (BytesSent <= ThrottleBytes)
424 { 424 {
425 BytesSent += response.bytes; 425 BytesSent += response.bytes;
426 return true; 426 return true;
427 } 427 }
428 else 428 else
@@ -432,7 +432,7 @@ namespace OpenSim.Region.ClientStack.Linden
432 } 432 }
433 return haskey; 433 return haskey;
434 } 434 }
435 435
436 public void ProcessTime() 436 public void ProcessTime()
437 { 437 {
438 PassTime(); 438 PassTime();
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 14a59fe..0c20e04 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.Linden
81 new OpenMetaverse.BlockingQueue<aPollRequest>(); 81 new OpenMetaverse.BlockingQueue<aPollRequest>();
82 82
83 private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>(); 83 private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>();
84 84
85 private string m_Url = "localhost"; 85 private string m_Url = "localhost";
86 86
87 #region ISharedRegionModule Members 87 #region ISharedRegionModule Members
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ClientStack.Linden
148 } 148 }
149 private int ExtractImageThrottle(byte[] pthrottles) 149 private int ExtractImageThrottle(byte[] pthrottles)
150 { 150 {
151 151
152 byte[] adjData; 152 byte[] adjData;
153 int pos = 0; 153 int pos = 0;
154 154
@@ -195,10 +195,10 @@ namespace OpenSim.Region.ClientStack.Linden
195 if(m_NumberScenes <= 0 && m_workerThreads != null) 195 if(m_NumberScenes <= 0 && m_workerThreads != null)
196 { 196 {
197 m_log.DebugFormat("[GetTextureModule] Closing"); 197 m_log.DebugFormat("[GetTextureModule] Closing");
198 198
199 foreach (Thread t in m_workerThreads) 199 foreach (Thread t in m_workerThreads)
200 Watchdog.AbortThread(t.ManagedThreadId); 200 Watchdog.AbortThread(t.ManagedThreadId);
201 201
202 m_queue.Clear(); 202 m_queue.Clear();
203 } 203 }
204 } 204 }
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.Linden
222 private Scene m_scene; 222 private Scene m_scene;
223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); 223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000);
224 public PollServiceTextureEventArgs(UUID pId, Scene scene) : 224 public PollServiceTextureEventArgs(UUID pId, Scene scene) :
225 base(null, "", null, null, null, pId, int.MaxValue) 225 base(null, "", null, null, null, pId, int.MaxValue)
226 { 226 {
227 m_scene = scene; 227 m_scene = scene;
228 // x is request id, y is userid 228 // x is request id, y is userid
@@ -258,7 +258,7 @@ namespace OpenSim.Region.ClientStack.Linden
258 reqinfo.reqID = x; 258 reqinfo.reqID = x;
259 reqinfo.request = y; 259 reqinfo.request = y;
260 reqinfo.send503 = false; 260 reqinfo.send503 = false;
261 261
262 lock (responses) 262 lock (responses)
263 { 263 {
264 if (responses.Count > 0) 264 if (responses.Count > 0)
@@ -317,7 +317,7 @@ namespace OpenSim.Region.ClientStack.Linden
317 Hashtable headers = new Hashtable(); 317 Hashtable headers = new Hashtable();
318 headers["Retry-After"] = 30; 318 headers["Retry-After"] = 30;
319 response["headers"] = headers; 319 response["headers"] = headers;
320 320
321 lock (responses) 321 lock (responses)
322 responses[requestID] = new aPollResponse() {bytes = 0, response = response}; 322 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
323 323
@@ -334,13 +334,13 @@ namespace OpenSim.Region.ClientStack.Linden
334 response["content_type"] = "text/plain"; 334 response["content_type"] = "text/plain";
335 response["keepalive"] = false; 335 response["keepalive"] = false;
336 response["reusecontext"] = false; 336 response["reusecontext"] = false;
337 337
338 lock (responses) 338 lock (responses)
339 responses[requestID] = new aPollResponse() {bytes = 0, response = response}; 339 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
340 340
341 return; 341 return;
342 } 342 }
343 343
344 response = m_getTextureHandler.Handle(requestinfo.request); 344 response = m_getTextureHandler.Handle(requestinfo.request);
345 lock (responses) 345 lock (responses)
346 { 346 {
@@ -349,8 +349,8 @@ namespace OpenSim.Region.ClientStack.Linden
349 bytes = (int) response["int_bytes"], 349 bytes = (int) response["int_bytes"],
350 response = response 350 response = response
351 }; 351 };
352 352
353 } 353 }
354 m_throttler.ProcessTime(); 354 m_throttler.ProcessTime();
355 } 355 }
356 356
@@ -368,16 +368,16 @@ namespace OpenSim.Region.ClientStack.Linden
368 { 368 {
369 string capUrl = "/CAPS/" + UUID.Random() + "/"; 369 string capUrl = "/CAPS/" + UUID.Random() + "/";
370 370
371 // Register this as a poll service 371 // Register this as a poll service
372 PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); 372 PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
373 373
374 args.Type = PollServiceEventArgs.EventType.Texture; 374 args.Type = PollServiceEventArgs.EventType.Texture;
375 MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); 375 MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
376 376
377 string hostName = m_scene.RegionInfo.ExternalHostName; 377 string hostName = m_scene.RegionInfo.ExternalHostName;
378 uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; 378 uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
379 string protocol = "http"; 379 string protocol = "http";
380 380
381 if (MainServer.Instance.UseSSL) 381 if (MainServer.Instance.UseSSL)
382 { 382 {
383 hostName = MainServer.Instance.SSLCommonName; 383 hostName = MainServer.Instance.SSLCommonName;
@@ -484,5 +484,5 @@ namespace OpenSim.Region.ClientStack.Linden
484 } 484 }
485 public int ThrottleBytes; 485 public int ThrottleBytes;
486 } 486 }
487 } 487 }
488} 488}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
index 1b68603..44bf1a5 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.Linden
133// data["username"] = sp.Firstname + "." + sp.Lastname; 133// data["username"] = sp.Firstname + "." + sp.Lastname;
134// data["display_name_next_update"] = new OSDDate(DateTime.Now); 134// data["display_name_next_update"] = new OSDDate(DateTime.Now);
135// data["legacy_first_name"] = sp.Firstname; 135// data["legacy_first_name"] = sp.Firstname;
136 data["mesh_upload_status"] = "valid"; 136 data["mesh_upload_status"] = "valid";
137// data["display_name"] = sp.Firstname + " " + sp.Lastname; 137// data["display_name"] = sp.Firstname + " " + sp.Lastname;
138// data["legacy_last_name"] = sp.Lastname; 138// data["legacy_last_name"] = sp.Lastname;
139// data["id"] = m_agentID; 139// data["id"] = m_agentID;
@@ -141,7 +141,7 @@ namespace OpenSim.Region.ClientStack.Linden
141 141
142 //Send back data 142 //Send back data
143 Hashtable responsedata = new Hashtable(); 143 Hashtable responsedata = new Hashtable();
144 responsedata["int_response_code"] = 200; 144 responsedata["int_response_code"] = 200;
145 responsedata["content_type"] = "text/plain"; 145 responsedata["content_type"] = "text/plain";
146 responsedata["keepalive"] = false; 146 responsedata["keepalive"] = false;
147 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data); 147 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
index 94f8bc1..189fa36 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ClientStack.Linden
47 { 47 {
48// private static readonly ILog m_log = 48// private static readonly ILog m_log =
49// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 50
51 private Scene m_scene; 51 private Scene m_scene;
52 52
53 #region INonSharedRegionModule Members 53 #region INonSharedRegionModule Members
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.Linden
76 } 76 }
77 77
78 public void Close() 78 public void Close()
79 { 79 {
80 } 80 }
81 81
82 public string Name 82 public string Name
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 713125c..6874662 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
189 if (i == 0) 189 if (i == 0)
190 { 190 {
191 rootpos = obj.Position; 191 rootpos = obj.Position;
192// rootrot = obj.Rotation; 192// rootrot = obj.Rotation;
193 } 193 }
194 194
195 // Combine the extraparams data into it's ugly blob again.... 195 // Combine the extraparams data into it's ugly blob again....
@@ -321,7 +321,7 @@ namespace OpenSim.Region.ClientStack.Linden
321 pbs.TextureEntry = tmp.GetBytes(); 321 pbs.TextureEntry = tmp.GetBytes();
322 prim.Shape = pbs; 322 prim.Shape = pbs;
323 prim.Scale = obj.Scale; 323 prim.Scale = obj.Scale;
324 324
325 SceneObjectGroup grp = new SceneObjectGroup(); 325 SceneObjectGroup grp = new SceneObjectGroup();
326 326
327 grp.SetRootPart(prim); 327 grp.SetRootPart(prim);
@@ -329,21 +329,21 @@ namespace OpenSim.Region.ClientStack.Linden
329 if (i == 0) 329 if (i == 0)
330 { 330 {
331 rootGroup = grp; 331 rootGroup = grp;
332 332
333 } 333 }
334 grp.AttachToScene(m_scene); 334 grp.AttachToScene(m_scene);
335 grp.AbsolutePosition = obj.Position; 335 grp.AbsolutePosition = obj.Position;
336 prim.RotationOffset = obj.Rotation; 336 prim.RotationOffset = obj.Rotation;
337 337
338 // Required for linking 338 // Required for linking
339 grp.RootPart.ClearUpdateSchedule(); 339 grp.RootPart.ClearUpdateSchedule();
340 340
341 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) 341 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
342 { 342 {
343 m_scene.AddSceneObject(grp); 343 m_scene.AddSceneObject(grp);
344 grp.AbsolutePosition = obj.Position; 344 grp.AbsolutePosition = obj.Position;
345 } 345 }
346 346
347 allparts[i] = grp; 347 allparts[i] = grp;
348 } 348 }
349 349
@@ -359,7 +359,7 @@ namespace OpenSim.Region.ClientStack.Linden
359 pos 359 pos
360 = m_scene.GetNewRezLocation( 360 = m_scene.GetNewRezLocation(
361 Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false); 361 Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false);
362 362
363 responsedata["int_response_code"] = 200; //501; //410; //404; 363 responsedata["int_response_code"] = 200; //501; //410; //404;
364 responsedata["content_type"] = "text/plain"; 364 responsedata["content_type"] = "text/plain";
365 responsedata["keepalive"] = false; 365 responsedata["keepalive"] = false;
@@ -367,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden
367 367
368 return responsedata; 368 return responsedata;
369 } 369 }
370 370
371 private string ConvertUintToBytes(uint val) 371 private string ConvertUintToBytes(uint val)
372 { 372 {
373 byte[] resultbytes = Utils.UIntToBytes(val); 373 byte[] resultbytes = Utils.UIntToBytes(val);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
index 67272dd..f36826b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenCaps")] 8[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenCaps")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
index 5196368..b3e3ac3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden
58 { 58 {
59// private static readonly ILog m_log = 59// private static readonly ILog m_log =
60// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 60// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
61 61
62 private Scene m_scene; 62 private Scene m_scene;
63 private IEventQueue m_eventQueue; 63 private IEventQueue m_eventQueue;
64 private Commands m_commands = new Commands(); 64 private Commands m_commands = new Commands();
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.Linden
155 155
156 SendConsoleOutput(agentID, reply); 156 SendConsoleOutput(agentID, reply);
157 } 157 }
158 158
159 public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn) 159 public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn)
160 { 160 {
161 m_commands.AddCommand(module, shared, command, help, longhelp, fn); 161 m_commands.AddCommand(module, shared, command, help, longhelp, fn);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index f7259a6..39f5baf 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden
50 /// This is required for uploading Mesh. 50 /// This is required for uploading Mesh.
51 /// Since is accepts an open-ended response, we also send more information 51 /// Since is accepts an open-ended response, we also send more information
52 /// for viewers that care to interpret it. 52 /// for viewers that care to interpret it.
53 /// 53 ///
54 /// NOTE: Part of this code was adapted from the Aurora project, specifically 54 /// NOTE: Part of this code was adapted from the Aurora project, specifically
55 /// the normal part of the response in the capability handler. 55 /// the normal part of the response in the capability handler.
56 /// </remarks> 56 /// </remarks>
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ClientStack.Linden
82 IConfig config = source.Configs["SimulatorFeatures"]; 82 IConfig config = source.Configs["SimulatorFeatures"];
83 83
84 if (config != null) 84 if (config != null)
85 { 85 {
86 // 86 //
87 // All this is obsolete since getting these features from the grid service!! 87 // All this is obsolete since getting these features from the grid service!!
88 // Will be removed after the next release 88 // Will be removed after the next release
@@ -251,7 +251,7 @@ namespace OpenSim.Region.ClientStack.Linden
251 251
252 //Send back data 252 //Send back data
253 Hashtable responsedata = new Hashtable(); 253 Hashtable responsedata = new Hashtable();
254 responsedata["int_response_code"] = 200; 254 responsedata["int_response_code"] = 200;
255 responsedata["content_type"] = "text/plain"; 255 responsedata["content_type"] = "text/plain";
256 responsedata["keepalive"] = false; 256 responsedata["keepalive"] = false;
257 257
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
index db16ccb..6ffed4d 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
@@ -151,7 +151,7 @@ namespace OpenSim.Region.ClientStack.Linden.Caps.Tests
151 OSDMap responseOsd = (OSDMap)OSDParser.DeserializeLLSDXml(context.ResponseBody); 151 OSDMap responseOsd = (OSDMap)OSDParser.DeserializeLLSDXml(context.ResponseBody);
152 OSDArray foldersOsd = (OSDArray)responseOsd["folders"]; 152 OSDArray foldersOsd = (OSDArray)responseOsd["folders"];
153 OSDMap folderOsd = (OSDMap)foldersOsd[0]; 153 OSDMap folderOsd = (OSDMap)foldersOsd[0];
154 154
155 // A sanity check that the response has the expected number of descendents for a default inventory 155 // A sanity check that the response has the expected number of descendents for a default inventory
156 // TODO: Need a more thorough check. 156 // TODO: Need a more thorough check.
157 Assert.That((int)folderOsd["descendents"], Is.EqualTo(16)); 157 Assert.That((int)folderOsd["descendents"], Is.EqualTo(16));
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
index 8fd8d1f..dfe097e 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ClientStack.Linden
84 public void AddRegion(Scene s) 84 public void AddRegion(Scene s)
85 { 85 {
86 m_scene = s; 86 m_scene = s;
87 87
88 } 88 }
89 89
90 public void RemoveRegion(Scene s) 90 public void RemoveRegion(Scene s)
@@ -94,14 +94,14 @@ namespace OpenSim.Region.ClientStack.Linden
94 s.EventManager.OnRemovePresence -= DeRegisterPresence; 94 s.EventManager.OnRemovePresence -= DeRegisterPresence;
95 m_BakedTextureModule = null; 95 m_BakedTextureModule = null;
96 m_scene = null; 96 m_scene = null;
97 } 97 }
98 98
99 public void RegionLoaded(Scene s) 99 public void RegionLoaded(Scene s)
100 { 100 {
101 m_scene.EventManager.OnRegisterCaps += RegisterCaps; 101 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
102 m_scene.EventManager.OnNewPresence += RegisterNewPresence; 102 m_scene.EventManager.OnNewPresence += RegisterNewPresence;
103 m_scene.EventManager.OnRemovePresence += DeRegisterPresence; 103 m_scene.EventManager.OnRemovePresence += DeRegisterPresence;
104 104
105 } 105 }
106 106
107 private void DeRegisterPresence(UUID agentId) 107 private void DeRegisterPresence(UUID agentId)
@@ -205,7 +205,7 @@ namespace OpenSim.Region.ClientStack.Linden
205 } 205 }
206 } 206 }
207 else 207 else
208 { 208 {
209 for (int i = 0; i < maxCacheitemsLoop; i++) 209 for (int i = 0; i < maxCacheitemsLoop; i++)
210 { 210 {
211 if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex) 211 if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex)
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ClientStack.Linden
285 avatarhandler.UploadBakedTexture, 285 avatarhandler.UploadBakedTexture,
286 "UploadBakedTexture", 286 "UploadBakedTexture",
287 agentID.ToString())); 287 agentID.ToString()));
288 288
289 } 289 }
290 else 290 else
291 { 291 {
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index ba4fb76..e0ec842 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -456,7 +456,7 @@ namespace OpenSim.Region.ClientStack.Linden
456 catch (Exception e) 456 catch (Exception e)
457 { 457 {
458 m_log.ErrorFormat( 458 m_log.ErrorFormat(
459 "[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}", 459 "[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}",
460 poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", e); 460 poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", e);
461 } 461 }
462 } 462 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
index 15d6f7f..0a6785c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// Sends packets for this texture to a client until packetsToSend is 101 /// Sends packets for this texture to a client until packetsToSend is
102 /// hit or the transfer completes 102 /// hit or the transfer completes
103 /// </summary> 103 /// </summary>
104 /// <param name="client">Reference to the client that the packets are destined for</param> 104 /// <param name="client">Reference to the client that the packets are destined for</param>
@@ -198,7 +198,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
198 m_currentPacket = m_stopPacket; 198 m_currentPacket = m_stopPacket;
199 return; 199 return;
200 } 200 }
201 201
202 if (DiscardLevel >= 0 || m_stopPacket == 0) 202 if (DiscardLevel >= 0 || m_stopPacket == 0)
203 { 203 {
204 // This shouldn't happen, but if it does, we really can't proceed 204 // This shouldn't happen, but if it does, we really can't proceed
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 27ca740..dba2872 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -434,7 +434,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
434 /// Entity update queues 434 /// Entity update queues
435 /// </summary> 435 /// </summary>
436 public PriorityQueue EntityUpdateQueue { get { return m_entityUpdates; } } 436 public PriorityQueue EntityUpdateQueue { get { return m_entityUpdates; } }
437 437
438 /// <summary> 438 /// <summary>
439 /// First name of the agent/avatar represented by the client 439 /// First name of the agent/avatar represented by the client
440 /// </summary> 440 /// </summary>
@@ -478,7 +478,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
478 public List<uint> SelectedObjects {get; private set;} 478 public List<uint> SelectedObjects {get; private set;}
479 479
480 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } 480 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } }
481 481
482 482
483 #endregion Properties 483 #endregion Properties
484 484
@@ -554,7 +554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
554 // there is some unidentified connection problem, not where we have issues due to deadlock 554 // there is some unidentified connection problem, not where we have issues due to deadlock
555 if (!IsActive && !force) 555 if (!IsActive && !force)
556 { 556 {
557 m_log.DebugFormat( "{0} Not attempting to close inactive client {1} in {2} since force flag is not set", 557 m_log.DebugFormat( "{0} Not attempting to close inactive client {1} in {2} since force flag is not set",
558 LogHeader, Name, m_scene.Name); 558 LogHeader, Name, m_scene.Name);
559 559
560 return; 560 return;
@@ -713,13 +713,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
713 /// <param name="packetType"></param> 713 /// <param name="packetType"></param>
714 /// <param name="handler"></param> 714 /// <param name="handler"></param>
715 /// <param name="doAsync"> 715 /// <param name="doAsync">
716 /// If true, when the packet is received handle it on a different thread. Whether this is given direct to 716 /// If true, when the packet is received handle it on a different thread. Whether this is given direct to
717 /// a threadpool thread or placed in a queue depends on the inEngine parameter. 717 /// a threadpool thread or placed in a queue depends on the inEngine parameter.
718 /// </param> 718 /// </param>
719 /// <param name="inEngine"> 719 /// <param name="inEngine">
720 /// If async is false then this parameter is ignored. 720 /// If async is false then this parameter is ignored.
721 /// If async is true and inEngine is false, then the packet is sent directly to a 721 /// If async is true and inEngine is false, then the packet is sent directly to a
722 /// threadpool thread. 722 /// threadpool thread.
723 /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine. 723 /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine.
724 /// This may result in slower handling but reduces the risk of overloading the simulator when there are many 724 /// This may result in slower handling but reduces the risk of overloading the simulator when there are many
725 /// simultaneous async requests. 725 /// simultaneous async requests.
@@ -820,7 +820,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
820 public void ProcessSpecificPacketAsync(object state) 820 public void ProcessSpecificPacketAsync(object state)
821 { 821 {
822 AsyncPacketProcess packetObject = (AsyncPacketProcess)state; 822 AsyncPacketProcess packetObject = (AsyncPacketProcess)state;
823 823
824 try 824 try
825 { 825 {
826 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack); 826 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack);
@@ -830,7 +830,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
830 // Make sure that we see any exception caused by the asynchronous operation. 830 // Make sure that we see any exception caused by the asynchronous operation.
831 m_log.Error( 831 m_log.Error(
832 string.Format( 832 string.Format(
833 "[LLCLIENTVIEW]: Caught exception while processing {0} for {1} ", packetObject.Pack, Name), 833 "[LLCLIENTVIEW]: Caught exception while processing {0} for {1} ", packetObject.Pack, Name),
834 e); 834 e);
835 } 835 }
836 } 836 }
@@ -976,7 +976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
976 if (im.imSessionID == UUID.Zero.Guid) 976 if (im.imSessionID == UUID.Zero.Guid)
977 msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID); 977 msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID);
978 else 978 else
979 msg.MessageBlock.ID = new UUID(im.imSessionID); 979 msg.MessageBlock.ID = new UUID(im.imSessionID);
980 msg.MessageBlock.Offline = im.offline; 980 msg.MessageBlock.Offline = im.offline;
981 msg.MessageBlock.ParentEstateID = im.ParentEstateID; 981 msg.MessageBlock.ParentEstateID = im.ParentEstateID;
982 msg.MessageBlock.Position = im.Position; 982 msg.MessageBlock.Position = im.Position;
@@ -1301,7 +1301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1301 1301
1302 // Legacy form of invocation that passes around a bare data array. 1302 // Legacy form of invocation that passes around a bare data array.
1303 // Just ignore what was passed and use the real terrain info that is part of the scene. 1303 // Just ignore what was passed and use the real terrain info that is part of the scene.
1304 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI, 1304 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI,
1305 // there is a special form for specifying multiple terrain patches to send. 1305 // there is a special form for specifying multiple terrain patches to send.
1306 // The form is to pass 'px' as negative the number of patches to send and to 1306 // The form is to pass 'px' as negative the number of patches to send and to
1307 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px' 1307 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px'
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1396 public virtual void SendWindData(int version, Vector2[] windSpeeds) 1396 public virtual void SendWindData(int version, Vector2[] windSpeeds)
1397 { 1397 {
1398// Vector2[] windSpeeds = (Vector2[])o; 1398// Vector2[] windSpeeds = (Vector2[])o;
1399 1399
1400 ulong handle = this.Scene.RegionInfo.RegionHandle; 1400 ulong handle = this.Scene.RegionInfo.RegionHandle;
1401 bool isNewData; 1401 bool isNewData;
1402 lock(lastWindPackets) 1402 lock(lastWindPackets)
@@ -1780,7 +1780,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1780 m_entityUpdates.Remove(localIDs); 1780 m_entityUpdates.Remove(localIDs);
1781 1781
1782 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); 1782 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
1783 1783
1784 int perpacket = localIDs.Count; 1784 int perpacket = localIDs.Count;
1785 if(perpacket > 200) 1785 if(perpacket > 200)
1786 perpacket = 200; 1786 perpacket = 200;
@@ -2545,7 +2545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2545 for (int i = 0; i < buttonlabels.Length; i++) 2545 for (int i = 0; i < buttonlabels.Length; i++)
2546 { 2546 {
2547 buttons[i] = new ScriptDialogPacket.ButtonsBlock(); 2547 buttons[i] = new ScriptDialogPacket.ButtonsBlock();
2548 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24); 2548 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24);
2549 } 2549 }
2550 dialog.Buttons = buttons; 2550 dialog.Buttons = buttons;
2551 2551
@@ -2863,15 +2863,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2863 public void SendSelectedPartsProprieties(List<ISceneEntity> parts) 2863 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
2864 { 2864 {
2865/* not in use 2865/* not in use
2866 // udp part 2866 // udp part
2867 ObjectPropertiesPacket packet = 2867 ObjectPropertiesPacket packet =
2868 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 2868 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
2869 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count]; 2869 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count];
2870 2870
2871 int i = 0; 2871 int i = 0;
2872 foreach(SceneObjectPart sop in parts) 2872 foreach(SceneObjectPart sop in parts)
2873 ObjectData[i++] = CreateObjectPropertiesBlock(sop); 2873 ObjectData[i++] = CreateObjectPropertiesBlock(sop);
2874 2874
2875 packet.ObjectData = ObjectData; 2875 packet.ObjectData = ObjectData;
2876 packet.Header.Zerocoded = true; 2876 packet.Header.Zerocoded = true;
2877 // udp send splits this mega packets correctly 2877 // udp send splits this mega packets correctly
@@ -3003,13 +3003,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3003 isWearable = ((AssetType) req.AssetInf.Type == 3003 isWearable = ((AssetType) req.AssetInf.Type ==
3004 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing); 3004 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing);
3005 3005
3006 3006
3007 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable); 3007 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable);
3008 3008
3009 3009
3010 //if (isWearable) 3010 //if (isWearable)
3011 // m_log.Debug((AssetType)req.AssetInf.Type); 3011 // m_log.Debug((AssetType)req.AssetInf.Type);
3012 3012
3013 TransferInfoPacket Transfer = new TransferInfoPacket(); 3013 TransferInfoPacket Transfer = new TransferInfoPacket();
3014 Transfer.TransferInfo.ChannelType = 2; 3014 Transfer.TransferInfo.ChannelType = 2;
3015 Transfer.TransferInfo.Status = 0; 3015 Transfer.TransferInfo.Status = 0;
@@ -3537,7 +3537,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3537 { 3537 {
3538 if(avatarID != AgentId) 3538 if(avatarID != AgentId)
3539 m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId"); 3539 m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId");
3540 3540
3541 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); 3541 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
3542 if(eq != null) 3542 if(eq != null)
3543 { 3543 {
@@ -3862,7 +3862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3862 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; 3862 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
3863 AgentWearablesUpdatePacket.WearableDataBlock awb; 3863 AgentWearablesUpdatePacket.WearableDataBlock awb;
3864 int idx = 0; 3864 int idx = 0;
3865 3865
3866 for (int i = 0; i < wearables.Length; i++) 3866 for (int i = 0; i < wearables.Length; i++)
3867 { 3867 {
3868 for (int j = 0; j < wearables[i].Count; j++) 3868 for (int j = 0; j < wearables[i].Count; j++)
@@ -3878,7 +3878,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3878 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", 3878 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
3879 // awb.ItemID, awb.AssetID, i, Name); 3879 // awb.ItemID, awb.AssetID, i, Name);
3880 } 3880 }
3881 } 3881 }
3882 3882
3883 OutPacket(aw, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); 3883 OutPacket(aw, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3884 } 3884 }
@@ -3955,7 +3955,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3955// m_log.DebugFormat( 3955// m_log.DebugFormat(
3956// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", 3956// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}",
3957// avatar.Name, avatar.UUID, Name, AgentId); 3957// avatar.Name, avatar.UUID, Name, AgentId);
3958 3958
3959 ScenePresence presence = avatar as ScenePresence; 3959 ScenePresence presence = avatar as ScenePresence;
3960 if (presence == null) 3960 if (presence == null)
3961 return; 3961 return;
@@ -3965,7 +3965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3965 3965
3966 objupdate.RegionData.RegionHandle = presence.RegionHandle; 3966 objupdate.RegionData.RegionHandle = presence.RegionHandle;
3967// objupdate.RegionData.TimeDilation = ushort.MaxValue; 3967// objupdate.RegionData.TimeDilation = ushort.MaxValue;
3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); 3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
3971 3971
@@ -4021,7 +4021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4021 4021
4022 #region Primitive Packet/Data Sending Methods 4022 #region Primitive Packet/Data Sending Methods
4023 4023
4024 4024
4025 /// <summary> 4025 /// <summary>
4026 /// Generate one of the object update packets based on PrimUpdateFlags 4026 /// Generate one of the object update packets based on PrimUpdateFlags
4027 /// and broadcast the packet to clients 4027 /// and broadcast the packet to clients
@@ -4054,18 +4054,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4054 uint priority = m_prioritizer.GetUpdatePriority(this, entity); 4054 uint priority = m_prioritizer.GetUpdatePriority(this, entity);
4055 4055
4056 lock (m_entityUpdates.SyncRoot) 4056 lock (m_entityUpdates.SyncRoot)
4057 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags)); 4057 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags));
4058 } 4058 }
4059 4059
4060 /// <summary> 4060 /// <summary>
4061 /// Requeue an EntityUpdate when it was not acknowledged by the client. 4061 /// Requeue an EntityUpdate when it was not acknowledged by the client.
4062 /// We will update the priority and put it in the correct queue, merging update flags 4062 /// We will update the priority and put it in the correct queue, merging update flags
4063 /// with any other updates that may be queued for the same entity. 4063 /// with any other updates that may be queued for the same entity.
4064 /// The original update time is used for the merged update. 4064 /// The original update time is used for the merged update.
4065 /// </summary> 4065 /// </summary>
4066 private void ResendPrimUpdate(EntityUpdate update) 4066 private void ResendPrimUpdate(EntityUpdate update)
4067 { 4067 {
4068 // If the update exists in priority queue, it will be updated. 4068 // If the update exists in priority queue, it will be updated.
4069 // If it does not exist then it will be added with the current (rather than its original) priority 4069 // If it does not exist then it will be added with the current (rather than its original) priority
4070 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity); 4070 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
4071 4071
@@ -4074,9 +4074,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4074 } 4074 }
4075 4075
4076 /// <summary> 4076 /// <summary>
4077 /// Requeue a list of EntityUpdates when they were not acknowledged by the client. 4077 /// Requeue a list of EntityUpdates when they were not acknowledged by the client.
4078 /// We will update the priority and put it in the correct queue, merging update flags 4078 /// We will update the priority and put it in the correct queue, merging update flags
4079 /// with any other updates that may be queued for the same entity. 4079 /// with any other updates that may be queued for the same entity.
4080 /// The original update time is used for the merged update. 4080 /// The original update time is used for the merged update.
4081 /// </summary> 4081 /// </summary>
4082 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket) 4082 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
@@ -4140,7 +4140,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4140 lock (m_entityUpdates.SyncRoot) 4140 lock (m_entityUpdates.SyncRoot)
4141 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) 4141 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue))
4142 break; 4142 break;
4143 4143
4144 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; 4144 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags;
4145 4145
4146 if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) 4146 if(updateFlags.HasFlag(PrimUpdateFlags.Kill))
@@ -4243,7 +4243,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4243 dpos = (float)Math.Sqrt(dpos) - bradius; 4243 dpos = (float)Math.Sqrt(dpos) - bradius;
4244 if(dpos > cullingrange) 4244 if(dpos > cullingrange)
4245 continue; 4245 continue;
4246 4246
4247 GroupsNeedFullUpdate.Add(grp); 4247 GroupsNeedFullUpdate.Add(grp);
4248 continue; 4248 continue;
4249 } 4249 }
@@ -4276,7 +4276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4276 bool canUseCompressed = true; 4276 bool canUseCompressed = true;
4277 bool canUseImproved = true; 4277 bool canUseImproved = true;
4278 4278
4279 4279
4280 // Compressed object updates only make sense for LL primitives 4280 // Compressed object updates only make sense for LL primitives
4281 if (!(update.Entity is SceneObjectPart)) 4281 if (!(update.Entity is SceneObjectPart))
4282 { 4282 {
@@ -4316,14 +4316,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4316 canUseImproved = false; 4316 canUseImproved = false;
4317 } 4317 }
4318 } 4318 }
4319 4319
4320 #endregion UpdateFlags to packet type conversion 4320 #endregion UpdateFlags to packet type conversion
4321 4321
4322 #region Block Construction 4322 #region Block Construction
4323 4323
4324 // TODO: Remove this once we can build compressed updates 4324 // TODO: Remove this once we can build compressed updates
4325 canUseCompressed = false; 4325 canUseCompressed = false;
4326 4326
4327 if (!canUseImproved && !canUseCompressed) 4327 if (!canUseImproved && !canUseCompressed)
4328 { 4328 {
4329 ObjectUpdatePacket.ObjectDataBlock ablock; 4329 ObjectUpdatePacket.ObjectDataBlock ablock;
@@ -4368,7 +4368,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4368 } 4368 }
4369 4369
4370 #region Packet Sending 4370 #region Packet Sending
4371 4371
4372 ushort timeDilation; 4372 ushort timeDilation;
4373 4373
4374 if(!IsActive) 4374 if(!IsActive)
@@ -4398,7 +4398,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4398 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4398 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4399 packet.RegionData.TimeDilation = timeDilation; 4399 packet.RegionData.TimeDilation = timeDilation;
4400 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count]; 4400 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count];
4401 4401
4402 for (int i = 0; i < objectUpdateBlocks.Count; i++) 4402 for (int i = 0; i < objectUpdateBlocks.Count; i++)
4403 packet.ObjectData[i] = objectUpdateBlocks[i]; 4403 packet.ObjectData[i] = objectUpdateBlocks[i];
4404 4404
@@ -4406,7 +4406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4406 4406
4407 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); }); 4407 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); });
4408 } 4408 }
4409 4409
4410 if (compressedUpdateBlocks.Count > 0) 4410 if (compressedUpdateBlocks.Count > 0)
4411 { 4411 {
4412 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); 4412 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
@@ -4421,7 +4421,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4421 4421
4422 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); }); 4422 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); });
4423 } 4423 }
4424 4424
4425 if (terseUpdateBlocks.Count > 0) 4425 if (terseUpdateBlocks.Count > 0)
4426 { 4426 {
4427 ImprovedTerseObjectUpdatePacket packet 4427 ImprovedTerseObjectUpdatePacket packet
@@ -4430,7 +4430,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4430 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4430 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4431 packet.RegionData.TimeDilation = timeDilation; 4431 packet.RegionData.TimeDilation = timeDilation;
4432 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count]; 4432 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count];
4433 4433
4434 for (int i = 0; i < terseUpdateBlocks.Count; i++) 4434 for (int i = 0; i < terseUpdateBlocks.Count; i++)
4435 packet.ObjectData[i] = terseUpdateBlocks[i]; 4435 packet.ObjectData[i] = terseUpdateBlocks[i];
4436 4436
@@ -4484,11 +4484,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4484 } 4484 }
4485 4485
4486// m_log.DebugFormat( 4486// m_log.DebugFormat(
4487// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}", 4487// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}",
4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); 4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name);
4489// 4489//
4490 } 4490 }
4491 4491
4492 public void ReprioritizeUpdates() 4492 public void ReprioritizeUpdates()
4493 { 4493 {
4494 lock (m_entityUpdates.SyncRoot) 4494 lock (m_entityUpdates.SyncRoot)
@@ -4600,7 +4600,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4600 foreach(SceneObjectPart p in grp.Parts) 4600 foreach(SceneObjectPart p in grp.Parts)
4601 SendEntityUpdate(p,PrimUpdateFlags.CancelKill); 4601 SendEntityUpdate(p,PrimUpdateFlags.CancelKill);
4602 } 4602 }
4603 } 4603 }
4604 4604
4605 CheckGroupsInViewBusy = false; 4605 CheckGroupsInViewBusy = false;
4606 } 4606 }
@@ -4640,8 +4640,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4640 4640
4641 if ((categories & ThrottleOutPacketTypeFlags.Task) != 0) 4641 if ((categories & ThrottleOutPacketTypeFlags.Task) != 0)
4642 { 4642 {
4643 int maxUpdateBytes = m_udpClient.GetCatBytesCanSend(ThrottleOutPacketType.Task, 30); 4643 int maxUpdateBytes = m_udpClient.GetCatBytesCanSend(ThrottleOutPacketType.Task, 30);
4644 4644
4645 if (m_entityUpdates.Count > 0) 4645 if (m_entityUpdates.Count > 0)
4646 ProcessEntityUpdates(maxUpdateBytes); 4646 ProcessEntityUpdates(maxUpdateBytes);
4647 4647
@@ -4660,7 +4660,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4660 if (m_entityUpdates.Count > 0) 4660 if (m_entityUpdates.Count > 0)
4661 return true; 4661 return true;
4662 if (m_entityProps.Count > 0) 4662 if (m_entityProps.Count > 0)
4663 return true; 4663 return true;
4664 } 4664 }
4665 4665
4666 if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) 4666 if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0)
@@ -4775,7 +4775,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4775 { 4775 {
4776 internal bool SendFamilyProps; 4776 internal bool SendFamilyProps;
4777 internal bool SendObjectProps; 4777 internal bool SendObjectProps;
4778 4778
4779 public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj) 4779 public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj)
4780 : base(entity,(PrimUpdateFlags)flags) 4780 : base(entity,(PrimUpdateFlags)flags)
4781 { 4781 {
@@ -4790,7 +4790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4790 base.Update(update); 4790 base.Update(update);
4791 } 4791 }
4792 } 4792 }
4793 4793
4794 public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags) 4794 public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags)
4795 { 4795 {
4796 uint priority = 0; // time based ordering only 4796 uint priority = 0; // time based ordering only
@@ -4824,7 +4824,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4824 foreach (ObjectPropertyUpdate update in updates) 4824 foreach (ObjectPropertyUpdate update in updates)
4825 ResendPropertyUpdate(update); 4825 ResendPropertyUpdate(update);
4826 } 4826 }
4827 4827
4828 public void SendObjectPropertiesReply(ISceneEntity entity) 4828 public void SendObjectPropertiesReply(ISceneEntity entity)
4829 { 4829 {
4830 uint priority = 0; // time based ordering only 4830 uint priority = 0; // time based ordering only
@@ -4845,8 +4845,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4845 4845
4846// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = 4846// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates =
4847// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); 4847// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4848 4848
4849 4849
4850 EntityUpdate iupdate; 4850 EntityUpdate iupdate;
4851 Int32 timeinqueue; // this is just debugging code & can be dropped later 4851 Int32 timeinqueue; // this is just debugging code & can be dropped later
4852 4852
@@ -4882,7 +4882,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4882 } 4882 }
4883 } 4883 }
4884 } 4884 }
4885 4885
4886 if (objectPropertiesBlocks.Count > 0) 4886 if (objectPropertiesBlocks.Count > 0)
4887 { 4887 {
4888 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 4888 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -4890,7 +4890,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4890 for (int i = 0; i < objectPropertiesBlocks.Count; i++) 4890 for (int i = 0; i < objectPropertiesBlocks.Count; i++)
4891 packet.ObjectData[i] = objectPropertiesBlocks[i]; 4891 packet.ObjectData[i] = objectPropertiesBlocks[i];
4892 4892
4893 4893
4894 objectPropertiesBlocks.Clear(); 4894 objectPropertiesBlocks.Clear();
4895 packet.Header.Zerocoded = true; 4895 packet.Header.Zerocoded = true;
4896 4896
@@ -4907,12 +4907,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4907 // pbcnt += blocks.Count; 4907 // pbcnt += blocks.Count;
4908 // ppcnt++; 4908 // ppcnt++;
4909 } 4909 }
4910 4910
4911 // Int32 fpcnt = 0; 4911 // Int32 fpcnt = 0;
4912 // Int32 fbcnt = 0; 4912 // Int32 fbcnt = 0;
4913 4913
4914 if (objectFamilyBlocks.Count > 0) 4914 if (objectFamilyBlocks.Count > 0)
4915 { 4915 {
4916 // one packet per object block... uggh... 4916 // one packet per object block... uggh...
4917 for (int i = 0; i < objectFamilyBlocks.Count; i++) 4917 for (int i = 0; i < objectFamilyBlocks.Count; i++)
4918 { 4918 {
@@ -4965,7 +4965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4965 } 4965 }
4966 needPhysics.Clear(); 4966 needPhysics.Clear();
4967 } 4967 }
4968 4968
4969 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt); 4969 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt);
4970 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt); 4970 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt);
4971 } 4971 }
@@ -4998,7 +4998,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4998 4998
4999 return block; 4999 return block;
5000 } 5000 }
5001 5001
5002 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop) 5002 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop)
5003 { 5003 {
5004 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 5004 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -5024,7 +5024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5024 block.FolderID = UUID.Zero; // sog.FromFolderID ?? 5024 block.FolderID = UUID.Zero; // sog.FromFolderID ??
5025 block.FromTaskID = UUID.Zero; // ??? 5025 block.FromTaskID = UUID.Zero; // ???
5026 block.InventorySerial = (short)sop.InventorySerial; 5026 block.InventorySerial = (short)sop.InventorySerial;
5027 5027
5028 SceneObjectPart root = sop.ParentGroup.RootPart; 5028 SceneObjectPart root = sop.ParentGroup.RootPart;
5029 5029
5030 block.TouchName = Util.StringToBytes256(root.TouchName); 5030 block.TouchName = Util.StringToBytes256(root.TouchName);
@@ -5036,7 +5036,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5036// { 5036// {
5037// using (BinaryWriter binWriter = new BinaryWriter(memStream)) 5037// using (BinaryWriter binWriter = new BinaryWriter(memStream))
5038// { 5038// {
5039// for (int i = 0; i < sop.GetNumberOfSides(); i++) 5039// for (int i = 0; i < sop.GetNumberOfSides(); i++)
5040// { 5040// {
5041// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i]; 5041// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i];
5042// 5042//
@@ -5053,7 +5053,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5053// block.TextureID = memStream.ToArray(); 5053// block.TextureID = memStream.ToArray();
5054// } 5054// }
5055// } 5055// }
5056 5056
5057 block.TextureID = new byte[0]; // TextureID ??? 5057 block.TextureID = new byte[0]; // TextureID ???
5058 block.SitName = Util.StringToBytes256(root.SitName); 5058 block.SitName = Util.StringToBytes256(root.SitName);
5059 block.OwnerMask = root.OwnerMask; 5059 block.OwnerMask = root.OwnerMask;
@@ -5202,7 +5202,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5202 public void SendEstateCovenantInformation(UUID covenant) 5202 public void SendEstateCovenantInformation(UUID covenant)
5203 { 5203 {
5204// m_log.DebugFormat("[LLCLIENTVIEW]: Sending estate covenant asset id of {0} to {1}", covenant, Name); 5204// m_log.DebugFormat("[LLCLIENTVIEW]: Sending estate covenant asset id of {0} to {1}", covenant, Name);
5205 5205
5206 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); 5206 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
5207 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 5207 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
5208 edata.CovenantID = covenant; 5208 edata.CovenantID = covenant;
@@ -5219,7 +5219,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5219 { 5219 {
5220// m_log.DebugFormat( 5220// m_log.DebugFormat(
5221// "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant); 5221// "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant);
5222 5222
5223 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 5223 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
5224 packet.MethodData.Invoice = invoice; 5224 packet.MethodData.Invoice = invoice;
5225 packet.AgentData.TransactionID = UUID.Random(); 5225 packet.AgentData.TransactionID = UUID.Random();
@@ -5282,13 +5282,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5282 } 5282 }
5283 5283
5284 public void SendLandProperties( 5284 public void SendLandProperties(
5285 int sequence_id, bool snap_selection, int request_result, ILandObject lo, 5285 int sequence_id, bool snap_selection, int request_result, ILandObject lo,
5286 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 5286 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
5287 { 5287 {
5288// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name); 5288// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name);
5289 5289
5290 LandData landData = lo.LandData; 5290 LandData landData = lo.LandData;
5291 5291
5292 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); 5292 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
5293 5293
5294 updateMessage.AABBMax = landData.AABBMax; 5294 updateMessage.AABBMax = landData.AABBMax;
@@ -5301,7 +5301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5301 updateMessage.Category = landData.Category; 5301 updateMessage.Category = landData.Category;
5302 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); 5302 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
5303 updateMessage.ClaimPrice = landData.ClaimPrice; 5303 updateMessage.ClaimPrice = landData.ClaimPrice;
5304 updateMessage.GroupID = landData.GroupID; 5304 updateMessage.GroupID = landData.GroupID;
5305 updateMessage.IsGroupOwned = landData.IsGroupOwned; 5305 updateMessage.IsGroupOwned = landData.IsGroupOwned;
5306 updateMessage.LandingType = (LandingType) landData.LandingType; 5306 updateMessage.LandingType = (LandingType) landData.LandingType;
5307 updateMessage.LocalID = landData.LocalID; 5307 updateMessage.LocalID = landData.LocalID;
@@ -5322,7 +5322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5322 updateMessage.Name = landData.Name; 5322 updateMessage.Name = landData.Name;
5323 updateMessage.OtherCleanTime = landData.OtherCleanTime; 5323 updateMessage.OtherCleanTime = landData.OtherCleanTime;
5324 updateMessage.OtherCount = 0; //TODO: Unimplemented 5324 updateMessage.OtherCount = 0; //TODO: Unimplemented
5325 updateMessage.OwnerID = landData.OwnerID; 5325 updateMessage.OwnerID = landData.OwnerID;
5326 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; 5326 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
5327 updateMessage.ParcelPrimBonus = simObjectBonusFactor; 5327 updateMessage.ParcelPrimBonus = simObjectBonusFactor;
5328 updateMessage.PassHours = landData.PassHours; 5328 updateMessage.PassHours = landData.PassHours;
@@ -5337,10 +5337,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5337 5337
5338 updateMessage.RentPrice = 0; 5338 updateMessage.RentPrice = 0;
5339 updateMessage.RequestResult = (ParcelResult) request_result; 5339 updateMessage.RequestResult = (ParcelResult) request_result;
5340 updateMessage.SalePrice = landData.SalePrice; 5340 updateMessage.SalePrice = landData.SalePrice;
5341 updateMessage.SelfCount = 0; //TODO: Unimplemented 5341 updateMessage.SelfCount = 0; //TODO: Unimplemented
5342 updateMessage.SequenceID = sequence_id; 5342 updateMessage.SequenceID = sequence_id;
5343 5343
5344 if (landData.SimwideArea > 0) 5344 if (landData.SimwideArea > 0)
5345 { 5345 {
5346 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount(); 5346 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount();
@@ -5349,7 +5349,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5349 { 5349 {
5350 updateMessage.SimWideMaxPrims = 0; 5350 updateMessage.SimWideMaxPrims = 0;
5351 } 5351 }
5352 5352
5353 updateMessage.SnapSelection = snap_selection; 5353 updateMessage.SnapSelection = snap_selection;
5354 updateMessage.SnapshotID = landData.SnapshotID; 5354 updateMessage.SnapshotID = landData.SnapshotID;
5355 updateMessage.Status = (ParcelStatus) landData.Status; 5355 updateMessage.Status = (ParcelStatus) landData.Status;
@@ -5367,11 +5367,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5367 updateMessage.SeeAVs = landData.SeeAVs; 5367 updateMessage.SeeAVs = landData.SeeAVs;
5368 updateMessage.AnyAVSounds = landData.AnyAVSounds; 5368 updateMessage.AnyAVSounds = landData.AnyAVSounds;
5369 updateMessage.GroupAVSounds = landData.GroupAVSounds; 5369 updateMessage.GroupAVSounds = landData.GroupAVSounds;
5370 5370
5371 IPrimCounts pc = lo.PrimCounts; 5371 IPrimCounts pc = lo.PrimCounts;
5372 updateMessage.OwnerPrims = pc.Owner; 5372 updateMessage.OwnerPrims = pc.Owner;
5373 updateMessage.GroupPrims = pc.Group; 5373 updateMessage.GroupPrims = pc.Group;
5374 updateMessage.OtherPrims = pc.Others; 5374 updateMessage.OtherPrims = pc.Others;
5375 updateMessage.SelectedPrims = pc.Selected; 5375 updateMessage.SelectedPrims = pc.Selected;
5376 updateMessage.TotalPrims = pc.Total; 5376 updateMessage.TotalPrims = pc.Total;
5377 updateMessage.SimWideTotalPrims = pc.Simulator; 5377 updateMessage.SimWideTotalPrims = pc.Simulator;
@@ -5384,8 +5384,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5384 if (eq != null) 5384 if (eq != null)
5385 { 5385 {
5386 eq.ParcelProperties(updateMessage, this.AgentId); 5386 eq.ParcelProperties(updateMessage, this.AgentId);
5387 } 5387 }
5388 else 5388 else
5389 { 5389 {
5390 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data."); 5390 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data.");
5391 } 5391 }
@@ -5422,7 +5422,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5422 public void SendForceClientSelectObjects(List<uint> ObjectIDs) 5422 public void SendForceClientSelectObjects(List<uint> ObjectIDs)
5423 { 5423 {
5424// m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count); 5424// m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count);
5425 5425
5426 bool firstCall = true; 5426 bool firstCall = true;
5427 const int MAX_OBJECTS_PER_PACKET = 251; 5427 const int MAX_OBJECTS_PER_PACKET = 251;
5428 ForceObjectSelectPacket pack = (ForceObjectSelectPacket)PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect); 5428 ForceObjectSelectPacket pack = (ForceObjectSelectPacket)PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect);
@@ -5634,7 +5634,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5634 5634
5635 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block 5635 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block
5636 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 5636 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
5637 5637
5638 block.Data = data; 5638 block.Data = data;
5639 5639
5640 if (textureEntry != null && textureEntry.Length > 0) 5640 if (textureEntry != null && textureEntry.Length > 0)
@@ -5661,7 +5661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5661 Vector3 offsetPosition = data.OffsetPosition; 5661 Vector3 offsetPosition = data.OffsetPosition;
5662 Quaternion rotation = data.Rotation; 5662 Quaternion rotation = data.Rotation;
5663 uint parentID = data.ParentID; 5663 uint parentID = data.ParentID;
5664 5664
5665// m_log.DebugFormat( 5665// m_log.DebugFormat(
5666// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name); 5666// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name);
5667 5667
@@ -5752,7 +5752,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5752/* 5752/*
5753 if (data.ParentGroup.IsAttachment) 5753 if (data.ParentGroup.IsAttachment)
5754 { 5754 {
5755 update.NameValue 5755 update.NameValue
5756 = Util.StringToBytes256( 5756 = Util.StringToBytes256(
5757 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID)); 5757 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID));
5758 5758
@@ -5906,7 +5906,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5906 { 5906 {
5907 m_groupPowers.Clear(); 5907 m_groupPowers.Clear();
5908 m_groupPowers = powers; 5908 m_groupPowers = powers;
5909 } 5909 }
5910 } 5910 }
5911 5911
5912 public ulong GetGroupPowers(UUID groupID) 5912 public ulong GetGroupPowers(UUID groupID)
@@ -6193,7 +6193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6193 { 6193 {
6194 if( 6194 if(
6195 (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed 6195 (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed
6196// || ((x.ControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0 && 6196// || ((x.ControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0 &&
6197// (x.ControlFlags & 0x3f8dfff) != 0) // we need to rotate the av on fly 6197// (x.ControlFlags & 0x3f8dfff) != 0) // we need to rotate the av on fly
6198 || x.ControlFlags != (byte)AgentManager.ControlFlags.NONE// actually all movement controls need to pass 6198 || x.ControlFlags != (byte)AgentManager.ControlFlags.NONE// actually all movement controls need to pass
6199 || (x.Flags != m_thisAgentUpdateArgs.Flags) // significant if Flags changed 6199 || (x.Flags != m_thisAgentUpdateArgs.Flags) // significant if Flags changed
@@ -6208,7 +6208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6208 if( 6208 if(
6209 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold 6209 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold
6210 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack 6210 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
6211 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold 6211 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold
6212 ) 6212 )
6213 return true; 6213 return true;
6214 6214
@@ -6257,7 +6257,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6257 6257
6258 TotalAgentUpdates++; 6258 TotalAgentUpdates++;
6259 // dont let ignored updates pollute this throttles 6259 // dont let ignored updates pollute this throttles
6260 if(SceneAgent == null || SceneAgent.IsChildAgent || 6260 if(SceneAgent == null || SceneAgent.IsChildAgent ||
6261 SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence ) 6261 SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence )
6262 { 6262 {
6263 // throttle reset is done at MoveAgentIntoRegion() 6263 // throttle reset is done at MoveAgentIntoRegion()
@@ -6476,7 +6476,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6476 } 6476 }
6477 } 6477 }
6478 } 6478 }
6479 6479
6480 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method); 6480 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method);
6481 return false; 6481 return false;
6482 } 6482 }
@@ -6922,7 +6922,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6922 //m_log.Info("[LAND]: LAND:" + modify.ToString()); 6922 //m_log.Info("[LAND]: LAND:" + modify.ToString());
6923 if (modify.ParcelData.Length > 0) 6923 if (modify.ParcelData.Length > 0)
6924 { 6924 {
6925 // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore, 6925 // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore,
6926 // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit. 6926 // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit.
6927 if (OnModifyTerrain != null) 6927 if (OnModifyTerrain != null)
6928 { 6928 {
@@ -6999,20 +6999,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6999 byte[] visualparams = new byte[appear.VisualParam.Length]; 6999 byte[] visualparams = new byte[appear.VisualParam.Length];
7000 for (int i = 0; i < appear.VisualParam.Length; i++) 7000 for (int i = 0; i < appear.VisualParam.Length; i++)
7001 visualparams[i] = appear.VisualParam[i].ParamValue; 7001 visualparams[i] = appear.VisualParam[i].ParamValue;
7002 //var b = appear.WearableData[0]; 7002 //var b = appear.WearableData[0];
7003 7003
7004 Primitive.TextureEntry te = null; 7004 Primitive.TextureEntry te = null;
7005 if (appear.ObjectData.TextureEntry.Length > 1) 7005 if (appear.ObjectData.TextureEntry.Length > 1)
7006 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); 7006 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
7007 7007
7008 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length]; 7008 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length];
7009 for (int i=0; i<appear.WearableData.Length;i++) 7009 for (int i=0; i<appear.WearableData.Length;i++)
7010 cacheitems[i] = new WearableCacheItem(){ 7010 cacheitems[i] = new WearableCacheItem(){
7011 CacheId = appear.WearableData[i].CacheID, 7011 CacheId = appear.WearableData[i].CacheID,
7012 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex) 7012 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex)
7013 }; 7013 };
7014 7014
7015 7015
7016 7016
7017 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems); 7017 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems);
7018 } 7018 }
@@ -7970,7 +7970,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7970 physdata.Bounce = phsblock.Restitution; 7970 physdata.Bounce = phsblock.Restitution;
7971 physdata.Density = phsblock.Density; 7971 physdata.Density = phsblock.Density;
7972 physdata.Friction = phsblock.Friction; 7972 physdata.Friction = phsblock.Friction;
7973 physdata.GravitationModifier = phsblock.GravityMultiplier; 7973 physdata.GravitationModifier = phsblock.GravityMultiplier;
7974 } 7974 }
7975 7975
7976 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this); 7976 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this);
@@ -8381,7 +8381,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8381 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay; 8381 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay;
8382 if (handlerObjectDuplicateOnRay != null) 8382 if (handlerObjectDuplicateOnRay != null)
8383 { 8383 {
8384 8384
8385 UUID rezGroupID = dupeOnRay.AgentData.GroupID; 8385 UUID rezGroupID = dupeOnRay.AgentData.GroupID;
8386 if(!IsGroupMember(rezGroupID)) 8386 if(!IsGroupMember(rezGroupID))
8387 rezGroupID = UUID.Zero; 8387 rezGroupID = UUID.Zero;
@@ -10198,7 +10198,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10198 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10198 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10199 { 10199 {
10200 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); 10200 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
10201 10201
10202 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter))); 10202 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
10203 10203
10204 } 10204 }
@@ -10234,7 +10234,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10234 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter); 10234 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
10235 } 10235 }
10236 else 10236 else
10237 { 10237 {
10238 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); 10238 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
10239 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); 10239 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
10240 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); 10240 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
@@ -10376,7 +10376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10376 return true; 10376 return true;
10377 10377
10378 case "kickestate": 10378 case "kickestate":
10379 10379
10380 if(((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10380 if(((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10381 { 10381 {
10382 UUID invoice = messagePacket.MethodData.Invoice; 10382 UUID invoice = messagePacket.MethodData.Invoice;
@@ -10459,7 +10459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10459 if (rglpPack.AgentData.SessionID != SessionId || 10459 if (rglpPack.AgentData.SessionID != SessionId ||
10460 rglpPack.AgentData.AgentID != AgentId) 10460 rglpPack.AgentData.AgentID != AgentId)
10461 return true; 10461 return true;
10462 10462
10463 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; 10463 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
10464 UUID token = rblock.Token; 10464 UUID token = rblock.Token;
10465 10465
@@ -10975,7 +10975,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10975 { 10975 {
10976 return true; 10976 return true;
10977 } 10977 }
10978 10978
10979 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack) 10979 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack)
10980 { 10980 {
10981 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack; 10981 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack;
@@ -11012,7 +11012,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11012 return true; 11012 return true;
11013 } 11013 }
11014 11014
11015 11015
11016 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack) 11016 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack)
11017 { 11017 {
11018 return true; 11018 return true;
@@ -11402,7 +11402,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11402 GroupProfileRequestPacket groupProfileRequest = 11402 GroupProfileRequestPacket groupProfileRequest =
11403 (GroupProfileRequestPacket)Pack; 11403 (GroupProfileRequestPacket)Pack;
11404 11404
11405 11405
11406 #region Packet Session and User Check 11406 #region Packet Session and User Check
11407 if (m_checkPackets) 11407 if (m_checkPackets)
11408 { 11408 {
@@ -11464,7 +11464,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11464 } 11464 }
11465 11465
11466 OutPacket(groupProfileReply, ThrottleOutPacketType.Task); 11466 OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
11467 11467
11468 if(grpID == lastGroupProfileRequestID) 11468 if(grpID == lastGroupProfileRequestID)
11469 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000; 11469 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000;
11470 11470
@@ -12398,10 +12398,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12398 ScenePresence sp = (ScenePresence)SceneAgent; 12398 ScenePresence sp = (ScenePresence)SceneAgent;
12399 if(sp != null && !sp.IsDeleted && !sp.IsInTransit) 12399 if(sp != null && !sp.IsDeleted && !sp.IsInTransit)
12400 { 12400 {
12401 UUID objectID = pkt.Data.ObjectID; 12401 UUID objectID = pkt.Data.ObjectID;
12402 uint permissions = pkt.Data.ObjectPermissions; 12402 uint permissions = pkt.Data.ObjectPermissions;
12403 12403
12404 sp.HandleRevokePermissions(objectID , permissions); 12404 sp.HandleRevokePermissions(objectID , permissions);
12405 } 12405 }
12406 return true; 12406 return true;
12407 } 12407 }
@@ -12437,7 +12437,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12437 scriptQuestion.Data.Questions = question; 12437 scriptQuestion.Data.Questions = question;
12438 scriptQuestion.Data.ObjectName = Util.StringToBytes256(taskName); 12438 scriptQuestion.Data.ObjectName = Util.StringToBytes256(taskName);
12439 scriptQuestion.Data.ObjectOwner = Util.StringToBytes256(ownerName); 12439 scriptQuestion.Data.ObjectOwner = Util.StringToBytes256(ownerName);
12440 12440
12441 OutPacket(scriptQuestion, ThrottleOutPacketType.Task); 12441 OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
12442 } 12442 }
12443 12443
@@ -12629,7 +12629,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12629 * 0x01 position 12629 * 0x01 position
12630 * 0x02 rotation 12630 * 0x02 rotation
12631 * 0x04 scale 12631 * 0x04 scale
12632 12632
12633 * 0x08 LINK_SET 12633 * 0x08 LINK_SET
12634 * 0x10 UNIFORM for scale 12634 * 0x10 UNIFORM for scale
12635 */ 12635 */
@@ -12668,7 +12668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12668 updatehandler(localId, udata, this); 12668 updatehandler(localId, udata, this);
12669 break; 12669 break;
12670 12670
12671 case 0x14: // uniform scale sp 12671 case 0x14: // uniform scale sp
12672 udata.scale = new Vector3(block.Data, 0); 12672 udata.scale = new Vector3(block.Data, 0);
12673 12673
12674 udata.change = ObjectChangeType.primUS; 12674 udata.change = ObjectChangeType.primUS;
@@ -12938,7 +12938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12938 12938
12939 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) 12939 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
12940 logPacket = false; 12940 logPacket = false;
12941 12941
12942 if (DebugPacketLevel <= 50 12942 if (DebugPacketLevel <= 50
12943 && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) 12943 && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate))
12944 logPacket = false; 12944 logPacket = false;
@@ -12951,7 +12951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12951 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}", 12951 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}",
12952 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type); 12952 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
12953 } 12953 }
12954 12954
12955 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); 12955 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
12956 } 12956 }
12957 12957
@@ -13198,9 +13198,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13198 { 13198 {
13199 GroupMembershipData[] GroupMembership = 13199 GroupMembershipData[] GroupMembership =
13200 m_GroupsModule.GetMembershipData(AgentId); 13200 m_GroupsModule.GetMembershipData(AgentId);
13201 13201
13202 m_groupPowers.Clear(); 13202 m_groupPowers.Clear();
13203 13203
13204 if (GroupMembership != null) 13204 if (GroupMembership != null)
13205 { 13205 {
13206 for (int i = 0; i < GroupMembership.Length; i++) 13206 for (int i = 0; i < GroupMembership.Length; i++)
@@ -13220,7 +13220,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13220 m_activeGroupName = activeMembership.GroupName; 13220 m_activeGroupName = activeMembership.GroupName;
13221 m_activeGroupPowers = ActiveGroupPowers; 13221 m_activeGroupPowers = ActiveGroupPowers;
13222 } 13222 }
13223 } 13223 }
13224 } 13224 }
13225 13225
13226 if(activeMembership == null) 13226 if(activeMembership == null)
@@ -13237,7 +13237,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13237 lock(m_groupPowers) 13237 lock(m_groupPowers)
13238 { 13238 {
13239 m_groupPowers.Clear(); 13239 m_groupPowers.Clear();
13240 13240
13241 if (data != null) 13241 if (data != null)
13242 { 13242 {
13243 for (int i = 0; i < data.Length; i++) 13243 for (int i = 0; i < data.Length; i++)
@@ -13522,7 +13522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13522 if (p is ScenePresence) 13522 if (p is ScenePresence)
13523 { 13523 {
13524// m_log.DebugFormat( 13524// m_log.DebugFormat(
13525// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}", 13525// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}",
13526// p.Name, Name, Scene.Name); 13526// p.Name, Name, Scene.Name);
13527 13527
13528 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities 13528 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
@@ -13559,7 +13559,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13559 PlacesReplyData[] data) 13559 PlacesReplyData[] data)
13560 { 13560 {
13561 PlacesReplyPacket reply = null; 13561 PlacesReplyPacket reply = null;
13562 PlacesReplyPacket.QueryDataBlock[] dataBlocks = 13562 PlacesReplyPacket.QueryDataBlock[] dataBlocks =
13563 new PlacesReplyPacket.QueryDataBlock[0]; 13563 new PlacesReplyPacket.QueryDataBlock[0];
13564 13564
13565 for (int i = 0 ; i < data.Length ; i++) 13565 for (int i = 0 ; i < data.Length ; i++)
@@ -13737,7 +13737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13737 foreach (InventoryItemBase item in items) 13737 foreach (InventoryItemBase item in items)
13738 { 13738 {
13739 OSDMap ItemDataMap = new OSDMap(); 13739 OSDMap ItemDataMap = new OSDMap();
13740 13740
13741 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID)); 13741 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID));
13742 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder)); 13742 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder));
13743 13743
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
index 41dd4d1..deefd40 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
82 82
83 if (pAssetCache != null) 83 if (pAssetCache != null)
84 m_missingImage = pAssetCache.Get("5748decc-f629-461c-9a36-a35a221fe21f"); 84 m_missingImage = pAssetCache.Get("5748decc-f629-461c-9a36-a35a221fe21f");
85 85
86 if (m_missingImage == null) 86 if (m_missingImage == null)
87 m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client"); 87 m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client");
88 88
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index dc8ac3c..439621a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
52 /// are waiting on ACKs for</param> 52 /// are waiting on ACKs for</param>
53 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); 53 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
54 /// <summary> 54 /// <summary>
55 /// Fired when the queue for one or more packet categories is empty. This 55 /// Fired when the queue for one or more packet categories is empty. This
56 /// event can be hooked to put more data on the empty queues 56 /// event can be hooked to put more data on the empty queues
57 /// </summary> 57 /// </summary>
58 /// <param name="category">Categories of the packet queues that are empty</param> 58 /// <param name="category">Categories of the packet queues that are empty</param>
@@ -86,8 +86,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
86 /// Controls whether information is logged about each outbound packet immediately before it is sent. For debug purposes. 86 /// Controls whether information is logged about each outbound packet immediately before it is sent. For debug purposes.
87 /// </summary> 87 /// </summary>
88 /// <remarks>Any level above 0 will turn on logging.</remarks> 88 /// <remarks>Any level above 0 will turn on logging.</remarks>
89 public int ThrottleDebugLevel 89 public int ThrottleDebugLevel
90 { 90 {
91 get 91 get
92 { 92 {
93 return m_throttleDebugLevel; 93 return m_throttleDebugLevel;
@@ -157,7 +157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
157 /// <summary>Number of packets sent to this client</summary> 157 /// <summary>Number of packets sent to this client</summary>
158 public int PacketsSent; 158 public int PacketsSent;
159 /// <summary>Number of packets resent to this client</summary> 159 /// <summary>Number of packets resent to this client</summary>
160 public int PacketsResent; 160 public int PacketsResent;
161 /// <summary>Total byte count of unacked packets sent to this client</summary> 161 /// <summary>Total byte count of unacked packets sent to this client</summary>
162 public int UnackedBytes; 162 public int UnackedBytes;
163 163
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
215 /// textures are now generally handled through http. 215 /// textures are now generally handled through http.
216 /// </summary> 216 /// </summary>
217 private double m_cannibalrate = 0.0; 217 private double m_cannibalrate = 0.0;
218 218
219 private ClientInfo m_info = new ClientInfo(); 219 private ClientInfo m_info = new ClientInfo();
220 220
221 /// <summary> 221 /// <summary>
@@ -276,7 +276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
276 276
277 // Initialize this to a sane value to prevent early disconnects 277 // Initialize this to a sane value to prevent early disconnects
278 TickLastPacketReceived = Environment.TickCount & Int32.MaxValue; 278 TickLastPacketReceived = Environment.TickCount & Int32.MaxValue;
279 m_pingMS = (int)(3.0 * server.TickCountResolution); // so filter doesnt start at 0; 279 m_pingMS = (int)(3.0 * server.TickCountResolution); // so filter doesnt start at 0;
280 } 280 }
281 281
282 /// <summary> 282 /// <summary>
@@ -370,7 +370,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
370 return string.Format( 370 return string.Format(
371 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}", 371 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}",
372 Util.EnvironmentTickCountSubtract(TickLastPacketReceived), 372 Util.EnvironmentTickCountSubtract(TickLastPacketReceived),
373 PacketsReceived, 373 PacketsReceived,
374 PacketsSent, 374 PacketsSent,
375 PacketsResent, 375 PacketsResent,
376 UnackedBytes, 376 UnackedBytes,
@@ -540,7 +540,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
540 540
541 return data; 541 return data;
542 } 542 }
543 543
544 public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS) 544 public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS)
545 { 545 {
546 int icat = (int)cat; 546 int icat = (int)cat;
@@ -559,7 +559,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
559 /// <param name="packet"></param> 559 /// <param name="packet"></param>
560 /// <param name="forceQueue">Always queue the packet if at all possible.</param> 560 /// <param name="forceQueue">Always queue the packet if at all possible.</param>
561 /// <returns> 561 /// <returns>
562 /// true if the packet has been queued, 562 /// true if the packet has been queued,
563 /// false if the packet has not been queued and should be sent immediately. 563 /// false if the packet has not been queued and should be sent immediately.
564 /// </returns> 564 /// </returns>
565 public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue) 565 public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue)
@@ -589,7 +589,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
589 queue.Enqueue(packet, highPriority); 589 queue.Enqueue(packet, highPriority);
590 return true; 590 return true;
591 } 591 }
592 592
593 if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength)) 593 if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength))
594 { 594 {
595 // enough tokens so it can be sent imediatly by caller 595 // enough tokens so it can be sent imediatly by caller
@@ -608,24 +608,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
608 // We don't have a token bucket for this category, so it will not be queued 608 // We don't have a token bucket for this category, so it will not be queued
609 return false; 609 return false;
610 } 610 }
611 611
612 } 612 }
613 613
614 /// <summary> 614 /// <summary>
615 /// Loops through all of the packet queues for this client and tries to send 615 /// Loops through all of the packet queues for this client and tries to send
616 /// an outgoing packet from each, obeying the throttling bucket limits 616 /// an outgoing packet from each, obeying the throttling bucket limits
617 /// </summary> 617 /// </summary>
618 /// 618 ///
619 /// <remarks> 619 /// <remarks>
620 /// Packet queues are inspected in ascending numerical order starting from 0. Therefore, queues with a lower 620 /// Packet queues are inspected in ascending numerical order starting from 0. Therefore, queues with a lower
621 /// ThrottleOutPacketType number will see their packet get sent first (e.g. if both Land and Wind queues have 621 /// ThrottleOutPacketType number will see their packet get sent first (e.g. if both Land and Wind queues have
622 /// packets, then the packet at the front of the Land queue will be sent before the packet at the front of the 622 /// packets, then the packet at the front of the Land queue will be sent before the packet at the front of the
623 /// wind queue). 623 /// wind queue).
624 /// 624 ///
625 /// This function is only called from a synchronous loop in the 625 /// This function is only called from a synchronous loop in the
626 /// UDPServer so we don't need to bother making this thread safe 626 /// UDPServer so we don't need to bother making this thread safe
627 /// </remarks> 627 /// </remarks>
628 /// 628 ///
629 /// <returns>True if any packets were sent, otherwise false</returns> 629 /// <returns>True if any packets were sent, otherwise false</returns>
630 public bool DequeueOutgoing() 630 public bool DequeueOutgoing()
631 { 631 {
@@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
791 double start = Util.GetTimeStampMS(); 791 double start = Util.GetTimeStampMS();
792 if (start < m_nextOnQueueEmpty) 792 if (start < m_nextOnQueueEmpty)
793 return; 793 return;
794 794
795 m_isQueueEmptyRunning = true; 795 m_isQueueEmptyRunning = true;
796 m_nextOnQueueEmpty = start + MIN_CALLBACK_MS; 796 m_nextOnQueueEmpty = start + MIN_CALLBACK_MS;
797 797
@@ -803,7 +803,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
803 } 803 }
804 } 804 }
805 805
806 806
807 807
808 /// <summary> 808 /// <summary>
809 /// Fires the OnQueueEmpty callback and sets the minimum time that it 809 /// Fires the OnQueueEmpty callback and sets the minimum time that it
@@ -820,7 +820,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
820 if (callback != null) 820 if (callback != null)
821 { 821 {
822 // if (m_udpServer.IsRunningOutbound) 822 // if (m_udpServer.IsRunningOutbound)
823 // { 823 // {
824 try { callback(categories); } 824 try { callback(categories); }
825 catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + categories + ") threw an exception: " + e.Message, e); } 825 catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + categories + ") threw an exception: " + e.Message, e); }
826 // } 826 // }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index cedb9b4..ec51e28 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
222 StatType.Pull, 222 StatType.Pull,
223 MeasuresOfInterest.None, 223 MeasuresOfInterest.None,
224 stat => stat.Value = m_udpServer.AverageReceiveTicksForLastSamplePeriod, 224 stat => stat.Value = m_udpServer.AverageReceiveTicksForLastSamplePeriod,
225// stat => 225// stat =>
226// stat.Value = Math.Round(m_udpServer.AverageReceiveTicksForLastSamplePeriod, 7), 226// stat.Value = Math.Round(m_udpServer.AverageReceiveTicksForLastSamplePeriod, 7),
227 StatVerbosity.Debug)); 227 StatVerbosity.Debug));
228 } 228 }
@@ -272,7 +272,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
272 /// <summary>The measured resolution of Environment.TickCount</summary> 272 /// <summary>The measured resolution of Environment.TickCount</summary>
273 public readonly float TickCountResolution; 273 public readonly float TickCountResolution;
274 274
275 /// <summary>Number of prim updates to put on the queue each time the 275 /// <summary>Number of prim updates to put on the queue each time the
276 /// OnQueueEmpty event is triggered for updates</summary> 276 /// OnQueueEmpty event is triggered for updates</summary>
277 public readonly int PrimUpdatesPerCallback; 277 public readonly int PrimUpdatesPerCallback;
278 278
@@ -289,7 +289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
289 289
290 /// <summary>Bandwidth throttle for this UDP server</summary> 290 /// <summary>Bandwidth throttle for this UDP server</summary>
291 public TokenBucket Throttle { get; protected set; } 291 public TokenBucket Throttle { get; protected set; }
292 292
293 /// <summary>Per client throttle rates enforced by this server</summary> 293 /// <summary>Per client throttle rates enforced by this server</summary>
294 /// <remarks> 294 /// <remarks>
295 /// If the total rate is non-zero, then this is the maximum total throttle setting that any client can ever have. 295 /// If the total rate is non-zero, then this is the maximum total throttle setting that any client can ever have.
@@ -297,7 +297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
297 /// do get changed immediately). They do not need to sum to the total. 297 /// do get changed immediately). They do not need to sum to the total.
298 /// </remarks> 298 /// </remarks>
299 public ThrottleRates ThrottleRates { get; protected set; } 299 public ThrottleRates ThrottleRates { get; protected set; }
300 300
301 /// <summary>Manages authentication for agent circuits</summary> 301 /// <summary>Manages authentication for agent circuits</summary>
302 protected AgentCircuitManager m_circuitManager; 302 protected AgentCircuitManager m_circuitManager;
303 303
@@ -436,8 +436,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
436 { 436 {
437 #region Environment.TickCount Measurement 437 #region Environment.TickCount Measurement
438 438
439 // Update the port with the one we actually got 439 // Update the port with the one we actually got
440 port = (uint)Port; 440 port = (uint)Port;
441 441
442 // Measure the resolution of Environment.TickCount 442 // Measure the resolution of Environment.TickCount
443 TickCountResolution = 0f; 443 TickCountResolution = 0f;
@@ -696,15 +696,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
696 696
697 Scene = (Scene)scene; 697 Scene = (Scene)scene;
698 m_location = new Location(Scene.RegionInfo.RegionHandle); 698 m_location = new Location(Scene.RegionInfo.RegionHandle);
699 699
700 IpahEngine 700 IpahEngine
701 = new JobEngine( 701 = new JobEngine(
702 string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name), 702 string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name),
703 "INCOMING PACKET ASYNC HANDLING ENGINE"); 703 "INCOMING PACKET ASYNC HANDLING ENGINE");
704 704
705 OqrEngine 705 OqrEngine
706 = new JobEngine( 706 = new JobEngine(
707 string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name), 707 string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name),
708 "OUTGOING QUEUE REFILL ENGINE"); 708 "OUTGOING QUEUE REFILL ENGINE");
709 709
710 StatsManager.RegisterStat( 710 StatsManager.RegisterStat(
@@ -730,9 +730,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
730 "clientstack", 730 "clientstack",
731 Scene.Name, 731 Scene.Name,
732 StatType.Pull, 732 StatType.Pull,
733 stat => 733 stat =>
734 { PercentageStat pstat = (PercentageStat)stat; 734 { PercentageStat pstat = (PercentageStat)stat;
735 pstat.Consequent = PacketPool.Instance.PacketsRequested; 735 pstat.Consequent = PacketPool.Instance.PacketsRequested;
736 pstat.Antecedent = PacketPool.Instance.PacketsReused; }, 736 pstat.Antecedent = PacketPool.Instance.PacketsReused; },
737 StatVerbosity.Debug)); 737 StatVerbosity.Debug));
738 738
@@ -745,8 +745,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
745 Scene.Name, 745 Scene.Name,
746 StatType.Pull, 746 StatType.Pull,
747 stat => 747 stat =>
748 { PercentageStat pstat = (PercentageStat)stat; 748 { PercentageStat pstat = (PercentageStat)stat;
749 pstat.Consequent = PacketPool.Instance.BlocksRequested; 749 pstat.Consequent = PacketPool.Instance.BlocksRequested;
750 pstat.Antecedent = PacketPool.Instance.BlocksReused; }, 750 pstat.Antecedent = PacketPool.Instance.BlocksReused; },
751 StatVerbosity.Debug)); 751 StatVerbosity.Debug));
752 752
@@ -799,7 +799,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
799 MeasuresOfInterest.None, 799 MeasuresOfInterest.None,
800 stat => stat.Value = IpahEngine.JobsWaiting, 800 stat => stat.Value = IpahEngine.JobsWaiting,
801 StatVerbosity.Debug)); 801 StatVerbosity.Debug));
802 802
803 StatsManager.RegisterStat( 803 StatsManager.RegisterStat(
804 new Stat( 804 new Stat(
805 "OQRERequestsWaiting", 805 "OQRERequestsWaiting",
@@ -812,7 +812,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
812 MeasuresOfInterest.None, 812 MeasuresOfInterest.None,
813 stat => stat.Value = OqrEngine.JobsWaiting, 813 stat => stat.Value = OqrEngine.JobsWaiting,
814 StatVerbosity.Debug)); 814 StatVerbosity.Debug));
815 815
816 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by 816 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by
817 // scene name 817 // scene name
818 if (UsePools) 818 if (UsePools)
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1012 if ((outgoingPacket.Buffer.Data[0] & Helpers.MSG_RELIABLE) != 0) 1012 if ((outgoingPacket.Buffer.Data[0] & Helpers.MSG_RELIABLE) != 0)
1013 outgoingPacket.UnackedMethod = ((method == null) ? delegate(OutgoingPacket oPacket) { ResendUnacked(oPacket); } : method); 1013 outgoingPacket.UnackedMethod = ((method == null) ? delegate(OutgoingPacket oPacket) { ResendUnacked(oPacket); } : method);
1014 1014
1015 // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will 1015 // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will
1016 // continue to display the deleted object until relog. Therefore, we need to always queue a kill object 1016 // continue to display the deleted object until relog. Therefore, we need to always queue a kill object
1017 // packet so that it isn't sent before a queued update packet. 1017 // packet so that it isn't sent before a queued update packet.
1018 1018
@@ -1242,7 +1242,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1242 1242
1243 if ((IncomingMalformedPacketCount % 10000) == 0) 1243 if ((IncomingMalformedPacketCount % 10000) == 0)
1244 m_log.WarnFormat( 1244 m_log.WarnFormat(
1245 "[LLUDPSERVER]: Received {0} malformed packets so far, probable network attack. Last was from {1}", 1245 "[LLUDPSERVER]: Received {0} malformed packets so far, probable network attack. Last was from {1}",
1246 IncomingMalformedPacketCount, endPoint); 1246 IncomingMalformedPacketCount, endPoint);
1247 } 1247 }
1248 1248
@@ -1391,7 +1391,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1391 1391
1392 if ((IncomingOrphanedPacketCount % 10000) == 0) 1392 if ((IncomingOrphanedPacketCount % 10000) == 0)
1393 m_log.WarnFormat( 1393 m_log.WarnFormat(
1394 "[LLUDPSERVER]: Received {0} orphaned packets so far. Last was from {1}", 1394 "[LLUDPSERVER]: Received {0} orphaned packets so far. Last was from {1}",
1395 IncomingOrphanedPacketCount, endPoint); 1395 IncomingOrphanedPacketCount, endPoint);
1396 1396
1397 return; 1397 return;
@@ -1482,7 +1482,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1482 { 1482 {
1483 if (packet.Header.Resent) 1483 if (packet.Header.Resent)
1484 m_log.DebugFormat( 1484 m_log.DebugFormat(
1485 "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}", 1485 "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}",
1486 packet.Header.Sequence, packet.Type, client.Name); 1486 packet.Header.Sequence, packet.Type, client.Name);
1487 else 1487 else
1488 m_log.WarnFormat( 1488 m_log.WarnFormat(
@@ -1512,7 +1512,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1512 // We don't need to do anything else with ping checks 1512 // We don't need to do anything else with ping checks
1513 StartPingCheckPacket startPing = (StartPingCheckPacket)packet; 1513 StartPingCheckPacket startPing = (StartPingCheckPacket)packet;
1514 CompletePing(udpClient, startPing.PingID.PingID); 1514 CompletePing(udpClient, startPing.PingID.PingID);
1515 1515
1516 if ((Environment.TickCount - m_elapsedMSSinceLastStatReport) >= 3000) 1516 if ((Environment.TickCount - m_elapsedMSSinceLastStatReport) >= 3000)
1517 { 1517 {
1518 udpClient.SendPacketStats(); 1518 udpClient.SendPacketStats();
@@ -1677,7 +1677,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1677 m_log.DebugFormat( 1677 m_log.DebugFormat(
1678 "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} to {1} from IP {2}", 1678 "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} to {1} from IP {2}",
1679 uccp.CircuitCode.Code, Scene.RegionInfo.RegionName, endPoint); 1679 uccp.CircuitCode.Code, Scene.RegionInfo.RegionName, endPoint);
1680 1680
1681 AuthenticateResponse sessionInfo; 1681 AuthenticateResponse sessionInfo;
1682 if (IsClientAuthorized(uccp, out sessionInfo)) 1682 if (IsClientAuthorized(uccp, out sessionInfo))
1683 { 1683 {
@@ -1752,10 +1752,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1752 1752
1753 lock (m_pendingCache) 1753 lock (m_pendingCache)
1754 m_pendingCache.Remove(endPoint); 1754 m_pendingCache.Remove(endPoint);
1755 } 1755 }
1756 1756
1757 // m_log.DebugFormat( 1757 // m_log.DebugFormat(
1758 // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", 1758 // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
1759 // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); 1759 // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
1760 1760
1761 } 1761 }
@@ -1787,9 +1787,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1787 1787
1788 // Determine which agent this packet came from 1788 // Determine which agent this packet came from
1789 // We need to wait here because in when using the OpenSimulator V2 teleport protocol to travel to a destination 1789 // We need to wait here because in when using the OpenSimulator V2 teleport protocol to travel to a destination
1790 // simulator with no existing child presence, the viewer (at least LL 3.3.4) will send UseCircuitCode 1790 // simulator with no existing child presence, the viewer (at least LL 3.3.4) will send UseCircuitCode
1791 // and then CompleteAgentMovement immediately without waiting for an ack. As we are now handling these 1791 // and then CompleteAgentMovement immediately without waiting for an ack. As we are now handling these
1792 // packets asynchronously, we need to account for this thread proceeding more quickly than the 1792 // packets asynchronously, we need to account for this thread proceeding more quickly than the
1793 // UseCircuitCode thread. 1793 // UseCircuitCode thread.
1794 int count = 40; 1794 int count = 40;
1795 while (count-- > 0) 1795 while (count-- > 0)
@@ -1811,7 +1811,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1811 // manager but the SceneAgent has not yet been set in Scene.AddNewAgent(). If we are too 1811 // manager but the SceneAgent has not yet been set in Scene.AddNewAgent(). If we are too
1812 // eager, then the new ScenePresence may not have registered a listener for this messsage 1812 // eager, then the new ScenePresence may not have registered a listener for this messsage
1813 // before we try to process it. 1813 // before we try to process it.
1814 // XXX: A better long term fix may be to add the SceneAgent before the client is added to 1814 // XXX: A better long term fix may be to add the SceneAgent before the client is added to
1815 // the client manager 1815 // the client manager
1816 m_log.DebugFormat( 1816 m_log.DebugFormat(
1817 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} for {1} in {2} but client SceneAgent not set yet. Waiting.", 1817 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} for {1} in {2} but client SceneAgent not set yet. Waiting.",
@@ -1825,7 +1825,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1825 else 1825 else
1826 { 1826 {
1827 m_log.DebugFormat( 1827 m_log.DebugFormat(
1828 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} in {1} but no client exists yet. Waiting.", 1828 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} in {1} but no client exists yet. Waiting.",
1829 endPoint, Scene.Name); 1829 endPoint, Scene.Name);
1830 } 1830 }
1831 1831
@@ -1962,13 +1962,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1962 { 1962 {
1963 LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); 1963 LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
1964 1964
1965 1965
1966 client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); 1966 client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
1967 client.OnLogout += LogoutHandler; 1967 client.OnLogout += LogoutHandler;
1968 client.DebugPacketLevel = DefaultClientPacketDebugLevel; 1968 client.DebugPacketLevel = DefaultClientPacketDebugLevel;
1969 1969
1970 ((LLClientView)client).DisableFacelights = m_disableFacelights; 1970 ((LLClientView)client).DisableFacelights = m_disableFacelights;
1971 1971
1972 client.Start(); 1972 client.Start();
1973 } 1973 }
1974 } 1974 }
@@ -1988,7 +1988,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1988 protected void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks) 1988 protected void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks)
1989 { 1989 {
1990 lock (client.CloseSyncLock) 1990 lock (client.CloseSyncLock)
1991 { 1991 {
1992 ClientLogoutsDueToNoReceives++; 1992 ClientLogoutsDueToNoReceives++;
1993 1993
1994 if (client.SceneAgent != null) 1994 if (client.SceneAgent != null)
@@ -1996,7 +1996,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1996 m_log.WarnFormat( 1996 m_log.WarnFormat(
1997 "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", 1997 "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.",
1998 client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name); 1998 client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name);
1999 1999
2000 if (!client.SceneAgent.IsChildAgent) 2000 if (!client.SceneAgent.IsChildAgent)
2001 client.Kick("Simulator logged you out due to connection timeout."); 2001 client.Kick("Simulator logged you out due to connection timeout.");
2002 } 2002 }
@@ -2020,11 +2020,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2020 try 2020 try
2021 { 2021 {
2022 incomingPacket = packetInbox.Dequeue(250); 2022 incomingPacket = packetInbox.Dequeue(250);
2023 2023
2024 if (incomingPacket != null && IsRunningInbound) 2024 if (incomingPacket != null && IsRunningInbound)
2025 { 2025 {
2026 ProcessInPacket(incomingPacket); 2026 ProcessInPacket(incomingPacket);
2027 2027
2028 if (UsePools) 2028 if (UsePools)
2029 { 2029 {
2030 incomingPacket.Client = null; 2030 incomingPacket.Client = null;
@@ -2192,7 +2192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2192 /// </summary> 2192 /// </summary>
2193 public long IncomingPacketsProcessed { get; protected set; } 2193 public long IncomingPacketsProcessed { get; protected set; }
2194 2194
2195 #endregion 2195 #endregion
2196 2196
2197 protected void ProcessInPacket(IncomingPacket incomingPacket) 2197 protected void ProcessInPacket(IncomingPacket incomingPacket)
2198 { 2198 {
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index 6e6a2d1..012a57d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
53 "Comms", false, "show server throttles", 53 "Comms", false, "show server throttles",
54 "show server throttles", 54 "show server throttles",
55 "Show information about server throttles", 55 "Show information about server throttles",
56 HandleShowServerThrottlesCommand); 56 HandleShowServerThrottlesCommand);
57 57
58 m_console.Commands.AddCommand( 58 m_console.Commands.AddCommand(
59 "Debug", false, "debug lludp packet", 59 "Debug", false, "debug lludp packet",
@@ -207,8 +207,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
207 HandleClientGetCommand); 207 HandleClientGetCommand);
208 208
209 m_console.Commands.AddCommand( 209 m_console.Commands.AddCommand(
210 "Debug", 210 "Debug",
211 false, 211 false,
212 "debug lludp client set", 212 "debug lludp client set",
213 "debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]", 213 "debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]",
214 "Set a debug parameter for a particular client. If no name is given then the value is set on all clients.", 214 "Set a debug parameter for a particular client. If no name is given then the value is set on all clients.",
@@ -228,22 +228,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
228 228
229 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate; 229 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
230 cdl.AddRow( 230 cdl.AddRow(
231 "Max scene throttle", 231 "Max scene throttle",
232 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 232 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
233 233
234 int maxClientDripRate = m_udpServer.ThrottleRates.Total; 234 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
235 cdl.AddRow( 235 cdl.AddRow(
236 "Max new client throttle", 236 "Max new client throttle",
237 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset"); 237 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
238 238
239 m_console.Output(cdl.ToString()); 239 m_console.Output(cdl.ToString());
240 240
241 m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer)); 241 m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer));
242 } 242 }
243 243
244 private string GetServerThrottlesReport(LLUDPServer udpServer) 244 private string GetServerThrottlesReport(LLUDPServer udpServer)
245 { 245 {
246 StringBuilder report = new StringBuilder(); 246 StringBuilder report = new StringBuilder();
247 247
248 report.AppendFormat( 248 report.AppendFormat(
249 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", 249 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
254 "Cloud", 254 "Cloud",
255 "Task", 255 "Task",
256 "Texture", 256 "Texture",
257 "Asset"); 257 "Asset");
258 258
259 report.AppendFormat( 259 report.AppendFormat(
260 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", 260 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
@@ -265,7 +265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
265 "kb/s", 265 "kb/s",
266 "kb/s", 266 "kb/s",
267 "kb/s", 267 "kb/s",
268 "kb/s"); 268 "kb/s");
269 269
270 ThrottleRates throttleRates = udpServer.ThrottleRates; 270 ThrottleRates throttleRates = udpServer.ThrottleRates;
271 report.AppendFormat( 271 report.AppendFormat(
@@ -277,16 +277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
277 (throttleRates.Cloud * 8) / 1000, 277 (throttleRates.Cloud * 8) / 1000,
278 (throttleRates.Task * 8) / 1000, 278 (throttleRates.Task * 8) / 1000,
279 (throttleRates.Texture * 8) / 1000, 279 (throttleRates.Texture * 8) / 1000,
280 (throttleRates.Asset * 8) / 1000); 280 (throttleRates.Asset * 8) / 1000);
281 281
282 return report.ToString(); 282 return report.ToString();
283 } 283 }
284 284
285 protected string GetColumnEntry(string entry, int maxLength, int columnPadding) 285 protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
286 { 286 {
287 return string.Format( 287 return string.Format(
288 "{0,-" + maxLength + "}{1,-" + columnPadding + "}", 288 "{0,-" + maxLength + "}{1,-" + columnPadding + "}",
289 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, 289 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry,
290 ""); 290 "");
291 } 291 }
292 292
@@ -375,7 +375,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
375 MainConsole.Instance.OutputFormat( 375 MainConsole.Instance.OutputFormat(
376 "Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]"); 376 "Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]");
377 return; 377 return;
378 } 378 }
379 379
380 string param = args[4]; 380 string param = args[4];
381 string rawValue = args[5]; 381 string rawValue = args[5];
@@ -467,7 +467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
467 MainConsole.Instance.OutputFormat( 467 MainConsole.Instance.OutputFormat(
468 "Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]"); 468 "Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]");
469 return; 469 return;
470 } 470 }
471 471
472 string firstName = null; 472 string firstName = null;
473 string lastName = null; 473 string lastName = null;
@@ -491,7 +491,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
491 ConsoleDisplayList cdl = new ConsoleDisplayList(); 491 ConsoleDisplayList cdl = new ConsoleDisplayList();
492 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled); 492 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled);
493 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000)); 493 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000));
494 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000)); 494 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000));
495 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000)); 495 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000));
496 496
497 m_console.Output(cdl.ToString()); 497 m_console.Output(cdl.ToString());
@@ -509,12 +509,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
509 509
510 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate; 510 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
511 cdl.AddRow( 511 cdl.AddRow(
512 "max-scene-throttle", 512 "max-scene-throttle",
513 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 513 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
514 514
515 int maxClientDripRate = m_udpServer.ThrottleRates.Total; 515 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
516 cdl.AddRow( 516 cdl.AddRow(
517 "max-new-client-throttle", 517 "max-new-client-throttle",
518 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset"); 518 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
519 519
520 m_console.Output(cdl.ToString()); 520 m_console.Output(cdl.ToString());
@@ -529,7 +529,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
529 { 529 {
530 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>"); 530 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>");
531 return; 531 return;
532 } 532 }
533 533
534 string param = args[3]; 534 string param = args[3];
535 string rawValue = args[4]; 535 string rawValue = args[4];
@@ -552,7 +552,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
552 } 552 }
553 else 553 else
554 { 554 {
555 return; 555 return;
556 } 556 }
557 557
558 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name); 558 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
@@ -598,7 +598,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
598 { 598 {
599 MainConsole.Instance.OutputFormat("Usage: debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]"); 599 MainConsole.Instance.OutputFormat("Usage: debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]");
600 return; 600 return;
601 } 601 }
602 602
603 string param = args[4]; 603 string param = args[4];
604 string rawValue = args[5]; 604 string rawValue = args[5];
@@ -697,12 +697,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
697 697
698 string direction = args[3]; 698 string direction = args[3];
699 string subCommand = args[4]; 699 string subCommand = args[4];
700 string packetName = args[5]; 700 string packetName = args[5];
701 701
702 if (subCommand == "add") 702 if (subCommand == "add")
703 { 703 {
704 MainConsole.Instance.OutputFormat( 704 MainConsole.Instance.OutputFormat(
705 "Adding packet {0} to {1} drop list for all connections in {2}", 705 "Adding packet {0} to {1} drop list for all connections in {2}",
706 direction, packetName, m_udpServer.Scene.Name); 706 direction, packetName, m_udpServer.Scene.Name);
707 707
708 m_udpServer.Scene.ForEachScenePresence( 708 m_udpServer.Scene.ForEachScenePresence(
@@ -720,7 +720,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
720 else if (subCommand == "remove") 720 else if (subCommand == "remove")
721 { 721 {
722 MainConsole.Instance.OutputFormat( 722 MainConsole.Instance.OutputFormat(
723 "Removing packet {0} from {1} drop list for all connections in {2}", 723 "Removing packet {0} from {1} drop list for all connections in {2}",
724 direction, packetName, m_udpServer.Scene.Name); 724 direction, packetName, m_udpServer.Scene.Name);
725 725
726 m_udpServer.Scene.ForEachScenePresence( 726 m_udpServer.Scene.ForEachScenePresence(
@@ -868,10 +868,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
868 MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name); 868 MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name);
869 MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning); 869 MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning);
870 MainConsole.Instance.OutputFormat( 870 MainConsole.Instance.OutputFormat(
871 "Requests waiting: {0}", 871 "Requests waiting: {0}",
872 m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a"); 872 m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a");
873 } 873 }
874 else 874 else
875 { 875 {
876 MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand); 876 MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand);
877 } 877 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 831381e..35a0711 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -3,25 +3,25 @@
3 * Original Author: Jeff Cesnik 3 * Original Author: Jeff Cesnik
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * - Redistribution and use in source and binary forms, with or without 6 * - Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * - Redistributions of source code must retain the above copyright notice, this 9 * - Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer. 10 * list of conditions and the following disclaimer.
11 * - Neither the name of the openmetaverse.org nor the names 11 * - Neither the name of the openmetaverse.org nor the names
12 * of its contributors may be used to endorse or promote products derived from 12 * of its contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission. 13 * this software without specific prior written permission.
14 * 14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE. 25 * POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
@@ -107,10 +107,10 @@ namespace OpenMetaverse
107 /// </summary> 107 /// </summary>
108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; } 108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
109 109
110 public int Port 110 public int Port
111 { 111 {
112 get { return m_udpPort; } 112 get { return m_udpPort; }
113 } 113 }
114 114
115 #region PacketDropDebugging 115 #region PacketDropDebugging
116 /// <summary> 116 /// <summary>
@@ -118,7 +118,7 @@ namespace OpenMetaverse
118 /// outbound packets. 118 /// outbound packets.
119 /// </summary> 119 /// </summary>
120 private Random m_dropRandomGenerator = new Random(); 120 private Random m_dropRandomGenerator = new Random();
121 121
122 /// <summary> 122 /// <summary>
123 /// For debugging purposes only... parameters for a simplified 123 /// For debugging purposes only... parameters for a simplified
124 /// model of packet loss with bursts, overall drop rate should 124 /// model of packet loss with bursts, overall drop rate should
@@ -137,7 +137,7 @@ namespace OpenMetaverse
137 /// </summary> 137 /// </summary>
138 private int m_dropLastTick = 0; 138 private int m_dropLastTick = 0;
139 private int m_dropResetTicks = 500; 139 private int m_dropResetTicks = 500;
140 140
141 /// <summary> 141 /// <summary>
142 /// Debugging code used to simulate dropped packets with bursts 142 /// Debugging code used to simulate dropped packets with bursts
143 /// </summary> 143 /// </summary>
@@ -187,13 +187,13 @@ namespace OpenMetaverse
187 ~OpenSimUDPBase() 187 ~OpenSimUDPBase()
188 { 188 {
189 if(m_udpSocket !=null) 189 if(m_udpSocket !=null)
190 try { m_udpSocket.Close(); } catch { } 190 try { m_udpSocket.Close(); } catch { }
191 } 191 }
192 /// <summary> 192 /// <summary>
193 /// Start inbound UDP packet handling. 193 /// Start inbound UDP packet handling.
194 /// </summary> 194 /// </summary>
195 /// <param name="recvBufferSize">The size of the receive buffer for 195 /// <param name="recvBufferSize">The size of the receive buffer for
196 /// the UDP socket. This value is passed up to the operating system 196 /// the UDP socket. This value is passed up to the operating system
197 /// and used in the system networking stack. Use zero to leave this 197 /// and used in the system networking stack. Use zero to leave this
198 /// value as the default</param> 198 /// value as the default</param>
199 /// <param name="asyncPacketHandling">Set this to true to start 199 /// <param name="asyncPacketHandling">Set this to true to start
@@ -235,7 +235,7 @@ namespace OpenMetaverse
235 } 235 }
236 try 236 try
237 { 237 {
238 // This udp socket flag is not supported under mono, 238 // This udp socket flag is not supported under mono,
239 // so we'll catch the exception and continue 239 // so we'll catch the exception and continue
240 m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); 240 m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null);
241 m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set"); 241 m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set");
@@ -249,12 +249,12 @@ namespace OpenMetaverse
249 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages, 249 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
250 // leading to a confusing bug. 250 // leading to a confusing bug.
251 // By default, Windows does not allow two sockets to bind to the same port. 251 // By default, Windows does not allow two sockets to bind to the same port.
252 // 252 //
253 // Unfortunately, this also causes a crashed sim to leave the socket in a state 253 // Unfortunately, this also causes a crashed sim to leave the socket in a state
254 // where it appears to be in use but is really just hung from the old process 254 // where it appears to be in use but is really just hung from the old process
255 // crashing rather than closing it. While this protects agains misconfiguration, 255 // crashing rather than closing it. While this protects agains misconfiguration,
256 // allowing crashed sims to be started up again right away, rather than having to 256 // allowing crashed sims to be started up again right away, rather than having to
257 // wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016 257 // wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016
258 // m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); 258 // m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
259 259
260 if (recvBufferSize != 0) 260 if (recvBufferSize != 0)
@@ -262,8 +262,8 @@ namespace OpenMetaverse
262 262
263 m_udpSocket.Bind(ipep); 263 m_udpSocket.Bind(ipep);
264 264
265 if (m_udpPort == 0) 265 if (m_udpPort == 0)
266 m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port; 266 m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;
267 267
268 IsRunningInbound = true; 268 IsRunningInbound = true;
269 269
@@ -334,7 +334,7 @@ namespace OpenMetaverse
334 { 334 {
335 UDPPacketBuffer buf; 335 UDPPacketBuffer buf;
336 336
337 // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other 337 // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other
338 // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux. 338 // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux.
339 // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation. 339 // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation.
340// if (UsePools) 340// if (UsePools)
@@ -387,8 +387,8 @@ namespace OpenMetaverse
387 m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort); 387 m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort);
388 } 388 }
389 } 389 }
390 catch (ObjectDisposedException e) 390 catch (ObjectDisposedException e)
391 { 391 {
392 m_log.Error( 392 m_log.Error(
393 string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e); 393 string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e);
394 } 394 }
@@ -434,7 +434,7 @@ namespace OpenMetaverse
434 // since this should be rare and won't cause a runtime problem. 434 // since this should be rare and won't cause a runtime problem.
435 if (m_currentReceiveTimeSamples >= s_receiveTimeSamples) 435 if (m_currentReceiveTimeSamples >= s_receiveTimeSamples)
436 { 436 {
437 AverageReceiveTicksForLastSamplePeriod 437 AverageReceiveTicksForLastSamplePeriod
438 = (float)m_receiveTicksInCurrentSamplePeriod / s_receiveTimeSamples; 438 = (float)m_receiveTicksInCurrentSamplePeriod / s_receiveTimeSamples;
439 439
440 m_receiveTicksInCurrentSamplePeriod = 0; 440 m_receiveTicksInCurrentSamplePeriod = 0;
@@ -446,16 +446,16 @@ namespace OpenMetaverse
446 m_currentReceiveTimeSamples++; 446 m_currentReceiveTimeSamples++;
447 } 447 }
448 } 448 }
449 catch (SocketException se) 449 catch (SocketException se)
450 { 450 {
451 m_log.Error( 451 m_log.Error(
452 string.Format( 452 string.Format(
453 "[UDPBASE]: Error processing UDP end receive {0}, socket error code {1}. Exception ", 453 "[UDPBASE]: Error processing UDP end receive {0}, socket error code {1}. Exception ",
454 UdpReceives, se.ErrorCode), 454 UdpReceives, se.ErrorCode),
455 se); 455 se);
456 } 456 }
457 catch (ObjectDisposedException e) 457 catch (ObjectDisposedException e)
458 { 458 {
459 m_log.Error( 459 m_log.Error(
460 string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e); 460 string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e);
461 } 461 }
@@ -486,7 +486,7 @@ namespace OpenMetaverse
486 // packets when testing throttles & retransmission code 486 // packets when testing throttles & retransmission code
487 // if (DropOutgoingPacket()) 487 // if (DropOutgoingPacket())
488 // return; 488 // return;
489 489
490 try 490 try
491 { 491 {
492 m_udpSocket.BeginSendTo( 492 m_udpSocket.BeginSendTo(
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
index 5a2bcee..f585bea 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
62 /// </summary> 62 /// </summary>
63 public int PacketsPooled 63 public int PacketsPooled
64 { 64 {
65 get 65 get
66 { 66 {
67 lock (pool) 67 lock (pool)
68 return pool.Count; 68 return pool.Count;
@@ -74,9 +74,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
74 /// </summary> 74 /// </summary>
75 public int BlocksPooled 75 public int BlocksPooled
76 { 76 {
77 get 77 get
78 { 78 {
79 lock (DataBlocks) 79 lock (DataBlocks)
80 return DataBlocks.Count; 80 return DataBlocks.Count;
81 } 81 }
82 } 82 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
248 } 248 }
249 } 249 }
250 break; 250 break;
251 251
252 // Other packets wont pool 252 // Other packets wont pool
253 default: 253 default:
254 return; 254 return;
@@ -276,7 +276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
276 { 276 {
277 DataBlocks[typeof(T)] = new Stack<Object>(); 277 DataBlocks[typeof(T)] = new Stack<Object>();
278 } 278 }
279 279
280 return new T(); 280 return new T();
281 } 281 }
282 } 282 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
index 1443477..4a8f16d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenUDP")] 9[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenUDP")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
index a935dd2..0e1a9e3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
70 m_scene = new SceneHelpers().SetupScene(); 70 m_scene = new SceneHelpers().SetupScene();
71 StatsManager.SimExtraStats = new SimExtraStatsCollector(); 71 StatsManager.SimExtraStats = new SimExtraStatsCollector();
72 } 72 }
73 73
74// /// <summary> 74// /// <summary>
75// /// Build an object name packet for test purposes 75// /// Build an object name packet for test purposes
76// /// </summary> 76// /// </summary>
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
84// odb.Name = Utils.StringToBytes(objectName); 84// odb.Name = Utils.StringToBytes(objectName);
85// onp.ObjectData = new ObjectNamePacket.ObjectDataBlock[] { odb }; 85// onp.ObjectData = new ObjectNamePacket.ObjectDataBlock[] { odb };
86// onp.Header.Zerocoded = false; 86// onp.Header.Zerocoded = false;
87// 87//
88// return onp; 88// return onp;
89// } 89// }
90// 90//
@@ -156,7 +156,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
156 config.Set("AckTimeout", -1); 156 config.Set("AckTimeout", -1);
157 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(m_scene, ics); 157 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(m_scene, ics);
158 158
159 ScenePresence sp 159 ScenePresence sp
160 = ClientStackHelpers.AddChildClient( 160 = ClientStackHelpers.AddChildClient(
161 m_scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 161 m_scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
162 162
@@ -175,21 +175,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
175// TestHelper.InMethod(); 175// TestHelper.InMethod();
176// 176//
177// uint myCircuitCode = 123457; 177// uint myCircuitCode = 123457;
178// 178//
179// TestLLUDPServer testLLUDPServer; 179// TestLLUDPServer testLLUDPServer;
180// TestLLPacketServer testLLPacketServer; 180// TestLLPacketServer testLLPacketServer;
181// AgentCircuitManager acm; 181// AgentCircuitManager acm;
182// SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm); 182// SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm);
183// AddClient(myCircuitCode, new IPEndPoint(IPAddress.Loopback, 1000), testLLUDPServer, acm); 183// AddClient(myCircuitCode, new IPEndPoint(IPAddress.Loopback, 1000), testLLUDPServer, acm);
184// 184//
185// testLLUDPServer.RemoveClientCircuit(myCircuitCode); 185// testLLUDPServer.RemoveClientCircuit(myCircuitCode);
186// Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode)); 186// Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode));
187// 187//
188// // Check that removing a non-existent circuit doesn't have any bad effects 188// // Check that removing a non-existent circuit doesn't have any bad effects
189// testLLUDPServer.RemoveClientCircuit(101); 189// testLLUDPServer.RemoveClientCircuit(101);
190// Assert.IsFalse(testLLUDPServer.HasCircuit(101)); 190// Assert.IsFalse(testLLUDPServer.HasCircuit(101));
191// } 191// }
192// 192//
193// /// <summary> 193// /// <summary>
194// /// Make sure that the client stack reacts okay to malformed packets 194// /// Make sure that the client stack reacts okay to malformed packets
195// /// </summary> 195// /// </summary>
@@ -200,8 +200,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
200// 200//
201// uint myCircuitCode = 123458; 201// uint myCircuitCode = 123458;
202// EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 1001); 202// EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 1001);
203// MockScene scene = new MockScene(); 203// MockScene scene = new MockScene();
204// 204//
205// TestLLUDPServer testLLUDPServer; 205// TestLLUDPServer testLLUDPServer;
206// TestLLPacketServer testLLPacketServer; 206// TestLLPacketServer testLLPacketServer;
207// AgentCircuitManager acm; 207// AgentCircuitManager acm;
@@ -213,24 +213,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
213// // Send two garbled 'packets' in succession 213// // Send two garbled 'packets' in succession
214// testLLUDPServer.LoadReceive(data, testEp); 214// testLLUDPServer.LoadReceive(data, testEp);
215// testLLUDPServer.LoadReceive(data, testEp); 215// testLLUDPServer.LoadReceive(data, testEp);
216// testLLUDPServer.ReceiveData(null); 216// testLLUDPServer.ReceiveData(null);
217// 217//
218// // Check that we are still here 218// // Check that we are still here
219// Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode)); 219// Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode));
220// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(0)); 220// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(0));
221// 221//
222// // Check that sending a valid packet to same circuit still succeeds 222// // Check that sending a valid packet to same circuit still succeeds
223// Assert.That(scene.ObjectNameCallsReceived, Is.EqualTo(0)); 223// Assert.That(scene.ObjectNameCallsReceived, Is.EqualTo(0));
224// 224//
225// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "helloooo"), testEp); 225// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "helloooo"), testEp);
226// testLLUDPServer.ReceiveData(null); 226// testLLUDPServer.ReceiveData(null);
227// 227//
228// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(1)); 228// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(1));
229// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(1)); 229// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(1));
230// } 230// }
231// 231//
232// /// <summary> 232// /// <summary>
233// /// Test that the stack continues to work even if some client has caused a 233// /// Test that the stack continues to work even if some client has caused a
234// /// SocketException on Socket.BeginReceive() 234// /// SocketException on Socket.BeginReceive()
235// /// </summary> 235// /// </summary>
236// [Test] 236// [Test]
@@ -239,32 +239,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
239// TestHelper.InMethod(); 239// TestHelper.InMethod();
240// 240//
241// MockScene scene = new MockScene(); 241// MockScene scene = new MockScene();
242// 242//
243// uint circuitCodeA = 130000; 243// uint circuitCodeA = 130000;
244// EndPoint epA = new IPEndPoint(IPAddress.Loopback, 1300); 244// EndPoint epA = new IPEndPoint(IPAddress.Loopback, 1300);
245// UUID agentIdA = UUID.Parse("00000000-0000-0000-0000-000000001300"); 245// UUID agentIdA = UUID.Parse("00000000-0000-0000-0000-000000001300");
246// UUID sessionIdA = UUID.Parse("00000000-0000-0000-0000-000000002300"); 246// UUID sessionIdA = UUID.Parse("00000000-0000-0000-0000-000000002300");
247// 247//
248// uint circuitCodeB = 130001; 248// uint circuitCodeB = 130001;
249// EndPoint epB = new IPEndPoint(IPAddress.Loopback, 1301); 249// EndPoint epB = new IPEndPoint(IPAddress.Loopback, 1301);
250// UUID agentIdB = UUID.Parse("00000000-0000-0000-0000-000000001301"); 250// UUID agentIdB = UUID.Parse("00000000-0000-0000-0000-000000001301");
251// UUID sessionIdB = UUID.Parse("00000000-0000-0000-0000-000000002301"); 251// UUID sessionIdB = UUID.Parse("00000000-0000-0000-0000-000000002301");
252// 252//
253// TestLLUDPServer testLLUDPServer; 253// TestLLUDPServer testLLUDPServer;
254// TestLLPacketServer testLLPacketServer; 254// TestLLPacketServer testLLPacketServer;
255// AgentCircuitManager acm; 255// AgentCircuitManager acm;
256// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); 256// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm);
257// AddClient(circuitCodeA, epA, agentIdA, sessionIdA, testLLUDPServer, acm); 257// AddClient(circuitCodeA, epA, agentIdA, sessionIdA, testLLUDPServer, acm);
258// AddClient(circuitCodeB, epB, agentIdB, sessionIdB, testLLUDPServer, acm); 258// AddClient(circuitCodeB, epB, agentIdB, sessionIdB, testLLUDPServer, acm);
259// 259//
260// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet1"), epA); 260// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet1"), epA);
261// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet2"), epB); 261// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet2"), epB);
262// testLLUDPServer.LoadReceiveWithBeginException(epA); 262// testLLUDPServer.LoadReceiveWithBeginException(epA);
263// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(2, "packet3"), epB); 263// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(2, "packet3"), epB);
264// testLLUDPServer.ReceiveData(null); 264// testLLUDPServer.ReceiveData(null);
265// 265//
266// Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA)); 266// Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA));
267// 267//
268// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3)); 268// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3));
269// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3)); 269// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3));
270// } 270// }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs
index 92f1fc3..1731aa9 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
59// agent.InventoryFolder = UUID.Zero; 59// agent.InventoryFolder = UUID.Zero;
60// agent.startpos = Vector3.Zero; 60// agent.startpos = Vector3.Zero;
61// agent.CapsPath = "http://wibble.com"; 61// agent.CapsPath = "http://wibble.com";
62// 62//
63// TestLLUDPServer testLLUDPServer; 63// TestLLUDPServer testLLUDPServer;
64// TestLLPacketServer testLLPacketServer; 64// TestLLPacketServer testLLPacketServer;
65// AgentCircuitManager acm; 65// AgentCircuitManager acm;
@@ -67,7 +67,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
67// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); 67// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm);
68// 68//
69// TestClient testClient = new TestClient(agent, scene); 69// TestClient testClient = new TestClient(agent, scene);
70// 70//
71// LLPacketHandler packetHandler 71// LLPacketHandler packetHandler
72// = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings()); 72// = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings());
73// 73//
@@ -87,14 +87,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
87// /// <param name="testPacketServer"></param> 87// /// <param name="testPacketServer"></param>
88// /// <param name="acm">Agent circuit manager used in setting up the stack</param> 88// /// <param name="acm">Agent circuit manager used in setting up the stack</param>
89// protected void SetupStack( 89// protected void SetupStack(
90// IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, 90// IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
91// out AgentCircuitManager acm) 91// out AgentCircuitManager acm)
92// { 92// {
93// IConfigSource configSource = new IniConfigSource(); 93// IConfigSource configSource = new IniConfigSource();
94// ClientStackUserSettings userSettings = new ClientStackUserSettings(); 94// ClientStackUserSettings userSettings = new ClientStackUserSettings();
95// testLLUDPServer = new TestLLUDPServer(); 95// testLLUDPServer = new TestLLUDPServer();
96// acm = new AgentCircuitManager(); 96// acm = new AgentCircuitManager();
97// 97//
98// uint port = 666; 98// uint port = 666;
99// testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); 99// testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm);
100// testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); 100// testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs
index 5e41dbd..873b1e5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
137 Scene scene = new SceneHelpers().SetupScene(); 137 Scene scene = new SceneHelpers().SetupScene();
138 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene); 138 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene);
139 139
140 ScenePresence sp 140 ScenePresence sp
141 = ClientStackHelpers.AddChildClient( 141 = ClientStackHelpers.AddChildClient(
142 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 142 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
143 143
@@ -145,7 +145,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
145 145
146 udpServer.Throttle.DebugLevel = 1; 146 udpServer.Throttle.DebugLevel = 1;
147 udpClient.ThrottleDebugLevel = 1; 147 udpClient.ThrottleDebugLevel = 1;
148 148
149 int resendBytes = 1000; 149 int resendBytes = 1000;
150 int landBytes = 2000; 150 int landBytes = 2000;
151 int windBytes = 3000; 151 int windBytes = 3000;
@@ -161,8 +161,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
161 int totalBytes = LLUDPServer.MTU + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes; 161 int totalBytes = LLUDPServer.MTU + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes;
162 162
163 AssertThrottles( 163 AssertThrottles(
164 udpClient, 164 udpClient,
165 LLUDPServer.MTU, landBytes, windBytes, cloudBytes, taskBytes, 165 LLUDPServer.MTU, landBytes, windBytes, cloudBytes, taskBytes,
166 textureBytes, assetBytes, totalBytes, 0, 0); 166 textureBytes, assetBytes, totalBytes, 0, 0);
167 } 167 }
168 168
@@ -181,7 +181,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
181 181
182 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene, ics); 182 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene, ics);
183 183
184 ScenePresence sp 184 ScenePresence sp
185 = ClientStackHelpers.AddChildClient( 185 = ClientStackHelpers.AddChildClient(
186 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 186 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
187 187
@@ -207,7 +207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
207 double commitRatio = 32000.0 / totalBytes; 207 double commitRatio = 32000.0 / totalBytes;
208 208
209 AssertThrottles( 209 AssertThrottles(
210 udpClient, 210 udpClient,
211 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio, 211 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
212 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); 212 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
213 213
@@ -217,7 +217,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
217 commitRatio = (32000.0 + 20.0 * LLUDPServer.MTU) / totalBytes; 217 commitRatio = (32000.0 + 20.0 * LLUDPServer.MTU) / totalBytes;
218 218
219 AssertThrottles( 219 AssertThrottles(
220 udpClient, 220 udpClient,
221 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio, 221 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
222 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); 222 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
223 223
@@ -227,7 +227,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
227 commitRatio = (32000.0 + (20.0 * LLUDPServer.MTU)/Math.Pow(2,1)) / totalBytes; 227 commitRatio = (32000.0 + (20.0 * LLUDPServer.MTU)/Math.Pow(2,1)) / totalBytes;
228 228
229 AssertThrottles( 229 AssertThrottles(
230 udpClient, 230 udpClient,
231 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio, 231 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
232 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); 232 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
233 } 233 }
@@ -248,14 +248,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
248 int taskBytes = 14000; 248 int taskBytes = 14000;
249 int textureBytes = 16000; 249 int textureBytes = 16000;
250 int assetBytes = 18000; 250 int assetBytes = 18000;
251 int totalBytes 251 int totalBytes
252 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2); 252 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2);
253 253
254 Scene scene = new SceneHelpers().SetupScene(); 254 Scene scene = new SceneHelpers().SetupScene();
255 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene); 255 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene);
256 udpServer.Throttle.RequestedDripRate = totalBytes; 256 udpServer.Throttle.RequestedDripRate = totalBytes;
257 257
258 ScenePresence sp1 258 ScenePresence sp1
259 = ClientStackHelpers.AddChildClient( 259 = ClientStackHelpers.AddChildClient(
260 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 260 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
261 261
@@ -265,8 +265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
265 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 265 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
266 266
267 AssertThrottles( 267 AssertThrottles(
268 udpClient1, 268 udpClient1,
269 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2, 269 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2,
270 textureBytes / 2, assetBytes / 2, totalBytes, 0, 0); 270 textureBytes / 2, assetBytes / 2, totalBytes, 0, 0);
271 271
272 // Test: Now add another client 272 // Test: Now add another client
@@ -281,13 +281,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
281 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 281 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
282 282
283 AssertThrottles( 283 AssertThrottles(
284 udpClient1, 284 udpClient1,
285 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4, 285 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4,
286 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0); 286 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0);
287 287
288 AssertThrottles( 288 AssertThrottles(
289 udpClient2, 289 udpClient2,
290 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4, 290 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4,
291 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0); 291 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0);
292 } 292 }
293 293
@@ -307,14 +307,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
307 int taskBytes = 12000; 307 int taskBytes = 12000;
308 int textureBytes = 14000; 308 int textureBytes = 14000;
309 int assetBytes = 16000; 309 int assetBytes = 16000;
310 int totalBytes 310 int totalBytes
311 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2); 311 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2);
312 312
313 Scene scene = new SceneHelpers().SetupScene(); 313 Scene scene = new SceneHelpers().SetupScene();
314 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene); 314 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene);
315 udpServer.ThrottleRates.Total = totalBytes; 315 udpServer.ThrottleRates.Total = totalBytes;
316 316
317 ScenePresence sp 317 ScenePresence sp
318 = ClientStackHelpers.AddChildClient( 318 = ClientStackHelpers.AddChildClient(
319 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 319 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
320 320
@@ -325,8 +325,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
325 udpClient, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 325 udpClient, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
326 326
327 AssertThrottles( 327 AssertThrottles(
328 udpClient, 328 udpClient,
329 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2, 329 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2,
330 textureBytes / 2, assetBytes / 2, totalBytes, 0, totalBytes); 330 textureBytes / 2, assetBytes / 2, totalBytes, 0, totalBytes);
331 } 331 }
332 332
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
352 udpServer.ThrottleRates.Total = (int)(totalBytes * 1.1); 352 udpServer.ThrottleRates.Total = (int)(totalBytes * 1.1);
353 udpServer.Throttle.RequestedDripRate = (int)(totalBytes * 1.5); 353 udpServer.Throttle.RequestedDripRate = (int)(totalBytes * 1.5);
354 354
355 ScenePresence sp1 355 ScenePresence sp1
356 = ClientStackHelpers.AddChildClient( 356 = ClientStackHelpers.AddChildClient(
357 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 357 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
358 358
@@ -363,8 +363,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
363 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 363 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
364 364
365 AssertThrottles( 365 AssertThrottles(
366 udpClient1, 366 udpClient1,
367 resendBytes, landBytes, windBytes, cloudBytes, taskBytes, 367 resendBytes, landBytes, windBytes, cloudBytes, taskBytes,
368 textureBytes, assetBytes, totalBytes, 0, totalBytes * 1.1); 368 textureBytes, assetBytes, totalBytes, 0, totalBytes * 1.1);
369 369
370 // Now add another client 370 // Now add another client
@@ -379,25 +379,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
379 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 379 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
380 380
381 AssertThrottles( 381 AssertThrottles(
382 udpClient1, 382 udpClient1,
383 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75, 383 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75,
384 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1); 384 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1);
385 385
386 AssertThrottles( 386 AssertThrottles(
387 udpClient2, 387 udpClient2,
388 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75, 388 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75,
389 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1); 389 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1);
390 } 390 }
391 391
392 private void AssertThrottles( 392 private void AssertThrottles(
393 LLUDPClient udpClient, 393 LLUDPClient udpClient,
394 double resendBytes, double landBytes, double windBytes, double cloudBytes, double taskBytes, double textureBytes, double assetBytes, 394 double resendBytes, double landBytes, double windBytes, double cloudBytes, double taskBytes, double textureBytes, double assetBytes,
395 double totalBytes, double targetBytes, double maxBytes) 395 double totalBytes, double targetBytes, double maxBytes)
396 { 396 {
397 ClientInfo ci = udpClient.GetClientInfo(); 397 ClientInfo ci = udpClient.GetClientInfo();
398 398
399// Console.WriteLine( 399// Console.WriteLine(
400// "Resend={0}, Land={1}, Wind={2}, Cloud={3}, Task={4}, Texture={5}, Asset={6}, TOTAL = {7}", 400// "Resend={0}, Land={1}, Wind={2}, Cloud={3}, Task={4}, Texture={5}, Asset={6}, TOTAL = {7}",
401// ci.resendThrottle, ci.landThrottle, ci.windThrottle, ci.cloudThrottle, ci.taskThrottle, ci.textureThrottle, ci.assetThrottle, ci.totalThrottle); 401// ci.resendThrottle, ci.landThrottle, ci.windThrottle, ci.cloudThrottle, ci.taskThrottle, ci.textureThrottle, ci.assetThrottle, ci.totalThrottle);
402 402
403 Assert.AreEqual((int)resendBytes, ci.resendThrottle, "Resend"); 403 Assert.AreEqual((int)resendBytes, ci.resendThrottle, "Resend");
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
index 6278e36..f8ec97a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
@@ -58,14 +58,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
58 58
59 /// <summary>Flag used to enable adaptive throttles</summary> 59 /// <summary>Flag used to enable adaptive throttles</summary>
60 public bool AdaptiveThrottlesEnabled; 60 public bool AdaptiveThrottlesEnabled;
61 61
62 /// <summary> 62 /// <summary>
63 /// Set the minimum rate that the adaptive throttles can set. The viewer 63 /// Set the minimum rate that the adaptive throttles can set. The viewer
64 /// can still throttle lower than this, but the adaptive throttles will 64 /// can still throttle lower than this, but the adaptive throttles will
65 /// never decrease rates below this no matter how many packets are dropped 65 /// never decrease rates below this no matter how many packets are dropped
66 /// </summary> 66 /// </summary>
67 public Int64 MinimumAdaptiveThrottleRate; 67 public Int64 MinimumAdaptiveThrottleRate;
68 68
69 /// <summary>Amount of the texture throttle to steal for the task throttle</summary> 69 /// <summary>Amount of the texture throttle to steal for the task throttle</summary>
70 public double CannibalizeTextureRate; 70 public double CannibalizeTextureRate;
71 71
@@ -109,7 +109,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
109// CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f); 109// CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f);
110// CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9); 110// CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9);
111 CannibalizeTextureRate = 0f; 111 CannibalizeTextureRate = 0f;
112 112
113 } 113 }
114 catch (Exception) { } 114 catch (Exception) { }
115 } 115 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
index cac57b2..1daf091 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
@@ -44,24 +44,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private static Int32 m_counter = 0; 46 private static Int32 m_counter = 0;
47 47
48// private Int32 m_identifier; 48// private Int32 m_identifier;
49 49
50 protected const float m_timeScale = 1e-3f; 50 protected const float m_timeScale = 1e-3f;
51 51
52 /// <summary> 52 /// <summary>
53 /// This is the number of m_minimumDripRate bytes 53 /// This is the number of m_minimumDripRate bytes
54 /// allowed in a burst 54 /// allowed in a burst
55 /// roughtly, with this settings, the maximum time system will take 55 /// roughtly, with this settings, the maximum time system will take
56 /// to recheck a bucket in ms 56 /// to recheck a bucket in ms
57 /// 57 ///
58 /// </summary> 58 /// </summary>
59 protected const float m_quantumsPerBurst = 5; 59 protected const float m_quantumsPerBurst = 5;
60 60
61 /// <summary> 61 /// <summary>
62 /// </summary> 62 /// </summary>
63 protected const float m_minimumDripRate = 1500; 63 protected const float m_minimumDripRate = 1500;
64 64
65 /// <summary>Time of the last drip</summary> 65 /// <summary>Time of the last drip</summary>
66 protected double m_lastDrip; 66 protected double m_lastDrip;
67 67
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
76 /// </summary> 76 /// </summary>
77 77
78 protected Dictionary<TokenBucket, float> m_children = new Dictionary<TokenBucket, float>(); 78 protected Dictionary<TokenBucket, float> m_children = new Dictionary<TokenBucket, float>();
79 79
80#region Properties 80#region Properties
81 81
82 /// <summary> 82 /// <summary>
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
92 } 92 }
93 /// <summary> 93 /// <summary>
94 /// This is the maximum number 94 /// This is the maximum number
95 /// of tokens that can accumulate in the bucket at any one time. This 95 /// of tokens that can accumulate in the bucket at any one time. This
96 /// also sets the total request for leaf nodes 96 /// also sets the total request for leaf nodes
97 /// </summary> 97 /// </summary>
98 protected float m_burst; 98 protected float m_burst;
@@ -127,14 +127,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
127 return (float)rate; 127 return (float)rate;
128 } 128 }
129 } 129 }
130 130
131 /// <summary> 131 /// <summary>
132 /// The requested drip rate for this particular bucket. 132 /// The requested drip rate for this particular bucket.
133 /// </summary> 133 /// </summary>
134 /// <remarks> 134 /// <remarks>
135 /// 0 then TotalDripRequest is used instead. 135 /// 0 then TotalDripRequest is used instead.
136 /// Can never be above MaxDripRate. 136 /// Can never be above MaxDripRate.
137 /// Tokens are added to the bucket at any time 137 /// Tokens are added to the bucket at any time
138 /// <seealso cref="RemoveTokens"/> is called, at the granularity of 138 /// <seealso cref="RemoveTokens"/> is called, at the granularity of
139 /// the system tick interval (typically around 15-22ms)</remarks> 139 /// the system tick interval (typically around 15-22ms)</remarks>
140 protected float m_dripRate; 140 protected float m_dripRate;
@@ -170,12 +170,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
170 /// The current total of the requested maximum burst rates of children buckets. 170 /// The current total of the requested maximum burst rates of children buckets.
171 /// </summary> 171 /// </summary>
172 protected float m_totalDripRequest; 172 protected float m_totalDripRequest;
173 public float TotalDripRequest 173 public float TotalDripRequest
174 { 174 {
175 get { return m_totalDripRequest; } 175 get { return m_totalDripRequest; }
176 set { m_totalDripRequest = value; } 176 set { m_totalDripRequest = value; }
177 } 177 }
178 178
179#endregion Properties 179#endregion Properties
180 180
181#region Constructor 181#region Constructor
@@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
191 /// zero if this bucket has no maximum capacity</param> 191 /// zero if this bucket has no maximum capacity</param>
192 /// <param name="dripRate">Rate that the bucket fills, in bytes per 192 /// <param name="dripRate">Rate that the bucket fills, in bytes per
193 /// second. If zero, the bucket always remains full</param> 193 /// second. If zero, the bucket always remains full</param>
194 public TokenBucket(TokenBucket parent, float dripRate, float MaxBurst) 194 public TokenBucket(TokenBucket parent, float dripRate, float MaxBurst)
195 { 195 {
196 m_counter++; 196 m_counter++;
197 197
@@ -240,7 +240,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
240 foreach (KeyValuePair<TokenBucket, float> cref in m_children) 240 foreach (KeyValuePair<TokenBucket, float> cref in m_children)
241 m_totalDripRequest += cref.Value; 241 m_totalDripRequest += cref.Value;
242 } 242 }
243 243
244 // Pass the new values up to the parent 244 // Pass the new values up to the parent
245 if (m_parent != null) 245 if (m_parent != null)
246 m_parent.RegisterRequest(this, Math.Min(RequestedDripRate, TotalDripRequest)); 246 m_parent.RegisterRequest(this, Math.Min(RequestedDripRate, TotalDripRequest));
@@ -265,7 +265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
265 if (Parent != null) 265 if (Parent != null)
266 Parent.RegisterRequest(this,Math.Min(RequestedDripRate, TotalDripRequest)); 266 Parent.RegisterRequest(this,Math.Min(RequestedDripRate, TotalDripRequest));
267 } 267 }
268 268
269 /// <summary> 269 /// <summary>
270 /// Remove a given number of tokens from the bucket 270 /// Remove a given number of tokens from the bucket
271 /// </summary> 271 /// </summary>
@@ -302,7 +302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
302 302
303 /// <summary> 303 /// <summary>
304 /// Add tokens to the bucket over time. The number of tokens added each 304 /// Add tokens to the bucket over time. The number of tokens added each
305 /// call depends on the length of time that has passed since the last 305 /// call depends on the length of time that has passed since the last
306 /// call to Drip 306 /// call to Drip
307 /// </summary> 307 /// </summary>
308 /// <returns>True if tokens were added to the bucket, otherwise false</returns> 308 /// <returns>True if tokens were added to the bucket, otherwise false</returns>
@@ -315,7 +315,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
315 m_log.WarnFormat("[TOKENBUCKET] something odd is happening and drip rate is 0 for {0}", m_counter); 315 m_log.WarnFormat("[TOKENBUCKET] something odd is happening and drip rate is 0 for {0}", m_counter);
316 return; 316 return;
317 } 317 }
318 318
319 double now = Util.GetTimeStampMS(); 319 double now = Util.GetTimeStampMS();
320 double deltaMS = now - m_lastDrip; 320 double deltaMS = now - m_lastDrip;
321 m_lastDrip = now; 321 m_lastDrip = now;
@@ -333,13 +333,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
333 333
334 public class AdaptiveTokenBucket : TokenBucket 334 public class AdaptiveTokenBucket : TokenBucket
335 { 335 {
336 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 336 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
337 337
338 public bool AdaptiveEnabled { get; set; } 338 public bool AdaptiveEnabled { get; set; }
339 339
340 /// <summary> 340 /// <summary>
341 /// The minimum rate for flow control. Minimum drip rate is one 341 /// The minimum rate for flow control. Minimum drip rate is one
342 /// packet per second. 342 /// packet per second.
343 /// </summary> 343 /// </summary>
344 344
345 protected const float m_minimumFlow = 50000; 345 protected const float m_minimumFlow = 50000;
@@ -361,7 +361,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
361 private bool m_enabled = false; 361 private bool m_enabled = false;
362 362
363 // <summary> 363 // <summary>
364 // Adjust drip rate in response to network conditions. 364 // Adjust drip rate in response to network conditions.
365 // </summary> 365 // </summary>
366 public float AdjustedDripRate 366 public float AdjustedDripRate
367 { 367 {
@@ -374,10 +374,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
374 m_parent.RegisterRequest(this, m_dripRate); 374 m_parent.RegisterRequest(this, m_dripRate);
375 } 375 }
376 } 376 }
377 377
378 378
379 // <summary> 379 // <summary>
380 // 380 //
381 // </summary> 381 // </summary>
382 public AdaptiveTokenBucket(TokenBucket parent, float maxDripRate, float maxBurst, bool enabled) 382 public AdaptiveTokenBucket(TokenBucket parent, float maxDripRate, float maxBurst, bool enabled)
383 : base(parent, maxDripRate, maxBurst) 383 : base(parent, maxDripRate, maxBurst)
@@ -393,7 +393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
393 if (m_parent != null) 393 if (m_parent != null)
394 m_parent.RegisterRequest(this, m_dripRate); 394 m_parent.RegisterRequest(this, m_dripRate);
395 } 395 }
396 396
397 /// <summary> 397 /// <summary>
398 /// Reliable packets sent to the client for which we never received an ack adjust the drip rate down. 398 /// Reliable packets sent to the client for which we never received an ack adjust the drip rate down.
399 /// <param name="packets">Number of packets that expired without successful delivery</param> 399 /// <param name="packets">Number of packets that expired without successful delivery</param>
@@ -406,7 +406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
406 } 406 }
407 407
408 // <summary> 408 // <summary>
409 // 409 //
410 // </summary> 410 // </summary>
411 public void AcknowledgePackets(Int32 count) 411 public void AcknowledgePackets(Int32 count)
412 { 412 {
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
index c9d5697..76f4c6f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
80 m_packets.Clear(); 80 m_packets.Clear();
81 m_pendingAdds = null; 81 m_pendingAdds = null;
82 m_pendingAcknowledgements = null; 82 m_pendingAcknowledgements = null;
83 m_pendingRemoves = null; 83 m_pendingRemoves = null;
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
94 public void Add(OutgoingPacket packet) 94 public void Add(OutgoingPacket packet)
95 { 95 {
96 m_pendingAdds.Enqueue(packet); 96 m_pendingAdds.Enqueue(packet);
97 Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength); 97 Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength);
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
@@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
116 /// <summary> 116 /// <summary>
117 /// Marks a packet as no longer needing acknowledgement without a received acknowledgement. 117 /// Marks a packet as no longer needing acknowledgement without a received acknowledgement.
118 /// This method is called when a packet expires and we no longer need an acknowledgement. 118 /// This method is called when a packet expires and we no longer need an acknowledgement.
119 /// When some reliable packet types expire, they are handled in a way other than simply 119 /// When some reliable packet types expire, they are handled in a way other than simply
120 /// resending them. The only effect of removal this way is to update unacked byte count. 120 /// resending them. The only effect of removal this way is to update unacked byte count.
121 /// </summary> 121 /// </summary>
122 /// <param name="sequenceNumber">Sequence number of the packet to 122 /// <param name="sequenceNumber">Sequence number of the packet to
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
155 155
156 foreach (OutgoingPacket packet in m_packets.Values) 156 foreach (OutgoingPacket packet in m_packets.Values)
157 { 157 {
158 // TickCount of zero means a packet is in the resend queue 158 // TickCount of zero means a packet is in the resend queue
159 // but hasn't actually been sent over the wire yet 159 // but hasn't actually been sent over the wire yet
160 if (packet.TickCount == 0) 160 if (packet.TickCount == 0)
161 continue; 161 continue;
@@ -172,7 +172,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
172 // As with other network applications, assume that an expired packet is 172 // As with other network applications, assume that an expired packet is
173 // an indication of some network problem, slow transmission 173 // an indication of some network problem, slow transmission
174 packet.Client.FlowThrottle.ExpirePackets(1); 174 packet.Client.FlowThrottle.ExpirePackets(1);
175 175
176 expiredPackets.Add(packet); 176 expiredPackets.Add(packet);
177 } 177 }
178 } 178 }
@@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
191 while (m_pendingAdds.TryDequeue(out pendingAdd)) 191 while (m_pendingAdds.TryDequeue(out pendingAdd))
192 if (pendingAdd != null) 192 if (pendingAdd != null)
193 m_packets[pendingAdd.SequenceNumber] = pendingAdd; 193 m_packets[pendingAdd.SequenceNumber] = pendingAdd;
194 194
195 // Process all the pending removes, including updating statistics and round-trip times 195 // Process all the pending removes, including updating statistics and round-trip times
196 PendingAck pendingAcknowledgement; 196 PendingAck pendingAcknowledgement;
197 while (m_pendingAcknowledgements.TryDequeue(out pendingAcknowledgement)) 197 while (m_pendingAcknowledgements.TryDequeue(out pendingAcknowledgement))
@@ -228,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
228 else 228 else
229 { 229 {
230 // m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack", 230 // m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack",
231 // pendingAcknowledgement.SequenceNumber); 231 // pendingAcknowledgement.SequenceNumber);
232 } 232 }
233 } 233 }
234 234
diff --git a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
index 0b6ee2f..e859653 100644
--- a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ClientStack")] 8[assembly: AssemblyTitle("OpenSim.Region.ClientStack")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index 1a19585..f48710f 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
127 if (estateModule.IsTerrainXfer(xferID)) 127 if (estateModule.IsTerrainXfer(xferID))
128 return; 128 return;
129 } 129 }
130 130
131 m_log.ErrorFormat( 131 m_log.ErrorFormat(
132 "[AGENT ASSET TRANSACTIONS]: Could not find uploader for xfer id {0}, packet id {1}, data length {2}", 132 "[AGENT ASSET TRANSACTIONS]: Could not find uploader for xfer id {0}, packet id {1}, data length {2}",
133 xferID, packetID, data.Length); 133 xferID, packetID, data.Length);
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
index f489262..89fdf09 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
43 IAgentAssetTransactions 43 IAgentAssetTransactions
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 protected Scene m_Scene; 47 protected Scene m_Scene;
48 private bool m_dumpAssetsToFile = false; 48 private bool m_dumpAssetsToFile = false;
49 private int m_levelUpload = 0; 49 private int m_levelUpload = 0;
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
53 /// </summary> 53 /// </summary>
54 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions = 54 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
55 new Dictionary<UUID, AgentAssetTransactions>(); 55 new Dictionary<UUID, AgentAssetTransactions>();
56 56
57 #region Region Module interface 57 #region Region Module interface
58 58
59 public void Initialise(IConfigSource source) 59 public void Initialise(IConfigSource source)
@@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
241// m_log.DebugFormat( 241// m_log.DebugFormat(
242// "[ASSET TRANSACTION MODULE]: HandleUDPUploadRequest - assetID: {0}, transaction {1}, type {2}, storeLocal {3}, tempFile {4}, data.Length {5}", 242// "[ASSET TRANSACTION MODULE]: HandleUDPUploadRequest - assetID: {0}, transaction {1}, type {2}, storeLocal {3}, tempFile {4}, data.Length {5}",
243// assetID, transactionID, type, storeLocal, tempFile, data.Length); 243// assetID, transactionID, type, storeLocal, tempFile, data.Length);
244 244
245 if (((AssetType)type == AssetType.Texture || 245 if (((AssetType)type == AssetType.Texture ||
246 (AssetType)type == AssetType.Sound || 246 (AssetType)type == AssetType.Sound ||
247 (AssetType)type == AssetType.TextureTGA || 247 (AssetType)type == AssetType.TextureTGA ||
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 60a254e..d2aa177 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
41{ 41{
42 public class AssetXferUploader 42 public class AssetXferUploader
43 { 43 {
44 44
45 private List<UUID> defaultIDs = new List<UUID> { 45 private List<UUID> defaultIDs = new List<UUID> {
46 // Viewer's notion of the default texture 46 // Viewer's notion of the default texture
47 new UUID("5748decc-f629-461c-9a36-a35a221fe21f"), // others == default blank 47 new UUID("5748decc-f629-461c-9a36-a35a221fe21f"), // others == default blank
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
index 4b457b1..ff71593 100644
--- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
@@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Scenes;
38namespace OpenSim.Region.CoreModules.Agent.IPBan 38namespace OpenSim.Region.CoreModules.Agent.IPBan
39{ 39{
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")] 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")]
41 public class IPBanModule : ISharedRegionModule 41 public class IPBanModule : ISharedRegionModule
42 { 42 {
43 #region Implementation of ISharedRegionModule 43 #region Implementation of ISharedRegionModule
44 44
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
86 86
87 public void Close() 87 public void Close()
88 { 88 {
89 89
90 } 90 }
91 91
92 public string Name 92 public string Name
@@ -107,9 +107,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
107 /// matching domain (including "betasomewhere.com", "beta.somewhere.com", 107 /// matching domain (including "betasomewhere.com", "beta.somewhere.com",
108 /// "somewhere.com.beta") - make sure to be reasonably specific in DNS 108 /// "somewhere.com.beta") - make sure to be reasonably specific in DNS
109 /// bans. 109 /// bans.
110 /// 110 ///
111 /// IP address bans match on first characters, so, 111 /// IP address bans match on first characters, so,
112 /// "127.0.0.1" will ban only that address, 112 /// "127.0.0.1" will ban only that address,
113 /// "127.0.1" will ban "127.0.10.0" 113 /// "127.0.1" will ban "127.0.10.0"
114 /// but "127.0.1." will ban only the "127.0.1.*" network 114 /// but "127.0.1." will ban only the "127.0.1.*" network
115 /// </summary> 115 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 6d1f0c2..2242e42 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -285,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
285 // Cache Decoded layers 285 // Cache Decoded layers
286 SaveFileCacheForAsset(assetID, layers); 286 SaveFileCacheForAsset(assetID, layers);
287 } 287 }
288 288
289 // Notify Interested Parties 289 // Notify Interested Parties
290 lock (m_notifyList) 290 lock (m_notifyList)
291 { 291 {
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
index 1391013..1b6401a 100644
--- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
53 private double lastTimeTick = 0.0; 53 private double lastTimeTick = 0.0;
54 private double lastFilesExpire = 0.0; 54 private double lastFilesExpire = 0.0;
55 private bool inTimeTick = false; 55 private bool inTimeTick = false;
56 56
57 public struct XferRequest 57 public struct XferRequest
58 { 58 {
59 public IClientAPI remoteClient; 59 public IClientAPI remoteClient;
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
68 public int refsCount; 68 public int refsCount;
69 public double timeStampMS; 69 public double timeStampMS;
70 } 70 }
71 71
72 #region INonSharedRegionModule Members 72 #region INonSharedRegionModule Members
73 73
74 public void Initialise(IConfigSource config) 74 public void Initialise(IConfigSource config)
@@ -202,7 +202,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
202 } 202 }
203 } 203 }
204 } 204 }
205 205
206 public void NewClient(IClientAPI client) 206 public void NewClient(IClientAPI client)
207 { 207 {
208 client.OnRequestXfer += RequestXfer; 208 client.OnRequestXfer += RequestXfer;
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
275 int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Asset) >> 11; 275 int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Asset) >> 11;
276 if(Transfers.Count > 1) 276 if(Transfers.Count > 1)
277 burstSize /= Transfers.Count; 277 burstSize /= Transfers.Count;
278 XferDownLoad transaction = 278 XferDownLoad transaction =
279 new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize); 279 new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize);
280 280
281 Transfers.Add(xferID, transaction); 281 Transfers.Add(xferID, transaction);
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
288 } 288 }
289 } 289 }
290 else 290 else
291 m_log.WarnFormat("[Xfer]: {0} not found", fileName); 291 m_log.WarnFormat("[Xfer]: {0} not found", fileName);
292 } 292 }
293 } 293 }
294 294
@@ -381,9 +381,9 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
381 lastBytes = 1024; 381 lastBytes = 1024;
382 LastPacket--; 382 LastPacket--;
383 } 383 }
384 384
385 } 385 }
386 386
387 lastAckPacket = -1; 387 lastAckPacket = -1;
388 lastSentPacket = -1; 388 lastSentPacket = -1;
389 389
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
index 14b0280..23c1f03 100644
--- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
@@ -41,16 +41,16 @@ namespace OpenSim.Region.CoreModules.Asset
41 /// </summary> 41 /// </summary>
42 /// <remarks> 42 /// <remarks>
43 /// <para> 43 /// <para>
44 /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache". 44 /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache".
45 /// When cache is successfully enable log should have message 45 /// When cache is successfully enable log should have message
46 /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)". 46 /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)".
47 /// </para> 47 /// </para>
48 /// <para> 48 /// <para>
49 /// Cache's size is limited by two parameters: 49 /// Cache's size is limited by two parameters:
50 /// maximal allowed size in bytes and maximal allowed asset count. When new asset 50 /// maximal allowed size in bytes and maximal allowed asset count. When new asset
51 /// is added to cache that have achieved either size or count limitation, cache 51 /// is added to cache that have achieved either size or count limitation, cache
52 /// will automatically remove less recently used assets from cache. Additionally 52 /// will automatically remove less recently used assets from cache. Additionally
53 /// asset's lifetime is controlled by expiration time. 53 /// asset's lifetime is controlled by expiration time.
54 /// </para> 54 /// </para>
55 /// <para> 55 /// <para>
56 /// <list type="table"> 56 /// <list type="table">
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Asset
94 public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule 94 public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule
95 { 95 {
96 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 96 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
97 97
98 /// <summary> 98 /// <summary>
99 /// Cache's default maximal asset count. 99 /// Cache's default maximal asset count.
100 /// </summary> 100 /// </summary>
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Asset
119 /// Asset's default expiration time in the cache. 119 /// Asset's default expiration time in the cache.
120 /// </summary> 120 /// </summary>
121 public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); 121 public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0);
122 122
123 /// <summary> 123 /// <summary>
124 /// Cache object. 124 /// Cache object.
125 /// </summary> 125 /// </summary>
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Asset
213 if (asset != null) 213 if (asset != null)
214 { 214 {
215// m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); 215// m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID);
216 216
217 long size = asset.Data != null ? asset.Data.Length : 1; 217 long size = asset.Data != null ? asset.Data.Length : 1;
218 m_cache.Set(asset.ID, asset, size); 218 m_cache.Set(asset.ID, asset, size);
219 m_cachedCount++; 219 m_cachedCount++;
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Asset
246 } 246 }
247 247
248 /// <summary> 248 /// <summary>
249 /// Get asset stored 249 /// Get asset stored
250 /// </summary> 250 /// </summary>
251 /// <param name="id"> 251 /// <param name="id">
252 /// The asset's id. 252 /// The asset's id.
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset
283 283
284// if (null == assetBase) 284// if (null == assetBase)
285// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); 285// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id);
286 286
287 return assetBase; 287 return assetBase;
288 } 288 }
289 289
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Asset
299 get { return "CenomeMemoryAssetCache"; } 299 get { return "CenomeMemoryAssetCache"; }
300 } 300 }
301 301
302 public Type ReplaceableInterface 302 public Type ReplaceableInterface
303 { 303 {
304 get { return null; } 304 get { return null; }
305 } 305 }
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Asset
349 349
350 if (name != Name) 350 if (name != Name)
351 return; 351 return;
352 352
353 long maxSize = DefaultMaxSize; 353 long maxSize = DefaultMaxSize;
354 int maxCount = DefaultMaxCount; 354 int maxCount = DefaultMaxCount;
355 TimeSpan expirationTime = DefaultExpirationTime; 355 TimeSpan expirationTime = DefaultExpirationTime;
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
index 82bc5cc..51fc3d1 100644
--- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Asset
54 get { return "CoreAssetCache"; } 54 get { return "CoreAssetCache"; }
55 } 55 }
56 56
57 public Type ReplaceableInterface 57 public Type ReplaceableInterface
58 { 58 {
59 get { return null; } 59 get { return null; }
60 } 60 }
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 84e13a0..187f090 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -25,7 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28// Uncomment to make asset Get requests for existing 28// Uncomment to make asset Get requests for existing
29// #define WAIT_ON_INPROGRESS_REQUESTS 29// #define WAIT_ON_INPROGRESS_REQUESTS
30 30
31using System; 31using System;
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.Asset
113 private IAssetService m_AssetService; 113 private IAssetService m_AssetService;
114 private List<Scene> m_Scenes = new List<Scene>(); 114 private List<Scene> m_Scenes = new List<Scene>();
115 private object timerLock = new object(); 115 private object timerLock = new object();
116 116
117 private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>(); 117 private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>();
118 private object weakAssetReferencesLock = new object(); 118 private object weakAssetReferencesLock = new object();
119 private bool m_updateFileTimeOnCacheHit = false; 119 private bool m_updateFileTimeOnCacheHit = false;
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Asset
124 m_InvalidChars.AddRange(Path.GetInvalidFileNameChars()); 124 m_InvalidChars.AddRange(Path.GetInvalidFileNameChars());
125 } 125 }
126 126
127 public Type ReplaceableInterface 127 public Type ReplaceableInterface
128 { 128 {
129 get { return null; } 129 get { return null; }
130 } 130 }
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Asset
137 public void Initialise(IConfigSource source) 137 public void Initialise(IConfigSource source)
138 { 138 {
139 IConfig moduleConfig = source.Configs["Modules"]; 139 IConfig moduleConfig = source.Configs["Modules"];
140 140
141 if (moduleConfig != null) 141 if (moduleConfig != null)
142 { 142 {
143 string name = moduleConfig.GetString("AssetCaching", String.Empty); 143 string name = moduleConfig.GetString("AssetCaching", String.Empty);
@@ -169,11 +169,11 @@ namespace OpenSim.Region.CoreModules.Asset
169 m_negativeExpiration = assetConfig.GetInt("NegativeCacheTimeout", m_negativeExpiration); 169 m_negativeExpiration = assetConfig.GetInt("NegativeCacheTimeout", m_negativeExpiration);
170 m_negativeCacheSliding = assetConfig.GetBoolean("NegativeCacheSliding", m_negativeCacheSliding); 170 m_negativeCacheSliding = assetConfig.GetBoolean("NegativeCacheSliding", m_negativeCacheSliding);
171 m_updateFileTimeOnCacheHit = assetConfig.GetBoolean("UpdateFileTimeOnCacheHit", m_updateFileTimeOnCacheHit); 171 m_updateFileTimeOnCacheHit = assetConfig.GetBoolean("UpdateFileTimeOnCacheHit", m_updateFileTimeOnCacheHit);
172 172
173 #if WAIT_ON_INPROGRESS_REQUESTS 173 #if WAIT_ON_INPROGRESS_REQUESTS
174 m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000); 174 m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
175 #endif 175 #endif
176 176
177 m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel); 177 m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel);
178 m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay); 178 m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay);
179 179
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.Asset
266 { 266 {
267 m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds); 267 m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds);
268 m_CacheCleanTimer.AutoReset = false; 268 m_CacheCleanTimer.AutoReset = false;
269 m_CacheCleanTimer.Elapsed += CleanupExpiredFiles; 269 m_CacheCleanTimer.Elapsed += CleanupExpiredFiles;
270 m_CacheCleanTimer.Start(); 270 m_CacheCleanTimer.Start();
271 m_timerRunning = true; 271 m_timerRunning = true;
272 } 272 }
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.Asset
274 } 274 }
275 if (m_MemoryCacheEnabled) 275 if (m_MemoryCacheEnabled)
276 m_MemoryCache = new ExpiringCache<string, AssetBase>(); 276 m_MemoryCache = new ExpiringCache<string, AssetBase>();
277 277
278 lock(weakAssetReferencesLock) 278 lock(weakAssetReferencesLock)
279 weakAssetReferences = new Dictionary<string, WeakReference>(); 279 weakAssetReferences = new Dictionary<string, WeakReference>();
280 } 280 }
@@ -306,11 +306,11 @@ namespace OpenSim.Region.CoreModules.Asset
306 if (File.Exists(filename)) 306 if (File.Exists(filename))
307 { 307 {
308 UpdateFileLastAccessTime(filename); 308 UpdateFileLastAccessTime(filename);
309 } 309 }
310 else 310 else
311 { 311 {
312 // Once we start writing, make sure we flag that we're writing 312 // Once we start writing, make sure we flag that we're writing
313 // that object to the cache so that we don't try to write the 313 // that object to the cache so that we don't try to write the
314 // same file multiple times. 314 // same file multiple times.
315 lock (m_CurrentlyWriting) 315 lock (m_CurrentlyWriting)
316 { 316 {
@@ -439,7 +439,7 @@ namespace OpenSim.Region.CoreModules.Asset
439 /// <param name="id"></param> 439 /// <param name="id"></param>
440 /// <returns>An asset retrieved from the file cache. null if there was a problem retrieving an asset.</returns> 440 /// <returns>An asset retrieved from the file cache. null if there was a problem retrieving an asset.</returns>
441 private AssetBase GetFromFileCache(string id) 441 private AssetBase GetFromFileCache(string id)
442 { 442 {
443 string filename = GetFileName(id); 443 string filename = GetFileName(id);
444 444
445#if WAIT_ON_INPROGRESS_REQUESTS 445#if WAIT_ON_INPROGRESS_REQUESTS
@@ -649,7 +649,7 @@ namespace OpenSim.Region.CoreModules.Asset
649 m_MemoryCache = new ExpiringCache<string, AssetBase>(); 649 m_MemoryCache = new ExpiringCache<string, AssetBase>();
650 if (m_negativeCacheEnabled) 650 if (m_negativeCacheEnabled)
651 m_negativeCache = new ExpiringCache<string, object>(); 651 m_negativeCache = new ExpiringCache<string, object>();
652 652
653 lock(weakAssetReferencesLock) 653 lock(weakAssetReferencesLock)
654 weakAssetReferences = new Dictionary<string, WeakReference>(); 654 weakAssetReferences = new Dictionary<string, WeakReference>();
655 } 655 }
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Asset
659 if (m_LogLevel >= 2) 659 if (m_LogLevel >= 2)
660 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration); 660 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration);
661 661
662 lock(timerLock) 662 lock(timerLock)
663 { 663 {
664 if(!m_timerRunning || m_cleanupRunning) 664 if(!m_timerRunning || m_cleanupRunning)
665 return; 665 return;
@@ -687,8 +687,8 @@ namespace OpenSim.Region.CoreModules.Asset
687 } 687 }
688 688
689 /// <summary> 689 /// <summary>
690 /// Recurses through specified directory checking for asset files last 690 /// Recurses through specified directory checking for asset files last
691 /// accessed prior to the specified purge line and deletes them. Also 691 /// accessed prior to the specified purge line and deletes them. Also
692 /// removes empty tier directories. 692 /// removes empty tier directories.
693 /// </summary> 693 /// </summary>
694 /// <param name="dir"></param> 694 /// <param name="dir"></param>
@@ -720,7 +720,7 @@ namespace OpenSim.Region.CoreModules.Asset
720 else if (dirSize >= m_CacheWarnAt) 720 else if (dirSize >= m_CacheWarnAt)
721 { 721 {
722 m_log.WarnFormat( 722 m_log.WarnFormat(
723 "[FLOTSAM ASSET CACHE]: Cache folder exceeded CacheWarnAt limit {0} {1}. Suggest increasing tiers, tier length, or reducing cache expiration", 723 "[FLOTSAM ASSET CACHE]: Cache folder exceeded CacheWarnAt limit {0} {1}. Suggest increasing tiers, tier length, or reducing cache expiration",
724 dir, dirSize); 724 dir, dirSize);
725 } 725 }
726 } 726 }
@@ -760,7 +760,7 @@ namespace OpenSim.Region.CoreModules.Asset
760 } 760 }
761 761
762 /// <summary> 762 /// <summary>
763 /// Writes a file to the file cache, creating any nessesary 763 /// Writes a file to the file cache, creating any nessesary
764 /// tier directories along the way 764 /// tier directories along the way
765 /// </summary> 765 /// </summary>
766 /// <param name="filename"></param> 766 /// <param name="filename"></param>
@@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Asset
772 // Make sure the target cache directory exists 772 // Make sure the target cache directory exists
773 string directory = Path.GetDirectoryName(filename); 773 string directory = Path.GetDirectoryName(filename);
774 774
775 // Write file first to a temp name, so that it doesn't look 775 // Write file first to a temp name, so that it doesn't look
776 // like it's already cached while it's still writing. 776 // like it's already cached while it's still writing.
777 string tempname = Path.Combine(directory, Path.GetRandomFileName()); 777 string tempname = Path.Combine(directory, Path.GetRandomFileName());
778 778
@@ -784,7 +784,7 @@ namespace OpenSim.Region.CoreModules.Asset
784 { 784 {
785 Directory.CreateDirectory(directory); 785 Directory.CreateDirectory(directory);
786 } 786 }
787 787
788 stream = File.Open(tempname, FileMode.Create); 788 stream = File.Open(tempname, FileMode.Create);
789 BinaryFormatter bformatter = new BinaryFormatter(); 789 BinaryFormatter bformatter = new BinaryFormatter();
790 bformatter.Serialize(stream, asset); 790 bformatter.Serialize(stream, asset);
@@ -818,7 +818,7 @@ namespace OpenSim.Region.CoreModules.Asset
818 // This situation occurs fairly rarely anyway. We assume in this that moves are atomic on the 818 // This situation occurs fairly rarely anyway. We assume in this that moves are atomic on the
819 // filesystem. 819 // filesystem.
820 File.Move(tempname, filename); 820 File.Move(tempname, filename);
821 821
822 if (m_LogLevel >= 2) 822 if (m_LogLevel >= 2)
823 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Cache Stored :: {0}", asset.ID); 823 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Cache Stored :: {0}", asset.ID);
824 } 824 }
@@ -875,7 +875,7 @@ namespace OpenSim.Region.CoreModules.Asset
875 { 875 {
876 string RegionCacheStatusFile = Path.Combine(m_CacheDirectory, "RegionStatus_" + regionID.ToString() + ".fac"); 876 string RegionCacheStatusFile = Path.Combine(m_CacheDirectory, "RegionStatus_" + regionID.ToString() + ".fac");
877 877
878 try 878 try
879 { 879 {
880 if (File.Exists(RegionCacheStatusFile)) 880 if (File.Exists(RegionCacheStatusFile))
881 { 881 {
@@ -884,7 +884,7 @@ namespace OpenSim.Region.CoreModules.Asset
884 else 884 else
885 { 885 {
886 File.WriteAllText( 886 File.WriteAllText(
887 RegionCacheStatusFile, 887 RegionCacheStatusFile,
888 "Please do not delete this file unless you are manually clearing your Flotsam Asset Cache."); 888 "Please do not delete this file unless you are manually clearing your Flotsam Asset Cache.");
889 } 889 }
890 } 890 }
@@ -892,14 +892,14 @@ namespace OpenSim.Region.CoreModules.Asset
892 { 892 {
893 m_log.Warn( 893 m_log.Warn(
894 string.Format( 894 string.Format(
895 "[FLOTSAM ASSET CACHE]: Could not stamp region status file for region {0}. Exception ", 895 "[FLOTSAM ASSET CACHE]: Could not stamp region status file for region {0}. Exception ",
896 regionID), 896 regionID),
897 e); 897 e);
898 } 898 }
899 } 899 }
900 900
901 /// <summary> 901 /// <summary>
902 /// Iterates through all Scenes, doing a deep scan through assets 902 /// Iterates through all Scenes, doing a deep scan through assets
903 /// to update the access time of all assets present in the scene or referenced by assets 903 /// to update the access time of all assets present in the scene or referenced by assets
904 /// in the scene. 904 /// in the scene.
905 /// </summary> 905 /// </summary>
@@ -918,7 +918,7 @@ namespace OpenSim.Region.CoreModules.Asset
918 StampRegionStatusFile(s.RegionInfo.RegionID); 918 StampRegionStatusFile(s.RegionInfo.RegionID);
919 919
920 s.ForEachSOG(delegate(SceneObjectGroup e) 920 s.ForEachSOG(delegate(SceneObjectGroup e)
921 { 921 {
922 if(!m_timerRunning && !storeUncached) 922 if(!m_timerRunning && !storeUncached)
923 return; 923 return;
924 924
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.Asset
1012 1012
1013 double weakHitRate = m_weakRefHits * invReq; 1013 double weakHitRate = m_weakRefHits * invReq;
1014 int weakEntries = weakAssetReferences.Count; 1014 int weakEntries = weakAssetReferences.Count;
1015 1015
1016 double fileHitRate = m_DiskHits * invReq; 1016 double fileHitRate = m_DiskHits * invReq;
1017 double TotalHitRate = weakHitRate + fileHitRate; 1017 double TotalHitRate = weakHitRate + fileHitRate;
1018 1018
@@ -1073,9 +1073,9 @@ namespace OpenSim.Region.CoreModules.Asset
1073 if (m_FileCacheEnabled) 1073 if (m_FileCacheEnabled)
1074 { 1074 {
1075 con.Output("Deep scans have previously been performed on the following regions:"); 1075 con.Output("Deep scans have previously been performed on the following regions:");
1076 1076
1077 foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac")) 1077 foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac"))
1078 { 1078 {
1079 string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); 1079 string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac","");
1080 DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); 1080 DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s);
1081 con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); 1081 con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss"));
@@ -1118,7 +1118,7 @@ namespace OpenSim.Region.CoreModules.Asset
1118 con.Output("Memory cache not enabled."); 1118 con.Output("Memory cache not enabled.");
1119 } 1119 }
1120 } 1120 }
1121 1121
1122 if (clearFile) 1122 if (clearFile)
1123 { 1123 {
1124 if (m_FileCacheEnabled) 1124 if (m_FileCacheEnabled)
@@ -1147,7 +1147,7 @@ namespace OpenSim.Region.CoreModules.Asset
1147 1147
1148 con.Output("FloatSam Ensuring assets are cached for all scenes."); 1148 con.Output("FloatSam Ensuring assets are cached for all scenes.");
1149 1149
1150 WorkManager.RunInThread(delegate 1150 WorkManager.RunInThread(delegate
1151 { 1151 {
1152 bool wasRunning= false; 1152 bool wasRunning= false;
1153 lock(timerLock) 1153 lock(timerLock)
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.CoreModules.Asset
1167 if(wasRunning) 1167 if(wasRunning)
1168 { 1168 {
1169 m_CacheCleanTimer.Start(); 1169 m_CacheCleanTimer.Start();
1170 m_timerRunning = true; 1170 m_timerRunning = true;
1171 } 1171 }
1172 m_cleanupRunning = false; 1172 m_cleanupRunning = false;
1173 } 1173 }
@@ -1247,12 +1247,12 @@ namespace OpenSim.Region.CoreModules.Asset
1247 public bool[] AssetsExist(string[] ids) 1247 public bool[] AssetsExist(string[] ids)
1248 { 1248 {
1249 bool[] exist = new bool[ids.Length]; 1249 bool[] exist = new bool[ids.Length];
1250 1250
1251 for (int i = 0; i < ids.Length; i++) 1251 for (int i = 0; i < ids.Length; i++)
1252 { 1252 {
1253 exist[i] = Check(ids[i]); 1253 exist[i] = Check(ids[i]);
1254 } 1254 }
1255 1255
1256 return exist; 1256 return exist;
1257 } 1257 }
1258 1258
diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
index 195bdaa..208963d 100644
--- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Asset
55 // Instrumentation 55 // Instrumentation
56 private uint m_DebugRate; 56 private uint m_DebugRate;
57 57
58 public Type ReplaceableInterface 58 public Type ReplaceableInterface
59 { 59 {
60 get { return null; } 60 get { return null; }
61 } 61 }
diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
index 73e4431..dbb7941 100644
--- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
+++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.Asset.Tests
112 { 112 {
113 TestHelpers.InMethod(); 113 TestHelpers.InMethod();
114// log4net.Config.XmlConfigurator.Configure(); 114// log4net.Config.XmlConfigurator.Configure();
115 115
116 AssetBase asset = AssetHelpers.CreateNotecardAsset(); 116 AssetBase asset = AssetHelpers.CreateNotecardAsset();
117 asset.ID = TestHelpers.ParseTail(0x2).ToString(); 117 asset.ID = TestHelpers.ParseTail(0x2).ToString();
118 118
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index d5c81ce..f4a8a6b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
61 /// A value of 0 will apply no pause. The pause is specified in milliseconds. 61 /// A value of 0 will apply no pause. The pause is specified in milliseconds.
62 /// </remarks> 62 /// </remarks>
63 public int ThrottlePer100PrimsRezzed { get; set; } 63 public int ThrottlePer100PrimsRezzed { get; set; }
64 64
65 private Scene m_scene; 65 private Scene m_scene;
66 private IInventoryAccessModule m_invAccessModule; 66 private IInventoryAccessModule m_invAccessModule;
67 67
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
69 /// Are attachments enabled? 69 /// Are attachments enabled?
70 /// </summary> 70 /// </summary>
71 public bool Enabled { get; private set; } 71 public bool Enabled { get; private set; }
72 72
73 public string Name { get { return "Attachments Module"; } } 73 public string Name { get { return "Attachments Module"; } }
74 public Type ReplaceableInterface { get { return null; } } 74 public Type ReplaceableInterface { get { return null; } }
75 75
@@ -87,14 +87,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
87 Enabled = true; 87 Enabled = true;
88 } 88 }
89 } 89 }
90 90
91 public void AddRegion(Scene scene) 91 public void AddRegion(Scene scene)
92 { 92 {
93 m_scene = scene; 93 m_scene = scene;
94 if (Enabled) 94 if (Enabled)
95 { 95 {
96 // Only register module with scene if it is enabled. All callers check for a null attachments module. 96 // Only register module with scene if it is enabled. All callers check for a null attachments module.
97 // Ideally, there should be a null attachments module for when this core attachments module has been 97 // Ideally, there should be a null attachments module for when this core attachments module has been
98 // disabled. Registering only when enabled allows for other attachments module implementations. 98 // disabled. Registering only when enabled allows for other attachments module implementations.
99 m_scene.RegisterModuleInterface<IAttachmentsModule>(this); 99 m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
100 m_scene.EventManager.OnNewClient += SubscribeToClientEvents; 100 m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
181 private void HandleScriptStateChange(uint localID, bool started) 181 private void HandleScriptStateChange(uint localID, bool started)
182 { 182 {
183 SceneObjectGroup sog = m_scene.GetGroupByPrim(localID); 183 SceneObjectGroup sog = m_scene.GetGroupByPrim(localID);
184 if (sog != null && sog.IsAttachment) 184 if (sog != null && sog.IsAttachment)
185 { 185 {
186 if (!started) 186 if (!started)
187 { 187 {
@@ -198,21 +198,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
198 } 198 }
199 } 199 }
200 } 200 }
201 201
202 public void RemoveRegion(Scene scene) 202 public void RemoveRegion(Scene scene)
203 { 203 {
204 m_scene.UnregisterModuleInterface<IAttachmentsModule>(this); 204 m_scene.UnregisterModuleInterface<IAttachmentsModule>(this);
205 205
206 if (Enabled) 206 if (Enabled)
207 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents; 207 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
208 } 208 }
209 209
210 public void RegionLoaded(Scene scene) 210 public void RegionLoaded(Scene scene)
211 { 211 {
212 m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>(); 212 m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>();
213 } 213 }
214 214
215 public void Close() 215 public void Close()
216 { 216 {
217 RemoveRegion(m_scene); 217 RemoveRegion(m_scene);
218 } 218 }
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
270 ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule(); 270 ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule();
271 271
272// m_log.DebugFormat( 272// m_log.DebugFormat(
273// "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}", 273// "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}",
274// ad.AttachmentObjectStates[i].Length, so.Name, sp.Name, m_scene.Name); 274// ad.AttachmentObjectStates[i].Length, so.Name, sp.Name, m_scene.Name);
275 275
276 so.SetState(ad.AttachmentObjectStates[i++], m_scene); 276 so.SetState(ad.AttachmentObjectStates[i++], m_scene);
@@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
295 { 295 {
296 if (DebugLevel > 0) 296 if (DebugLevel > 0)
297 m_log.DebugFormat( 297 m_log.DebugFormat(
298 "[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments", 298 "[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments",
299 m_scene.Name, sp.Name); 299 m_scene.Name, sp.Name);
300 300
301 return; 301 return;
@@ -357,7 +357,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
357 357
358 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down 358 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
359 // But they're not used anyway, the item is being looked up for now, so let's proceed. 359 // But they're not used anyway, the item is being looked up for now, so let's proceed.
360 //if (UUID.Zero == assetID) 360 //if (UUID.Zero == assetID)
361 //{ 361 //{
362 // m_log.DebugFormat("[ATTACHMENT]: Cannot rez attachment in point {0} with itemID {1}", p, itemID); 362 // m_log.DebugFormat("[ATTACHMENT]: Cannot rez attachment in point {0} with itemID {1}", p, itemID);
363 // continue; 363 // continue;
@@ -434,7 +434,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
434 UpdateDetachedObject(sp, so, String.Empty); 434 UpdateDetachedObject(sp, so, String.Empty);
435 sp.ClearAttachments(); 435 sp.ClearAttachments();
436 } 436 }
437 } 437 }
438 } 438 }
439 439
440 public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent) 440 public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent)
@@ -445,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
445 if (DebugLevel > 0) 445 if (DebugLevel > 0)
446 m_log.DebugFormat( 446 m_log.DebugFormat(
447 "[ATTACHMENTS MODULE]: Deleting attachments from scene {0} for {1}, silent = {2}", 447 "[ATTACHMENTS MODULE]: Deleting attachments from scene {0} for {1}, silent = {2}",
448 m_scene.RegionInfo.RegionName, sp.Name, silent); 448 m_scene.RegionInfo.RegionName, sp.Name, silent);
449 449
450 foreach (SceneObjectGroup sop in sp.GetAttachments()) 450 foreach (SceneObjectGroup sop in sp.GetAttachments())
451 { 451 {
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
454 454
455 sp.ClearAttachments(); 455 sp.ClearAttachments();
456 } 456 }
457 457
458 public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent, 458 public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent,
459 bool addToInventory, bool append) 459 bool addToInventory, bool append)
460 { 460 {
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
505 // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should 505 // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
506 // be removed when that functionality is implemented in opensim 506 // be removed when that functionality is implemented in opensim
507 attachmentPt &= 0x7f; 507 attachmentPt &= 0x7f;
508 508
509 // If the attachment point isn't the same as the one previously used 509 // If the attachment point isn't the same as the one previously used
510 // set it's offset position = 0 so that it appears on the attachment point 510 // set it's offset position = 0 so that it appears on the attachment point
511 // and not in a weird location somewhere unknown. 511 // and not in a weird location somewhere unknown.
@@ -583,7 +583,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
583 583
584 if (addToInventory && sp.PresenceType != PresenceType.Npc) 584 if (addToInventory && sp.PresenceType != PresenceType.Npc)
585 UpdateUserInventoryWithAttachment(sp, group, attachmentPt, append); 585 UpdateUserInventoryWithAttachment(sp, group, attachmentPt, append);
586 586
587 AttachToAgent(sp, group, attachmentPt, attachPos, silent); 587 AttachToAgent(sp, group, attachmentPt, attachPos, silent);
588 588
589 if (resumeScripts) 589 if (resumeScripts)
@@ -616,11 +616,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
616 } 616 }
617 617
618 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) 618 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt)
619 { 619 {
620 return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null); 620 return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null);
621 } 621 }
622 622
623 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc) 623 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc)
624 { 624 {
625 if (!Enabled) 625 if (!Enabled)
626 return null; 626 return null;
@@ -631,8 +631,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
631 (AttachmentPoint)AttachmentPt, itemID, sp.Name, m_scene.Name); 631 (AttachmentPoint)AttachmentPt, itemID, sp.Name, m_scene.Name);
632 632
633 // We check the attachments in the avatar appearance here rather than the objects attached to the 633 // We check the attachments in the avatar appearance here rather than the objects attached to the
634 // ScenePresence itself so that we can ignore calls by viewer 2/3 to attach objects on startup. We are 634 // ScenePresence itself so that we can ignore calls by viewer 2/3 to attach objects on startup. We are
635 // already doing this in ScenePresence.MakeRootAgent(). Simulator-side attaching needs to be done 635 // already doing this in ScenePresence.MakeRootAgent(). Simulator-side attaching needs to be done
636 // because pre-outfit folder viewers (most version 1 viewers) require it. 636 // because pre-outfit folder viewers (most version 1 viewers) require it.
637 bool alreadyOn = false; 637 bool alreadyOn = false;
638 List<AvatarAttachment> existingAttachments = sp.Appearance.GetAttachments(); 638 List<AvatarAttachment> existingAttachments = sp.Appearance.GetAttachments();
@@ -668,7 +668,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
668 668
669 if (DebugLevel > 0) 669 if (DebugLevel > 0)
670 m_log.DebugFormat( 670 m_log.DebugFormat(
671 "[ATTACHMENTS MODULE]: Rezzing {0} attachments from inventory for {1} in {2}", 671 "[ATTACHMENTS MODULE]: Rezzing {0} attachments from inventory for {1} in {2}",
672 rezlist.Count, sp.Name, m_scene.Name); 672 rezlist.Count, sp.Name, m_scene.Name);
673 673
674 foreach (KeyValuePair<UUID, uint> rez in rezlist) 674 foreach (KeyValuePair<UUID, uint> rez in rezlist)
@@ -727,7 +727,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
727 m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); 727 m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
728 728
729 so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint; 729 so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint;
730 730
731 sp.RemoveAttachment(so); 731 sp.RemoveAttachment(so);
732 so.FromItemID = UUID.Zero; 732 so.FromItemID = UUID.Zero;
733 733
@@ -744,7 +744,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
744 } 744 }
745 745
746 rootPart.RemFlag(PrimFlags.TemporaryOnRez); 746 rootPart.RemFlag(PrimFlags.TemporaryOnRez);
747 747
748 so.ApplyPhysics(); 748 so.ApplyPhysics();
749 749
750 rootPart.Rezzed = DateTime.Now; 750 rootPart.Rezzed = DateTime.Now;
@@ -804,7 +804,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
804 804
805 if (DebugLevel > 0) 805 if (DebugLevel > 0)
806 m_log.DebugFormat( 806 m_log.DebugFormat(
807 "[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}", 807 "[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}",
808 so.Name, so.LocalId, so.FromItemID, sp.Name, m_scene.Name); 808 so.Name, so.LocalId, so.FromItemID, sp.Name, m_scene.Name);
809 809
810 // Scripts MUST be snapshotted before the object is 810 // Scripts MUST be snapshotted before the object is
@@ -827,14 +827,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
827 UpdateDetachedObject(sp, so, scriptedState); 827 UpdateDetachedObject(sp, so, scriptedState);
828 } 828 }
829 } 829 }
830 830
831 public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos) 831 public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos)
832 { 832 {
833 if (!Enabled) 833 if (!Enabled)
834 return; 834 return;
835 835
836 sog.UpdateGroupPosition(pos); 836 sog.UpdateGroupPosition(pos);
837 sog.HasGroupChanged = true; 837 sog.HasGroupChanged = true;
838 } 838 }
839 839
840 #endregion 840 #endregion
@@ -843,7 +843,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
843 843
844 // This is public but is not part of the IAttachmentsModule interface. 844 // This is public but is not part of the IAttachmentsModule interface.
845 // RegionCombiner module needs to poke at it to deliver client events. 845 // RegionCombiner module needs to poke at it to deliver client events.
846 // This breaks the encapsulation of the module and should get fixed somehow. 846 // This breaks the encapsulation of the module and should get fixed somehow.
847 public void SubscribeToClientEvents(IClientAPI client) 847 public void SubscribeToClientEvents(IClientAPI client)
848 { 848 {
849 client.OnRezSingleAttachmentFromInv += Client_OnRezSingleAttachmentFromInv; 849 client.OnRezSingleAttachmentFromInv += Client_OnRezSingleAttachmentFromInv;
@@ -856,7 +856,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
856 856
857 // This is public but is not part of the IAttachmentsModule interface. 857 // This is public but is not part of the IAttachmentsModule interface.
858 // RegionCombiner module needs to poke at it to deliver client events. 858 // RegionCombiner module needs to poke at it to deliver client events.
859 // This breaks the encapsulation of the module and should get fixed somehow. 859 // This breaks the encapsulation of the module and should get fixed somehow.
860 public void UnsubscribeFromClientEvents(IClientAPI client) 860 public void UnsubscribeFromClientEvents(IClientAPI client)
861 { 861 {
862 client.OnRezSingleAttachmentFromInv -= Client_OnRezSingleAttachmentFromInv; 862 client.OnRezSingleAttachmentFromInv -= Client_OnRezSingleAttachmentFromInv;
@@ -936,7 +936,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
936 /// Attach this scene object to the given avatar. 936 /// Attach this scene object to the given avatar.
937 /// </summary> 937 /// </summary>
938 /// <remarks> 938 /// <remarks>
939 /// This isn't publicly available since attachments should always perform the corresponding inventory 939 /// This isn't publicly available since attachments should always perform the corresponding inventory
940 /// operation (to show the attach in user inventory and update the asset with positional information). 940 /// operation (to show the attach in user inventory and update the asset with positional information).
941 /// </remarks> 941 /// </remarks>
942 /// <param name="sp"></param> 942 /// <param name="sp"></param>
@@ -997,7 +997,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
997 997
998 // Fudge below is an extremely unhelpful comment. It's probably here so that the scheduled full update 998 // Fudge below is an extremely unhelpful comment. It's probably here so that the scheduled full update
999 // will succeed, as that will not update if an attachment is selected. 999 // will succeed, as that will not update if an attachment is selected.
1000 so.IsSelected = false; // fudge.... 1000 so.IsSelected = false; // fudge....
1001 1001
1002 so.ScheduleGroupForFullUpdate(); 1002 so.ScheduleGroupForFullUpdate();
1003 } 1003 }
@@ -1041,7 +1041,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1041 /// </summary> 1041 /// </summary>
1042 /// <remarks> 1042 /// <remarks>
1043 /// This involves triggering the detach event and getting the script state (which also stops the script) 1043 /// This involves triggering the detach event and getting the script state (which also stops the script)
1044 /// This MUST be done outside sp.AttachmentsSyncLock, since otherwise there is a chance of deadlock if a 1044 /// This MUST be done outside sp.AttachmentsSyncLock, since otherwise there is a chance of deadlock if a
1045 /// running script is performing attachment operations. 1045 /// running script is performing attachment operations.
1046 /// </remarks> 1046 /// </remarks>
1047 /// <returns> 1047 /// <returns>
@@ -1088,7 +1088,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1088 // Remove the object from the scene so no more updates 1088 // Remove the object from the scene so no more updates
1089 // are sent. Doing this before the below changes will ensure 1089 // are sent. Doing this before the below changes will ensure
1090 // updates can't cause "HUD artefacts" 1090 // updates can't cause "HUD artefacts"
1091 1091
1092 m_scene.DeleteSceneObject(so, false, false); 1092 m_scene.DeleteSceneObject(so, false, false);
1093 1093
1094 // Prepare sog for storage 1094 // Prepare sog for storage
@@ -1125,7 +1125,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1125 itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 1125 itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
1126 false, false, sp.UUID, true); 1126 false, false, sp.UUID, true);
1127 else 1127 else
1128 objatt = m_invAccessModule.RezObject(sp.ControllingClient, 1128 objatt = m_invAccessModule.RezObject(sp.ControllingClient,
1129 null, rezGroupID, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 1129 null, rezGroupID, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
1130 false, false, sp.UUID, true); 1130 false, false, sp.UUID, true);
1131 1131
@@ -1139,7 +1139,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1139 } 1139 }
1140 else if (itemID == UUID.Zero) 1140 else if (itemID == UUID.Zero)
1141 { 1141 {
1142 // We need to have a FromItemID for multiple attachments on a single attach point to appear. This is 1142 // We need to have a FromItemID for multiple attachments on a single attach point to appear. This is
1143 // true on Singularity 1.8.5 and quite possibly other viewers as well. As NPCs don't have an inventory 1143 // true on Singularity 1.8.5 and quite possibly other viewers as well. As NPCs don't have an inventory
1144 // we will satisfy this requirement by inserting a random UUID. 1144 // we will satisfy this requirement by inserting a random UUID.
1145 objatt.FromItemID = UUID.Random(); 1145 objatt.FromItemID = UUID.Random();
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1185 } 1185 }
1186 1186
1187 if (tainted) 1187 if (tainted)
1188 objatt.HasGroupChanged = true; 1188 objatt.HasGroupChanged = true;
1189 1189
1190 if (ThrottlePer100PrimsRezzed > 0) 1190 if (ThrottlePer100PrimsRezzed > 0)
1191 { 1191 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 16f1952..941853c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -485,7 +485,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
485 485
486 // Test wearing a second attachment at the same position 486 // Test wearing a second attachment at the same position
487 // Until multiple attachments at one point is implemented, this will remove the first attachment 487 // Until multiple attachments at one point is implemented, this will remove the first attachment
488 // This test relies on both attachments having the same default attachment point (in this case LeftHand 488 // This test relies on both attachments having the same default attachment point (in this case LeftHand
489 // since none other has been set). 489 // since none other has been set).
490 { 490 {
491 scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, attItem2.ID, (uint)AttachmentPoint.Default); 491 scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, attItem2.ID, (uint)AttachmentPoint.Default);
@@ -975,8 +975,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
975 // Both these operations will occur on different threads and will wait for each other. 975 // Both these operations will occur on different threads and will wait for each other.
976 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 976 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1
977 // test protocol, where we are trying to avoid unpredictable async operations in regression tests. 977 // test protocol, where we are trying to avoid unpredictable async operations in regression tests.
978 tc.OnTestClientSendRegionTeleport 978 tc.OnTestClientSendRegionTeleport
979 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) 979 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL)
980 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); 980 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null);
981 981
982 m_numberOfAttachEventsFired = 0; 982 m_numberOfAttachEventsFired = 0;
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 67256ee..0826a08 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
75 m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); 75 m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime)));
76 m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); 76 m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime)));
77 m_reusetextures = appearanceConfig.GetBoolean("ReuseTextures",m_reusetextures); 77 m_reusetextures = appearanceConfig.GetBoolean("ReuseTextures",m_reusetextures);
78 78
79 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); 79 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime);
80 } 80 }
81 81
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
166 } 166 }
167 167
168 /// <summary> 168 /// <summary>
169 /// Set appearance data (texture asset IDs and slider settings) 169 /// Set appearance data (texture asset IDs and slider settings)
170 /// </summary> 170 /// </summary>
171 /// <param name="sp"></param> 171 /// <param name="sp"></param>
172 /// <param name="texture"></param> 172 /// <param name="texture"></param>
@@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
190 { 190 {
191 changed = sp.Appearance.SetVisualParams(visualParams); 191 changed = sp.Appearance.SetVisualParams(visualParams);
192 } 192 }
193 193
194 // Process the baked texture array 194 // Process the baked texture array
195 if (textureEntry != null) 195 if (textureEntry != null)
196 { 196 {
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
267 WearableCacheItem[] items = sp.Appearance.WearableCacheItems; 267 WearableCacheItem[] items = sp.Appearance.WearableCacheItems;
268 //foreach (WearableCacheItem item in items) 268 //foreach (WearableCacheItem item in items)
269 //{ 269 //{
270 270
271 //} 271 //}
272 return items; 272 return items;
273 } 273 }
@@ -468,7 +468,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
468 } 468 }
469 469
470 sp.Appearance.WearableCacheItems = wearableCache; 470 sp.Appearance.WearableCacheItems = wearableCache;
471 471
472 if (missing.Count > 0) 472 if (missing.Count > 0)
473 { 473 {
474 foreach (UUID id in missing) 474 foreach (UUID id in missing)
@@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
493 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) 493 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++)
494 { 494 {
495 int j = AvatarAppearance.BAKE_INDICES[iter]; 495 int j = AvatarAppearance.BAKE_INDICES[iter];
496 m_log.Debug("[UpdateBCache] {" + iter + "/" + 496 m_log.Debug("[UpdateBCache] {" + iter + "/" +
497 sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" + 497 sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" +
498 sp.Appearance.WearableCacheItems[j].CacheId + ", t-" + 498 sp.Appearance.WearableCacheItems[j].CacheId + ", t-" +
499 sp.Appearance.WearableCacheItems[j].TextureID); 499 sp.Appearance.WearableCacheItems[j].TextureID);
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
588 wearableCacheValid = false; 588 wearableCacheValid = false;
589 } 589 }
590 } 590 }
591 591
592 wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1)); 592 wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1));
593 if (wearableCacheValid) 593 if (wearableCacheValid)
594 m_log.Debug("[ValidateBakedCache] have valid local cache"); 594 m_log.Debug("[ValidateBakedCache] have valid local cache");
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
601 if (!wearableCacheValid) 601 if (!wearableCacheValid)
602 { 602 {
603 hits = 0; 603 hits = 0;
604 // only use external bake module on login condition check 604 // only use external bake module on login condition check
605// ScenePresence ssp = null; 605// ScenePresence ssp = null;
606// if (sp is ScenePresence) 606// if (sp is ScenePresence)
607 { 607 {
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
816 foreach (KeyValuePair<UUID, long> kvp in saves) 816 foreach (KeyValuePair<UUID, long> kvp in saves)
817 { 817 {
818 // We have to load the key and value into local parameters to avoid a race condition if we loop 818 // We have to load the key and value into local parameters to avoid a race condition if we loop
819 // around and load kvp with a different value before FireAndForget has launched its thread. 819 // around and load kvp with a different value before FireAndForget has launched its thread.
820 UUID avatarID = kvp.Key; 820 UUID avatarID = kvp.Key;
821 long sendTime = kvp.Value; 821 long sendTime = kvp.Value;
822 822
@@ -869,13 +869,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
869 869
870 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); 870 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance);
871 871
872 // Trigger this here because it's the final step in the set/queue/save process for appearance setting. 872 // Trigger this here because it's the final step in the set/queue/save process for appearance setting.
873 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes). 873 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes).
874 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); 874 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp);
875 } 875 }
876 876
877 /// <summary> 877 /// <summary>
878 /// For a given set of appearance items, check whether the items are valid and add their asset IDs to 878 /// For a given set of appearance items, check whether the items are valid and add their asset IDs to
879 /// appearance data. 879 /// appearance data.
880 /// </summary> 880 /// </summary>
881 /// <param name='userID'></param> 881 /// <param name='userID'></param>
@@ -893,7 +893,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
893 if (appearance.Wearables[i][j].ItemID == UUID.Zero) 893 if (appearance.Wearables[i][j].ItemID == UUID.Zero)
894 { 894 {
895 m_log.WarnFormat( 895 m_log.WarnFormat(
896 "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.", 896 "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.",
897 i, j, userID); 897 i, j, userID);
898 898
899 continue; 899 continue;
@@ -967,7 +967,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
967// case WearableType.Skin: 967// case WearableType.Skin:
968// //case WearableType.Underpants: 968// //case WearableType.Underpants:
969// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); 969// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance);
970// 970//
971// m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i); 971// m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i);
972// resetwearable = true; 972// resetwearable = true;
973// break; 973// break;
@@ -975,7 +975,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
975// } 975// }
976// continue; 976// continue;
977// } 977// }
978// 978//
979// InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); 979// InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
980// baseItem = invService.GetItem(baseItem); 980// baseItem = invService.GetItem(baseItem);
981// 981//
@@ -1002,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1002// 1002//
1003// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); 1003// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance);
1004// resetwearable = true; 1004// resetwearable = true;
1005// 1005//
1006// } 1006// }
1007// } 1007// }
1008// } 1008// }
@@ -1011,7 +1011,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1011// if (appearance.Wearables[(int) WearableType.Eyes] == null) 1011// if (appearance.Wearables[(int) WearableType.Eyes] == null)
1012// { 1012// {
1013// m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes)); 1013// m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes));
1014// 1014//
1015// TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); 1015// TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance);
1016// resetwearable = true; 1016// resetwearable = true;
1017// } 1017// }
@@ -1213,7 +1213,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1213 m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId); 1213 m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId);
1214 }, null, "AvatarFactoryModule.OnClientRequestWearables"); 1214 }, null, "AvatarFactoryModule.OnClientRequestWearables");
1215 } 1215 }
1216 1216
1217 /// <summary> 1217 /// <summary>
1218 /// Set appearance data (texture asset IDs and slider settings) received from a client 1218 /// Set appearance data (texture asset IDs and slider settings) received from a client
1219 /// </summary> 1219 /// </summary>
@@ -1299,12 +1299,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1299 { 1299 {
1300 UUID texture = UUID.Zero; 1300 UUID texture = UUID.Zero;
1301 int index = request.BakedTextureIndex; 1301 int index = request.BakedTextureIndex;
1302 1302
1303 if (m_reusetextures) 1303 if (m_reusetextures)
1304 { 1304 {
1305 // this is the most insanely dumb way to do this... however it seems to 1305 // this is the most insanely dumb way to do this... however it seems to
1306 // actually work. if the appearance has been reset because wearables have 1306 // actually work. if the appearance has been reset because wearables have
1307 // changed then the texture entries are zero'd out until the bakes are 1307 // changed then the texture entries are zero'd out until the bakes are
1308 // uploaded. on login, if the textures exist in the cache (eg if you logged 1308 // uploaded. on login, if the textures exist in the cache (eg if you logged
1309 // into the simulator recently, then the appearance will pull those and send 1309 // into the simulator recently, then the appearance will pull those and send
1310 // them back in the packet and you won't have to rebake. if the textures aren't 1310 // them back in the packet and you won't have to rebake. if the textures aren't
@@ -1320,7 +1320,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1320 1320
1321 // m_log.WarnFormat("[AVFACTORY]: reuse texture {0} for index {1}",texture,index); 1321 // m_log.WarnFormat("[AVFACTORY]: reuse texture {0} for index {1}",texture,index);
1322 } 1322 }
1323 1323
1324 CachedTextureResponseArg response = new CachedTextureResponseArg(); 1324 CachedTextureResponseArg response = new CachedTextureResponseArg();
1325 response.BakedTextureIndex = index; 1325 response.BakedTextureIndex = index;
1326 response.BakedTextureID = texture; 1326 response.BakedTextureID = texture;
@@ -1328,7 +1328,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1328 1328
1329 cachedTextureResponse.Add(response); 1329 cachedTextureResponse.Add(response);
1330 } 1330 }
1331 1331
1332 // m_log.WarnFormat("[AVFACTORY]: serial is {0}",serial); 1332 // m_log.WarnFormat("[AVFACTORY]: serial is {0}",serial);
1333 // The serial number appears to be used to match requests and responses 1333 // The serial number appears to be used to match requests and responses
1334 // in the texture transaction. We just send back the serial number 1334 // in the texture transaction. We just send back the serial number
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
index dd93449..33489d1 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
55 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly 55 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly
56 // to the AssetService, which will then store temporary and local assets permanently 56 // to the AssetService, which will then store temporary and local assets permanently
57 CoreAssetCache assetCache = new CoreAssetCache(); 57 CoreAssetCache assetCache = new CoreAssetCache();
58 58
59 AvatarFactoryModule afm = new AvatarFactoryModule(); 59 AvatarFactoryModule afm = new AvatarFactoryModule();
60 TestScene scene = new SceneHelpers(assetCache).SetupScene(); 60 TestScene scene = new SceneHelpers(assetCache).SetupScene();
61 SceneHelpers.SetupSceneModules(scene, afm); 61 SceneHelpers.SetupSceneModules(scene, afm);
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
63 63
64 // TODO: Use the actual BunchOfCaps functionality once we slot in the CapabilitiesModules 64 // TODO: Use the actual BunchOfCaps functionality once we slot in the CapabilitiesModules
65 AssetBase bakedTextureAsset; 65 AssetBase bakedTextureAsset;
66 bakedTextureAsset 66 bakedTextureAsset
67 = new AssetBase( 67 = new AssetBase(
68 bakedTextureID, "Test Baked Texture", (sbyte)AssetType.Texture, userId.ToString()); 68 bakedTextureID, "Test Baked Texture", (sbyte)AssetType.Texture, userId.ToString());
69 bakedTextureAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet 69 bakedTextureAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
85 // This is the alpha texture 85 // This is the alpha texture
86 eyesFace.TextureID = bakedTextureID; 86 eyesFace.TextureID = bakedTextureID;
87 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); 87 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null);
88 88
89 Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); 89 Assert.That(rebakeRequestsReceived, Is.EqualTo(0));
90 90
91 AssetBase eyesBake = scene.AssetService.Get(bakedTextureID.ToString()); 91 AssetBase eyesBake = scene.AssetService.Get(bakedTextureID.ToString());
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
98 /// Test appearance setting where the baked texture UUID are library alpha textures. 98 /// Test appearance setting where the baked texture UUID are library alpha textures.
99 /// </summary> 99 /// </summary>
100 /// <remarks> 100 /// <remarks>
101 /// For a mesh avatar, it appears these 'baked textures' are used. So these should not trigger a request to 101 /// For a mesh avatar, it appears these 'baked textures' are used. So these should not trigger a request to
102 /// rebake. 102 /// rebake.
103 /// </remarks> 103 /// </remarks>
104 [Test] 104 [Test]
@@ -113,14 +113,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
113 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly 113 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly
114 // to the AssetService, which will then store temporary and local assets permanently 114 // to the AssetService, which will then store temporary and local assets permanently
115 CoreAssetCache assetCache = new CoreAssetCache(); 115 CoreAssetCache assetCache = new CoreAssetCache();
116 116
117 AvatarFactoryModule afm = new AvatarFactoryModule(); 117 AvatarFactoryModule afm = new AvatarFactoryModule();
118 TestScene scene = new SceneHelpers(assetCache).SetupScene(); 118 TestScene scene = new SceneHelpers(assetCache).SetupScene();
119 SceneHelpers.SetupSceneModules(scene, afm); 119 SceneHelpers.SetupSceneModules(scene, afm);
120 ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); 120 ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId);
121 121
122 AssetBase libraryAsset; 122 AssetBase libraryAsset;
123 libraryAsset 123 libraryAsset
124 = new AssetBase( 124 = new AssetBase(
125 alphaTextureID, "Default Alpha Layer Texture", (sbyte)AssetType.Texture, userId.ToString()); 125 alphaTextureID, "Default Alpha Layer Texture", (sbyte)AssetType.Texture, userId.ToString());
126 libraryAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet 126 libraryAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet
@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
142 // This is the alpha texture 142 // This is the alpha texture
143 eyesFace.TextureID = alphaTextureID; 143 eyesFace.TextureID = alphaTextureID;
144 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); 144 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null);
145 145
146 Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); 146 Assert.That(rebakeRequestsReceived, Is.EqualTo(0));
147 } 147 }
148 148
@@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
158 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly 158 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly
159 // to the AssetService, which will then store temporary and local assets permanently 159 // to the AssetService, which will then store temporary and local assets permanently
160 CoreAssetCache assetCache = new CoreAssetCache(); 160 CoreAssetCache assetCache = new CoreAssetCache();
161 161
162 AvatarFactoryModule afm = new AvatarFactoryModule(); 162 AvatarFactoryModule afm = new AvatarFactoryModule();
163 TestScene scene = new SceneHelpers(assetCache).SetupScene(); 163 TestScene scene = new SceneHelpers(assetCache).SetupScene();
164 SceneHelpers.SetupSceneModules(scene, afm); 164 SceneHelpers.SetupSceneModules(scene, afm);
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs
index 6d97251..27e84b0 100644
--- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
53 private UTF8Encoding enc = new UTF8Encoding(); 53 private UTF8Encoding enc = new UTF8Encoding();
54 private string m_URL = String.Empty; 54 private string m_URL = String.Empty;
55 private static XmlSerializer m_serializer = new XmlSerializer(typeof(AssetBase)); 55 private static XmlSerializer m_serializer = new XmlSerializer(typeof(AssetBase));
56 private static bool m_enabled = false; 56 private static bool m_enabled = false;
57 57
58 private static IServiceAuth m_Auth; 58 private static IServiceAuth m_Auth;
59 59
@@ -64,18 +64,18 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
64 return; 64 return;
65 65
66 m_URL = config.GetString("URL", String.Empty); 66 m_URL = config.GetString("URL", String.Empty);
67 if (m_URL == String.Empty) 67 if (m_URL == String.Empty)
68 return; 68 return;
69 69
70 m_enabled = true; 70 m_enabled = true;
71 71
72 m_Auth = ServiceAuth.Create(configSource, "XBakes"); 72 m_Auth = ServiceAuth.Create(configSource, "XBakes");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77 if (!m_enabled) 77 if (!m_enabled)
78 return; 78 return;
79 79
80 // m_log.InfoFormat("[XBakes]: Enabled for region {0}", scene.RegionInfo.RegionName); 80 // m_log.InfoFormat("[XBakes]: Enabled for region {0}", scene.RegionInfo.RegionName);
81 m_Scene = scene; 81 m_Scene = scene;
@@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
177 177
178 int numberWears = 0; 178 int numberWears = 0;
179 MemoryStream reqStream; 179 MemoryStream reqStream;
180 180
181 using (MemoryStream bakeStream = new MemoryStream()) 181 using (MemoryStream bakeStream = new MemoryStream())
182 using (XmlTextWriter bakeWriter = new XmlTextWriter(bakeStream, null)) 182 using (XmlTextWriter bakeWriter = new XmlTextWriter(bakeStream, null))
183 { 183 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 5164289..53800bb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
69 m_enabled = false; 69 m_enabled = false;
70 return; 70 return;
71 } 71 }
72 72
73 m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance); 73 m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance);
74 m_saydistance = m_config.GetInt("say_distance", m_saydistance); 74 m_saydistance = m_config.GetInt("say_distance", m_saydistance);
75 m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance); 75 m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance);
@@ -123,7 +123,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
123 } 123 }
124 } 124 }
125 } 125 }
126 126
127 public virtual void Close() 127 public virtual void Close()
128 { 128 {
129 } 129 }
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
132 { 132 {
133 } 133 }
134 134
135 public virtual Type ReplaceableInterface 135 public virtual Type ReplaceableInterface
136 { 136 {
137 get { return null; } 137 get { return null; }
138 } 138 }
@@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
222 return; 222 return;
223 } 223 }
224 224
225 switch (sourceType) 225 switch (sourceType)
226 { 226 {
227 case ChatSourceType.Agent: 227 case ChatSourceType.Agent:
228 ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId); 228 ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId);
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
240 } 240 }
241 destination = UUID.Zero; // Avatars cant "SayTo" 241 destination = UUID.Zero; // Avatars cant "SayTo"
242 ownerID = c.Sender.AgentId; 242 ownerID = c.Sender.AgentId;
243 243
244 hidePos = fromPos; 244 hidePos = fromPos;
245 break; 245 break;
246 246
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
264 message = message.Substring(0, 1000); 264 message = message.Substring(0, 1000);
265 265
266// m_log.DebugFormat( 266// m_log.DebugFormat(
267// "[CHAT]: DCTA: fromID {0} fromName {1}, region{2}, cType {3}, sType {4}", 267// "[CHAT]: DCTA: fromID {0} fromName {1}, region{2}, cType {3}, sType {4}",
268// fromID, fromName, scene.RegionInfo.RegionName, c.Type, sourceType); 268// fromID, fromName, scene.RegionInfo.RegionName, c.Type, sourceType);
269 269
270 HashSet<UUID> receiverIDs = new HashSet<UUID>(); 270 HashSet<UUID> receiverIDs = new HashSet<UUID>();
@@ -317,13 +317,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
317 } 317 }
318 } 318 }
319 }); 319 });
320 320
321 scene.EventManager.TriggerOnChatToClients( 321 scene.EventManager.TriggerOnChatToClients(
322 fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully); 322 fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully);
323 } 323 }
324 324
325 static protected Vector3 CenterOfRegion = new Vector3(128, 128, 30); 325 static protected Vector3 CenterOfRegion = new Vector3(128, 128, 30);
326 326
327 public virtual void OnChatBroadcast(Object sender, OSChatMessage c) 327 public virtual void OnChatBroadcast(Object sender, OSChatMessage c)
328 { 328 {
329 if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; 329 if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return;
@@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
341 // broadcast chat works by redistributing every incoming chat 341 // broadcast chat works by redistributing every incoming chat
342 // message to each avatar in the scene. 342 // message to each avatar in the scene.
343 string fromName = c.From; 343 string fromName = c.From;
344 344
345 UUID fromID = UUID.Zero; 345 UUID fromID = UUID.Zero;
346 UUID ownerID = UUID.Zero; 346 UUID ownerID = UUID.Zero;
347 ChatSourceType sourceType = ChatSourceType.Object; 347 ChatSourceType sourceType = ChatSourceType.Object;
@@ -353,15 +353,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
353 ownerID = c.Sender.AgentId; 353 ownerID = c.Sender.AgentId;
354 sourceType = ChatSourceType.Agent; 354 sourceType = ChatSourceType.Agent;
355 } 355 }
356 else if (c.SenderUUID != UUID.Zero) 356 else if (c.SenderUUID != UUID.Zero)
357 { 357 {
358 fromID = c.SenderUUID; 358 fromID = c.SenderUUID;
359 ownerID = ((SceneObjectPart)c.SenderObject).OwnerID; 359 ownerID = ((SceneObjectPart)c.SenderObject).OwnerID;
360 } 360 }
361 361
362 // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); 362 // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType);
363 HashSet<UUID> receiverIDs = new HashSet<UUID>(); 363 HashSet<UUID> receiverIDs = new HashSet<UUID>();
364 364
365 if (c.Scene != null) 365 if (c.Scene != null)
366 { 366 {
367 ((Scene)c.Scene).ForEachRootClient 367 ((Scene)c.Scene).ForEachRootClient
@@ -374,7 +374,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
374 (null != c.SenderObject) && 374 (null != c.SenderObject) &&
375 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) 375 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
376 return; 376 return;
377 377
378 client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID, 378 client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID,
379 (byte)sourceType, (byte)ChatAudibleLevel.Fully); 379 (byte)sourceType, (byte)ChatAudibleLevel.Fully);
380 receiverIDs.Add(client.AgentId); 380 receiverIDs.Add(client.AgentId);
@@ -400,7 +400,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
400 /// <param name="type"></param> 400 /// <param name="type"></param>
401 /// <param name="message"></param> 401 /// <param name="message"></param>
402 /// <param name="src"></param> 402 /// <param name="src"></param>
403 /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a 403 /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a
404 /// precondition</returns> 404 /// precondition</returns>
405 protected virtual bool TrySendChatMessage( 405 protected virtual bool TrySendChatMessage(
406 ScenePresence presence, Vector3 fromPos, Vector3 regionPos, 406 ScenePresence presence, Vector3 fromPos, Vector3 regionPos,
@@ -430,7 +430,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
430 presence.ControllingClient.SendChatMessage( 430 presence.ControllingClient.SendChatMessage(
431 message, (byte) type, fromPos, fromName, 431 message, (byte) type, fromPos, fromName,
432 fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully); 432 fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully);
433 433
434 return true; 434 return true;
435 } 435 }
436 436
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs
index a720ad9..5457dc3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
47{ 47{
48 [TestFixture] 48 [TestFixture]
49 public class ChatModuleTests : OpenSimTestCase 49 public class ChatModuleTests : OpenSimTestCase
50 { 50 {
51 [TestFixtureSetUp] 51 [TestFixtureSetUp]
52 public void FixtureInit() 52 public void FixtureInit()
53 { 53 {
@@ -66,14 +66,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
66 } 66 }
67 67
68 private void SetupNeighbourRegions(TestScene sceneA, TestScene sceneB) 68 private void SetupNeighbourRegions(TestScene sceneA, TestScene sceneB)
69 { 69 {
70 // XXX: HTTP server is not (and should not be) necessary for this test, though it's absence makes the 70 // XXX: HTTP server is not (and should not be) necessary for this test, though it's absence makes the
71 // CapabilitiesModule complain when it can't set up HTTP endpoints. 71 // CapabilitiesModule complain when it can't set up HTTP endpoints.
72 BaseHttpServer httpServer = new BaseHttpServer(99999); 72 BaseHttpServer httpServer = new BaseHttpServer(99999);
73 MainServer.AddHttpServer(httpServer); 73 MainServer.AddHttpServer(httpServer);
74 MainServer.Instance = httpServer; 74 MainServer.Instance = httpServer;
75 75
76 // We need entity transfer modules so that when sp2 logs into the east region, the region calls 76 // We need entity transfer modules so that when sp2 logs into the east region, the region calls
77 // EntityTransferModuleto set up a child agent on the west region. 77 // EntityTransferModuleto set up a child agent on the west region.
78 // XXX: However, this is not an entity transfer so is misleading. 78 // XXX: However, this is not an entity transfer so is misleading.
79 EntityTransferModule etmA = new EntityTransferModule(); 79 EntityTransferModule etmA = new EntityTransferModule();
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
87 modulesConfig.Set("SimulationServices", lscm.Name); 87 modulesConfig.Set("SimulationServices", lscm.Name);
88 88
89 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 89 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
90 SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA, new ChatModule()); 90 SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA, new ChatModule());
91 SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB, new ChatModule()); 91 SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB, new ChatModule());
92 } 92 }
93 93
@@ -111,8 +111,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
111 Vector3 sp2Position = new Vector3(250, 128, 20); 111 Vector3 sp2Position = new Vector3(250, 128, 20);
112 112
113 SceneHelpers sh = new SceneHelpers(); 113 SceneHelpers sh = new SceneHelpers();
114 TestScene sceneWest = sh.SetupScene("sceneWest", TestHelpers.ParseTail(0x1), 1000, 1000); 114 TestScene sceneWest = sh.SetupScene("sceneWest", TestHelpers.ParseTail(0x1), 1000, 1000);
115 TestScene sceneEast = sh.SetupScene("sceneEast", TestHelpers.ParseTail(0x2), 1001, 1000); 115 TestScene sceneEast = sh.SetupScene("sceneEast", TestHelpers.ParseTail(0x2), 1001, 1000);
116 116
117 SetupNeighbourRegions(sceneWest, sceneEast); 117 SetupNeighbourRegions(sceneWest, sceneEast);
118 118
@@ -124,12 +124,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
124 // physics is irrelevant to this test. 124 // physics is irrelevant to this test.
125 sp1.Flying = true; 125 sp1.Flying = true;
126 126
127 // When sp1 logs in to sceneEast, it sets up a child agent in sceneWest and informs the sp2 client to 127 // When sp1 logs in to sceneEast, it sets up a child agent in sceneWest and informs the sp2 client to
128 // make the connection. For this test, will simplify this chain by making the connection directly. 128 // make the connection. For this test, will simplify this chain by making the connection directly.
129 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneWest, sp1Uuid); 129 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneWest, sp1Uuid);
130 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient; 130 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient;
131 131
132 sp1.AbsolutePosition = sp1Position; 132 sp1.AbsolutePosition = sp1Position;
133 133
134 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, sp2Uuid); 134 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, sp2Uuid);
135 TestClient sp2Client = (TestClient)sp2.ControllingClient; 135 TestClient sp2Client = (TestClient)sp2.ControllingClient;
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
138 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneEast, sp2Uuid); 138 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneEast, sp2Uuid);
139 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient; 139 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient;
140 140
141 sp2.AbsolutePosition = sp2Position; 141 sp2.AbsolutePosition = sp2Position;
142 142
143 // We must update the scenes in order to make the root new root agents trigger position updates in their 143 // We must update the scenes in order to make the root new root agents trigger position updates in their
144 // children. 144 // children.
@@ -147,19 +147,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
147 147
148 // Check child positions are correct. 148 // Check child positions are correct.
149 Assert.AreEqual( 149 Assert.AreEqual(
150 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z), 150 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z),
151 sp1ChildClient.SceneAgent.AbsolutePosition); 151 sp1ChildClient.SceneAgent.AbsolutePosition);
152 152
153 Assert.AreEqual( 153 Assert.AreEqual(
154 new Vector3(sp2Position.X - sceneWest.RegionInfo.RegionSizeX, sp2Position.Y, sp2Position.Z), 154 new Vector3(sp2Position.X - sceneWest.RegionInfo.RegionSizeX, sp2Position.Y, sp2Position.Z),
155 sp2ChildClient.SceneAgent.AbsolutePosition); 155 sp2ChildClient.SceneAgent.AbsolutePosition);
156 156
157 string receivedSp1ChatMessage = ""; 157 string receivedSp1ChatMessage = "";
158 string receivedSp2ChatMessage = ""; 158 string receivedSp2ChatMessage = "";
159 159
160 sp1ChildClient.OnReceivedChatMessage 160 sp1ChildClient.OnReceivedChatMessage
161 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message; 161 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message;
162 sp2ChildClient.OnReceivedChatMessage 162 sp2ChildClient.OnReceivedChatMessage
163 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message; 163 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message;
164 164
165 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage); 165 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage);
@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
175 175
176 // Check child position is correct. 176 // Check child position is correct.
177 Assert.AreEqual( 177 Assert.AreEqual(
178 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z), 178 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z),
179 sp1ChildClient.SceneAgent.AbsolutePosition); 179 sp1ChildClient.SceneAgent.AbsolutePosition);
180 180
181 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage); 181 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage);
@@ -202,8 +202,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
202 Vector3 sp2Position = new Vector3(128, 6, 20); 202 Vector3 sp2Position = new Vector3(128, 6, 20);
203 203
204 SceneHelpers sh = new SceneHelpers(); 204 SceneHelpers sh = new SceneHelpers();
205 TestScene sceneNorth = sh.SetupScene("sceneNorth", TestHelpers.ParseTail(0x1), 1000, 1000); 205 TestScene sceneNorth = sh.SetupScene("sceneNorth", TestHelpers.ParseTail(0x1), 1000, 1000);
206 TestScene sceneSouth = sh.SetupScene("sceneSouth", TestHelpers.ParseTail(0x2), 1000, 1001); 206 TestScene sceneSouth = sh.SetupScene("sceneSouth", TestHelpers.ParseTail(0x2), 1000, 1001);
207 207
208 SetupNeighbourRegions(sceneNorth, sceneSouth); 208 SetupNeighbourRegions(sceneNorth, sceneSouth);
209 209
@@ -215,12 +215,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
215 // physics is irrelevant to this test. 215 // physics is irrelevant to this test.
216 sp1.Flying = true; 216 sp1.Flying = true;
217 217
218 // When sp1 logs in to sceneEast, it sets up a child agent in sceneNorth and informs the sp2 client to 218 // When sp1 logs in to sceneEast, it sets up a child agent in sceneNorth and informs the sp2 client to
219 // make the connection. For this test, will simplify this chain by making the connection directly. 219 // make the connection. For this test, will simplify this chain by making the connection directly.
220 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneSouth, sp1Uuid); 220 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneSouth, sp1Uuid);
221 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient; 221 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient;
222 222
223 sp1.AbsolutePosition = sp1Position; 223 sp1.AbsolutePosition = sp1Position;
224 224
225 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneSouth, sp2Uuid); 225 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneSouth, sp2Uuid);
226 TestClient sp2Client = (TestClient)sp2.ControllingClient; 226 TestClient sp2Client = (TestClient)sp2.ControllingClient;
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
229 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneNorth, sp2Uuid); 229 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneNorth, sp2Uuid);
230 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient; 230 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient;
231 231
232 sp2.AbsolutePosition = sp2Position; 232 sp2.AbsolutePosition = sp2Position;
233 233
234 // We must update the scenes in order to make the root new root agents trigger position updates in their 234 // We must update the scenes in order to make the root new root agents trigger position updates in their
235 // children. 235 // children.
@@ -238,19 +238,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
238 238
239 // Check child positions are correct. 239 // Check child positions are correct.
240 Assert.AreEqual( 240 Assert.AreEqual(
241 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z), 241 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z),
242 sp1ChildClient.SceneAgent.AbsolutePosition); 242 sp1ChildClient.SceneAgent.AbsolutePosition);
243 243
244 Assert.AreEqual( 244 Assert.AreEqual(
245 new Vector3(sp2Position.X, sp2Position.Y + sceneSouth.RegionInfo.RegionSizeY, sp2Position.Z), 245 new Vector3(sp2Position.X, sp2Position.Y + sceneSouth.RegionInfo.RegionSizeY, sp2Position.Z),
246 sp2ChildClient.SceneAgent.AbsolutePosition); 246 sp2ChildClient.SceneAgent.AbsolutePosition);
247 247
248 string receivedSp1ChatMessage = ""; 248 string receivedSp1ChatMessage = "";
249 string receivedSp2ChatMessage = ""; 249 string receivedSp2ChatMessage = "";
250 250
251 sp1ChildClient.OnReceivedChatMessage 251 sp1ChildClient.OnReceivedChatMessage
252 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message; 252 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message;
253 sp2ChildClient.OnReceivedChatMessage 253 sp2ChildClient.OnReceivedChatMessage
254 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message; 254 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message;
255 255
256 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage); 256 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage);
@@ -266,13 +266,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
266 266
267 // Check child position is correct. 267 // Check child position is correct.
268 Assert.AreEqual( 268 Assert.AreEqual(
269 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z), 269 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z),
270 sp1ChildClient.SceneAgent.AbsolutePosition); 270 sp1ChildClient.SceneAgent.AbsolutePosition);
271 271
272 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage); 272 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage);
273 TestUserOutOfRange(sp2Client, "lentils", ref receivedSp1ChatMessage); 273 TestUserOutOfRange(sp2Client, "lentils", ref receivedSp1ChatMessage);
274 } 274 }
275 275
276 private void TestUserInRange(TestClient speakClient, string testMessage, ref string receivedMessage) 276 private void TestUserInRange(TestClient speakClient, string testMessage, ref string receivedMessage)
277 { 277 {
278 receivedMessage = ""; 278 receivedMessage = "";
diff --git a/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs b/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs
index 764adf9..cf65c47 100644
--- a/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs
@@ -62,19 +62,19 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
62 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 62 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
63 63
64 public string Name { get { return "User Commands Module"; } } 64 public string Name { get { return "User Commands Module"; } }
65 65
66 public Type ReplaceableInterface { get { return null; } } 66 public Type ReplaceableInterface { get { return null; } }
67 67
68 public void Initialise(IConfigSource source) 68 public void Initialise(IConfigSource source)
69 { 69 {
70// m_log.DebugFormat("[USER COMMANDS MODULE]: INITIALIZED MODULE"); 70// m_log.DebugFormat("[USER COMMANDS MODULE]: INITIALIZED MODULE");
71 } 71 }
72 72
73 public void PostInitialise() 73 public void PostInitialise()
74 { 74 {
75// m_log.DebugFormat("[USER COMMANDS MODULE]: POST INITIALIZED MODULE"); 75// m_log.DebugFormat("[USER COMMANDS MODULE]: POST INITIALIZED MODULE");
76 } 76 }
77 77
78 public void Close() 78 public void Close()
79 { 79 {
80// m_log.DebugFormat("[USER COMMANDS MODULE]: CLOSED MODULE"); 80// m_log.DebugFormat("[USER COMMANDS MODULE]: CLOSED MODULE");
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index aaa331b..7980de3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
167 m_Enabled = true; 167 m_Enabled = true;
168 m_log.DebugFormat("[FRIENDS MODULE]: {0} enabled.", Name); 168 m_log.DebugFormat("[FRIENDS MODULE]: {0} enabled.", Name);
169 } 169 }
170 } 170 }
171 } 171 }
172 172
173 protected virtual void InitModule(IConfigSource config) 173 protected virtual void InitModule(IConfigSource config)
@@ -570,7 +570,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
570 protected virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im) 570 protected virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im)
571 { 571 {
572 if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered) 572 if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered)
573 { 573 {
574 // we got a friendship offer 574 // we got a friendship offer
575 UUID principalID = new UUID(im.fromAgentID); 575 UUID principalID = new UUID(im.fromAgentID);
576 UUID friendID = new UUID(im.toAgentID); 576 UUID friendID = new UUID(im.toAgentID);
@@ -605,7 +605,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
605 im.imSessionID = im.fromAgentID; 605 im.imSessionID = im.fromAgentID;
606 im.fromAgentName = GetFriendshipRequesterName(agentID); 606 im.fromAgentName = GetFriendshipRequesterName(agentID);
607 607
608 // Try the local sim 608 // Try the local sim
609 if (LocalFriendshipOffered(friendID, im)) 609 if (LocalFriendshipOffered(friendID, im))
610 return true; 610 return true;
611 611
@@ -648,7 +648,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
648 ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero); 648 ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero);
649 } 649 }
650 650
651 // Update the local cache. 651 // Update the local cache.
652 RecacheFriends(client); 652 RecacheFriends(client);
653 653
654 // 654 //
@@ -704,7 +704,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
704 } 704 }
705 } 705 }
706 } 706 }
707 707
708 public void RemoveFriendship(IClientAPI client, UUID exfriendID) 708 public void RemoveFriendship(IClientAPI client, UUID exfriendID)
709 { 709 {
710 if (!DeleteFriendship(client.AgentId, exfriendID)) 710 if (!DeleteFriendship(client.AgentId, exfriendID))
@@ -732,7 +732,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
732 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); 732 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
733 m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID); 733 m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID);
734 } 734 }
735 } 735 }
736 } 736 }
737 737
738 public void FindFriend(IClientAPI remoteClient,UUID HunterID ,UUID PreyID) 738 public void FindFriend(IClientAPI remoteClient,UUID HunterID ,UUID PreyID)
@@ -740,7 +740,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
740 UUID requester = remoteClient.AgentId; 740 UUID requester = remoteClient.AgentId;
741 if(requester != HunterID) // only allow client agent to be the hunter (?) 741 if(requester != HunterID) // only allow client agent to be the hunter (?)
742 return; 742 return;
743 743
744 FriendInfo[] friends = GetFriendsFromCache(requester); 744 FriendInfo[] friends = GetFriendsFromCache(requester);
745 if (friends.Length == 0) 745 if (friends.Length == 0)
746 return; 746 return;
@@ -773,7 +773,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
773 } 773 }
774 774
775 PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { PreyID.ToString() }); 775 PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { PreyID.ToString() });
776 776
777 if (friendSessions == null || friendSessions.Length == 0) 777 if (friendSessions == null || friendSessions.Length == 0)
778 return; 778 return;
779 779
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
index c421740..81aa882 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
127 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(UUID.Zero, fromID); 127 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(UUID.Zero, fromID);
128 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName; 128 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName;
129 129
130 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID, 130 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID,
131 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero); 131 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero);
132 132
133 // !! HACK 133 // !! HACK
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index 9954749..ac05a6e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -539,8 +539,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
539 // m_log.DebugFormat("[HGFRIENDS MODULE] HG Friendship! thisUUI={0}; friendUUI={1}; foreignThisFriendService={2}; foreignFriendFriendService={3}", 539 // m_log.DebugFormat("[HGFRIENDS MODULE] HG Friendship! thisUUI={0}; friendUUI={1}; foreignThisFriendService={2}; foreignFriendFriendService={3}",
540 // agentUUI, friendUUI, agentFriendService, friendFriendService); 540 // agentUUI, friendUUI, agentFriendService, friendFriendService);
541 541
542 } 542 }
543 543
544 // Delete any previous friendship relations 544 // Delete any previous friendship relations
545 DeletePreviousRelations(agentID, friendID); 545 DeletePreviousRelations(agentID, friendID);
546 546
@@ -641,11 +641,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
641 FriendsService.Delete(a1, f.Friend); 641 FriendsService.Delete(a1, f.Friend);
642 // and also the converse 642 // and also the converse
643 FriendsService.Delete(f.Friend, a1.ToString()); 643 FriendsService.Delete(f.Friend, a1.ToString());
644 } 644 }
645 } 645 }
646 } 646 }
647 } 647 }
648 648
649 finfos = GetFriendsFromCache(a1); 649 finfos = GetFriendsFromCache(a1);
650 if (finfos != null) 650 if (finfos != null)
651 { 651 {
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
658 FriendsService.Delete(a2, f.Friend); 658 FriendsService.Delete(a2, f.Friend);
659 // and also the converse 659 // and also the converse
660 FriendsService.Delete(f.Friend, a2.ToString()); 660 FriendsService.Delete(f.Friend, a2.ToString());
661 } 661 }
662 } 662 }
663 } 663 }
664 } 664 }
@@ -783,7 +783,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
783 m_log.DebugFormat("[HGFRIENDS MODULE]: Forwading friendship from {0} to {1} @ {2}", agentID, friendID, friendsURL); 783 m_log.DebugFormat("[HGFRIENDS MODULE]: Forwading friendship from {0} to {1} @ {2}", agentID, friendID, friendsURL);
784 GridRegion region = new GridRegion(); 784 GridRegion region = new GridRegion();
785 region.ServerURI = friendsURL; 785 region.ServerURI = friendsURL;
786 786
787 string name = im.fromAgentName; 787 string name = im.fromAgentName;
788 if (m_uMan.IsLocalGridUser(agentID)) 788 if (m_uMan.IsLocalGridUser(agentID))
789 { 789 {
@@ -815,7 +815,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
815 } 815 }
816 816
817 m_HGFriendsConnector.FriendshipOffered(region, agentID, friendID, im.message, name); 817 m_HGFriendsConnector.FriendshipOffered(region, agentID, friendID, im.message, name);
818 818
819 return true; 819 return true;
820 } 820 }
821 } 821 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
index 1fa4dd6..3fae271 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
32 { 32 {
33 if (kvp.Key != "local") 33 if (kvp.Key != "local")
34 { 34 {
35 // For the others, call the user agent service 35 // For the others, call the user agent service
36 List<string> ids = new List<string>(); 36 List<string> ids = new List<string>();
37 foreach (FriendInfo f in kvp.Value) 37 foreach (FriendInfo f in kvp.Value)
38 ids.Add(f.Friend); 38 ids.Add(f.Friend);
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
index e6fd54e..3d9bd35 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
67 // so that different services and simulator can share the data in standalone mode. This is pretty horrible 67 // so that different services and simulator can share the data in standalone mode. This is pretty horrible
68 // effectively the statics are global variables. 68 // effectively the statics are global variables.
69 NullFriendsData.Clear(); 69 NullFriendsData.Clear();
70 70
71 IConfigSource config = new IniConfigSource(); 71 IConfigSource config = new IniConfigSource();
72 config.AddConfig("Modules"); 72 config.AddConfig("Modules");
73 // Not strictly necessary since FriendsModule assumes it is the default (!) 73 // Not strictly necessary since FriendsModule assumes it is the default (!)
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
index 4efcd3b..03e2c5a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
@@ -42,11 +42,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
42{ 42{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GesturesModule")] 43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GesturesModule")]
44 public class GesturesModule : INonSharedRegionModule 44 public class GesturesModule : INonSharedRegionModule
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 protected Scene m_scene; 48 protected Scene m_scene;
49 49
50 public void Initialise(IConfigSource source) 50 public void Initialise(IConfigSource source)
51 { 51 {
52 } 52 }
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
67 m_scene.EventManager.OnNewClient -= OnNewClient; 67 m_scene.EventManager.OnNewClient -= OnNewClient;
68 m_scene = null; 68 m_scene = null;
69 } 69 }
70 70
71 public void Close() {} 71 public void Close() {}
72 public string Name { get { return "Gestures Module"; } } 72 public string Name { get { return "Gestures Module"; } }
73 73
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
81 client.OnActivateGesture += ActivateGesture; 81 client.OnActivateGesture += ActivateGesture;
82 client.OnDeactivateGesture += DeactivateGesture; 82 client.OnDeactivateGesture += DeactivateGesture;
83 } 83 }
84 84
85 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId) 85 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId)
86 { 86 {
87 IInventoryService invService = m_scene.InventoryService; 87 IInventoryService invService = m_scene.InventoryService;
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
92 item.Flags |= 1; 92 item.Flags |= 1;
93 invService.UpdateItem(item); 93 invService.UpdateItem(item);
94 } 94 }
95 else 95 else
96 m_log.WarnFormat( 96 m_log.WarnFormat(
97 "[GESTURES]: Unable to find gesture {0} to activate for {1}", gestureId, client.Name); 97 "[GESTURES]: Unable to find gesture {0} to activate for {1}", gestureId, client.Name);
98 } 98 }
@@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
107 item.Flags &= ~(uint)1; 107 item.Flags &= ~(uint)1;
108 invService.UpdateItem(item); 108 invService.UpdateItem(item);
109 } 109 }
110 else 110 else
111 m_log.ErrorFormat( 111 m_log.ErrorFormat(
112 "[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name); 112 "[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name);
113 } 113 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index db02379..8d3c10d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -112,19 +112,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
112 client.OnGodKickUser += KickUser; 112 client.OnGodKickUser += KickUser;
113 client.OnRequestGodlikePowers += RequestGodlikePowers; 113 client.OnRequestGodlikePowers += RequestGodlikePowers;
114 } 114 }
115 115
116 public void UnsubscribeFromClientEvents(IClientAPI client) 116 public void UnsubscribeFromClientEvents(IClientAPI client)
117 { 117 {
118 client.OnGodKickUser -= KickUser; 118 client.OnGodKickUser -= KickUser;
119 client.OnRequestGodlikePowers -= RequestGodlikePowers; 119 client.OnRequestGodlikePowers -= RequestGodlikePowers;
120 } 120 }
121 121
122 private void OnRegisterCaps(UUID agentID, Caps caps) 122 private void OnRegisterCaps(UUID agentID, Caps caps)
123 { 123 {
124 string uri = "/CAPS/" + UUID.Random(); 124 string uri = "/CAPS/" + UUID.Random();
125 125
126 caps.RegisterHandler( 126 caps.RegisterHandler(
127 "UntrustedSimulatorMessage", 127 "UntrustedSimulatorMessage",
128 new RestStreamHandler("POST", uri, HandleUntrustedSimulatorMessage, "UntrustedSimulatorMessage", null)); 128 new RestStreamHandler("POST", uri, HandleUntrustedSimulatorMessage, "UntrustedSimulatorMessage", null));
129 } 129 }
130 130
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
176 if (godLike && sp.GodLevel < 200 && DialogModule != null) 176 if (godLike && sp.GodLevel < 200 && DialogModule != null)
177 DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); 177 DialogModule.SendAlertToUser(agentID, "Request for god powers denied");
178 } 178 }
179 179
180 /// <summary> 180 /// <summary>
181 /// Kicks or freezes User specified from the simulator. This logs them off of the grid 181 /// Kicks or freezes User specified from the simulator. This logs them off of the grid
182 /// </summary> 182 /// </summary>
@@ -261,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
261 if(sp.IsDeleted || sp.IsChildAgent) 261 if(sp.IsDeleted || sp.IsChildAgent)
262 return; 262 return;
263 sp.ControllingClient.Kick(reason); 263 sp.ControllingClient.Kick(reason);
264 sp.Scene.CloseAgent(sp.UUID, true); 264 sp.Scene.CloseAgent(sp.UUID, true);
265 } 265 }
266 266
267 private void OnIncomingInstantMessage(GridInstantMessage msg) 267 private void OnIncomingInstantMessage(GridInstantMessage msg)
diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
index 543410e..7f91a61 100644
--- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
@@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
145 return; 145 return;
146 146
147// m_log.Debug("[GROUPS]: Shutting down group module."); 147// m_log.Debug("[GROUPS]: Shutting down group module.");
148 148
149 lock (m_ClientMap) 149 lock (m_ClientMap)
150 { 150 {
151 m_ClientMap.Clear(); 151 m_ClientMap.Clear();
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
index 63b3dba..16e2ec3 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
@@ -144,11 +144,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
144 foreach (Scene scene in m_Scenes) 144 foreach (Scene scene in m_Scenes)
145 { 145 {
146// m_log.DebugFormat( 146// m_log.DebugFormat(
147// "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}", 147// "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}",
148// toAgentID.ToString(), scene.RegionInfo.RegionName); 148// toAgentID.ToString(), scene.RegionInfo.RegionName);
149 ScenePresence sp = scene.GetScenePresence(toAgentID); 149 ScenePresence sp = scene.GetScenePresence(toAgentID);
150 if (sp != null && !sp.IsChildAgent && !sp.IsDeleted) 150 if (sp != null && !sp.IsChildAgent && !sp.IsDeleted)
151 { 151 {
152 // Local message 152 // Local message
153// m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); 153// m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID);
154 sp.ControllingClient.SendInstantMessage(im); 154 sp.ControllingClient.SendInstantMessage(im);
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index 7d54a00..71c0a8a 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
49 /// Is this module enabled? 49 /// Is this module enabled?
50 /// </value> 50 /// </value>
51 protected bool m_enabled = false; 51 protected bool m_enabled = false;
52 52
53 protected readonly List<Scene> m_scenes = new List<Scene>(); 53 protected readonly List<Scene> m_scenes = new List<Scene>();
54 54
55 #region Region Module interface 55 #region Region Module interface
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
65 "InstantMessageModule") 65 "InstantMessageModule")
66 return; 66 return;
67 } 67 }
68 68
69 m_enabled = true; 69 m_enabled = true;
70 } 70 }
71 71
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 6b120fb..efb9421 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -207,10 +207,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
207 protected virtual XmlRpcResponse processXMLRPCGridInstantMessage(XmlRpcRequest request, IPEndPoint remoteClient) 207 protected virtual XmlRpcResponse processXMLRPCGridInstantMessage(XmlRpcRequest request, IPEndPoint remoteClient)
208 { 208 {
209 bool successful = false; 209 bool successful = false;
210 210
211 // TODO: For now, as IMs seem to be a bit unreliable on OSGrid, catch all exception that 211 // TODO: For now, as IMs seem to be a bit unreliable on OSGrid, catch all exception that
212 // happen here and aren't caught and log them. 212 // happen here and aren't caught and log them.
213 try 213 try
214 { 214 {
215 // various rational defaults 215 // various rational defaults
216 UUID fromAgentID = UUID.Zero; 216 UUID fromAgentID = UUID.Zero;
@@ -475,7 +475,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
475 /// </summary> 475 /// </summary>
476 476
477 /// <param name="prevRegionHandle"> 477 /// <param name="prevRegionHandle">
478 /// Pass in 0 the first time this method is called. It will be called recursively with the last 478 /// Pass in 0 the first time this method is called. It will be called recursively with the last
479 /// regionhandle tried 479 /// regionhandle tried
480 /// </param> 480 /// </param>
481 private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result) 481 private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result)
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
index 315d372..2d57193 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
@@ -118,11 +118,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
118 { 118 {
119 get { return null; } 119 get { return null; }
120 } 120 }
121 121
122 public void Close() 122 public void Close()
123 { 123 {
124 } 124 }
125 125
126 private void OnNewClient(IClientAPI client) 126 private void OnNewClient(IClientAPI client)
127 { 127 {
128 client.OnMuteListRequest += OnMuteListRequest; 128 client.OnMuteListRequest += OnMuteListRequest;
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 369d480..d1f6054 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
146 { 146 {
147 get { return null; } 147 get { return null; }
148 } 148 }
149 149
150 public void Close() 150 public void Close()
151 { 151 {
152 } 152 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 4a06fd1..3838316 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
56 /// bumps here should be compatible. 56 /// bumps here should be compatible.
57 /// </summary> 57 /// </summary>
58 public static int MAX_MAJOR_VERSION = 1; 58 public static int MAX_MAJOR_VERSION = 1;
59 59
60 protected TarArchiveReader archive; 60 protected TarArchiveReader archive;
61 61
62 private UserAccount m_userInfo; 62 private UserAccount m_userInfo;
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
66 /// ID of this request 66 /// ID of this request
67 /// </value> 67 /// </value>
68 protected UUID m_id; 68 protected UUID m_id;
69 69
70 /// <summary> 70 /// <summary>
71 /// Do we want to merge this load with existing inventory? 71 /// Do we want to merge this load with existing inventory?
72 /// </summary> 72 /// </summary>
@@ -82,41 +82,41 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
82 /// The stream from which the inventory archive will be loaded. 82 /// The stream from which the inventory archive will be loaded.
83 /// </value> 83 /// </value>
84 private Stream m_loadStream; 84 private Stream m_loadStream;
85 85
86 /// <summary> 86 /// <summary>
87 /// Has the control file been loaded for this archive? 87 /// Has the control file been loaded for this archive?
88 /// </summary> 88 /// </summary>
89 public bool ControlFileLoaded { get; private set; } 89 public bool ControlFileLoaded { get; private set; }
90 90
91 /// <summary> 91 /// <summary>
92 /// Do we want to enforce the check. IAR versions before 0.2 and 1.1 do not guarantee this order, so we can't 92 /// Do we want to enforce the check. IAR versions before 0.2 and 1.1 do not guarantee this order, so we can't
93 /// enforce. 93 /// enforce.
94 /// </summary> 94 /// </summary>
95 public bool EnforceControlFileCheck { get; private set; } 95 public bool EnforceControlFileCheck { get; private set; }
96 96
97 protected bool m_assetsLoaded; 97 protected bool m_assetsLoaded;
98 protected bool m_inventoryNodesLoaded; 98 protected bool m_inventoryNodesLoaded;
99 99
100 protected int m_successfulAssetRestores; 100 protected int m_successfulAssetRestores;
101 protected int m_failedAssetRestores; 101 protected int m_failedAssetRestores;
102 protected int m_successfulItemRestores; 102 protected int m_successfulItemRestores;
103 103
104 /// <summary> 104 /// <summary>
105 /// Root destination folder for the IAR load. 105 /// Root destination folder for the IAR load.
106 /// </summary> 106 /// </summary>
107 protected InventoryFolderBase m_rootDestinationFolder; 107 protected InventoryFolderBase m_rootDestinationFolder;
108 108
109 /// <summary> 109 /// <summary>
110 /// Inventory nodes loaded from the iar. 110 /// Inventory nodes loaded from the iar.
111 /// </summary> 111 /// </summary>
112 protected HashSet<InventoryNodeBase> m_loadedNodes = new HashSet<InventoryNodeBase>(); 112 protected HashSet<InventoryNodeBase> m_loadedNodes = new HashSet<InventoryNodeBase>();
113 113
114 /// <summary> 114 /// <summary>
115 /// In order to load identically named folders, we need to keep track of the folders that we have already 115 /// In order to load identically named folders, we need to keep track of the folders that we have already
116 /// resolved. 116 /// resolved.
117 /// </summary> 117 /// </summary>
118 Dictionary <string, InventoryFolderBase> m_resolvedFolders = new Dictionary<string, InventoryFolderBase>(); 118 Dictionary <string, InventoryFolderBase> m_resolvedFolders = new Dictionary<string, InventoryFolderBase>();
119 119
120 /// <summary> 120 /// <summary>
121 /// Record the creator id that should be associated with an asset. This is used to adjust asset creator ids 121 /// Record the creator id that should be associated with an asset. This is used to adjust asset creator ids
122 /// after OSP resolution (since OSP creators are only stored in the item 122 /// after OSP resolution (since OSP creators are only stored in the item
@@ -163,9 +163,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
163 m_invPath = invPath; 163 m_invPath = invPath;
164 m_loadStream = loadStream; 164 m_loadStream = loadStream;
165 m_module = module; 165 m_module = module;
166 166
167 // FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things 167 // FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things
168 // (I thought they weren't). We will need to bump the version number and perform this check on all 168 // (I thought they weren't). We will need to bump the version number and perform this check on all
169 // subsequent IAR versions only 169 // subsequent IAR versions only
170 ControlFileLoaded = true; 170 ControlFileLoaded = true;
171 } 171 }
@@ -188,19 +188,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
188 Exception reportedException = null; 188 Exception reportedException = null;
189 189
190 string filePath = "ERROR"; 190 string filePath = "ERROR";
191 191
192 List<InventoryFolderBase> folderCandidates 192 List<InventoryFolderBase> folderCandidates
193 = InventoryArchiveUtils.FindFoldersByPath( 193 = InventoryArchiveUtils.FindFoldersByPath(
194 m_InventoryService, m_userInfo.PrincipalID, m_invPath); 194 m_InventoryService, m_userInfo.PrincipalID, m_invPath);
195 195
196 if (folderCandidates.Count == 0) 196 if (folderCandidates.Count == 0)
197 { 197 {
198 // Possibly provide an option later on to automatically create this folder if it does not exist 198 // Possibly provide an option later on to automatically create this folder if it does not exist
199 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); 199 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath);
200 200
201 return m_loadedNodes; 201 return m_loadedNodes;
202 } 202 }
203 203
204 m_rootDestinationFolder = folderCandidates[0]; 204 m_rootDestinationFolder = folderCandidates[0];
205 archive = new TarArchiveReader(m_loadStream); 205 archive = new TarArchiveReader(m_loadStream);
206 byte[] data; 206 byte[] data;
@@ -211,7 +211,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
211 if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 211 if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
212 { 212 {
213 LoadControlFile(filePath, data); 213 LoadControlFile(filePath, data);
214 } 214 }
215 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 215 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
216 { 216 {
217 LoadAssetFile(filePath, data); 217 LoadAssetFile(filePath, data);
@@ -221,17 +221,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
221 LoadInventoryFile(filePath, entryType, data); 221 LoadInventoryFile(filePath, entryType, data);
222 } 222 }
223 } 223 }
224 224
225 archive.Close(); 225 archive.Close();
226 226
227 m_log.DebugFormat( 227 m_log.DebugFormat(
228 "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", 228 "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures",
229 m_successfulAssetRestores, m_failedAssetRestores); 229 m_successfulAssetRestores, m_failedAssetRestores);
230 230
231 //Alicia: When this is called by LibraryModule or Tests, m_module will be null as event is not required 231 //Alicia: When this is called by LibraryModule or Tests, m_module will be null as event is not required
232 if(m_module != null) 232 if(m_module != null)
233 m_module.TriggerInventoryArchiveLoaded(m_id, true, m_userInfo, m_invPath, m_loadStream, reportedException, m_successfulItemRestores); 233 m_module.TriggerInventoryArchiveLoaded(m_id, true, m_userInfo, m_invPath, m_loadStream, reportedException, m_successfulItemRestores);
234 234
235 return m_loadedNodes; 235 return m_loadedNodes;
236 } 236 }
237 catch(Exception Ex) 237 catch(Exception Ex)
@@ -268,8 +268,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
268 /// </param> 268 /// </param>
269 /// <returns>The last user inventory folder created or found for the archive path</returns> 269 /// <returns>The last user inventory folder created or found for the archive path</returns>
270 public InventoryFolderBase ReplicateArchivePathToUserInventory( 270 public InventoryFolderBase ReplicateArchivePathToUserInventory(
271 string iarPath, 271 string iarPath,
272 InventoryFolderBase rootDestFolder, 272 InventoryFolderBase rootDestFolder,
273 Dictionary <string, InventoryFolderBase> resolvedFolders, 273 Dictionary <string, InventoryFolderBase> resolvedFolders,
274 HashSet<InventoryNodeBase> loadedNodes) 274 HashSet<InventoryNodeBase> loadedNodes)
275 { 275 {
@@ -277,27 +277,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
277 277
278// m_log.DebugFormat( 278// m_log.DebugFormat(
279// "[INVENTORY ARCHIVER]: Loading folder {0} {1}", rootDestFolder.Name, rootDestFolder.ID); 279// "[INVENTORY ARCHIVER]: Loading folder {0} {1}", rootDestFolder.Name, rootDestFolder.ID);
280 280
281 InventoryFolderBase destFolder 281 InventoryFolderBase destFolder
282 = ResolveDestinationFolder(rootDestFolder, ref iarPathExisting, resolvedFolders); 282 = ResolveDestinationFolder(rootDestFolder, ref iarPathExisting, resolvedFolders);
283 283
284// m_log.DebugFormat( 284// m_log.DebugFormat(
285// "[INVENTORY ARCHIVER]: originalArchivePath [{0}], section already loaded [{1}]", 285// "[INVENTORY ARCHIVER]: originalArchivePath [{0}], section already loaded [{1}]",
286// iarPath, iarPathExisting); 286// iarPath, iarPathExisting);
287 287
288 string iarPathToCreate = iarPath.Substring(iarPathExisting.Length); 288 string iarPathToCreate = iarPath.Substring(iarPathExisting.Length);
289 CreateFoldersForPath(destFolder, iarPathExisting, iarPathToCreate, resolvedFolders, loadedNodes); 289 CreateFoldersForPath(destFolder, iarPathExisting, iarPathToCreate, resolvedFolders, loadedNodes);
290 290
291 return destFolder; 291 return destFolder;
292 } 292 }
293 293
294 /// <summary> 294 /// <summary>
295 /// Resolve a destination folder 295 /// Resolve a destination folder
296 /// </summary> 296 /// </summary>
297 /// 297 ///
298 /// We require here a root destination folder (usually the root of the user's inventory) and the archive 298 /// We require here a root destination folder (usually the root of the user's inventory) and the archive
299 /// path. We also pass in a list of previously resolved folders in case we've found this one previously. 299 /// path. We also pass in a list of previously resolved folders in case we've found this one previously.
300 /// 300 ///
301 /// <param name="archivePath"> 301 /// <param name="archivePath">
302 /// The item archive path to resolve. The portion of the path passed back is that 302 /// The item archive path to resolve. The portion of the path passed back is that
303 /// which corresponds to the resolved desintation folder. 303 /// which corresponds to the resolved desintation folder.
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
321 while (archivePath.Length > 0) 321 while (archivePath.Length > 0)
322 { 322 {
323// m_log.DebugFormat("[INVENTORY ARCHIVER]: Trying to resolve destination folder {0}", archivePath); 323// m_log.DebugFormat("[INVENTORY ARCHIVER]: Trying to resolve destination folder {0}", archivePath);
324 324
325 if (resolvedFolders.ContainsKey(archivePath)) 325 if (resolvedFolders.ContainsKey(archivePath))
326 { 326 {
327// m_log.DebugFormat( 327// m_log.DebugFormat(
@@ -332,13 +332,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
332 { 332 {
333 if (m_merge) 333 if (m_merge)
334 { 334 {
335 // TODO: Using m_invPath is totally wrong - what we need to do is strip the uuid from the 335 // TODO: Using m_invPath is totally wrong - what we need to do is strip the uuid from the
336 // iar name and try to find that instead. 336 // iar name and try to find that instead.
337 string plainPath = ArchiveConstants.ExtractPlainPathFromIarPath(archivePath); 337 string plainPath = ArchiveConstants.ExtractPlainPathFromIarPath(archivePath);
338 List<InventoryFolderBase> folderCandidates 338 List<InventoryFolderBase> folderCandidates
339 = InventoryArchiveUtils.FindFoldersByPath( 339 = InventoryArchiveUtils.FindFoldersByPath(
340 m_InventoryService, m_userInfo.PrincipalID, plainPath); 340 m_InventoryService, m_userInfo.PrincipalID, plainPath);
341 341
342 if (folderCandidates.Count != 0) 342 if (folderCandidates.Count != 0)
343 { 343 {
344 InventoryFolderBase destFolder = folderCandidates[0]; 344 InventoryFolderBase destFolder = folderCandidates[0];
@@ -346,7 +346,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
346 return destFolder; 346 return destFolder;
347 } 347 }
348 } 348 }
349 349
350 // Don't include the last slash so find the penultimate one 350 // Don't include the last slash so find the penultimate one
351 int penultimateSlashIndex = archivePath.LastIndexOf("/", archivePath.Length - 2); 351 int penultimateSlashIndex = archivePath.LastIndexOf("/", archivePath.Length - 2);
352 352
@@ -365,10 +365,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
365 } 365 }
366 } 366 }
367 } 367 }
368 368
369 return rootDestFolder; 369 return rootDestFolder;
370 } 370 }
371 371
372 /// <summary> 372 /// <summary>
373 /// Create a set of folders for the given path. 373 /// Create a set of folders for the given path.
374 /// </summary> 374 /// </summary>
@@ -388,10 +388,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
388 /// Track the inventory nodes created. 388 /// Track the inventory nodes created.
389 /// </param> 389 /// </param>
390 protected void CreateFoldersForPath( 390 protected void CreateFoldersForPath(
391 InventoryFolderBase destFolder, 391 InventoryFolderBase destFolder,
392 string iarPathExisting, 392 string iarPathExisting,
393 string iarPathToReplicate, 393 string iarPathToReplicate,
394 Dictionary <string, InventoryFolderBase> resolvedFolders, 394 Dictionary <string, InventoryFolderBase> resolvedFolders,
395 HashSet<InventoryNodeBase> loadedNodes) 395 HashSet<InventoryNodeBase> loadedNodes)
396 { 396 {
397 string[] rawDirsToCreate = iarPathToReplicate.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); 397 string[] rawDirsToCreate = iarPathToReplicate.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
@@ -402,7 +402,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
402 402
403 if (!rawDirsToCreate[i].Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) 403 if (!rawDirsToCreate[i].Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR))
404 continue; 404 continue;
405 405
406 int identicalNameIdentifierIndex 406 int identicalNameIdentifierIndex
407 = rawDirsToCreate[i].LastIndexOf( 407 = rawDirsToCreate[i].LastIndexOf(
408 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); 408 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
@@ -412,7 +412,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
412 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName); 412 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName);
413 UUID newFolderId = UUID.Random(); 413 UUID newFolderId = UUID.Random();
414 414
415 destFolder 415 destFolder
416 = new InventoryFolderBase( 416 = new InventoryFolderBase(
417 newFolderId, newFolderName, m_userInfo.PrincipalID, 417 newFolderId, newFolderName, m_userInfo.PrincipalID,
418 (short)FolderType.None, destFolder.ID, 1); 418 (short)FolderType.None, destFolder.ID, 1);
@@ -427,7 +427,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
427 loadedNodes.Add(destFolder); 427 loadedNodes.Add(destFolder);
428 } 428 }
429 } 429 }
430 430
431 /// <summary> 431 /// <summary>
432 /// Load an item from the archive 432 /// Load an item from the archive
433 /// </summary> 433 /// </summary>
@@ -438,7 +438,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
438 protected InventoryItemBase LoadItem(byte[] data, InventoryFolderBase loadFolder) 438 protected InventoryItemBase LoadItem(byte[] data, InventoryFolderBase loadFolder)
439 { 439 {
440 InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data); 440 InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data);
441 441
442 // Don't use the item ID that's in the file 442 // Don't use the item ID that's in the file
443 item.ID = UUID.Random(); 443 item.ID = UUID.Random();
444 444
@@ -446,7 +446,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
446 if (UUID.Zero != ospResolvedId) // The user exists in this grid 446 if (UUID.Zero != ospResolvedId) // The user exists in this grid
447 { 447 {
448// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId); 448// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId);
449 449
450// item.CreatorIdAsUuid = ospResolvedId; 450// item.CreatorIdAsUuid = ospResolvedId;
451 451
452 // Don't preserve the OSPA in the creator id (which actually gets persisted to the 452 // Don't preserve the OSPA in the creator id (which actually gets persisted to the
@@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
474 474
475 if (!m_InventoryService.AddItem(item)) 475 if (!m_InventoryService.AddItem(item))
476 m_log.WarnFormat("[INVENTORY ARCHIVER]: Unable to save item {0} in folder {1}", item.Name, item.Folder); 476 m_log.WarnFormat("[INVENTORY ARCHIVER]: Unable to save item {0} in folder {1}", item.Name, item.Folder);
477 477
478 return item; 478 return item;
479 } 479 }
480 480
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
519 data = SceneObjectSerializer.ModifySerializedObject(assetId, data, 519 data = SceneObjectSerializer.ModifySerializedObject(assetId, data,
520 sog => { 520 sog => {
521 bool modified = false; 521 bool modified = false;
522 522
523 foreach (SceneObjectPart sop in sog.Parts) 523 foreach (SceneObjectPart sop in sog.Parts)
524 { 524 {
525 if (string.IsNullOrEmpty(sop.CreatorData)) 525 if (string.IsNullOrEmpty(sop.CreatorData))
@@ -528,10 +528,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
528 modified = true; 528 modified = true;
529 } 529 }
530 } 530 }
531 531
532 return modified; 532 return modified;
533 }); 533 });
534 534
535 if (data == null) 535 if (data == null)
536 return false; 536 return false;
537 } 537 }
@@ -568,7 +568,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
568 int majorVersion = int.Parse(archiveElement.Attribute("major_version").Value); 568 int majorVersion = int.Parse(archiveElement.Attribute("major_version").Value);
569 int minorVersion = int.Parse(archiveElement.Attribute("minor_version").Value); 569 int minorVersion = int.Parse(archiveElement.Attribute("minor_version").Value);
570 string version = string.Format("{0}.{1}", majorVersion, minorVersion); 570 string version = string.Format("{0}.{1}", majorVersion, minorVersion);
571 571
572 if (majorVersion > MAX_MAJOR_VERSION) 572 if (majorVersion > MAX_MAJOR_VERSION)
573 { 573 {
574 throw new Exception( 574 throw new Exception(
@@ -576,38 +576,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
576 "The IAR you are trying to load has major version number of {0} but this version of OpenSim can only load IARs with major version number {1} and below", 576 "The IAR you are trying to load has major version number of {0} but this version of OpenSim can only load IARs with major version number {1} and below",
577 majorVersion, MAX_MAJOR_VERSION)); 577 majorVersion, MAX_MAJOR_VERSION));
578 } 578 }
579 579
580 ControlFileLoaded = true; 580 ControlFileLoaded = true;
581 m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version); 581 m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version);
582 } 582 }
583 583
584 /// <summary> 584 /// <summary>
585 /// Load inventory file 585 /// Load inventory file
586 /// </summary> 586 /// </summary>
587 /// <param name="path"></param> 587 /// <param name="path"></param>
588 /// <param name="entryType"></param> 588 /// <param name="entryType"></param>
589 /// <param name="data"></param> 589 /// <param name="data"></param>
590 protected void LoadInventoryFile(string path, TarArchiveReader.TarEntryType entryType, byte[] data) 590 protected void LoadInventoryFile(string path, TarArchiveReader.TarEntryType entryType, byte[] data)
591 { 591 {
592 if (!ControlFileLoaded) 592 if (!ControlFileLoaded)
593 throw new Exception( 593 throw new Exception(
594 string.Format( 594 string.Format(
595 "The IAR you are trying to load does not list {0} before {1}. Aborting load", 595 "The IAR you are trying to load does not list {0} before {1}. Aborting load",
596 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH)); 596 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH));
597 597
598 if (m_assetsLoaded) 598 if (m_assetsLoaded)
599 throw new Exception( 599 throw new Exception(
600 string.Format( 600 string.Format(
601 "The IAR you are trying to load does not list all {0} before {1}. Aborting load", 601 "The IAR you are trying to load does not list all {0} before {1}. Aborting load",
602 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH)); 602 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH));
603 603
604 path = path.Substring(ArchiveConstants.INVENTORY_PATH.Length); 604 path = path.Substring(ArchiveConstants.INVENTORY_PATH.Length);
605 605
606 // Trim off the file portion if we aren't already dealing with a directory path 606 // Trim off the file portion if we aren't already dealing with a directory path
607 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) 607 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType)
608 path = path.Remove(path.LastIndexOf("/") + 1); 608 path = path.Remove(path.LastIndexOf("/") + 1);
609 609
610 InventoryFolderBase foundFolder 610 InventoryFolderBase foundFolder
611 = ReplicateArchivePathToUserInventory( 611 = ReplicateArchivePathToUserInventory(
612 path, m_rootDestinationFolder, m_resolvedFolders, m_loadedNodes); 612 path, m_rootDestinationFolder, m_resolvedFolders, m_loadedNodes);
613 613
@@ -618,17 +618,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
618 if (item != null) 618 if (item != null)
619 { 619 {
620 m_successfulItemRestores++; 620 m_successfulItemRestores++;
621 621
622 // If we aren't loading the folder containing the item then well need to update the 622 // If we aren't loading the folder containing the item then well need to update the
623 // viewer separately for that item. 623 // viewer separately for that item.
624 if (!m_loadedNodes.Contains(foundFolder)) 624 if (!m_loadedNodes.Contains(foundFolder))
625 m_loadedNodes.Add(item); 625 m_loadedNodes.Add(item);
626 } 626 }
627 } 627 }
628 628
629 m_inventoryNodesLoaded = true; 629 m_inventoryNodesLoaded = true;
630 } 630 }
631 631
632 /// <summary> 632 /// <summary>
633 /// Load asset file 633 /// Load asset file
634 /// </summary> 634 /// </summary>
@@ -639,15 +639,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
639 if (!ControlFileLoaded) 639 if (!ControlFileLoaded)
640 throw new Exception( 640 throw new Exception(
641 string.Format( 641 string.Format(
642 "The IAR you are trying to load does not list {0} before {1}. Aborting load", 642 "The IAR you are trying to load does not list {0} before {1}. Aborting load",
643 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH)); 643 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH));
644 644
645 if (!m_inventoryNodesLoaded) 645 if (!m_inventoryNodesLoaded)
646 throw new Exception( 646 throw new Exception(
647 string.Format( 647 string.Format(
648 "The IAR you are trying to load does not list all {0} before {1}. Aborting load", 648 "The IAR you are trying to load does not list all {0} before {1}. Aborting load",
649 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH)); 649 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH));
650 650
651 if (LoadAsset(path, data)) 651 if (LoadAsset(path, data))
652 m_successfulAssetRestores++; 652 m_successfulAssetRestores++;
653 else 653 else
@@ -655,10 +655,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
655 655
656 if ((m_successfulAssetRestores) % 50 == 0) 656 if ((m_successfulAssetRestores) % 50 == 0)
657 m_log.DebugFormat( 657 m_log.DebugFormat(
658 "[INVENTORY ARCHIVER]: Loaded {0} assets...", 658 "[INVENTORY ARCHIVER]: Loaded {0} assets...",
659 m_successfulAssetRestores); 659 m_successfulAssetRestores);
660 660
661 m_assetsLoaded = true; 661 m_assetsLoaded = true;
662 } 662 }
663 } 663 }
664} 664}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
index dbaf2aa..b66aad5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
69 /// The path to the required folder. 69 /// The path to the required folder.
70 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. 70 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
71 /// </param> 71 /// </param>
72 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an 72 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an
73 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns> 73 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns>
74 public static InventoryFolderBase FindFolderByPath( 74 public static InventoryFolderBase FindFolderByPath(
75 IInventoryService inventoryService, UUID userId, string path) 75 IInventoryService inventoryService, UUID userId, string path)
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
102 /// The path to the required folder. 102 /// The path to the required folder.
103 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. 103 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
104 /// </param> 104 /// </param>
105 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an 105 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an
106 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns> 106 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns>
107 public static InventoryFolderBase FindFolderByPath( 107 public static InventoryFolderBase FindFolderByPath(
108 IInventoryService inventoryService, InventoryFolderBase startFolder, string path) 108 IInventoryService inventoryService, InventoryFolderBase startFolder, string path)
@@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
149 149
150 return FindFoldersByPath(inventoryService, rootFolder, path); 150 return FindFoldersByPath(inventoryService, rootFolder, path);
151 } 151 }
152 152
153 /// <summary> 153 /// <summary>
154 /// Find a set of folders given a PATH_DELIMITER delimited path starting from this folder 154 /// Find a set of folders given a PATH_DELIMITER delimited path starting from this folder
155 /// </summary> 155 /// </summary>
@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
175 IInventoryService inventoryService, InventoryFolderBase startFolder, string path) 175 IInventoryService inventoryService, InventoryFolderBase startFolder, string path)
176 { 176 {
177 List<InventoryFolderBase> foundFolders = new List<InventoryFolderBase>(); 177 List<InventoryFolderBase> foundFolders = new List<InventoryFolderBase>();
178 178
179 if (path == string.Empty) 179 if (path == string.Empty)
180 { 180 {
181 foundFolders.Add(startFolder); 181 foundFolders.Add(startFolder);
@@ -189,17 +189,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
189 foundFolders.Add(startFolder); 189 foundFolders.Add(startFolder);
190 return foundFolders; 190 return foundFolders;
191 } 191 }
192 192
193 // If the path isn't just / then trim any starting extraneous slashes 193 // If the path isn't just / then trim any starting extraneous slashes
194 path = path.TrimStart(new char[] { PATH_DELIMITER }); 194 path = path.TrimStart(new char[] { PATH_DELIMITER });
195 195
196// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Adjusted path in FindFolderByPath() is [{0}]", path); 196// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Adjusted path in FindFolderByPath() is [{0}]", path);
197 197
198 string[] components = SplitEscapedPath(path); 198 string[] components = SplitEscapedPath(path);
199 components[0] = UnescapePath(components[0]); 199 components[0] = UnescapePath(components[0]);
200 200
201 //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None); 201 //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None);
202 202
203 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID); 203 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID);
204 204
205// m_log.DebugFormat( 205// m_log.DebugFormat(
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
230 /// 230 ///
231 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 231 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
232 /// </remarks> 232 /// </remarks>
233 /// 233 ///
234 /// <param name="inventoryService"> 234 /// <param name="inventoryService">
235 /// Inventory service to query 235 /// Inventory service to query
236 /// </param> 236 /// </param>
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
301 /// 301 ///
302 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 302 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
303 /// </remarks> 303 /// </remarks>
304 /// 304 ///
305 /// <param name="inventoryService">Inventory service to query</param> 305 /// <param name="inventoryService">Inventory service to query</param>
306 /// <param name="startFolder">The folder from which the path starts</param> 306 /// <param name="startFolder">The folder from which the path starts</param>
307 /// <param name="path">The path to the required item.</param> 307 /// <param name="path">The path to the required item.</param>
@@ -313,10 +313,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
313 313
314 // If the path isn't just / then trim any starting extraneous slashes 314 // If the path isn't just / then trim any starting extraneous slashes
315 path = path.TrimStart(new char[] { PATH_DELIMITER }); 315 path = path.TrimStart(new char[] { PATH_DELIMITER });
316 316
317 string[] components = SplitEscapedPath(path); 317 string[] components = SplitEscapedPath(path);
318 components[0] = UnescapePath(components[0]); 318 components[0] = UnescapePath(components[0]);
319 319
320 //string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); 320 //string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None);
321 321
322 if (components.Length == 1) 322 if (components.Length == 1)
@@ -324,15 +324,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "FOUND SINGLE COMPONENT [{0}]. Looking for this in [{1}] {2}", 325// "FOUND SINGLE COMPONENT [{0}]. Looking for this in [{1}] {2}",
326// components[0], startFolder.Name, startFolder.ID); 326// components[0], startFolder.Name, startFolder.ID);
327 327
328 List<InventoryItemBase> items = inventoryService.GetFolderItems(startFolder.Owner, startFolder.ID); 328 List<InventoryItemBase> items = inventoryService.GetFolderItems(startFolder.Owner, startFolder.ID);
329 329
330// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Found {0} items in FindItemByPath()", items.Count); 330// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Found {0} items in FindItemByPath()", items.Count);
331 331
332 foreach (InventoryItemBase item in items) 332 foreach (InventoryItemBase item in items)
333 { 333 {
334// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Inspecting item {0} {1}", item.Name, item.ID); 334// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Inspecting item {0} {1}", item.Name, item.ID);
335 335
336 if (item.Name == components[0]) 336 if (item.Name == components[0])
337 foundItems.Add(item); 337 foundItems.Add(item);
338 } 338 }
@@ -342,7 +342,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
342// m_log.DebugFormat("FOUND COMPONENTS [{0}] and [{1}]", components[0], components[1]); 342// m_log.DebugFormat("FOUND COMPONENTS [{0}] and [{1}]", components[0], components[1]);
343 343
344 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID); 344 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID);
345 345
346 foreach (InventoryFolderBase folder in contents.Folders) 346 foreach (InventoryFolderBase folder in contents.Folders)
347 { 347 {
348 if (folder.Name == components[0]) 348 if (folder.Name == components[0])
@@ -365,9 +365,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
365 public static string[] SplitEscapedPath(string path) 365 public static string[] SplitEscapedPath(string path)
366 { 366 {
367// m_log.DebugFormat("SPLITTING PATH {0}", path); 367// m_log.DebugFormat("SPLITTING PATH {0}", path);
368 368
369 bool singleEscapeChar = false; 369 bool singleEscapeChar = false;
370 370
371 for (int i = 0; i < path.Length; i++) 371 for (int i = 0; i < path.Length; i++)
372 { 372 {
373 if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar) 373 if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar)
@@ -395,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
395 public static string UnescapePath(string path) 395 public static string UnescapePath(string path)
396 { 396 {
397// m_log.DebugFormat("ESCAPING PATH {0}", path); 397// m_log.DebugFormat("ESCAPING PATH {0}", path);
398 398
399 StringBuilder sb = new StringBuilder(); 399 StringBuilder sb = new StringBuilder();
400 400
401 bool singleEscapeChar = false; 401 bool singleEscapeChar = false;
@@ -418,7 +418,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
418 } 418 }
419 419
420// m_log.DebugFormat("ESCAPED PATH TO {0}", sb); 420// m_log.DebugFormat("ESCAPED PATH TO {0}", sb);
421 421
422 return sb.ToString(); 422 return sb.ToString();
423 } 423 }
424 424
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 8847414..be59eb5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -172,7 +172,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
172 172
173 public string Name { get { return "Inventory Archiver Module"; } } 173 public string Name { get { return "Inventory Archiver Module"; } }
174 174
175 #endregion 175 #endregion
176 176
177 /// <summary> 177 /// <summary>
178 /// Trigger the inventory archive saved event. 178 /// Trigger the inventory archive saved event.
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs
index c2e645f..f559c2e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs
@@ -56,23 +56,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
56 { 56 {
57 TestHelpers.InMethod(); 57 TestHelpers.InMethod();
58// log4net.Config.XmlConfigurator.Configure(); 58// log4net.Config.XmlConfigurator.Configure();
59 59
60 SerialiserModule serialiserModule = new SerialiserModule(); 60 SerialiserModule serialiserModule = new SerialiserModule();
61 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 61 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
62 62
63 // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene 63 // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
64 Scene scene = new SceneHelpers().SetupScene(); 64 Scene scene = new SceneHelpers().SetupScene();
65 65
66 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); 66 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
67 67
68 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "meowfood"); 68 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "meowfood");
69 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); 69 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
70 70
71 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream); 71 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream);
72 InventoryItemBase foundItem1 72 InventoryItemBase foundItem1
73 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, m_item1Name); 73 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, m_item1Name);
74 74
75 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 75 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
76 76
77 // Now try loading to a root child folder 77 // Now try loading to a root child folder
78 UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xA", false); 78 UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xA", false);
@@ -90,9 +90,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
90 90
91 InventoryItemBase foundItem3 91 InventoryItemBase foundItem3
92 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, "xB/xC/" + m_item1Name); 92 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, "xB/xC/" + m_item1Name);
93 Assert.That(foundItem3, Is.Not.Null, "Didn't find loaded item 3"); 93 Assert.That(foundItem3, Is.Not.Null, "Didn't find loaded item 3");
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Test that things work when the load path specified starts with a slash 97 /// Test that things work when the load path specified starts with a slash
98 /// </summary> 98 /// </summary>
@@ -101,22 +101,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
101 { 101 {
102 TestHelpers.InMethod(); 102 TestHelpers.InMethod();
103// log4net.Config.XmlConfigurator.Configure(); 103// log4net.Config.XmlConfigurator.Configure();
104 104
105 SerialiserModule serialiserModule = new SerialiserModule(); 105 SerialiserModule serialiserModule = new SerialiserModule();
106 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 106 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
107 Scene scene = new SceneHelpers().SetupScene(); 107 Scene scene = new SceneHelpers().SetupScene();
108 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); 108 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
109 109
110 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password"); 110 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password");
111 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/Objects", "password", m_iarStream); 111 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/Objects", "password", m_iarStream);
112 112
113 InventoryItemBase foundItem1 113 InventoryItemBase foundItem1
114 = InventoryArchiveUtils.FindItemByPath( 114 = InventoryArchiveUtils.FindItemByPath(
115 scene.InventoryService, m_uaMT.PrincipalID, "/Objects/" + m_item1Name); 115 scene.InventoryService, m_uaMT.PrincipalID, "/Objects/" + m_item1Name);
116 116
117 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); 117 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()");
118 } 118 }
119 119
120 [Test] 120 [Test]
121 public void TestLoadIarPathWithEscapedChars() 121 public void TestLoadIarPathWithEscapedChars()
122 { 122 {
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
137 string userLastName = "Stirrup"; 137 string userLastName = "Stirrup";
138 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 138 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
139 UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); 139 UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood");
140 140
141 // Create asset 141 // Create asset
142 SceneObjectGroup object1; 142 SceneObjectGroup object1;
143 SceneObjectPart part1; 143 SceneObjectPart part1;
@@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
168 item1.Name = itemName; 168 item1.Name = itemName;
169 item1.AssetID = asset1.FullID; 169 item1.AssetID = asset1.FullID;
170 item1.ID = item1Id; 170 item1.ID = item1Id;
171 InventoryFolderBase objsFolder 171 InventoryFolderBase objsFolder
172 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, userId, "Objects")[0]; 172 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, userId, "Objects")[0];
173 item1.Folder = objsFolder.ID; 173 item1.Folder = objsFolder.ID;
174 scene.AddInventoryItem(item1); 174 scene.AddInventoryItem(item1);
@@ -189,16 +189,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
189 InventoryItemBase foundItem1 189 InventoryItemBase foundItem1
190 = InventoryArchiveUtils.FindItemByPath( 190 = InventoryArchiveUtils.FindItemByPath(
191 scene.InventoryService, userId, "Scripts/Objects/" + humanEscapedItemName); 191 scene.InventoryService, userId, "Scripts/Objects/" + humanEscapedItemName);
192 192
193 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 193 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
194// Assert.That( 194// Assert.That(
195// foundItem1.CreatorId, Is.EqualTo(userUuid), 195// foundItem1.CreatorId, Is.EqualTo(userUuid),
196// "Loaded item non-uuid creator doesn't match that of the loading user"); 196// "Loaded item non-uuid creator doesn't match that of the loading user");
197 Assert.That( 197 Assert.That(
198 foundItem1.Name, Is.EqualTo(itemName), 198 foundItem1.Name, Is.EqualTo(itemName),
199 "Loaded item name doesn't match saved name"); 199 "Loaded item name doesn't match saved name");
200 } 200 }
201 201
202 /// <summary> 202 /// <summary>
203 /// Test replication of an archive path to the user's inventory. 203 /// Test replication of an archive path to the user's inventory.
204 /// </summary> 204 /// </summary>
@@ -207,21 +207,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
207 { 207 {
208 TestHelpers.InMethod(); 208 TestHelpers.InMethod();
209// log4net.Config.XmlConfigurator.Configure(); 209// log4net.Config.XmlConfigurator.Configure();
210 210
211 Scene scene = new SceneHelpers().SetupScene(); 211 Scene scene = new SceneHelpers().SetupScene();
212 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); 212 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
213 213
214 Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); 214 Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>();
215 HashSet<InventoryNodeBase> nodesLoaded = new HashSet<InventoryNodeBase>(); 215 HashSet<InventoryNodeBase> nodesLoaded = new HashSet<InventoryNodeBase>();
216 216
217 string folder1Name = "1"; 217 string folder1Name = "1";
218 string folder2aName = "2a"; 218 string folder2aName = "2a";
219 string folder2bName = "2b"; 219 string folder2bName = "2b";
220 220
221 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); 221 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random());
222 string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); 222 string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random());
223 string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); 223 string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random());
224 224
225 string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); 225 string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName });
226 string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); 226 string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName });
227 227
@@ -229,42 +229,42 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
229 // Test replication of path1 229 // Test replication of path1
230 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false) 230 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false)
231 .ReplicateArchivePathToUserInventory( 231 .ReplicateArchivePathToUserInventory(
232 iarPath1, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 232 iarPath1, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
233 foldersCreated, nodesLoaded); 233 foldersCreated, nodesLoaded);
234 234
235 List<InventoryFolderBase> folder1Candidates 235 List<InventoryFolderBase> folder1Candidates
236 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); 236 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name);
237 Assert.That(folder1Candidates.Count, Is.EqualTo(1)); 237 Assert.That(folder1Candidates.Count, Is.EqualTo(1));
238 238
239 InventoryFolderBase folder1 = folder1Candidates[0]; 239 InventoryFolderBase folder1 = folder1Candidates[0];
240 List<InventoryFolderBase> folder2aCandidates 240 List<InventoryFolderBase> folder2aCandidates
241 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName); 241 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName);
242 Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); 242 Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
243 } 243 }
244 244
245 { 245 {
246 // Test replication of path2 246 // Test replication of path2
247 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false) 247 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false)
248 .ReplicateArchivePathToUserInventory( 248 .ReplicateArchivePathToUserInventory(
249 iarPath2, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 249 iarPath2, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
250 foldersCreated, nodesLoaded); 250 foldersCreated, nodesLoaded);
251 251
252 List<InventoryFolderBase> folder1Candidates 252 List<InventoryFolderBase> folder1Candidates
253 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); 253 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name);
254 Assert.That(folder1Candidates.Count, Is.EqualTo(1)); 254 Assert.That(folder1Candidates.Count, Is.EqualTo(1));
255 255
256 InventoryFolderBase folder1 = folder1Candidates[0]; 256 InventoryFolderBase folder1 = folder1Candidates[0];
257 257
258 List<InventoryFolderBase> folder2aCandidates 258 List<InventoryFolderBase> folder2aCandidates
259 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName); 259 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName);
260 Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); 260 Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
261 261
262 List<InventoryFolderBase> folder2bCandidates 262 List<InventoryFolderBase> folder2bCandidates
263 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2bName); 263 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2bName);
264 Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); 264 Assert.That(folder2bCandidates.Count, Is.EqualTo(1));
265 } 265 }
266 } 266 }
267 267
268 /// <summary> 268 /// <summary>
269 /// Test replication of a partly existing archive path to the user's inventory. This should create 269 /// Test replication of a partly existing archive path to the user's inventory. This should create
270 /// a duplicate path without the merge option. 270 /// a duplicate path without the merge option.
@@ -274,31 +274,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
274 { 274 {
275 TestHelpers.InMethod(); 275 TestHelpers.InMethod();
276 //log4net.Config.XmlConfigurator.Configure(); 276 //log4net.Config.XmlConfigurator.Configure();
277 277
278 Scene scene = new SceneHelpers().SetupScene(); 278 Scene scene = new SceneHelpers().SetupScene();
279 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); 279 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
280 280
281 string folder1ExistingName = "a"; 281 string folder1ExistingName = "a";
282 string folder2Name = "b"; 282 string folder2Name = "b";
283 283
284 InventoryFolderBase folder1 284 InventoryFolderBase folder1
285 = UserInventoryHelpers.CreateInventoryFolder( 285 = UserInventoryHelpers.CreateInventoryFolder(
286 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false); 286 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false);
287 287
288 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); 288 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
289 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); 289 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
290 290
291 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName }); 291 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName });
292 292
293 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false) 293 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false)
294 .ReplicateArchivePathToUserInventory( 294 .ReplicateArchivePathToUserInventory(
295 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 295 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
296 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>()); 296 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>());
297 297
298 List<InventoryFolderBase> folder1PostCandidates 298 List<InventoryFolderBase> folder1PostCandidates
299 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); 299 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
300 Assert.That(folder1PostCandidates.Count, Is.EqualTo(2)); 300 Assert.That(folder1PostCandidates.Count, Is.EqualTo(2));
301 301
302 // FIXME: Temporarily, we're going to do something messy to make sure we pick up the created folder. 302 // FIXME: Temporarily, we're going to do something messy to make sure we pick up the created folder.
303 InventoryFolderBase folder1Post = null; 303 InventoryFolderBase folder1Post = null;
304 foreach (InventoryFolderBase folder in folder1PostCandidates) 304 foreach (InventoryFolderBase folder in folder1PostCandidates)
@@ -311,11 +311,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
311 } 311 }
312// Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); 312// Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID));
313 313
314 List<InventoryFolderBase> folder2PostCandidates 314 List<InventoryFolderBase> folder2PostCandidates
315 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1Post, "b"); 315 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1Post, "b");
316 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); 316 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
317 } 317 }
318 318
319 /// <summary> 319 /// <summary>
320 /// Test replication of a partly existing archive path to the user's inventory. This should create 320 /// Test replication of a partly existing archive path to the user's inventory. This should create
321 /// a merged path. 321 /// a merged path.
@@ -325,33 +325,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
325 { 325 {
326 TestHelpers.InMethod(); 326 TestHelpers.InMethod();
327// log4net.Config.XmlConfigurator.Configure(); 327// log4net.Config.XmlConfigurator.Configure();
328 328
329 Scene scene = new SceneHelpers().SetupScene(); 329 Scene scene = new SceneHelpers().SetupScene();
330 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); 330 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
331 331
332 string folder1ExistingName = "a"; 332 string folder1ExistingName = "a";
333 string folder2Name = "b"; 333 string folder2Name = "b";
334 334
335 InventoryFolderBase folder1 335 InventoryFolderBase folder1
336 = UserInventoryHelpers.CreateInventoryFolder( 336 = UserInventoryHelpers.CreateInventoryFolder(
337 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false); 337 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false);
338 338
339 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); 339 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
340 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); 340 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
341 341
342 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName }); 342 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName });
343 343
344 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, folder1ExistingName, (Stream)null, true) 344 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, folder1ExistingName, (Stream)null, true)
345 .ReplicateArchivePathToUserInventory( 345 .ReplicateArchivePathToUserInventory(
346 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 346 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
347 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>()); 347 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>());
348 348
349 List<InventoryFolderBase> folder1PostCandidates 349 List<InventoryFolderBase> folder1PostCandidates
350 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); 350 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
351 Assert.That(folder1PostCandidates.Count, Is.EqualTo(1)); 351 Assert.That(folder1PostCandidates.Count, Is.EqualTo(1));
352 Assert.That(folder1PostCandidates[0].ID, Is.EqualTo(folder1.ID)); 352 Assert.That(folder1PostCandidates[0].ID, Is.EqualTo(folder1.ID));
353 353
354 List<InventoryFolderBase> folder2PostCandidates 354 List<InventoryFolderBase> folder2PostCandidates
355 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1PostCandidates[0], "b"); 355 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1PostCandidates[0], "b");
356 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); 356 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
357 } 357 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs
index 57b4f80..d0bdc91 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
47{ 47{
48 [TestFixture] 48 [TestFixture]
49 public class InventoryArchiveLoadTests : InventoryArchiveTestCase 49 public class InventoryArchiveLoadTests : InventoryArchiveTestCase
50 { 50 {
51 protected TestScene m_scene; 51 protected TestScene m_scene;
52 protected InventoryArchiverModule m_archiverModule; 52 protected InventoryArchiverModule m_archiverModule;
53 53
@@ -55,12 +55,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
55 public override void SetUp() 55 public override void SetUp()
56 { 56 {
57 base.SetUp(); 57 base.SetUp();
58 58
59 SerialiserModule serialiserModule = new SerialiserModule(); 59 SerialiserModule serialiserModule = new SerialiserModule();
60 m_archiverModule = new InventoryArchiverModule(); 60 m_archiverModule = new InventoryArchiverModule();
61 61
62 m_scene = new SceneHelpers().SetupScene(); 62 m_scene = new SceneHelpers().SetupScene();
63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); 63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule);
64 } 64 }
65 65
66 [Test] 66 [Test]
@@ -68,35 +68,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
68 { 68 {
69 TestHelpers.InMethod(); 69 TestHelpers.InMethod();
70// TestHelpers.EnableLogging(); 70// TestHelpers.EnableLogging();
71 71
72 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password"); 72 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password");
73 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); 73 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream);
74 74
75 InventoryItemBase coaItem 75 InventoryItemBase coaItem
76 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName); 76 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName);
77 77
78 Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1"); 78 Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1");
79 79
80 string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID); 80 string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID);
81 81
82 CoalescedSceneObjects coa; 82 CoalescedSceneObjects coa;
83 bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa); 83 bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa);
84 84
85 Assert.That(readResult, Is.True); 85 Assert.That(readResult, Is.True);
86 Assert.That(coa.Count, Is.EqualTo(2)); 86 Assert.That(coa.Count, Is.EqualTo(2));
87 87
88 List<SceneObjectGroup> coaObjects = coa.Objects; 88 List<SceneObjectGroup> coaObjects = coa.Objects;
89 Assert.That(coaObjects[0].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000120"))); 89 Assert.That(coaObjects[0].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000120")));
90 Assert.That(coaObjects[0].AbsolutePosition, Is.EqualTo(new Vector3(15, 30, 45))); 90 Assert.That(coaObjects[0].AbsolutePosition, Is.EqualTo(new Vector3(15, 30, 45)));
91 91
92 Assert.That(coaObjects[1].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000140"))); 92 Assert.That(coaObjects[1].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000140")));
93 Assert.That(coaObjects[1].AbsolutePosition, Is.EqualTo(new Vector3(25, 50, 75))); 93 Assert.That(coaObjects[1].AbsolutePosition, Is.EqualTo(new Vector3(25, 50, 75)));
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Test case where a creator account exists for the creator UUID embedded in item metadata and serialized 97 /// Test case where a creator account exists for the creator UUID embedded in item metadata and serialized
98 /// objects. 98 /// objects.
99 /// </summary> 99 /// </summary>
100 [Test] 100 [Test]
101 public void TestLoadIarCreatorAccountPresent() 101 public void TestLoadIarCreatorAccountPresent()
102 { 102 {
@@ -105,26 +105,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
105 105
106 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood"); 106 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood");
107 107
108 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream); 108 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream);
109 InventoryItemBase foundItem1 109 InventoryItemBase foundItem1
110 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_item1Name); 110 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_item1Name);
111 111
112 Assert.That( 112 Assert.That(
113 foundItem1.CreatorId, Is.EqualTo(m_uaLL1.PrincipalID.ToString()), 113 foundItem1.CreatorId, Is.EqualTo(m_uaLL1.PrincipalID.ToString()),
114 "Loaded item non-uuid creator doesn't match original"); 114 "Loaded item non-uuid creator doesn't match original");
115 Assert.That( 115 Assert.That(
116 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL1.PrincipalID), 116 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL1.PrincipalID),
117 "Loaded item uuid creator doesn't match original"); 117 "Loaded item uuid creator doesn't match original");
118 Assert.That(foundItem1.Owner, Is.EqualTo(m_uaLL1.PrincipalID), 118 Assert.That(foundItem1.Owner, Is.EqualTo(m_uaLL1.PrincipalID),
119 "Loaded item owner doesn't match inventory reciever"); 119 "Loaded item owner doesn't match inventory reciever");
120 120
121 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString()); 121 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
122 string xmlData = Utils.BytesToString(asset1.Data); 122 string xmlData = Utils.BytesToString(asset1.Data);
123 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); 123 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
124 124
125 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL1.PrincipalID)); 125 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL1.PrincipalID));
126 } 126 }
127 127
128// /// <summary> 128// /// <summary>
129// /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where 129// /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
130// /// an account exists with the same name as the creator, though not the same id. 130// /// an account exists with the same name as the creator, though not the same id.
@@ -137,24 +137,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
137// 137//
138// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "meowfood"); 138// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "meowfood");
139// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL2, "hampshire"); 139// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL2, "hampshire");
140// 140//
141// m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream); 141// m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream);
142// InventoryItemBase foundItem1 142// InventoryItemBase foundItem1
143// = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name); 143// = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name);
144// 144//
145// Assert.That( 145// Assert.That(
146// foundItem1.CreatorId, Is.EqualTo(m_uaLL2.PrincipalID.ToString()), 146// foundItem1.CreatorId, Is.EqualTo(m_uaLL2.PrincipalID.ToString()),
147// "Loaded item non-uuid creator doesn't match original"); 147// "Loaded item non-uuid creator doesn't match original");
148// Assert.That( 148// Assert.That(
149// foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL2.PrincipalID), 149// foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL2.PrincipalID),
150// "Loaded item uuid creator doesn't match original"); 150// "Loaded item uuid creator doesn't match original");
151// Assert.That(foundItem1.Owner, Is.EqualTo(m_uaMT.PrincipalID), 151// Assert.That(foundItem1.Owner, Is.EqualTo(m_uaMT.PrincipalID),
152// "Loaded item owner doesn't match inventory reciever"); 152// "Loaded item owner doesn't match inventory reciever");
153// 153//
154// AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString()); 154// AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
155// string xmlData = Utils.BytesToString(asset1.Data); 155// string xmlData = Utils.BytesToString(asset1.Data);
156// SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); 156// SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
157// 157//
158// Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL2.PrincipalID)); 158// Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL2.PrincipalID));
159// } 159// }
160 160
@@ -167,26 +167,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
167 { 167 {
168 TestHelpers.InMethod(); 168 TestHelpers.InMethod();
169// log4net.Config.XmlConfigurator.Configure(); 169// log4net.Config.XmlConfigurator.Configure();
170 170
171 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "password"); 171 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "password");
172 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "password", m_iarStream); 172 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "password", m_iarStream);
173 173
174 InventoryItemBase foundItem1 174 InventoryItemBase foundItem1
175 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name); 175 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name);
176 176
177 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 177 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
178 Assert.That( 178 Assert.That(
179 foundItem1.CreatorId, Is.EqualTo(m_uaMT.PrincipalID.ToString()), 179 foundItem1.CreatorId, Is.EqualTo(m_uaMT.PrincipalID.ToString()),
180 "Loaded item non-uuid creator doesn't match that of the loading user"); 180 "Loaded item non-uuid creator doesn't match that of the loading user");
181 Assert.That( 181 Assert.That(
182 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaMT.PrincipalID), 182 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaMT.PrincipalID),
183 "Loaded item uuid creator doesn't match that of the loading user"); 183 "Loaded item uuid creator doesn't match that of the loading user");
184 184
185 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString()); 185 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
186 string xmlData = Utils.BytesToString(asset1.Data); 186 string xmlData = Utils.BytesToString(asset1.Data);
187 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); 187 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
188 188
189 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaMT.PrincipalID)); 189 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaMT.PrincipalID));
190 } 190 }
191 } 191 }
192} \ No newline at end of file 192} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
index 7265405..bd112b4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
@@ -50,19 +50,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
50 { 50 {
51 protected TestScene m_scene; 51 protected TestScene m_scene;
52 protected InventoryArchiverModule m_archiverModule; 52 protected InventoryArchiverModule m_archiverModule;
53 53
54 [SetUp] 54 [SetUp]
55 public override void SetUp() 55 public override void SetUp()
56 { 56 {
57 base.SetUp(); 57 base.SetUp();
58 58
59 SerialiserModule serialiserModule = new SerialiserModule(); 59 SerialiserModule serialiserModule = new SerialiserModule();
60 m_archiverModule = new InventoryArchiverModule(); 60 m_archiverModule = new InventoryArchiverModule();
61 61
62 m_scene = new SceneHelpers().SetupScene(); 62 m_scene = new SceneHelpers().SetupScene();
63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); 63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule);
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Test that the IAR has the required files in the right order. 67 /// Test that the IAR has the required files in the right order.
68 /// </summary> 68 /// </summary>
@@ -73,20 +73,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
73 public void TestOrder() 73 public void TestOrder()
74 { 74 {
75 TestHelpers.InMethod(); 75 TestHelpers.InMethod();
76// log4net.Config.XmlConfigurator.Configure(); 76// log4net.Config.XmlConfigurator.Configure();
77 77
78 MemoryStream archiveReadStream = new MemoryStream(m_iarStreamBytes); 78 MemoryStream archiveReadStream = new MemoryStream(m_iarStreamBytes);
79 TarArchiveReader tar = new TarArchiveReader(archiveReadStream); 79 TarArchiveReader tar = new TarArchiveReader(archiveReadStream);
80 string filePath; 80 string filePath;
81 TarArchiveReader.TarEntryType tarEntryType; 81 TarArchiveReader.TarEntryType tarEntryType;
82 82
83 byte[] data = tar.ReadEntry(out filePath, out tarEntryType); 83 byte[] data = tar.ReadEntry(out filePath, out tarEntryType);
84 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); 84 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH));
85 85
86 InventoryArchiveReadRequest iarr 86 InventoryArchiveReadRequest iarr
87 = new InventoryArchiveReadRequest(UUID.Random(), null, null, null, null, null, null, (Stream)null, false); 87 = new InventoryArchiveReadRequest(UUID.Random(), null, null, null, null, null, null, (Stream)null, false);
88 iarr.LoadControlFile(filePath, data); 88 iarr.LoadControlFile(filePath, data);
89 89
90 Assert.That(iarr.ControlFileLoaded, Is.True); 90 Assert.That(iarr.ControlFileLoaded, Is.True);
91 } 91 }
92 92
@@ -119,22 +119,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
119// InventoryArchiveUtils. 119// InventoryArchiveUtils.
120 bool gotObjectsFolder = false; 120 bool gotObjectsFolder = false;
121 121
122 string objectsFolderName 122 string objectsFolderName
123 = string.Format( 123 = string.Format(
124 "{0}{1}", 124 "{0}{1}",
125 ArchiveConstants.INVENTORY_PATH, 125 ArchiveConstants.INVENTORY_PATH,
126 InventoryArchiveWriteRequest.CreateArchiveFolderName( 126 InventoryArchiveWriteRequest.CreateArchiveFolderName(
127 UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, userId, "Objects"))); 127 UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, userId, "Objects")));
128 128
129 string filePath; 129 string filePath;
130 TarArchiveReader.TarEntryType tarEntryType; 130 TarArchiveReader.TarEntryType tarEntryType;
131 131
132 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 132 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
133 { 133 {
134// Console.WriteLine("Got {0}", filePath); 134// Console.WriteLine("Got {0}", filePath);
135 135
136 // Lazily, we only bother to look for the system objects folder created when we call CreateUserWithInventory() 136 // Lazily, we only bother to look for the system objects folder created when we call CreateUserWithInventory()
137 // XXX: But really we need to stop all that stuff being created in tests or check for such folders 137 // XXX: But really we need to stop all that stuff being created in tests or check for such folders
138 // more thoroughly 138 // more thoroughly
139 if (filePath == objectsFolderName) 139 if (filePath == objectsFolderName)
140 gotObjectsFolder = true; 140 gotObjectsFolder = true;
@@ -157,19 +157,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
157 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); 157 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword);
158 158
159 // Create base folder 159 // Create base folder
160 InventoryFolderBase f1 160 InventoryFolderBase f1
161 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1", true); 161 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1", true);
162 162
163 // Create item1 163 // Create item1
164 SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Dog Object", 0x5); 164 SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Dog Object", 0x5);
165 InventoryItemBase i1 = UserInventoryHelpers.AddInventoryItem(m_scene, so1, 0x50, 0x60, "f1"); 165 InventoryItemBase i1 = UserInventoryHelpers.AddInventoryItem(m_scene, so1, 0x50, 0x60, "f1");
166 166
167 // Create embedded folder 167 // Create embedded folder
168 InventoryFolderBase f1_1 168 InventoryFolderBase f1_1
169 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1/f1.1", true); 169 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1/f1.1", true);
170 170
171 // Create embedded item 171 // Create embedded item
172 SceneObjectGroup so1_1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Cat Object", 0x6); 172 SceneObjectGroup so1_1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Cat Object", 0x6);
173 InventoryItemBase i2 = UserInventoryHelpers.AddInventoryItem(m_scene, so1_1, 0x500, 0x600, "f1/f1.1"); 173 InventoryItemBase i2 = UserInventoryHelpers.AddInventoryItem(m_scene, so1_1, 0x500, 0x600, "f1/f1.1");
174 174
175 MemoryStream archiveWriteStream = new MemoryStream(); 175 MemoryStream archiveWriteStream = new MemoryStream();
@@ -188,18 +188,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
188// InventoryArchiveUtils. 188// InventoryArchiveUtils.
189 bool gotf1 = false, gotf1_1 = false, gotso1 = false, gotso2 = false; 189 bool gotf1 = false, gotf1_1 = false, gotso1 = false, gotso2 = false;
190 190
191 string f1FileName 191 string f1FileName
192 = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1)); 192 = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1));
193 string f1_1FileName 193 string f1_1FileName
194 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1_1)); 194 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1_1));
195 string so1FileName 195 string so1FileName
196 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i1)); 196 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i1));
197 string so2FileName 197 string so2FileName
198 = string.Format("{0}{1}", f1_1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i2)); 198 = string.Format("{0}{1}", f1_1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i2));
199 199
200 string filePath; 200 string filePath;
201 TarArchiveReader.TarEntryType tarEntryType; 201 TarArchiveReader.TarEntryType tarEntryType;
202 202
203 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 203 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
204 { 204 {
205// Console.WriteLine("Got {0}", filePath); 205// Console.WriteLine("Got {0}", filePath);
@@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
222 222
223 // TODO: Test presence of more files and contents of files. 223 // TODO: Test presence of more files and contents of files.
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
227 /// Test saving a single inventory item to an IAR 227 /// Test saving a single inventory item to an IAR
228 /// (subject to change since there is no fixed format yet). 228 /// (subject to change since there is no fixed format yet).
@@ -239,10 +239,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
239 string userPassword = "troll"; 239 string userPassword = "troll";
240 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 240 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
241 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); 241 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword);
242 242
243 // Create asset 243 // Create asset
244 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); 244 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
245 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "My Little Dog Object", 0x50); 245 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "My Little Dog Object", 0x50);
246 246
247 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 247 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
248 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 248 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
@@ -255,7 +255,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
255 item1.Name = item1Name; 255 item1.Name = item1Name;
256 item1.AssetID = asset1.FullID; 256 item1.AssetID = asset1.FullID;
257 item1.ID = item1Id; 257 item1.ID = item1Id;
258 InventoryFolderBase objsFolder 258 InventoryFolderBase objsFolder
259 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, userId, "Objects")[0]; 259 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, userId, "Objects")[0];
260 item1.Folder = objsFolder.ID; 260 item1.Folder = objsFolder.ID;
261 m_scene.AddInventoryItem(item1); 261 m_scene.AddInventoryItem(item1);
@@ -285,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
285 TarArchiveReader.TarEntryType tarEntryType; 285 TarArchiveReader.TarEntryType tarEntryType;
286 286
287// Console.WriteLine("Reading archive"); 287// Console.WriteLine("Reading archive");
288 288
289 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 289 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
290 { 290 {
291 Console.WriteLine("Got {0}", filePath); 291 Console.WriteLine("Got {0}", filePath);
@@ -294,7 +294,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
294// { 294// {
295// gotControlFile = true; 295// gotControlFile = true;
296// } 296// }
297 297
298 if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml")) 298 if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml"))
299 { 299 {
300// string fileName = filePath.Remove(0, "Objects/".Length); 300// string fileName = filePath.Remove(0, "Objects/".Length);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index 519c697..0b65829 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -49,35 +49,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
49 public class InventoryArchiveTestCase : OpenSimTestCase 49 public class InventoryArchiveTestCase : OpenSimTestCase
50 { 50 {
51 protected ManualResetEvent mre = new ManualResetEvent(false); 51 protected ManualResetEvent mre = new ManualResetEvent(false);
52 52
53 /// <summary> 53 /// <summary>
54 /// A raw array of bytes that we'll use to create an IAR memory stream suitable for isolated use in each test. 54 /// A raw array of bytes that we'll use to create an IAR memory stream suitable for isolated use in each test.
55 /// </summary> 55 /// </summary>
56 protected byte[] m_iarStreamBytes; 56 protected byte[] m_iarStreamBytes;
57 57
58 /// <summary> 58 /// <summary>
59 /// Stream of data representing a common IAR for load tests. 59 /// Stream of data representing a common IAR for load tests.
60 /// </summary> 60 /// </summary>
61 protected MemoryStream m_iarStream; 61 protected MemoryStream m_iarStream;
62 62
63 protected UserAccount m_uaMT 63 protected UserAccount m_uaMT
64 = new UserAccount { 64 = new UserAccount {
65 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), 65 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"),
66 FirstName = "Mr", 66 FirstName = "Mr",
67 LastName = "Tiddles" }; 67 LastName = "Tiddles" };
68 68
69 protected UserAccount m_uaLL1 69 protected UserAccount m_uaLL1
70 = new UserAccount { 70 = new UserAccount {
71 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), 71 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"),
72 FirstName = "Lord", 72 FirstName = "Lord",
73 LastName = "Lucan" }; 73 LastName = "Lucan" };
74 74
75 protected UserAccount m_uaLL2 75 protected UserAccount m_uaLL2
76 = new UserAccount { 76 = new UserAccount {
77 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), 77 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"),
78 FirstName = "Lord", 78 FirstName = "Lord",
79 LastName = "Lucan" }; 79 LastName = "Lucan" };
80 80
81 protected string m_item1Name = "Ray Gun Item"; 81 protected string m_item1Name = "Ray Gun Item";
82 protected string m_coaItemName = "Coalesced Item"; 82 protected string m_coaItemName = "Coalesced Item";
83 83
@@ -105,72 +105,72 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
105 base.SetUp(); 105 base.SetUp();
106 m_iarStream = new MemoryStream(m_iarStreamBytes); 106 m_iarStream = new MemoryStream(m_iarStreamBytes);
107 } 107 }
108 108
109 protected void ConstructDefaultIarBytesForTestLoad() 109 protected void ConstructDefaultIarBytesForTestLoad()
110 { 110 {
111// log4net.Config.XmlConfigurator.Configure(); 111// log4net.Config.XmlConfigurator.Configure();
112 112
113 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 113 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
114 Scene scene = new SceneHelpers().SetupScene(); 114 Scene scene = new SceneHelpers().SetupScene();
115 SceneHelpers.SetupSceneModules(scene, archiverModule); 115 SceneHelpers.SetupSceneModules(scene, archiverModule);
116 116
117 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); 117 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
118 118
119 MemoryStream archiveWriteStream = new MemoryStream(); 119 MemoryStream archiveWriteStream = new MemoryStream();
120 120
121 // Create scene object asset 121 // Create scene object asset
122 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); 122 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
123 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50); 123 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50);
124 124
125 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 125 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
126 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 126 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
127 scene.AssetService.Store(asset1); 127 scene.AssetService.Store(asset1);
128 128
129 // Create scene object item 129 // Create scene object item
130 InventoryItemBase item1 = new InventoryItemBase(); 130 InventoryItemBase item1 = new InventoryItemBase();
131 item1.Name = m_item1Name; 131 item1.Name = m_item1Name;
132 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); 132 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
133 item1.AssetID = asset1.FullID; 133 item1.AssetID = asset1.FullID;
134 item1.GroupID = UUID.Random(); 134 item1.GroupID = UUID.Random();
135 item1.CreatorId = m_uaLL1.PrincipalID.ToString(); 135 item1.CreatorId = m_uaLL1.PrincipalID.ToString();
136 item1.Owner = m_uaLL1.PrincipalID; 136 item1.Owner = m_uaLL1.PrincipalID;
137 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 137 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
138 scene.AddInventoryItem(item1); 138 scene.AddInventoryItem(item1);
139 139
140 // Create coalesced objects asset 140 // Create coalesced objects asset
141 SceneObjectGroup cobj1 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120); 141 SceneObjectGroup cobj1 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120);
142 cobj1.AbsolutePosition = new Vector3(15, 30, 45); 142 cobj1.AbsolutePosition = new Vector3(15, 30, 45);
143 143
144 SceneObjectGroup cobj2 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140); 144 SceneObjectGroup cobj2 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140);
145 cobj2.AbsolutePosition = new Vector3(25, 50, 75); 145 cobj2.AbsolutePosition = new Vector3(25, 50, 75);
146 146
147 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2); 147 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2);
148 148
149 AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa); 149 AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa);
150 scene.AssetService.Store(coaAsset); 150 scene.AssetService.Store(coaAsset);
151 151
152 // Create coalesced objects inventory item 152 // Create coalesced objects inventory item
153 InventoryItemBase coaItem = new InventoryItemBase(); 153 InventoryItemBase coaItem = new InventoryItemBase();
154 coaItem.Name = m_coaItemName; 154 coaItem.Name = m_coaItemName;
155 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); 155 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180");
156 coaItem.AssetID = coaAsset.FullID; 156 coaItem.AssetID = coaAsset.FullID;
157 coaItem.GroupID = UUID.Random(); 157 coaItem.GroupID = UUID.Random();
158 coaItem.CreatorId = m_uaLL1.PrincipalID.ToString(); 158 coaItem.CreatorId = m_uaLL1.PrincipalID.ToString();
159 coaItem.Owner = m_uaLL1.PrincipalID; 159 coaItem.Owner = m_uaLL1.PrincipalID;
160 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 160 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
161 scene.AddInventoryItem(coaItem); 161 scene.AddInventoryItem(coaItem);
162 162
163 archiverModule.ArchiveInventory( 163 archiverModule.ArchiveInventory(
164 UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); 164 UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream);
165 165
166 m_iarStreamBytes = archiveWriteStream.ToArray(); 166 m_iarStreamBytes = archiveWriteStream.ToArray();
167 } 167 }
168 168
169 protected void SaveCompleted( 169 protected void SaveCompleted(
170 UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, 170 UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
171 Exception reportedException, int SaveCount, int FilterCount) 171 Exception reportedException, int SaveCount, int FilterCount)
172 { 172 {
173 mre.Set(); 173 mre.Set();
174 } 174 }
175 } 175 }
176} \ No newline at end of file 176} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 46da5a9..5d7f25c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -149,10 +149,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
149 private void OnInstantMessage(IClientAPI client, GridInstantMessage im) 149 private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
150 { 150 {
151// m_log.DebugFormat( 151// m_log.DebugFormat(
152// "[INVENTORY TRANSFER]: {0} IM type received from client {1}. From={2} ({3}), To={4}", 152// "[INVENTORY TRANSFER]: {0} IM type received from client {1}. From={2} ({3}), To={4}",
153// (InstantMessageDialog)im.dialog, client.Name, 153// (InstantMessageDialog)im.dialog, client.Name,
154// im.fromAgentID, im.fromAgentName, im.toAgentID); 154// im.fromAgentID, im.fromAgentName, im.toAgentID);
155 155
156 Scene scene = FindClientScene(client.AgentId); 156 Scene scene = FindClientScene(client.AgentId);
157 157
158 if (scene == null) // Something seriously wrong here. 158 if (scene == null) // Something seriously wrong here.
@@ -164,31 +164,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
164 164
165 if (im.binaryBucket.Length < 17) // Invalid 165 if (im.binaryBucket.Length < 17) // Invalid
166 return; 166 return;
167 167
168 UUID recipientID = new UUID(im.toAgentID); 168 UUID recipientID = new UUID(im.toAgentID);
169 ScenePresence user = scene.GetScenePresence(recipientID); 169 ScenePresence user = scene.GetScenePresence(recipientID);
170 UUID copyID; 170 UUID copyID;
171 171
172 // First byte is the asset type 172 // First byte is the asset type
173 AssetType assetType = (AssetType)im.binaryBucket[0]; 173 AssetType assetType = (AssetType)im.binaryBucket[0];
174 174
175 if (AssetType.Folder == assetType) 175 if (AssetType.Folder == assetType)
176 { 176 {
177 UUID folderID = new UUID(im.binaryBucket, 1); 177 UUID folderID = new UUID(im.binaryBucket, 1);
178 178
179 m_log.DebugFormat( 179 m_log.DebugFormat(
180 "[INVENTORY TRANSFER]: Inserting original folder {0} into agent {1}'s inventory", 180 "[INVENTORY TRANSFER]: Inserting original folder {0} into agent {1}'s inventory",
181 folderID, new UUID(im.toAgentID)); 181 folderID, new UUID(im.toAgentID));
182 182
183 InventoryFolderBase folderCopy 183 InventoryFolderBase folderCopy
184 = scene.GiveInventoryFolder(client, recipientID, client.AgentId, folderID, UUID.Zero); 184 = scene.GiveInventoryFolder(client, recipientID, client.AgentId, folderID, UUID.Zero);
185 185
186 if (folderCopy == null) 186 if (folderCopy == null)
187 { 187 {
188 client.SendAgentAlertMessage("Can't find folder to give. Nothing given.", false); 188 client.SendAgentAlertMessage("Can't find folder to give. Nothing given.", false);
189 return; 189 return;
190 } 190 }
191 191
192 // The outgoing binary bucket should contain only the byte which signals an asset folder is 192 // The outgoing binary bucket should contain only the byte which signals an asset folder is
193 // being copied and the following bytes for the copied folder's UUID 193 // being copied and the following bytes for the copied folder's UUID
194 copyID = folderCopy.ID; 194 copyID = folderCopy.ID;
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
196 im.binaryBucket = new byte[1 + copyIDBytes.Length]; 196 im.binaryBucket = new byte[1 + copyIDBytes.Length];
197 im.binaryBucket[0] = (byte)AssetType.Folder; 197 im.binaryBucket[0] = (byte)AssetType.Folder;
198 Array.Copy(copyIDBytes, 0, im.binaryBucket, 1, copyIDBytes.Length); 198 Array.Copy(copyIDBytes, 0, im.binaryBucket, 1, copyIDBytes.Length);
199 199
200 if (user != null) 200 if (user != null)
201 user.ControllingClient.SendBulkUpdateInventory(folderCopy); 201 user.ControllingClient.SendBulkUpdateInventory(folderCopy);
202 202
@@ -225,10 +225,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
225 client.SendAgentAlertMessage(message, false); 225 client.SendAgentAlertMessage(message, false);
226 return; 226 return;
227 } 227 }
228 228
229 copyID = itemCopy.ID; 229 copyID = itemCopy.ID;
230 Array.Copy(copyID.GetBytes(), 0, im.binaryBucket, 1, 16); 230 Array.Copy(copyID.GetBytes(), 0, im.binaryBucket, 1, 16);
231 231
232 if (user != null) 232 if (user != null)
233 user.ControllingClient.SendBulkUpdateInventory(itemCopy); 233 user.ControllingClient.SendBulkUpdateInventory(itemCopy);
234 234
@@ -253,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
253 else 253 else
254 { 254 {
255 if (m_TransferModule != null) 255 if (m_TransferModule != null)
256 m_TransferModule.SendInstantMessage(im, delegate(bool success) 256 m_TransferModule.SendInstantMessage(im, delegate(bool success)
257 { 257 {
258 if (!success) 258 if (!success)
259 client.SendAlertMessage("User not online. Inventory has been saved"); 259 client.SendAlertMessage("User not online. Inventory has been saved");
@@ -308,8 +308,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
308 } 308 }
309 309
310 // XXX: This code was placed here to try and accomodate RLV which moves given folders named #RLV/~<name> 310 // XXX: This code was placed here to try and accomodate RLV which moves given folders named #RLV/~<name>
311 // to the requested folder, which in this case is #RLV. However, it is the viewer that appears to be 311 // to the requested folder, which in this case is #RLV. However, it is the viewer that appears to be
312 // response from renaming the #RLV/~example folder to ~example. For some reason this is not yet 312 // response from renaming the #RLV/~example folder to ~example. For some reason this is not yet
313 // happening, possibly because we are not sending the correct inventory update messages with the correct 313 // happening, possibly because we are not sending the correct inventory update messages with the correct
314 // transaction IDs 314 // transaction IDs
315 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) 315 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
@@ -380,7 +380,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
380 InventoryItemBase item = invService.GetItem(client.AgentId, inventoryID); 380 InventoryItemBase item = invService.GetItem(client.AgentId, inventoryID);
381 InventoryFolderBase folder = null; 381 InventoryFolderBase folder = null;
382 UUID? previousParentFolderID = null; 382 UUID? previousParentFolderID = null;
383 383
384 if (item != null && trashFolder != null) 384 if (item != null && trashFolder != null)
385 { 385 {
386 previousParentFolderID = item.Folder; 386 previousParentFolderID = item.Folder;
@@ -404,18 +404,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
404 client.SendBulkUpdateInventory(folder); 404 client.SendBulkUpdateInventory(folder);
405 } 405 }
406 } 406 }
407 407
408 if ((null == item && null == folder) | null == trashFolder) 408 if ((null == item && null == folder) | null == trashFolder)
409 { 409 {
410 string reason = String.Empty; 410 string reason = String.Empty;
411 411
412 if (trashFolder == null) 412 if (trashFolder == null)
413 reason += " Trash folder not found."; 413 reason += " Trash folder not found.";
414 if (item == null) 414 if (item == null)
415 reason += " Item not found."; 415 reason += " Item not found.";
416 if (folder == null) 416 if (folder == null)
417 reason += " Folder not found."; 417 reason += " Folder not found.";
418 418
419 client.SendAgentAlertMessage("Unable to delete "+ 419 client.SendAgentAlertMessage("Unable to delete "+
420 "received inventory" + reason, false); 420 "received inventory" + reason, false);
421 } 421 }
@@ -471,12 +471,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
471 { 471 {
472 if (im.binaryBucket.Length < 17) // Invalid 472 if (im.binaryBucket.Length < 17) // Invalid
473 return; 473 return;
474 474
475 UUID recipientID = new UUID(im.toAgentID); 475 UUID recipientID = new UUID(im.toAgentID);
476 476
477 // First byte is the asset type 477 // First byte is the asset type
478 AssetType assetType = (AssetType)im.binaryBucket[0]; 478 AssetType assetType = (AssetType)im.binaryBucket[0];
479 479
480 if (AssetType.Folder == assetType) 480 if (AssetType.Folder == assetType)
481 { 481 {
482 UUID folderID = new UUID(im.binaryBucket, 1); 482 UUID folderID = new UUID(im.binaryBucket, 1);
@@ -505,12 +505,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
505 { 505 {
506 if (im.binaryBucket.Length < 1) // Invalid 506 if (im.binaryBucket.Length < 1) // Invalid
507 return; 507 return;
508 508
509 UUID recipientID = new UUID(im.toAgentID); 509 UUID recipientID = new UUID(im.toAgentID);
510 510
511 // Bucket is the asset type 511 // Bucket is the asset type
512 AssetType assetType = (AssetType)im.binaryBucket[0]; 512 AssetType assetType = (AssetType)im.binaryBucket[0];
513 513
514 if (AssetType.Folder == assetType) 514 if (AssetType.Folder == assetType)
515 { 515 {
516 UUID folderID = new UUID(im.imSessionID); 516 UUID folderID = new UUID(im.imSessionID);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs
index 7ddc396..82ed091 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs
@@ -44,9 +44,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
44{ 44{
45 [TestFixture] 45 [TestFixture]
46 public class InventoryTransferModuleTests : OpenSimTestCase 46 public class InventoryTransferModuleTests : OpenSimTestCase
47 { 47 {
48 protected TestScene m_scene; 48 protected TestScene m_scene;
49 49
50 [SetUp] 50 [SetUp]
51 public override void SetUp() 51 public override void SetUp()
52 { 52 {
@@ -56,9 +56,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
56 config.AddConfig("Messaging"); 56 config.AddConfig("Messaging");
57 config.Configs["Messaging"].Set("InventoryTransferModule", "InventoryTransferModule"); 57 config.Configs["Messaging"].Set("InventoryTransferModule", "InventoryTransferModule");
58 58
59 m_scene = new SceneHelpers().SetupScene(); 59 m_scene = new SceneHelpers().SetupScene();
60 SceneHelpers.SetupSceneModules(m_scene, config, new InventoryTransferModule()); 60 SceneHelpers.SetupSceneModules(m_scene, config, new InventoryTransferModule());
61 } 61 }
62 62
63 [Test] 63 [Test]
64 public void TestAcceptGivenItem() 64 public void TestAcceptGivenItem()
@@ -69,9 +69,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
69 UUID itemId = TestHelpers.ParseTail(0x100); 69 UUID itemId = TestHelpers.ParseTail(0x100);
70 UUID assetId = TestHelpers.ParseTail(0x200); 70 UUID assetId = TestHelpers.ParseTail(0x200);
71 71
72 UserAccount ua1 72 UserAccount ua1
73 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 73 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
74 UserAccount ua2 74 UserAccount ua2
75 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 75 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
76 76
77 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 77 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
81 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 81 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
82 82
83 // Create the object to test give 83 // Create the object to test give
84 InventoryItemBase originalItem 84 InventoryItemBase originalItem
85 = UserInventoryHelpers.CreateInventoryItem( 85 = UserInventoryHelpers.CreateInventoryItem(
86 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object); 86 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object);
87 87
@@ -89,35 +89,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
89 byte[] itemIdBytes = itemId.GetBytes(); 89 byte[] itemIdBytes = itemId.GetBytes();
90 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 90 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
91 91
92 GridInstantMessage giveIm 92 GridInstantMessage giveIm
93 = new GridInstantMessage( 93 = new GridInstantMessage(
94 m_scene, 94 m_scene,
95 giverSp.UUID, 95 giverSp.UUID,
96 giverSp.Name, 96 giverSp.Name,
97 receiverSp.UUID, 97 receiverSp.UUID,
98 (byte)InstantMessageDialog.InventoryOffered, 98 (byte)InstantMessageDialog.InventoryOffered,
99 false, 99 false,
100 "inventory offered msg", 100 "inventory offered msg",
101 initialSessionId, 101 initialSessionId,
102 false, 102 false,
103 Vector3.Zero, 103 Vector3.Zero,
104 giveImBinaryBucket, 104 giveImBinaryBucket,
105 true); 105 true);
106 106
107 giverClient.HandleImprovedInstantMessage(giveIm); 107 giverClient.HandleImprovedInstantMessage(giveIm);
108 108
109 // These details might not all be correct. 109 // These details might not all be correct.
110 GridInstantMessage acceptIm 110 GridInstantMessage acceptIm
111 = new GridInstantMessage( 111 = new GridInstantMessage(
112 m_scene, 112 m_scene,
113 receiverSp.UUID, 113 receiverSp.UUID,
114 receiverSp.Name, 114 receiverSp.Name,
115 giverSp.UUID, 115 giverSp.UUID,
116 (byte)InstantMessageDialog.InventoryAccepted, 116 (byte)InstantMessageDialog.InventoryAccepted,
117 false, 117 false,
118 "inventory accepted msg", 118 "inventory accepted msg",
119 initialSessionId, 119 initialSessionId,
120 false, 120 false,
121 Vector3.Zero, 121 Vector3.Zero,
122 null, 122 null,
123 true); 123 true);
@@ -133,7 +133,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
133 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID)); 133 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID));
134 134
135 // Test for item successfully making it into the receiver's inventory 135 // Test for item successfully making it into the receiver's inventory
136 InventoryItemBase receivedItem 136 InventoryItemBase receivedItem
137 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Objects/givenObj"); 137 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Objects/givenObj");
138 138
139 Assert.That(receivedItem, Is.Not.Null); 139 Assert.That(receivedItem, Is.Not.Null);
@@ -148,7 +148,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
148 Assert.That(originalItemAfterDelete, Is.Not.Null); 148 Assert.That(originalItemAfterDelete, Is.Not.Null);
149 149
150 // TODO: Test scenario where giver deletes their item first. 150 // TODO: Test scenario where giver deletes their item first.
151 } 151 }
152 152
153 /// <summary> 153 /// <summary>
154 /// Test user rejection of a given item. 154 /// Test user rejection of a given item.
@@ -165,9 +165,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
165 UUID itemId = TestHelpers.ParseTail(0x100); 165 UUID itemId = TestHelpers.ParseTail(0x100);
166 UUID assetId = TestHelpers.ParseTail(0x200); 166 UUID assetId = TestHelpers.ParseTail(0x200);
167 167
168 UserAccount ua1 168 UserAccount ua1
169 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 169 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
170 UserAccount ua2 170 UserAccount ua2
171 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 171 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
172 172
173 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 173 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
177 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 177 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
178 178
179 // Create the object to test give 179 // Create the object to test give
180 InventoryItemBase originalItem 180 InventoryItemBase originalItem
181 = UserInventoryHelpers.CreateInventoryItem( 181 = UserInventoryHelpers.CreateInventoryItem(
182 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object); 182 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object);
183 183
@@ -188,36 +188,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
188 byte[] itemIdBytes = itemId.GetBytes(); 188 byte[] itemIdBytes = itemId.GetBytes();
189 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 189 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
190 190
191 GridInstantMessage giveIm 191 GridInstantMessage giveIm
192 = new GridInstantMessage( 192 = new GridInstantMessage(
193 m_scene, 193 m_scene,
194 giverSp.UUID, 194 giverSp.UUID,
195 giverSp.Name, 195 giverSp.Name,
196 receiverSp.UUID, 196 receiverSp.UUID,
197 (byte)InstantMessageDialog.InventoryOffered, 197 (byte)InstantMessageDialog.InventoryOffered,
198 false, 198 false,
199 "inventory offered msg", 199 "inventory offered msg",
200 initialSessionId, 200 initialSessionId,
201 false, 201 false,
202 Vector3.Zero, 202 Vector3.Zero,
203 giveImBinaryBucket, 203 giveImBinaryBucket,
204 true); 204 true);
205 205
206 giverClient.HandleImprovedInstantMessage(giveIm); 206 giverClient.HandleImprovedInstantMessage(giveIm);
207 207
208 // These details might not all be correct. 208 // These details might not all be correct.
209 // Session ID is now the created item ID (!) 209 // Session ID is now the created item ID (!)
210 GridInstantMessage rejectIm 210 GridInstantMessage rejectIm
211 = new GridInstantMessage( 211 = new GridInstantMessage(
212 m_scene, 212 m_scene,
213 receiverSp.UUID, 213 receiverSp.UUID,
214 receiverSp.Name, 214 receiverSp.Name,
215 giverSp.UUID, 215 giverSp.UUID,
216 (byte)InstantMessageDialog.InventoryDeclined, 216 (byte)InstantMessageDialog.InventoryDeclined,
217 false, 217 false,
218 "inventory declined msg", 218 "inventory declined msg",
219 new UUID(receivedIm.imSessionID), 219 new UUID(receivedIm.imSessionID),
220 false, 220 false,
221 Vector3.Zero, 221 Vector3.Zero,
222 null, 222 null,
223 true); 223 true);
@@ -233,7 +233,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
233 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID)); 233 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID));
234 234
235 // Test for item successfully making it into the receiver's inventory 235 // Test for item successfully making it into the receiver's inventory
236 InventoryItemBase receivedItem 236 InventoryItemBase receivedItem
237 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Trash/givenObj"); 237 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Trash/givenObj");
238 238
239 InventoryFolderBase trashFolder 239 InventoryFolderBase trashFolder
@@ -250,7 +250,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
250 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, giverSp.UUID, "Objects/givenObj"); 250 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, giverSp.UUID, "Objects/givenObj");
251 251
252 Assert.That(originalItemAfterDelete, Is.Not.Null); 252 Assert.That(originalItemAfterDelete, Is.Not.Null);
253 } 253 }
254 254
255 [Test] 255 [Test]
256 public void TestAcceptGivenFolder() 256 public void TestAcceptGivenFolder()
@@ -261,9 +261,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
261 UUID initialSessionId = TestHelpers.ParseTail(0x10); 261 UUID initialSessionId = TestHelpers.ParseTail(0x10);
262 UUID folderId = TestHelpers.ParseTail(0x100); 262 UUID folderId = TestHelpers.ParseTail(0x100);
263 263
264 UserAccount ua1 264 UserAccount ua1
265 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 265 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
266 UserAccount ua2 266 UserAccount ua2
267 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 267 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
268 268
269 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 269 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
272 ScenePresence receiverSp = SceneHelpers.AddScenePresence(m_scene, ua2); 272 ScenePresence receiverSp = SceneHelpers.AddScenePresence(m_scene, ua2);
273 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 273 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
274 274
275 InventoryFolderBase originalFolder 275 InventoryFolderBase originalFolder
276 = UserInventoryHelpers.CreateInventoryFolder( 276 = UserInventoryHelpers.CreateInventoryFolder(
277 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true); 277 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true);
278 278
@@ -281,35 +281,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
281 byte[] itemIdBytes = folderId.GetBytes(); 281 byte[] itemIdBytes = folderId.GetBytes();
282 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 282 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
283 283
284 GridInstantMessage giveIm 284 GridInstantMessage giveIm
285 = new GridInstantMessage( 285 = new GridInstantMessage(
286 m_scene, 286 m_scene,
287 giverSp.UUID, 287 giverSp.UUID,
288 giverSp.Name, 288 giverSp.Name,
289 receiverSp.UUID, 289 receiverSp.UUID,
290 (byte)InstantMessageDialog.InventoryOffered, 290 (byte)InstantMessageDialog.InventoryOffered,
291 false, 291 false,
292 "inventory offered msg", 292 "inventory offered msg",
293 initialSessionId, 293 initialSessionId,
294 false, 294 false,
295 Vector3.Zero, 295 Vector3.Zero,
296 giveImBinaryBucket, 296 giveImBinaryBucket,
297 true); 297 true);
298 298
299 giverClient.HandleImprovedInstantMessage(giveIm); 299 giverClient.HandleImprovedInstantMessage(giveIm);
300 300
301 // These details might not all be correct. 301 // These details might not all be correct.
302 GridInstantMessage acceptIm 302 GridInstantMessage acceptIm
303 = new GridInstantMessage( 303 = new GridInstantMessage(
304 m_scene, 304 m_scene,
305 receiverSp.UUID, 305 receiverSp.UUID,
306 receiverSp.Name, 306 receiverSp.Name,
307 giverSp.UUID, 307 giverSp.UUID,
308 (byte)InstantMessageDialog.InventoryAccepted, 308 (byte)InstantMessageDialog.InventoryAccepted,
309 false, 309 false,
310 "inventory accepted msg", 310 "inventory accepted msg",
311 initialSessionId, 311 initialSessionId,
312 false, 312 false,
313 Vector3.Zero, 313 Vector3.Zero,
314 null, 314 null,
315 true); 315 true);
@@ -325,7 +325,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
325 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID)); 325 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID));
326 326
327 // Test for item successfully making it into the receiver's inventory 327 // Test for item successfully making it into the receiver's inventory
328 InventoryFolderBase receivedFolder 328 InventoryFolderBase receivedFolder
329 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "f1"); 329 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "f1");
330 330
331 Assert.That(receivedFolder, Is.Not.Null); 331 Assert.That(receivedFolder, Is.Not.Null);
@@ -340,7 +340,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
340 Assert.That(originalFolderAfterDelete, Is.Not.Null); 340 Assert.That(originalFolderAfterDelete, Is.Not.Null);
341 341
342 // TODO: Test scenario where giver deletes their item first. 342 // TODO: Test scenario where giver deletes their item first.
343 } 343 }
344 344
345 /// <summary> 345 /// <summary>
346 /// Test user rejection of a given item. 346 /// Test user rejection of a given item.
@@ -357,9 +357,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
357 UUID initialSessionId = TestHelpers.ParseTail(0x10); 357 UUID initialSessionId = TestHelpers.ParseTail(0x10);
358 UUID folderId = TestHelpers.ParseTail(0x100); 358 UUID folderId = TestHelpers.ParseTail(0x100);
359 359
360 UserAccount ua1 360 UserAccount ua1
361 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 361 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
362 UserAccount ua2 362 UserAccount ua2
363 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 363 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
364 364
365 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 365 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -369,7 +369,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
369 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 369 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
370 370
371 // Create the folder to test give 371 // Create the folder to test give
372 InventoryFolderBase originalFolder 372 InventoryFolderBase originalFolder
373 = UserInventoryHelpers.CreateInventoryFolder( 373 = UserInventoryHelpers.CreateInventoryFolder(
374 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true); 374 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true);
375 375
@@ -381,36 +381,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
381 byte[] itemIdBytes = folderId.GetBytes(); 381 byte[] itemIdBytes = folderId.GetBytes();
382 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 382 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
383 383
384 GridInstantMessage giveIm 384 GridInstantMessage giveIm
385 = new GridInstantMessage( 385 = new GridInstantMessage(
386 m_scene, 386 m_scene,
387 giverSp.UUID, 387 giverSp.UUID,
388 giverSp.Name, 388 giverSp.Name,
389 receiverSp.UUID, 389 receiverSp.UUID,
390 (byte)InstantMessageDialog.InventoryOffered, 390 (byte)InstantMessageDialog.InventoryOffered,
391 false, 391 false,
392 "inventory offered msg", 392 "inventory offered msg",
393 initialSessionId, 393 initialSessionId,
394 false, 394 false,
395 Vector3.Zero, 395 Vector3.Zero,
396 giveImBinaryBucket, 396 giveImBinaryBucket,
397 true); 397 true);
398 398
399 giverClient.HandleImprovedInstantMessage(giveIm); 399 giverClient.HandleImprovedInstantMessage(giveIm);
400 400
401 // These details might not all be correct. 401 // These details might not all be correct.
402 // Session ID is now the created item ID (!) 402 // Session ID is now the created item ID (!)
403 GridInstantMessage rejectIm 403 GridInstantMessage rejectIm
404 = new GridInstantMessage( 404 = new GridInstantMessage(
405 m_scene, 405 m_scene,
406 receiverSp.UUID, 406 receiverSp.UUID,
407 receiverSp.Name, 407 receiverSp.Name,
408 giverSp.UUID, 408 giverSp.UUID,
409 (byte)InstantMessageDialog.InventoryDeclined, 409 (byte)InstantMessageDialog.InventoryDeclined,
410 false, 410 false,
411 "inventory declined msg", 411 "inventory declined msg",
412 new UUID(receivedIm.imSessionID), 412 new UUID(receivedIm.imSessionID),
413 false, 413 false,
414 Vector3.Zero, 414 Vector3.Zero,
415 null, 415 null,
416 true); 416 true);
@@ -426,7 +426,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
426 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID)); 426 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID));
427 427
428 // Test for folder successfully making it into the receiver's inventory 428 // Test for folder successfully making it into the receiver's inventory
429 InventoryFolderBase receivedFolder 429 InventoryFolderBase receivedFolder
430 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "Trash/f1"); 430 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "Trash/f1");
431 431
432 InventoryFolderBase trashFolder 432 InventoryFolderBase trashFolder
@@ -443,6 +443,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
443 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, giverSp.UUID, "f1"); 443 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, giverSp.UUID, "f1");
444 444
445 Assert.That(originalFolderAfterDelete, Is.Not.Null); 445 Assert.That(originalFolderAfterDelete, Is.Not.Null);
446 } 446 }
447 } 447 }
448} \ No newline at end of file 448} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
index 24286a4..10781e9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
65 { 65 {
66 m_Enabled = true; 66 m_Enabled = true;
67 67
68 m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", 68 m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI",
69 new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty); 69 new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty);
70 // Legacy. Remove soon! 70 // Legacy. Remove soon!
71 m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); 71 m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL);
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
154 154
155 void OnIncomingInstantMessage(GridInstantMessage im) 155 void OnIncomingInstantMessage(GridInstantMessage im)
156 { 156 {
157 if (im.dialog == (byte)InstantMessageDialog.RequestTeleport 157 if (im.dialog == (byte)InstantMessageDialog.RequestTeleport
158 || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport) 158 || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport)
159 { 159 {
160 UUID sessionID = new UUID(im.imSessionID); 160 UUID sessionID = new UUID(im.imSessionID);
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
195 195
196 m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message); 196 m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message);
197 m_PendingLures.Add(sessionID, m, 7200); // 2 hours 197 m_PendingLures.Add(sessionID, m, 7200); // 2 hours
198 198
199 if (m_TransferModule != null) 199 if (m_TransferModule != null)
200 { 200 {
201 m_TransferModule.SendInstantMessage(m, 201 m_TransferModule.SendInstantMessage(m,
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
index 0b1dbc7..1e1caca 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
68 { 68 {
69 if (!m_Enabled) 69 if (!m_Enabled)
70 return; 70 return;
71 71
72 lock (m_Scenes) 72 lock (m_Scenes)
73 { 73 {
74 if (!m_Scenes.Contains(scene)) 74 if (!m_Scenes.Contains(scene))
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index df5265c..138c0f7 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
85 /// <value> 85 /// <value>
86 /// The configuration 86 /// The configuration
87 /// </value> 87 /// </value>
88 public IConfigSource Config 88 public IConfigSource Config
89 { 89 {
90 get; 90 get;
91 set; 91 set;
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
97 /// <value> 97 /// <value>
98 /// The profile server URI. 98 /// The profile server URI.
99 /// </value> 99 /// </value>
100 public string ProfileServerUri 100 public string ProfileServerUri
101 { 101 {
102 get; 102 get;
103 set; 103 set;
@@ -120,13 +120,13 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
120 /// <value> 120 /// <value>
121 /// <c>true</c> if enabled; otherwise, <c>false</c>. 121 /// <c>true</c> if enabled; otherwise, <c>false</c>.
122 /// </value> 122 /// </value>
123 public bool Enabled 123 public bool Enabled
124 { 124 {
125 get; 125 get;
126 set; 126 set;
127 } 127 }
128 128
129 public string MyGatekeeper 129 public string MyGatekeeper
130 { 130 {
131 get; private set; 131 get; private set;
132 } 132 }
@@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
135 /// <summary> 135 /// <summary>
136 /// This is called to initialize the region module. For shared modules, this is called exactly once, after 136 /// This is called to initialize the region module. For shared modules, this is called exactly once, after
137 /// creating the single (shared) instance. For non-shared modules, this is called once on each instance, after 137 /// creating the single (shared) instance. For non-shared modules, this is called once on each instance, after
138 /// the instace for the region has been created. 138 /// the instace for the region has been created.
139 /// </summary> 139 /// </summary>
140 /// <param name='source'> 140 /// <param name='source'>
141 /// Source. 141 /// Source.
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
162 Enabled = false; 162 Enabled = false;
163 return; 163 return;
164 } 164 }
165 165
166 m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs); 166 m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs);
167 167
168 m_log.Debug("[PROFILES]: Full Profiles Enabled"); 168 m_log.Debug("[PROFILES]: Full Profiles Enabled");
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
212 /// This will be called once for every scene loaded. In a shared module this will be multiple times in one 212 /// This will be called once for every scene loaded. In a shared module this will be multiple times in one
213 /// instance, while a nonshared module instance will only be called once. This method is called after AddRegion 213 /// instance, while a nonshared module instance will only be called once. This method is called after AddRegion
214 /// has been called in all modules for that scene, providing an opportunity to request another module's 214 /// has been called in all modules for that scene, providing an opportunity to request another module's
215 /// interface, or hook an event from another module. 215 /// interface, or hook an event from another module.
216 /// </summary> 216 /// </summary>
217 /// <param name='scene'> 217 /// <param name='scene'>
218 /// Scene. 218 /// Scene.
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
230 /// module has registered the interface by then, this module will be activated, else it will remain inactive, 230 /// module has registered the interface by then, this module will be activated, else it will remain inactive,
231 /// letting the other module take over. This should return non-null ONLY in modules that are intended to be 231 /// letting the other module take over. This should return non-null ONLY in modules that are intended to be
232 /// easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party 232 /// easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party
233 /// provided modules. 233 /// provided modules.
234 /// </summary> 234 /// </summary>
235 /// <value> 235 /// <value>
236 /// The replaceable interface. 236 /// The replaceable interface.
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
248 } 248 }
249 249
250 /// <value> 250 /// <value>
251 /// The name of the module 251 /// The name of the module
252 /// </value> 252 /// </value>
253 /// <summary> 253 /// <summary>
254 /// Gets the module name. 254 /// Gets the module name.
@@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
451 } 451 }
452 452
453 public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient) 453 public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient)
454 { 454 {
455 UUID target = remoteClient.AgentId; 455 UUID target = remoteClient.AgentId;
456 UserClassifiedAdd ad = new UserClassifiedAdd(); 456 UserClassifiedAdd ad = new UserClassifiedAdd();
457 ad.ClassifiedId = queryClassifiedID; 457 ad.ClassifiedId = queryClassifiedID;
@@ -459,7 +459,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
459 lock (m_classifiedCache) 459 lock (m_classifiedCache)
460 { 460 {
461 if (m_classifiedCache.ContainsKey(queryClassifiedID)) 461 if (m_classifiedCache.ContainsKey(queryClassifiedID))
462 { 462 {
463 target = m_classifiedCache[queryClassifiedID]; 463 target = m_classifiedCache[queryClassifiedID];
464 464
465 m_classifiedInterest[queryClassifiedID] --; 465 m_classifiedInterest[queryClassifiedID] --;
@@ -870,7 +870,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
870 870
871 string theirGatekeeperURI; 871 string theirGatekeeperURI;
872 GetUserGatekeeperURI(targetID, out theirGatekeeperURI); 872 GetUserGatekeeperURI(targetID, out theirGatekeeperURI);
873 873
874 object Pick = (object)pick; 874 object Pick = (object)pick;
875 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) { 875 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) {
876 remoteClient.SendAgentAlertMessage ( 876 remoteClient.SendAgentAlertMessage (
@@ -880,11 +880,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
880 pick = (UserProfilePick)Pick; 880 pick = (UserProfilePick)Pick;
881 if(foreign) 881 if(foreign)
882 cacheForeignImage(targetID, pick.SnapshotId); 882 cacheForeignImage(targetID, pick.SnapshotId);
883 883
884 Vector3 globalPos = new Vector3(Vector3.Zero); 884 Vector3 globalPos = new Vector3(Vector3.Zero);
885 Vector3.TryParse(pick.GlobalPos, out globalPos); 885 Vector3.TryParse(pick.GlobalPos, out globalPos);
886 886
887 if (!string.IsNullOrWhiteSpace(MyGatekeeper) && pick.Gatekeeper != MyGatekeeper) 887 if (!string.IsNullOrWhiteSpace(MyGatekeeper) && pick.Gatekeeper != MyGatekeeper)
888 { 888 {
889 // Setup the illusion 889 // Setup the illusion
890 string region = string.Format("{0} {1}",pick.Gatekeeper,pick.SimName); 890 string region = string.Format("{0} {1}",pick.Gatekeeper,pick.SimName);
@@ -896,7 +896,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
896 } 896 }
897 else 897 else
898 { 898 {
899 // we have a proxy on map 899 // we have a proxy on map
900 ulong oriHandle; 900 ulong oriHandle;
901 uint oriX; 901 uint oriX;
902 uint oriY; 902 uint oriY;
@@ -909,7 +909,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
909 } 909 }
910 else 910 else
911 { 911 {
912 // this is a fail on large regions 912 // this is a fail on large regions
913 uint gtmp = (uint)globalPos.X >> 8; 913 uint gtmp = (uint)globalPos.X >> 8;
914 globalPos.X -= (gtmp << 8); 914 globalPos.X -= (gtmp << 8);
915 915
@@ -975,7 +975,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
975 /// Enabled. 975 /// Enabled.
976 /// </param> 976 /// </param>
977 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) 977 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled)
978 { 978 {
979 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); 979 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString());
980 980
981 UserProfilePick pick = new UserProfilePick(); 981 UserProfilePick pick = new UserProfilePick();
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1012 else 1012 else
1013 { 1013 {
1014 m_log.WarnFormat( 1014 m_log.WarnFormat(
1015 "[PROFILES]: PickInfoUpdate found no parcel info at {0},{1} in {2}", 1015 "[PROFILES]: PickInfoUpdate found no parcel info at {0},{1} in {2}",
1016 avaPos.X, avaPos.Y, p.Scene.Name); 1016 avaPos.X, avaPos.Y, p.Scene.Name);
1017 } 1017 }
1018 1018
@@ -1146,7 +1146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1146 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); 1146 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
1147 return; 1147 return;
1148 } 1148 }
1149 note = (UserProfileNotes) Note; 1149 note = (UserProfileNotes) Note;
1150 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); 1150 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
1151 } 1151 }
1152 1152
@@ -1225,10 +1225,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1225 { 1225 {
1226 m_log.InfoFormat("[PROFILES]: UserPreferences update error"); 1226 m_log.InfoFormat("[PROFILES]: UserPreferences update error");
1227 remoteClient.SendAgentAlertMessage("Error updating preferences", false); 1227 remoteClient.SendAgentAlertMessage("Error updating preferences", false);
1228 return; 1228 return;
1229 } 1229 }
1230 } 1230 }
1231 1231
1232 /// <summary> 1232 /// <summary>
1233 /// Users the preferences request. 1233 /// Users the preferences request.
1234 /// </summary> 1234 /// </summary>
@@ -1256,7 +1256,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1256 pref = (UserPreferences) Pref; 1256 pref = (UserPreferences) Pref;
1257 1257
1258 remoteClient.SendUserInfoReply(pref.IMViaEmail, pref.Visible, pref.EMail); 1258 remoteClient.SendUserInfoReply(pref.IMViaEmail, pref.Visible, pref.EMail);
1259 1259
1260 } 1260 }
1261 #endregion User Preferences 1261 #endregion User Preferences
1262 1262
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1437 { 1437 {
1438 props.AboutText ="Profile not available at this time. User may still be unknown to this grid"; 1438 props.AboutText ="Profile not available at this time. User may still be unknown to this grid";
1439 } 1439 }
1440 1440
1441 if(!m_allowUserProfileWebURLs) 1441 if(!m_allowUserProfileWebURLs)
1442 props.WebUrl =""; 1442 props.WebUrl ="";
1443 1443
@@ -1568,7 +1568,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1568 { 1568 {
1569 m_log.Debug( 1569 m_log.Debug(
1570 string.Format( 1570 string.Format(
1571 "[PROFILES]: Request using the OpenProfile API for user {0} to {1} failed", 1571 "[PROFILES]: Request using the OpenProfile API for user {0} to {1} failed",
1572 properties.UserId, serverURI), 1572 properties.UserId, serverURI),
1573 e); 1573 e);
1574 1574
@@ -1586,7 +1586,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1586 return false; 1586 return false;
1587 } 1587 }
1588 } 1588 }
1589 1589
1590 properties = (UserProfileProperties)Prop; 1590 properties = (UserProfileProperties)Prop;
1591 if(foreign) 1591 if(foreign)
1592 { 1592 {
@@ -1704,7 +1704,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1704 { 1704 {
1705 bool local; 1705 bool local;
1706 local = UserManagementModule.IsLocalGridUser(userID); 1706 local = UserManagementModule.IsLocalGridUser(userID);
1707 1707
1708 if (!local) 1708 if (!local)
1709 { 1709 {
1710 serverURI = UserManagementModule.GetUserServerURL(userID, "GatekeeperURI"); 1710 serverURI = UserManagementModule.GetUserServerURL(userID, "GatekeeperURI");
@@ -1761,13 +1761,13 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1761 1761
1762 string imageIDstr = imageID.ToString(); 1762 string imageIDstr = imageID.ToString();
1763 1763
1764 1764
1765 if(m_assetCache != null && m_assetCache.Check(imageIDstr)) 1765 if(m_assetCache != null && m_assetCache.Check(imageIDstr))
1766 return; 1766 return;
1767 1767
1768 if(Scene.AssetService.Get(imageIDstr) != null) 1768 if(Scene.AssetService.Get(imageIDstr) != null)
1769 return; 1769 return;
1770 1770
1771 Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, imageIDstr)); 1771 Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, imageIDstr));
1772 } 1772 }
1773 1773
@@ -1876,7 +1876,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1876 1876
1877 if (mret.ContainsKey("error")) 1877 if (mret.ContainsKey("error"))
1878 return false; 1878 return false;
1879 1879
1880 // get params... 1880 // get params...
1881 OSD.DeserializeMembers(ref parameters, (OSDMap) mret["result"]); 1881 OSD.DeserializeMembers(ref parameters, (OSDMap) mret["result"]);
1882 return true; 1882 return true;
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
index 386694a..292099d 100644
--- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
@@ -47,23 +47,23 @@ namespace OpenSim.Region.CoreModules.Framework
47{ 47{
48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")]
49 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule 49 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n"; 53 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n";
54 54
55 protected Scene m_scene; 55 protected Scene m_scene;
56 56
57 /// <summary> 57 /// <summary>
58 /// Each agent has its own capabilities handler. 58 /// Each agent has its own capabilities handler.
59 /// </summary> 59 /// </summary>
60 protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>(); 60 protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>();
61 61
62 protected Dictionary<UUID, string> m_capsPaths = new Dictionary<UUID, string>(); 62 protected Dictionary<UUID, string> m_capsPaths = new Dictionary<UUID, string>();
63 63
64 protected Dictionary<UUID, Dictionary<ulong, string>> m_childrenSeeds 64 protected Dictionary<UUID, Dictionary<ulong, string>> m_childrenSeeds
65 = new Dictionary<UUID, Dictionary<ulong, string>>(); 65 = new Dictionary<UUID, Dictionary<ulong, string>>();
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 } 69 }
@@ -101,16 +101,16 @@ namespace OpenSim.Region.CoreModules.Framework
101 { 101 {
102 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); 102 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
103 } 103 }
104 104
105 public void PostInitialise() 105 public void PostInitialise()
106 { 106 {
107 } 107 }
108 108
109 public void Close() {} 109 public void Close() {}
110 110
111 public string Name 111 public string Name
112 { 112 {
113 get { return "Capabilities Module"; } 113 get { return "Capabilities Module"; }
114 } 114 }
115 115
116 public Type ReplaceableInterface 116 public Type ReplaceableInterface
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Framework
154 // new object created below 154 // new object created below
155 oldCaps.DeregisterHandlers(); 155 oldCaps.DeregisterHandlers();
156 156
157 // Better safe ... should not be needed but also 157 // Better safe ... should not be needed but also
158 // no big deal 158 // no big deal
159 m_capsObjects.Remove(circuitCode); 159 m_capsObjects.Remove(circuitCode);
160 } 160 }
@@ -215,7 +215,7 @@ namespace OpenSim.Region.CoreModules.Framework
215 } 215 }
216 } 216 }
217 } 217 }
218 218
219 public Caps GetCapsForUser(uint circuitCode) 219 public Caps GetCapsForUser(uint circuitCode)
220 { 220 {
221 lock (m_capsObjects) 221 lock (m_capsObjects)
@@ -225,10 +225,10 @@ namespace OpenSim.Region.CoreModules.Framework
225 return m_capsObjects[circuitCode]; 225 return m_capsObjects[circuitCode];
226 } 226 }
227 } 227 }
228 228
229 return null; 229 return null;
230 } 230 }
231 231
232 public void ActivateCaps(uint circuitCode) 232 public void ActivateCaps(uint circuitCode)
233 { 233 {
234 lock (m_capsObjects) 234 lock (m_capsObjects)
@@ -246,10 +246,10 @@ namespace OpenSim.Region.CoreModules.Framework
246 m_capsPaths[agent.AgentID] = agent.CapsPath; 246 m_capsPaths[agent.AgentID] = agent.CapsPath;
247 247
248 lock (m_childrenSeeds) 248 lock (m_childrenSeeds)
249 m_childrenSeeds[agent.AgentID] 249 m_childrenSeeds[agent.AgentID]
250 = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds); 250 = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds);
251 } 251 }
252 252
253 public string GetCapsPath(UUID agentId) 253 public string GetCapsPath(UUID agentId)
254 { 254 {
255 lock (m_capsPaths) 255 lock (m_capsPaths)
@@ -262,7 +262,7 @@ namespace OpenSim.Region.CoreModules.Framework
262 262
263 return null; 263 return null;
264 } 264 }
265 265
266 public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID) 266 public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID)
267 { 267 {
268 Dictionary<ulong, string> seeds = null; 268 Dictionary<ulong, string> seeds = null;
@@ -414,8 +414,8 @@ namespace OpenSim.Region.CoreModules.Framework
414 { 414 {
415 receivedStats[sp.Name] = reqHandler.RequestsReceived; 415 receivedStats[sp.Name] = reqHandler.RequestsReceived;
416 handledStats[sp.Name] = reqHandler.RequestsHandled; 416 handledStats[sp.Name] = reqHandler.RequestsHandled;
417 } 417 }
418 else 418 else
419 { 419 {
420 PollServiceEventArgs pollHandler = null; 420 PollServiceEventArgs pollHandler = null;
421 if (caps.TryGetPollHandler(capName, out pollHandler)) 421 if (caps.TryGetPollHandler(capName, out pollHandler))
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Framework
454 Caps caps = m_scene.CapsModule.GetCapsForUser(sp.UUID); 454 Caps caps = m_scene.CapsModule.GetCapsForUser(sp.UUID);
455 455
456 if (caps == null) 456 if (caps == null)
457 return; 457 return;
458 458
459 foreach (IRequestHandler reqHandler in caps.CapsHandlers.GetCapsHandlers().Values) 459 foreach (IRequestHandler reqHandler in caps.CapsHandlers.GetCapsHandlers().Values)
460 { 460 {
@@ -490,7 +490,7 @@ namespace OpenSim.Region.CoreModules.Framework
490 } 490 }
491 } 491 }
492 ); 492 );
493 493
494 foreach (KeyValuePair<string, int> kvp in receivedStats.OrderByDescending(kp => kp.Value)) 494 foreach (KeyValuePair<string, int> kvp in receivedStats.OrderByDescending(kp => kp.Value))
495 cdt.AddRow(kvp.Key, kvp.Value, handledStats[kvp.Key]); 495 cdt.AddRow(kvp.Key, kvp.Value, handledStats[kvp.Key]);
496 496
@@ -559,7 +559,7 @@ namespace OpenSim.Region.CoreModules.Framework
559 capRows.Add(new CapTableRow(kvp.Key, kvp.Value.RequestsReceived, kvp.Value.RequestsHandled)); 559 capRows.Add(new CapTableRow(kvp.Key, kvp.Value.RequestsReceived, kvp.Value.RequestsHandled));
560 560
561 foreach (CapTableRow ctr in capRows.OrderByDescending(ctr => ctr.RequestsReceived)) 561 foreach (CapTableRow ctr in capRows.OrderByDescending(ctr => ctr.RequestsReceived))
562 cdt.AddRow(ctr.Name, ctr.RequestsReceived, ctr.RequestsHandled); 562 cdt.AddRow(ctr.Name, ctr.RequestsReceived, ctr.RequestsHandled);
563 563
564 sb.Append(cdt.ToString()); 564 sb.Append(cdt.ToString());
565 */ 565 */
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Framework
601 totalRequestsReceived += handler.RequestsReceived; 601 totalRequestsReceived += handler.RequestsReceived;
602 totalRequestsHandled += handler.RequestsHandled; 602 totalRequestsHandled += handler.RequestsHandled;
603 } 603 }
604 604
605 cdt.AddRow(sp.Name, sp.IsChildAgent ? "child" : "root", totalRequestsReceived, totalRequestsHandled); 605 cdt.AddRow(sp.Name, sp.IsChildAgent ? "child" : "root", totalRequestsReceived, totalRequestsHandled);
606 } 606 }
607 ); 607 );
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index 0c632b1..d652f43 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -53,12 +53,12 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
53 53
54 protected Scene m_scene; 54 protected Scene m_scene;
55 protected IDialogModule m_dialogMod; 55 protected IDialogModule m_dialogMod;
56 56
57 public string Name { get { return "DAExample Module"; } } 57 public string Name { get { return "DAExample Module"; } }
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) {} 60 public void Initialise(IConfigSource source) {}
61 61
62 public void AddRegion(Scene scene) 62 public void AddRegion(Scene scene)
63 { 63 {
64 if (ENABLED) 64 if (ENABLED)
@@ -70,22 +70,22 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
70 m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name); 70 m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name);
71 } 71 }
72 } 72 }
73 73
74 public void RemoveRegion(Scene scene) 74 public void RemoveRegion(Scene scene)
75 { 75 {
76 if (ENABLED) 76 if (ENABLED)
77 { 77 {
78 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; 78 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
79 } 79 }
80 } 80 }
81 81
82 public void RegionLoaded(Scene scene) {} 82 public void RegionLoaded(Scene scene) {}
83 83
84 public void Close() 84 public void Close()
85 { 85 {
86 RemoveRegion(m_scene); 86 RemoveRegion(m_scene);
87 } 87 }
88 88
89 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) 89 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
90 { 90 {
91 OSDMap attrs = null; 91 OSDMap attrs = null;
@@ -96,28 +96,28 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
96 96
97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs)) 97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs))
98 attrs = new OSDMap(); 98 attrs = new OSDMap();
99 99
100 OSDInteger newValue; 100 OSDInteger newValue;
101 101
102 // We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code. 102 // We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code.
103 lock (sop.DynAttrs) 103 lock (sop.DynAttrs)
104 { 104 {
105 if (!attrs.ContainsKey("moves")) 105 if (!attrs.ContainsKey("moves"))
106 newValue = new OSDInteger(1); 106 newValue = new OSDInteger(1);
107 else 107 else
108 newValue = new OSDInteger(attrs["moves"].AsInteger() + 1); 108 newValue = new OSDInteger(attrs["moves"].AsInteger() + 1);
109 109
110 attrs["moves"] = newValue; 110 attrs["moves"] = newValue;
111 111
112 sop.DynAttrs.SetStore(Namespace, StoreName, attrs); 112 sop.DynAttrs.SetStore(Namespace, StoreName, attrs);
113 } 113 }
114 114
115 sop.ParentGroup.HasGroupChanged = true; 115 sop.ParentGroup.HasGroupChanged = true;
116 116
117 string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue); 117 string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue);
118 m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg); 118 m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg);
119 m_dialogMod.SendGeneralAlert(msg); 119 m_dialogMod.SendGeneralAlert(msg);
120 120
121 return true; 121 return true;
122 } 122 }
123 } 123 }
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
index 166a994..3364cbc 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
@@ -65,11 +65,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
65 private Scene m_scene; 65 private Scene m_scene;
66 private IDialogModule m_dialogMod; 66 private IDialogModule m_dialogMod;
67 67
68 public string Name { get { return "DO"; } } 68 public string Name { get { return "DO"; } }
69 public Type ReplaceableInterface { get { return null; } } 69 public Type ReplaceableInterface { get { return null; } }
70 70
71 public void Initialise(IConfigSource source) {} 71 public void Initialise(IConfigSource source) {}
72 72
73 public void AddRegion(Scene scene) 73 public void AddRegion(Scene scene)
74 { 74 {
75 if (ENABLED) 75 if (ENABLED)
@@ -80,18 +80,18 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
80 m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>(); 80 m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
81 } 81 }
82 } 82 }
83 83
84 public void RemoveRegion(Scene scene) 84 public void RemoveRegion(Scene scene)
85 { 85 {
86 if (ENABLED) 86 if (ENABLED)
87 { 87 {
88 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; 88 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
89 } 89 }
90 } 90 }
91 91
92 public void RegionLoaded(Scene scene) {} 92 public void RegionLoaded(Scene scene) {}
93 93
94 public void Close() 94 public void Close()
95 { 95 {
96 RemoveRegion(m_scene); 96 RemoveRegion(m_scene);
97 } 97 }
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
116 116
117 rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar)); 117 rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar));
118 } 118 }
119 119
120 private bool OnSceneGroupMove(UUID groupId, Vector3 delta) 120 private bool OnSceneGroupMove(UUID groupId, Vector3 delta)
121 { 121 {
122 SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId); 122 SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId);
@@ -129,11 +129,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
129 if (rawObj != null) 129 if (rawObj != null)
130 { 130 {
131 MyObject myObj = (MyObject)rawObj; 131 MyObject myObj = (MyObject)rawObj;
132 132
133 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves)); 133 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves));
134 } 134 }
135 135
136 return true; 136 return true;
137 } 137 }
138 } 138 }
139} \ No newline at end of file 139} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 58d6cf2..6b1eb54 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -72,9 +72,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
72 /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests. 72 /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests.
73 /// </summary> 73 /// </summary>
74 /// <remarks> 74 /// <remarks>
75 /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a 75 /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a
76 /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the 76 /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the
77 /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport 77 /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport
78 /// cancellation consistently suceed. 78 /// cancellation consistently suceed.
79 /// </remarks> 79 /// </remarks>
80 public bool DisableInterRegionTeleportCancellation { get; set; } 80 public bool DisableInterRegionTeleportCancellation { get; set; }
@@ -221,12 +221,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
221 IConfig transferConfig = source.Configs["EntityTransfer"]; 221 IConfig transferConfig = source.Configs["EntityTransfer"];
222 if (transferConfig != null) 222 if (transferConfig != null)
223 { 223 {
224 DisableInterRegionTeleportCancellation 224 DisableInterRegionTeleportCancellation
225 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); 225 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
226 226
227 WaitForAgentArrivedAtDestination 227 WaitForAgentArrivedAtDestination
228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); 228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault);
229 229
230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance); 230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance);
231 } 231 }
232 else 232 else
@@ -250,7 +250,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
250 250
251 Scene = scene; 251 Scene = scene;
252 252
253 m_interRegionTeleportAttempts = 253 m_interRegionTeleportAttempts =
254 new Stat( 254 new Stat(
255 "InterRegionTeleportAttempts", 255 "InterRegionTeleportAttempts",
256 "Number of inter-region teleports attempted.", 256 "Number of inter-region teleports attempted.",
@@ -263,7 +263,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
263 null, 263 null,
264 StatVerbosity.Debug); 264 StatVerbosity.Debug);
265 265
266 m_interRegionTeleportAborts = 266 m_interRegionTeleportAborts =
267 new Stat( 267 new Stat(
268 "InterRegionTeleportAborts", 268 "InterRegionTeleportAborts",
269 "Number of inter-region teleports aborted due to client actions.", 269 "Number of inter-region teleports aborted due to client actions.",
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
275 null, 275 null,
276 StatVerbosity.Debug); 276 StatVerbosity.Debug);
277 277
278 m_interRegionTeleportCancels = 278 m_interRegionTeleportCancels =
279 new Stat( 279 new Stat(
280 "InterRegionTeleportCancels", 280 "InterRegionTeleportCancels",
281 "Number of inter-region teleports cancelled by the client.", 281 "Number of inter-region teleports cancelled by the client.",
@@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
287 null, 287 null,
288 StatVerbosity.Debug); 288 StatVerbosity.Debug);
289 289
290 m_interRegionTeleportFailures = 290 m_interRegionTeleportFailures =
291 new Stat( 291 new Stat(
292 "InterRegionTeleportFailures", 292 "InterRegionTeleportFailures",
293 "Number of inter-region teleports that failed due to server/client/network issues.", 293 "Number of inter-region teleports that failed due to server/client/network issues.",
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
321 321
322 public virtual void Close() {} 322 public virtual void Close() {}
323 323
324 public virtual void RemoveRegion(Scene scene) 324 public virtual void RemoveRegion(Scene scene)
325 { 325 {
326 if (m_Enabled) 326 if (m_Enabled)
327 { 327 {
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
349 if (client.IsLoggingOut && m_entityTransferStateMachine.UpdateInTransit(client.AgentId, AgentTransferState.Aborting)) 349 if (client.IsLoggingOut && m_entityTransferStateMachine.UpdateInTransit(client.AgentId, AgentTransferState.Aborting))
350 { 350 {
351 m_log.DebugFormat( 351 m_log.DebugFormat(
352 "[ENTITY TRANSFER MODULE]: Aborted teleport request from {0} in {1} due to simultaneous logout", 352 "[ENTITY TRANSFER MODULE]: Aborted teleport request from {0} in {1} due to simultaneous logout",
353 client.Name, Scene.Name); 353 client.Name, Scene.Name);
354 } 354 }
355 } 355 }
@@ -672,7 +672,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
672 sp.ControllingClient.SendTeleportFailed("Agent is already in transit."); 672 sp.ControllingClient.SendTeleportFailed("Agent is already in transit.");
673 return; 673 return;
674 } 674 }
675 675
676 try 676 try
677 { 677 {
678 DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags); 678 DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags);
@@ -766,7 +766,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
766 m_interRegionTeleportAttempts.Value++; 766 m_interRegionTeleportAttempts.Value++;
767 767
768 m_log.DebugFormat( 768 m_log.DebugFormat(
769 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}", 769 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}",
770 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion); 770 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion);
771 771
772 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from 772 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
@@ -797,7 +797,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
797 AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo(); 797 AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo();
798 agentCircuit.startpos = position; 798 agentCircuit.startpos = position;
799 agentCircuit.child = true; 799 agentCircuit.child = true;
800 800
801// agentCircuit.Appearance = sp.Appearance; 801// agentCircuit.Appearance = sp.Appearance;
802// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false); 802// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false);
803 agentCircuit.Appearance = new AvatarAppearance(); 803 agentCircuit.Appearance = new AvatarAppearance();
@@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
814 } 814 }
815 815
816 IClientIPEndpoint ipepClient; 816 IClientIPEndpoint ipepClient;
817 817
818 uint newRegionX, newRegionY, oldRegionX, oldRegionY; 818 uint newRegionX, newRegionY, oldRegionX, oldRegionY;
819 Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY); 819 Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY);
820 Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY); 820 Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY);
@@ -853,7 +853,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
853 if (ctx.OutboundVersion >= 0.2f) 853 if (ctx.OutboundVersion >= 0.2f)
854 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason); 854 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason);
855 else 855 else
856 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason); 856 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason);
857 } 857 }
858 858
859 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 859 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
@@ -863,12 +863,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
863 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 863 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
864 864
865 m_log.DebugFormat( 865 m_log.DebugFormat(
866 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}", 866 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}",
867 sp.Name, Scene.Name, finalDestination.RegionName); 867 sp.Name, Scene.Name, finalDestination.RegionName);
868 868
869 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 869 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
870 870
871 // Let's create an agent there if one doesn't exist yet. 871 // Let's create an agent there if one doesn't exist yet.
872 // NOTE: logout will always be false for a non-HG teleport. 872 // NOTE: logout will always be false for a non-HG teleport.
873 bool logout = false; 873 bool logout = false;
874 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout)) 874 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout))
@@ -953,7 +953,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
953 SetCallbackURL(agent, sp.Scene.RegionInfo); 953 SetCallbackURL(agent, sp.Scene.RegionInfo);
954 954
955 955
956 // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to 956 // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to
957 // establish th econnection to the destination which makes it return true. 957 // establish th econnection to the destination which makes it return true.
958 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) 958 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
959 { 959 {
@@ -966,7 +966,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
966 return; 966 return;
967 } 967 }
968 968
969 // A common teleport failure occurs when we can send CreateAgent to the 969 // A common teleport failure occurs when we can send CreateAgent to the
970 // destination region but the viewer cannot establish the connection (e.g. due to network issues between 970 // destination region but the viewer cannot establish the connection (e.g. due to network issues between
971 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then 971 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then
972 // there's a further 10 second wait whilst we attempt to tell the destination to delete the agent in Fail(). 972 // there's a further 10 second wait whilst we attempt to tell the destination to delete the agent in Fail().
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1010 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 1010 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
1011 1011
1012 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, 1012 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator,
1013 // where that neighbour simulator could otherwise request a child agent create on the source which then 1013 // where that neighbour simulator could otherwise request a child agent create on the source which then
1014 // closes our existing agent which is still signalled as root. 1014 // closes our existing agent which is still signalled as root.
1015 sp.IsChildAgent = true; 1015 sp.IsChildAgent = true;
1016 1016
@@ -1071,7 +1071,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1071 AgentHasMovedAway(sp, logout); 1071 AgentHasMovedAway(sp, logout);
1072 1072
1073 sp.HasMovedAway(!(OutSideViewRange || logout)); 1073 sp.HasMovedAway(!(OutSideViewRange || logout));
1074 1074
1075// ulong sourceRegionHandle = sp.RegionHandle; 1075// ulong sourceRegionHandle = sp.RegionHandle;
1076 1076
1077 // Now let's make it officially a child agent 1077 // Now let's make it officially a child agent
@@ -1107,7 +1107,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1107 1107
1108 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);; 1108 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);;
1109 1109
1110 // Let's create an agent there if one doesn't exist yet. 1110 // Let's create an agent there if one doesn't exist yet.
1111 // NOTE: logout will always be false for a non-HG teleport. 1111 // NOTE: logout will always be false for a non-HG teleport.
1112 bool logout = false; 1112 bool logout = false;
1113 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout)) 1113 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout))
@@ -1150,7 +1150,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1150 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); 1150 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
1151 1151
1152 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, 1152 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator,
1153 // where that neighbour simulator could otherwise request a child agent create on the source which then 1153 // where that neighbour simulator could otherwise request a child agent create on the source which then
1154 // closes our existing agent which is still signalled as root. 1154 // closes our existing agent which is still signalled as root.
1155 //sp.IsChildAgent = true; 1155 //sp.IsChildAgent = true;
1156 1156
@@ -1166,7 +1166,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1166 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", 1166 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}",
1167 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 1167 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
1168 1168
1169 // Let's send a full update of the agent. 1169 // Let's send a full update of the agent.
1170 AgentData agent = new AgentData(); 1170 AgentData agent = new AgentData();
1171 sp.CopyTo(agent,false); 1171 sp.CopyTo(agent,false);
1172 agent.Position = agentCircuit.startpos; 1172 agent.Position = agentCircuit.startpos;
@@ -1207,7 +1207,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1207 sp.IsInTransit = false; 1207 sp.IsInTransit = false;
1208 return; 1208 return;
1209 } 1209 }
1210 1210
1211 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 1211 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
1212 1212
1213 // Need to signal neighbours whether child agents may need closing irrespective of whether this 1213 // Need to signal neighbours whether child agents may need closing irrespective of whether this
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1248// Thread.Sleep(1000); 1248// Thread.Sleep(1000);
1249 1249
1250 // OK, it got this agent. Let's close everything 1250 // OK, it got this agent. Let's close everything
1251 // If we shouldn't close the agent due to some other region renewing the connection 1251 // If we shouldn't close the agent due to some other region renewing the connection
1252 // then this will be handled in IncomingCloseAgent under lock conditions 1252 // then this will be handled in IncomingCloseAgent under lock conditions
1253 m_log.DebugFormat( 1253 m_log.DebugFormat(
1254 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); 1254 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
@@ -1258,7 +1258,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1258/* 1258/*
1259 else 1259 else
1260 { 1260 {
1261 // now we have a child agent in this region. 1261 // now we have a child agent in this region.
1262 sp.Reset(); 1262 sp.Reset();
1263 } 1263 }
1264 */ 1264 */
@@ -1343,7 +1343,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1343 /// </summary> 1343 /// </summary>
1344 /// <param name='sp'></param> 1344 /// <param name='sp'></param>
1345 /// <param name='logout'></param> 1345 /// <param name='logout'></param>
1346 /// 1346 ///
1347 /// now just a HG hook 1347 /// now just a HG hook
1348 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout) 1348 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout)
1349 { 1349 {
@@ -1375,7 +1375,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1375 1375
1376 // HG Hook 1376 // HG Hook
1377 protected virtual bool NeedsClosing(GridRegion reg, bool OutViewRange) 1377 protected virtual bool NeedsClosing(GridRegion reg, bool OutViewRange)
1378 1378
1379 { 1379 {
1380 return OutViewRange; 1380 return OutViewRange;
1381 } 1381 }
@@ -1399,11 +1399,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1399 remoteClient.SendTeleportFailed("The teleport destination could not be found."); 1399 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
1400 return; 1400 return;
1401 } 1401 }
1402 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position, 1402 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position,
1403 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); 1403 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
1404 } 1404 }
1405 1405
1406 #endregion 1406 #endregion
1407 1407
1408 #region Teleport Home 1408 #region Teleport Home
1409 1409
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1437 client.SendTeleportFailed("Your home region could not be found."); 1437 client.SendTeleportFailed("Your home region could not be found.");
1438 return false; 1438 return false;
1439 } 1439 }
1440 1440
1441 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", 1441 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})",
1442 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY); 1442 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY);
1443 1443
@@ -1475,7 +1475,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1475 1475
1476 Scene ascene = agent.Scene; 1476 Scene ascene = agent.Scene;
1477 string homeURI = ascene.GetAgentHomeURI(agentID); 1477 string homeURI = ascene.GetAgentHomeURI(agentID);
1478 1478
1479 1479
1480 if (!ascene.SimulationService.QueryAccess(destiny, agentID, homeURI, false, position, 1480 if (!ascene.SimulationService.QueryAccess(destiny, agentID, homeURI, false, position,
1481 agent.Scene.GetFormatsOffered(), ctx, out reason)) 1481 agent.Scene.GetFormatsOffered(), ctx, out reason))
@@ -1489,7 +1489,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1489 1489
1490 // Given a position relative to the current region and outside of it 1490 // Given a position relative to the current region and outside of it
1491 // find the new region that the point is actually in. 1491 // find the new region that the point is actually in.
1492 // returns 'null' if new region not found or if information 1492 // returns 'null' if new region not found or if information
1493 // and new position relative to it 1493 // and new position relative to it
1494 // now only works for crossings 1494 // now only works for crossings
1495 1495
@@ -1611,14 +1611,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1611 Thread.Sleep(10000); 1611 Thread.Sleep(10000);
1612 1612
1613 m_log.DebugFormat( 1613 m_log.DebugFormat(
1614 "[ENTITY TRANSFER MODULE]: Auto-reteleporting {0} to correct megaregion location {1},{2},{3} from {4}", 1614 "[ENTITY TRANSFER MODULE]: Auto-reteleporting {0} to correct megaregion location {1},{2},{3} from {4}",
1615 agent.Name, regionX, regionY, position, initiatingScene.Name); 1615 agent.Name, regionX, regionY, position, initiatingScene.Name);
1616 1616
1617 agent.Scene.RequestTeleportLocation( 1617 agent.Scene.RequestTeleportLocation(
1618 agent.ControllingClient, 1618 agent.ControllingClient,
1619 Util.RegionGridLocToHandle(regionX, regionY), 1619 Util.RegionGridLocToHandle(regionX, regionY),
1620 position, 1620 position,
1621 agent.Lookat, 1621 agent.Lookat,
1622 (uint)Constants.TeleportFlags.ViaLocation); 1622 (uint)Constants.TeleportFlags.ViaLocation);
1623 1623
1624 /* 1624 /*
@@ -1662,7 +1662,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1662 icon.EndInvoke(iar); 1662 icon.EndInvoke(iar);
1663 } 1663 }
1664 1664
1665 1665
1666 1666
1667 /// <summary> 1667 /// <summary>
1668 /// This Closes child agents on neighbouring regions 1668 /// This Closes child agents on neighbouring regions
@@ -1708,7 +1708,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1708 int ts = Util.EnvironmentTickCount(); 1708 int ts = Util.EnvironmentTickCount();
1709 try 1709 try
1710 { 1710 {
1711 AgentData cAgent = new AgentData(); 1711 AgentData cAgent = new AgentData();
1712 agent.CopyTo(cAgent,true); 1712 agent.CopyTo(cAgent,true);
1713 1713
1714// agent.Appearance.WearableCacheItems = null; 1714// agent.Appearance.WearableCacheItems = null;
@@ -1731,7 +1731,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1731 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); 1731 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
1732 1732
1733 m_log.WarnFormat( 1733 m_log.WarnFormat(
1734 "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.", 1734 "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.",
1735 neighbourRegion.RegionName, agent.Name); 1735 neighbourRegion.RegionName, agent.Name);
1736 1736
1737 ReInstantiateScripts(agent); 1737 ReInstantiateScripts(agent);
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1827 1827
1828 return; 1828 return;
1829 } 1829 }
1830 1830
1831 private void CrossAgentToNewRegionCompleted(IAsyncResult iar) 1831 private void CrossAgentToNewRegionCompleted(IAsyncResult iar)
1832 { 1832 {
1833 CrossAgentToNewRegionDelegate icon = (CrossAgentToNewRegionDelegate)iar.AsyncState; 1833 CrossAgentToNewRegionDelegate icon = (CrossAgentToNewRegionDelegate)iar.AsyncState;
@@ -2167,7 +2167,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2167 return false; 2167 return false;
2168 } 2168 }
2169 } 2169 }
2170 2170
2171 private void DoExpiration() 2171 private void DoExpiration()
2172 { 2172 {
2173 List<ulong> m_toRemove = new List<ulong>();; 2173 List<ulong> m_toRemove = new List<ulong>();;
@@ -2179,7 +2179,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2179 if (kvp.Value < now) 2179 if (kvp.Value < now)
2180 m_toRemove.Add(kvp.Key); 2180 m_toRemove.Add(kvp.Key);
2181 } 2181 }
2182 2182
2183 if (m_toRemove.Count > 0) 2183 if (m_toRemove.Count > 0)
2184 { 2184 {
2185 foreach (ulong u in m_toRemove) 2185 foreach (ulong u in m_toRemove)
@@ -2199,7 +2199,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2199 // to find possible regions. 2199 // to find possible regions.
2200 return GetRegionContainingWorldLocation(pGridService, pScopeID, px, py, Constants.MaximumRegionSize); 2200 return GetRegionContainingWorldLocation(pGridService, pScopeID, px, py, Constants.MaximumRegionSize);
2201 } 2201 }
2202 2202
2203 // Given a world position, get the GridRegion info for 2203 // Given a world position, get the GridRegion info for
2204 // the region containing that point. 2204 // the region containing that point.
2205 // for compatibility with old grids it does a scan to find large regions 2205 // for compatibility with old grids it does a scan to find large regions
@@ -2285,7 +2285,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2285 if (newAgent) 2285 if (newAgent)
2286 { 2286 {
2287 // we may already had lost this sp 2287 // we may already had lost this sp
2288 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened 2288 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2289 return; 2289 return;
2290 2290
2291 Scene scene = sp.Scene; 2291 Scene scene = sp.Scene;
@@ -2303,13 +2303,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2303 2303
2304 if (regionAccepted) 2304 if (regionAccepted)
2305 { 2305 {
2306 // give time for createAgent to finish, since it is async and does grid services access 2306 // give time for createAgent to finish, since it is async and does grid services access
2307 Thread.Sleep(500); 2307 Thread.Sleep(500);
2308 2308
2309 if (m_eqModule != null) 2309 if (m_eqModule != null)
2310 { 2310 {
2311 #region IP Translation for NAT 2311 #region IP Translation for NAT
2312 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened 2312 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2313 return; 2313 return;
2314 2314
2315 IClientIPEndpoint ipepClient; 2315 IClientIPEndpoint ipepClient;
@@ -2344,7 +2344,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2344 reg.RegionName, sp.Name, sp.UUID, reason); 2344 reg.RegionName, sp.Name, sp.UUID, reason);
2345 } 2345 }
2346 } 2346 }
2347 2347
2348 } 2348 }
2349 2349
2350 /// <summary> 2350 /// <summary>
@@ -2353,7 +2353,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2353 /// <param name="avatar"></param> 2353 /// <param name="avatar"></param>
2354 /// <param name="pRegionLocX"></param> 2354 /// <param name="pRegionLocX"></param>
2355 /// <param name="pRegionLocY"></param> 2355 /// <param name="pRegionLocY"></param>
2356 /// <returns></returns> 2356 /// <returns></returns>
2357 protected List<GridRegion> GetNeighbors(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY) 2357 protected List<GridRegion> GetNeighbors(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY)
2358 { 2358 {
2359 Scene pScene = avatar.Scene; 2359 Scene pScene = avatar.Scene;
@@ -2588,7 +2588,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2588 if (Scene.RegionInfo.EstateSettings.IsBanned(so.OwnerID)) 2588 if (Scene.RegionInfo.EstateSettings.IsBanned(so.OwnerID))
2589 { 2589 {
2590 m_log.DebugFormat( 2590 m_log.DebugFormat(
2591 "[ENTITY TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}", 2591 "[ENTITY TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}",
2592 so.Name, so.UUID, Scene.Name, so.OwnerID); 2592 so.Name, so.UUID, Scene.Name, so.OwnerID);
2593 2593
2594 return false; 2594 return false;
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2600 if (!Scene.AddSceneObject(so)) 2600 if (!Scene.AddSceneObject(so))
2601 { 2601 {
2602 m_log.DebugFormat( 2602 m_log.DebugFormat(
2603 "[ENTITY TRANSFER MODULE]: Problem adding scene object {0} {1} into {2} ", 2603 "[ENTITY TRANSFER MODULE]: Problem adding scene object {0} {1} into {2} ",
2604 so.Name, so.UUID, Scene.Name); 2604 so.Name, so.UUID, Scene.Name);
2605 2605
2606 return false; 2606 return false;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
index acfdaef..0a24555 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
169 } 169 }
170 else 170 else
171 { 171 {
172 if (newState == AgentTransferState.Cancelling 172 if (newState == AgentTransferState.Cancelling
173 && (oldState == AgentTransferState.Preparing || oldState == AgentTransferState.Transferring)) 173 && (oldState == AgentTransferState.Preparing || oldState == AgentTransferState.Transferring))
174 { 174 {
175 transitionOkay = true; 175 transitionOkay = true;
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
181 } 181 }
182 182
183 if (!transitionOkay) 183 if (!transitionOkay)
184 failureMessage 184 failureMessage
185 = string.Format( 185 = string.Format(
186 "Agent with ID {0} is not allowed to move from old transit state {1} to new state {2} in {3}", 186 "Agent with ID {0} is not allowed to move from old transit state {1} to new state {2} in {3}",
187 id, oldState, newState, m_mod.Scene.RegionInfo.RegionName); 187 id, oldState, newState, m_mod.Scene.RegionInfo.RegionName);
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
192 m_agentsInTransit[id] = newState; 192 m_agentsInTransit[id] = newState;
193 193
194// m_log.DebugFormat( 194// m_log.DebugFormat(
195// "[ENTITY TRANSFER STATE MACHINE]: Changed agent with id {0} from state {1} to {2} in {3}", 195// "[ENTITY TRANSFER STATE MACHINE]: Changed agent with id {0} from state {1} to {2} in {3}",
196// id, oldState, newState, m_mod.Scene.Name); 196// id, oldState, newState, m_mod.Scene.Name);
197 } 197 }
198 else if (failIfNotOkay) 198 else if (failIfNotOkay)
@@ -204,11 +204,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
204// { 204// {
205// if (oldState != null) 205// if (oldState != null)
206// m_log.DebugFormat( 206// m_log.DebugFormat(
207// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} from state {1} to {2} in {3}", 207// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} from state {1} to {2} in {3}",
208// id, oldState, newState, m_mod.Scene.Name); 208// id, oldState, newState, m_mod.Scene.Name);
209// else 209// else
210// m_log.DebugFormat( 210// m_log.DebugFormat(
211// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} to state {1} in {2} since agent not in transit", 211// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} to state {1} in {2} since agent not in transit",
212// id, newState, m_mod.Scene.Name); 212// id, newState, m_mod.Scene.Name);
213// } 213// }
214 } 214 }
@@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
281 { 281 {
282 if (!m_mod.WaitForAgentArrivedAtDestination) 282 if (!m_mod.WaitForAgentArrivedAtDestination)
283 return true; 283 return true;
284 284
285 lock (m_agentsInTransit) 285 lock (m_agentsInTransit)
286 { 286 {
287 AgentTransferState? currentState = GetAgentTransferState(id); 287 AgentTransferState? currentState = GetAgentTransferState(id);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index a9aaf12..4ad500a 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -160,9 +160,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
160 scene.RegisterModuleInterface<IUserAgentVerificationModule>(this); 160 scene.RegisterModuleInterface<IUserAgentVerificationModule>(this);
161 //scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject; 161 //scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject;
162 162
163 m_incomingSceneObjectEngine 163 m_incomingSceneObjectEngine
164 = new JobEngine( 164 = new JobEngine(
165 string.Format("HG Incoming Scene Object Engine ({0})", scene.Name), 165 string.Format("HG Incoming Scene Object Engine ({0})", scene.Name),
166 "HG INCOMING SCENE OBJECT ENGINE"); 166 "HG INCOMING SCENE OBJECT ENGINE");
167 167
168 StatsManager.RegisterStat( 168 StatsManager.RegisterStat(
@@ -291,7 +291,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
291 291
292 GridRegion source = new GridRegion(Scene.RegionInfo); 292 GridRegion source = new GridRegion(Scene.RegionInfo);
293 source.RawServerURI = m_GatekeeperURI; 293 source.RawServerURI = m_GatekeeperURI;
294 294
295 bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason); 295 bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason);
296 logout = success; // flag for later logout from this grid; this is an HG TP 296 logout = success; // flag for later logout from this grid; this is an HG TP
297 297
@@ -347,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
347 break; 347 break;
348 } 348 }
349 349
350 if (!found) 350 if (!found)
351 { 351 {
352 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Wearable not allowed to go outside {0}", i); 352 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Wearable not allowed to go outside {0}", i);
353 return false; 353 return false;
@@ -416,7 +416,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
416 // // Rez needed npc attachments 416 // // Rez needed npc attachments
417 // Scene.AttachmentsModule.RezAttachments(sp); 417 // Scene.AttachmentsModule.RezAttachments(sp);
418 418
419 419
420 // IAvatarFactoryModule module = Scene.RequestModuleInterface<IAvatarFactoryModule>(); 420 // IAvatarFactoryModule module = Scene.RequestModuleInterface<IAvatarFactoryModule>();
421 // //module.SendAppearance(sp.UUID); 421 // //module.SendAppearance(sp.UUID);
422 // module.RequestRebake(sp, false); 422 // module.RequestRebake(sp, false);
@@ -433,7 +433,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
433 // return base.UpdateAgent(reg, finalDestination, agentData, sp); 433 // return base.UpdateAgent(reg, finalDestination, agentData, sp);
434 //} 434 //}
435 435
436 436
437 public override bool TeleportHome(UUID id, IClientAPI client) 437 public override bool TeleportHome(UUID id, IClientAPI client)
438 { 438 {
439 m_log.DebugFormat( 439 m_log.DebugFormat(
@@ -449,7 +449,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
449 } 449 }
450 450
451 // Foreign user wants to go home 451 // Foreign user wants to go home
452 // 452 //
453 AgentCircuitData aCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); 453 AgentCircuitData aCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode);
454 if (aCircuit == null || (aCircuit != null && !aCircuit.ServiceURLs.ContainsKey("HomeURI"))) 454 if (aCircuit == null || (aCircuit != null && !aCircuit.ServiceURLs.ContainsKey("HomeURI")))
455 { 455 {
@@ -470,7 +470,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
470 { 470 {
471 m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e); 471 m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e);
472 } 472 }
473 473
474 if (finalDestination == null) 474 if (finalDestination == null)
475 { 475 {
476 client.SendTeleportFailed("Your home region could not be found"); 476 client.SendTeleportFailed("Your home region could not be found");
@@ -487,7 +487,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
487 } 487 }
488 488
489 GridRegion homeGatekeeper = MakeRegion(aCircuit); 489 GridRegion homeGatekeeper = MakeRegion(aCircuit);
490 490
491 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}", 491 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}",
492 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName); 492 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName);
493 493
@@ -503,7 +503,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
503 /// <param name="position"></param> 503 /// <param name="position"></param>
504 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm) 504 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm)
505 { 505 {
506 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}", 506 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}",
507 (lm.Gatekeeper == string.Empty) ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position); 507 (lm.Gatekeeper == string.Empty) ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position);
508 508
509 if (lm.Gatekeeper == string.Empty) 509 if (lm.Gatekeeper == string.Empty)
@@ -521,7 +521,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
521 remoteClient, info.RegionHandle, lm.Position, 521 remoteClient, info.RegionHandle, lm.Position,
522 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); 522 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
523 } 523 }
524 else 524 else
525 { 525 {
526 // Foreign region 526 // Foreign region
527 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); 527 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
@@ -581,7 +581,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
581 jobsRemoved, commonIdToRemove, jobsToReinsert.Count); 581 jobsRemoved, commonIdToRemove, jobsToReinsert.Count);
582 582
583 if (jobsToReinsert.Count > 0) 583 if (jobsToReinsert.Count > 0)
584 { 584 {
585 foreach (JobEngine.Job jobToReinsert in jobsToReinsert) 585 foreach (JobEngine.Job jobToReinsert in jobsToReinsert)
586 m_incomingSceneObjectEngine.QueueJob(jobToReinsert); 586 m_incomingSceneObjectEngine.QueueJob(jobToReinsert);
587 } 587 }
@@ -611,16 +611,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
611 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) 611 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
612 { 612 {
613 m_incomingSceneObjectEngine.QueueJob( 613 m_incomingSceneObjectEngine.QueueJob(
614 string.Format("HG UUID Gather for attachment {0} for {1}", so.Name, aCircuit.Name), 614 string.Format("HG UUID Gather for attachment {0} for {1}", so.Name, aCircuit.Name),
615 () => 615 () =>
616 { 616 {
617 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); 617 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
618 // m_log.DebugFormat( 618 // m_log.DebugFormat(
619 // "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}", 619 // "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}",
620 // so.Name, so.AttachedAvatar, url); 620 // so.Name, so.AttachedAvatar, url);
621 621
622 IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); 622 IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>();
623 HGUuidGatherer uuidGatherer 623 HGUuidGatherer uuidGatherer
624 = new HGUuidGatherer(Scene.AssetService, url, ids); 624 = new HGUuidGatherer(Scene.AssetService, url, ids);
625 uuidGatherer.AddForInspection(so); 625 uuidGatherer.AddForInspection(so);
626 626
@@ -646,7 +646,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
646 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString()); 646 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString());
647 647
648 return; 648 return;
649 } 649 }
650 } 650 }
651 651
652 // m_log.DebugFormat( 652 // m_log.DebugFormat(
@@ -657,7 +657,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
657 { 657 {
658 int tickStart = Util.EnvironmentTickCount(); 658 int tickStart = Util.EnvironmentTickCount();
659 659
660 uuidGatherer.FetchAsset(kvp.Key); 660 uuidGatherer.FetchAsset(kvp.Key);
661 661
662 int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart); 662 int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart);
663 663
@@ -670,15 +670,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
670 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString()); 670 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString());
671 671
672 return; 672 return;
673 } 673 }
674 } 674 }
675 675
676 base.HandleIncomingSceneObject(so, newPosition); 676 base.HandleIncomingSceneObject(so, newPosition);
677 677
678 // m_log.DebugFormat( 678 // m_log.DebugFormat(
679 // "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}", 679 // "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}",
680 // so.Name, so.OwnerID, url); 680 // so.Name, so.OwnerID, url);
681 }, 681 },
682 so.OwnerID.ToString()); 682 so.OwnerID.ToString());
683 } 683 }
684 } 684 }
@@ -698,7 +698,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
698 string url = aCircuit.ServiceURLs["HomeURI"].ToString(); 698 string url = aCircuit.ServiceURLs["HomeURI"].ToString();
699 IUserAgentService security = new UserAgentServiceConnector(url); 699 IUserAgentService security = new UserAgentServiceConnector(url);
700 return security.VerifyClient(aCircuit.SessionID, token); 700 return security.VerifyClient(aCircuit.SessionID, token);
701 } 701 }
702 else 702 else
703 { 703 {
704 m_log.DebugFormat( 704 m_log.DebugFormat(
@@ -746,7 +746,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
746 GridRegion region = new GridRegion(); 746 GridRegion region = new GridRegion();
747 747
748 Uri uri = null; 748 Uri uri = null;
749 if (!aCircuit.ServiceURLs.ContainsKey("HomeURI") || 749 if (!aCircuit.ServiceURLs.ContainsKey("HomeURI") ||
750 (aCircuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(aCircuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri))) 750 (aCircuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(aCircuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri)))
751 return null; 751 return null;
752 752
diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
index b5a4005..63dbb19 100644
--- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
+++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
@@ -41,34 +41,34 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
41 public class Commander : ICommander 41 public class Commander : ICommander
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 /// <value> 45 /// <value>
46 /// Used in runtime class generation 46 /// Used in runtime class generation
47 /// </summary> 47 /// </summary>
48 private string m_generatedApiClassName; 48 private string m_generatedApiClassName;
49 49
50 public string Name 50 public string Name
51 { 51 {
52 get { return m_name; } 52 get { return m_name; }
53 } 53 }
54 private string m_name; 54 private string m_name;
55 55
56 public string Help 56 public string Help
57 { 57 {
58 get 58 get
59 { 59 {
60 StringBuilder sb = new StringBuilder(); 60 StringBuilder sb = new StringBuilder();
61 61
62 sb.AppendLine("=== " + m_name + " ==="); 62 sb.AppendLine("=== " + m_name + " ===");
63 63
64 foreach (ICommand com in m_commands.Values) 64 foreach (ICommand com in m_commands.Values)
65 { 65 {
66 sb.AppendLine("* " + Name + " " + com.Name + " - " + com.Help); 66 sb.AppendLine("* " + Name + " " + com.Name + " - " + com.Help);
67 } 67 }
68 68
69 return sb.ToString(); 69 return sb.ToString();
70 } 70 }
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Constructor 74 /// Constructor
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
78 { 78 {
79 m_name = name; 79 m_name = name;
80 m_generatedApiClassName = m_name[0].ToString().ToUpper(); 80 m_generatedApiClassName = m_name[0].ToString().ToUpper();
81 81
82 if (m_name.Length > 1) 82 if (m_name.Length > 1)
83 m_generatedApiClassName += m_name.Substring(1); 83 m_generatedApiClassName += m_name.Substring(1);
84 } 84 }
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
87 { 87 {
88 get { return m_commands; } 88 get { return m_commands; }
89 } 89 }
90 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>(); 90 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>();
91 91
92 #region ICommander Members 92 #region ICommander Members
93 93
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
162 { 162 {
163 if (function != "help") 163 if (function != "help")
164 Console.WriteLine("ERROR: Invalid command - No such command exists"); 164 Console.WriteLine("ERROR: Invalid command - No such command exists");
165 165
166 Console.Write(Help); 166 Console.Write(Help);
167 } 167 }
168 } 168 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index f54298c..51ae217 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
178 { 178 {
179 UUID uuid = UUID.Zero; 179 UUID uuid = UUID.Zero;
180 UUID.TryParse(meta.CreatorID, out uuid); 180 UUID.TryParse(meta.CreatorID, out uuid);
181 UserAccount creator = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); 181 UserAccount creator = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid);
182 if (creator != null) 182 if (creator != null)
183 meta.CreatorID = m_HomeURI + ";" + creator.FirstName + " " + creator.LastName; 183 meta.CreatorID = m_HomeURI + ";" + creator.FirstName + " " + creator.LastName;
184 } 184 }
@@ -300,8 +300,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
300 { 300 {
301 m_log.Error( 301 m_log.Error(
302 string.Format( 302 string.Format(
303 "[HG ASSET MAPPER]: Failed to post asset {0} (type {1}, length {2}) referenced from {3} to {4} with exception ", 303 "[HG ASSET MAPPER]: Failed to post asset {0} (type {1}, length {2}) referenced from {3} to {4} with exception ",
304 asset.ID, asset.Type, asset.Data.Length, assetID, userAssetURL), 304 asset.ID, asset.Type, asset.Data.Length, assetID, userAssetURL),
305 e); 305 e);
306 306
307 // For debugging purposes for now we will continue to throw the exception up the stack as was already happening. However, after 307 // For debugging purposes for now we will continue to throw the exception up the stack as was already happening. However, after
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
315 else 315 else
316 { 316 {
317 m_log.DebugFormat( 317 m_log.DebugFormat(
318 "[HG ASSET MAPPER]: Didn't post asset {0} referenced from {1} because it already exists in asset server {2}", 318 "[HG ASSET MAPPER]: Didn't post asset {0} referenced from {1} because it already exists in asset server {2}",
319 uuid, assetID, userAssetURL); 319 uuid, assetID, userAssetURL);
320 } 320 }
321 } 321 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 4d7c25b..f89e446 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -91,9 +91,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
91 if (name == Name) 91 if (name == Name)
92 { 92 {
93 m_Enabled = true; 93 m_Enabled = true;
94 94
95 InitialiseCommon(source); 95 InitialiseCommon(source);
96 96
97 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name); 97 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name);
98 98
99 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 99 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
117 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); 117 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!");
118 118
119 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(source, "serverside_object_permissions", 119 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(source, "serverside_object_permissions",
120 new string[] { "Startup", "Permissions" }, true); 120 new string[] { "Startup", "Permissions" }, true);
121 121
122 } 122 }
123 } 123 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
248 } 248 }
249 249
250 250
251 /// 251 ///
252 /// CapsUpdateInventoryItemAsset 252 /// CapsUpdateInventoryItemAsset
253 /// 253 ///
254 public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) 254 public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
@@ -268,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
268 return newAssetID; 268 return newAssetID;
269 } 269 }
270 270
271 /// 271 ///
272 /// UpdateInventoryItemAsset 272 /// UpdateInventoryItemAsset
273 /// 273 ///
274 public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) 274 public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset)
@@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
317 RezSelected, RemoveItem, fromTaskID, attachment); 317 RezSelected, RemoveItem, fromTaskID, attachment);
318 } 318 }
319 319
320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, 320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID,
321 UUID groupID, Vector3 RayEnd, Vector3 RayStart, 321 UUID groupID, Vector3 RayEnd, Vector3 RayStart,
322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
@@ -386,7 +386,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
386 if (!m_CheckSeparateAssets) 386 if (!m_CheckSeparateAssets)
387 { 387 {
388 if (!UserManagementModule.IsLocalGridUser(userID)) 388 if (!UserManagementModule.IsLocalGridUser(userID))
389 { // foreign 389 { // foreign
390 ScenePresence sp = null; 390 ScenePresence sp = null;
391 if (m_Scene.TryGetScenePresence(userID, out sp)) 391 if (m_Scene.TryGetScenePresence(userID, out sp))
392 { 392 {
@@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
524 foreach (InventoryItemBase it in content.Items) 524 foreach (InventoryItemBase it in content.Items)
525 it.Name = it.Name + " (Unavailable)"; ; 525 it.Name = it.Name + " (Unavailable)"; ;
526 526
527 // Send the new names 527 // Send the new names
528 inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray()); 528 inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray());
529 529
530 } 530 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 771e5fe..fcf373b 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
68 return m_UserManagement; 68 return m_UserManagement;
69 } 69 }
70 } 70 }
71 71
72 public bool CoalesceMultipleObjectsToInventory { get; set; } 72 public bool CoalesceMultipleObjectsToInventory { get; set; }
73 73
74 #region INonSharedRegionModule 74 #region INonSharedRegionModule
@@ -92,14 +92,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
92 if (name == Name) 92 if (name == Name)
93 { 93 {
94 m_Enabled = true; 94 m_Enabled = true;
95 95
96 InitialiseCommon(source); 96 InitialiseCommon(source);
97 97
98 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name); 98 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
99 } 99 }
100 } 100 }
101 } 101 }
102 102
103 /// <summary> 103 /// <summary>
104 /// Common module config for both this and descendant classes. 104 /// Common module config for both this and descendant classes.
105 /// </summary> 105 /// </summary>
@@ -107,9 +107,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
107 protected virtual void InitialiseCommon(IConfigSource source) 107 protected virtual void InitialiseCommon(IConfigSource source)
108 { 108 {
109 IConfig inventoryConfig = source.Configs["Inventory"]; 109 IConfig inventoryConfig = source.Configs["Inventory"];
110 110
111 if (inventoryConfig != null) 111 if (inventoryConfig != null)
112 CoalesceMultipleObjectsToInventory 112 CoalesceMultipleObjectsToInventory
113 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true); 113 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true);
114 else 114 else
115 CoalesceMultipleObjectsToInventory = true; 115 CoalesceMultipleObjectsToInventory = true;
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
322 if (item != null && item.Owner == ownerID && asset != null) 322 if (item != null && item.Owner == ownerID && asset != null)
323 { 323 {
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}", 325// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
326// item.Name, item.ID, asset.ID); 326// item.Name, item.ID, asset.ID);
327 327
328 item.AssetID = asset.FullID; 328 item.AssetID = asset.FullID;
@@ -351,7 +351,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
351 List<InventoryItemBase> copiedItems = new List<InventoryItemBase>(); 351 List<InventoryItemBase> copiedItems = new List<InventoryItemBase>();
352 352
353 Dictionary<UUID, List<SceneObjectGroup>> bundlesToCopy = new Dictionary<UUID, List<SceneObjectGroup>>(); 353 Dictionary<UUID, List<SceneObjectGroup>> bundlesToCopy = new Dictionary<UUID, List<SceneObjectGroup>>();
354 354
355 if (CoalesceMultipleObjectsToInventory) 355 if (CoalesceMultipleObjectsToInventory)
356 { 356 {
357 // The following code groups the SOG's by owner. No objects 357 // The following code groups the SOG's by owner. No objects
@@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
361 { 361 {
362 if (!bundlesToCopy.ContainsKey(g.OwnerID)) 362 if (!bundlesToCopy.ContainsKey(g.OwnerID))
363 bundlesToCopy[g.OwnerID] = new List<SceneObjectGroup>(); 363 bundlesToCopy[g.OwnerID] = new List<SceneObjectGroup>();
364 364
365 bundlesToCopy[g.OwnerID].Add(g); 365 bundlesToCopy[g.OwnerID].Add(g);
366 } 366 }
367 } 367 }
@@ -372,7 +372,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
372 { 372 {
373 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>(); 373 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>();
374 bundle.Add(g); 374 bundle.Add(g);
375 bundlesToCopy[g.UUID] = bundle; 375 bundlesToCopy[g.UUID] = bundle;
376 } 376 }
377 } 377 }
378 378
@@ -384,10 +384,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
384 // with distinct destinations as well. 384 // with distinct destinations as well.
385 foreach (List<SceneObjectGroup> bundle in bundlesToCopy.Values) 385 foreach (List<SceneObjectGroup> bundle in bundlesToCopy.Values)
386 copiedItems.Add(CopyBundleToInventory(action, folderID, bundle, remoteClient, asAttachment)); 386 copiedItems.Add(CopyBundleToInventory(action, folderID, bundle, remoteClient, asAttachment));
387 387
388 return copiedItems; 388 return copiedItems;
389 } 389 }
390 390
391 /// <summary> 391 /// <summary>
392 /// Copy a bundle of objects to inventory. If there is only one object, then this will create an object 392 /// Copy a bundle of objects to inventory. If there is only one object, then this will create an object
393 /// item. If there are multiple objects then these will be saved as a single coalesced item. 393 /// item. If there are multiple objects then these will be saved as a single coalesced item.
@@ -408,7 +408,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
408 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>(); 408 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>();
409 // this possible is not needed if keyframes are saved 409 // this possible is not needed if keyframes are saved
410 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>(); 410 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>();
411 411
412 foreach (SceneObjectGroup objectGroup in objlist) 412 foreach (SceneObjectGroup objectGroup in objlist)
413 { 413 {
414 if (objectGroup.RootPart.KeyframeMotion != null) 414 if (objectGroup.RootPart.KeyframeMotion != null)
@@ -457,7 +457,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
457 (uint)PermissionMask.Export); 457 (uint)PermissionMask.Export);
458 objectGroup.RootPart.NextOwnerMask |= 458 objectGroup.RootPart.NextOwnerMask |=
459 (uint)PermissionMask.Move; 459 (uint)PermissionMask.Move;
460 460
461 coa.Add(objectGroup); 461 coa.Add(objectGroup);
462 } 462 }
463 463
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
471 itemXml = CoalescedSceneObjectsSerializer.ToXml(coa, !asAttachment); 471 itemXml = CoalescedSceneObjectsSerializer.ToXml(coa, !asAttachment);
472 else 472 else
473 itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment); 473 itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment);
474 474
475 // Restore the position of each group now that it has been stored to inventory. 475 // Restore the position of each group now that it has been stored to inventory.
476 foreach (SceneObjectGroup objectGroup in objlist) 476 foreach (SceneObjectGroup objectGroup in objlist)
477 { 477 {
@@ -493,11 +493,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
493 493
494 item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); 494 item.CreatorId = objlist[0].RootPart.CreatorID.ToString();
495 item.CreatorData = objlist[0].RootPart.CreatorData; 495 item.CreatorData = objlist[0].RootPart.CreatorData;
496 496
497 if (objlist.Count > 1) 497 if (objlist.Count > 1)
498 { 498 {
499 item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems; 499 item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems;
500 500
501 // If the objects have different creators then don't specify a creator at all 501 // If the objects have different creators then don't specify a creator at all
502 foreach (SceneObjectGroup objectGroup in objlist) 502 foreach (SceneObjectGroup objectGroup in objlist)
503 { 503 {
@@ -513,8 +513,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
513 else 513 else
514 { 514 {
515 item.SaleType = objlist[0].RootPart.ObjectSaleType; 515 item.SaleType = objlist[0].RootPart.ObjectSaleType;
516 item.SalePrice = objlist[0].RootPart.SalePrice; 516 item.SalePrice = objlist[0].RootPart.SalePrice;
517 } 517 }
518 518
519 AssetBase asset = CreateAsset( 519 AssetBase asset = CreateAsset(
520 objlist[0].GetPartName(objlist[0].RootPart.LocalId), 520 objlist[0].GetPartName(objlist[0].RootPart.LocalId),
@@ -523,7 +523,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
523 Utils.StringToBytes(itemXml), 523 Utils.StringToBytes(itemXml),
524 objlist[0].OwnerID.ToString()); 524 objlist[0].OwnerID.ToString());
525 m_Scene.AssetService.Store(asset); 525 m_Scene.AssetService.Store(asset);
526 526
527 item.AssetID = asset.FullID; 527 item.AssetID = asset.FullID;
528 528
529 if (DeRezAction.SaveToExistingUserInventoryItem == action) 529 if (DeRezAction.SaveToExistingUserInventoryItem == action)
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
562 // This is a hook to do some per-asset post-processing for subclasses that need that 562 // This is a hook to do some per-asset post-processing for subclasses that need that
563 if (remoteClient != null && action != DeRezAction.Delete) 563 if (remoteClient != null && action != DeRezAction.Delete)
564 ExportAsset(remoteClient.AgentId, asset.FullID); 564 ExportAsset(remoteClient.AgentId, asset.FullID);
565 565
566 return item; 566 return item;
567 } 567 }
568 568
@@ -580,7 +580,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
580 /// <param name="remoteClient"></param> 580 /// <param name="remoteClient"></param>
581 /// <returns></returns> 581 /// <returns></returns>
582 protected InventoryItemBase AddPermissions( 582 protected InventoryItemBase AddPermissions(
583 InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions, 583 InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions,
584 IClientAPI remoteClient) 584 IClientAPI remoteClient)
585 { 585 {
586 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7; 586 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7;
@@ -614,7 +614,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
614 item.NextPermissions = perms & so.RootPart.NextOwnerMask; 614 item.NextPermissions = perms & so.RootPart.NextOwnerMask;
615 item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; 615 item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask;
616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; 616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
617 617
618 // apply next owner perms on rez 618 // apply next owner perms on rez
619 item.CurrentPermissions |= SceneObjectGroup.SLAM; 619 item.CurrentPermissions |= SceneObjectGroup.SLAM;
620 } 620 }
@@ -642,11 +642,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
642 7); // Preserve folded permissions 642 7); // Preserve folded permissions
643 } 643 }
644 644
645 //PermissionsUtil.LogPermissions(item.Name, "After AddPermissions", item.BasePermissions, item.CurrentPermissions, item.NextPermissions); 645 //PermissionsUtil.LogPermissions(item.Name, "After AddPermissions", item.BasePermissions, item.CurrentPermissions, item.NextPermissions);
646 646
647 return item; 647 return item;
648 } 648 }
649 649
650 /// <summary> 650 /// <summary>
651 /// Create an item using details for the given scene object. 651 /// Create an item using details for the given scene object.
652 /// </summary> 652 /// </summary>
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
659 DeRezAction action, IClientAPI remoteClient, SceneObjectGroup so, UUID folderID) 659 DeRezAction action, IClientAPI remoteClient, SceneObjectGroup so, UUID folderID)
660 { 660 {
661// m_log.DebugFormat( 661// m_log.DebugFormat(
662// "[BASIC INVENTORY ACCESS MODULE]: Creating item for object {0} {1} for folder {2}, action {3}", 662// "[BASIC INVENTORY ACCESS MODULE]: Creating item for object {0} {1} for folder {2}, action {3}",
663// so.Name, so.UUID, folderID, action); 663// so.Name, so.UUID, folderID, action);
664// 664//
665 // Get the user info of the item destination 665 // Get the user info of the item destination
@@ -707,7 +707,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
707 // Delete is treated like return in this case 707 // Delete is treated like return in this case
708 // Deleting your own items makes them go to trash 708 // Deleting your own items makes them go to trash
709 // 709 //
710 710
711 InventoryFolderBase folder = null; 711 InventoryFolderBase folder = null;
712 InventoryItemBase item = null; 712 InventoryItemBase item = null;
713 713
@@ -723,7 +723,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
723 m_log.DebugFormat( 723 m_log.DebugFormat(
724 "[INVENTORY ACCESS MODULE]: Object {0} {1} scheduled for save to inventory has already been deleted.", 724 "[INVENTORY ACCESS MODULE]: Object {0} {1} scheduled for save to inventory has already been deleted.",
725 so.Name, so.UUID); 725 so.Name, so.UUID);
726 726
727 return null; 727 return null;
728 } 728 }
729 } 729 }
@@ -805,13 +805,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
805 } 805 }
806 } 806 }
807 807
808 item = new InventoryItemBase(); 808 item = new InventoryItemBase();
809 item.ID = UUID.Random(); 809 item.ID = UUID.Random();
810 item.InvType = (int)InventoryType.Object; 810 item.InvType = (int)InventoryType.Object;
811 item.Folder = folder.ID; 811 item.Folder = folder.ID;
812 item.Owner = userID; 812 item.Owner = userID;
813 } 813 }
814 814
815 return item; 815 return item;
816 } 816 }
817 // compatibility do not use 817 // compatibility do not use
@@ -863,7 +863,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
863 byte BypassRayCast, bool RayEndIsIntersection, 863 byte BypassRayCast, bool RayEndIsIntersection,
864 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 864 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
865 { 865 {
866 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString()); 866 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString());
867 867
868 if (rezAsset == null) 868 if (rezAsset == null)
869 { 869 {
@@ -891,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
891 "[INVENTORY ACCESS MODULE]: missing data in asset {0} to RezObject()", 891 "[INVENTORY ACCESS MODULE]: missing data in asset {0} to RezObject()",
892 assetID, remoteClient.Name); 892 assetID, remoteClient.Name);
893 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: missing data in asset {0} ", assetID), false); 893 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: missing data in asset {0} ", assetID), false);
894 return null; 894 return null;
895 } 895 }
896 896
897 SceneObjectGroup group = null; 897 SceneObjectGroup group = null;
@@ -903,7 +903,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
903 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 903 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
904 Vector3 pos; 904 Vector3 pos;
905 905
906 bool single 906 bool single
907 = m_Scene.GetObjectsToRez( 907 = m_Scene.GetObjectsToRez(
908 rezAsset.Data, attachment, out objlist, out veclist, out bbox, out offsetHeight); 908 rezAsset.Data, attachment, out objlist, out veclist, out bbox, out offsetHeight);
909 909
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1055 /// <param name="isAttachment"></param> 1055 /// <param name="isAttachment"></param>
1056 /// <returns>true if we can processed with rezzing, false if we need to abort</returns> 1056 /// <returns>true if we can processed with rezzing, false if we need to abort</returns>
1057 private bool DoPreRezWhenFromItem( 1057 private bool DoPreRezWhenFromItem(
1058 IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist, 1058 IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist,
1059 Vector3 pos, List<Vector3> veclist, bool isAttachment) 1059 Vector3 pos, List<Vector3> veclist, bool isAttachment)
1060 { 1060 {
1061 UUID fromUserInventoryItemId = UUID.Zero; 1061 UUID fromUserInventoryItemId = UUID.Zero;
@@ -1142,7 +1142,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1142 //Need to kill the for sale here 1142 //Need to kill the for sale here
1143 rootPart.ObjectSaleType = 0; 1143 rootPart.ObjectSaleType = 0;
1144 rootPart.SalePrice = 10; 1144 rootPart.SalePrice = 10;
1145 1145
1146 if (m_Scene.Permissions.PropagatePermissions()) 1146 if (m_Scene.Permissions.PropagatePermissions())
1147 { 1147 {
1148 foreach (SceneObjectPart part in so.Parts) 1148 foreach (SceneObjectPart part in so.Parts)
@@ -1154,7 +1154,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1154 part.RezzerID = item.Owner; 1154 part.RezzerID = item.Owner;
1155 part.Inventory.ChangeInventoryOwner(item.Owner); 1155 part.Inventory.ChangeInventoryOwner(item.Owner);
1156 } 1156 }
1157 1157
1158 so.ApplyNextOwnerPermissions(); 1158 so.ApplyNextOwnerPermissions();
1159 1159
1160 // In case the user has changed flags on a received item 1160 // In case the user has changed flags on a received item
@@ -1312,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1312 { 1312 {
1313 IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); 1313 IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>();
1314 InventoryItemBase item = invService.GetItem(agentID, itemID); 1314 InventoryItemBase item = invService.GetItem(agentID, itemID);
1315 1315
1316 if (item != null && item.CreatorData != null && item.CreatorData != string.Empty) 1316 if (item != null && item.CreatorData != null && item.CreatorData != string.Empty)
1317 UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData); 1317 UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData);
1318 1318
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
index 007ff63..8f12331 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
77 scene.StartScripts(); 77 scene.StartScripts();
78 78
79 HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl); 79 HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl);
80 UserAccount ua 80 UserAccount ua
81 = UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password"); 81 = UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password");
82 82
83 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail); 83 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail);
@@ -116,7 +116,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
116 XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID"); 116 XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID");
117 Assert.NotNull(uuidAttribute); 117 Assert.NotNull(uuidAttribute);
118 // XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task 118 // XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task
119 // item created earlier. 119 // item created earlier.
120 } 120 }
121 121
122 private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId) 122 private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId)
@@ -131,9 +131,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
131 // immediately for tests rather than chunter through it's threaded mechanisms. 131 // immediately for tests rather than chunter through it's threaded mechanisms.
132 AutoResetEvent chatEvent = new AutoResetEvent(false); 132 AutoResetEvent chatEvent = new AutoResetEvent(false);
133 133
134 scene.EventManager.OnChatFromWorld += (s, c) => 134 scene.EventManager.OnChatFromWorld += (s, c) =>
135 { 135 {
136// Console.WriteLine("Got chat [{0}]", c.Message); 136// Console.WriteLine("Got chat [{0}]", c.Message);
137 chatEvent.Set(); 137 chatEvent.Set();
138 }; 138 };
139 139
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index b31d4df..de29ae9 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -48,12 +48,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
48{ 48{
49 [TestFixture] 49 [TestFixture]
50 public class InventoryAccessModuleTests : OpenSimTestCase 50 public class InventoryAccessModuleTests : OpenSimTestCase
51 { 51 {
52 protected TestScene m_scene; 52 protected TestScene m_scene;
53 protected BasicInventoryAccessModule m_iam; 53 protected BasicInventoryAccessModule m_iam;
54 protected UUID m_userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 54 protected UUID m_userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
55 protected TestClient m_tc; 55 protected TestClient m_tc;
56 56
57 [SetUp] 57 [SetUp]
58 public override void SetUp() 58 public override void SetUp()
59 { 59 {
@@ -68,32 +68,32 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
68 SceneHelpers sceneHelpers = new SceneHelpers(); 68 SceneHelpers sceneHelpers = new SceneHelpers();
69 m_scene = sceneHelpers.SetupScene(); 69 m_scene = sceneHelpers.SetupScene();
70 SceneHelpers.SetupSceneModules(m_scene, config, m_iam); 70 SceneHelpers.SetupSceneModules(m_scene, config, m_iam);
71 71
72 // Create user 72 // Create user
73 string userFirstName = "Jock"; 73 string userFirstName = "Jock";
74 string userLastName = "Stirrup"; 74 string userLastName = "Stirrup";
75 string userPassword = "troll"; 75 string userPassword = "troll";
76 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, m_userId, userPassword); 76 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, m_userId, userPassword);
77 77
78 AgentCircuitData acd = new AgentCircuitData(); 78 AgentCircuitData acd = new AgentCircuitData();
79 acd.AgentID = m_userId; 79 acd.AgentID = m_userId;
80 m_tc = new TestClient(acd, m_scene); 80 m_tc = new TestClient(acd, m_scene);
81 } 81 }
82 82
83 [Test] 83 [Test]
84 public void TestRezCoalescedObject() 84 public void TestRezCoalescedObject()
85 { 85 {
86/* 86/*
87 TestHelpers.InMethod(); 87 TestHelpers.InMethod();
88// log4net.Config.XmlConfigurator.Configure(); 88// log4net.Config.XmlConfigurator.Configure();
89 89
90 // Create asset 90 // Create asset
91 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); 91 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20);
92 object1.AbsolutePosition = new Vector3(15, 30, 45); 92 object1.AbsolutePosition = new Vector3(15, 30, 45);
93 93
94 SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); 94 SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40);
95 object2.AbsolutePosition = new Vector3(25, 50, 75); 95 object2.AbsolutePosition = new Vector3(25, 50, 75);
96 96
97 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); 97 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2);
98 98
99 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 99 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
@@ -107,46 +107,46 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
107 item1.Name = item1Name; 107 item1.Name = item1Name;
108 item1.AssetID = asset1.FullID; 108 item1.AssetID = asset1.FullID;
109 item1.ID = item1Id; 109 item1.ID = item1Id;
110 InventoryFolderBase objsFolder 110 InventoryFolderBase objsFolder
111 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0]; 111 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0];
112 item1.Folder = objsFolder.ID; 112 item1.Folder = objsFolder.ID;
113 item1.Flags |= (uint)InventoryItemFlags.ObjectHasMultipleItems; 113 item1.Flags |= (uint)InventoryItemFlags.ObjectHasMultipleItems;
114 m_scene.AddInventoryItem(item1); 114 m_scene.AddInventoryItem(item1);
115 115
116 SceneObjectGroup so 116 SceneObjectGroup so
117 = m_iam.RezObject( 117 = m_iam.RezObject(
118 m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 118 m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
119 119
120 Assert.That(so, Is.Not.Null); 120 Assert.That(so, Is.Not.Null);
121 121
122 Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(2)); 122 Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(2));
123 123
124 SceneObjectPart retrievedObj1Part = m_scene.GetSceneObjectPart(object1.Name); 124 SceneObjectPart retrievedObj1Part = m_scene.GetSceneObjectPart(object1.Name);
125 Assert.That(retrievedObj1Part, Is.Null); 125 Assert.That(retrievedObj1Part, Is.Null);
126 126
127 retrievedObj1Part = m_scene.GetSceneObjectPart(item1.Name); 127 retrievedObj1Part = m_scene.GetSceneObjectPart(item1.Name);
128 Assert.That(retrievedObj1Part, Is.Not.Null); 128 Assert.That(retrievedObj1Part, Is.Not.Null);
129 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); 129 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name));
130 130
131 // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom 131 // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom
132 // object is unit square. 132 // object is unit square.
133 Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f))); 133 Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f)));
134 134
135 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); 135 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name);
136 Assert.That(retrievedObj2Part, Is.Not.Null); 136 Assert.That(retrievedObj2Part, Is.Not.Null);
137 Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name)); 137 Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name));
138 Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f))); 138 Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f)));
139*/ 139*/
140 } 140 }
141 141
142 [Test] 142 [Test]
143 public void TestRezObject() 143 public void TestRezObject()
144 { 144 {
145 TestHelpers.InMethod(); 145 TestHelpers.InMethod();
146// log4net.Config.XmlConfigurator.Configure(); 146// log4net.Config.XmlConfigurator.Configure();
147 147
148 // Create asset 148 // Create asset
149 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40); 149 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40);
150 150
151 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 151 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
152 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 152 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
@@ -159,17 +159,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
159 item1.Name = item1Name; 159 item1.Name = item1Name;
160 item1.AssetID = asset1.FullID; 160 item1.AssetID = asset1.FullID;
161 item1.ID = item1Id; 161 item1.ID = item1Id;
162 InventoryFolderBase objsFolder 162 InventoryFolderBase objsFolder
163 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0]; 163 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0];
164 item1.Folder = objsFolder.ID; 164 item1.Folder = objsFolder.ID;
165 m_scene.AddInventoryItem(item1); 165 m_scene.AddInventoryItem(item1);
166 166
167 SceneObjectGroup so 167 SceneObjectGroup so
168 = m_iam.RezObject( 168 = m_iam.RezObject(
169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
170 170
171 Assert.That(so, Is.Not.Null); 171 Assert.That(so, Is.Not.Null);
172 172
173 SceneObjectPart retrievedPart = m_scene.GetSceneObjectPart(so.UUID); 173 SceneObjectPart retrievedPart = m_scene.GetSceneObjectPart(so.UUID);
174 Assert.That(retrievedPart, Is.Not.Null); 174 Assert.That(retrievedPart, Is.Not.Null);
175 } 175 }
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
index 862f0b7..df9d4f9 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
126 return; 126 return;
127 127
128 // This will never run more than once, even if the region is restarted 128 // This will never run more than once, even if the region is restarted
129 if (!m_HasRunOnce) 129 if (!m_HasRunOnce)
130 { 130 {
131 LoadLibrariesFromArchives(); 131 LoadLibrariesFromArchives();
132 //DumpLibrary(); 132 //DumpLibrary();
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
index 21e00b2..c1a9457 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
@@ -259,11 +259,11 @@ namespace OpenSim.Region.CoreModules.Framework.Library
259 259
260 /// <summary> 260 /// <summary>
261 /// Get the union of permissions of all inventory items 261 /// Get the union of permissions of all inventory items
262 /// that hold the given assetID. 262 /// that hold the given assetID.
263 /// </summary> 263 /// </summary>
264 /// <param name="userID"></param> 264 /// <param name="userID"></param>
265 /// <param name="assetID"></param> 265 /// <param name="assetID"></param>
266 /// <returns>The permissions or 0 if no such asset is found in 266 /// <returns>The permissions or 0 if no such asset is found in
267 /// the user's inventory</returns> 267 /// the user's inventory</returns>
268 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; } 268 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; }
269 } 269 }
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
index 93a7cf2..fb3d31c 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -44,7 +44,7 @@ using Mono.Addins;
44namespace OpenSim.Region.CoreModules.Framework.Monitoring 44namespace OpenSim.Region.CoreModules.Framework.Monitoring
45{ 45{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")]
47 public class MonitorModule : INonSharedRegionModule 47 public class MonitorModule : INonSharedRegionModule
48 { 48 {
49 /// <summary> 49 /// <summary>
50 /// Is this module enabled? 50 /// Is this module enabled?
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
78 78
79 if (cnfg != null) 79 if (cnfg != null)
80 Enabled = cnfg.GetBoolean("Enabled", true); 80 Enabled = cnfg.GetBoolean("Enabled", true);
81 81
82 if (!Enabled) 82 if (!Enabled)
83 return; 83 return;
84 84
@@ -433,7 +433,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
433 MakeStat("ScriptLines", "lines/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[20]; }); 433 MakeStat("ScriptLines", "lines/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[20]; });
434 MakeStat("SimSpareMS", "ms/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[21]; }); 434 MakeStat("SimSpareMS", "ms/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[21]; });
435 } 435 }
436 436
437 private void UnRegisterStatsManagerRegionStatistics() 437 private void UnRegisterStatsManagerRegionStatistics()
438 { 438 {
439 foreach (Stat stat in registeredStats) 439 foreach (Stat stat in registeredStats)
@@ -443,6 +443,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
443 } 443 }
444 registeredStats.Clear(); 444 registeredStats.Clear();
445 } 445 }
446 446
447 } 447 }
448} \ No newline at end of file 448} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
index 3849996..c04d856 100644
--- a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Framework.Search
135 135
136 #endregion ISharedRegionModule 136 #endregion ISharedRegionModule
137 137
138 138
139 #region Event Handlers 139 #region Event Handlers
140 140
141 void EventManager_OnMakeRootAgent(ScenePresence sp) 141 void EventManager_OnMakeRootAgent(ScenePresence sp)
diff --git a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
index 36fb57a..924a1a3 100644
--- a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Framework
49 49
50 private readonly List<Scene> m_scenes = new List<Scene>(); 50 private readonly List<Scene> m_scenes = new List<Scene>();
51 private JobEngine m_processorJobEngine; 51 private JobEngine m_processorJobEngine;
52 52
53 #region ISharedRegionModule 53 #region ISharedRegionModule
54 54
55 public void Initialise(IConfigSource config) 55 public void Initialise(IConfigSource config)
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
index f3436d1..3e6c8b5 100644
--- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
@@ -45,14 +45,14 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
45 public class BinaryLoggingModule : INonSharedRegionModule 45 public class BinaryLoggingModule : INonSharedRegionModule
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 protected bool m_collectStats; 49 protected bool m_collectStats;
50 protected Scene m_scene = null; 50 protected Scene m_scene = null;
51 51
52 public string Name { get { return "Binary Statistics Logging Module"; } } 52 public string Name { get { return "Binary Statistics Logging Module"; } }
53 public Type ReplaceableInterface { get { return null; } } 53 public Type ReplaceableInterface { get { return null; } }
54 54
55 public void Initialise(IConfigSource source) 55 public void Initialise(IConfigSource source)
56 { 56 {
57 try 57 try
58 { 58 {
@@ -81,23 +81,23 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
81 // if it doesn't work, we don't collect anything 81 // if it doesn't work, we don't collect anything
82 } 82 }
83 } 83 }
84 84
85 public void AddRegion(Scene scene) 85 public void AddRegion(Scene scene)
86 { 86 {
87 m_scene = scene; 87 m_scene = scene;
88 } 88 }
89 89
90 public void RemoveRegion(Scene scene) 90 public void RemoveRegion(Scene scene)
91 { 91 {
92 } 92 }
93 93
94 public void RegionLoaded(Scene scene) 94 public void RegionLoaded(Scene scene)
95 { 95 {
96 if (m_collectStats) 96 if (m_collectStats)
97 m_scene.StatsReporter.OnSendStatsResult += LogSimStats; 97 m_scene.StatsReporter.OnSendStatsResult += LogSimStats;
98 } 98 }
99 99
100 public void Close() 100 public void Close()
101 { 101 {
102 } 102 }
103 103
@@ -107,12 +107,12 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
107 public string Path; 107 public string Path;
108 public System.IO.BinaryWriter Log; 108 public System.IO.BinaryWriter Log;
109 } 109 }
110 110
111 static StatLogger m_statLog = null; 111 static StatLogger m_statLog = null;
112 static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300); 112 static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300);
113 static string m_statsDir = String.Empty; 113 static string m_statsDir = String.Empty;
114 static Object m_statLockObject = new Object(); 114 static Object m_statLockObject = new Object();
115 115
116 private void LogSimStats(SimStats stats) 116 private void LogSimStats(SimStats stats)
117 { 117 {
118 SimStatsPacket pack = new SimStatsPacket(); 118 SimStatsPacket pack = new SimStatsPacket();
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
index ea3bbe7..3e0a610 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
111 } 111 }
112 112
113 // This is it! Let's ask the other world 113 // This is it! Let's ask the other world
114 if (words[0].Contains(".")) 114 if (words[0].Contains("."))
115 { 115 {
116 string[] names = words[0].Split(new char[] { '.' }); 116 string[] names = words[0].Split(new char[] { '.' });
117 if (names.Length >= 2) 117 if (names.Length >= 2)
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
130 } 130 }
131 131
132 UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr); 132 UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr);
133 133
134 UUID userID = UUID.Zero; 134 UUID userID = UUID.Zero;
135 try 135 try
136 { 136 {
@@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
140 { 140 {
141 m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e); 141 m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e);
142 } 142 }
143 143
144 if (!userID.Equals(UUID.Zero)) 144 if (!userID.Equals(UUID.Zero))
145 { 145 {
146 UserData ud = new UserData(); 146 UserData ud = new UserData();
@@ -163,8 +163,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
163 //{ 163 //{
164 // foreach (UserData d in m_UserCache.Values) 164 // foreach (UserData d in m_UserCache.Values)
165 // { 165 // {
166 // if (d.LastName.StartsWith("@") && 166 // if (d.LastName.StartsWith("@") &&
167 // (d.FirstName.ToLower().StartsWith(query.ToLower()) || 167 // (d.FirstName.ToLower().StartsWith(query.ToLower()) ||
168 // d.LastName.ToLower().StartsWith(query.ToLower()))) 168 // d.LastName.ToLower().StartsWith(query.ToLower())))
169 // users.Add(d); 169 // users.Add(d);
170 // } 170 // }
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
index 4e3b7e5..9d91aa3 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement.Tests
37{ 37{
38 [TestFixture] 38 [TestFixture]
39 public class HGUserManagementModuleTests : OpenSimTestCase 39 public class HGUserManagementModuleTests : OpenSimTestCase
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation. 42 /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation.
43 /// </summary> 43 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 2701912..51f973a 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -345,7 +345,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
345 } 345 }
346 346
347 /// <summary> 347 /// <summary>
348 /// 348 ///
349 /// </summary> 349 /// </summary>
350 /// <param name="uuid"></param> 350 /// <param name="uuid"></param>
351 /// <param name="names">Caller please provide a properly instantiated array for names, string[2]</param> 351 /// <param name="names">Caller please provide a properly instantiated array for names, string[2]</param>
@@ -557,7 +557,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
557 return ret; 557 return ret;
558 558
559 // try grid user service 559 // try grid user service
560 560
561 GridUserInfo[] pinfos = m_Scenes[0].GridUserService.GetGridUserInfo(missing.ToArray()); 561 GridUserInfo[] pinfos = m_Scenes[0].GridUserService.GetGridUserInfo(missing.ToArray());
562 if(pinfos.Length > 0) 562 if(pinfos.Length > 0)
563 { 563 {
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
index a5c7543..5d66d34 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
46 public class HGWorldMapModule : WorldMapModule 46 public class HGWorldMapModule : WorldMapModule
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 // Remember the map area that each client has been exposed to in this region 50 // Remember the map area that each client has been exposed to in this region
51 private Dictionary<UUID, List<MapBlockData>> m_SeenMapBlocks = new Dictionary<UUID, List<MapBlockData>>(); 51 private Dictionary<UUID, List<MapBlockData>> m_SeenMapBlocks = new Dictionary<UUID, List<MapBlockData>>();
52 52
diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
index 74dcaae..2e3ac8e 100644
--- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.CoreModules")] 9[assembly: AssemblyTitle("OpenSim.Region.CoreModules")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 665d7f7..c369d87 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -181,12 +181,12 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
181 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 181 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
182 { 182 {
183 return AddDynamicTextureURL(simID, primID, contentType, url, 183 return AddDynamicTextureURL(simID, primID, contentType, url,
184 extraParams, updateTimer, SetBlending, 184 extraParams, updateTimer, SetBlending,
185 (int)(DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); 185 (int)(DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES);
186 } 186 }
187 187
188 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, 188 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
189 string extraParams, int updateTimer, bool SetBlending, 189 string extraParams, int updateTimer, bool SetBlending,
190 int disp, byte AlphaValue, int face) 190 int disp, byte AlphaValue, int face)
191 { 191 {
192 if (RenderPlugins.ContainsKey(contentType)) 192 if (RenderPlugins.ContainsKey(contentType))
@@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
227 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, 227 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
228 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 228 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
229 { 229 {
230 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, SetBlending, 230 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, SetBlending,
231 (int) (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); 231 (int) (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES);
232 } 232 }
233 233
@@ -478,17 +478,17 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
478 478
479 if (part == null || data == null || data.Length <= 1) 479 if (part == null || data == null || data.Length <= 1)
480 { 480 {
481 string msg = 481 string msg =
482 String.Format("DynamicTextureModule: Error preparing image using URL {0}", Url); 482 String.Format("DynamicTextureModule: Error preparing image using URL {0}", Url);
483 scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say, 483 scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,
484 0, part.ParentGroup.RootPart.AbsolutePosition, part.Name, part.UUID, false); 484 0, part.ParentGroup.RootPart.AbsolutePosition, part.Name, part.UUID, false);
485 485
486 return UUID.Zero; 486 return UUID.Zero;
487 } 487 }
488 488
489 byte[] assetData = null; 489 byte[] assetData = null;
490 AssetBase oldAsset = null; 490 AssetBase oldAsset = null;
491 491
492 if (BlendWithOldTexture) 492 if (BlendWithOldTexture)
493 { 493 {
494 Primitive.TextureEntryFace defaultFace = part.Shape.Textures.DefaultTexture; 494 Primitive.TextureEntryFace defaultFace = part.Shape.Textures.DefaultTexture;
@@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
558 558
559 Bitmap image1 = new Bitmap(image); 559 Bitmap image1 = new Bitmap(image);
560 image.Dispose(); 560 image.Dispose();
561 561
562 if (!OpenJPEG.DecodeToImage(backImage, out managedImage, out image) || image == null) 562 if (!OpenJPEG.DecodeToImage(backImage, out managedImage, out image) || image == null)
563 { 563 {
564 image1.Dispose(); 564 image1.Dispose();
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 3948667..09891f7 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 htc.RequestModule = this; 250 htc.RequestModule = this;
251 htc.LocalID = localID; 251 htc.LocalID = localID;
252 htc.ItemID = itemID; 252 htc.ItemID = itemID;
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
283 } 283 }
284 284
285 public bool StartHttpRequest(HttpRequestClass req) 285 public bool StartHttpRequest(HttpRequestClass req)
286 { 286 {
287 if (!CheckAllowed(new Uri(req.Url))) 287 if (!CheckAllowed(new Uri(req.Url)))
288 return false; 288 return false;
289 289
@@ -541,7 +541,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
541 try 541 try
542 { 542 {
543 Request = (HttpWebRequest)WebRequest.Create(Url); 543 Request = (HttpWebRequest)WebRequest.Create(Url);
544 Request.AllowAutoRedirect = false; 544 Request.AllowAutoRedirect = false;
545 545
546 //This works around some buggy HTTP Servers like Lighttpd 546 //This works around some buggy HTTP Servers like Lighttpd
547 Request.ServicePoint.Expect100Continue = false; 547 Request.ServicePoint.Expect100Continue = false;
@@ -684,9 +684,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
684 resStream.Close(); 684 resStream.Close();
685 if (response != null) 685 if (response != null)
686 response.Close(); 686 response.Close();
687
688 687
689 // We need to resubmit 688
689 // We need to resubmit
690 if ( 690 if (
691 (Status == (int)HttpStatusCode.MovedPermanently 691 (Status == (int)HttpStatusCode.MovedPermanently
692 || Status == (int)HttpStatusCode.Found 692 || Status == (int)HttpStatusCode.Found
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs
index d22487e..7e223d7 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs
@@ -45,7 +45,7 @@ using OpenSim.Tests.Common;
45namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests 45namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
46{ 46{
47 class TestWebRequestCreate : IWebRequestCreate 47 class TestWebRequestCreate : IWebRequestCreate
48 { 48 {
49 public TestWebRequest NextRequest { get; set; } 49 public TestWebRequest NextRequest { get; set; }
50 50
51 public WebRequest Create(Uri uri) 51 public WebRequest Create(Uri uri)
@@ -65,13 +65,13 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
65 65
66 public Func<IAsyncResult, WebResponse> OnEndGetResponse { get; set; } 66 public Func<IAsyncResult, WebResponse> OnEndGetResponse { get; set; }
67 67
68 public TestWebRequest() : base() 68 public TestWebRequest() : base()
69 { 69 {
70// Console.WriteLine("created"); 70// Console.WriteLine("created");
71 } 71 }
72 72
73// public TestWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext) 73// public TestWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext)
74// : base(serializationInfo, streamingContext) 74// : base(serializationInfo, streamingContext)
75// { 75// {
76// Console.WriteLine("created"); 76// Console.WriteLine("created");
77// } 77// }
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
97 public string Response { get; set; } 97 public string Response { get; set; }
98 98
99#pragma warning disable 0618 99#pragma warning disable 0618
100 public TestHttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) 100 public TestHttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext)
101 : base(serializationInfo, streamingContext) {} 101 : base(serializationInfo, streamingContext) {}
102#pragma warning restore 0618 102#pragma warning restore 0618
103 103
@@ -111,24 +111,24 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
111 { 111 {
112 WaitHandle m_wh = new ManualResetEvent(true); 112 WaitHandle m_wh = new ManualResetEvent(true);
113 113
114 object IAsyncResult.AsyncState 114 object IAsyncResult.AsyncState
115 { 115 {
116 get { 116 get {
117 throw new System.NotImplementedException (); 117 throw new System.NotImplementedException ();
118 } 118 }
119 } 119 }
120 120
121 WaitHandle IAsyncResult.AsyncWaitHandle 121 WaitHandle IAsyncResult.AsyncWaitHandle
122 { 122 {
123 get { return m_wh; } 123 get { return m_wh; }
124 } 124 }
125 125
126 bool IAsyncResult.CompletedSynchronously 126 bool IAsyncResult.CompletedSynchronously
127 { 127 {
128 get { return false; } 128 get { return false; }
129 } 129 }
130 130
131 bool IAsyncResult.IsCompleted 131 bool IAsyncResult.IsCompleted
132 { 132 {
133 get { return true; } 133 get { return true; }
134 } 134 }
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
155 TestHelpers.EnableLogging(); 155 TestHelpers.EnableLogging();
156 156
157 if (!Util.IsPlatformMono) 157 if (!Util.IsPlatformMono)
158 Assert.Ignore("Ignoring test since can only currently run on Mono"); 158 Assert.Ignore("Ignoring test since can only currently run on Mono");
159 159
160 string rawResponse = "boom"; 160 string rawResponse = "boom";
161 161
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
163 163
164 TestWebRequest twr = new TestWebRequest(); 164 TestWebRequest twr = new TestWebRequest();
165 //twr.OnEndGetResponse += ar => new TestHttpWebResponse(null, new StreamingContext()); 165 //twr.OnEndGetResponse += ar => new TestHttpWebResponse(null, new StreamingContext());
166 twr.OnEndGetResponse += ar => 166 twr.OnEndGetResponse += ar =>
167 { 167 {
168 SerializationInfo si = new SerializationInfo(typeof(HttpWebResponse), new FormatterConverter()); 168 SerializationInfo si = new SerializationInfo(typeof(HttpWebResponse), new FormatterConverter());
169 StreamingContext sc = new StreamingContext(); 169 StreamingContext sc = new StreamingContext();
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index f563c68..bb80a88 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
105 /// </summary> 105 /// </summary>
106 public int TotalUrls { get; set; } 106 public int TotalUrls { get; set; }
107 107
108 public Type ReplaceableInterface 108 public Type ReplaceableInterface
109 { 109 {
110 get { return null; } 110 get { return null; }
111 } 111 }
@@ -221,10 +221,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
221 urlData.allowXss = true; 221 urlData.allowXss = true;
222 222
223 m_UrlMap[url] = urlData; 223 m_UrlMap[url] = urlData;
224 224
225 string uri = "/lslhttp/" + urlcode.ToString() + "/"; 225 string uri = "/lslhttp/" + urlcode.ToString() + "/";
226 226
227 PollServiceEventArgs args 227 PollServiceEventArgs args
228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000);
229 args.Type = PollServiceEventArgs.EventType.LslHttp; 229 args.Type = PollServiceEventArgs.EventType.LslHttp;
230 m_HttpServer.AddPollServiceHTTPHandler(uri, args); 230 m_HttpServer.AddPollServiceHTTPHandler(uri, args);
@@ -270,12 +270,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
270 270
271 if (options != null && options["allowXss"] != null) 271 if (options != null && options["allowXss"] != null)
272 urlData.allowXss = true; 272 urlData.allowXss = true;
273 273
274 m_UrlMap[url] = urlData; 274 m_UrlMap[url] = urlData;
275 275
276 string uri = "/lslhttps/" + urlcode.ToString() + "/"; 276 string uri = "/lslhttps/" + urlcode.ToString() + "/";
277 277
278 PollServiceEventArgs args 278 PollServiceEventArgs args
279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000);
280 args.Type = PollServiceEventArgs.EventType.LslHttp; 280 args.Type = PollServiceEventArgs.EventType.LslHttp;
281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args); 281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args);
@@ -306,7 +306,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
306 foreach (UUID req in data.requests.Keys) 306 foreach (UUID req in data.requests.Keys)
307 m_RequestMap.Remove(req); 307 m_RequestMap.Remove(req);
308 } 308 }
309 309
310// m_log.DebugFormat( 310// m_log.DebugFormat(
311// "[URL MODULE]: Releasing url {0} for {1} in {2}", 311// "[URL MODULE]: Releasing url {0} for {1} in {2}",
312// url, data.itemID, data.hostID); 312// url, data.itemID, data.hostID);
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
315 m_UrlMap.Remove(url); 315 m_UrlMap.Remove(url);
316 } 316 }
317 } 317 }
318 318
319 public void HttpContentType(UUID request, string type) 319 public void HttpContentType(UUID request, string type)
320 { 320 {
321 lock (m_UrlMap) 321 lock (m_UrlMap)
@@ -331,7 +331,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
331 } 331 }
332 } 332 }
333 } 333 }
334 334
335 public void HttpResponse(UUID request, int status, string body) 335 public void HttpResponse(UUID request, int status, string body)
336 { 336 {
337 lock (m_RequestMap) 337 lock (m_RequestMap)
@@ -403,7 +403,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
403 public void ScriptRemoved(UUID itemID) 403 public void ScriptRemoved(UUID itemID)
404 { 404 {
405// m_log.DebugFormat("[URL MODULE]: Removing script {0}", itemID); 405// m_log.DebugFormat("[URL MODULE]: Removing script {0}", itemID);
406 406
407 lock (m_UrlMap) 407 lock (m_UrlMap)
408 { 408 {
409 List<string> removeURLs = new List<string>(); 409 List<string> removeURLs = new List<string>();
@@ -495,14 +495,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
495 return response; 495 return response;
496 } 496 }
497 497
498 498
499 return response; 499 return response;
500 } 500 }
501 501
502 private bool HasEvents(UUID requestID, UUID sessionID) 502 private bool HasEvents(UUID requestID, UUID sessionID)
503 { 503 {
504 UrlData url=null; 504 UrlData url=null;
505 505
506 lock (m_RequestMap) 506 lock (m_RequestMap)
507 { 507 {
508 if (!m_RequestMap.ContainsKey(requestID)) 508 if (!m_RequestMap.ContainsKey(requestID))
@@ -545,10 +545,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
545 { 545 {
546 requestData = url.requests[requestID]; 546 requestData = url.requests[requestID];
547 } 547 }
548 548
549 if (!requestData.requestDone) 549 if (!requestData.requestDone)
550 return NoEvents(requestID,sessionID); 550 return NoEvents(requestID,sessionID);
551 551
552 Hashtable response = new Hashtable(); 552 Hashtable response = new Hashtable();
553 553
554 if (System.Environment.TickCount - requestData.startTime > 25000) 554 if (System.Environment.TickCount - requestData.startTime > 25000)
@@ -569,7 +569,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
569 569
570 if (url.allowXss) 570 if (url.allowXss)
571 response["access_control_allow_origin"] = "*"; 571 response["access_control_allow_origin"] = "*";
572 572
573 //remove from map 573 //remove from map
574 lock (url.requests) 574 lock (url.requests)
575 { 575 {
@@ -627,7 +627,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
627 } 627 }
628 628
629 //for llGetHttpHeader support we need to store original URI here 629 //for llGetHttpHeader support we need to store original URI here
630 //to make x-path-info / x-query-string / x-script-url / x-remote-ip headers 630 //to make x-path-info / x-query-string / x-script-url / x-remote-ip headers
631 //as per http://wiki.secondlife.com/wiki/LlGetHTTPHeader 631 //as per http://wiki.secondlife.com/wiki/LlGetHTTPHeader
632 632
633 RequestData requestData = new RequestData(); 633 RequestData requestData = new RequestData();
@@ -689,7 +689,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
689 else 689 else
690 { 690 {
691 queryString = queryString + val + "&"; 691 queryString = queryString + val + "&";
692 } 692 }
693 } 693 }
694 } 694 }
695 if (queryString.Length > 1) 695 if (queryString.Length > 1)
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 7267515..673a453 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
98 return false; 98 return false;
99 } 99 }
100 100
101 public void GetDrawStringSize(string text, string fontName, int fontSize, 101 public void GetDrawStringSize(string text, string fontName, int fontSize,
102 out double xSize, out double ySize) 102 out double xSize, out double ySize)
103 { 103 {
104 xSize = 0; 104 xSize = 0;
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
124 { 124 {
125 if (m_scene == null) 125 if (m_scene == null)
126 m_scene = scene; 126 m_scene = scene;
127 127
128 } 128 }
129 129
130 public void RemoveRegion(Scene scene) 130 public void RemoveRegion(Scene scene)
@@ -166,15 +166,15 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
166 166
167 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); 167 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
168 request.AllowAutoRedirect = false; 168 request.AllowAutoRedirect = false;
169 169
170 if (!string.IsNullOrEmpty(m_proxyurl)) 170 if (!string.IsNullOrEmpty(m_proxyurl))
171 { 171 {
172 if (!string.IsNullOrEmpty(m_proxyexcepts)) 172 if (!string.IsNullOrEmpty(m_proxyexcepts))
173 { 173 {
174 string[] elist = m_proxyexcepts.Split(';'); 174 string[] elist = m_proxyexcepts.Split(';');
175 request.Proxy = new WebProxy(m_proxyurl, true, elist); 175 request.Proxy = new WebProxy(m_proxyurl, true, elist);
176 } 176 }
177 else 177 else
178 { 178 {
179 request.Proxy = new WebProxy(m_proxyurl, true); 179 request.Proxy = new WebProxy(m_proxyurl, true);
180 } 180 }
@@ -253,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
253 { 253 {
254 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); 254 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
255 } 255 }
256 } 256 }
257 catch (Exception) 257 catch (Exception)
258 { 258 {
259 m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!"); 259 m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!");
diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index ad33f23..9c3f08e 100644
--- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91 m_scriptModule = scene.RequestModuleInterface<IScriptModule>(); 91 m_scriptModule = scene.RequestModuleInterface<IScriptModule>();
92 92
93 if (m_scriptModule != null) 93 if (m_scriptModule != null)
94 m_log.Info("[MODULE COMMANDS]: Script engine found, module active"); 94 m_log.Info("[MODULE COMMANDS]: Script engine found, module active");
95 } 95 }
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
237 } 237 }
238 } 238 }
239 } 239 }
240 240
241 public Delegate[] GetScriptInvocationList() 241 public Delegate[] GetScriptInvocationList()
242 { 242 {
243 List<Delegate> ret = new List<Delegate>(); 243 List<Delegate> ret = new List<Delegate>();
@@ -361,14 +361,14 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
361 public object LookupModConstant(string cname) 361 public object LookupModConstant(string cname)
362 { 362 {
363 // m_log.DebugFormat("[MODULE COMMANDS] lookup constant <{0}>",cname); 363 // m_log.DebugFormat("[MODULE COMMANDS] lookup constant <{0}>",cname);
364 364
365 lock (m_constants) 365 lock (m_constants)
366 { 366 {
367 object value = null; 367 object value = null;
368 if (m_constants.TryGetValue(cname,out value)) 368 if (m_constants.TryGetValue(cname,out value))
369 return value; 369 return value;
370 } 370 }
371 371
372 return null; 372 return null;
373 } 373 }
374 374
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 2fc89fc..f12286d 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
117 return true; 117 return true;
118 } 118 }
119 119
120 public void GetDrawStringSize(string text, string fontName, int fontSize, 120 public void GetDrawStringSize(string text, string fontName, int fontSize,
121 out double xSize, out double ySize) 121 out double xSize, out double ySize)
122 { 122 {
123 lock (this) 123 lock (this)
@@ -209,32 +209,32 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
209 int alpha = 255; // 0 is transparent 209 int alpha = 255; // 0 is transparent
210 Color bgColor = Color.White; // Default background color 210 Color bgColor = Color.White; // Default background color
211 char altDataDelim = ';'; 211 char altDataDelim = ';';
212 212
213 char[] paramDelimiter = { ',' }; 213 char[] paramDelimiter = { ',' };
214 char[] nvpDelimiter = { ':' }; 214 char[] nvpDelimiter = { ':' };
215 215
216 extraParams = extraParams.Trim(); 216 extraParams = extraParams.Trim();
217 extraParams = extraParams.ToLower(); 217 extraParams = extraParams.ToLower();
218 218
219 string[] nvps = extraParams.Split(paramDelimiter); 219 string[] nvps = extraParams.Split(paramDelimiter);
220 220
221 int temp = -1; 221 int temp = -1;
222 foreach (string pair in nvps) 222 foreach (string pair in nvps)
223 { 223 {
224 string[] nvp = pair.Split(nvpDelimiter); 224 string[] nvp = pair.Split(nvpDelimiter);
225 string name = ""; 225 string name = "";
226 string value = ""; 226 string value = "";
227 227
228 if (nvp[0] != null) 228 if (nvp[0] != null)
229 { 229 {
230 name = nvp[0].Trim(); 230 name = nvp[0].Trim();
231 } 231 }
232 232
233 if (nvp.Length == 2) 233 if (nvp.Length == 2)
234 { 234 {
235 value = nvp[1].Trim(); 235 value = nvp[1].Trim();
236 } 236 }
237 237
238 switch (name) 238 switch (name)
239 { 239 {
240 case "width": 240 case "width":
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
301 if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) 301 if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
302 { 302 {
303 bgColor = Color.FromArgb(hex); 303 bgColor = Color.FromArgb(hex);
304 } 304 }
305 else 305 else
306 { 306 {
307 bgColor = Color.FromName(value); 307 bgColor = Color.FromName(value);
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
321 } 321 }
322 else 322 else
323 { 323 {
324 // this function used to accept an int on its own that represented both 324 // this function used to accept an int on its own that represented both
325 // width and height, this is to maintain backwards compat, could be removed 325 // width and height, this is to maintain backwards compat, could be removed
326 // but would break existing scripts 326 // but would break existing scripts
327 temp = parseIntParam(name); 327 temp = parseIntParam(name);
@@ -329,10 +329,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
329 { 329 {
330 if (temp > 1024) 330 if (temp > 1024)
331 temp = 1024; 331 temp = 1024;
332 332
333 if (temp < 128) 333 if (temp < 128)
334 temp = 128; 334 temp = 128;
335 335
336 width = temp; 336 width = temp;
337 height = temp; 337 height = temp;
338 } 338 }
@@ -358,10 +358,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
358 bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); 358 bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb);
359 else 359 else
360 bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); 360 bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb);
361 361
362 graph = Graphics.FromImage(bitmap); 362 graph = Graphics.FromImage(bitmap);
363 363
364 // this is really just to save people filling the 364 // this is really just to save people filling the
365 // background color in their scripts, only do when fully opaque 365 // background color in their scripts, only do when fully opaque
366 if (alpha >= 255) 366 if (alpha >= 255)
367 { 367 {
@@ -370,10 +370,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
370 graph.FillRectangle(bgFillBrush, 0, 0, width, height); 370 graph.FillRectangle(bgFillBrush, 0, 0, width, height);
371 } 371 }
372 } 372 }
373 373
374 for (int w = 0; w < bitmap.Width; w++) 374 for (int w = 0; w < bitmap.Width; w++)
375 { 375 {
376 if (alpha <= 255) 376 if (alpha <= 255)
377 { 377 {
378 for (int h = 0; h < bitmap.Height; h++) 378 for (int h = 0; h < bitmap.Height; h++)
379 { 379 {
@@ -381,10 +381,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
381 } 381 }
382 } 382 }
383 } 383 }
384 384
385 GDIDraw(data, graph, altDataDelim, out reuseable); 385 GDIDraw(data, graph, altDataDelim, out reuseable);
386 } 386 }
387 387
388 byte[] imageJ2000 = new byte[0]; 388 byte[] imageJ2000 = new byte[0];
389 389
390 // This code exists for testing purposes, please do not remove. 390 // This code exists for testing purposes, please do not remove.
@@ -394,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
394// imageJ2000 = s_asset2Data; 394// imageJ2000 = s_asset2Data;
395// 395//
396// s_flipper = !s_flipper; 396// s_flipper = !s_flipper;
397 397
398 try 398 try
399 { 399 {
400 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true); 400 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true);
@@ -420,13 +420,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
420 { 420 {
421 if (graph != null) 421 if (graph != null)
422 graph.Dispose(); 422 graph.Dispose();
423 423
424 if (bitmap != null) 424 if (bitmap != null)
425 bitmap.Dispose(); 425 bitmap.Dispose();
426 } 426 }
427 } 427 }
428 } 428 }
429 429
430 private int parseIntParam(string strInt) 430 private int parseIntParam(string strInt)
431 { 431 {
432 int parsed; 432 int parsed;
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
440 // m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString()); 440 // m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString());
441 parsed = -1; 441 parsed = -1;
442 } 442 }
443 443
444 return parsed; 444 return parsed;
445 } 445 }
446 446
@@ -572,7 +572,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
572 graph.DrawString("not an image. Please check URL.", errorFont, 572 graph.DrawString("not an image. Please check URL.", errorFont,
573 myBrush, new Point(startPoint.X, 12 + startPoint.Y)); 573 myBrush, new Point(startPoint.X, 12 + startPoint.Y));
574 } 574 }
575 575
576 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); 576 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y);
577 } 577 }
578 } 578 }
@@ -638,11 +638,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
638 { 638 {
639 nextLine = nextLine.Remove(0, 8); 639 nextLine = nextLine.Remove(0, 8);
640 nextLine = nextLine.Trim(); 640 nextLine = nextLine.Trim();
641 641
642 string[] fprops = nextLine.Split(partsDelimiter); 642 string[] fprops = nextLine.Split(partsDelimiter);
643 foreach (string prop in fprops) 643 foreach (string prop in fprops)
644 { 644 {
645 645
646 switch (prop) 646 switch (prop)
647 { 647 {
648 case "B": 648 case "B":
@@ -717,7 +717,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
717 else if (cap[0].ToLower() != "both") 717 else if (cap[0].ToLower() != "both")
718 return; 718 return;
719 string type = cap[1].ToLower(); 719 string type = cap[1].ToLower();
720 720
721 if (end) 721 if (end)
722 { 722 {
723 switch (type) 723 switch (type)
@@ -760,7 +760,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
760 nextLine = nextLine.Remove(0, 9); 760 nextLine = nextLine.Remove(0, 9);
761 nextLine = nextLine.Trim(); 761 nextLine = nextLine.Trim();
762 int hex = 0; 762 int hex = 0;
763 763
764 Color newColor; 764 Color newColor;
765 if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) 765 if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
766 { 766 {
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index e1c0cd7..660e03f 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -417,7 +417,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
417 continue; 417 continue;
418 if (m_scene.GetSceneObjectPart(liHostID) == null) 418 if (m_scene.GetSceneObjectPart(liHostID) == null)
419 continue; 419 continue;
420 420
421 if (targets.Contains(liHostID)) 421 if (targets.Contains(liHostID))
422 QueueMessage(new ListenerInfo(li, name, id, msg)); 422 QueueMessage(new ListenerInfo(li, name, id, msg));
423 } 423 }
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
index 87f4277..aed1372 100644
--- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -621,7 +621,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
621 private Thread httpThread; 621 private Thread httpThread;
622 public int Idata; 622 public int Idata;
623 private UUID _itemID; 623 private UUID _itemID;
624 public UUID ItemID 624 public UUID ItemID
625 { 625 {
626 get { return _itemID; } 626 get { return _itemID; }
627 set { _itemID = value; } 627 set { _itemID = value; }
@@ -633,7 +633,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
633 set { _localID = value; } 633 set { _localID = value; }
634 } 634 }
635 private UUID _reqID; 635 private UUID _reqID;
636 public UUID ReqID 636 public UUID ReqID
637 { 637 {
638 get { return _reqID; } 638 get { return _reqID; }
639 set { _reqID = value; } 639 set { _reqID = value; }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
index 7b4668a..2c882e6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 private static bool m_Enabled = false; 47 private static bool m_Enabled = false;
48 48
49 private IConfigSource m_Config; 49 private IConfigSource m_Config;
50 bool m_Registered = false; 50 bool m_Registered = false;
51 51
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
74 { 74 {
75 } 75 }
76 76
77 public Type ReplaceableInterface 77 public Type ReplaceableInterface
78 { 78 {
79 get { return null; } 79 get { return null; }
80 } 80 }
@@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
95 95
96 m_log.Info("[HGAssetService]: Starting..."); 96 m_log.Info("[HGAssetService]: Starting...");
97 97
98 98
99 Object[] args = new Object[] { m_Config, MainServer.Instance, "HGAssetService" }; 99 Object[] args = new Object[] { m_Config, MainServer.Instance, "HGAssetService" };
100 100
101 ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args); 101 ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs
index 2cdffe6..a8c4e3c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private static bool m_Enabled = false; 49 private static bool m_Enabled = false;
50 50
51 private IConfigSource m_Config; 51 private IConfigSource m_Config;
52 bool m_Registered = false; 52 bool m_Registered = false;
53 53
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication
77 { 77 {
78 } 78 }
79 79
80 public Type ReplaceableInterface 80 public Type ReplaceableInterface
81 { 81 {
82 get { return null; } 82 get { return null; }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs
index 22857d0..834cbb7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private static bool m_Enabled = false; 49 private static bool m_Enabled = false;
50 50
51 private IConfigSource m_Config; 51 private IConfigSource m_Config;
52 bool m_Registered = false; 52 bool m_Registered = false;
53 53
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid
77 { 77 {
78 } 78 }
79 79
80 public Type ReplaceableInterface 80 public Type ReplaceableInterface
81 { 81 {
82 get { return null; } 82 get { return null; }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs
index f749295..4f87595 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid
48 { 48 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 private static bool m_Enabled = false; 50 private static bool m_Enabled = false;
51 51
52 private IConfigSource m_Config; 52 private IConfigSource m_Config;
53 private bool m_Registered = false; 53 private bool m_Registered = false;
54 private string m_LocalServiceDll = String.Empty; 54 private string m_LocalServiceDll = String.Empty;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid
88 { 88 {
89 } 89 }
90 90
91 public Type ReplaceableInterface 91 public Type ReplaceableInterface
92 { 92 {
93 get { return null; } 93 get { return null; }
94 } 94 }
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid
130 m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); 130 m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService);
131 131
132 m_UASHandler = new UserAgentServerConnector(m_Config, MainServer.Instance, friendsConn); 132 m_UASHandler = new UserAgentServerConnector(m_Config, MainServer.Instance, friendsConn);
133 133
134 new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService"); 134 new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService");
135 135
136 new HGFriendsServerConnector(m_Config, MainServer.Instance, "HGFriendsService", friendsConn); 136 new HGFriendsServerConnector(m_Config, MainServer.Instance, "HGFriendsService", friendsConn);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
index 0a4e736..61e37a9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 private static bool m_Enabled = false; 47 private static bool m_Enabled = false;
48 48
49 private IConfigSource m_Config; 49 private IConfigSource m_Config;
50 bool m_Registered = false; 50 bool m_Registered = false;
51 51
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
73 { 73 {
74 } 74 }
75 75
76 public Type ReplaceableInterface 76 public Type ReplaceableInterface
77 { 77 {
78 get { return null; } 78 get { return null; }
79 } 79 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
index 1273f0d..21483c5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
84 { 84 {
85 } 85 }
86 86
87 public Type ReplaceableInterface 87 public Type ReplaceableInterface
88 { 88 {
89 get { return null; } 89 get { return null; }
90 } 90 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs
index 425febd..065dd94 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login
84 { 84 {
85 } 85 }
86 86
87 public Type ReplaceableInterface 87 public Type ReplaceableInterface
88 { 88 {
89 get { return null; } 89 get { return null; }
90 } 90 }
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login
113 { 113 {
114 if (!m_Enabled) 114 if (!m_Enabled)
115 return; 115 return;
116 116
117 if (!m_Registered) 117 if (!m_Registered)
118 { 118 {
119 m_Registered = true; 119 m_Registered = true;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs
index c14bce7..a75a156 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private static bool m_Enabled = false; 49 private static bool m_Enabled = false;
50 50
51 private IConfigSource m_Config; 51 private IConfigSource m_Config;
52 52
53 #region Region Module interface 53 #region Region Module interface
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage
75 { 75 {
76 } 76 }
77 77
78 public Type ReplaceableInterface 78 public Type ReplaceableInterface
79 { 79 {
80 get { return null; } 80 get { return null; }
81 } 81 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
index 6bf47cb..09c545c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
83 { 83 {
84 } 84 }
85 85
86 public Type ReplaceableInterface 86 public Type ReplaceableInterface
87 { 87 {
88 get { return null; } 88 get { return null; }
89 } 89 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
index 57d1132..7ba39d4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
77 { 77 {
78 } 78 }
79 79
80 public Type ReplaceableInterface 80 public Type ReplaceableInterface
81 { 81 {
82 get { return null; } 82 get { return null; }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
index 4701ee6..9e75ee2 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
@@ -77,8 +77,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
77 { 77 {
78 get; private set; 78 get; private set;
79 } 79 }
80 80
81 public Type ReplaceableInterface 81 public Type ReplaceableInterface
82 { 82 {
83 get { return null; } 83 get { return null; }
84 } 84 }
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
87 { 87 {
88 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params"); 88 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params");
89 } 89 }
90 90
91 public LocalUserProfilesServicesConnector(IConfigSource source) 91 public LocalUserProfilesServicesConnector(IConfigSource source)
92 { 92 {
93 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly."); 93 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly.");
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
97 public void InitialiseService(IConfigSource source) 97 public void InitialiseService(IConfigSource source)
98 { 98 {
99 ConfigName = "UserProfilesService"; 99 ConfigName = "UserProfilesService";
100 100
101 // Instantiate the request handler 101 // Instantiate the request handler
102 IHttpServer Server = MainServer.Instance; 102 IHttpServer Server = MainServer.Instance;
103 103
@@ -107,35 +107,35 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
107 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini"); 107 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini");
108 return; 108 return;
109 } 109 }
110 110
111 if(!config.GetBoolean("Enabled",false)) 111 if(!config.GetBoolean("Enabled",false))
112 { 112 {
113 Enabled = false; 113 Enabled = false;
114 return; 114 return;
115 } 115 }
116 116
117 Enabled = true; 117 Enabled = true;
118 118
119 string serviceDll = config.GetString("LocalServiceModule", 119 string serviceDll = config.GetString("LocalServiceModule",
120 String.Empty); 120 String.Empty);
121 121
122 if (serviceDll == String.Empty) 122 if (serviceDll == String.Empty)
123 { 123 {
124 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: No LocalServiceModule named in section UserProfilesService"); 124 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: No LocalServiceModule named in section UserProfilesService");
125 return; 125 return;
126 } 126 }
127 127
128 Object[] args = new Object[] { source, ConfigName }; 128 Object[] args = new Object[] { source, ConfigName };
129 ServiceModule = 129 ServiceModule =
130 ServerUtils.LoadPlugin<IUserProfilesService>(serviceDll, 130 ServerUtils.LoadPlugin<IUserProfilesService>(serviceDll,
131 args); 131 args);
132 132
133 if (ServiceModule == null) 133 if (ServiceModule == null)
134 { 134 {
135 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: Can't load user profiles service"); 135 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: Can't load user profiles service");
136 return; 136 return;
137 } 137 }
138 138
139 Enabled = true; 139 Enabled = true;
140 140
141 JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule); 141 JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule);
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
196 { 196 {
197 if (!Enabled) 197 if (!Enabled)
198 return; 198 return;
199 199
200 lock (regions) 200 lock (regions)
201 { 201 {
202 if (regions.ContainsKey(scene.RegionInfo.RegionID)) 202 if (regions.ContainsKey(scene.RegionInfo.RegionID))
@@ -209,7 +209,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
209 void IRegionModuleBase.RemoveRegion(Scene scene) 209 void IRegionModuleBase.RemoveRegion(Scene scene)
210 { 210 {
211 if (!Enabled) 211 if (!Enabled)
212 return; 212 return;
213 213
214 lock (regions) 214 lock (regions)
215 { 215 {
@@ -221,7 +221,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
221 void IRegionModuleBase.RegionLoaded(Scene scene) 221 void IRegionModuleBase.RegionLoaded(Scene scene)
222 { 222 {
223 if (!Enabled) 223 if (!Enabled)
224 return; 224 return;
225 } 225 }
226 #endregion 226 #endregion
227 } 227 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs
index 41ae53f..5cd68d9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences
50 50
51 #region ISharedRegionModule 51 #region ISharedRegionModule
52 52
53 public Type ReplaceableInterface 53 public Type ReplaceableInterface
54 { 54 {
55 get { return null; } 55 get { return null; }
56 } 56 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs
index a827c4c..d60236a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs
@@ -44,14 +44,14 @@ using Nini.Config;
44namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences 44namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences
45{ 45{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAgentPreferencesServicesConnector")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAgentPreferencesServicesConnector")]
47 public class RemoteAgentPreferencesServicesConnector : AgentPreferencesServicesConnector, 47 public class RemoteAgentPreferencesServicesConnector : AgentPreferencesServicesConnector,
48 ISharedRegionModule, IAgentPreferencesService 48 ISharedRegionModule, IAgentPreferencesService
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private bool m_Enabled = false; 52 private bool m_Enabled = false;
53 53
54 public Type ReplaceableInterface 54 public Type ReplaceableInterface
55 { 55 {
56 get { return null; } 56 get { return null; }
57 } 57 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
index 31d1129..f5aa971 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
59 59
60 private AssetPermissions m_AssetPerms; 60 private AssetPermissions m_AssetPerms;
61 61
62 public Type ReplaceableInterface 62 public Type ReplaceableInterface
63 { 63 {
64 get { return null; } 64 get { return null; }
65 } 65 }
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
159 { 159 {
160 if (!m_Enabled) 160 if (!m_Enabled)
161 return; 161 return;
162 162
163 m_aScene = scene; 163 m_aScene = scene;
164 164
165 m_aScene.RegisterModuleInterface<IAssetService>(this); 165 m_aScene.RegisterModuleInterface<IAssetService>(this);
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
180 180
181 if (!(m_Cache is ISharedRegionModule)) 181 if (!(m_Cache is ISharedRegionModule))
182 m_Cache = null; 182 m_Cache = null;
183 183
184 } 184 }
185 185
186 m_log.InfoFormat("[HG ASSET CONNECTOR]: Enabled hypergrid asset broker for region {0}", scene.RegionInfo.RegionName); 186 m_log.InfoFormat("[HG ASSET CONNECTOR]: Enabled hypergrid asset broker for region {0}", scene.RegionInfo.RegionName);
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
206 { 206 {
207 //m_log.DebugFormat("[HG ASSET CONNECTOR]: Get {0}", id); 207 //m_log.DebugFormat("[HG ASSET CONNECTOR]: Get {0}", id);
208 AssetBase asset = null; 208 AssetBase asset = null;
209 209
210 if (m_Cache != null) 210 if (m_Cache != null)
211 { 211 {
212 asset = m_Cache.Get(id); 212 asset = m_Cache.Get(id);
@@ -247,7 +247,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
247 public AssetMetadata GetMetadata(string id) 247 public AssetMetadata GetMetadata(string id)
248 { 248 {
249 AssetBase asset = null; 249 AssetBase asset = null;
250 250
251 if (m_Cache != null) 251 if (m_Cache != null)
252 { 252 {
253 if (m_Cache != null) 253 if (m_Cache != null)
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
270 public byte[] GetData(string id) 270 public byte[] GetData(string id)
271 { 271 {
272 AssetBase asset = null; 272 AssetBase asset = null;
273 273
274 if (m_Cache != null) 274 if (m_Cache != null)
275 { 275 {
276 if (m_Cache != null) 276 if (m_Cache != null)
@@ -290,7 +290,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
290 public bool Get(string id, Object sender, AssetRetrieved handler) 290 public bool Get(string id, Object sender, AssetRetrieved handler)
291 { 291 {
292 AssetBase asset = null; 292 AssetBase asset = null;
293 293
294 if (m_Cache != null) 294 if (m_Cache != null)
295 asset = m_Cache.Get(id); 295 asset = m_Cache.Get(id);
296 296
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
348 348
349 bool isHG = IsHG(asset.ID); 349 bool isHG = IsHG(asset.ID);
350 if ((m_Cache != null) && !isHG) 350 if ((m_Cache != null) && !isHG)
351 // Don't store it in the cache if the asset is to 351 // Don't store it in the cache if the asset is to
352 // be sent to the other grid, because this is already 352 // be sent to the other grid, because this is already
353 // a copy of the local asset. 353 // a copy of the local asset.
354 m_Cache.Cache(asset); 354 m_Cache.Cache(asset);
@@ -366,7 +366,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
366 366
367 if (String.IsNullOrEmpty(id)) 367 if (String.IsNullOrEmpty(id))
368 return string.Empty; 368 return string.Empty;
369 369
370 if(asset.ID != id) 370 if(asset.ID != id)
371 { 371 {
372 asset.ID = id; 372 asset.ID = id;
@@ -380,7 +380,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
380 public bool UpdateContent(string id, byte[] data) 380 public bool UpdateContent(string id, byte[] data)
381 { 381 {
382 AssetBase asset = null; 382 AssetBase asset = null;
383 383
384 if (m_Cache != null) 384 if (m_Cache != null)
385 asset = m_Cache.Get(id); 385 asset = m_Cache.Get(id);
386 386
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index d5d6667..7190aa0 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
50 50
51 private bool m_Enabled = false; 51 private bool m_Enabled = false;
52 52
53 public Type ReplaceableInterface 53 public Type ReplaceableInterface
54 { 54 {
55 get { return null; } 55 get { return null; }
56 } 56 }
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
155 public AssetBase Get(string id) 155 public AssetBase Get(string id)
156 { 156 {
157// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id); 157// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id);
158 158
159 AssetBase asset = null; 159 AssetBase asset = null;
160 if (m_Cache != null) 160 if (m_Cache != null)
161 asset = m_Cache.Get(id); 161 asset = m_Cache.Get(id);
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
169// if (null == asset) 169// if (null == asset)
170// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id); 170// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id);
171 } 171 }
172 172
173 return asset; 173 return asset;
174 } 174 }
175 175
@@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
193 return asset.Metadata; 193 return asset.Metadata;
194 194
195 asset = m_AssetService.Get(id); 195 asset = m_AssetService.Get(id);
196 if (asset != null) 196 if (asset != null)
197 { 197 {
198 if (m_Cache != null) 198 if (m_Cache != null)
199 m_Cache.Cache(asset); 199 m_Cache.Cache(asset);
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
229 public bool Get(string id, Object sender, AssetRetrieved handler) 229 public bool Get(string id, Object sender, AssetRetrieved handler)
230 { 230 {
231// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id); 231// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id);
232 232
233 if (m_Cache != null) 233 if (m_Cache != null)
234 { 234 {
235 AssetBase asset = m_Cache.Get(id); 235 AssetBase asset = m_Cache.Get(id);
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
264 { 264 {
265 if (m_Cache != null) 265 if (m_Cache != null)
266 m_Cache.Cache(asset); 266 m_Cache.Cache(asset);
267 267
268 if (asset.Local) 268 if (asset.Local)
269 { 269 {
270// m_log.DebugFormat( 270// m_log.DebugFormat(
@@ -278,7 +278,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
278// m_log.DebugFormat( 278// m_log.DebugFormat(
279// "[LOCAL ASSET SERVICE CONNECTOR]: Passing {0} {1} on to asset service for storage, status Temporary = {2}, Local = {3}", 279// "[LOCAL ASSET SERVICE CONNECTOR]: Passing {0} {1} on to asset service for storage, status Temporary = {2}, Local = {3}",
280// asset.Name, asset.ID, asset.Temporary, asset.Local); 280// asset.Name, asset.ID, asset.Temporary, asset.Local);
281 281
282 return m_AssetService.Store(asset); 282 return m_AssetService.Store(asset);
283 } 283 }
284 } 284 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
index ff04f9d..1225ab5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
50 private bool m_Enabled = false; 50 private bool m_Enabled = false;
51 private IAssetCache m_Cache; 51 private IAssetCache m_Cache;
52 52
53 public Type ReplaceableInterface 53 public Type ReplaceableInterface
54 { 54 {
55 get { return null; } 55 get { return null; }
56 } 56 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs
index f027810..8017245 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
53 53
54 #region ISharedRegionModule 54 #region ISharedRegionModule
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
@@ -143,13 +143,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
143 { 143 {
144 // Not implemented at the regions 144 // Not implemented at the regions
145 realID = UUID.Zero; 145 realID = UUID.Zero;
146 return string.Empty; 146 return string.Empty;
147 } 147 }
148 148
149 public string Authenticate(UUID principalID, string password, int lifetime) 149 public string Authenticate(UUID principalID, string password, int lifetime)
150 { 150 {
151 // Not implemented at the regions 151 // Not implemented at the regions
152 return string.Empty; 152 return string.Empty;
153 } 153 }
154 154
155 public bool Verify(UUID principalID, string token, int lifetime) 155 public bool Verify(UUID principalID, string token, int lifetime)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs
index 7cb8b22..fd1d802 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
47 47
48 private bool m_Enabled = false; 48 private bool m_Enabled = false;
49 49
50 public Type ReplaceableInterface 50 public Type ReplaceableInterface
51 { 51 {
52 get { return null; } 52 get { return null; }
53 } 53 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index 1acb695..0be0676 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
53 53
54 private bool m_Enabled = false; 54 private bool m_Enabled = false;
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
66 public void Initialise(IConfigSource source) 66 public void Initialise(IConfigSource source)
67 { 67 {
68 m_log.Info("[AUTHORIZATION CONNECTOR]: Initialise"); 68 m_log.Info("[AUTHORIZATION CONNECTOR]: Initialise");
69 69
70 IConfig moduleConfig = source.Configs["Modules"]; 70 IConfig moduleConfig = source.Configs["Modules"];
71 if (moduleConfig != null) 71 if (moduleConfig != null)
72 { 72 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index b8d409d..f312b0d 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
51 private bool m_Enabled = false; 51 private bool m_Enabled = false;
52 private List<Scene> m_scenes = new List<Scene>(); 52 private List<Scene> m_scenes = new List<Scene>();
53 53
54 public Type ReplaceableInterface 54 public Type ReplaceableInterface
55 { 55 {
56 get { return null; } 56 get { return null; }
57 } 57 }
@@ -103,7 +103,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
103 m_scenes.Add(scene); 103 m_scenes.Add(scene);
104 scene.RegisterModuleInterface<IAuthorizationService>(this); 104 scene.RegisterModuleInterface<IAuthorizationService>(this);
105 } 105 }
106 106
107 } 107 }
108 108
109 public void RemoveRegion(Scene scene) 109 public void RemoveRegion(Scene scene)
@@ -118,16 +118,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
118 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: Enabled remote authorization for region {0}", scene.RegionInfo.RegionName); 118 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: Enabled remote authorization for region {0}", scene.RegionInfo.RegionName);
119 119
120 } 120 }
121 121
122 public bool IsAuthorizedForRegion( 122 public bool IsAuthorizedForRegion(
123 string userID, string firstName, string lastName, string regionID, out string message) 123 string userID, string firstName, string lastName, string regionID, out string message)
124 { 124 {
125 m_log.InfoFormat( 125 m_log.InfoFormat(
126 "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); 126 "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
127 127
128 bool isAuthorized = true; 128 bool isAuthorized = true;
129 message = String.Empty; 129 message = String.Empty;
130 130
131 // get the scene this call is being made for 131 // get the scene this call is being made for
132 Scene scene = null; 132 Scene scene = null;
133 lock (m_scenes) 133 lock (m_scenes)
@@ -140,11 +140,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 } 140 }
141 } 141 }
142 } 142 }
143 143
144 if (scene != null) 144 if (scene != null)
145 { 145 {
146 string mail = String.Empty; 146 string mail = String.Empty;
147 147
148 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID)); 148 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
149 149
150 //if account not found, we assume its a foreign visitor from HG, else use account data... 150 //if account not found, we assume its a foreign visitor from HG, else use account data...
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
165 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}", 165 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}",
166 regionID); 166 regionID);
167 } 167 }
168 168
169 return isAuthorized; 169 return isAuthorized;
170 } 170 }
171 } 171 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs
index c3ef588..42f6c3f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
54 54
55 #region ISharedRegionModule 55 #region ISharedRegionModule
56 56
57 public Type ReplaceableInterface 57 public Type ReplaceableInterface
58 { 58 {
59 get { return null; } 59 get { return null; }
60 } 60 }
@@ -144,12 +144,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
144 { 144 {
145 return m_AvatarService.GetAppearance(userID); 145 return m_AvatarService.GetAppearance(userID);
146 } 146 }
147 147
148 public bool SetAppearance(UUID userID, AvatarAppearance appearance) 148 public bool SetAppearance(UUID userID, AvatarAppearance appearance)
149 { 149 {
150 return m_AvatarService.SetAppearance(userID,appearance); 150 return m_AvatarService.SetAppearance(userID,appearance);
151 } 151 }
152 152
153 public AvatarData GetAvatar(UUID userID) 153 public AvatarData GetAvatar(UUID userID)
154 { 154 {
155 return m_AvatarService.GetAvatar(userID); 155 return m_AvatarService.GetAvatar(userID);
@@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
174 { 174 {
175 return m_AvatarService.RemoveItems(userID, names); 175 return m_AvatarService.RemoveItems(userID, names);
176 } 176 }
177 177
178 #endregion 178 #endregion
179 179
180 } 180 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
index a087aea..37cfbbc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
47 47
48 private bool m_Enabled = false; 48 private bool m_Enabled = false;
49 49
50 public Type ReplaceableInterface 50 public Type ReplaceableInterface
51 { 51 {
52 get { return null; } 52 get { return null; }
53 } 53 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 70733fc..d220568 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
64 public LocalGridServicesConnector(IConfigSource source) 64 public LocalGridServicesConnector(IConfigSource source)
65 { 65 {
66 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); 66 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
67 InitialiseService(source, null); 67 InitialiseService(source, null);
68 } 68 }
69 69
70 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) 70 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
75 75
76 #region ISharedRegionModule 76 #region ISharedRegionModule
77 77
78 public Type ReplaceableInterface 78 public Type ReplaceableInterface
79 { 79 {
80 get { return null; } 80 get { return null; }
81 } 81 }
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
92 { 92 {
93 string name = moduleConfig.GetString("GridServices", ""); 93 string name = moduleConfig.GetString("GridServices", "");
94 if (name == Name) 94 if (name == Name)
95 { 95 {
96 if(InitialiseService(source, null)) 96 if(InitialiseService(source, null))
97 m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); 97 m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled");
98 } 98 }
@@ -190,8 +190,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
190 // This shouldn't happen 190 // This shouldn't happen
191 if (region == null) 191 if (region == null)
192 return; 192 return;
193 193
194 m_RegionInfoCache.CacheNearNeighbour(region.ScopeID, region); 194 m_RegionInfoCache.CacheNearNeighbour(region.ScopeID, region);
195 } 195 }
196 196
197 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 197 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
206 206
207 public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) 207 public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
208 { 208 {
209 return m_GridService.GetNeighbours(scopeID, regionID); 209 return m_GridService.GetNeighbours(scopeID, regionID);
210 } 210 }
211 211
212 public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) 212 public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
@@ -282,7 +282,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
282 { 282 {
283 return m_GridService.GetHyperlinks(scopeID); 283 return m_GridService.GetHyperlinks(scopeID);
284 } 284 }
285 285
286 public int GetRegionFlags(UUID scopeID, UUID regionID) 286 public int GetRegionFlags(UUID scopeID, UUID regionID)
287 { 287 {
288 return m_GridService.GetRegionFlags(scopeID, regionID); 288 return m_GridService.GetRegionFlags(scopeID, regionID);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
index 5eb525b..84e52f7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
44// private static readonly ILog m_log = 44// private static readonly ILog m_log =
45// LogManager.GetLogger( 45// LogManager.GetLogger(
46// MethodBase.GetCurrentMethod().DeclaringType); 46// MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private static RegionsExpiringCache m_Cache; 48 private static RegionsExpiringCache m_Cache;
49 private int numberInstances; 49 private int numberInstances;
50 50
@@ -60,12 +60,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
60 if (rinfo != null) 60 if (rinfo != null)
61 this.Cache(rinfo.ScopeID, rinfo); 61 this.Cache(rinfo.ScopeID, rinfo);
62 } 62 }
63 63
64 public void Cache(UUID scopeID, GridRegion rinfo) 64 public void Cache(UUID scopeID, GridRegion rinfo)
65 { 65 {
66 if (rinfo == null) 66 if (rinfo == null)
67 return; 67 return;
68 68
69 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); 69 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS);
70 } 70 }
71 71
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
73 { 73 {
74 if (rinfo == null) 74 if (rinfo == null)
75 return; 75 return;
76 76
77 m_Cache.AddOrUpdate(rinfo.ScopeID, rinfo, 1e7f); 77 m_Cache.AddOrUpdate(rinfo.ScopeID, rinfo, 1e7f);
78 } 78 }
79 79
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
81 { 81 {
82 if (rinfo == null) 82 if (rinfo == null)
83 return; 83 return;
84 84
85 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); 85 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS);
86 } 86 }
87 87
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
89 { 89 {
90 if (rinfo == null) 90 if (rinfo == null)
91 return; 91 return;
92 92
93 m_Cache.AddOrUpdate(scopeID, rinfo, expireSeconds); 93 m_Cache.AddOrUpdate(scopeID, rinfo, expireSeconds);
94 } 94 }
95 95
@@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
141 inCache = true; 141 inCache = true;
142 return rinfo; 142 return rinfo;
143 } 143 }
144 144
145 return null; 145 return null;
146 } 146 }
147 147
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
155 inCache = true; 155 inCache = true;
156 return rinfo; 156 return rinfo;
157 } 157 }
158 158
159 return null; 159 return null;
160 } 160 }
161 } 161 }
@@ -300,7 +300,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
300 private Dictionary<string, ulong> byname; 300 private Dictionary<string, ulong> byname;
301 private Dictionary<UUID, ulong> byuuid; 301 private Dictionary<UUID, ulong> byuuid;
302 // includes handles to the inside of large regions 302 // includes handles to the inside of large regions
303 private Dictionary<ulong, ulong> innerHandles = new Dictionary<ulong, ulong>(); 303 private Dictionary<ulong, ulong> innerHandles = new Dictionary<ulong, ulong>();
304 304
305 public RegionInfoForScope() 305 public RegionInfoForScope()
306 { 306 {
@@ -342,7 +342,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
342 byuuid = new Dictionary<UUID, ulong>(); 342 byuuid = new Dictionary<UUID, ulong>();
343 343
344 storage[handle] = region; 344 storage[handle] = region;
345 expires[handle] = expire; 345 expires[handle] = expire;
346 byname[region.RegionName] = handle; 346 byname[region.RegionName] = handle;
347 byuuid[region.RegionID] = handle; 347 byuuid[region.RegionID] = handle;
348 348
@@ -385,7 +385,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
385 storage[handle] = region; 385 storage[handle] = region;
386 byname[region.RegionName] = handle; 386 byname[region.RegionName] = handle;
387 byuuid[region.RegionID] = handle; 387 byuuid[region.RegionID] = handle;
388 388
389 } 389 }
390 390
391 public void Remove(GridRegion region) 391 public void Remove(GridRegion region)
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
483 483
484 if(!innerHandles.ContainsKey(handle)) 484 if(!innerHandles.ContainsKey(handle))
485 return null; 485 return null;
486 486
487 ulong rhandle = innerHandles[handle]; 487 ulong rhandle = innerHandles[handle];
488 if(storage.ContainsKey(rhandle)) 488 if(storage.ContainsKey(rhandle))
489 return storage[rhandle]; 489 return storage[rhandle];
@@ -495,7 +495,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
495 { 495 {
496 if(byname == null || !byname.ContainsKey(name)) 496 if(byname == null || !byname.ContainsKey(name))
497 return null; 497 return null;
498 498
499 ulong handle = byname[name]; 499 ulong handle = byname[name];
500 if(storage.ContainsKey(handle)) 500 if(storage.ContainsKey(handle))
501 return storage[handle]; 501 return storage[handle];
@@ -528,7 +528,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
528 528
529 if(!innerHandles.ContainsKey(handle)) 529 if(!innerHandles.ContainsKey(handle))
530 return null; 530 return null;
531 531
532 ulong rhandle = innerHandles[handle]; 532 ulong rhandle = innerHandles[handle];
533 if(!storage.ContainsKey(rhandle)) 533 if(!storage.ContainsKey(rhandle))
534 return null; 534 return null;
@@ -536,7 +536,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
536 GridRegion r = storage[rhandle]; 536 GridRegion r = storage[rhandle];
537 if(r == null) 537 if(r == null)
538 return null; 538 return null;
539 539
540 // extra check, possible redundant 540 // extra check, possible redundant
541 541
542 int test = r.RegionLocX; 542 int test = r.RegionLocX;
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
552 if (y < test) 552 if (y < test)
553 return r; 553 return r;
554 554
555/* 555/*
556 // next do the harder work 556 // next do the harder work
557 foreach(KeyValuePair<ulong, GridRegion> kvp in storage) 557 foreach(KeyValuePair<ulong, GridRegion> kvp in storage)
558 { 558 {
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
588 if(kvp.Value < now) 588 if(kvp.Value < now)
589 toexpire.Add(kvp.Key); 589 toexpire.Add(kvp.Key);
590 } 590 }
591 591
592 if(toexpire.Count == 0) 592 if(toexpire.Count == 0)
593 return expires.Count; 593 return expires.Count;
594 594
@@ -597,7 +597,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
597 Clear(); 597 Clear();
598 return 0; 598 return 0;
599 } 599 }
600 600
601 foreach(ulong h in toexpire) 601 foreach(ulong h in toexpire)
602 { 602 {
603 if(storage != null) 603 if(storage != null)
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
658 innerHandles[fh.toHandle()] = handle; 658 innerHandles[fh.toHandle()] = handle;
659 fh.y += 256; 659 fh.y += 256;
660 } 660 }
661 661
662 fh.y = startY; 662 fh.y = startY;
663 fh.x += 256; 663 fh.x += 256;
664 } 664 }
@@ -684,18 +684,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
684 innerHandles.Remove(fh.toHandle()); 684 innerHandles.Remove(fh.toHandle());
685 fh.y += 256; 685 fh.y += 256;
686 } 686 }
687 687
688 fh.y = startY; 688 fh.y = startY;
689 fh.x += 256; 689 fh.x += 256;
690 } 690 }
691 } 691 }
692 } 692 }
693 693
694 public class RegionsExpiringCache 694 public class RegionsExpiringCache
695 { 695 {
696 const double CACHE_PURGE_HZ = 60; // seconds 696 const double CACHE_PURGE_HZ = 60; // seconds
697 const int MAX_LOCK_WAIT = 10000; // milliseconds 697 const int MAX_LOCK_WAIT = 10000; // milliseconds
698 698
699 /// <summary>For thread safety</summary> 699 /// <summary>For thread safety</summary>
700 object syncRoot = new object(); 700 object syncRoot = new object();
701 /// <summary>For thread safety</summary> 701 /// <summary>For thread safety</summary>
@@ -728,7 +728,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
728 ris = new RegionInfoForScope(region, expire); 728 ris = new RegionInfoForScope(region, expire);
729 InfobyScope[scope] = ris; 729 InfobyScope[scope] = ris;
730 } 730 }
731 else 731 else
732 ris.AddUpdate(region, expire); 732 ris.AddUpdate(region, expire);
733 733
734 return true; 734 return true;
@@ -748,7 +748,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
748 } 748 }
749 finally { Monitor.Exit(syncRoot); } 749 finally { Monitor.Exit(syncRoot); }
750 } 750 }
751 751
752 public bool Contains(UUID scope, GridRegion region) 752 public bool Contains(UUID scope, GridRegion region)
753 { 753 {
754 if(region == null) 754 if(region == null)
@@ -758,11 +758,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
758 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 758 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
759 759
760 try 760 try
761 { 761 {
762 RegionInfoForScope ris = null; 762 RegionInfoForScope ris = null;
763 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 763 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
764 return false; 764 return false;
765 765
766 return ris.Contains(region); 766 return ris.Contains(region);
767 } 767 }
768 finally { Monitor.Exit(syncRoot); } 768 finally { Monitor.Exit(syncRoot); }
@@ -774,11 +774,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
774 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 774 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
775 775
776 try 776 try
777 { 777 {
778 RegionInfoForScope ris = null; 778 RegionInfoForScope ris = null;
779 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 779 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
780 return false; 780 return false;
781 781
782 return ris.Contains(handle); 782 return ris.Contains(handle);
783 } 783 }
784 finally { Monitor.Exit(syncRoot); } 784 finally { Monitor.Exit(syncRoot); }
@@ -790,7 +790,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
790 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 790 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
791 791
792 try 792 try
793 { 793 {
794 int count = 0; 794 int count = 0;
795 foreach(RegionInfoForScope ris in InfobyScope.Values) 795 foreach(RegionInfoForScope ris in InfobyScope.Values)
796 count += ris.Count(); 796 count += ris.Count();
@@ -804,7 +804,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
804 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) 804 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT))
805 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 805 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
806 try 806 try
807 { 807 {
808 RegionInfoForScope ris = null; 808 RegionInfoForScope ris = null;
809 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 809 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
810 return false; 810 return false;
@@ -825,7 +825,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
825 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) 825 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT))
826 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 826 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
827 try 827 try
828 { 828 {
829 RegionInfoForScope ris = null; 829 RegionInfoForScope ris = null;
830 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 830 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
831 return false; 831 return false;
@@ -940,7 +940,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
940 private void PurgeCache(object sender, System.Timers.ElapsedEventArgs e) 940 private void PurgeCache(object sender, System.Timers.ElapsedEventArgs e)
941 { 941 {
942 // Only let one thread purge at once - a buildup could cause a crash 942 // Only let one thread purge at once - a buildup could cause a crash
943 // This could cause the purge to be delayed while there are lots of read/write ops 943 // This could cause the purge to be delayed while there are lots of read/write ops
944 // happening on the cache 944 // happening on the cache
945 if (!Monitor.TryEnter(isPurging)) 945 if (!Monitor.TryEnter(isPurging))
946 return; 946 return;
@@ -961,7 +961,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
961 if (kvp.Value.expire(now) == 0) 961 if (kvp.Value.expire(now) == 0)
962 expiredscopes.Add(kvp.Key); 962 expiredscopes.Add(kvp.Key);
963 } 963 }
964 964
965 if (expiredscopes.Count > 0) 965 if (expiredscopes.Count > 0)
966 { 966 {
967 foreach (UUID sid in expiredscopes) 967 foreach (UUID sid in expiredscopes)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
index 50e4c8a..ee17093 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
58 private IGridService m_RemoteGridService; 58 private IGridService m_RemoteGridService;
59 59
60 private RegionInfoCache m_RegionInfoCache; 60 private RegionInfoCache m_RegionInfoCache;
61 61
62 public RemoteGridServicesConnector() 62 public RemoteGridServicesConnector()
63 { 63 {
64 } 64 }
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
70 70
71 #region ISharedRegionmodule 71 #region ISharedRegionmodule
72 72
73 public Type ReplaceableInterface 73 public Type ReplaceableInterface
74 { 74 {
75 get { return null; } 75 get { return null; }
76 } 76 }
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
113 return false; 113 return false;
114 } 114 }
115 115
116 Object[] args = new Object[] { source }; 116 Object[] args = new Object[] { source };
117 m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args); 117 m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args);
118 118
119 m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache); 119 m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache);
@@ -130,11 +130,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
130 new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); 130 new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty);
131 // Legacy. Remove soon! 131 // Legacy. Remove soon!
132 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); 132 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper);
133 133
134 Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper); 134 Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper);
135 135
136 return true; 136 return true;
137 } 137 }
138 138
139 public void PostInitialise() 139 public void PostInitialise()
140 { 140 {
@@ -249,14 +249,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
249 { 249 {
250 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) 250 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper))
251 return rinfo; // no HG 251 return rinfo; // no HG
252 252
253 string regionURI = ""; 253 string regionURI = "";
254 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) 254 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName))
255 return rinfo; // invalid 255 return rinfo; // invalid
256 if(m_ThisGatekeeper != regionURI) 256 if(m_ThisGatekeeper != regionURI)
257 return rinfo; // not local grid 257 return rinfo; // not local grid
258 } 258 }
259 259
260 rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); 260 rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName);
261 m_RegionInfoCache.Cache(scopeID, rinfo); 261 m_RegionInfoCache.Cache(scopeID, rinfo);
262 return rinfo; 262 return rinfo;
@@ -275,10 +275,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
275 { 275 {
276 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) 276 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper))
277 return rinfo; // no HG 277 return rinfo; // no HG
278 278
279 string regionURI = ""; 279 string regionURI = "";
280 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) 280 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName))
281 return rinfo; // invalid 281 return rinfo; // invalid
282 if(m_ThisGatekeeper != regionURI) 282 if(m_ThisGatekeeper != regionURI)
283 return rinfo; // not local grid 283 return rinfo; // not local grid
284 } 284 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
index 044e0e5..1378368 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
88 Scene s = new Scene(new RegionInfo()); 88 Scene s = new Scene(new RegionInfo());
89 s.RegionInfo.RegionID = r1.RegionID; 89 s.RegionInfo.RegionID = r1.RegionID;
90 m_LocalConnector.AddRegion(s); 90 m_LocalConnector.AddRegion(s);
91 91
92 GridRegion r2 = new GridRegion(); 92 GridRegion r2 = new GridRegion();
93 r2.RegionName = "Test Region 2"; 93 r2.RegionName = "Test Region 2";
94 r2.RegionID = new UUID(2); 94 r2.RegionID = new UUID(2);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
index 98ccc95..c780bcd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
@@ -37,7 +37,7 @@ using log4net;
37 37
38namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser 38namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
39{ 39{
40 public class ActivityDetector 40 public class ActivityDetector
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
67 { 67 {
68 if (sp.isNPC) 68 if (sp.isNPC)
69 return; 69 return;
70 70
71 if(sp.gotCrossUpdate) 71 if(sp.gotCrossUpdate)
72 { 72 {
73 Util.FireAndForget(delegate 73 Util.FireAndForget(delegate
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index c48186f..5efdd9b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
86 } 86 }
87 } 87 }
88 88
89 public Type ReplaceableInterface 89 public Type ReplaceableInterface
90 { 90 {
91 get { return null; } 91 get { return null; }
92 } 92 }
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
299 return m_InventoryURLs[userID]; 299 return m_InventoryURLs[userID];
300 300
301 return null; //it means that the methods should forward to local grid's inventory 301 return null; //it means that the methods should forward to local grid's inventory
302 302
303 } 303 }
304 #endregion 304 #endregion
305 305
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index 0d36725..fa36b66 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
72 72
73 private bool m_Enabled = false; 73 private bool m_Enabled = false;
74 74
75 public Type ReplaceableInterface 75 public Type ReplaceableInterface
76 { 76 {
77 get { return null; } 77 get { return null; }
78 } 78 }
@@ -134,7 +134,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
134 { 134 {
135 if (!m_Enabled) 135 if (!m_Enabled)
136 return; 136 return;
137 137
138 scene.RegisterModuleInterface<IInventoryService>(this); 138 scene.RegisterModuleInterface<IInventoryService>(this);
139 139
140 if (Scene == null) 140 if (Scene == null)
@@ -261,9 +261,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
261 public bool AddItem(InventoryItemBase item) 261 public bool AddItem(InventoryItemBase item)
262 { 262 {
263// m_log.DebugFormat( 263// m_log.DebugFormat(
264// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", 264// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
265// item.Name, item.Owner, item.Folder); 265// item.Name, item.Owner, item.Folder);
266 266
267 return m_InventoryService.AddItem(item); 267 return m_InventoryService.AddItem(item);
268 } 268 }
269 269
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
297// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); 297// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID);
298 298
299// UUID requestedItemId = item.ID; 299// UUID requestedItemId = item.ID;
300 300
301 InventoryItemBase item = m_InventoryService.GetItem(principalID, itemID); 301 InventoryItemBase item = m_InventoryService.GetItem(principalID, itemID);
302 302
303// if (null == item) 303// if (null == item)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index 62b44b1..d8ae2c4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
74 } 74 }
75 } 75 }
76 76
77 public Type ReplaceableInterface 77 public Type ReplaceableInterface
78 { 78 {
79 get { return null; } 79 get { return null; }
80 } 80 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs
index 9e251aa..cad2061 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
62 62
63 #region ISharedRegionModule 63 #region ISharedRegionModule
64 64
65 public Type ReplaceableInterface 65 public Type ReplaceableInterface
66 { 66 {
67 get { return null; } 67 get { return null; }
68 } 68 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
index 77dfa4a..68c5b64 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
53 private bool m_Enabled = false; 53 private bool m_Enabled = false;
54 private LocalLandServicesConnector m_LocalService; 54 private LocalLandServicesConnector m_LocalService;
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index 1357825..9888c3b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -68,11 +68,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
68 private int m_refreshtime = 0; 68 private int m_refreshtime = 0;
69 private int m_lastrefresh = 0; 69 private int m_lastrefresh = 0;
70 private System.Timers.Timer m_refreshTimer; 70 private System.Timers.Timer m_refreshTimer;
71 71
72 #region ISharedRegionModule 72 #region ISharedRegionModule
73 73
74 public Type ReplaceableInterface { get { return null; } } 74 public Type ReplaceableInterface { get { return null; } }
75 public string Name { get { return "MapImageServiceModule"; } } 75 public string Name { get { return "MapImageServiceModule"; } }
76 public void RegionLoaded(Scene scene) { } 76 public void RegionLoaded(Scene scene) { }
77 public void Close() { } 77 public void Close() { }
78 public void PostInitialise() { } 78 public void PostInitialise() { }
@@ -115,12 +115,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
115 m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Unable to load LocalServiceModule from {0}. MapService module disabled. Please fix the configuration.", service); 115 m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Unable to load LocalServiceModule from {0}. MapService module disabled. Please fix the configuration.", service);
116 return; 116 return;
117 } 117 }
118 118
119 // we don't want the timer if the interval is zero, but we still want this module enables 119 // we don't want the timer if the interval is zero, but we still want this module enables
120 if(refreshminutes > 0) 120 if(refreshminutes > 0)
121 { 121 {
122 m_refreshtime = refreshminutes * 60 * 1000; // convert from minutes to ms 122 m_refreshtime = refreshminutes * 60 * 1000; // convert from minutes to ms
123 123
124 m_refreshTimer = new System.Timers.Timer(); 124 m_refreshTimer = new System.Timers.Timer();
125 m_refreshTimer.Enabled = true; 125 m_refreshTimer.Enabled = true;
126 m_refreshTimer.AutoReset = true; 126 m_refreshTimer.AutoReset = true;
@@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
131 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0} min and service object {1}", 131 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0} min and service object {1}",
132 refreshminutes, service); 132 refreshminutes, service);
133 } 133 }
134 else 134 else
135 { 135 {
136 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with no refresh and service object {0}", service); 136 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with no refresh and service object {0}", service);
137 } 137 }
@@ -171,7 +171,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
171 } 171 }
172 172
173 #endregion ISharedRegionModule 173 #endregion ISharedRegionModule
174 174
175 ///<summary> 175 ///<summary>
176 /// 176 ///
177 ///</summary> 177 ///</summary>
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs
index bda354f..e8d01b0 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
63 63
64 #region ISharedRegionModule 64 #region ISharedRegionModule
65 65
66 public Type ReplaceableInterface 66 public Type ReplaceableInterface
67 { 67 {
68 get { return null; } 68 get { return null; }
69 } 69 }
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
113 113
114 public void RemoveRegion(Scene scene) 114 public void RemoveRegion(Scene scene)
115 { 115 {
116 // Always remove 116 // Always remove
117 if (m_Scenes.Contains(scene)) 117 if (m_Scenes.Contains(scene))
118 m_Scenes.Remove(scene); 118 m_Scenes.Remove(scene);
119 } 119 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
index e6772f3..fcb5521 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
53 //private string serviceDll; 53 //private string serviceDll;
54 //private List<Scene> m_Scenes = new List<Scene>(); 54 //private List<Scene> m_Scenes = new List<Scene>();
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
index 117f02c..aafd047 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
@@ -35,7 +35,7 @@ using OpenSim.Services.Interfaces;
35 35
36namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence 36namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
37{ 37{
38 public class PresenceDetector 38 public class PresenceDetector
39 { 39 {
40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
70 { 70 {
71 if (sp.isNPC) 71 if (sp.isNPC)
72 return; 72 return;
73 73
74 if(sp.gotCrossUpdate) 74 if(sp.gotCrossUpdate)
75 { 75 {
76 Util.FireAndForget(delegate 76 Util.FireAndForget(delegate
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
index 69bac82..7838d12 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
72 public void TestPresenceV0_1() 72 public void TestPresenceV0_1()
73 { 73 {
74 SetUp(); 74 SetUp();
75 75
76 // Let's stick in a test presence 76 // Let's stick in a test presence
77 /* 77 /*
78 PresenceData p = new PresenceData(); 78 PresenceData p = new PresenceData();
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3755650..57aba05 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
219 } 219 }
220 220
221// m_log.DebugFormat( 221// m_log.DebugFormat(
222// "[LOCAL COMMS]: Did not find region {0} {1} for ChildAgentUpdate", 222// "[LOCAL COMMS]: Did not find region {0} {1} for ChildAgentUpdate",
223// destination.RegionName, destination.RegionID); 223// destination.RegionName, destination.RegionID);
224 224
225 return false; 225 return false;
@@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
265 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; 265 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
266 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied"); 266 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
267 return false; 267 return false;
268 268
269 } 269 }
270 270
271 271
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 0ebdbce..b402d2a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
137 } 137 }
138 138
139 protected virtual void InitOnce(Scene scene) 139 protected virtual void InitOnce(Scene scene)
140 { 140 {
141 m_aScene = scene; 141 m_aScene = scene;
142 //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); 142 //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
143 } 143 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
248 // else do the remote thing 248 // else do the remote thing
249 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 249 if (!m_localBackend.IsLocalRegion(destination.RegionID))
250 return m_remoteConnector.CloseAgent(destination, id, auth_token); 250 return m_remoteConnector.CloseAgent(destination, id, auth_token);
251 251
252 return false; 252 return false;
253 } 253 }
254 254
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index b72ffbb..77fd70b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
59 59
60 #region ISharedRegionModule 60 #region ISharedRegionModule
61 61
62 public Type ReplaceableInterface 62 public Type ReplaceableInterface
63 { 63 {
64 get { return null; } 64 get { return null; }
65 } 65 }
@@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
200 account = m_Cache.Get(uuid, out inCache); 200 account = m_Cache.Get(uuid, out inCache);
201 if (inCache) 201 if (inCache)
202 ret.Add(account); 202 ret.Add(account);
203 else 203 else
204 missing.Add(id); 204 missing.Add(id);
205 } 205 }
206 } 206 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index f5eda11..b510d0a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
53 private bool m_Enabled = false; 53 private bool m_Enabled = false;
54 private UserAccountCache m_Cache; 54 private UserAccountCache m_Cache;
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
index 2afd74e..f3572a2 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
43// private static readonly ILog m_log = 43// private static readonly ILog m_log =
44// LogManager.GetLogger( 44// LogManager.GetLogger(
45// MethodBase.GetCurrentMethod().DeclaringType); 45// MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 private ExpiringCache<UUID, UserAccount> m_UUIDCache; 47 private ExpiringCache<UUID, UserAccount> m_UUIDCache;
48 private ExpiringCache<string, UUID> m_NameCache; 48 private ExpiringCache<string, UUID> m_NameCache;
49 private object accessLock = new object(); 49 private object accessLock = new object();
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
51 public UserAccountCache() 51 public UserAccountCache()
52 { 52 {
53 m_UUIDCache = new ExpiringCache<UUID, UserAccount>(); 53 m_UUIDCache = new ExpiringCache<UUID, UserAccount>();
54 m_NameCache = new ExpiringCache<string, UUID>(); 54 m_NameCache = new ExpiringCache<string, UUID>();
55 } 55 }
56 56
57 public void Cache(UUID userID, UserAccount account) 57 public void Cache(UUID userID, UserAccount account)
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
70 { 70 {
71 m_UUIDCache.AddOrUpdate(userID, account, CACHE_ALIEN_EXPIRATION_SECONDS); 71 m_UUIDCache.AddOrUpdate(userID, account, CACHE_ALIEN_EXPIRATION_SECONDS);
72 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_ALIEN_EXPIRATION_SECONDS); 72 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_ALIEN_EXPIRATION_SECONDS);
73 } 73 }
74 //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); 74 //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
75 } 75 }
76 } 76 }
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
index f567cab..081439a 100644
--- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
+++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.World
44 public class AccessModule : ISharedRegionModule 44 public class AccessModule : ISharedRegionModule
45 { 45 {
46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private List<Scene> m_SceneList = new List<Scene>(); 48 private List<Scene> m_SceneList = new List<Scene>();
49 49
50 public void Initialise(IConfigSource config) 50 public void Initialise(IConfigSource config)
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index f523af1..6ba8cec 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -77,14 +77,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
77 SceneObjects = new List<SceneObjectGroup>(); 77 SceneObjects = new List<SceneObjectGroup>();
78 } 78 }
79 } 79 }
80 80
81 81
82 /// <summary> 82 /// <summary>
83 /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version 83 /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version
84 /// bumps here should be compatible. 84 /// bumps here should be compatible.
85 /// </summary> 85 /// </summary>
86 public static int MAX_MAJOR_VERSION = 1; 86 public static int MAX_MAJOR_VERSION = 1;
87 87
88 /// <summary> 88 /// <summary>
89 /// Has the control file been loaded for this archive? 89 /// Has the control file been loaded for this archive?
90 /// </summary> 90 /// </summary>
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
220 220
221 m_boundingOrigin = Vector3.Zero; 221 m_boundingOrigin = Vector3.Zero;
222 m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue); 222 m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue);
223 223
224 if (options.ContainsKey("bounding-origin")) 224 if (options.ContainsKey("bounding-origin"))
225 { 225 {
226 Vector3 boOption = (Vector3)options["bounding-origin"]; 226 Vector3 boOption = (Vector3)options["bounding-origin"];
@@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
308 { 308 {
309 //m_log.DebugFormat( 309 //m_log.DebugFormat(
310 // "[ARCHIVER]: Successfully read {0} ({1} bytes)", filePath, data.Length); 310 // "[ARCHIVER]: Successfully read {0} ({1} bytes)", filePath, data.Length);
311 311
312 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) 312 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType)
313 continue; 313 continue;
314 314
@@ -354,11 +354,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
354 else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH)) 354 else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH))
355 { 355 {
356 LoadRegionSettings(scene, filePath, data, dearchivedScenes); 356 LoadRegionSettings(scene, filePath, data, dearchivedScenes);
357 } 357 }
358 else if (filePath.StartsWith(ArchiveConstants.LANDDATA_PATH) && (!m_merge || m_forceParcels)) 358 else if (filePath.StartsWith(ArchiveConstants.LANDDATA_PATH) && (!m_merge || m_forceParcels))
359 { 359 {
360 sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data)); 360 sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data));
361 } 361 }
362 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 362 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
363 { 363 {
364 // Ignore, because we already read the control file 364 // Ignore, because we already read the control file
@@ -406,7 +406,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
406 { 406 {
407 LoadParcels(sceneContext.Scene, sceneContext.SerialisedParcels); 407 LoadParcels(sceneContext.Scene, sceneContext.SerialisedParcels);
408 LoadObjects(sceneContext.Scene, sceneContext.SerialisedSceneObjects, sceneContext.SceneObjects); 408 LoadObjects(sceneContext.Scene, sceneContext.SerialisedSceneObjects, sceneContext.SceneObjects);
409 409
410 // Inform any interested parties that the region has changed. We waited until now so that all 410 // Inform any interested parties that the region has changed. We waited until now so that all
411 // of the region's objects will be loaded when we send this notification. 411 // of the region's objects will be loaded when we send this notification.
412 IEstateModule estateModule = sceneContext.Scene.RequestModuleInterface<IEstateModule>(); 412 IEstateModule estateModule = sceneContext.Scene.RequestModuleInterface<IEstateModule>();
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
471 { 471 {
472 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) 472 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType)
473 continue; 473 continue;
474 474
475 if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 475 if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
476 { 476 {
477 LoadControlFile(filePath, data, dearchivedScenes); 477 LoadControlFile(filePath, data, dearchivedScenes);
@@ -517,7 +517,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
517 517
518 throw new Exception("[ARCHIVER]: Control file not found"); 518 throw new Exception("[ARCHIVER]: Control file not found");
519 } 519 }
520 520
521 /// <summary> 521 /// <summary>
522 /// Load serialized scene objects. 522 /// Load serialized scene objects.
523 /// </summary> 523 /// </summary>
@@ -545,7 +545,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
545 // Really large xml files (multi megabyte) appear to cause 545 // Really large xml files (multi megabyte) appear to cause
546 // memory problems 546 // memory problems
547 // when loading the xml. But don't enable this check yet 547 // when loading the xml. But don't enable this check yet
548 548
549 if (serialisedSceneObject.Length > 5000000) 549 if (serialisedSceneObject.Length > 5000000)
550 { 550 {
551 m_log.Error("[ARCHIVER]: Ignoring xml since size > 5000000);"); 551 m_log.Error("[ARCHIVER]: Ignoring xml since size > 5000000);");
@@ -745,7 +745,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
745 Vector3 AABBMax; 745 Vector3 AABBMax;
746 746
747 // create a new LandObject that we can use to manipulate the incoming source parcel data 747 // create a new LandObject that we can use to manipulate the incoming source parcel data
748 // this is ok, but just beware that some of the LandObject functions (that we haven't used here) still 748 // this is ok, but just beware that some of the LandObject functions (that we haven't used here) still
749 // assume we're always using the destination region size 749 // assume we're always using the destination region size
750 LandData ld = new LandData(); 750 LandData ld = new LandData();
751 landObject = new LandObject(ld, scene); 751 landObject = new LandObject(ld, scene);
@@ -839,7 +839,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
839 } 839 }
840 parcel.ParcelAccessList = accessList; 840 parcel.ParcelAccessList = accessList;
841 841
842 if (m_debug) m_log.DebugFormat("[ARCHIVER]: Adding parcel {0}, local id {1}, owner {2}, group {3}, isGroupOwned {4}, area {5}", 842 if (m_debug) m_log.DebugFormat("[ARCHIVER]: Adding parcel {0}, local id {1}, owner {2}, group {3}, isGroupOwned {4}, area {5}",
843 parcel.Name, parcel.LocalID, parcel.OwnerID, parcel.GroupID, parcel.IsGroupOwned, parcel.Area); 843 parcel.Name, parcel.LocalID, parcel.OwnerID, parcel.GroupID, parcel.IsGroupOwned, parcel.Area);
844 844
845 landData.Add(parcel); 845 landData.Add(parcel);
@@ -939,20 +939,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver
939 sbyte asype = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; 939 sbyte asype = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
940 if(asype == -2) 940 if(asype == -2)
941 { 941 {
942 942
943 } 943 }
944 944
945 // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid); 945 // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid);
946 return true; 946 return true;
947 } 947 }
948 948
949 if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension)) 949 if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension))
950 { 950 {
951 sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; 951 sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
952 952
953 if(assetType == -2) 953 if(assetType == -2)
954 { 954 {
955 955
956 } 956 }
957 if (assetType == (sbyte)AssetType.Unknown) 957 if (assetType == (sbyte)AssetType.Unknown)
958 { 958 {
@@ -966,7 +966,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
966 ModifySceneObject(m_rootScene, sog); 966 ModifySceneObject(m_rootScene, sog);
967 return true; 967 return true;
968 }); 968 });
969 969
970 if (data == null) 970 if (data == null)
971 return false; 971 return false;
972 } 972 }
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1072 currentRegionSettings.Save(); 1072 currentRegionSettings.Save();
1073 1073
1074 scene.TriggerEstateSunUpdate(); 1074 scene.TriggerEstateSunUpdate();
1075 1075
1076 IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>(); 1076 IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>();
1077 if (estateModule != null) 1077 if (estateModule != null)
1078 estateModule.sendRegionHandshakeToAll(); 1078 estateModule.sendRegionHandshakeToAll();
@@ -1129,16 +1129,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1129 1129
1130 bool multiRegion = false; 1130 bool multiRegion = false;
1131 1131
1132 while (xtr.Read()) 1132 while (xtr.Read())
1133 { 1133 {
1134 if (xtr.NodeType == XmlNodeType.Element) 1134 if (xtr.NodeType == XmlNodeType.Element)
1135 { 1135 {
1136 if (xtr.Name.ToString() == "archive") 1136 if (xtr.Name.ToString() == "archive")
1137 { 1137 {
1138 int majorVersion = int.Parse(xtr["major_version"]); 1138 int majorVersion = int.Parse(xtr["major_version"]);
1139 int minorVersion = int.Parse(xtr["minor_version"]); 1139 int minorVersion = int.Parse(xtr["minor_version"]);
1140 string version = string.Format("{0}.{1}", majorVersion, minorVersion); 1140 string version = string.Format("{0}.{1}", majorVersion, minorVersion);
1141 1141
1142 if (majorVersion > MAX_MAJOR_VERSION) 1142 if (majorVersion > MAX_MAJOR_VERSION)
1143 { 1143 {
1144 throw new Exception( 1144 throw new Exception(
@@ -1146,15 +1146,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1146 "The OAR you are trying to load has major version number of {0} but this version of OpenSim can only load OARs with major version number {1} and below", 1146 "The OAR you are trying to load has major version number of {0} but this version of OpenSim can only load OARs with major version number {1} and below",
1147 majorVersion, MAX_MAJOR_VERSION)); 1147 majorVersion, MAX_MAJOR_VERSION));
1148 } 1148 }
1149 1149
1150 m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version); 1150 m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version);
1151 } 1151 }
1152 else if (xtr.Name.ToString() == "datetime") 1152 else if (xtr.Name.ToString() == "datetime")
1153 { 1153 {
1154 int value; 1154 int value;
1155 if (Int32.TryParse(xtr.ReadElementContentAsString(), out value)) 1155 if (Int32.TryParse(xtr.ReadElementContentAsString(), out value))
1156 dearchivedScenes.LoadedCreationDateTime = value; 1156 dearchivedScenes.LoadedCreationDateTime = value;
1157 } 1157 }
1158 else if (xtr.Name.ToString() == "row") 1158 else if (xtr.Name.ToString() == "row")
1159 { 1159 {
1160 multiRegion = true; 1160 multiRegion = true;
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
index d8dace2..2fb4426 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
50 /// The inner dictionaries contain each row's regions (key: X coordinate). 50 /// The inner dictionaries contain each row's regions (key: X coordinate).
51 /// </summary> 51 /// </summary>
52 public SortedDictionary<uint, SortedDictionary<uint, Scene>> Regions { get; set; } 52 public SortedDictionary<uint, SortedDictionary<uint, Scene>> Regions { get; set; }
53 53
54 /// <summary> 54 /// <summary>
55 /// The subdirectory where each region is stored in the archive. 55 /// The subdirectory where each region is stored in the archive.
56 /// </summary> 56 /// </summary>
@@ -152,7 +152,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
152 } 152 }
153 } 153 }
154 } 154 }
155 155
156 /// <summary> 156 /// <summary>
157 /// Returns the scene at position 'location'. 157 /// Returns the scene at position 'location'.
158 /// </summary> 158 /// </summary>
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index 6c8f37b..8dabcee 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -60,8 +60,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
60 /// <summary> 60 /// <summary>
61 /// The minimum major version of OAR that we can write. 61 /// The minimum major version of OAR that we can write.
62 /// </summary> 62 /// </summary>
63 public static int MIN_MAJOR_VERSION = 0; 63 public static int MIN_MAJOR_VERSION = 0;
64 64
65 /// <summary> 65 /// <summary>
66 /// The maximum major version of OAR that we can write. 66 /// The maximum major version of OAR that we can write.
67 /// </summary> 67 /// </summary>
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
112 m_log.ErrorFormat("{0} {1}", e.Message, e.StackTrace); 112 m_log.ErrorFormat("{0} {1}", e.Message, e.StackTrace);
113 } 113 }
114 } 114 }
115 115
116 /// <summary> 116 /// <summary>
117 /// Constructor. 117 /// Constructor.
118 /// </summary> 118 /// </summary>
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
226 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 226 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
227 227
228 int numObjectsSkippedPermissions = 0; 228 int numObjectsSkippedPermissions = 0;
229 229
230 // Filter entities so that we only have scene objects. 230 // Filter entities so that we only have scene objects.
231 // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods 231 // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods
232 // end up having to do this 232 // end up having to do this
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
256 { 256 {
257 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids); 257 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids);
258 int prevAssets = assetUuids.Count; 258 int prevAssets = assetUuids.Count;
259 259
260 foreach (SceneObjectGroup sceneObject in sceneObjects) 260 foreach (SceneObjectGroup sceneObject in sceneObjects)
261 assetGatherer.AddForInspection(sceneObject); 261 assetGatherer.AddForInspection(sceneObject);
262 262
@@ -276,16 +276,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
276 276
277 // Make sure that we also request terrain texture assets 277 // Make sure that we also request terrain texture assets
278 RegionSettings regionSettings = scene.RegionInfo.RegionSettings; 278 RegionSettings regionSettings = scene.RegionInfo.RegionSettings;
279 279
280 if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1) 280 if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1)
281 assetUuids[regionSettings.TerrainTexture1] = (sbyte)AssetType.Texture; 281 assetUuids[regionSettings.TerrainTexture1] = (sbyte)AssetType.Texture;
282 282
283 if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2) 283 if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2)
284 assetUuids[regionSettings.TerrainTexture2] = (sbyte)AssetType.Texture; 284 assetUuids[regionSettings.TerrainTexture2] = (sbyte)AssetType.Texture;
285 285
286 if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3) 286 if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3)
287 assetUuids[regionSettings.TerrainTexture3] = (sbyte)AssetType.Texture; 287 assetUuids[regionSettings.TerrainTexture3] = (sbyte)AssetType.Texture;
288 288
289 if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) 289 if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4)
290 assetUuids[regionSettings.TerrainTexture4] = (sbyte)AssetType.Texture; 290 assetUuids[regionSettings.TerrainTexture4] = (sbyte)AssetType.Texture;
291 291
@@ -398,18 +398,18 @@ namespace OpenSim.Region.CoreModules.World.Archiver
398// string[] parts = m_options["version"].ToString().Split('.'); 398// string[] parts = m_options["version"].ToString().Split('.');
399// if (parts.Length >= 1) 399// if (parts.Length >= 1)
400// { 400// {
401// majorVersion = Int32.Parse(parts[0]); 401// majorVersion = Int32.Parse(parts[0]);
402// 402//
403// if (parts.Length >= 2) 403// if (parts.Length >= 2)
404// minorVersion = Int32.Parse(parts[1]); 404// minorVersion = Int32.Parse(parts[1]);
405// } 405// }
406// } 406// }
407// 407//
408// if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION) 408// if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION)
409// { 409// {
410// throw new Exception( 410// throw new Exception(
411// string.Format( 411// string.Format(
412// "OAR version number for save must be between {0} and {1}", 412// "OAR version number for save must be between {0} and {1}",
413// MIN_MAJOR_VERSION, MAX_MAJOR_VERSION)); 413// MIN_MAJOR_VERSION, MAX_MAJOR_VERSION));
414// } 414// }
415// else if (majorVersion == MAX_MAJOR_VERSION) 415// else if (majorVersion == MAX_MAJOR_VERSION)
@@ -420,9 +420,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
420// else if (majorVersion == MIN_MAJOR_VERSION) 420// else if (majorVersion == MIN_MAJOR_VERSION)
421// { 421// {
422// // Force 0.4 422// // Force 0.4
423// minorVersion = 4; 423// minorVersion = 4;
424// } 424// }
425 425
426 m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); 426 m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion);
427 if (majorVersion == 1) 427 if (majorVersion == 1)
428 { 428 {
@@ -430,7 +430,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
430 } 430 }
431 431
432 String s; 432 String s;
433 433
434 using (StringWriter sw = new StringWriter()) 434 using (StringWriter sw = new StringWriter())
435 { 435 {
436 using (XmlTextWriter xtw = new XmlTextWriter(sw)) 436 using (XmlTextWriter xtw = new XmlTextWriter(sw))
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
440 xtw.WriteStartElement("archive"); 440 xtw.WriteStartElement("archive");
441 xtw.WriteAttributeString("major_version", majorVersion.ToString()); 441 xtw.WriteAttributeString("major_version", majorVersion.ToString());
442 xtw.WriteAttributeString("minor_version", minorVersion.ToString()); 442 xtw.WriteAttributeString("minor_version", minorVersion.ToString());
443 443
444 xtw.WriteStartElement("creation_info"); 444 xtw.WriteStartElement("creation_info");
445 DateTime now = DateTime.UtcNow; 445 DateTime now = DateTime.UtcNow;
446 TimeSpan t = now - new DateTime(1970, 1, 1); 446 TimeSpan t = now - new DateTime(1970, 1, 1);
@@ -448,7 +448,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
448 if (!MultiRegionFormat) 448 if (!MultiRegionFormat)
449 xtw.WriteElementString("id", m_rootScene.RegionInfo.RegionID.ToString()); 449 xtw.WriteElementString("id", m_rootScene.RegionInfo.RegionID.ToString());
450 xtw.WriteEndElement(); 450 xtw.WriteEndElement();
451 451
452 xtw.WriteElementString("assets_included", SaveAssets.ToString()); 452 xtw.WriteElementString("assets_included", SaveAssets.ToString());
453 453
454 if (MultiRegionFormat) 454 if (MultiRegionFormat)
@@ -463,7 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
463 } 463 }
464 464
465 xtw.WriteEndElement(); 465 xtw.WriteEndElement();
466 466
467 xtw.Flush(); 467 xtw.Flush();
468 } 468 }
469 469
@@ -525,7 +525,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
525 Vector2 size; 525 Vector2 size;
526 526
527 size = new Vector2((float)scene.RegionInfo.RegionSizeX, (float)scene.RegionInfo.RegionSizeY); 527 size = new Vector2((float)scene.RegionInfo.RegionSizeX, (float)scene.RegionInfo.RegionSizeY);
528 528
529 xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y)); 529 xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y));
530 } 530 }
531 531
@@ -548,7 +548,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
548 foreach (ILandObject lo in landObjects) 548 foreach (ILandObject lo in landObjects)
549 { 549 {
550 LandData landData = lo.LandData; 550 LandData landData = lo.LandData;
551 string landDataPath 551 string landDataPath
552 = String.Format("{0}{1}", regionDir, ArchiveConstants.CreateOarLandDataPath(landData)); 552 = String.Format("{0}{1}", regionDir, ArchiveConstants.CreateOarLandDataPath(landData));
553 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options)); 553 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options));
554 } 554 }
@@ -578,11 +578,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
578 m_archiveWriter.WriteFile(objectPath, serializedObject); 578 m_archiveWriter.WriteFile(objectPath, serializedObject);
579 } 579 }
580 } 580 }
581 581
582 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut) 582 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut)
583 { 583 {
584 string errorMessage; 584 string errorMessage;
585 585
586 if (timedOut) 586 if (timedOut)
587 { 587 {
588 errorMessage = "Loading assets timed out"; 588 errorMessage = "Loading assets timed out";
@@ -600,10 +600,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
600 600
601 errorMessage = String.Empty; 601 errorMessage = String.Empty;
602 } 602 }
603 603
604 CloseArchive(errorMessage); 604 CloseArchive(errorMessage);
605 } 605 }
606 606
607 /// <summary> 607 /// <summary>
608 /// Closes the archive and notifies that we're done. 608 /// Closes the archive and notifies that we're done.
609 /// </summary> 609 /// </summary>
@@ -622,7 +622,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
622 if (errorMessage == string.Empty) 622 if (errorMessage == string.Empty)
623 errorMessage = e.Message; 623 errorMessage = e.Message;
624 } 624 }
625 625
626 m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_rootScene.RegionInfo.RegionName); 626 m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_rootScene.RegionInfo.RegionName);
627 627
628 m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage); 628 m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage);
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index 150d4ec..1305545 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
49 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")] 49 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")]
50 public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule 50 public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule
51 { 51 {
52 private static readonly ILog m_log = 52 private static readonly ILog m_log =
53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 54
55 public Scene Scene { get; private set; } 55 public Scene Scene { get; private set; }
@@ -59,13 +59,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
59 /// </value> 59 /// </value>
60 protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; 60 protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar";
61 61
62 public string Name 62 public string Name
63 { 63 {
64 get { return "RegionArchiverModule"; } 64 get { return "RegionArchiverModule"; }
65 } 65 }
66 66
67 public Type ReplaceableInterface 67 public Type ReplaceableInterface
68 { 68 {
69 get { return null; } 69 get { return null; }
70 } 70 }
71 71
@@ -201,9 +201,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
201 rready.OarLoadingAlert("load"); 201 rready.OarLoadingAlert("load");
202 } 202 }
203 */ 203 */
204 204
205 List<string> mainParams = options.Parse(cmdparams); 205 List<string> mainParams = options.Parse(cmdparams);
206 206
207// m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); 207// m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar);
208// 208//
209// foreach (string param in mainParams) 209// foreach (string param in mainParams)
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
288 288
289 ArchiveRegion(path, options); 289 ArchiveRegion(path, options);
290 } 290 }
291 291
292 public void ArchiveRegion(string savePath, Dictionary<string, object> options) 292 public void ArchiveRegion(string savePath, Dictionary<string, object> options)
293 { 293 {
294 ArchiveRegion(savePath, Guid.Empty, options); 294 ArchiveRegion(savePath, Guid.Empty, options);
@@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
298 { 298 {
299 m_log.InfoFormat( 299 m_log.InfoFormat(
300 "[ARCHIVER]: Writing archive for region {0} to {1}", Scene.RegionInfo.RegionName, savePath); 300 "[ARCHIVER]: Writing archive for region {0} to {1}", Scene.RegionInfo.RegionName, savePath);
301 301
302 new ArchiveWriteRequest(Scene, savePath, requestId).ArchiveRegion(options); 302 new ArchiveWriteRequest(Scene, savePath, requestId).ArchiveRegion(options);
303 } 303 }
304 304
@@ -330,7 +330,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
330 330
331 new ArchiveReadRequest(Scene, loadPath, requestId, options).DearchiveRegion(); 331 new ArchiveReadRequest(Scene, loadPath, requestId, options).DearchiveRegion();
332 } 332 }
333 333
334 public void DearchiveRegion(Stream loadStream) 334 public void DearchiveRegion(Stream loadStream)
335 { 335 {
336 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 336 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
index c1ff94d..efacae3 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
@@ -51,8 +51,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
51 /// <value> 51 /// <value>
52 /// Keep a count of the number of assets written so that we can provide status updates 52 /// Keep a count of the number of assets written so that we can provide status updates
53 /// </value> 53 /// </value>
54 protected int m_assetsWritten; 54 protected int m_assetsWritten;
55 55
56 protected TarArchiveWriter m_archiveWriter; 56 protected TarArchiveWriter m_archiveWriter;
57 57
58 public AssetsArchiver(TarArchiveWriter archiveWriter) 58 public AssetsArchiver(TarArchiveWriter archiveWriter)
@@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
145 m_assetsWritten++; 145 m_assetsWritten++;
146 146
147 //m_log.DebugFormat("[ARCHIVER]: Added asset {0}", m_assetsWritten); 147 //m_log.DebugFormat("[ARCHIVER]: Added asset {0}", m_assetsWritten);
148 148
149 if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0) 149 if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0)
150 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", m_assetsWritten); 150 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", m_assetsWritten);
151 } 151 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 1526b1c..d380da8 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
60 Completed, 60 Completed,
61 Aborted 61 Aborted
62 }; 62 };
63 63
64 /// <value> 64 /// <value>
65 /// Timeout threshold if we still need assets or missing asset notifications but have stopped receiving them 65 /// Timeout threshold if we still need assets or missing asset notifications but have stopped receiving them
66 /// from the asset service 66 /// from the asset service
@@ -71,14 +71,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
71 /// If a timeout does occur, limit the amount of UUID information put to the console. 71 /// If a timeout does occur, limit the amount of UUID information put to the console.
72 /// </value> 72 /// </value>
73 protected const int MAX_UUID_DISPLAY_ON_TIMEOUT = 3; 73 protected const int MAX_UUID_DISPLAY_ON_TIMEOUT = 3;
74 74
75 protected System.Timers.Timer m_requestCallbackTimer; 75 protected System.Timers.Timer m_requestCallbackTimer;
76 76
77 /// <value> 77 /// <value>
78 /// State of this request 78 /// State of this request
79 /// </value> 79 /// </value>
80 private RequestState m_requestState = RequestState.Initial; 80 private RequestState m_requestState = RequestState.Initial;
81 81
82 /// <value> 82 /// <value>
83 /// uuids to request 83 /// uuids to request
84 /// </value> 84 /// </value>
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
93 /// List of assets that were found. This will be passed back to the requester. 93 /// List of assets that were found. This will be passed back to the requester.
94 /// </value> 94 /// </value>
95 protected List<UUID> m_foundAssetUuids = new List<UUID>(); 95 protected List<UUID> m_foundAssetUuids = new List<UUID>();
96 96
97 /// <value> 97 /// <value>
98 /// Maintain a list of assets that could not be found. This will be passed back to the requester. 98 /// Maintain a list of assets that could not be found. This will be passed back to the requester.
99 /// </value> 99 /// </value>
@@ -109,16 +109,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
109 /// </value> 109 /// </value>
110 protected IAssetService m_assetService; 110 protected IAssetService m_assetService;
111 protected IUserAccountService m_userAccountService; 111 protected IUserAccountService m_userAccountService;
112 protected UUID m_scopeID; // the grid ID 112 protected UUID m_scopeID; // the grid ID
113 113
114 protected AssetsArchiver m_assetsArchiver; 114 protected AssetsArchiver m_assetsArchiver;
115 115
116 protected Dictionary<string, object> m_options; 116 protected Dictionary<string, object> m_options;
117 117
118 protected internal AssetsRequest( 118 protected internal AssetsRequest(
119 AssetsArchiver assetsArchiver, IDictionary<UUID, sbyte> uuids, 119 AssetsArchiver assetsArchiver, IDictionary<UUID, sbyte> uuids,
120 IAssetService assetService, IUserAccountService userService, 120 IAssetService assetService, IUserAccountService userService,
121 UUID scope, Dictionary<string, object> options, 121 UUID scope, Dictionary<string, object> options,
122 AssetsRequestCallback assetsRequestCallback) 122 AssetsRequestCallback assetsRequestCallback)
123 { 123 {
124 m_assetsArchiver = assetsArchiver; 124 m_assetsArchiver = assetsArchiver;
@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
142 protected internal void Execute() 142 protected internal void Execute()
143 { 143 {
144 m_requestState = RequestState.Running; 144 m_requestState = RequestState.Running;
145 145
146 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired); 146 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired);
147 147
148 // We can stop here if there are no assets to fetch 148 // We can stop here if there are no assets to fetch
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
180 timedOut = false; 180 timedOut = false;
181 return; 181 return;
182 } 182 }
183 183
184 m_requestState = RequestState.Aborted; 184 m_requestState = RequestState.Aborted;
185 } 185 }
186 186
@@ -196,24 +196,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver
196 { 196 {
197 uuids.Remove(uuid); 197 uuids.Remove(uuid);
198 } 198 }
199 199
200 foreach (UUID uuid in m_notFoundAssetUuids) 200 foreach (UUID uuid in m_notFoundAssetUuids)
201 { 201 {
202 uuids.Remove(uuid); 202 uuids.Remove(uuid);
203 } 203 }
204 204
205 m_log.ErrorFormat( 205 m_log.ErrorFormat(
206 "[ARCHIVER]: Asset service failed to return information about {0} requested assets", uuids.Count); 206 "[ARCHIVER]: Asset service failed to return information about {0} requested assets", uuids.Count);
207 207
208 int i = 0; 208 int i = 0;
209 foreach (UUID uuid in uuids) 209 foreach (UUID uuid in uuids)
210 { 210 {
211 m_log.ErrorFormat("[ARCHIVER]: No information about asset {0} received", uuid); 211 m_log.ErrorFormat("[ARCHIVER]: No information about asset {0} received", uuid);
212 212
213 if (++i >= MAX_UUID_DISPLAY_ON_TIMEOUT) 213 if (++i >= MAX_UUID_DISPLAY_ON_TIMEOUT)
214 break; 214 break;
215 } 215 }
216 216
217 if (uuids.Count > MAX_UUID_DISPLAY_ON_TIMEOUT) 217 if (uuids.Count > MAX_UUID_DISPLAY_ON_TIMEOUT)
218 m_log.ErrorFormat( 218 m_log.ErrorFormat(
219 "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); 219 "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT);
@@ -251,24 +251,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver
251 public void AssetRequestCallback(string id, object sender, AssetBase asset) 251 public void AssetRequestCallback(string id, object sender, AssetBase asset)
252 { 252 {
253 Culture.SetCurrentCulture(); 253 Culture.SetCurrentCulture();
254 254
255 try 255 try
256 { 256 {
257 lock (this) 257 lock (this)
258 { 258 {
259 //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", id); 259 //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", id);
260 260
261 m_requestCallbackTimer.Stop(); 261 m_requestCallbackTimer.Stop();
262 262
263 if ((m_requestState == RequestState.Aborted) || (m_requestState == RequestState.Completed)) 263 if ((m_requestState == RequestState.Aborted) || (m_requestState == RequestState.Completed))
264 { 264 {
265 m_log.WarnFormat( 265 m_log.WarnFormat(
266 "[ARCHIVER]: Received information about asset {0} while in state {1}. Ignoring.", 266 "[ARCHIVER]: Received information about asset {0} while in state {1}. Ignoring.",
267 id, m_requestState); 267 id, m_requestState);
268 268
269 return; 269 return;
270 } 270 }
271 271
272 if (asset != null) 272 if (asset != null)
273 { 273 {
274// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id); 274// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id);
@@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
281// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id); 281// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id);
282 m_notFoundAssetUuids.Add(new UUID(id)); 282 m_notFoundAssetUuids.Add(new UUID(id));
283 } 283 }
284 284
285 if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count >= m_repliesRequired) 285 if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count >= m_repliesRequired)
286 { 286 {
287 m_requestState = RequestState.Completed; 287 m_requestState = RequestState.Completed;
@@ -294,8 +294,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
294 "[ARCHIVER]: Successfully added {0} assets ({1} assets not found but these may be expected invalid references)", 294 "[ARCHIVER]: Successfully added {0} assets ({1} assets not found but these may be expected invalid references)",
295 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); 295 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count);
296 296
297 297
298 // We want to stop using the asset cache thread asap 298 // We want to stop using the asset cache thread asap
299 // as we now need to do the work of producing the rest of the archive 299 // as we now need to do the work of producing the rest of the archive
300 WorkManager.RunInThread(PerformAssetsRequestCallback, false, "Archive Assets Request Callback"); 300 WorkManager.RunInThread(PerformAssetsRequestCallback, false, "Archive Assets Request Callback");
301 } 301 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
index e2222fe..809d863 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
@@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
214 return false; 214 return false;
215 string regionDirectory = parts[1]; 215 string regionDirectory = parts[1];
216 relativePath = parts[2]; 216 relativePath = parts[2];
217 217
218 RegionInfo region; 218 RegionInfo region;
219 if (m_directory2region.TryGetValue(regionDirectory, out region)) 219 if (m_directory2region.TryGetValue(regionDirectory, out region))
220 { 220 {
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index caa22f7..6885299 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -65,9 +65,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
65 protected SerialiserModule m_serialiserModule; 65 protected SerialiserModule m_serialiserModule;
66 66
67 protected TaskInventoryItem m_soundItem; 67 protected TaskInventoryItem m_soundItem;
68 68
69 private AutoResetEvent m_oarEvent = new AutoResetEvent(false); 69 private AutoResetEvent m_oarEvent = new AutoResetEvent(false);
70 70
71 [SetUp] 71 [SetUp]
72 public override void SetUp() 72 public override void SetUp()
73 { 73 {
@@ -89,10 +89,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
89 m_lastRequestId = requestId; 89 m_lastRequestId = requestId;
90 m_lastErrorMessage = errorMessage; 90 m_lastErrorMessage = errorMessage;
91 Console.WriteLine("About to pulse ArchiverTests on LoadCompleted"); 91 Console.WriteLine("About to pulse ArchiverTests on LoadCompleted");
92 m_oarEvent.Set(); 92 m_oarEvent.Set();
93 } 93 }
94 } 94 }
95 95
96 private void SaveCompleted(Guid requestId, string errorMessage) 96 private void SaveCompleted(Guid requestId, string errorMessage)
97 { 97 {
98 lock (this) 98 lock (this)
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
100 m_lastRequestId = requestId; 100 m_lastRequestId = requestId;
101 m_lastErrorMessage = errorMessage; 101 m_lastErrorMessage = errorMessage;
102 Console.WriteLine("About to pulse ArchiverTests on SaveCompleted"); 102 Console.WriteLine("About to pulse ArchiverTests on SaveCompleted");
103 m_oarEvent.Set(); 103 m_oarEvent.Set();
104 } 104 }
105 } 105 }
106 106
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
129 129
130 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName }; 130 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
131 } 131 }
132 132
133 private void CreateTestObjects(Scene scene, out SceneObjectGroup sog1, out SceneObjectGroup sog2, out UUID ncAssetUuid) 133 private void CreateTestObjects(Scene scene, out SceneObjectGroup sog1, out SceneObjectGroup sog2, out UUID ncAssetUuid)
134 { 134 {
135 SceneObjectPart part1 = CreateSceneObjectPart1(); 135 SceneObjectPart part1 = CreateSceneObjectPart1();
@@ -200,10 +200,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
200 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId); 200 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId);
201 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; 201 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
202 //while (assetServer.HasWaitingRequests()) 202 //while (assetServer.HasWaitingRequests())
203 // assetServer.ProcessNextRequest(); 203 // assetServer.ProcessNextRequest();
204 204
205 m_oarEvent.WaitOne(60000); 205 m_oarEvent.WaitOne(60000);
206 206
207 Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 207 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
208 208
209 byte[] archive = archiveWriteStream.ToArray(); 209 byte[] archive = archiveWriteStream.ToArray();
@@ -211,7 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
211 TarArchiveReader tar = new TarArchiveReader(archiveReadStream); 211 TarArchiveReader tar = new TarArchiveReader(archiveReadStream);
212 212
213 bool gotNcAssetFile = false; 213 bool gotNcAssetFile = false;
214 214
215 string expectedNcAssetFileName = string.Format("{0}_{1}", ncAssetUuid, "notecard.txt"); 215 string expectedNcAssetFileName = string.Format("{0}_{1}", ncAssetUuid, "notecard.txt");
216 216
217 List<string> foundPaths = new List<string>(); 217 List<string> foundPaths = new List<string>();
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
220 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2)); 220 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2));
221 221
222 string filePath; 222 string filePath;
223 TarArchiveReader.TarEntryType tarEntryType; 223 TarArchiveReader.TarEntryType tarEntryType;
224 224
225 byte[] data = tar.ReadEntry(out filePath, out tarEntryType); 225 byte[] data = tar.ReadEntry(out filePath, out tarEntryType);
226 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); 226 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH));
@@ -228,9 +228,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
228 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 228 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
229 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions); 229 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions);
230 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo()); 230 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo());
231 231
232 Assert.That(arr.ControlFileLoaded, Is.True); 232 Assert.That(arr.ControlFileLoaded, Is.True);
233 233
234 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 234 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
235 { 235 {
236 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 236 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
266 m_scene.AddNewSceneObject(sog1, false); 266 m_scene.AddNewSceneObject(sog1, false);
267 267
268 SceneObjectPart part2 = CreateSceneObjectPart2(); 268 SceneObjectPart part2 = CreateSceneObjectPart2();
269 269
270 AssetNotecard nc = new AssetNotecard(); 270 AssetNotecard nc = new AssetNotecard();
271 nc.BodyText = "Hello World!"; 271 nc.BodyText = "Hello World!";
272 nc.Encode(); 272 nc.Encode();
@@ -276,10 +276,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
276 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); 276 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
277 m_scene.AssetService.Store(ncAsset); 277 m_scene.AssetService.Store(ncAsset);
278 SceneObjectGroup sog2 = new SceneObjectGroup(part2); 278 SceneObjectGroup sog2 = new SceneObjectGroup(part2);
279 TaskInventoryItem ncItem 279 TaskInventoryItem ncItem
280 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid }; 280 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid };
281 part2.Inventory.AddInventoryItem(ncItem, true); 281 part2.Inventory.AddInventoryItem(ncItem, true);
282 282
283 m_scene.AddNewSceneObject(sog2, false); 283 m_scene.AddNewSceneObject(sog2, false);
284 284
285 MemoryStream archiveWriteStream = new MemoryStream(); 285 MemoryStream archiveWriteStream = new MemoryStream();
@@ -306,7 +306,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
306 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2)); 306 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2));
307 307
308 string filePath; 308 string filePath;
309 TarArchiveReader.TarEntryType tarEntryType; 309 TarArchiveReader.TarEntryType tarEntryType;
310 310
311 byte[] data = tar.ReadEntry(out filePath, out tarEntryType); 311 byte[] data = tar.ReadEntry(out filePath, out tarEntryType);
312 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); 312 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH));
@@ -314,9 +314,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
314 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 314 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
315 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions); 315 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions);
316 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo()); 316 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo());
317 317
318 Assert.That(arr.ControlFileLoaded, Is.True); 318 Assert.That(arr.ControlFileLoaded, Is.True);
319 319
320 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 320 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
321 { 321 {
322 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 322 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
@@ -345,11 +345,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
345 345
346 MemoryStream archiveWriteStream = new MemoryStream(); 346 MemoryStream archiveWriteStream = new MemoryStream();
347 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); 347 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
348 348
349 // Put in a random blank directory to check that this doesn't upset the load process 349 // Put in a random blank directory to check that this doesn't upset the load process
350 tar.WriteDir("ignoreme"); 350 tar.WriteDir("ignoreme");
351 351
352 // Also check that direct entries which will also have a file entry containing that directory doesn't 352 // Also check that direct entries which will also have a file entry containing that directory doesn't
353 // upset load 353 // upset load
354 tar.WriteDir(ArchiveConstants.TERRAINS_PATH); 354 tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
355 355
@@ -392,7 +392,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
392 Math.Round(part1.GroupPosition.X), Math.Round(part1.GroupPosition.Y), Math.Round(part1.GroupPosition.Z), 392 Math.Round(part1.GroupPosition.X), Math.Round(part1.GroupPosition.Y), Math.Round(part1.GroupPosition.Z),
393 part1.UUID); 393 part1.UUID);
394 tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, SceneObjectSerializer.ToXml2Format(object1)); 394 tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, SceneObjectSerializer.ToXml2Format(object1));
395 395
396 tar.Close(); 396 tar.Close();
397 397
398 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); 398 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
@@ -400,9 +400,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
400 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 400 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
401 m_oarEvent.Reset(); 401 m_oarEvent.Reset();
402 m_archiverModule.DearchiveRegion(archiveReadStream); 402 m_archiverModule.DearchiveRegion(archiveReadStream);
403 403
404 m_oarEvent.WaitOne(60000); 404 m_oarEvent.WaitOne(60000);
405 405
406 Assert.That(m_lastErrorMessage, Is.Null); 406 Assert.That(m_lastErrorMessage, Is.Null);
407 407
408 TestLoadedRegion(part1, soundItemName, soundData); 408 TestLoadedRegion(part1, soundItemName, soundData);
@@ -475,31 +475,31 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
475 m_scene.AddNewSceneObject(sog1, false); 475 m_scene.AddNewSceneObject(sog1, false);
476 476
477 SceneObjectPart part2 = CreateSceneObjectPart2(); 477 SceneObjectPart part2 = CreateSceneObjectPart2();
478 478
479 AssetNotecard nc = new AssetNotecard(); 479 AssetNotecard nc = new AssetNotecard();
480 nc.BodyText = "Hello World!"; 480 nc.BodyText = "Hello World!";
481 nc.Encode(); 481 nc.Encode();
482 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); 482 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
483 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); 483 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
484 AssetBase ncAsset 484 AssetBase ncAsset
485 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); 485 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
486 m_scene.AssetService.Store(ncAsset); 486 m_scene.AssetService.Store(ncAsset);
487 SceneObjectGroup sog2 = new SceneObjectGroup(part2); 487 SceneObjectGroup sog2 = new SceneObjectGroup(part2);
488 TaskInventoryItem ncItem 488 TaskInventoryItem ncItem
489 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid }; 489 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid };
490 part2.Inventory.AddInventoryItem(ncItem, true); 490 part2.Inventory.AddInventoryItem(ncItem, true);
491 491
492 m_scene.AddNewSceneObject(sog2, false); 492 m_scene.AddNewSceneObject(sog2, false);
493 493
494 MemoryStream archiveWriteStream = new MemoryStream(); 494 MemoryStream archiveWriteStream = new MemoryStream();
495 m_scene.EventManager.OnOarFileSaved += SaveCompleted; 495 m_scene.EventManager.OnOarFileSaved += SaveCompleted;
496 496
497 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080"); 497 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
498 498
499 m_oarEvent.Reset(); 499 m_oarEvent.Reset();
500 m_archiverModule.ArchiveRegion( 500 m_archiverModule.ArchiveRegion(
501 archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } }); 501 archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } });
502 502
503 m_oarEvent.WaitOne(60000); 503 m_oarEvent.WaitOne(60000);
504 504
505 Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 505 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
@@ -529,7 +529,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
529 scene2.EventManager.OnOarFileLoaded += LoadCompleted; 529 scene2.EventManager.OnOarFileLoaded += LoadCompleted;
530 m_oarEvent.Reset(); 530 m_oarEvent.Reset();
531 archiverModule.DearchiveRegion(archiveReadStream); 531 archiverModule.DearchiveRegion(archiveReadStream);
532 532
533 m_oarEvent.WaitOne(60000); 533 m_oarEvent.WaitOne(60000);
534 534
535 Assert.That(m_lastErrorMessage, Is.Null); 535 Assert.That(m_lastErrorMessage, Is.Null);
@@ -557,16 +557,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
557 MockGroupsServicesConnector groupsService = new MockGroupsServicesConnector(); 557 MockGroupsServicesConnector groupsService = new MockGroupsServicesConnector();
558 558
559 IConfigSource configSource = new IniConfigSource(); 559 IConfigSource configSource = new IniConfigSource();
560 IConfig config = configSource.AddConfig("Groups"); 560 IConfig config = configSource.AddConfig("Groups");
561 config.Set("Enabled", true); 561 config.Set("Enabled", true);
562 config.Set("Module", "GroupsModule"); 562 config.Set("Module", "GroupsModule");
563 config.Set("DebugEnabled", true); 563 config.Set("DebugEnabled", true);
564 SceneHelpers.SetupSceneModules( 564 SceneHelpers.SetupSceneModules(
565 m_scene, configSource, new object[] { new GroupsModule(), groupsService, new LandManagementModule() }); 565 m_scene, configSource, new object[] { new GroupsModule(), groupsService, new LandManagementModule() });
566 566
567 // Create group in scene for loading 567 // Create group in scene for loading
568 // FIXME: For now we'll put up with the issue that we'll get a group ID that varies across tests. 568 // FIXME: For now we'll put up with the issue that we'll get a group ID that varies across tests.
569 UUID groupID 569 UUID groupID
570 = groupsService.CreateGroup(UUID.Zero, "group1", "", true, UUID.Zero, 3, true, true, true, UUID.Zero); 570 = groupsService.CreateGroup(UUID.Zero, "group1", "", true, UUID.Zero, 3, true, true, true, UUID.Zero);
571 571
572 // Construct OAR 572 // Construct OAR
@@ -594,7 +594,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
594 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 594 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
595 m_oarEvent.Reset(); 595 m_oarEvent.Reset();
596 m_archiverModule.DearchiveRegion(oarStream); 596 m_archiverModule.DearchiveRegion(oarStream);
597 597
598 m_oarEvent.WaitOne(60000); 598 m_oarEvent.WaitOne(60000);
599 599
600 ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16); 600 ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
@@ -617,7 +617,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
617 617
618 MemoryStream archiveWriteStream = new MemoryStream(); 618 MemoryStream archiveWriteStream = new MemoryStream();
619 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); 619 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
620 620
621 tar.WriteDir(ArchiveConstants.TERRAINS_PATH); 621 tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
622 tar.WriteFile( 622 tar.WriteFile(
623 ArchiveConstants.CONTROL_FILE_PATH, 623 ArchiveConstants.CONTROL_FILE_PATH,
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
658 rs.AddSpawnPoint(SpawnPoint.Parse("1,-2,0.33")); 658 rs.AddSpawnPoint(SpawnPoint.Parse("1,-2,0.33"));
659 659
660 tar.WriteFile(ArchiveConstants.SETTINGS_PATH + "region1.xml", RegionSettingsSerializer.Serialize(rs)); 660 tar.WriteFile(ArchiveConstants.SETTINGS_PATH + "region1.xml", RegionSettingsSerializer.Serialize(rs));
661 661
662 tar.Close(); 662 tar.Close();
663 663
664 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); 664 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
@@ -666,9 +666,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
666 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 666 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
667 m_oarEvent.Reset(); 667 m_oarEvent.Reset();
668 m_archiverModule.DearchiveRegion(archiveReadStream); 668 m_archiverModule.DearchiveRegion(archiveReadStream);
669 669
670 m_oarEvent.WaitOne(60000); 670 m_oarEvent.WaitOne(60000);
671 671
672 Assert.That(m_lastErrorMessage, Is.Null); 672 Assert.That(m_lastErrorMessage, Is.Null);
673 RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings; 673 RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
674 674
@@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
705 Assert.AreEqual(UUID.Zero, loadedRs.TelehubObject); // because no object was found with the original UUID 705 Assert.AreEqual(UUID.Zero, loadedRs.TelehubObject); // because no object was found with the original UUID
706 Assert.AreEqual(0, loadedRs.SpawnPoints().Count); 706 Assert.AreEqual(0, loadedRs.SpawnPoints().Count);
707 } 707 }
708 708
709 /// <summary> 709 /// <summary>
710 /// Test merging an OpenSim Region Archive into an existing scene 710 /// Test merging an OpenSim Region Archive into an existing scene
711 /// </summary> 711 /// </summary>
@@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
741 scene.EventManager.OnOarFileSaved += SaveCompleted; 741 scene.EventManager.OnOarFileSaved += SaveCompleted;
742 m_oarEvent.Reset(); 742 m_oarEvent.Reset();
743 m_archiverModule.ArchiveRegion(archiveWriteStream); 743 m_archiverModule.ArchiveRegion(archiveWriteStream);
744 744
745 m_oarEvent.WaitOne(60000); 745 m_oarEvent.WaitOne(60000);
746 } 746 }
747 747
@@ -758,7 +758,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
758 archiveOptions.Add("merge", null); 758 archiveOptions.Add("merge", null);
759 m_oarEvent.Reset(); 759 m_oarEvent.Reset();
760 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); 760 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
761 761
762 m_oarEvent.WaitOne(60000); 762 m_oarEvent.WaitOne(60000);
763 763
764 SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); 764 SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name);
@@ -819,7 +819,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
819 SceneObjectGroup sog1; 819 SceneObjectGroup sog1;
820 SceneObjectGroup sog2; 820 SceneObjectGroup sog2;
821 UUID ncAssetUuid; 821 UUID ncAssetUuid;
822 822
823 CreateTestObjects(scene, out sog1, out sog2, out ncAssetUuid); 823 CreateTestObjects(scene, out sog1, out sog2, out ncAssetUuid);
824 824
825 expectedPaths[scene.RegionInfo.RegionID] = new List<string>(); 825 expectedPaths[scene.RegionInfo.RegionID] = new List<string>();
@@ -841,7 +841,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
841 m_scene.EventManager.OnOarFileSaved += SaveCompleted; 841 m_scene.EventManager.OnOarFileSaved += SaveCompleted;
842 m_oarEvent.Reset(); 842 m_oarEvent.Reset();
843 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); 843 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options);
844 844
845 m_oarEvent.WaitOne(60000); 845 m_oarEvent.WaitOne(60000);
846 846
847 847
@@ -993,7 +993,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
993 993
994 tar.Close(); 994 tar.Close();
995 995
996 996
997 // Delete the current objects, to test that they're loaded from the OAR and didn't 997 // Delete the current objects, to test that they're loaded from the OAR and didn't
998 // just remain in the scene. 998 // just remain in the scene.
999 m_sceneHelpers.SceneManager.ForEachScene(delegate(Scene scene) 999 m_sceneHelpers.SceneManager.ForEachScene(delegate(Scene scene)
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
1012 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 1012 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
1013 m_oarEvent.Reset(); 1013 m_oarEvent.Reset();
1014 m_archiverModule.DearchiveRegion(archiveReadStream); 1014 m_archiverModule.DearchiveRegion(archiveReadStream);
1015 1015
1016 m_oarEvent.WaitOne(60000); 1016 m_oarEvent.WaitOne(60000);
1017 1017
1018 Assert.That(m_lastErrorMessage, Is.Null); 1018 Assert.That(m_lastErrorMessage, Is.Null);
diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
index 617c348..a450dd6 100644
--- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
+++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.CoreModules.World
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CloudModule")] 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CloudModule")]
41 public class CloudModule : ICloudModule, INonSharedRegionModule 41 public class CloudModule : ICloudModule, INonSharedRegionModule
42 { 42 {
43// private static readonly log4net.ILog m_log 43// private static readonly log4net.ILog m_log
44// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 44// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
45 private uint m_frame = 0; 45 private uint m_frame = 0;
46 private int m_frameUpdateRate = 1000; 46 private int m_frameUpdateRate = 1000;
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.World
163 columnRight = 0; 163 columnRight = 0;
164 columnLeft = x - 1; 164 columnLeft = x - 1;
165 } 165 }
166 else 166 else
167 { 167 {
168 columnRight = x + 1; 168 columnRight = x + 1;
169 columnLeft = x - 1; 169 columnLeft = x - 1;
@@ -185,14 +185,14 @@ namespace OpenSim.Region.CoreModules.World
185 rowAbove = y + 1; 185 rowAbove = y + 1;
186 rowBelow = y - 1; 186 rowBelow = y - 1;
187 } 187 }
188 float neighborAverage = (cloudCover[rowBelow * 16 + columnLeft] + 188 float neighborAverage = (cloudCover[rowBelow * 16 + columnLeft] +
189 cloudCover[y * 16 + columnLeft] + 189 cloudCover[y * 16 + columnLeft] +
190 cloudCover[rowAbove * 16 + columnLeft] + 190 cloudCover[rowAbove * 16 + columnLeft] +
191 cloudCover[rowBelow * 16 + x] + 191 cloudCover[rowBelow * 16 + x] +
192 cloudCover[rowAbove * 16 + x] + 192 cloudCover[rowAbove * 16 + x] +
193 cloudCover[rowBelow * 16 + columnRight] + 193 cloudCover[rowBelow * 16 + columnRight] +
194 cloudCover[y * 16 + columnRight] + 194 cloudCover[y * 16 + columnRight] +
195 cloudCover[rowAbove * 16 + columnRight] + 195 cloudCover[rowAbove * 16 + columnRight] +
196 cloudCover[y * 16 + x]) / 9; 196 cloudCover[y * 16 + x]) / 9;
197 newCover[y * 16 + x] = ((neighborAverage / m_cloudDensity) + 0.175f) % 1.0f; 197 newCover[y * 16 + x] = ((neighborAverage / m_cloudDensity) + 0.175f) % 1.0f;
198 newCover[y * 16 + x] *= m_cloudDensity; 198 newCover[y * 16 + x] *= m_cloudDensity;
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.World
201 Array.Copy(newCover, cloudCover, 16 * 16); 201 Array.Copy(newCover, cloudCover, 16 * 16);
202 m_dataVersion++; 202 m_dataVersion++;
203 } 203 }
204 204
205 private void CloudUpdate() 205 private void CloudUpdate()
206 { 206 {
207 if ((!m_ready || m_busy || m_cloudDensity == 0 || 207 if ((!m_ready || m_busy || m_cloudDensity == 0 ||
@@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.World
243 } 243 }
244 } 244 }
245 245
246 246
247 /// <summary> 247 /// <summary>
248 /// Calculate the cloud cover over the region. 248 /// Calculate the cloud cover over the region.
249 /// </summary> 249 /// </summary>
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs b/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
index ad561fd..051ff71 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
@@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
149 { 149 {
150 foreach (Scene s in m_EstateModule.Scenes) 150 foreach (Scene s in m_EstateModule.Scenes)
151 { 151 {
152 RegionInfo sreg = s.RegionInfo; 152 RegionInfo sreg = s.RegionInfo;
153 if (regions.Contains(sreg.RegionID)) 153 if (regions.Contains(sreg.RegionID))
154 { 154 {
155 string url = sreg.ExternalHostName + ":" + sreg.HttpPort; 155 string url = sreg.ExternalHostName + ":" + sreg.HttpPort;
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
index 702b503..7879f83 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -49,18 +49,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
49 public class EstateManagementCommands 49 public class EstateManagementCommands
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 protected EstateManagementModule m_module; 53 protected EstateManagementModule m_module;
54 54
55 public EstateManagementCommands(EstateManagementModule module) 55 public EstateManagementCommands(EstateManagementModule module)
56 { 56 {
57 m_module = module; 57 m_module = module;
58 } 58 }
59 59
60 public void Initialise() 60 public void Initialise()
61 { 61 {
62// m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); 62// m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName);
63 63
64 m_module.Scene.AddCommand("Regions", m_module, "set terrain texture", 64 m_module.Scene.AddCommand("Regions", m_module, "set terrain texture",
65 "set terrain texture <number> <uuid> [<x>] [<y>]", 65 "set terrain texture <number> <uuid> [<x>] [<y>]",
66 "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + 66 "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " +
@@ -77,14 +77,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
77 77
78 m_module.Scene.AddCommand("Regions", m_module, "set water height", 78 m_module.Scene.AddCommand("Regions", m_module, "set water height",
79 "set water height <height> [<x>] [<y>]", 79 "set water height <height> [<x>] [<y>]",
80 "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " + 80 "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " +
81 "Specify -1 in <x> or <y> to wildcard that coordinate.", 81 "Specify -1 in <x> or <y> to wildcard that coordinate.",
82 consoleSetWaterHeight); 82 consoleSetWaterHeight);
83 83
84 m_module.Scene.AddCommand( 84 m_module.Scene.AddCommand(
85 "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); 85 "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand);
86 } 86 }
87 87
88 public void Close() {} 88 public void Close() {}
89 89
90 #region CommandHandlers 90 #region CommandHandlers
@@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
120 m_module.Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; 120 m_module.Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
121 break; 121 break;
122 } 122 }
123 123
124 m_module.Scene.RegionInfo.RegionSettings.Save(); 124 m_module.Scene.RegionInfo.RegionSettings.Save();
125 m_module.TriggerRegionInfoChange(); 125 m_module.TriggerRegionInfoChange();
126 m_module.sendRegionHandshakeToAll(); 126 m_module.sendRegionHandshakeToAll();
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
130 protected void consoleSetWaterHeight(string module, string[] args) 130 protected void consoleSetWaterHeight(string module, string[] args)
131 { 131 {
132 string heightstring = args[3]; 132 string heightstring = args[3];
133 133
134 int x = (args.Length > 4 ? int.Parse(args[4]) : -1); 134 int x = (args.Length > 4 ? int.Parse(args[4]) : -1);
135 int y = (args.Length > 5 ? int.Parse(args[5]) : -1); 135 int y = (args.Length > 5 ? int.Parse(args[5]) : -1);
136 136
@@ -143,13 +143,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
143 m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " + 143 m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " +
144 string.Format(" {0}", selectedheight)); 144 string.Format(" {0}", selectedheight));
145 m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight; 145 m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight;
146 146
147 m_module.Scene.RegionInfo.RegionSettings.Save(); 147 m_module.Scene.RegionInfo.RegionSettings.Save();
148 m_module.TriggerRegionInfoChange(); 148 m_module.TriggerRegionInfoChange();
149 m_module.sendRegionHandshakeToAll(); 149 m_module.sendRegionHandshakeToAll();
150 } 150 }
151 } 151 }
152 } 152 }
153 protected void consoleSetTerrainHeights(string module, string[] args) 153 protected void consoleSetTerrainHeights(string module, string[] args)
154 { 154 {
155 string num = args[3]; 155 string num = args[3];
@@ -198,31 +198,31 @@ namespace OpenSim.Region.CoreModules.World.Estate
198 m_module.Scene.RegionInfo.RegionSettings.Elevation2NE = highValue; 198 m_module.Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
199 break; 199 break;
200 } 200 }
201 201
202 m_module.Scene.RegionInfo.RegionSettings.Save(); 202 m_module.Scene.RegionInfo.RegionSettings.Save();
203 m_module.TriggerRegionInfoChange(); 203 m_module.TriggerRegionInfoChange();
204 m_module.sendRegionHandshakeToAll(); 204 m_module.sendRegionHandshakeToAll();
205 } 205 }
206 } 206 }
207 } 207 }
208 208
209 protected void ShowEstatesCommand(string module, string[] cmd) 209 protected void ShowEstatesCommand(string module, string[] cmd)
210 { 210 {
211 StringBuilder report = new StringBuilder(); 211 StringBuilder report = new StringBuilder();
212 RegionInfo ri = m_module.Scene.RegionInfo; 212 RegionInfo ri = m_module.Scene.RegionInfo;
213 EstateSettings es = ri.EstateSettings; 213 EstateSettings es = ri.EstateSettings;
214 214
215 report.AppendFormat("Estate information for region {0}\n", ri.RegionName); 215 report.AppendFormat("Estate information for region {0}\n", ri.RegionName);
216 report.AppendFormat( 216 report.AppendFormat(
217 "{0,-20} {1,-7} {2,-20}\n", 217 "{0,-20} {1,-7} {2,-20}\n",
218 "Estate Name", 218 "Estate Name",
219 "ID", 219 "ID",
220 "Owner"); 220 "Owner");
221 221
222 report.AppendFormat( 222 report.AppendFormat(
223 "{0,-20} {1,-7} {2,-20}\n", 223 "{0,-20} {1,-7} {2,-20}\n",
224 es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner)); 224 es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner));
225 225
226 MainConsole.Instance.Output(report.ToString()); 226 MainConsole.Instance.Output(report.ToString());
227 } 227 }
228 #endregion 228 #endregion
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index efd4ca6..3c45b68 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -57,8 +57,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
57 private Timer m_regionChangeTimer = new Timer(); 57 private Timer m_regionChangeTimer = new Timer();
58 public Scene Scene { get; private set; } 58 public Scene Scene { get; private set; }
59 public IUserManagement UserManager { get; private set; } 59 public IUserManagement UserManager { get; private set; }
60 60
61 protected EstateManagementCommands m_commands; 61 protected EstateManagementCommands m_commands;
62 62
63 /// <summary> 63 /// <summary>
64 /// If false, region restart requests from the client are blocked even if they are otherwise legitimate. 64 /// If false, region restart requests from the client are blocked even if they are otherwise legitimate.
@@ -77,12 +77,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
77 private int m_delayCount = 0; 77 private int m_delayCount = 0;
78 78
79 #region Region Module interface 79 #region Region Module interface
80 80
81 public string Name { get { return "EstateManagementModule"; } } 81 public string Name { get { return "EstateManagementModule"; } }
82
83 public Type ReplaceableInterface { get { return null; } }
84 82
85 public void Initialise(IConfigSource source) 83 public Type ReplaceableInterface { get { return null; } }
84
85 public void Initialise(IConfigSource source)
86 { 86 {
87 AllowRegionRestartFromClient = true; 87 AllowRegionRestartFromClient = true;
88 88
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
91 if (config != null) 91 if (config != null)
92 AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true); 92 AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true);
93 } 93 }
94 94
95 public void AddRegion(Scene scene) 95 public void AddRegion(Scene scene)
96 { 96 {
97 Scene = scene; 97 Scene = scene;
@@ -108,19 +108,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
108 m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; 108 m_regionChangeTimer.Elapsed += RaiseRegionInfoChange;
109 m_regionChangeTimer.AutoReset = false; 109 m_regionChangeTimer.AutoReset = false;
110 } 110 }
111 111
112 public void RemoveRegion(Scene scene) {} 112 public void RemoveRegion(Scene scene) {}
113 113
114 public void RegionLoaded(Scene scene) 114 public void RegionLoaded(Scene scene)
115 { 115 {
116 // Sets up the sun module based no the saved Estate and Region Settings 116 // Sets up the sun module based no the saved Estate and Region Settings
117 // DO NOT REMOVE or the sun will stop working 117 // DO NOT REMOVE or the sun will stop working
118 scene.TriggerEstateSunUpdate(); 118 scene.TriggerEstateSunUpdate();
119 119
120 UserManager = scene.RequestModuleInterface<IUserManagement>(); 120 UserManager = scene.RequestModuleInterface<IUserManagement>();
121 } 121 }
122 122
123 public void Close() 123 public void Close()
124 { 124 {
125 m_commands.Close(); 125 m_commands.Close();
126 } 126 }
@@ -486,7 +486,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
486 486
487 if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity) 487 if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity)
488 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; 488 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
489 else 489 else
490 Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity; 490 Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity;
491 491
492 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; 492 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
@@ -640,7 +640,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
640 restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), false); 640 restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), false);
641 641
642 m_log.InfoFormat( 642 m_log.InfoFormat(
643 "User {0} requested restart of region {1} in {2} seconds", 643 "User {0} requested restart of region {1} in {2} seconds",
644 remoteClient.Name, Scene.Name, times.Count != 0 ? times[0] : 0); 644 remoteClient.Name, Scene.Name, times.Count != 0 ? times[0] : 0);
645 } 645 }
646 } 646 }
@@ -648,9 +648,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
648 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) 648 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
649 { 649 {
650// m_log.DebugFormat( 650// m_log.DebugFormat(
651// "[ESTATE MANAGEMENT MODULE]: Handling request from {0} to change estate covenant to {1}", 651// "[ESTATE MANAGEMENT MODULE]: Handling request from {0} to change estate covenant to {1}",
652// remoteClient.Name, estateCovenantID); 652// remoteClient.Name, estateCovenantID);
653 653
654 Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; 654 Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
655 Scene.RegionInfo.RegionSettings.CovenantChangedDateTime = Util.UnixTimeSinceEpoch(); 655 Scene.RegionInfo.RegionSettings.CovenantChangedDateTime = Util.UnixTimeSinceEpoch();
656 Scene.RegionInfo.RegionSettings.Save(); 656 Scene.RegionInfo.RegionSettings.Save();
@@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
694 } 694 }
695 } 695 }
696 } 696 }
697 697
698 private void execDeltaRequests(object o) 698 private void execDeltaRequests(object o)
699 { 699 {
700 IClientAPI remote_client; 700 IClientAPI remote_client;
@@ -720,23 +720,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
720 if(!Scene.IsRunning) 720 if(!Scene.IsRunning)
721 break; 721 break;
722 722
723 if(req == null) 723 if(req == null)
724 { 724 {
725 if(changed.Count > 0) 725 if(changed.Count > 0)
726 { 726 {
727 foreach(EstateSettings est in changed.Values) 727 foreach(EstateSettings est in changed.Values)
728 Scene.EstateDataService.StoreEstateSettings(est); 728 Scene.EstateDataService.StoreEstateSettings(est);
729 729
730 TriggerEstateInfoChange(); 730 TriggerEstateInfoChange();
731 } 731 }
732 732
733 EstateSettings es = Scene.RegionInfo.EstateSettings; 733 EstateSettings es = Scene.RegionInfo.EstateSettings;
734 foreach(KeyValuePair<IClientAPI,UUID> kvp in sendAllowedOrBanList) 734 foreach(KeyValuePair<IClientAPI,UUID> kvp in sendAllowedOrBanList)
735 { 735 {
736 IClientAPI cli = kvp.Key; 736 IClientAPI cli = kvp.Key;
737 UUID invoive = kvp.Value; 737 UUID invoive = kvp.Value;
738 cli.SendEstateList(invoive, (int)Constants.EstateAccessCodex.AllowedAccess, es.EstateAccess, es.EstateID); 738 cli.SendEstateList(invoive, (int)Constants.EstateAccessCodex.AllowedAccess, es.EstateAccess, es.EstateID);
739 cli.SendBannedUserList(invoive, es.EstateBans, es.EstateID); 739 cli.SendBannedUserList(invoive, es.EstateBans, es.EstateID);
740 } 740 }
741 sendAllowedOrBanList.Clear(); 741 sendAllowedOrBanList.Clear();
742 742
@@ -777,7 +777,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
777 bool doOtherEstates = ((estateAccessType & 3) != 0); 777 bool doOtherEstates = ((estateAccessType & 3) != 0);
778 778
779 EstateSettings thisSettings = Scene.RegionInfo.EstateSettings; 779 EstateSettings thisSettings = Scene.RegionInfo.EstateSettings;
780 int thisEstateID =(int)thisSettings.EstateID; 780 int thisEstateID =(int)thisSettings.EstateID;
781 781
782 UUID agentID = remote_client.AgentId; 782 UUID agentID = remote_client.AgentId;
783 783
@@ -811,7 +811,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
811 } 811 }
812 estateIDs.Clear(); 812 estateIDs.Clear();
813 } 813 }
814 814
815 // the commands 815 // the commands
816 // first the ones allowed for estate managers on this region 816 // first the ones allowed for estate managers on this region
817 if ((estateAccessType & 4) != 0) // User add 817 if ((estateAccessType & 4) != 0) // User add
@@ -1020,7 +1020,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1020 break; 1020 break;
1021 } 1021 }
1022 } 1022 }
1023 1023
1024 if (alreadyInList && listitem != null) 1024 if (alreadyInList && listitem != null)
1025 { 1025 {
1026 if (doOtherEstates) // All estates 1026 if (doOtherEstates) // All estates
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1072 if(!isadmin && !estateSettings.IsEstateOwner(agentID)) // redundante check? 1072 if(!isadmin && !estateSettings.IsEstateOwner(agentID)) // redundante check?
1073 continue; 1073 continue;
1074 if(estateSettings.EstateManagersCount() >= (int)Constants.EstateAccessLimits.EstateManagers) 1074 if(estateSettings.EstateManagersCount() >= (int)Constants.EstateAccessLimits.EstateManagers)
1075 continue; 1075 continue;
1076 estateSettings.AddEstateManager(user); 1076 estateSettings.AddEstateManager(user);
1077 changed[(int)estateSettings.EstateID] = estateSettings; 1077 changed[(int)estateSettings.EstateID] = estateSettings;
1078 } 1078 }
@@ -1158,7 +1158,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1158 IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) 1158 IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
1159 { 1159 {
1160 IDialogModule dm = Scene.RequestModuleInterface<IDialogModule>(); 1160 IDialogModule dm = Scene.RequestModuleInterface<IDialogModule>();
1161 1161
1162 if (dm != null) 1162 if (dm != null)
1163 dm.SendNotificationToUsersInRegion(senderID, senderName, message); 1163 dm.SendNotificationToUsersInRegion(senderID, senderName, message);
1164 } 1164 }
@@ -1249,7 +1249,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1249 } 1249 }
1250 }); 1250 });
1251 } 1251 }
1252 1252
1253 private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) 1253 private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID)
1254 { 1254 {
1255 lock (this) 1255 lock (this)
@@ -1332,7 +1332,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1332 if (TerrainUploader == null) 1332 if (TerrainUploader == null)
1333 { 1333 {
1334 m_log.DebugFormat( 1334 m_log.DebugFormat(
1335 "[TERRAIN]: Started receiving terrain upload for region {0} from {1}", 1335 "[TERRAIN]: Started receiving terrain upload for region {0} from {1}",
1336 Scene.Name, remote_client.Name); 1336 Scene.Name, remote_client.Name);
1337 1337
1338 TerrainUploader = new EstateTerrainXferHandler(remote_client, clientFileName); 1338 TerrainUploader = new EstateTerrainXferHandler(remote_client, clientFileName);
@@ -1352,7 +1352,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1352 { 1352 {
1353 // Save terrain here 1353 // Save terrain here
1354 ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>(); 1354 ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>();
1355 1355
1356 if (terr != null) 1356 if (terr != null)
1357 { 1357 {
1358// m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); 1358// m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
index fb4d04f..f3c8aa8 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
52 protected List<Scene> m_Scenes = new List<Scene>(); 52 protected List<Scene> m_Scenes = new List<Scene>();
53 protected bool m_InInfoUpdate = false; 53 protected bool m_InInfoUpdate = false;
54 private string token = "7db8eh2gvgg45jj"; 54 private string token = "7db8eh2gvgg45jj";
55 protected bool m_enabled = false; 55 protected bool m_enabled = false;
56 56
57 public bool InInfoUpdate 57 public bool InInfoUpdate
58 { 58 {
@@ -74,19 +74,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
74 IConfig estateConfig = config.Configs["Estates"]; 74 IConfig estateConfig = config.Configs["Estates"];
75 if (estateConfig != null) 75 if (estateConfig != null)
76 { 76 {
77 if (estateConfig.GetString("EstateCommunicationsHandler", Name) == Name) 77 if (estateConfig.GetString("EstateCommunicationsHandler", Name) == Name)
78 m_enabled = true; 78 m_enabled = true;
79 else 79 else
80 return; 80 return;
81 81
82 port = (uint)estateConfig.GetInt("Port", 0); 82 port = (uint)estateConfig.GetInt("Port", 0);
83 // this will need to came from somewhere else 83 // this will need to came from somewhere else
84 token = estateConfig.GetString("Token", token); 84 token = estateConfig.GetString("Token", token);
85 } 85 }
86 else 86 else
87 { 87 {
88 m_enabled = true; 88 m_enabled = true;
89 } 89 }
90 90
91 m_EstateConnector = new EstateConnector(this, token, port); 91 m_EstateConnector = new EstateConnector(this, token, port);
92 92
@@ -108,8 +108,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
108 108
109 public void AddRegion(Scene scene) 109 public void AddRegion(Scene scene)
110 { 110 {
111 if (!m_enabled) 111 if (!m_enabled)
112 return; 112 return;
113 113
114 lock (m_Scenes) 114 lock (m_Scenes)
115 m_Scenes.Add(scene); 115 m_Scenes.Add(scene);
@@ -117,8 +117,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
117 117
118 public void RegionLoaded(Scene scene) 118 public void RegionLoaded(Scene scene)
119 { 119 {
120 if (!m_enabled) 120 if (!m_enabled)
121 return; 121 return;
122 122
123 IEstateModule em = scene.RequestModuleInterface<IEstateModule>(); 123 IEstateModule em = scene.RequestModuleInterface<IEstateModule>();
124 124
@@ -131,8 +131,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
131 131
132 public void RemoveRegion(Scene scene) 132 public void RemoveRegion(Scene scene)
133 { 133 {
134 if (!m_enabled) 134 if (!m_enabled)
135 return; 135 return;
136 136
137 lock (m_Scenes) 137 lock (m_Scenes)
138 m_Scenes.Remove(scene); 138 m_Scenes.Remove(scene);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
index 9de88d9..e4c0373 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Land
51 public const int LAND_SELECT_OBJECTS_GROUP = 4; 51 public const int LAND_SELECT_OBJECTS_GROUP = 4;
52 public const int LAND_SELECT_OBJECTS_OTHER = 8; 52 public const int LAND_SELECT_OBJECTS_OTHER = 8;
53 53
54 54
55 public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 55 public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000
56 // types 1 to 7 are exclusive 56 // types 1 to 7 are exclusive
57 public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001 57 public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.World.Land
75 #endregion 75 #endregion
76 76
77 private readonly Scene m_scene; 77 private readonly Scene m_scene;
78 private readonly LandManagementModule m_landManagementModule; 78 private readonly LandManagementModule m_landManagementModule;
79 79
80 public LandChannel(Scene scene, LandManagementModule landManagementMod) 80 public LandChannel(Scene scene, LandManagementModule landManagementMod)
81 { 81 {
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.Land
91 { 91 {
92 return m_landManagementModule.GetLandObject(x_float, y_float); 92 return m_landManagementModule.GetLandObject(x_float, y_float);
93 } 93 }
94 94
95 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 95 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
96 obj.LandData.Name = "NO LAND"; 96 obj.LandData.Name = "NO LAND";
97 return obj; 97 return obj;
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.Land
117 { 117 {
118 return m_landManagementModule.GetLandObject(x, y); 118 return m_landManagementModule.GetLandObject(x, y);
119 } 119 }
120 120
121 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 121 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
122 obj.LandData.Name = "NO LAND"; 122 obj.LandData.Name = "NO LAND";
123 return obj; 123 return obj;
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.World.Land
132 132
133 return new List<ILandObject>(); 133 return new List<ILandObject>();
134 } 134 }
135 135
136 public void Clear(bool setupDefaultParcel) 136 public void Clear(bool setupDefaultParcel)
137 { 137 {
138 if (m_landManagementModule != null) 138 if (m_landManagementModule != null)
@@ -182,7 +182,7 @@ namespace OpenSim.Region.CoreModules.World.Land
182 m_landManagementModule.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); 182 m_landManagementModule.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id);
183 } 183 }
184 } 184 }
185 185
186 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) 186 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
187 { 187 {
188 if (m_landManagementModule != null) 188 if (m_landManagementModule != null)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 22bc49e..63b8de0 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -52,7 +52,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
52namespace OpenSim.Region.CoreModules.World.Land 52namespace OpenSim.Region.CoreModules.World.Land
53{ 53{
54 // used for caching 54 // used for caching
55 internal class ExtendedLandData 55 internal class ExtendedLandData
56 { 56 {
57 public LandData LandData; 57 public LandData LandData;
58 public ulong RegionHandle; 58 public ulong RegionHandle;
@@ -151,9 +151,9 @@ namespace OpenSim.Region.CoreModules.World.Land
151 151
152 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; 152 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd;
153 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; 153 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate;
154 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene; 154 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
155 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate; 155 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
156 156
157 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; 157 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel;
158 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement; 158 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement;
159 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy; 159 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
@@ -163,14 +163,14 @@ namespace OpenSim.Region.CoreModules.World.Land
163 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement; 163 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
164 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage; 164 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
165 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage; 165 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
166 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan; 166 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
167 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps; 167 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
168 168
169 lock (m_scene) 169 lock (m_scene)
170 { 170 {
171 m_scene.LandChannel = (ILandChannel)landChannel; 171 m_scene.LandChannel = (ILandChannel)landChannel;
172 } 172 }
173 173
174 RegisterCommands(); 174 RegisterCommands();
175 } 175 }
176 176
@@ -183,8 +183,8 @@ namespace OpenSim.Region.CoreModules.World.Land
183 } 183 }
184 184
185 public void RemoveRegion(Scene scene) 185 public void RemoveRegion(Scene scene)
186 { 186 {
187 // TODO: Release event manager listeners here 187 // TODO: Release event manager listeners here
188 } 188 }
189 189
190// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason) 190// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land
192// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y); 192// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y);
193// reason = "You are not allowed to enter this sim."; 193// reason = "You are not allowed to enter this sim.";
194// return nearestParcel != null; 194// return nearestParcel != null;
195// } 195// }
196 196
197 void EventManagerOnNewClient(IClientAPI client) 197 void EventManagerOnNewClient(IClientAPI client)
198 { 198 {
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.World.Land
274 m_landIDList = new int[m_scene.RegionInfo.RegionSizeX / LandUnit, m_scene.RegionInfo.RegionSizeY / LandUnit]; 274 m_landIDList = new int[m_scene.RegionInfo.RegionSizeX / LandUnit, m_scene.RegionInfo.RegionSizeY / LandUnit];
275 } 275 }
276 } 276 }
277 277
278 /// <summary> 278 /// <summary>
279 /// Create a default parcel that spans the entire region and is owned by the estate owner. 279 /// Create a default parcel that spans the entire region and is owned by the estate owner.
280 /// </summary> 280 /// </summary>
@@ -360,7 +360,7 @@ namespace OpenSim.Region.CoreModules.World.Land
360 return false; 360 return false;
361 } 361 }
362 } 362 }
363 363
364 if(ban) 364 if(ban)
365 { 365 {
366 if (!forcedPosition.Contains(avatar.UUID)) 366 if (!forcedPosition.Contains(avatar.UUID))
@@ -581,13 +581,13 @@ namespace OpenSim.Region.CoreModules.World.Land
581 /// Adds a land object to the stored list and adds them to the landIDList to what they own 581 /// Adds a land object to the stored list and adds them to the landIDList to what they own
582 /// </summary> 582 /// </summary>
583 /// <param name="new_land"> 583 /// <param name="new_land">
584 /// The land object being added. 584 /// The land object being added.
585 /// Will return null if this overlaps with an existing parcel that has not had its bitmap adjusted. 585 /// Will return null if this overlaps with an existing parcel that has not had its bitmap adjusted.
586 /// </param> 586 /// </param>
587 public ILandObject AddLandObject(ILandObject land) 587 public ILandObject AddLandObject(ILandObject land)
588 { 588 {
589 ILandObject new_land = land.Copy(); 589 ILandObject new_land = land.Copy();
590 590
591 // Only now can we add the prim counts to the land object - we rely on the global ID which is generated 591 // Only now can we add the prim counts to the land object - we rely on the global ID which is generated
592 // as a random UUID inside LandData initialization 592 // as a random UUID inside LandData initialization
593 if (m_primCountModule != null) 593 if (m_primCountModule != null)
@@ -607,7 +607,7 @@ namespace OpenSim.Region.CoreModules.World.Land
607 } 607 }
608 else 608 else
609 { 609 {
610 // If other land objects still believe that they occupy any parts of the same space, 610 // If other land objects still believe that they occupy any parts of the same space,
611 // then do not allow the add to proceed. 611 // then do not allow the add to proceed.
612 for (int x = 0; x < landBitmap.GetLength(0); x++) 612 for (int x = 0; x < landBitmap.GetLength(0); x++)
613 { 613 {
@@ -642,7 +642,7 @@ namespace OpenSim.Region.CoreModules.World.Land
642 if (landBitmap[x, y]) 642 if (landBitmap[x, y])
643 { 643 {
644 // m_log.DebugFormat( 644 // m_log.DebugFormat(
645 // "[LAND MANAGEMENT MODULE]: Registering parcel {0} for land co-ord ({1}, {2}) on {3}", 645 // "[LAND MANAGEMENT MODULE]: Registering parcel {0} for land co-ord ({1}, {2}) on {3}",
646 // new_land.LandData.Name, x, y, m_scene.RegionInfo.RegionName); 646 // new_land.LandData.Name, x, y, m_scene.RegionInfo.RegionName);
647 647
648 m_landIDList[x, y] = newLandLocalID; 648 m_landIDList[x, y] = newLandLocalID;
@@ -690,10 +690,10 @@ namespace OpenSim.Region.CoreModules.World.Land
690 690
691 m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID); 691 m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID);
692 } 692 }
693 693
694 /// <summary> 694 /// <summary>
695 /// Clear the scene of all parcels 695 /// Clear the scene of all parcels
696 /// </summary> 696 /// </summary>
697 public void Clear(bool setupDefaultParcel) 697 public void Clear(bool setupDefaultParcel)
698 { 698 {
699 Dictionary<int, ILandObject> landworkList; 699 Dictionary<int, ILandObject> landworkList;
@@ -1077,7 +1077,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1077 1077
1078 if(maxindex < 0 || selectedLandObjects.Count < 2) 1078 if(maxindex < 0 || selectedLandObjects.Count < 2)
1079 return; 1079 return;
1080 1080
1081 ILandObject masterLandObject = selectedLandObjects[maxindex]; 1081 ILandObject masterLandObject = selectedLandObjects[maxindex];
1082 selectedLandObjects.RemoveAt(maxindex); 1082 selectedLandObjects.RemoveAt(maxindex);
1083 1083
@@ -1146,7 +1146,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1146 1146
1147 if (currentParcelBlock != null) 1147 if (currentParcelBlock != null)
1148 { 1148 {
1149 // types 1149 // types
1150 if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId) 1150 if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId)
1151 { 1151 {
1152 //Owner Flag 1152 //Owner Flag
@@ -1165,7 +1165,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1165 } 1165 }
1166 else if (currentParcelBlock.LandData.OwnerID == UUID.Zero) 1166 else if (currentParcelBlock.LandData.OwnerID == UUID.Zero)
1167 { 1167 {
1168 //Public type 1168 //Public type
1169 tempByte = (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing, its zero 1169 tempByte = (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing, its zero
1170 } 1170 }
1171 // LAND_TYPE_IS_BEING_AUCTIONED still unsuported 1171 // LAND_TYPE_IS_BEING_AUCTIONED still unsuported
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1402 land.LandData.GroupID = UUID.Zero; 1402 land.LandData.GroupID = UUID.Zero;
1403 land.LandData.IsGroupOwned = false; 1403 land.LandData.IsGroupOwned = false;
1404 land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); 1404 land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
1405 1405
1406 m_scene.ForEachClient(SendParcelOverlay); 1406 m_scene.ForEachClient(SendParcelOverlay);
1407 land.SendLandUpdateToClient(true, remote_client); 1407 land.SendLandUpdateToClient(true, remote_client);
1408 UpdateLandObject(land.LandData.LocalID, land.LandData); 1408 UpdateLandObject(land.LandData.LocalID, land.LandData);
@@ -1584,7 +1584,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1584 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); 1584 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
1585 new_land.LandData = data.Copy(); 1585 new_land.LandData = data.Copy();
1586 1586
1587 new_land.SetLandBitmapFromByteArray(); 1587 new_land.SetLandBitmapFromByteArray();
1588 AddLandObject(new_land); 1588 AddLandObject(new_land);
1589// new_land.SendLandUpdateToAvatarsOverMe(); 1589// new_land.SendLandUpdateToAvatarsOverMe();
1590 } 1590 }
@@ -1599,7 +1599,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1599 m_landList.TryGetValue(localID, out selectedParcel); 1599 m_landList.TryGetValue(localID, out selectedParcel);
1600 } 1600 }
1601 1601
1602 if (selectedParcel == null) 1602 if (selectedParcel == null)
1603 return; 1603 return;
1604 1604
1605 selectedParcel.ReturnLandObjects(returnType, agentIDs, taskIDs, remoteClient); 1605 selectedParcel.ReturnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1706 private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) 1706 private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
1707 { 1707 {
1708 IClientAPI client; 1708 IClientAPI client;
1709 if (!m_scene.TryGetClient(agentID, out client)) 1709 if (!m_scene.TryGetClient(agentID, out client))
1710 { 1710 {
1711 m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); 1711 m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID);
1712 return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); 1712 return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
@@ -1765,7 +1765,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1765 1765
1766 if (land != null) 1766 if (land != null)
1767 { 1767 {
1768 UpdateLandProperties(land,land_update, client); 1768 UpdateLandProperties(land,land_update, client);
1769 m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); 1769 m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client);
1770 } 1770 }
1771 else 1771 else
@@ -2103,7 +2103,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2103 targetAvatar.TeleportWithMomentum(pos, null); 2103 targetAvatar.TeleportWithMomentum(pos, null);
2104 targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname); 2104 targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
2105 parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected."); 2105 parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
2106 2106
2107 if ((flags & 1) != 0) // Ban TODO: Remove magic number 2107 if ((flags & 1) != 0) // Ban TODO: Remove magic number
2108 { 2108 {
2109 LandAccessEntry entry = new LandAccessEntry(); 2109 LandAccessEntry entry = new LandAccessEntry();
@@ -2144,7 +2144,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2144 if (// Required: local user; foreign users cannot set home 2144 if (// Required: local user; foreign users cannot set home
2145 m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) && 2145 m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) &&
2146 (// (a) gods and land managers can set home 2146 (// (a) gods and land managers can set home
2147 m_scene.Permissions.IsAdministrator(remoteClient.AgentId) || 2147 m_scene.Permissions.IsAdministrator(remoteClient.AgentId) ||
2148 m_scene.Permissions.IsGod(remoteClient.AgentId) || 2148 m_scene.Permissions.IsGod(remoteClient.AgentId) ||
2149 // (b) land owners can set home 2149 // (b) land owners can set home
2150 remoteClient.AgentId == land.LandData.OwnerID || 2150 remoteClient.AgentId == land.LandData.OwnerID ||
@@ -2196,8 +2196,8 @@ namespace OpenSim.Region.CoreModules.World.Land
2196 "If no local land ID is given, then summary information about all the parcels is shown.\n" 2196 "If no local land ID is given, then summary information about all the parcels is shown.\n"
2197 + "If a local land ID is given then full information about that parcel is shown.", 2197 + "If a local land ID is given then full information about that parcel is shown.",
2198 HandleShowCommand); 2198 HandleShowCommand);
2199 } 2199 }
2200 2200
2201 protected void HandleClearCommand(string module, string[] args) 2201 protected void HandleClearCommand(string module, string[] args)
2202 { 2202 {
2203 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene)) 2203 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
@@ -2205,9 +2205,9 @@ namespace OpenSim.Region.CoreModules.World.Land
2205 2205
2206 string response = MainConsole.Instance.CmdPrompt( 2206 string response = MainConsole.Instance.CmdPrompt(
2207 string.Format( 2207 string.Format(
2208 "Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name), 2208 "Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name),
2209 "n"); 2209 "n");
2210 2210
2211 if (response.ToLower() == "y") 2211 if (response.ToLower() == "y")
2212 { 2212 {
2213 Clear(true); 2213 Clear(true);
@@ -2217,14 +2217,14 @@ namespace OpenSim.Region.CoreModules.World.Land
2217 { 2217 {
2218 MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name); 2218 MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name);
2219 } 2219 }
2220 } 2220 }
2221 2221
2222 protected void HandleShowCommand(string module, string[] args) 2222 protected void HandleShowCommand(string module, string[] args)
2223 { 2223 {
2224 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene)) 2224 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
2225 return; 2225 return;
2226 2226
2227 StringBuilder report = new StringBuilder(); 2227 StringBuilder report = new StringBuilder();
2228 2228
2229 if (args.Length <= 2) 2229 if (args.Length <= 2)
2230 { 2230 {
@@ -2240,7 +2240,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2240 ILandObject lo; 2240 ILandObject lo;
2241 2241
2242 lock (m_landList) 2242 lock (m_landList)
2243 { 2243 {
2244 if (!m_landList.TryGetValue(landLocalId, out lo)) 2244 if (!m_landList.TryGetValue(landLocalId, out lo))
2245 { 2245 {
2246 MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId); 2246 MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId);
@@ -2265,7 +2265,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2265 cdt.AddColumn("Starts", ConsoleDisplayUtil.VectorSize); 2265 cdt.AddColumn("Starts", ConsoleDisplayUtil.VectorSize);
2266 cdt.AddColumn("Ends", ConsoleDisplayUtil.VectorSize); 2266 cdt.AddColumn("Ends", ConsoleDisplayUtil.VectorSize);
2267 cdt.AddColumn("Owner", ConsoleDisplayUtil.UserNameSize); 2267 cdt.AddColumn("Owner", ConsoleDisplayUtil.UserNameSize);
2268 2268
2269 lock (m_landList) 2269 lock (m_landList)
2270 { 2270 {
2271 foreach (ILandObject lo in m_landList.Values) 2271 foreach (ILandObject lo in m_landList.Values)
@@ -2316,7 +2316,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2316 cdl.AddRow("GroupID", ld.GroupID); 2316 cdl.AddRow("GroupID", ld.GroupID);
2317 2317
2318 cdl.AddRow("Status", ld.Status); 2318 cdl.AddRow("Status", ld.Status);
2319 cdl.AddRow("Flags", (ParcelFlags)ld.Flags); 2319 cdl.AddRow("Flags", (ParcelFlags)ld.Flags);
2320 2320
2321 cdl.AddRow("Landing Type", (LandingType)ld.LandingType); 2321 cdl.AddRow("Landing Type", (LandingType)ld.LandingType);
2322 cdl.AddRow("User Location", ld.UserLocation); 2322 cdl.AddRow("User Location", ld.UserLocation);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 4cbc8b8..fc2282d 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.World.Land
75 return free; 75 return free;
76 } 76 }
77 77
78 protected LandData m_landData; 78 protected LandData m_landData;
79 public LandData LandData 79 public LandData LandData
80 { 80 {
81 get { return m_landData; } 81 get { return m_landData; }
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.World.Land
196 else if(testpos.Y >= maxy) 196 else if(testpos.Y >= maxy)
197 return null; // will never get there 197 return null; // will never get there
198 } 198 }
199 199
200 while(!LandBitmap[(int)testpos.X, (int)testpos.Y]) 200 while(!LandBitmap[(int)testpos.X, (int)testpos.Y])
201 { 201 {
202 testpos += direction; 202 testpos += direction;
@@ -278,14 +278,14 @@ namespace OpenSim.Region.CoreModules.World.Land
278 else 278 else
279 LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; 279 LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit];
280 280
281 LandData = new LandData(); 281 LandData = new LandData();
282 LandData.OwnerID = owner_id; 282 LandData.OwnerID = owner_id;
283 if (is_group_owned) 283 if (is_group_owned)
284 LandData.GroupID = owner_id; 284 LandData.GroupID = owner_id;
285 else 285 else
286 LandData.GroupID = UUID.Zero; 286 LandData.GroupID = UUID.Zero;
287 LandData.IsGroupOwned = is_group_owned; 287 LandData.IsGroupOwned = is_group_owned;
288 288
289 m_scene.EventManager.OnFrame += OnFrame; 289 m_scene.EventManager.OnFrame += OnFrame;
290 } 290 }
291 291
@@ -294,7 +294,7 @@ namespace OpenSim.Region.CoreModules.World.Land
294 #region Member Functions 294 #region Member Functions
295 295
296 #region General Functions 296 #region General Functions
297 297
298 /// <summary> 298 /// <summary>
299 /// Checks to see if this land object contains a point 299 /// Checks to see if this land object contains a point
300 /// </summary> 300 /// </summary>
@@ -373,12 +373,12 @@ namespace OpenSim.Region.CoreModules.World.Land
373 373
374 if(simMax > m_scene.RegionInfo.ObjectCapacity) 374 if(simMax > m_scene.RegionInfo.ObjectCapacity)
375 simMax = m_scene.RegionInfo.ObjectCapacity; 375 simMax = m_scene.RegionInfo.ObjectCapacity;
376 //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", 376 //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}",
377 // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); 377 // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims);
378 return simMax; 378 return simMax;
379 } 379 }
380 } 380 }
381 381
382 #endregion 382 #endregion
383 383
384 #region Packet Request Handling 384 #region Packet Request Handling
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.World.Land
552 needOverlay = true; 552 needOverlay = true;
553 553
554 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); 554 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
555 return true; 555 return true;
556 } 556 }
557 return false; 557 return false;
558 } 558 }
@@ -720,11 +720,11 @@ namespace OpenSim.Region.CoreModules.World.Land
720 720
721 if(sp==null || !sp.isNPC) 721 if(sp==null || !sp.isNPC)
722 return true; 722 return true;
723 723
724 INPC npccli = (INPC)sp.ControllingClient; 724 INPC npccli = (INPC)sp.ControllingClient;
725 if(npccli== null) 725 if(npccli== null)
726 return true; 726 return true;
727 727
728 UUID owner = npccli.Owner; 728 UUID owner = npccli.Owner;
729 729
730 if(owner == UUID.Zero) 730 if(owner == UUID.Zero)
@@ -898,7 +898,7 @@ namespace OpenSim.Region.CoreModules.World.Land
898 // update use lists flags 898 // update use lists flags
899 // rights already checked or we wont be here 899 // rights already checked or we wont be here
900 uint parcelflags = newData.Flags; 900 uint parcelflags = newData.Flags;
901 901
902 if((flags & (uint)AccessList.Access) != 0) 902 if((flags & (uint)AccessList.Access) != 0)
903 parcelflags |= (uint)ParcelFlags.UseAccessList; 903 parcelflags |= (uint)ParcelFlags.UseAccessList;
904 if((flags & (uint)AccessList.Ban) != 0) 904 if((flags & (uint)AccessList.Ban) != 0)
@@ -1024,7 +1024,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1024 LandData.AABBMin = new Vector3(tx, ty, 0f); 1024 LandData.AABBMin = new Vector3(tx, ty, 0f);
1025 else 1025 else
1026 LandData.AABBMin = new Vector3(tx, ty, (float)m_scene.Heightmap[tx, ty]); 1026 LandData.AABBMin = new Vector3(tx, ty, (float)m_scene.Heightmap[tx, ty]);
1027 1027
1028 max_x++; 1028 max_x++;
1029 tx = max_x * landUnit; 1029 tx = max_x * landUnit;
1030 if (tx > regionSizeX) 1030 if (tx > regionSizeX)
@@ -1042,7 +1042,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1042 LandData.AABBMax = new Vector3(tx, ty, 0f); 1042 LandData.AABBMax = new Vector3(tx, ty, 0f);
1043 else 1043 else
1044 LandData.AABBMax = new Vector3(tx, ty, (float)m_scene.Heightmap[tx - 1, ty - 1]); 1044 LandData.AABBMax = new Vector3(tx, ty, (float)m_scene.Heightmap[tx - 1, ty - 1]);
1045 1045
1046 LandData.Area = tempArea * landUnit * landUnit; 1046 LandData.Area = tempArea * landUnit * landUnit;
1047 } 1047 }
1048 1048
@@ -1073,7 +1073,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1073 { 1073 {
1074 return GetSquareLandBitmap(0, 0, (int)m_scene.RegionInfo.RegionSizeX, (int) m_scene.RegionInfo.RegionSizeY, true); 1074 return GetSquareLandBitmap(0, 0, (int)m_scene.RegionInfo.RegionSizeX, (int) m_scene.RegionInfo.RegionSizeY, true);
1075 } 1075 }
1076 1076
1077 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true) 1077 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true)
1078 { 1078 {
1079 // Empty bitmap for the whole region 1079 // Empty bitmap for the whole region
@@ -1317,7 +1317,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1317 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> 1317 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param>
1318 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt</param> 1318 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt</param>
1319 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param> 1319 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param>
1320 /// <returns>New parcel bitmap</returns> 1320 /// <returns>New parcel bitmap</returns>
1321 public bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax) 1321 public bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax)
1322 { 1322 {
1323 // get the size of the incoming bitmaps 1323 // get the size of the incoming bitmaps
@@ -1409,7 +1409,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1409 // Importing land parcel data from an OAR where the source region is a different size to the dest region requires us 1409 // Importing land parcel data from an OAR where the source region is a different size to the dest region requires us
1410 // to make a LandBitmap that's not derived from the current region's size. We use the LandData.Bitmap size in bytes 1410 // to make a LandBitmap that's not derived from the current region's size. We use the LandData.Bitmap size in bytes
1411 // to figure out what the OAR's region dimensions are. (Is there a better way to get the src region x and y from the OAR?) 1411 // to figure out what the OAR's region dimensions are. (Is there a better way to get the src region x and y from the OAR?)
1412 // This method assumes we always will have square regions 1412 // This method assumes we always will have square regions
1413 1413
1414 bitmapLen = LandData.Bitmap.Length; 1414 bitmapLen = LandData.Bitmap.Length;
1415 xLen = (int)Math.Abs(Math.Sqrt(bitmapLen * 8)); 1415 xLen = (int)Math.Abs(Math.Sqrt(bitmapLen * 8));
@@ -1550,9 +1550,9 @@ namespace OpenSim.Region.CoreModules.World.Land
1550 lock (primsOverMe) 1550 lock (primsOverMe)
1551 { 1551 {
1552// m_log.DebugFormat( 1552// m_log.DebugFormat(
1553// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region", 1553// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region",
1554// remote_client.Name, primsOverMe.Count); 1554// remote_client.Name, primsOverMe.Count);
1555 1555
1556 try 1556 try
1557 { 1557 {
1558 foreach (SceneObjectGroup obj in primsOverMe) 1558 foreach (SceneObjectGroup obj in primsOverMe)
@@ -1593,7 +1593,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1593 public Dictionary<UUID, int> GetLandObjectOwners() 1593 public Dictionary<UUID, int> GetLandObjectOwners()
1594 { 1594 {
1595 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); 1595 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
1596 1596
1597 lock (primsOverMe) 1597 lock (primsOverMe)
1598 { 1598 {
1599 try 1599 try
@@ -1669,7 +1669,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1669 { 1669 {
1670// m_log.DebugFormat( 1670// m_log.DebugFormat(
1671// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name); 1671// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name);
1672 1672
1673 Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>(); 1673 Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>();
1674 1674
1675 lock (primsOverMe) 1675 lock (primsOverMe)
@@ -1752,7 +1752,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1752 public void AddPrimOverMe(SceneObjectGroup obj) 1752 public void AddPrimOverMe(SceneObjectGroup obj)
1753 { 1753 {
1754// m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name); 1754// m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name);
1755 1755
1756 lock (primsOverMe) 1756 lock (primsOverMe)
1757 primsOverMe.Add(obj); 1757 primsOverMe.Add(obj);
1758 } 1758 }
@@ -1760,13 +1760,13 @@ namespace OpenSim.Region.CoreModules.World.Land
1760 public void RemovePrimFromOverMe(SceneObjectGroup obj) 1760 public void RemovePrimFromOverMe(SceneObjectGroup obj)
1761 { 1761 {
1762// m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name); 1762// m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name);
1763 1763
1764 lock (primsOverMe) 1764 lock (primsOverMe)
1765 primsOverMe.Remove(obj); 1765 primsOverMe.Remove(obj);
1766 } 1766 }
1767 1767
1768 #endregion 1768 #endregion
1769 1769
1770 /// <summary> 1770 /// <summary>
1771 /// Set the media url for this land parcel 1771 /// Set the media url for this land parcel
1772 /// </summary> 1772 /// </summary>
@@ -1777,7 +1777,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1777 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData); 1777 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
1778 SendLandUpdateToAvatarsOverMe(); 1778 SendLandUpdateToAvatarsOverMe();
1779 } 1779 }
1780 1780
1781 /// <summary> 1781 /// <summary>
1782 /// Set the music url for this land parcel 1782 /// Set the music url for this land parcel
1783 /// </summary> 1783 /// </summary>
@@ -1824,7 +1824,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1824 { 1824 {
1825 LandData.ParcelAccessList.Remove(entry); 1825 LandData.ParcelAccessList.Remove(entry);
1826 ScenePresence presence; 1826 ScenePresence presence;
1827 1827
1828 if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent)) 1828 if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent))
1829 { 1829 {
1830 ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); 1830 ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index 771fdd2..857f919 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -69,11 +69,11 @@ namespace OpenSim.Region.CoreModules.World.Land
69 /// For now, a simple simwide taint to get this up. Later parcel based 69 /// For now, a simple simwide taint to get this up. Later parcel based
70 /// taint to allow recounting a parcel if only ownership has changed 70 /// taint to allow recounting a parcel if only ownership has changed
71 /// without recounting the whole sim. 71 /// without recounting the whole sim.
72 /// 72 ///
73 /// We start out tainted so that the first get call resets the various prim counts. 73 /// We start out tainted so that the first get call resets the various prim counts.
74 /// </value> 74 /// </value>
75 private bool m_Tainted = true; 75 private bool m_Tainted = true;
76 76
77 private Object m_TaintLock = new Object(); 77 private Object m_TaintLock = new Object();
78 78
79 public Type ReplaceableInterface 79 public Type ReplaceableInterface
@@ -88,10 +88,10 @@ namespace OpenSim.Region.CoreModules.World.Land
88 public void AddRegion(Scene scene) 88 public void AddRegion(Scene scene)
89 { 89 {
90 m_Scene = scene; 90 m_Scene = scene;
91 91
92 m_Scene.RegisterModuleInterface<IPrimCountModule>(this); 92 m_Scene.RegisterModuleInterface<IPrimCountModule>(this);
93 93
94 m_Scene.EventManager.OnObjectAddedToScene += OnParcelPrimCountAdd; 94 m_Scene.EventManager.OnObjectAddedToScene += OnParcelPrimCountAdd;
95 m_Scene.EventManager.OnObjectBeingRemovedFromScene += 95 m_Scene.EventManager.OnObjectBeingRemovedFromScene +=
96 OnObjectBeingRemovedFromScene; 96 OnObjectBeingRemovedFromScene;
97 m_Scene.EventManager.OnParcelPrimCountTainted += 97 m_Scene.EventManager.OnParcelPrimCountTainted +=
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Land
104 } 104 }
105 105
106 public void RemoveRegion(Scene scene) 106 public void RemoveRegion(Scene scene)
107 { 107 {
108 } 108 }
109 109
110 public void Close() 110 public void Close()
@@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Land
126 AddObject(obj); 126 AddObject(obj);
127// else 127// else
128// m_log.DebugFormat( 128// m_log.DebugFormat(
129// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted", 129// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted",
130// obj.Name, m_Scene.RegionInfo.RegionName); 130// obj.Name, m_Scene.RegionInfo.RegionName);
131 } 131 }
132 } 132 }
@@ -140,16 +140,16 @@ namespace OpenSim.Region.CoreModules.World.Land
140 RemoveObject(obj); 140 RemoveObject(obj);
141// else 141// else
142// m_log.DebugFormat( 142// m_log.DebugFormat(
143// "[PRIM COUNT MODULE]: Ignoring OnObjectBeingRemovedFromScene() for {0} on {1} since count is tainted", 143// "[PRIM COUNT MODULE]: Ignoring OnObjectBeingRemovedFromScene() for {0} on {1} since count is tainted",
144// obj.Name, m_Scene.RegionInfo.RegionName); 144// obj.Name, m_Scene.RegionInfo.RegionName);
145 } 145 }
146 } 146 }
147 147
148 private void OnParcelPrimCountTainted() 148 private void OnParcelPrimCountTainted()
149 { 149 {
150// m_log.DebugFormat( 150// m_log.DebugFormat(
151// "[PRIM COUNT MODULE]: OnParcelPrimCountTainted() called on {0}", m_Scene.RegionInfo.RegionName); 151// "[PRIM COUNT MODULE]: OnParcelPrimCountTainted() called on {0}", m_Scene.RegionInfo.RegionName);
152 152
153 lock (m_TaintLock) 153 lock (m_TaintLock)
154 m_Tainted = true; 154 m_Tainted = true;
155 } 155 }
@@ -174,33 +174,33 @@ namespace OpenSim.Region.CoreModules.World.Land
174 174
175 // NOTE: Call under Taint Lock 175 // NOTE: Call under Taint Lock
176 private void AddObject(SceneObjectGroup obj) 176 private void AddObject(SceneObjectGroup obj)
177 { 177 {
178 if (obj.IsAttachment) 178 if (obj.IsAttachment)
179 return; 179 return;
180 if (((obj.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)) 180 if (((obj.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0))
181 return; 181 return;
182 182
183 Vector3 pos = obj.AbsolutePosition; 183 Vector3 pos = obj.AbsolutePosition;
184 ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); 184 ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y);
185 185
186 // If for some reason there is no land object (perhaps the object is out of bounds) then we can't count it 186 // If for some reason there is no land object (perhaps the object is out of bounds) then we can't count it
187 if (landObject == null) 187 if (landObject == null)
188 { 188 {
189// m_log.WarnFormat( 189// m_log.WarnFormat(
190// "[PRIM COUNT MODULE]: Found no land object for {0} at position ({1}, {2}) on {3}", 190// "[PRIM COUNT MODULE]: Found no land object for {0} at position ({1}, {2}) on {3}",
191// obj.Name, pos.X, pos.Y, m_Scene.RegionInfo.RegionName); 191// obj.Name, pos.X, pos.Y, m_Scene.RegionInfo.RegionName);
192 192
193 return; 193 return;
194 } 194 }
195 195
196 LandData landData = landObject.LandData; 196 LandData landData = landObject.LandData;
197 197
198// m_log.DebugFormat( 198// m_log.DebugFormat(
199// "[PRIM COUNT MODULE]: Adding object {0} with {1} parts to prim count for parcel {2} on {3}", 199// "[PRIM COUNT MODULE]: Adding object {0} with {1} parts to prim count for parcel {2} on {3}",
200// obj.Name, obj.Parts.Length, landData.Name, m_Scene.RegionInfo.RegionName); 200// obj.Name, obj.Parts.Length, landData.Name, m_Scene.RegionInfo.RegionName);
201 201
202// m_log.DebugFormat( 202// m_log.DebugFormat(
203// "[PRIM COUNT MODULE]: Object {0} is owned by {1} over land owned by {2}", 203// "[PRIM COUNT MODULE]: Object {0} is owned by {1} over land owned by {2}",
204// obj.Name, obj.OwnerID, landData.OwnerID); 204// obj.Name, obj.OwnerID, landData.OwnerID);
205 205
206 ParcelCounts parcelCounts; 206 ParcelCounts parcelCounts;
@@ -217,7 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Land
217 217
218 if (obj.IsSelected) 218 if (obj.IsSelected)
219 { 219 {
220 parcelCounts.Selected += partCount; 220 parcelCounts.Selected += partCount;
221 } 221 }
222 else 222 else
223 { 223 {
@@ -244,8 +244,8 @@ namespace OpenSim.Region.CoreModules.World.Land
244 // NOTE: Call under Taint Lock 244 // NOTE: Call under Taint Lock
245 private void RemoveObject(SceneObjectGroup obj) 245 private void RemoveObject(SceneObjectGroup obj)
246 { 246 {
247// m_log.DebugFormat("[PRIM COUNT MODULE]: Removing object {0} {1} from prim count", obj.Name, obj.UUID); 247// m_log.DebugFormat("[PRIM COUNT MODULE]: Removing object {0} {1} from prim count", obj.Name, obj.UUID);
248 248
249 // Currently this is being done by tainting the count instead. 249 // Currently this is being done by tainting the count instead.
250 } 250 }
251 251
@@ -253,7 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Land
253 { 253 {
254// m_log.DebugFormat( 254// m_log.DebugFormat(
255// "[PRIM COUNT MODULE]: GetPrimCounts for parcel {0} in {1}", parcelID, m_Scene.RegionInfo.RegionName); 255// "[PRIM COUNT MODULE]: GetPrimCounts for parcel {0} in {1}", parcelID, m_Scene.RegionInfo.RegionName);
256 256
257 PrimCounts primCounts; 257 PrimCounts primCounts;
258 258
259 lock (m_PrimCounts) 259 lock (m_PrimCounts)
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.World.Land
267 return primCounts; 267 return primCounts;
268 } 268 }
269 269
270 270
271 /// <summary> 271 /// <summary>
272 /// Get the number of prims on the parcel that are owned by the parcel owner. 272 /// Get the number of prims on the parcel that are owned by the parcel owner.
273 /// </summary> 273 /// </summary>
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.World.Land
276 public int GetOwnerCount(UUID parcelID) 276 public int GetOwnerCount(UUID parcelID)
277 { 277 {
278 int count = 0; 278 int count = 0;
279 279
280 lock (m_TaintLock) 280 lock (m_TaintLock)
281 { 281 {
282 if (m_Tainted) 282 if (m_Tainted)
@@ -286,11 +286,11 @@ namespace OpenSim.Region.CoreModules.World.Land
286 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 286 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
287 count = counts.Owner; 287 count = counts.Owner;
288 } 288 }
289 289
290// m_log.DebugFormat( 290// m_log.DebugFormat(
291// "[PRIM COUNT MODULE]: GetOwnerCount for parcel {0} in {1} returning {2}", 291// "[PRIM COUNT MODULE]: GetOwnerCount for parcel {0} in {1} returning {2}",
292// parcelID, m_Scene.RegionInfo.RegionName, count); 292// parcelID, m_Scene.RegionInfo.RegionName, count);
293 293
294 return count; 294 return count;
295 } 295 }
296 296
@@ -298,11 +298,11 @@ namespace OpenSim.Region.CoreModules.World.Land
298 /// Get the number of prims on the parcel that have been set to the group that owns the parcel. 298 /// Get the number of prims on the parcel that have been set to the group that owns the parcel.
299 /// </summary> 299 /// </summary>
300 /// <param name="parcelID"></param> 300 /// <param name="parcelID"></param>
301 /// <returns></returns> 301 /// <returns></returns>
302 public int GetGroupCount(UUID parcelID) 302 public int GetGroupCount(UUID parcelID)
303 { 303 {
304 int count = 0; 304 int count = 0;
305 305
306 lock (m_TaintLock) 306 lock (m_TaintLock)
307 { 307 {
308 if (m_Tainted) 308 if (m_Tainted)
@@ -312,11 +312,11 @@ namespace OpenSim.Region.CoreModules.World.Land
312 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 312 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
313 count = counts.Group; 313 count = counts.Group;
314 } 314 }
315 315
316// m_log.DebugFormat( 316// m_log.DebugFormat(
317// "[PRIM COUNT MODULE]: GetGroupCount for parcel {0} in {1} returning {2}", 317// "[PRIM COUNT MODULE]: GetGroupCount for parcel {0} in {1} returning {2}",
318// parcelID, m_Scene.RegionInfo.RegionName, count); 318// parcelID, m_Scene.RegionInfo.RegionName, count);
319 319
320 return count; 320 return count;
321 } 321 }
322 322
@@ -324,11 +324,11 @@ namespace OpenSim.Region.CoreModules.World.Land
324 /// Get the number of prims on the parcel that are not owned by the parcel owner or set to the parcel group. 324 /// Get the number of prims on the parcel that are not owned by the parcel owner or set to the parcel group.
325 /// </summary> 325 /// </summary>
326 /// <param name="parcelID"></param> 326 /// <param name="parcelID"></param>
327 /// <returns></returns> 327 /// <returns></returns>
328 public int GetOthersCount(UUID parcelID) 328 public int GetOthersCount(UUID parcelID)
329 { 329 {
330 int count = 0; 330 int count = 0;
331 331
332 lock (m_TaintLock) 332 lock (m_TaintLock)
333 { 333 {
334 if (m_Tainted) 334 if (m_Tainted)
@@ -338,23 +338,23 @@ namespace OpenSim.Region.CoreModules.World.Land
338 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 338 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
339 count = counts.Others; 339 count = counts.Others;
340 } 340 }
341 341
342// m_log.DebugFormat( 342// m_log.DebugFormat(
343// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}", 343// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}",
344// parcelID, m_Scene.RegionInfo.RegionName, count); 344// parcelID, m_Scene.RegionInfo.RegionName, count);
345 345
346 return count; 346 return count;
347 } 347 }
348 348
349 /// <summary> 349 /// <summary>
350 /// Get the number of selected prims. 350 /// Get the number of selected prims.
351 /// </summary> 351 /// </summary>
352 /// <param name="parcelID"></param> 352 /// <param name="parcelID"></param>
353 /// <returns></returns> 353 /// <returns></returns>
354 public int GetSelectedCount(UUID parcelID) 354 public int GetSelectedCount(UUID parcelID)
355 { 355 {
356 int count = 0; 356 int count = 0;
357 357
358 lock (m_TaintLock) 358 lock (m_TaintLock)
359 { 359 {
360 if (m_Tainted) 360 if (m_Tainted)
@@ -364,24 +364,24 @@ namespace OpenSim.Region.CoreModules.World.Land
364 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 364 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
365 count = counts.Selected; 365 count = counts.Selected;
366 } 366 }
367 367
368// m_log.DebugFormat( 368// m_log.DebugFormat(
369// "[PRIM COUNT MODULE]: GetSelectedCount for parcel {0} in {1} returning {2}", 369// "[PRIM COUNT MODULE]: GetSelectedCount for parcel {0} in {1} returning {2}",
370// parcelID, m_Scene.RegionInfo.RegionName, count); 370// parcelID, m_Scene.RegionInfo.RegionName, count);
371 371
372 return count; 372 return count;
373 } 373 }
374 374
375 /// <summary> 375 /// <summary>
376 /// Get the total count of owner, group and others prims on the parcel. 376 /// Get the total count of owner, group and others prims on the parcel.
377 /// FIXME: Need to do selected prims once this is reimplemented. 377 /// FIXME: Need to do selected prims once this is reimplemented.
378 /// </summary> 378 /// </summary>
379 /// <param name="parcelID"></param> 379 /// <param name="parcelID"></param>
380 /// <returns></returns> 380 /// <returns></returns>
381 public int GetTotalCount(UUID parcelID) 381 public int GetTotalCount(UUID parcelID)
382 { 382 {
383 int count = 0; 383 int count = 0;
384 384
385 lock (m_TaintLock) 385 lock (m_TaintLock)
386 { 386 {
387 if (m_Tainted) 387 if (m_Tainted)
@@ -396,28 +396,28 @@ namespace OpenSim.Region.CoreModules.World.Land
396 count += counts.Selected; 396 count += counts.Selected;
397 } 397 }
398 } 398 }
399 399
400// m_log.DebugFormat( 400// m_log.DebugFormat(
401// "[PRIM COUNT MODULE]: GetTotalCount for parcel {0} in {1} returning {2}", 401// "[PRIM COUNT MODULE]: GetTotalCount for parcel {0} in {1} returning {2}",
402// parcelID, m_Scene.RegionInfo.RegionName, count); 402// parcelID, m_Scene.RegionInfo.RegionName, count);
403 403
404 return count; 404 return count;
405 } 405 }
406 406
407 /// <summary> 407 /// <summary>
408 /// Get the number of prims that are in the entire simulator for the owner of this parcel. 408 /// Get the number of prims that are in the entire simulator for the owner of this parcel.
409 /// </summary> 409 /// </summary>
410 /// <param name="parcelID"></param> 410 /// <param name="parcelID"></param>
411 /// <returns></returns> 411 /// <returns></returns>
412 public int GetSimulatorCount(UUID parcelID) 412 public int GetSimulatorCount(UUID parcelID)
413 { 413 {
414 int count = 0; 414 int count = 0;
415 415
416 lock (m_TaintLock) 416 lock (m_TaintLock)
417 { 417 {
418 if (m_Tainted) 418 if (m_Tainted)
419 Recount(); 419 Recount();
420 420
421 UUID owner; 421 UUID owner;
422 if (m_OwnerMap.TryGetValue(parcelID, out owner)) 422 if (m_OwnerMap.TryGetValue(parcelID, out owner))
423 { 423 {
@@ -426,11 +426,11 @@ namespace OpenSim.Region.CoreModules.World.Land
426 count = val; 426 count = val;
427 } 427 }
428 } 428 }
429 429
430// m_log.DebugFormat( 430// m_log.DebugFormat(
431// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}", 431// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}",
432// parcelID, m_Scene.RegionInfo.RegionName, count); 432// parcelID, m_Scene.RegionInfo.RegionName, count);
433 433
434 return count; 434 return count;
435 } 435 }
436 436
@@ -439,11 +439,11 @@ namespace OpenSim.Region.CoreModules.World.Land
439 /// </summary> 439 /// </summary>
440 /// <param name="parcelID"></param> 440 /// <param name="parcelID"></param>
441 /// <param name="userID"></param> 441 /// <param name="userID"></param>
442 /// <returns></returns> 442 /// <returns></returns>
443 public int GetUserCount(UUID parcelID, UUID userID) 443 public int GetUserCount(UUID parcelID, UUID userID)
444 { 444 {
445 int count = 0; 445 int count = 0;
446 446
447 lock (m_TaintLock) 447 lock (m_TaintLock)
448 { 448 {
449 if (m_Tainted) 449 if (m_Tainted)
@@ -459,9 +459,9 @@ namespace OpenSim.Region.CoreModules.World.Land
459 } 459 }
460 460
461// m_log.DebugFormat( 461// m_log.DebugFormat(
462// "[PRIM COUNT MODULE]: GetUserCount for user {0} in parcel {1} in region {2} returning {3}", 462// "[PRIM COUNT MODULE]: GetUserCount for user {0} in parcel {1} in region {2} returning {3}",
463// userID, parcelID, m_Scene.RegionInfo.RegionName, count); 463// userID, parcelID, m_Scene.RegionInfo.RegionName, count);
464 464
465 return count; 465 return count;
466 } 466 }
467 467
@@ -469,13 +469,13 @@ namespace OpenSim.Region.CoreModules.World.Land
469 private void Recount() 469 private void Recount()
470 { 470 {
471// m_log.DebugFormat("[PRIM COUNT MODULE]: Recounting prims on {0}", m_Scene.RegionInfo.RegionName); 471// m_log.DebugFormat("[PRIM COUNT MODULE]: Recounting prims on {0}", m_Scene.RegionInfo.RegionName);
472 472
473 m_OwnerMap.Clear(); 473 m_OwnerMap.Clear();
474 m_SimwideCounts.Clear(); 474 m_SimwideCounts.Clear();
475 m_ParcelCounts.Clear(); 475 m_ParcelCounts.Clear();
476 476
477 List<ILandObject> land = m_Scene.LandChannel.AllParcels(); 477 List<ILandObject> land = m_Scene.LandChannel.AllParcels();
478 478
479 foreach (ILandObject l in land) 479 foreach (ILandObject l in land)
480 { 480 {
481 LandData landData = l.LandData; 481 LandData landData = l.LandData;
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.World.Land
483 m_OwnerMap[landData.GlobalID] = landData.OwnerID; 483 m_OwnerMap[landData.GlobalID] = landData.OwnerID;
484 m_SimwideCounts[landData.OwnerID] = 0; 484 m_SimwideCounts[landData.OwnerID] = 0;
485// m_log.DebugFormat( 485// m_log.DebugFormat(
486// "[PRIM COUNT MODULE]: Initializing parcel count for {0} on {1}", 486// "[PRIM COUNT MODULE]: Initializing parcel count for {0} on {1}",
487// landData.Name, m_Scene.RegionInfo.RegionName); 487// landData.Name, m_Scene.RegionInfo.RegionName);
488 m_ParcelCounts[landData.GlobalID] = new ParcelCounts(); 488 m_ParcelCounts[landData.GlobalID] = new ParcelCounts();
489 } 489 }
@@ -499,7 +499,7 @@ namespace OpenSim.Region.CoreModules.World.Land
499 m_PrimCounts.Remove(k); 499 m_PrimCounts.Remove(k);
500 } 500 }
501 } 501 }
502 502
503 m_Tainted = false; 503 m_Tainted = false;
504 } 504 }
505 } 505 }
@@ -541,7 +541,7 @@ namespace OpenSim.Region.CoreModules.World.Land
541 return m_Parent.GetOthersCount(m_ParcelID); 541 return m_Parent.GetOthersCount(m_ParcelID);
542 } 542 }
543 } 543 }
544 544
545 public int Selected 545 public int Selected
546 { 546 {
547 get 547 get
@@ -549,7 +549,7 @@ namespace OpenSim.Region.CoreModules.World.Land
549 return m_Parent.GetSelectedCount(m_ParcelID); 549 return m_Parent.GetSelectedCount(m_ParcelID);
550 } 550 }
551 } 551 }
552 552
553 public int Total 553 public int Total
554 { 554 {
555 get 555 get
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs
index 4ed67f3..d6a3ded 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs
@@ -45,14 +45,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
45 UUID userId = TestHelpers.ParseTail(0x1); 45 UUID userId = TestHelpers.ParseTail(0x1);
46 46
47 LandManagementModule lmm = new LandManagementModule(); 47 LandManagementModule lmm = new LandManagementModule();
48 Scene scene = new SceneHelpers().SetupScene(); 48 Scene scene = new SceneHelpers().SetupScene();
49 SceneHelpers.SetupSceneModules(scene, lmm); 49 SceneHelpers.SetupSceneModules(scene, lmm);
50 50
51 ILandObject lo = new LandObject(userId, false, scene); 51 ILandObject lo = new LandObject(userId, false, scene);
52 lo.LandData.Name = "lo1"; 52 lo.LandData.Name = "lo1";
53 lo.SetLandBitmap( 53 lo.SetLandBitmap(
54 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 54 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
55 lo = lmm.AddLandObject(lo); 55 lo = lmm.AddLandObject(lo);
56 56
57 // TODO: Should add asserts to check that land object was added properly. 57 // TODO: Should add asserts to check that land object was added properly.
58 58
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
67 { 67 {
68 ILandObject loAtCoord = lmm.GetLandObject(0, 0); 68 ILandObject loAtCoord = lmm.GetLandObject(0, 0);
69 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID)); 69 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID));
70 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID)); 70 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID));
71 } 71 }
72 72
73 { 73 {
@@ -88,8 +88,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
88 88
89 SceneHelpers sh = new SceneHelpers(); 89 SceneHelpers sh = new SceneHelpers();
90 LandManagementModule lmm = new LandManagementModule(); 90 LandManagementModule lmm = new LandManagementModule();
91 Scene scene = sh.SetupScene(); 91 Scene scene = sh.SetupScene();
92 SceneHelpers.SetupSceneModules(scene, lmm); 92 SceneHelpers.SetupSceneModules(scene, lmm);
93 93
94 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID); 94 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID);
95 95
@@ -115,8 +115,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
115 115
116 SceneHelpers sh = new SceneHelpers(); 116 SceneHelpers sh = new SceneHelpers();
117 LandManagementModule lmm = new LandManagementModule(); 117 LandManagementModule lmm = new LandManagementModule();
118 Scene scene = sh.SetupScene(); 118 Scene scene = sh.SetupScene();
119 SceneHelpers.SetupSceneModules(scene, lmm); 119 SceneHelpers.SetupSceneModules(scene, lmm);
120 120
121 ILandObject originalLo1 = new LandObject(userId, false, scene); 121 ILandObject originalLo1 = new LandObject(userId, false, scene);
122 originalLo1.LandData.Name = "lo1"; 122 originalLo1.LandData.Name = "lo1";
@@ -149,8 +149,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
149 149
150 SceneHelpers sh = new SceneHelpers(); 150 SceneHelpers sh = new SceneHelpers();
151 LandManagementModule lmm = new LandManagementModule(); 151 LandManagementModule lmm = new LandManagementModule();
152 Scene scene = sh.SetupScene(); 152 Scene scene = sh.SetupScene();
153 SceneHelpers.SetupSceneModules(scene, lmm); 153 SceneHelpers.SetupSceneModules(scene, lmm);
154 154
155 ILandObject originalLo1 = new LandObject(userId, false, scene); 155 ILandObject originalLo1 = new LandObject(userId, false, scene);
156 originalLo1.LandData.Name = "lo1"; 156 originalLo1.LandData.Name = "lo1";
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
173 Assert.That(loAtCoord1.LandData.Name, Is.EqualTo(originalLo1.LandData.Name)); 173 Assert.That(loAtCoord1.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
174 Assert.That(loAtCoord1.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID)); 174 Assert.That(loAtCoord1.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
175 175
176 ILandObject loAtCoord2 176 ILandObject loAtCoord2
177 = lmm.GetLandObject((int)Constants.RegionSize - 1, (((int)Constants.RegionSize / 4) * 3) - 1); 177 = lmm.GetLandObject((int)Constants.RegionSize - 1, (((int)Constants.RegionSize / 4) * 3) - 1);
178 Assert.That(loAtCoord2.LandData.Name, Is.EqualTo(originalLo2.LandData.Name)); 178 Assert.That(loAtCoord2.LandData.Name, Is.EqualTo(originalLo2.LandData.Name));
179 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(originalLo2.LandData.GlobalID)); 179 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(originalLo2.LandData.GlobalID));
@@ -198,8 +198,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
198 198
199 SceneHelpers sh = new SceneHelpers(); 199 SceneHelpers sh = new SceneHelpers();
200 LandManagementModule lmm = new LandManagementModule(); 200 LandManagementModule lmm = new LandManagementModule();
201 Scene scene = sh.SetupScene(); 201 Scene scene = sh.SetupScene();
202 SceneHelpers.SetupSceneModules(scene, lmm); 202 SceneHelpers.SetupSceneModules(scene, lmm);
203 203
204 ILandObject originalLo1 = new LandObject(userId, false, scene); 204 ILandObject originalLo1 = new LandObject(userId, false, scene);
205 originalLo1.LandData.Name = "lo1"; 205 originalLo1.LandData.Name = "lo1";
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
220 { 220 {
221 ILandObject loAtCoord = lmm.GetLandObject(0, 0); 221 ILandObject loAtCoord = lmm.GetLandObject(0, 0);
222 Assert.That(loAtCoord.LandData.Name, Is.EqualTo(originalLo1.LandData.Name)); 222 Assert.That(loAtCoord.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
223 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID)); 223 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
224 } 224 }
225 225
226 { 226 {
@@ -239,21 +239,21 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
239 UUID userId = TestHelpers.ParseTail(0x1); 239 UUID userId = TestHelpers.ParseTail(0x1);
240 240
241 LandManagementModule lmm = new LandManagementModule(); 241 LandManagementModule lmm = new LandManagementModule();
242 Scene scene = new SceneHelpers().SetupScene(); 242 Scene scene = new SceneHelpers().SetupScene();
243 SceneHelpers.SetupSceneModules(scene, lmm); 243 SceneHelpers.SetupSceneModules(scene, lmm);
244 244
245 ILandObject lo = new LandObject(userId, false, scene); 245 ILandObject lo = new LandObject(userId, false, scene);
246 lo.LandData.Name = "lo1"; 246 lo.LandData.Name = "lo1";
247 lo.SetLandBitmap( 247 lo.SetLandBitmap(
248 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 248 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
249 lo = lmm.AddLandObject(lo); 249 lo = lmm.AddLandObject(lo);
250 250
251 lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId); 251 lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId);
252 252
253 { 253 {
254 ILandObject loAtCoord = lmm.GetLandObject(0, 0); 254 ILandObject loAtCoord = lmm.GetLandObject(0, 0);
255 Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID)); 255 Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID));
256 Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID)); 256 Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID));
257 } 257 }
258 258
259 { 259 {
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index 949acb6..0d8ece7 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -43,21 +43,21 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
43 public class PrimCountModuleTests : OpenSimTestCase 43 public class PrimCountModuleTests : OpenSimTestCase
44 { 44 {
45 protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000"); 45 protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000");
46 protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000"); 46 protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000");
47 protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999"); 47 protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999");
48 protected TestScene m_scene; 48 protected TestScene m_scene;
49 protected PrimCountModule m_pcm; 49 protected PrimCountModule m_pcm;
50 50
51 /// <summary> 51 /// <summary>
52 /// A parcel that covers the entire sim except for a 1 unit wide strip on the eastern side. 52 /// A parcel that covers the entire sim except for a 1 unit wide strip on the eastern side.
53 /// </summary> 53 /// </summary>
54 protected ILandObject m_lo; 54 protected ILandObject m_lo;
55 55
56 /// <summary> 56 /// <summary>
57 /// A parcel that covers just the eastern strip of the sim. 57 /// A parcel that covers just the eastern strip of the sim.
58 /// </summary> 58 /// </summary>
59 protected ILandObject m_lo2; 59 protected ILandObject m_lo2;
60 60
61 [SetUp] 61 [SetUp]
62 public override void SetUp() 62 public override void SetUp()
63 { 63 {
@@ -65,24 +65,24 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
65 65
66 m_pcm = new PrimCountModule(); 66 m_pcm = new PrimCountModule();
67 LandManagementModule lmm = new LandManagementModule(); 67 LandManagementModule lmm = new LandManagementModule();
68 m_scene = new SceneHelpers().SetupScene(); 68 m_scene = new SceneHelpers().SetupScene();
69 SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm); 69 SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
70 70
71 int xParcelDivider = (int)Constants.RegionSize - 1; 71 int xParcelDivider = (int)Constants.RegionSize - 1;
72 72
73 ILandObject lo = new LandObject(m_userId, false, m_scene); 73 ILandObject lo = new LandObject(m_userId, false, m_scene);
74 lo.LandData.Name = "m_lo"; 74 lo.LandData.Name = "m_lo";
75 lo.SetLandBitmap( 75 lo.SetLandBitmap(
76 lo.GetSquareLandBitmap(0, 0, xParcelDivider, (int)Constants.RegionSize)); 76 lo.GetSquareLandBitmap(0, 0, xParcelDivider, (int)Constants.RegionSize));
77 m_lo = lmm.AddLandObject(lo); 77 m_lo = lmm.AddLandObject(lo);
78 78
79 ILandObject lo2 = new LandObject(m_userId, false, m_scene); 79 ILandObject lo2 = new LandObject(m_userId, false, m_scene);
80 lo2.SetLandBitmap( 80 lo2.SetLandBitmap(
81 lo2.GetSquareLandBitmap(xParcelDivider, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 81 lo2.GetSquareLandBitmap(xParcelDivider, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
82 lo2.LandData.Name = "m_lo2"; 82 lo2.LandData.Name = "m_lo2";
83 m_lo2 = lmm.AddLandObject(lo2); 83 m_lo2 = lmm.AddLandObject(lo2);
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
87 /// Test that counts before we do anything are correct. 87 /// Test that counts before we do anything are correct.
88 /// </summary> 88 /// </summary>
@@ -90,7 +90,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
90 public void TestInitialCounts() 90 public void TestInitialCounts()
91 { 91 {
92 IPrimCounts pc = m_lo.PrimCounts; 92 IPrimCounts pc = m_lo.PrimCounts;
93 93
94 Assert.That(pc.Owner, Is.EqualTo(0)); 94 Assert.That(pc.Owner, Is.EqualTo(0));
95 Assert.That(pc.Group, Is.EqualTo(0)); 95 Assert.That(pc.Group, Is.EqualTo(0));
96 Assert.That(pc.Others, Is.EqualTo(0)); 96 Assert.That(pc.Others, Is.EqualTo(0));
@@ -98,9 +98,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
98 Assert.That(pc.Selected, Is.EqualTo(0)); 98 Assert.That(pc.Selected, Is.EqualTo(0));
99 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 99 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
100 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 100 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
101 Assert.That(pc.Simulator, Is.EqualTo(0)); 101 Assert.That(pc.Simulator, Is.EqualTo(0));
102 } 102 }
103 103
104 /// <summary> 104 /// <summary>
105 /// Test count after a parcel owner owned object is added. 105 /// Test count after a parcel owner owned object is added.
106 /// </summary> 106 /// </summary>
@@ -108,13 +108,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
108 public void TestAddOwnerObject() 108 public void TestAddOwnerObject()
109 { 109 {
110 TestHelpers.InMethod(); 110 TestHelpers.InMethod();
111// log4net.Config.XmlConfigurator.Configure(); 111// log4net.Config.XmlConfigurator.Configure();
112 112
113 IPrimCounts pc = m_lo.PrimCounts; 113 IPrimCounts pc = m_lo.PrimCounts;
114 114
115 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 115 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
116 m_scene.AddNewSceneObject(sog, false); 116 m_scene.AddNewSceneObject(sog, false);
117 117
118 Assert.That(pc.Owner, Is.EqualTo(3)); 118 Assert.That(pc.Owner, Is.EqualTo(3));
119 Assert.That(pc.Group, Is.EqualTo(0)); 119 Assert.That(pc.Group, Is.EqualTo(0));
120 Assert.That(pc.Others, Is.EqualTo(0)); 120 Assert.That(pc.Others, Is.EqualTo(0));
@@ -122,12 +122,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
122 Assert.That(pc.Selected, Is.EqualTo(0)); 122 Assert.That(pc.Selected, Is.EqualTo(0));
123 Assert.That(pc.Users[m_userId], Is.EqualTo(3)); 123 Assert.That(pc.Users[m_userId], Is.EqualTo(3));
124 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 124 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
125 Assert.That(pc.Simulator, Is.EqualTo(3)); 125 Assert.That(pc.Simulator, Is.EqualTo(3));
126 126
127 // Add a second object and retest 127 // Add a second object and retest
128 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10); 128 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
129 m_scene.AddNewSceneObject(sog2, false); 129 m_scene.AddNewSceneObject(sog2, false);
130 130
131 Assert.That(pc.Owner, Is.EqualTo(5)); 131 Assert.That(pc.Owner, Is.EqualTo(5));
132 Assert.That(pc.Group, Is.EqualTo(0)); 132 Assert.That(pc.Group, Is.EqualTo(0));
133 Assert.That(pc.Others, Is.EqualTo(0)); 133 Assert.That(pc.Others, Is.EqualTo(0));
@@ -135,9 +135,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
135 Assert.That(pc.Selected, Is.EqualTo(0)); 135 Assert.That(pc.Selected, Is.EqualTo(0));
136 Assert.That(pc.Users[m_userId], Is.EqualTo(5)); 136 Assert.That(pc.Users[m_userId], Is.EqualTo(5));
137 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 137 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
138 Assert.That(pc.Simulator, Is.EqualTo(5)); 138 Assert.That(pc.Simulator, Is.EqualTo(5));
139 } 139 }
140 140
141 /// <summary> 141 /// <summary>
142 /// Test count after a parcel owner owned copied object is added. 142 /// Test count after a parcel owner owned copied object is added.
143 /// </summary> 143 /// </summary>
@@ -145,14 +145,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
145 public void TestCopyOwnerObject() 145 public void TestCopyOwnerObject()
146 { 146 {
147 TestHelpers.InMethod(); 147 TestHelpers.InMethod();
148// log4net.Config.XmlConfigurator.Configure(); 148// log4net.Config.XmlConfigurator.Configure();
149 149
150 IPrimCounts pc = m_lo.PrimCounts; 150 IPrimCounts pc = m_lo.PrimCounts;
151 151
152 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 152 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
153 m_scene.AddNewSceneObject(sog, false); 153 m_scene.AddNewSceneObject(sog, false);
154 m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity); 154 m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity);
155 155
156 Assert.That(pc.Owner, Is.EqualTo(6)); 156 Assert.That(pc.Owner, Is.EqualTo(6));
157 Assert.That(pc.Group, Is.EqualTo(0)); 157 Assert.That(pc.Group, Is.EqualTo(0));
158 Assert.That(pc.Others, Is.EqualTo(0)); 158 Assert.That(pc.Others, Is.EqualTo(0));
@@ -160,9 +160,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
160 Assert.That(pc.Selected, Is.EqualTo(0)); 160 Assert.That(pc.Selected, Is.EqualTo(0));
161 Assert.That(pc.Users[m_userId], Is.EqualTo(6)); 161 Assert.That(pc.Users[m_userId], Is.EqualTo(6));
162 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 162 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
163 Assert.That(pc.Simulator, Is.EqualTo(6)); 163 Assert.That(pc.Simulator, Is.EqualTo(6));
164 } 164 }
165 165
166 /// <summary> 166 /// <summary>
167 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement 167 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement
168 /// is not done directly by the user/ 168 /// is not done directly by the user/
@@ -171,18 +171,18 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
171 public void TestMoveOwnerObject() 171 public void TestMoveOwnerObject()
172 { 172 {
173 TestHelpers.InMethod(); 173 TestHelpers.InMethod();
174// log4net.Config.XmlConfigurator.Configure(); 174// log4net.Config.XmlConfigurator.Configure();
175 175
176 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 176 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
177 m_scene.AddNewSceneObject(sog, false); 177 m_scene.AddNewSceneObject(sog, false);
178 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10); 178 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
179 m_scene.AddNewSceneObject(sog2, false); 179 m_scene.AddNewSceneObject(sog2, false);
180 180
181 // Move the first scene object to the eastern strip parcel 181 // Move the first scene object to the eastern strip parcel
182 sog.AbsolutePosition = new Vector3(254, 2, 2); 182 sog.AbsolutePosition = new Vector3(254, 2, 2);
183 183
184 IPrimCounts pclo1 = m_lo.PrimCounts; 184 IPrimCounts pclo1 = m_lo.PrimCounts;
185 185
186 Assert.That(pclo1.Owner, Is.EqualTo(2)); 186 Assert.That(pclo1.Owner, Is.EqualTo(2));
187 Assert.That(pclo1.Group, Is.EqualTo(0)); 187 Assert.That(pclo1.Group, Is.EqualTo(0));
188 Assert.That(pclo1.Others, Is.EqualTo(0)); 188 Assert.That(pclo1.Others, Is.EqualTo(0));
@@ -190,10 +190,10 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
190 Assert.That(pclo1.Selected, Is.EqualTo(0)); 190 Assert.That(pclo1.Selected, Is.EqualTo(0));
191 Assert.That(pclo1.Users[m_userId], Is.EqualTo(2)); 191 Assert.That(pclo1.Users[m_userId], Is.EqualTo(2));
192 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0)); 192 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
193 Assert.That(pclo1.Simulator, Is.EqualTo(5)); 193 Assert.That(pclo1.Simulator, Is.EqualTo(5));
194 194
195 IPrimCounts pclo2 = m_lo2.PrimCounts; 195 IPrimCounts pclo2 = m_lo2.PrimCounts;
196 196
197 Assert.That(pclo2.Owner, Is.EqualTo(3)); 197 Assert.That(pclo2.Owner, Is.EqualTo(3));
198 Assert.That(pclo2.Group, Is.EqualTo(0)); 198 Assert.That(pclo2.Group, Is.EqualTo(0));
199 Assert.That(pclo2.Others, Is.EqualTo(0)); 199 Assert.That(pclo2.Others, Is.EqualTo(0));
@@ -201,11 +201,11 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
201 Assert.That(pclo2.Selected, Is.EqualTo(0)); 201 Assert.That(pclo2.Selected, Is.EqualTo(0));
202 Assert.That(pclo2.Users[m_userId], Is.EqualTo(3)); 202 Assert.That(pclo2.Users[m_userId], Is.EqualTo(3));
203 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0)); 203 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
204 Assert.That(pclo2.Simulator, Is.EqualTo(5)); 204 Assert.That(pclo2.Simulator, Is.EqualTo(5));
205 205
206 // Now move it back again 206 // Now move it back again
207 sog.AbsolutePosition = new Vector3(2, 2, 2); 207 sog.AbsolutePosition = new Vector3(2, 2, 2);
208 208
209 Assert.That(pclo1.Owner, Is.EqualTo(5)); 209 Assert.That(pclo1.Owner, Is.EqualTo(5));
210 Assert.That(pclo1.Group, Is.EqualTo(0)); 210 Assert.That(pclo1.Group, Is.EqualTo(0));
211 Assert.That(pclo1.Others, Is.EqualTo(0)); 211 Assert.That(pclo1.Others, Is.EqualTo(0));
@@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
213 Assert.That(pclo1.Selected, Is.EqualTo(0)); 213 Assert.That(pclo1.Selected, Is.EqualTo(0));
214 Assert.That(pclo1.Users[m_userId], Is.EqualTo(5)); 214 Assert.That(pclo1.Users[m_userId], Is.EqualTo(5));
215 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0)); 215 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
216 Assert.That(pclo1.Simulator, Is.EqualTo(5)); 216 Assert.That(pclo1.Simulator, Is.EqualTo(5));
217 217
218 Assert.That(pclo2.Owner, Is.EqualTo(0)); 218 Assert.That(pclo2.Owner, Is.EqualTo(0));
219 Assert.That(pclo2.Group, Is.EqualTo(0)); 219 Assert.That(pclo2.Group, Is.EqualTo(0));
220 Assert.That(pclo2.Others, Is.EqualTo(0)); 220 Assert.That(pclo2.Others, Is.EqualTo(0));
@@ -222,9 +222,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
222 Assert.That(pclo2.Selected, Is.EqualTo(0)); 222 Assert.That(pclo2.Selected, Is.EqualTo(0));
223 Assert.That(pclo2.Users[m_userId], Is.EqualTo(0)); 223 Assert.That(pclo2.Users[m_userId], Is.EqualTo(0));
224 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0)); 224 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
225 Assert.That(pclo2.Simulator, Is.EqualTo(5)); 225 Assert.That(pclo2.Simulator, Is.EqualTo(5));
226 } 226 }
227 227
228 /// <summary> 228 /// <summary>
229 /// Test count after a parcel owner owned object is removed. 229 /// Test count after a parcel owner owned object is removed.
230 /// </summary> 230 /// </summary>
@@ -233,14 +233,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
233 { 233 {
234 TestHelpers.InMethod(); 234 TestHelpers.InMethod();
235// log4net.Config.XmlConfigurator.Configure(); 235// log4net.Config.XmlConfigurator.Configure();
236 236
237 IPrimCounts pc = m_lo.PrimCounts; 237 IPrimCounts pc = m_lo.PrimCounts;
238 238
239 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false); 239 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false);
240 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10); 240 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
241 m_scene.AddNewSceneObject(sogToDelete, false); 241 m_scene.AddNewSceneObject(sogToDelete, false);
242 m_scene.DeleteSceneObject(sogToDelete, false); 242 m_scene.DeleteSceneObject(sogToDelete, false);
243 243
244 Assert.That(pc.Owner, Is.EqualTo(1)); 244 Assert.That(pc.Owner, Is.EqualTo(1));
245 Assert.That(pc.Group, Is.EqualTo(0)); 245 Assert.That(pc.Group, Is.EqualTo(0));
246 Assert.That(pc.Others, Is.EqualTo(0)); 246 Assert.That(pc.Others, Is.EqualTo(0));
@@ -248,37 +248,37 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
248 Assert.That(pc.Selected, Is.EqualTo(0)); 248 Assert.That(pc.Selected, Is.EqualTo(0));
249 Assert.That(pc.Users[m_userId], Is.EqualTo(1)); 249 Assert.That(pc.Users[m_userId], Is.EqualTo(1));
250 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 250 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
251 Assert.That(pc.Simulator, Is.EqualTo(1)); 251 Assert.That(pc.Simulator, Is.EqualTo(1));
252 } 252 }
253 253
254 [Test] 254 [Test]
255 public void TestAddGroupObject() 255 public void TestAddGroupObject()
256 { 256 {
257 TestHelpers.InMethod(); 257 TestHelpers.InMethod();
258// log4net.Config.XmlConfigurator.Configure(); 258// log4net.Config.XmlConfigurator.Configure();
259 259
260 m_lo.DeedToGroup(m_groupId); 260 m_lo.DeedToGroup(m_groupId);
261 261
262 IPrimCounts pc = m_lo.PrimCounts; 262 IPrimCounts pc = m_lo.PrimCounts;
263 263
264 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); 264 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
265 sog.GroupID = m_groupId; 265 sog.GroupID = m_groupId;
266 m_scene.AddNewSceneObject(sog, false); 266 m_scene.AddNewSceneObject(sog, false);
267 267
268 Assert.That(pc.Owner, Is.EqualTo(0)); 268 Assert.That(pc.Owner, Is.EqualTo(0));
269 Assert.That(pc.Group, Is.EqualTo(3)); 269 Assert.That(pc.Group, Is.EqualTo(3));
270 Assert.That(pc.Others, Is.EqualTo(0)); 270 Assert.That(pc.Others, Is.EqualTo(0));
271 Assert.That(pc.Total, Is.EqualTo(3)); 271 Assert.That(pc.Total, Is.EqualTo(3));
272 Assert.That(pc.Selected, Is.EqualTo(0)); 272 Assert.That(pc.Selected, Is.EqualTo(0));
273 273
274 // Is this desired behaviour? Not totally sure. 274 // Is this desired behaviour? Not totally sure.
275 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 275 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
276 Assert.That(pc.Users[m_groupId], Is.EqualTo(0)); 276 Assert.That(pc.Users[m_groupId], Is.EqualTo(0));
277 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3)); 277 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3));
278 278
279 Assert.That(pc.Simulator, Is.EqualTo(3)); 279 Assert.That(pc.Simulator, Is.EqualTo(3));
280 } 280 }
281 281
282 /// <summary> 282 /// <summary>
283 /// Test count after a parcel owner owned object is removed. 283 /// Test count after a parcel owner owned object is removed.
284 /// </summary> 284 /// </summary>
@@ -287,19 +287,19 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
287 { 287 {
288 TestHelpers.InMethod(); 288 TestHelpers.InMethod();
289// log4net.Config.XmlConfigurator.Configure(); 289// log4net.Config.XmlConfigurator.Configure();
290 290
291 m_lo.DeedToGroup(m_groupId); 291 m_lo.DeedToGroup(m_groupId);
292 292
293 IPrimCounts pc = m_lo.PrimCounts; 293 IPrimCounts pc = m_lo.PrimCounts;
294 294
295 SceneObjectGroup sogToKeep = SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1); 295 SceneObjectGroup sogToKeep = SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1);
296 sogToKeep.GroupID = m_groupId; 296 sogToKeep.GroupID = m_groupId;
297 m_scene.AddNewSceneObject(sogToKeep, false); 297 m_scene.AddNewSceneObject(sogToKeep, false);
298 298
299 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10); 299 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
300 m_scene.AddNewSceneObject(sogToDelete, false); 300 m_scene.AddNewSceneObject(sogToDelete, false);
301 m_scene.DeleteSceneObject(sogToDelete, false); 301 m_scene.DeleteSceneObject(sogToDelete, false);
302 302
303 Assert.That(pc.Owner, Is.EqualTo(0)); 303 Assert.That(pc.Owner, Is.EqualTo(0));
304 Assert.That(pc.Group, Is.EqualTo(1)); 304 Assert.That(pc.Group, Is.EqualTo(1));
305 Assert.That(pc.Others, Is.EqualTo(0)); 305 Assert.That(pc.Others, Is.EqualTo(0));
@@ -308,20 +308,20 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
308 Assert.That(pc.Users[m_userId], Is.EqualTo(1)); 308 Assert.That(pc.Users[m_userId], Is.EqualTo(1));
309 Assert.That(pc.Users[m_groupId], Is.EqualTo(0)); 309 Assert.That(pc.Users[m_groupId], Is.EqualTo(0));
310 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 310 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
311 Assert.That(pc.Simulator, Is.EqualTo(1)); 311 Assert.That(pc.Simulator, Is.EqualTo(1));
312 } 312 }
313 313
314 [Test] 314 [Test]
315 public void TestAddOthersObject() 315 public void TestAddOthersObject()
316 { 316 {
317 TestHelpers.InMethod(); 317 TestHelpers.InMethod();
318// log4net.Config.XmlConfigurator.Configure(); 318// log4net.Config.XmlConfigurator.Configure();
319 319
320 IPrimCounts pc = m_lo.PrimCounts; 320 IPrimCounts pc = m_lo.PrimCounts;
321 321
322 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); 322 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
323 m_scene.AddNewSceneObject(sog, false); 323 m_scene.AddNewSceneObject(sog, false);
324 324
325 Assert.That(pc.Owner, Is.EqualTo(0)); 325 Assert.That(pc.Owner, Is.EqualTo(0));
326 Assert.That(pc.Group, Is.EqualTo(0)); 326 Assert.That(pc.Group, Is.EqualTo(0));
327 Assert.That(pc.Others, Is.EqualTo(3)); 327 Assert.That(pc.Others, Is.EqualTo(3));
@@ -329,22 +329,22 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
329 Assert.That(pc.Selected, Is.EqualTo(0)); 329 Assert.That(pc.Selected, Is.EqualTo(0));
330 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 330 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
331 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3)); 331 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3));
332 Assert.That(pc.Simulator, Is.EqualTo(3)); 332 Assert.That(pc.Simulator, Is.EqualTo(3));
333 } 333 }
334 334
335 [Test] 335 [Test]
336 public void TestRemoveOthersObject() 336 public void TestRemoveOthersObject()
337 { 337 {
338 TestHelpers.InMethod(); 338 TestHelpers.InMethod();
339// log4net.Config.XmlConfigurator.Configure(); 339// log4net.Config.XmlConfigurator.Configure();
340 340
341 IPrimCounts pc = m_lo.PrimCounts; 341 IPrimCounts pc = m_lo.PrimCounts;
342 342
343 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false); 343 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false);
344 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10); 344 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10);
345 m_scene.AddNewSceneObject(sogToDelete, false); 345 m_scene.AddNewSceneObject(sogToDelete, false);
346 m_scene.DeleteSceneObject(sogToDelete, false); 346 m_scene.DeleteSceneObject(sogToDelete, false);
347 347
348 Assert.That(pc.Owner, Is.EqualTo(0)); 348 Assert.That(pc.Owner, Is.EqualTo(0));
349 Assert.That(pc.Group, Is.EqualTo(0)); 349 Assert.That(pc.Group, Is.EqualTo(0));
350 Assert.That(pc.Others, Is.EqualTo(1)); 350 Assert.That(pc.Others, Is.EqualTo(1));
@@ -352,9 +352,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
352 Assert.That(pc.Selected, Is.EqualTo(0)); 352 Assert.That(pc.Selected, Is.EqualTo(0));
353 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 353 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
354 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(1)); 354 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(1));
355 Assert.That(pc.Simulator, Is.EqualTo(1)); 355 Assert.That(pc.Simulator, Is.EqualTo(1));
356 } 356 }
357 357
358 /// <summary> 358 /// <summary>
359 /// Test the count is correct after is has been tainted. 359 /// Test the count is correct after is has been tainted.
360 /// </summary> 360 /// </summary>
@@ -363,12 +363,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
363 { 363 {
364 TestHelpers.InMethod(); 364 TestHelpers.InMethod();
365 IPrimCounts pc = m_lo.PrimCounts; 365 IPrimCounts pc = m_lo.PrimCounts;
366 366
367 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 367 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
368 m_scene.AddNewSceneObject(sog, false); 368 m_scene.AddNewSceneObject(sog, false);
369 369
370 m_pcm.TaintPrimCount(); 370 m_pcm.TaintPrimCount();
371 371
372 Assert.That(pc.Owner, Is.EqualTo(3)); 372 Assert.That(pc.Owner, Is.EqualTo(3));
373 Assert.That(pc.Group, Is.EqualTo(0)); 373 Assert.That(pc.Group, Is.EqualTo(0));
374 Assert.That(pc.Others, Is.EqualTo(0)); 374 Assert.That(pc.Others, Is.EqualTo(0));
@@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
376 Assert.That(pc.Selected, Is.EqualTo(0)); 376 Assert.That(pc.Selected, Is.EqualTo(0));
377 Assert.That(pc.Users[m_userId], Is.EqualTo(3)); 377 Assert.That(pc.Users[m_userId], Is.EqualTo(3));
378 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 378 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
379 Assert.That(pc.Simulator, Is.EqualTo(3)); 379 Assert.That(pc.Simulator, Is.EqualTo(3));
380 } 380 }
381 } 381 }
382} \ No newline at end of file 382} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 1f2b7c4..b927cfa 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -82,11 +82,11 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
82 82
83 string[] configSections = new string[] { "Map", "Startup" }; 83 string[] configSections = new string[] { "Map", "Startup" };
84 84
85 drawPrimVolume 85 drawPrimVolume
86 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume); 86 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume);
87 textureTerrain 87 textureTerrain
88 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain); 88 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain);
89 generateMaptiles 89 generateMaptiles
90 = Util.GetConfigVarFromSections<bool>(m_config, "GenerateMaptiles", configSections, generateMaptiles); 90 = Util.GetConfigVarFromSections<bool>(m_config, "GenerateMaptiles", configSections, generateMaptiles);
91 91
92 if (generateMaptiles) 92 if (generateMaptiles)
@@ -126,15 +126,15 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
126 catch (Exception) 126 catch (Exception)
127 { 127 {
128 m_log.ErrorFormat( 128 m_log.ErrorFormat(
129 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", 129 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}",
130 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name); 130 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
131 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); 131 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
132 mapbmp = null; 132 mapbmp = null;
133 } 133 }
134 134
135 if (mapbmp != null) 135 if (mapbmp != null)
136 m_log.DebugFormat( 136 m_log.DebugFormat(
137 "[MAPTILE]: Static map image texture file {0} found for {1}", 137 "[MAPTILE]: Static map image texture file {0} found for {1}",
138 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name); 138 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
139 } 139 }
140 } 140 }
@@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
308 List<uint> z_localIDs = new List<uint>(); 308 List<uint> z_localIDs = new List<uint>();
309 Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); 309 Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>();
310 310
311 try 311 try
312 { 312 {
313 lock (objs) 313 lock (objs)
314 { 314 {
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs
index 0ec2053..4b3ee18 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
180 180
181 ManagedImage managedImage; 181 ManagedImage managedImage;
182 Image image; 182 Image image;
183 183
184 try 184 try
185 { 185 {
186 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image)) 186 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
201 m_log.ErrorFormat("{0} OpenJpeg was unable to encode this. Asset Data is empty for {1}", LogHeader, id); 201 m_log.ErrorFormat("{0} OpenJpeg was unable to encode this. Asset Data is empty for {1}", LogHeader, id);
202 } 202 }
203 return null; 203 return null;
204 204
205 } 205 }
206 206
207 // Compute the average color of a texture. 207 // Compute the average color of a texture.
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 46b0470..1070ae6 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
56 public class MoapModule : INonSharedRegionModule, IMoapModule 56 public class MoapModule : INonSharedRegionModule, IMoapModule
57 { 57 {
58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 59
60 public string Name { get { return "MoapModule"; } } 60 public string Name { get { return "MoapModule"; } }
61 public Type ReplaceableInterface { get { return null; } } 61 public Type ReplaceableInterface { get { return null; } }
62 62
@@ -64,33 +64,33 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
64 /// Is this module enabled? 64 /// Is this module enabled?
65 /// </summary> 65 /// </summary>
66 protected bool m_isEnabled = true; 66 protected bool m_isEnabled = true;
67 67
68 /// <summary> 68 /// <summary>
69 /// The scene to which this module is attached 69 /// The scene to which this module is attached
70 /// </summary> 70 /// </summary>
71 protected Scene m_scene; 71 protected Scene m_scene;
72 72
73 /// <summary> 73 /// <summary>
74 /// Track the ObjectMedia capabilities given to users keyed by path 74 /// Track the ObjectMedia capabilities given to users keyed by path
75 /// </summary> 75 /// </summary>
76 protected Dictionary<string, UUID> m_omCapUsers = new Dictionary<string, UUID>(); 76 protected Dictionary<string, UUID> m_omCapUsers = new Dictionary<string, UUID>();
77 77
78 /// <summary> 78 /// <summary>
79 /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. 79 /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate.
80 /// </summary> 80 /// </summary>
81 protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); 81 protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
82 82
83 /// <summary> 83 /// <summary>
84 /// Track the ObjectMediaUpdate capabilities given to users keyed by path 84 /// Track the ObjectMediaUpdate capabilities given to users keyed by path
85 /// </summary> 85 /// </summary>
86 protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); 86 protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>();
87 87
88 /// <summary> 88 /// <summary>
89 /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate 89 /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate
90 /// </summary> 90 /// </summary>
91 protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); 91 protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
92 92
93 public void Initialise(IConfigSource configSource) 93 public void Initialise(IConfigSource configSource)
94 { 94 {
95 IConfig config = configSource.Configs["MediaOnAPrim"]; 95 IConfig config = configSource.Configs["MediaOnAPrim"];
96 96
@@ -100,63 +100,63 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
100// m_log.Debug("[MOAP]: Initialised module.")l 100// m_log.Debug("[MOAP]: Initialised module.")l
101 } 101 }
102 102
103 public void AddRegion(Scene scene) 103 public void AddRegion(Scene scene)
104 { 104 {
105 if (!m_isEnabled) 105 if (!m_isEnabled)
106 return; 106 return;
107 107
108 m_scene = scene; 108 m_scene = scene;
109 m_scene.RegisterModuleInterface<IMoapModule>(this); 109 m_scene.RegisterModuleInterface<IMoapModule>(this);
110 } 110 }
111 111
112 public void RemoveRegion(Scene scene) {} 112 public void RemoveRegion(Scene scene) {}
113 113
114 public void RegionLoaded(Scene scene) 114 public void RegionLoaded(Scene scene)
115 { 115 {
116 if (!m_isEnabled) 116 if (!m_isEnabled)
117 return; 117 return;
118 118
119 m_scene.EventManager.OnRegisterCaps += OnRegisterCaps; 119 m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
120 m_scene.EventManager.OnDeregisterCaps += OnDeregisterCaps; 120 m_scene.EventManager.OnDeregisterCaps += OnDeregisterCaps;
121 m_scene.EventManager.OnSceneObjectPartCopy += OnSceneObjectPartCopy; 121 m_scene.EventManager.OnSceneObjectPartCopy += OnSceneObjectPartCopy;
122 } 122 }
123 123
124 public void Close() 124 public void Close()
125 { 125 {
126 if (!m_isEnabled) 126 if (!m_isEnabled)
127 return; 127 return;
128 128
129 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; 129 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
130 m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; 130 m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps;
131 m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; 131 m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy;
132 } 132 }
133 133
134 public void OnRegisterCaps(UUID agentID, Caps caps) 134 public void OnRegisterCaps(UUID agentID, Caps caps)
135 { 135 {
136// m_log.DebugFormat( 136// m_log.DebugFormat(
137// "[MOAP]: Registering ObjectMedia and ObjectMediaNavigate capabilities for agent {0}", agentID); 137// "[MOAP]: Registering ObjectMedia and ObjectMediaNavigate capabilities for agent {0}", agentID);
138 138
139 string omCapUrl = "/CAPS/" + UUID.Random(); 139 string omCapUrl = "/CAPS/" + UUID.Random();
140 140
141 lock (m_omCapUsers) 141 lock (m_omCapUsers)
142 { 142 {
143 m_omCapUsers[omCapUrl] = agentID; 143 m_omCapUsers[omCapUrl] = agentID;
144 m_omCapUrls[agentID] = omCapUrl; 144 m_omCapUrls[agentID] = omCapUrl;
145 145
146 // Even though we're registering for POST we're going to get GETS and UPDATES too 146 // Even though we're registering for POST we're going to get GETS and UPDATES too
147 caps.RegisterHandler( 147 caps.RegisterHandler(
148 "ObjectMedia", 148 "ObjectMedia",
149 new RestStreamHandler( 149 new RestStreamHandler(
150 "POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString())); 150 "POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString()));
151 } 151 }
152 152
153 string omuCapUrl = "/CAPS/" + UUID.Random(); 153 string omuCapUrl = "/CAPS/" + UUID.Random();
154 154
155 lock (m_omuCapUsers) 155 lock (m_omuCapUsers)
156 { 156 {
157 m_omuCapUsers[omuCapUrl] = agentID; 157 m_omuCapUsers[omuCapUrl] = agentID;
158 m_omuCapUrls[agentID] = omuCapUrl; 158 m_omuCapUrls[agentID] = omuCapUrl;
159 159
160 // Even though we're registering for POST we're going to get GETS and UPDATES too 160 // Even though we're registering for POST we're going to get GETS and UPDATES too
161 caps.RegisterHandler( 161 caps.RegisterHandler(
162 "ObjectMediaNavigate", 162 "ObjectMediaNavigate",
@@ -164,7 +164,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
164 "POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString())); 164 "POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString()));
165 } 165 }
166 } 166 }
167 167
168 public void OnDeregisterCaps(UUID agentID, Caps caps) 168 public void OnDeregisterCaps(UUID agentID, Caps caps)
169 { 169 {
170 lock (m_omCapUsers) 170 lock (m_omCapUsers)
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
173 m_omCapUrls.Remove(agentID); 173 m_omCapUrls.Remove(agentID);
174 m_omCapUsers.Remove(path); 174 m_omCapUsers.Remove(path);
175 } 175 }
176 176
177 lock (m_omuCapUsers) 177 lock (m_omuCapUsers)
178 { 178 {
179 string path = m_omuCapUrls[agentID]; 179 string path = m_omuCapUrls[agentID];
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
181 m_omuCapUsers.Remove(path); 181 m_omuCapUsers.Remove(path);
182 } 182 }
183 } 183 }
184 184
185 protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) 185 protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
186 { 186 {
187 if (original.Shape.Media != null) 187 if (original.Shape.Media != null)
@@ -197,19 +197,19 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
197 dupeMedia.Add(null); 197 dupeMedia.Add(null);
198 } 198 }
199 } 199 }
200 200
201 copy.Shape.Media = dupeMedia; 201 copy.Shape.Media = dupeMedia;
202 } 202 }
203 } 203 }
204 204
205 public MediaEntry GetMediaEntry(SceneObjectPart part, int face) 205 public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
206 { 206 {
207 MediaEntry me = null; 207 MediaEntry me = null;
208 208
209 CheckFaceParam(part, face); 209 CheckFaceParam(part, face);
210 210
211 List<MediaEntry> media = part.Shape.Media; 211 List<MediaEntry> media = part.Shape.Media;
212 212
213 if (null == media) 213 if (null == media)
214 { 214 {
215 me = null; 215 me = null;
@@ -218,17 +218,17 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
218 { 218 {
219 lock (media) 219 lock (media)
220 me = media[face]; 220 me = media[face];
221 221
222 // TODO: Really need a proper copy constructor down in libopenmetaverse 222 // TODO: Really need a proper copy constructor down in libopenmetaverse
223 if (me != null) 223 if (me != null)
224 me = MediaEntry.FromOSD(me.GetOSD()); 224 me = MediaEntry.FromOSD(me.GetOSD());
225 } 225 }
226 226
227// m_log.DebugFormat("[MOAP]: GetMediaEntry for {0} face {1} found {2}", part.Name, face, me); 227// m_log.DebugFormat("[MOAP]: GetMediaEntry for {0} face {1} found {2}", part.Name, face, me);
228 228
229 return me; 229 return me;
230 } 230 }
231 231
232 /// <summary> 232 /// <summary>
233 /// Set the media entry on the face of the given part. 233 /// Set the media entry on the face of the given part.
234 /// </summary> 234 /// </summary>
@@ -238,28 +238,28 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
238 public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) 238 public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
239 { 239 {
240// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face); 240// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
241 241
242 CheckFaceParam(part, face); 242 CheckFaceParam(part, face);
243 243
244 if (null == part.Shape.Media) 244 if (null == part.Shape.Media)
245 { 245 {
246 if (me == null) 246 if (me == null)
247 return; 247 return;
248 else 248 else
249 part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); 249 part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
250 } 250 }
251 251
252 lock (part.Shape.Media) 252 lock (part.Shape.Media)
253 part.Shape.Media[face] = me; 253 part.Shape.Media[face] = me;
254 254
255 UpdateMediaUrl(part, UUID.Zero); 255 UpdateMediaUrl(part, UUID.Zero);
256 256
257 SetPartMediaFlags(part, face, me != null); 257 SetPartMediaFlags(part, face, me != null);
258 258
259 part.ScheduleFullUpdate(); 259 part.ScheduleFullUpdate();
260 part.TriggerScriptChangedEvent(Changed.MEDIA); 260 part.TriggerScriptChangedEvent(Changed.MEDIA);
261 } 261 }
262 262
263 /// <summary> 263 /// <summary>
264 /// Clear the media entry from the face of the given part. 264 /// Clear the media entry from the face of the given part.
265 /// </summary> 265 /// </summary>
@@ -267,9 +267,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
267 /// <param name="face"></param> 267 /// <param name="face"></param>
268 public void ClearMediaEntry(SceneObjectPart part, int face) 268 public void ClearMediaEntry(SceneObjectPart part, int face)
269 { 269 {
270 SetMediaEntry(part, face, null); 270 SetMediaEntry(part, face, null);
271 } 271 }
272 272
273 /// <summary> 273 /// <summary>
274 /// Set the media flags on the texture face of the given part. 274 /// Set the media flags on the texture face of the given part.
275 /// </summary> 275 /// </summary>
@@ -284,9 +284,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
284 Primitive.TextureEntry te = part.Shape.Textures; 284 Primitive.TextureEntry te = part.Shape.Textures;
285 Primitive.TextureEntryFace teFace = te.CreateFace((uint)face); 285 Primitive.TextureEntryFace teFace = te.CreateFace((uint)face);
286 teFace.MediaFlags = flag; 286 teFace.MediaFlags = flag;
287 part.Shape.Textures = te; 287 part.Shape.Textures = te;
288 } 288 }
289 289
290 /// <summary> 290 /// <summary>
291 /// Sets or gets per face media textures. 291 /// Sets or gets per face media textures.
292 /// </summary> 292 /// </summary>
@@ -300,11 +300,11 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
300 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 300 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
301 { 301 {
302// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); 302// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
303 303
304 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); 304 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
305 ObjectMediaMessage omm = new ObjectMediaMessage(); 305 ObjectMediaMessage omm = new ObjectMediaMessage();
306 omm.Deserialize(osd); 306 omm.Deserialize(osd);
307 307
308 if (omm.Request is ObjectMediaRequest) 308 if (omm.Request is ObjectMediaRequest)
309 return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); 309 return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest);
310 else if (omm.Request is ObjectMediaUpdate) 310 else if (omm.Request is ObjectMediaUpdate)
@@ -312,10 +312,10 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
312 312
313 throw new Exception( 313 throw new Exception(
314 string.Format( 314 string.Format(
315 "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", 315 "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}",
316 omm.Request.GetType())); 316 omm.Request.GetType()));
317 } 317 }
318 318
319 /// <summary> 319 /// <summary>
320 /// Handle a fetch request for media textures 320 /// Handle a fetch request for media textures
321 /// </summary> 321 /// </summary>
@@ -324,36 +324,36 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
324 protected string HandleObjectMediaRequest(ObjectMediaRequest omr) 324 protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
325 { 325 {
326 UUID primId = omr.PrimID; 326 UUID primId = omr.PrimID;
327 327
328 SceneObjectPart part = m_scene.GetSceneObjectPart(primId); 328 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
329 329
330 if (null == part) 330 if (null == part)
331 { 331 {
332 m_log.WarnFormat( 332 m_log.WarnFormat(
333 "[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", 333 "[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
334 primId, m_scene.RegionInfo.RegionName); 334 primId, m_scene.RegionInfo.RegionName);
335 return string.Empty; 335 return string.Empty;
336 } 336 }
337 337
338 if (null == part.Shape.Media) 338 if (null == part.Shape.Media)
339 return string.Empty; 339 return string.Empty;
340 340
341 ObjectMediaResponse resp = new ObjectMediaResponse(); 341 ObjectMediaResponse resp = new ObjectMediaResponse();
342 342
343 resp.PrimID = primId; 343 resp.PrimID = primId;
344 344
345 lock (part.Shape.Media) 345 lock (part.Shape.Media)
346 resp.FaceMedia = part.Shape.Media.ToArray(); 346 resp.FaceMedia = part.Shape.Media.ToArray();
347 347
348 resp.Version = part.MediaUrl; 348 resp.Version = part.MediaUrl;
349 349
350 string rawResp = OSDParser.SerializeLLSDXmlString(resp.Serialize()); 350 string rawResp = OSDParser.SerializeLLSDXmlString(resp.Serialize());
351 351
352// m_log.DebugFormat("[MOAP]: Got HandleObjectMediaRequestGet raw response is [{0}]", rawResp); 352// m_log.DebugFormat("[MOAP]: Got HandleObjectMediaRequestGet raw response is [{0}]", rawResp);
353 353
354 return rawResp; 354 return rawResp;
355 } 355 }
356 356
357 /// <summary> 357 /// <summary>
358 /// Handle an update of media textures. 358 /// Handle an update of media textures.
359 /// </summary> 359 /// </summary>
@@ -363,46 +363,46 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
363 protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) 363 protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
364 { 364 {
365 UUID primId = omu.PrimID; 365 UUID primId = omu.PrimID;
366 366
367 SceneObjectPart part = m_scene.GetSceneObjectPart(primId); 367 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
368 368
369 if (null == part) 369 if (null == part)
370 { 370 {
371 m_log.WarnFormat( 371 m_log.WarnFormat(
372 "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", 372 "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
373 primId, m_scene.RegionInfo.RegionName); 373 primId, m_scene.RegionInfo.RegionName);
374 return string.Empty; 374 return string.Empty;
375 } 375 }
376 376
377// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); 377// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
378// 378//
379// for (int i = 0; i < omu.FaceMedia.Length; i++) 379// for (int i = 0; i < omu.FaceMedia.Length; i++)
380// { 380// {
381// MediaEntry me = omu.FaceMedia[i]; 381// MediaEntry me = omu.FaceMedia[i];
382// string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD())); 382// string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD()));
383// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); 383// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v);
384// } 384// }
385 385
386 if (omu.FaceMedia.Length > part.GetNumberOfSides()) 386 if (omu.FaceMedia.Length > part.GetNumberOfSides())
387 { 387 {
388 m_log.WarnFormat( 388 m_log.WarnFormat(
389 "[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.", 389 "[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.",
390 omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides()); 390 omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides());
391 return string.Empty; 391 return string.Empty;
392 } 392 }
393 393
394 UUID agentId = default(UUID); 394 UUID agentId = default(UUID);
395 395
396 lock (m_omCapUsers) 396 lock (m_omCapUsers)
397 agentId = m_omCapUsers[path]; 397 agentId = m_omCapUsers[path];
398 398
399 List<MediaEntry> media = part.Shape.Media; 399 List<MediaEntry> media = part.Shape.Media;
400 400
401 if (null == media) 401 if (null == media)
402 { 402 {
403// m_log.DebugFormat("[MOAP]: Setting all new media list for {0}", part.Name); 403// m_log.DebugFormat("[MOAP]: Setting all new media list for {0}", part.Name);
404 part.Shape.Media = new PrimitiveBaseShape.MediaList(omu.FaceMedia); 404 part.Shape.Media = new PrimitiveBaseShape.MediaList(omu.FaceMedia);
405 405
406 for (int i = 0; i < omu.FaceMedia.Length; i++) 406 for (int i = 0; i < omu.FaceMedia.Length; i++)
407 { 407 {
408 if (omu.FaceMedia[i] != null) 408 if (omu.FaceMedia[i] != null)
@@ -412,7 +412,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
412 // directly. 412 // directly.
413 SetPartMediaFlags(part, i, true); 413 SetPartMediaFlags(part, i, true);
414// m_log.DebugFormat( 414// m_log.DebugFormat(
415// "[MOAP]: Media flags for face {0} is {1}", 415// "[MOAP]: Media flags for face {0} is {1}",
416// i, part.Shape.Textures.FaceTextures[i].MediaFlags); 416// i, part.Shape.Textures.FaceTextures[i].MediaFlags);
417 } 417 }
418 } 418 }
@@ -420,15 +420,15 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
420 else 420 else
421 { 421 {
422// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name); 422// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name);
423 423
424 // We need to go through the media textures one at a time to make sure that we have permission 424 // We need to go through the media textures one at a time to make sure that we have permission
425 // to change them 425 // to change them
426 426
427 // FIXME: Race condition here since some other texture entry manipulator may overwrite/get 427 // FIXME: Race condition here since some other texture entry manipulator may overwrite/get
428 // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry 428 // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry
429 // directly. 429 // directly.
430 Primitive.TextureEntry te = part.Shape.Textures; 430 Primitive.TextureEntry te = part.Shape.Textures;
431 431
432 lock (media) 432 lock (media)
433 { 433 {
434 for (int i = 0; i < media.Count; i++) 434 for (int i = 0; i < media.Count; i++)
@@ -436,38 +436,38 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
436 if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) 436 if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i))
437 { 437 {
438 media[i] = omu.FaceMedia[i]; 438 media[i] = omu.FaceMedia[i];
439 439
440 // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal 440 // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal
441 // texture update, so we don't need to worry about clearing MediaFlags here. 441 // texture update, so we don't need to worry about clearing MediaFlags here.
442 if (null == media[i]) 442 if (null == media[i])
443 continue; 443 continue;
444 444
445 SetPartMediaFlags(part, i, true); 445 SetPartMediaFlags(part, i, true);
446 446
447 // m_log.DebugFormat( 447 // m_log.DebugFormat(
448 // "[MOAP]: Media flags for face {0} is {1}", 448 // "[MOAP]: Media flags for face {0} is {1}",
449 // i, face.MediaFlags); 449 // i, face.MediaFlags);
450 // m_log.DebugFormat("[MOAP]: Set media entry for face {0} on {1}", i, part.Name); 450 // m_log.DebugFormat("[MOAP]: Set media entry for face {0} on {1}", i, part.Name);
451 } 451 }
452 } 452 }
453 } 453 }
454 454
455 part.Shape.Textures = te; 455 part.Shape.Textures = te;
456 456
457// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) 457// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++)
458// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); 458// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]);
459 } 459 }
460 460
461 UpdateMediaUrl(part, agentId); 461 UpdateMediaUrl(part, agentId);
462 462
463 // Arguably, we could avoid sending a full update to the avatar that just changed the texture. 463 // Arguably, we could avoid sending a full update to the avatar that just changed the texture.
464 part.ScheduleFullUpdate(); 464 part.ScheduleFullUpdate();
465 465
466 part.TriggerScriptChangedEvent(Changed.MEDIA); 466 part.TriggerScriptChangedEvent(Changed.MEDIA);
467 467
468 return string.Empty; 468 return string.Empty;
469 } 469 }
470 470
471 /// <summary> 471 /// <summary>
472 /// Received from the viewer if a user has changed the url of a media texture. 472 /// Received from the viewer if a user has changed the url of a media texture.
473 /// </summary> 473 /// </summary>
@@ -481,71 +481,71 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
481 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 481 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
482 { 482 {
483// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); 483// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
484 484
485 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); 485 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
486 ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); 486 ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage();
487 omn.Deserialize(osd); 487 omn.Deserialize(osd);
488 488
489 UUID primId = omn.PrimID; 489 UUID primId = omn.PrimID;
490 490
491 SceneObjectPart part = m_scene.GetSceneObjectPart(primId); 491 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
492 492
493 if (null == part) 493 if (null == part)
494 { 494 {
495 m_log.WarnFormat( 495 m_log.WarnFormat(
496 "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", 496 "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}",
497 primId, m_scene.RegionInfo.RegionName); 497 primId, m_scene.RegionInfo.RegionName);
498 return string.Empty; 498 return string.Empty;
499 } 499 }
500 500
501 UUID agentId = default(UUID); 501 UUID agentId = default(UUID);
502 502
503 lock (m_omuCapUsers) 503 lock (m_omuCapUsers)
504 agentId = m_omuCapUsers[path]; 504 agentId = m_omuCapUsers[path];
505 505
506 if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) 506 if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face))
507 return string.Empty; 507 return string.Empty;
508 508
509// m_log.DebugFormat( 509// m_log.DebugFormat(
510// "[MOAP]: Received request to update media entry for face {0} on prim {1} {2} to {3}", 510// "[MOAP]: Received request to update media entry for face {0} on prim {1} {2} to {3}",
511// omn.Face, part.Name, part.UUID, omn.URL); 511// omn.Face, part.Name, part.UUID, omn.URL);
512 512
513 // If media has never been set for this prim, then just return. 513 // If media has never been set for this prim, then just return.
514 if (null == part.Shape.Media) 514 if (null == part.Shape.Media)
515 return string.Empty; 515 return string.Empty;
516 516
517 MediaEntry me = null; 517 MediaEntry me = null;
518 518
519 lock (part.Shape.Media) 519 lock (part.Shape.Media)
520 me = part.Shape.Media[omn.Face]; 520 me = part.Shape.Media[omn.Face];
521 521
522 // Do the same if media has not been set up for a specific face 522 // Do the same if media has not been set up for a specific face
523 if (null == me) 523 if (null == me)
524 return string.Empty; 524 return string.Empty;
525 525
526 if (me.EnableWhiteList) 526 if (me.EnableWhiteList)
527 { 527 {
528 if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) 528 if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList))
529 { 529 {
530// m_log.DebugFormat( 530// m_log.DebugFormat(
531// "[MOAP]: Blocking change of face {0} on prim {1} {2} to {3} since it's not on the enabled whitelist", 531// "[MOAP]: Blocking change of face {0} on prim {1} {2} to {3} since it's not on the enabled whitelist",
532// omn.Face, part.Name, part.UUID, omn.URL); 532// omn.Face, part.Name, part.UUID, omn.URL);
533 533
534 return string.Empty; 534 return string.Empty;
535 } 535 }
536 } 536 }
537 537
538 me.CurrentURL = omn.URL; 538 me.CurrentURL = omn.URL;
539 539
540 UpdateMediaUrl(part, agentId); 540 UpdateMediaUrl(part, agentId);
541 541
542 part.ScheduleFullUpdate(); 542 part.ScheduleFullUpdate();
543 543
544 part.TriggerScriptChangedEvent(Changed.MEDIA); 544 part.TriggerScriptChangedEvent(Changed.MEDIA);
545 545
546 return OSDParser.SerializeLLSDXmlString(new OSD()); 546 return OSDParser.SerializeLLSDXmlString(new OSD());
547 } 547 }
548 548
549 /// <summary> 549 /// <summary>
550 /// Check that the face number is valid for the given prim. 550 /// Check that the face number is valid for the given prim.
551 /// </summary> 551 /// </summary>
@@ -555,13 +555,13 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
555 { 555 {
556 if (face < 0) 556 if (face < 0)
557 throw new ArgumentException("Face cannot be less than zero"); 557 throw new ArgumentException("Face cannot be less than zero");
558 558
559 int maxFaces = part.GetNumberOfSides() - 1; 559 int maxFaces = part.GetNumberOfSides() - 1;
560 if (face > maxFaces) 560 if (face > maxFaces)
561 throw new ArgumentException( 561 throw new ArgumentException(
562 string.Format("Face argument was {0} but max is {1}", face, maxFaces)); 562 string.Format("Face argument was {0} but max is {1}", face, maxFaces));
563 } 563 }
564 564
565 /// <summary> 565 /// <summary>
566 /// Update the media url of the given part 566 /// Update the media url of the given part
567 /// </summary> 567 /// </summary>
@@ -583,10 +583,10 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
583 int version = int.Parse(rawVersion); 583 int version = int.Parse(rawVersion);
584 part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); 584 part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId);
585 } 585 }
586 586
587// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); 587// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID);
588 } 588 }
589 589
590 /// <summary> 590 /// <summary>
591 /// Check the given url against the given whitelist. 591 /// Check the given url against the given whitelist.
592 /// </summary> 592 /// </summary>
@@ -599,22 +599,22 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
599 return false; 599 return false;
600 600
601 Uri url = new Uri(rawUrl); 601 Uri url = new Uri(rawUrl);
602 602
603 foreach (string origWlUrl in whitelist) 603 foreach (string origWlUrl in whitelist)
604 { 604 {
605 string wlUrl = origWlUrl; 605 string wlUrl = origWlUrl;
606 606
607 // Deal with a line-ending wildcard 607 // Deal with a line-ending wildcard
608 if (wlUrl.EndsWith("*")) 608 if (wlUrl.EndsWith("*"))
609 wlUrl = wlUrl.Remove(wlUrl.Length - 1); 609 wlUrl = wlUrl.Remove(wlUrl.Length - 1);
610 610
611// m_log.DebugFormat("[MOAP]: Checking whitelist URL pattern {0}", origWlUrl); 611// m_log.DebugFormat("[MOAP]: Checking whitelist URL pattern {0}", origWlUrl);
612 612
613 // Handle a line starting wildcard slightly differently since this can only match the domain, not the path 613 // Handle a line starting wildcard slightly differently since this can only match the domain, not the path
614 if (wlUrl.StartsWith("*")) 614 if (wlUrl.StartsWith("*"))
615 { 615 {
616 wlUrl = wlUrl.Substring(1); 616 wlUrl = wlUrl.Substring(1);
617 617
618 if (url.Host.Contains(wlUrl)) 618 if (url.Host.Contains(wlUrl))
619 { 619 {
620// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); 620// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
@@ -624,7 +624,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
624 else 624 else
625 { 625 {
626 string urlToMatch = url.Authority + url.AbsolutePath; 626 string urlToMatch = url.Authority + url.AbsolutePath;
627 627
628 if (urlToMatch.StartsWith(wlUrl)) 628 if (urlToMatch.StartsWith(wlUrl))
629 { 629 {
630// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); 630// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
@@ -632,7 +632,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
632 } 632 }
633 } 633 }
634 } 634 }
635 635
636 return false; 636 return false;
637 } 637 }
638 } 638 }
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
index ee57aed..7080705 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
47 { 47 {
48 protected TestScene m_scene; 48 protected TestScene m_scene;
49 protected MoapModule m_module; 49 protected MoapModule m_module;
50 50
51 [SetUp] 51 [SetUp]
52 public override void SetUp() 52 public override void SetUp()
53 { 53 {
@@ -55,45 +55,45 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
55 55
56 m_module = new MoapModule(); 56 m_module = new MoapModule();
57 m_scene = new SceneHelpers().SetupScene(); 57 m_scene = new SceneHelpers().SetupScene();
58 SceneHelpers.SetupSceneModules(m_scene, m_module); 58 SceneHelpers.SetupSceneModules(m_scene, m_module);
59 } 59 }
60 60
61 [Test] 61 [Test]
62 public void TestClearMediaUrl() 62 public void TestClearMediaUrl()
63 { 63 {
64 TestHelpers.InMethod(); 64 TestHelpers.InMethod();
65// log4net.Config.XmlConfigurator.Configure(); 65// log4net.Config.XmlConfigurator.Configure();
66 66
67 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; 67 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
68 MediaEntry me = new MediaEntry(); 68 MediaEntry me = new MediaEntry();
69 69
70 m_module.SetMediaEntry(part, 1, me); 70 m_module.SetMediaEntry(part, 1, me);
71 m_module.ClearMediaEntry(part, 1); 71 m_module.ClearMediaEntry(part, 1);
72 72
73 Assert.That(part.Shape.Media[1], Is.EqualTo(null)); 73 Assert.That(part.Shape.Media[1], Is.EqualTo(null));
74 74
75 // Although we've cleared one face, other faces may still be present. So we need to check for an 75 // Although we've cleared one face, other faces may still be present. So we need to check for an
76 // update media url version 76 // update media url version
77 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000001/" + UUID.Zero)); 77 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000001/" + UUID.Zero));
78 78
79 // By changing media flag to false, the face texture once again becomes identical to the DefaultTexture. 79 // By changing media flag to false, the face texture once again becomes identical to the DefaultTexture.
80 // Therefore, when libOMV reserializes it, it disappears and we are left with no face texture in this slot. 80 // Therefore, when libOMV reserializes it, it disappears and we are left with no face texture in this slot.
81 // Not at all confusing, eh? 81 // Not at all confusing, eh?
82 Assert.That(part.Shape.Textures.FaceTextures[1], Is.Null); 82 Assert.That(part.Shape.Textures.FaceTextures[1], Is.Null);
83 } 83 }
84 84
85 [Test] 85 [Test]
86 public void TestSetMediaUrl() 86 public void TestSetMediaUrl()
87 { 87 {
88 TestHelpers.InMethod(); 88 TestHelpers.InMethod();
89 89
90 string homeUrl = "opensimulator.org"; 90 string homeUrl = "opensimulator.org";
91 91
92 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; 92 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
93 MediaEntry me = new MediaEntry() { HomeURL = homeUrl }; 93 MediaEntry me = new MediaEntry() { HomeURL = homeUrl };
94 94
95 m_module.SetMediaEntry(part, 1, me); 95 m_module.SetMediaEntry(part, 1, me);
96 96
97 Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl)); 97 Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl));
98 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero)); 98 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero));
99 Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True); 99 Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True);
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 42141e4..b7f01be 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -49,34 +49,34 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
49 49
50 protected Scene m_scene = null; 50 protected Scene m_scene = null;
51 protected IDialogModule m_dialogModule; 51 protected IDialogModule m_dialogModule;
52 52
53 public string Name { get { return "Object BuySell Module"; } } 53 public string Name { get { return "Object BuySell Module"; } }
54 public Type ReplaceableInterface { get { return null; } } 54 public Type ReplaceableInterface { get { return null; } }
55 55
56 public void Initialise(IConfigSource source) {} 56 public void Initialise(IConfigSource source) {}
57 57
58 public void AddRegion(Scene scene) 58 public void AddRegion(Scene scene)
59 { 59 {
60 m_scene = scene; 60 m_scene = scene;
61 m_scene.RegisterModuleInterface<IBuySellModule>(this); 61 m_scene.RegisterModuleInterface<IBuySellModule>(this);
62 m_scene.EventManager.OnNewClient += SubscribeToClientEvents; 62 m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
63 } 63 }
64 64
65 public void RemoveRegion(Scene scene) 65 public void RemoveRegion(Scene scene)
66 { 66 {
67 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents; 67 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
68 } 68 }
69 69
70 public void RegionLoaded(Scene scene) 70 public void RegionLoaded(Scene scene)
71 { 71 {
72 m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); 72 m_dialogModule = scene.RequestModuleInterface<IDialogModule>();
73 } 73 }
74 74
75 public void Close() 75 public void Close()
76 { 76 {
77 RemoveRegion(m_scene); 77 RemoveRegion(m_scene);
78 } 78 }
79 79
80 public void SubscribeToClientEvents(IClientAPI client) 80 public void SubscribeToClientEvents(IClientAPI client)
81 { 81 {
82 client.OnObjectSaleInfo += ObjectSaleInfo; 82 client.OnObjectSaleInfo += ObjectSaleInfo;
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
index e53ab95..79c4713 100644
--- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
@@ -53,30 +53,30 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectCommandsModule")] 53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectCommandsModule")]
54 public class ObjectCommandsModule : INonSharedRegionModule 54 public class ObjectCommandsModule : INonSharedRegionModule
55 { 55 {
56// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
58 private Scene m_scene; 58 private Scene m_scene;
59 private ICommandConsole m_console; 59 private ICommandConsole m_console;
60 60
61 public string Name { get { return "Object Commands Module"; } } 61 public string Name { get { return "Object Commands Module"; } }
62 62
63 public Type ReplaceableInterface { get { return null; } } 63 public Type ReplaceableInterface { get { return null; } }
64 64
65 public void Initialise(IConfigSource source) 65 public void Initialise(IConfigSource source)
66 { 66 {
67// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: INITIALIZED MODULE"); 67// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: INITIALIZED MODULE");
68 } 68 }
69 69
70 public void PostInitialise() 70 public void PostInitialise()
71 { 71 {
72// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: POST INITIALIZED MODULE"); 72// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: POST INITIALIZED MODULE");
73 } 73 }
74 74
75 public void Close() 75 public void Close()
76 { 76 {
77// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: CLOSED MODULE"); 77// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: CLOSED MODULE");
78 } 78 }
79 79
80 public void AddRegion(Scene scene) 80 public void AddRegion(Scene scene)
81 { 81 {
82// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 82// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
@@ -539,13 +539,13 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
539 539
540 if (!ConsoleUtil.CheckFileDoesNotExist(m_console, fileName)) 540 if (!ConsoleUtil.CheckFileDoesNotExist(m_console, fileName))
541 return; 541 return;
542 542
543 using (XmlTextWriter xtw = new XmlTextWriter(fileName, Encoding.UTF8)) 543 using (XmlTextWriter xtw = new XmlTextWriter(fileName, Encoding.UTF8))
544 { 544 {
545 xtw.Formatting = Formatting.Indented; 545 xtw.Formatting = Formatting.Indented;
546 SceneObjectSerializer.ToOriginalXmlFormat(so, xtw, true); 546 SceneObjectSerializer.ToOriginalXmlFormat(so, xtw, true);
547 } 547 }
548 548
549 m_console.OutputFormat("Object dumped to file {0}", fileName); 549 m_console.OutputFormat("Object dumped to file {0}", fileName);
550 } 550 }
551 551
@@ -625,7 +625,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
625 cdl.AddRow("FlexiSoftness", s.FlexiSoftness); 625 cdl.AddRow("FlexiSoftness", s.FlexiSoftness);
626 cdl.AddRow("HollowShape", s.HollowShape); 626 cdl.AddRow("HollowShape", s.HollowShape);
627 cdl.AddRow( 627 cdl.AddRow(
628 "LightColor", 628 "LightColor",
629 string.Format("<{0},{1},{2},{3}>", s.LightColorR, s.LightColorB, s.LightColorG, s.LightColorA)); 629 string.Format("<{0},{1},{2},{3}>", s.LightColorR, s.LightColorB, s.LightColorG, s.LightColorA));
630 cdl.AddRow("LightCutoff", s.LightCutoff); 630 cdl.AddRow("LightCutoff", s.LightCutoff);
631 cdl.AddRow("LightEntry", s.LightEntry); 631 cdl.AddRow("LightEntry", s.LightEntry);
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
659 cdl.AddRow("Rotation (World)", sop.GetWorldRotation()); 659 cdl.AddRow("Rotation (World)", sop.GetWorldRotation());
660 cdl.AddRow("Scale", s.Scale); 660 cdl.AddRow("Scale", s.Scale);
661 cdl.AddRow( 661 cdl.AddRow(
662 "SculptData", 662 "SculptData",
663 string.Format("{0} bytes", s.SculptData != null ? s.SculptData.Length.ToString() : "n/a")); 663 string.Format("{0} bytes", s.SculptData != null ? s.SculptData.Length.ToString() : "n/a"));
664 cdl.AddRow("SculptEntry", s.SculptEntry); 664 cdl.AddRow("SculptEntry", s.SculptEntry);
665 cdl.AddRow("SculptTexture", s.SculptTexture); 665 cdl.AddRow("SculptTexture", s.SculptTexture);
@@ -668,7 +668,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
668 668
669 // TODO, need to display more information about textures but in a compact format 669 // TODO, need to display more information about textures but in a compact format
670 // to stop output becoming huge. 670 // to stop output becoming huge.
671 for (int i = 0; i < sop.GetNumberOfSides(); i++) 671 for (int i = 0; i < sop.GetNumberOfSides(); i++)
672 { 672 {
673 Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i]; 673 Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i];
674 674
@@ -765,12 +765,12 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
765 if (g.OwnerID == match && !g.IsAttachment) 765 if (g.OwnerID == match && !g.IsAttachment)
766 deletes.Add(g); 766 deletes.Add(g);
767 }); 767 });
768 768
769 // if (deletes.Count == 0) 769 // if (deletes.Count == 0)
770 // m_console.OutputFormat("No objects were found with owner {0}", match); 770 // m_console.OutputFormat("No objects were found with owner {0}", match);
771 771
772 break; 772 break;
773 773
774 case "creator": 774 case "creator":
775 if (!UUID.TryParse(o, out match)) 775 if (!UUID.TryParse(o, out match))
776 return; 776 return;
@@ -782,12 +782,12 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
782 if (g.RootPart.CreatorID == match && !g.IsAttachment) 782 if (g.RootPart.CreatorID == match && !g.IsAttachment)
783 deletes.Add(g); 783 deletes.Add(g);
784 }); 784 });
785 785
786 // if (deletes.Count == 0) 786 // if (deletes.Count == 0)
787 // m_console.OutputFormat("No objects were found with creator {0}", match); 787 // m_console.OutputFormat("No objects were found with creator {0}", match);
788 788
789 break; 789 break;
790 790
791 case "id": 791 case "id":
792 UUID uuid; 792 UUID uuid;
793 uint localId; 793 uint localId;
@@ -808,13 +808,13 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
808 808
809 // if (deletes.Count == 0) 809 // if (deletes.Count == 0)
810 // m_console.OutputFormat("No objects were found with uuid {0}", match); 810 // m_console.OutputFormat("No objects were found with uuid {0}", match);
811 811
812 break; 812 break;
813 813
814 case "name": 814 case "name":
815 deletes = GetDeleteCandidatesByName(module, cmd); 815 deletes = GetDeleteCandidatesByName(module, cmd);
816 break; 816 break;
817 817
818 case "outside": 818 case "outside":
819 deletes = new List<SceneObjectGroup>(); 819 deletes = new List<SceneObjectGroup>();
820 820
@@ -822,7 +822,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
822 { 822 {
823 SceneObjectPart rootPart = g.RootPart; 823 SceneObjectPart rootPart = g.RootPart;
824 bool delete = false; 824 bool delete = false;
825 825
826 if (rootPart.GroupPosition.Z < 0.0 || rootPart.GroupPosition.Z > 10000.0) 826 if (rootPart.GroupPosition.Z < 0.0 || rootPart.GroupPosition.Z > 10000.0)
827 { 827 {
828 delete = true; 828 delete = true;
@@ -831,18 +831,18 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
831 { 831 {
832 ILandObject parcel 832 ILandObject parcel
833 = m_scene.LandChannel.GetLandObject(rootPart.GroupPosition.X, rootPart.GroupPosition.Y); 833 = m_scene.LandChannel.GetLandObject(rootPart.GroupPosition.X, rootPart.GroupPosition.Y);
834 834
835 if (parcel == null || parcel.LandData.Name == "NO LAND") 835 if (parcel == null || parcel.LandData.Name == "NO LAND")
836 delete = true; 836 delete = true;
837 } 837 }
838 838
839 if (delete && !g.IsAttachment && !deletes.Contains(g)) 839 if (delete && !g.IsAttachment && !deletes.Contains(g))
840 deletes.Add(g); 840 deletes.Add(g);
841 }); 841 });
842 842
843 if (deletes.Count == 0) 843 if (deletes.Count == 0)
844 m_console.OutputFormat("No objects were found outside region bounds"); 844 m_console.OutputFormat("No objects were found outside region bounds");
845 845
846 break; 846 break;
847 847
848 case "pos": 848 case "pos":
@@ -864,7 +864,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
864 "Are you sure that you want to delete {0} objects from {1}", 864 "Are you sure that you want to delete {0} objects from {1}",
865 deletes.Count, m_scene.RegionInfo.RegionName), 865 deletes.Count, m_scene.RegionInfo.RegionName),
866 "y/N"); 866 "y/N");
867 867
868 if (response.ToLower() != "y") 868 if (response.ToLower() != "y")
869 { 869 {
870 MainConsole.Instance.OutputFormat( 870 MainConsole.Instance.OutputFormat(
@@ -951,7 +951,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
951 { 951 {
952 m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); 952 m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector);
953 endVector = Vector3.Zero; 953 endVector = Vector3.Zero;
954 954
955 return false; 955 return false;
956 } 956 }
957 957
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 06900f0..1a61771 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
47 public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule 47 public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule
48 { 48 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 50
51 protected Scene m_scene; 51 protected Scene m_scene;
52 protected bool m_Enabled; 52 protected bool m_Enabled;
53 53
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
77 private uint PERM_MOVE = (uint)524288; 77 private uint PERM_MOVE = (uint)524288;
78 private uint PERM_TRANS = (uint)8192; 78 private uint PERM_TRANS = (uint)8192;
79 private uint PERM_LOCKED = (uint)540672; 79 private uint PERM_LOCKED = (uint)540672;
80 80
81 /// <value> 81 /// <value>
82 /// Different user set names that come in from the configuration file. 82 /// Different user set names that come in from the configuration file.
83 /// </value> 83 /// </value>
@@ -110,17 +110,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
110 private UserSet m_allowedScriptCreators = UserSet.All; 110 private UserSet m_allowedScriptCreators = UserSet.All;
111 111
112 /// <value> 112 /// <value>
113 /// The set of users that are allowed to edit (save) scripts. This is only active if 113 /// The set of users that are allowed to edit (save) scripts. This is only active if
114 /// permissions are not being bypassed. This overrides normal permissions.- 114 /// permissions are not being bypassed. This overrides normal permissions.-
115 /// </value> 115 /// </value>
116 private UserSet m_allowedScriptEditors = UserSet.All; 116 private UserSet m_allowedScriptEditors = UserSet.All;
117 117
118 private Dictionary<string, bool> GrantLSL = new Dictionary<string, bool>(); 118 private Dictionary<string, bool> GrantLSL = new Dictionary<string, bool>();
119 private Dictionary<string, bool> GrantCS = new Dictionary<string, bool>(); 119 private Dictionary<string, bool> GrantCS = new Dictionary<string, bool>();
120 private Dictionary<string, bool> GrantVB = new Dictionary<string, bool>(); 120 private Dictionary<string, bool> GrantVB = new Dictionary<string, bool>();
121 private Dictionary<string, bool> GrantJS = new Dictionary<string, bool>(); 121 private Dictionary<string, bool> GrantJS = new Dictionary<string, bool>();
122 private Dictionary<string, bool> GrantYP = new Dictionary<string, bool>(); 122 private Dictionary<string, bool> GrantYP = new Dictionary<string, bool>();
123 123
124 private IFriendsModule m_friendsModule; 124 private IFriendsModule m_friendsModule;
125 private IFriendsModule FriendsModule 125 private IFriendsModule FriendsModule
126 { 126 {
@@ -169,20 +169,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions
169 m_Enabled = true; 169 m_Enabled = true;
170 170
171 m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods", 171 m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods",
172 new string[] { "Startup", "Permissions" }, false); 172 new string[] { "Startup", "Permissions" }, false);
173 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions", 173 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions",
174 new string[] { "Startup", "Permissions" }, true); 174 new string[] { "Startup", "Permissions" }, true);
175 m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions", 175 m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions",
176 new string[] { "Startup", "Permissions" }, true); 176 new string[] { "Startup", "Permissions" }, true);
177 m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god", 177 m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",
178 new string[] { "Startup", "Permissions" }, true); 178 new string[] { "Startup", "Permissions" }, true);
179 m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god", 179 m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god",
180 new string[] { "Startup", "Permissions" }, false); 180 new string[] { "Startup", "Permissions" }, false);
181 m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god", 181 m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god",
182 new string[] { "Startup", "Permissions" }, false); 182 new string[] { "Startup", "Permissions" }, false);
183 183
184 m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions", 184 m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions",
185 new string[] { "Startup", "Permissions" }, false); 185 new string[] { "Startup", "Permissions" }, false);
186 186
187 m_allowedScriptCreators 187 m_allowedScriptCreators
188 = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators); 188 = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators);
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
206 } 206 }
207 207
208 grant = Util.GetConfigVarFromSections<string>(config, "GrantCS", 208 grant = Util.GetConfigVarFromSections<string>(config, "GrantCS",
209 new string[] { "Startup", "Permissions" }, string.Empty); 209 new string[] { "Startup", "Permissions" }, string.Empty);
210 if (grant.Length > 0) 210 if (grant.Length > 0)
211 { 211 {
212 foreach (string uuidl in grant.Split(',')) 212 foreach (string uuidl in grant.Split(','))
@@ -273,46 +273,46 @@ namespace OpenSim.Region.CoreModules.World.Permissions
273 m_scene.Permissions.OnIsAdministrator += IsAdministrator; 273 m_scene.Permissions.OnIsAdministrator += IsAdministrator;
274 m_scene.Permissions.OnIsEstateManager += IsEstateManager; 274 m_scene.Permissions.OnIsEstateManager += IsEstateManager;
275 m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; 275 m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
276 m_scene.Permissions.OnDeleteObject += CanDeleteObject; 276 m_scene.Permissions.OnDeleteObject += CanDeleteObject;
277 m_scene.Permissions.OnEditObject += CanEditObject; 277 m_scene.Permissions.OnEditObject += CanEditObject;
278 m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; 278 m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties;
279 m_scene.Permissions.OnInstantMessage += CanInstantMessage; 279 m_scene.Permissions.OnInstantMessage += CanInstantMessage;
280 m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; 280 m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer;
281 m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; 281 m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand;
282 m_scene.Permissions.OnMoveObject += CanMoveObject; 282 m_scene.Permissions.OnMoveObject += CanMoveObject;
283 m_scene.Permissions.OnObjectEntry += CanObjectEntry; 283 m_scene.Permissions.OnObjectEntry += CanObjectEntry;
284 m_scene.Permissions.OnReturnObjects += CanReturnObjects; 284 m_scene.Permissions.OnReturnObjects += CanReturnObjects;
285 m_scene.Permissions.OnRezObject += CanRezObject; 285 m_scene.Permissions.OnRezObject += CanRezObject;
286 m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand; 286 m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand;
287 m_scene.Permissions.OnRunScript += CanRunScript; 287 m_scene.Permissions.OnRunScript += CanRunScript;
288 m_scene.Permissions.OnCompileScript += CanCompileScript; 288 m_scene.Permissions.OnCompileScript += CanCompileScript;
289 m_scene.Permissions.OnSellParcel += CanSellParcel; 289 m_scene.Permissions.OnSellParcel += CanSellParcel;
290 m_scene.Permissions.OnTakeObject += CanTakeObject; 290 m_scene.Permissions.OnTakeObject += CanTakeObject;
291 m_scene.Permissions.OnSellGroupObject += CanSellGroupObject; 291 m_scene.Permissions.OnSellGroupObject += CanSellGroupObject;
292 m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject; 292 m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject;
293 m_scene.Permissions.OnTerraformLand += CanTerraformLand; 293 m_scene.Permissions.OnTerraformLand += CanTerraformLand;
294 m_scene.Permissions.OnLinkObject += CanLinkObject; 294 m_scene.Permissions.OnLinkObject += CanLinkObject;
295 m_scene.Permissions.OnDelinkObject += CanDelinkObject; 295 m_scene.Permissions.OnDelinkObject += CanDelinkObject;
296 m_scene.Permissions.OnBuyLand += CanBuyLand; 296 m_scene.Permissions.OnBuyLand += CanBuyLand;
297 297
298 m_scene.Permissions.OnViewNotecard += CanViewNotecard; 298 m_scene.Permissions.OnViewNotecard += CanViewNotecard;
299 m_scene.Permissions.OnViewScript += CanViewScript; 299 m_scene.Permissions.OnViewScript += CanViewScript;
300 m_scene.Permissions.OnEditNotecard += CanEditNotecard; 300 m_scene.Permissions.OnEditNotecard += CanEditNotecard;
301 m_scene.Permissions.OnEditScript += CanEditScript; 301 m_scene.Permissions.OnEditScript += CanEditScript;
302 302
303 m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; 303 m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory;
304 m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory; 304 m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;
305 m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; 305 m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory;
306 m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; 306 m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory;
307 m_scene.Permissions.OnResetScript += CanResetScript; 307 m_scene.Permissions.OnResetScript += CanResetScript;
308 308
309 m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory; 309 m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory;
310 m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory; 310 m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory;
311 m_scene.Permissions.OnEditUserInventory += CanEditUserInventory; 311 m_scene.Permissions.OnEditUserInventory += CanEditUserInventory;
312 m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; 312 m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory;
313 313
314 m_scene.Permissions.OnTeleport += CanTeleport; 314 m_scene.Permissions.OnTeleport += CanTeleport;
315 315
316 m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; 316 m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia;
317 m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; 317 m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia;
318 318
@@ -329,8 +329,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
329 m_scene.AddCommand("Debug", this, "debug permissions", 329 m_scene.AddCommand("Debug", this, "debug permissions",
330 "debug permissions <true / false>", 330 "debug permissions <true / false>",
331 "Turn on permissions debugging", 331 "Turn on permissions debugging",
332 HandleDebugPermissions); 332 HandleDebugPermissions);
333 333
334 } 334 }
335 335
336 public void RegionLoaded(Scene scene) 336 public void RegionLoaded(Scene scene)
@@ -441,7 +441,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
441 { 441 {
442 m_scene.EventManager.TriggerPermissionError(user, reason); 442 m_scene.EventManager.TriggerPermissionError(user, reason);
443 } 443 }
444 444
445 protected void DebugPermissionInformation(string permissionCalled) 445 protected void DebugPermissionInformation(string permissionCalled)
446 { 446 {
447 if (m_debugPermissions) 447 if (m_debugPermissions)
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
471 471
472 return false; 472 return false;
473 } 473 }
474 474
475 /// <summary> 475 /// <summary>
476 /// Parse a user set configuration setting 476 /// Parse a user set configuration setting
477 /// </summary> 477 /// </summary>
@@ -483,28 +483,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions
483 { 483 {
484 UserSet userSet = defaultValue; 484 UserSet userSet = defaultValue;
485 485
486 string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName, 486 string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName,
487 new string[] {"Startup", "Permissions"}, defaultValue.ToString()); 487 new string[] {"Startup", "Permissions"}, defaultValue.ToString());
488 488
489 // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term 489 // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term
490 // this should disappear. 490 // this should disappear.
491 if ("gods" == rawSetting.ToLower()) 491 if ("gods" == rawSetting.ToLower())
492 rawSetting = UserSet.Administrators.ToString(); 492 rawSetting = UserSet.Administrators.ToString();
493 493
494 // Doing it this was so that we can do a case insensitive conversion 494 // Doing it this was so that we can do a case insensitive conversion
495 try 495 try
496 { 496 {
497 userSet = (UserSet)Enum.Parse(typeof(UserSet), rawSetting, true); 497 userSet = (UserSet)Enum.Parse(typeof(UserSet), rawSetting, true);
498 } 498 }
499 catch 499 catch
500 { 500 {
501 m_log.ErrorFormat( 501 m_log.ErrorFormat(
502 "[PERMISSIONS]: {0} is not a valid {1} value, setting to {2}", 502 "[PERMISSIONS]: {0} is not a valid {1} value, setting to {2}",
503 rawSetting, settingName, userSet); 503 rawSetting, settingName, userSet);
504 } 504 }
505 505
506 m_log.DebugFormat("[PERMISSIONS]: {0} {1}", settingName, userSet); 506 m_log.DebugFormat("[PERMISSIONS]: {0} {1}", settingName, userSet);
507 507
508 return userSet; 508 return userSet;
509 } 509 }
510 510
@@ -520,7 +520,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
520 520
521 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod) 521 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
522 return true; 522 return true;
523 523
524 if (IsEstateManager(user) && m_RegionManagerIsGod) 524 if (IsEstateManager(user) && m_RegionManagerIsGod)
525 return true; 525 return true;
526 526
@@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
558 } 558 }
559 559
560 protected bool IsFriendWithPerms(UUID user, UUID objectOwner) 560 protected bool IsFriendWithPerms(UUID user, UUID objectOwner)
561 { 561 {
562 if (user == UUID.Zero) 562 if (user == UUID.Zero)
563 return false; 563 return false;
564 564
@@ -572,7 +572,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
572 protected bool IsEstateManager(UUID user) 572 protected bool IsEstateManager(UUID user)
573 { 573 {
574 if (user == UUID.Zero) return false; 574 if (user == UUID.Zero) return false;
575 575
576 return m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(user); 576 return m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(user);
577 } 577 }
578 578
@@ -777,7 +777,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
777 // so just return true immediately and short circuit the more 777 // so just return true immediately and short circuit the more
778 // expensive group checks 778 // expensive group checks
779 return true; 779 return true;
780 780
781 //permission = true; 781 //permission = true;
782 } 782 }
783 else if (group.IsAttachment) 783 else if (group.IsAttachment)
@@ -786,15 +786,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
786 } 786 }
787 787
788// m_log.DebugFormat( 788// m_log.DebugFormat(
789// "[PERMISSIONS]: group.GroupID = {0}, part.GroupMask = {1}, isGroupMember = {2} for {3}", 789// "[PERMISSIONS]: group.GroupID = {0}, part.GroupMask = {1}, isGroupMember = {2} for {3}",
790// group.GroupID, 790// group.GroupID,
791// m_scene.GetSceneObjectPart(objId).GroupMask, 791// m_scene.GetSceneObjectPart(objId).GroupMask,
792// IsGroupMember(group.GroupID, currentUser, 0), 792// IsGroupMember(group.GroupID, currentUser, 0),
793// currentUser); 793// currentUser);
794 794
795 // Group members should be able to edit group objects 795 // Group members should be able to edit group objects
796 if ((group.GroupID != UUID.Zero) 796 if ((group.GroupID != UUID.Zero)
797 && ((m_scene.GetSceneObjectPart(objId).GroupMask & (uint)PermissionMask.Modify) != 0) 797 && ((m_scene.GetSceneObjectPart(objId).GroupMask & (uint)PermissionMask.Modify) != 0)
798 && IsGroupMember(group.GroupID, currentUser, 0)) 798 && IsGroupMember(group.GroupID, currentUser, 0))
799 { 799 {
800 // Return immediately, so that the administrator can shares group objects 800 // Return immediately, so that the administrator can shares group objects
@@ -807,7 +807,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
807 // Return immediately, so that the administrator can share objects with friends 807 // Return immediately, so that the administrator can share objects with friends
808 return true; 808 return true;
809 } 809 }
810 810
811 // Users should be able to edit what is over their land. 811 // Users should be able to edit what is over their land.
812 ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); 812 ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
813 if ((parcel != null) && (parcel.LandData.OwnerID == currentUser)) 813 if ((parcel != null) && (parcel.LandData.OwnerID == currentUser))
@@ -904,7 +904,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
904 904
905 return permission; 905 return permission;
906 } 906 }
907 907
908 protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers, bool allowEstateManager) 908 protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers, bool allowEstateManager)
909 { 909 {
910 if (parcel.LandData.OwnerID == user) 910 if (parcel.LandData.OwnerID == user)
@@ -919,7 +919,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
919 { 919 {
920 return true; 920 return true;
921 } 921 }
922 922
923 if (allowEstateManager && IsEstateManager(user)) 923 if (allowEstateManager && IsEstateManager(user))
924 { 924 {
925 return true; 925 return true;
@@ -946,7 +946,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
946 { 946 {
947 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 947 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
948 if (m_bypassPermissions) return m_bypassPermissionsValue; 948 if (m_bypassPermissions) return m_bypassPermissionsValue;
949 949
950 return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false); 950 return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false);
951 } 951 }
952 952
@@ -1007,7 +1007,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1007 //They can't even edit the object 1007 //They can't even edit the object
1008 return false; 1008 return false;
1009 } 1009 }
1010 1010
1011 SceneObjectPart part = scene.GetSceneObjectPart(objectID); 1011 SceneObjectPart part = scene.GetSceneObjectPart(objectID);
1012 if (part == null) 1012 if (part == null)
1013 return false; 1013 return false;
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1025 if ((part.GroupMask & PERM_COPY) == 0) 1025 if ((part.GroupMask & PERM_COPY) == 0)
1026 return false; 1026 return false;
1027 } 1027 }
1028 1028
1029 //If they can rez, they can duplicate 1029 //If they can rez, they can duplicate
1030 return CanRezObject(objectCount, owner, objectPosition, scene); 1030 return CanRezObject(objectCount, owner, objectPosition, scene);
1031 } 1031 }
@@ -1074,10 +1074,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1074 { 1074 {
1075 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1075 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1076 if (m_bypassPermissions) return m_bypassPermissionsValue; 1076 if (m_bypassPermissions) return m_bypassPermissionsValue;
1077 1077
1078 if (m_allowedScriptEditors == UserSet.Administrators && !IsAdministrator(user)) 1078 if (m_allowedScriptEditors == UserSet.Administrators && !IsAdministrator(user))
1079 return false; 1079 return false;
1080 1080
1081 // Ordinarily, if you can view it, you can edit it 1081 // Ordinarily, if you can view it, you can edit it
1082 // There is no viewing a no mod script 1082 // There is no viewing a no mod script
1083 // 1083 //
@@ -1135,10 +1135,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1135 1135
1136 if (!IsGroupMember(part.GroupID, user, 0)) 1136 if (!IsGroupMember(part.GroupID, user, 0))
1137 return false; 1137 return false;
1138 1138
1139 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) 1139 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
1140 return false; 1140 return false;
1141 } 1141 }
1142 else 1142 else
1143 { 1143 {
1144 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1144 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
@@ -1572,7 +1572,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1572 if ((so.GetEffectivePermissions() & PERM_COPY) != PERM_COPY) 1572 if ((so.GetEffectivePermissions() & PERM_COPY) != PERM_COPY)
1573 permission = false; 1573 permission = false;
1574 } 1574 }
1575 1575
1576 return permission; 1576 return permission;
1577 } 1577 }
1578 1578
@@ -1662,7 +1662,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1662 1662
1663 if (part == null) 1663 if (part == null)
1664 return false; 1664 return false;
1665 1665
1666 if (part.OwnerID != user) 1666 if (part.OwnerID != user)
1667 { 1667 {
1668 if (part.GroupID == UUID.Zero) 1668 if (part.GroupID == UUID.Zero)
@@ -1670,11 +1670,11 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1670 1670
1671 if (!IsGroupMember(part.GroupID, user, 0)) 1671 if (!IsGroupMember(part.GroupID, user, 0))
1672 return false; 1672 return false;
1673 1673
1674 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) 1674 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
1675 return false; 1675 return false;
1676 } 1676 }
1677 else 1677 else
1678 { 1678 {
1679 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1679 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1680 return false; 1680 return false;
@@ -1684,12 +1684,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1684 1684
1685 if (ti == null) 1685 if (ti == null)
1686 return false; 1686 return false;
1687 1687
1688 if (ti.OwnerID != user) 1688 if (ti.OwnerID != user)
1689 { 1689 {
1690 if (ti.GroupID == UUID.Zero) 1690 if (ti.GroupID == UUID.Zero)
1691 return false; 1691 return false;
1692 1692
1693 if (!IsGroupMember(ti.GroupID, user, 0)) 1693 if (!IsGroupMember(ti.GroupID, user, 0))
1694 return false; 1694 return false;
1695 } 1695 }
@@ -1746,12 +1746,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1746 1746
1747 if (part == null) 1747 if (part == null)
1748 return false; 1748 return false;
1749 1749
1750 if (part.OwnerID != user) 1750 if (part.OwnerID != user)
1751 { 1751 {
1752 if (part.GroupID == UUID.Zero) 1752 if (part.GroupID == UUID.Zero)
1753 return false; 1753 return false;
1754 1754
1755 if (!IsGroupMember(part.GroupID, user, 0)) 1755 if (!IsGroupMember(part.GroupID, user, 0))
1756 return false; 1756 return false;
1757 } 1757 }
@@ -1768,7 +1768,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1768 { 1768 {
1769 if (ti.GroupID == UUID.Zero) 1769 if (ti.GroupID == UUID.Zero)
1770 return false; 1770 return false;
1771 1771
1772 if (!IsGroupMember(ti.GroupID, user, 0)) 1772 if (!IsGroupMember(ti.GroupID, user, 0))
1773 return false; 1773 return false;
1774 } 1774 }
@@ -1863,7 +1863,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1863 1863
1864 return true; 1864 return true;
1865 } 1865 }
1866 1866
1867 /// <summary> 1867 /// <summary>
1868 /// Check whether the specified user is allowed to create the given inventory type in their inventory. 1868 /// Check whether the specified user is allowed to create the given inventory type in their inventory.
1869 /// </summary> 1869 /// </summary>
@@ -1878,10 +1878,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1878 if ((int)InventoryType.LSL == invType) 1878 if ((int)InventoryType.LSL == invType)
1879 if (m_allowedScriptCreators == UserSet.Administrators && !IsAdministrator(userID)) 1879 if (m_allowedScriptCreators == UserSet.Administrators && !IsAdministrator(userID))
1880 return false; 1880 return false;
1881 1881
1882 return true; 1882 return true;
1883 } 1883 }
1884 1884
1885 /// <summary> 1885 /// <summary>
1886 /// Check whether the specified user is allowed to copy the given inventory type in their inventory. 1886 /// Check whether the specified user is allowed to copy the given inventory type in their inventory.
1887 /// </summary> 1887 /// </summary>
@@ -1895,7 +1895,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1895 1895
1896 return true; 1896 return true;
1897 } 1897 }
1898 1898
1899 /// <summary> 1899 /// <summary>
1900 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. 1900 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1901 /// </summary> 1901 /// </summary>
@@ -1909,7 +1909,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1909 1909
1910 return true; 1910 return true;
1911 } 1911 }
1912 1912
1913 /// <summary> 1913 /// <summary>
1914 /// Check whether the specified user is allowed to delete the given inventory item from their own inventory. 1914 /// Check whether the specified user is allowed to delete the given inventory item from their own inventory.
1915 /// </summary> 1915 /// </summary>
@@ -1947,7 +1947,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1947 return GenericObjectPermission(agentID, prim, false); 1947 return GenericObjectPermission(agentID, prim, false);
1948 } 1948 }
1949 1949
1950 private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) 1950 private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene)
1951 { 1951 {
1952 //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); 1952 //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType);
1953 switch (scriptType) { 1953 switch (scriptType) {
@@ -1981,64 +1981,64 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1981 } 1981 }
1982 return(false); 1982 return(false);
1983 } 1983 }
1984 1984
1985 private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) 1985 private bool CanControlPrimMedia(UUID agentID, UUID primID, int face)
1986 { 1986 {
1987// m_log.DebugFormat( 1987// m_log.DebugFormat(
1988// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", 1988// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}",
1989// agentID, primID, face); 1989// agentID, primID, face);
1990 1990
1991 if (null == MoapModule) 1991 if (null == MoapModule)
1992 return false; 1992 return false;
1993 1993
1994 SceneObjectPart part = m_scene.GetSceneObjectPart(primID); 1994 SceneObjectPart part = m_scene.GetSceneObjectPart(primID);
1995 if (null == part) 1995 if (null == part)
1996 return false; 1996 return false;
1997 1997
1998 MediaEntry me = MoapModule.GetMediaEntry(part, face); 1998 MediaEntry me = MoapModule.GetMediaEntry(part, face);
1999 1999
2000 // If there is no existing media entry then it can be controlled (in this context, created). 2000 // If there is no existing media entry then it can be controlled (in this context, created).
2001 if (null == me) 2001 if (null == me)
2002 return true; 2002 return true;
2003 2003
2004// m_log.DebugFormat( 2004// m_log.DebugFormat(
2005// "[PERMISSIONS]: Checking CanControlPrimMedia for {0} on {1} face {2} with control permissions {3}", 2005// "[PERMISSIONS]: Checking CanControlPrimMedia for {0} on {1} face {2} with control permissions {3}",
2006// agentID, primID, face, me.ControlPermissions); 2006// agentID, primID, face, me.ControlPermissions);
2007 2007
2008 return GenericObjectPermission(agentID, part.ParentGroup.UUID, true); 2008 return GenericObjectPermission(agentID, part.ParentGroup.UUID, true);
2009 } 2009 }
2010 2010
2011 private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) 2011 private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face)
2012 { 2012 {
2013// m_log.DebugFormat( 2013// m_log.DebugFormat(
2014// "[PERMISSONS]: Performing CanInteractWithPrimMedia check with agentID {0}, primID {1}, face {2}", 2014// "[PERMISSONS]: Performing CanInteractWithPrimMedia check with agentID {0}, primID {1}, face {2}",
2015// agentID, primID, face); 2015// agentID, primID, face);
2016 2016
2017 if (null == MoapModule) 2017 if (null == MoapModule)
2018 return false; 2018 return false;
2019 2019
2020 SceneObjectPart part = m_scene.GetSceneObjectPart(primID); 2020 SceneObjectPart part = m_scene.GetSceneObjectPart(primID);
2021 if (null == part) 2021 if (null == part)
2022 return false; 2022 return false;
2023 2023
2024 MediaEntry me = MoapModule.GetMediaEntry(part, face); 2024 MediaEntry me = MoapModule.GetMediaEntry(part, face);
2025 2025
2026 // If there is no existing media entry then it can be controlled (in this context, created). 2026 // If there is no existing media entry then it can be controlled (in this context, created).
2027 if (null == me) 2027 if (null == me)
2028 return true; 2028 return true;
2029 2029
2030// m_log.DebugFormat( 2030// m_log.DebugFormat(
2031// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", 2031// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}",
2032// agentID, primID, face, me.InteractPermissions); 2032// agentID, primID, face, me.InteractPermissions);
2033 2033
2034 return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); 2034 return GenericPrimMediaPermission(part, agentID, me.InteractPermissions);
2035 } 2035 }
2036 2036
2037 private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) 2037 private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms)
2038 { 2038 {
2039// if (IsAdministrator(agentID)) 2039// if (IsAdministrator(agentID))
2040// return true; 2040// return true;
2041 2041
2042 if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) 2042 if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone)
2043 return true; 2043 return true;
2044 2044
@@ -2047,13 +2047,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
2047 if (agentID == part.OwnerID) 2047 if (agentID == part.OwnerID)
2048 return true; 2048 return true;
2049 } 2049 }
2050 2050
2051 if ((perms & MediaPermission.Group) == MediaPermission.Group) 2051 if ((perms & MediaPermission.Group) == MediaPermission.Group)
2052 { 2052 {
2053 if (IsGroupMember(part.GroupID, agentID, 0)) 2053 if (IsGroupMember(part.GroupID, agentID, 0))
2054 return true; 2054 return true;
2055 } 2055 }
2056 2056
2057 return false; 2057 return false;
2058 } 2058 }
2059 } 2059 }
diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
index 411c4d6..49246a2 100644
--- a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
@@ -54,24 +54,24 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
54 private ICommandConsole m_console; 54 private ICommandConsole m_console;
55 55
56 public string Name { get { return "Region Commands Module"; } } 56 public string Name { get { return "Region Commands Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[REGION COMMANDS MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[REGION COMMANDS MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[REGION COMMANDS MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[REGION COMMANDS MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[REGION COMMANDS MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[REGION COMMANDS MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[REGION COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[REGION COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
@@ -87,14 +87,14 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
87 m_console.Commands.AddCommand( 87 m_console.Commands.AddCommand(
88 "Regions", false, "show region", 88 "Regions", false, "show region",
89 "show region", 89 "show region",
90 "Show control information for the currently selected region (host name, max physical prim size, etc).", 90 "Show control information for the currently selected region (host name, max physical prim size, etc).",
91 "A synonym for \"region get\"", 91 "A synonym for \"region get\"",
92 HandleShowRegion); 92 HandleShowRegion);
93 93
94 m_console.Commands.AddCommand( 94 m_console.Commands.AddCommand(
95 "Regions", false, "region get", 95 "Regions", false, "region get",
96 "region get", 96 "region get",
97 "Show control information for the currently selected region (host name, max physical prim size, etc).", 97 "Show control information for the currently selected region (host name, max physical prim size, etc).",
98 "Some parameters can be set with the \"region set\" command.\n" 98 "Some parameters can be set with the \"region set\" command.\n"
99 + "Others must be changed via a viewer (usually via the region/estate dialog box).", 99 + "Others must be changed via a viewer (usually via the region/estate dialog box).",
100 HandleShowRegion); 100 HandleShowRegion);
@@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
204 { 204 {
205 MainConsole.Instance.OutputFormat("Usage: region set <param> <value>"); 205 MainConsole.Instance.OutputFormat("Usage: region set <param> <value>");
206 return; 206 return;
207 } 207 }
208 208
209 string param = args[2]; 209 string param = args[2];
210 string rawValue = args[3]; 210 string rawValue = args[3];
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
225 if (newValue > ri.AgentCapacity) 225 if (newValue > ri.AgentCapacity)
226 { 226 {
227 MainConsole.Instance.OutputFormat( 227 MainConsole.Instance.OutputFormat(
228 "Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit", 228 "Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit",
229 newValue, m_scene.Name, ri.AgentCapacity); 229 newValue, m_scene.Name, ri.AgentCapacity);
230 } 230 }
231 else 231 else
diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
index e6a0205..8bac9e6 100644
--- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
@@ -78,22 +78,22 @@ namespace OpenSim.Region.CoreModules.World.Region
78 scene.RegionInfo.RegionID.ToString())); 78 scene.RegionInfo.RegionID.ToString()));
79 79
80 m_Scene = scene; 80 m_Scene = scene;
81 81
82 scene.RegisterModuleInterface<IRestartModule>(this); 82 scene.RegisterModuleInterface<IRestartModule>(this);
83 MainConsole.Instance.Commands.AddCommand("Regions", 83 MainConsole.Instance.Commands.AddCommand("Regions",
84 false, "region restart bluebox", 84 false, "region restart bluebox",
85 "region restart bluebox <message> <delta seconds>+", 85 "region restart bluebox <message> <delta seconds>+",
86 "Schedule a region restart", 86 "Schedule a region restart",
87 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.", 87 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.",
88 HandleRegionRestart); 88 HandleRegionRestart);
89 89
90 MainConsole.Instance.Commands.AddCommand("Regions", 90 MainConsole.Instance.Commands.AddCommand("Regions",
91 false, "region restart notice", 91 false, "region restart notice",
92 "region restart notice <message> <delta seconds>+", 92 "region restart notice <message> <delta seconds>+",
93 "Schedule a region restart", 93 "Schedule a region restart",
94 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.", 94 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.",
95 HandleRegionRestart); 95 HandleRegionRestart);
96 96
97 MainConsole.Instance.Commands.AddCommand("Regions", 97 MainConsole.Instance.Commands.AddCommand("Regions",
98 false, "region restart abort", 98 false, "region restart abort",
99 "region restart abort [<message>]", 99 "region restart abort [<message>]",
@@ -183,7 +183,7 @@ namespace OpenSim.Region.CoreModules.World.Region
183 nextAlert = m_Alerts[1]; 183 nextAlert = m_Alerts[1];
184 break; 184 break;
185 } 185 }
186 186
187 int currentAlert = m_Alerts[0]; 187 int currentAlert = m_Alerts[0];
188 188
189 m_Alerts.RemoveAt(0); 189 m_Alerts.RemoveAt(0);
@@ -242,7 +242,7 @@ namespace OpenSim.Region.CoreModules.World.Region
242 else 242 else
243 { 243 {
244 m_log.WarnFormat( 244 m_log.WarnFormat(
245 "[RESTART MODULE]: Tried to set restart timer to {0} in {1}, which is not a valid interval", 245 "[RESTART MODULE]: Tried to set restart timer to {0} in {1}, which is not a valid interval",
246 intervalSeconds, m_Scene.Name); 246 intervalSeconds, m_Scene.Name);
247 } 247 }
248 } 248 }
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.World.Region
286 File.Delete(Path.Combine(m_MarkerPath, 286 File.Delete(Path.Combine(m_MarkerPath,
287 m_Scene.RegionInfo.RegionID.ToString())); 287 m_Scene.RegionInfo.RegionID.ToString()));
288 } 288 }
289 289
290 private void HandleRegionRestart(string module, string[] args) 290 private void HandleRegionRestart(string module, string[] args)
291 { 291 {
292 if (!(MainConsole.Instance.ConsoleScene is Scene)) 292 if (!(MainConsole.Instance.ConsoleScene is Scene))
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
index e0247d9..c9bc335 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SerialiserModule")] 45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SerialiserModule")]
46 public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule 46 public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule
47 { 47 {
48 private static readonly ILog m_log = 48 private static readonly ILog m_log =
49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 50
51// private Commander m_commander = new Commander("export"); 51// private Commander m_commander = new Commander("export");
@@ -55,15 +55,15 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
55 55
56 #region ISharedRegionModule Members 56 #region ISharedRegionModule Members
57 57
58 public Type ReplaceableInterface 58 public Type ReplaceableInterface
59 { 59 {
60 get { return null; } 60 get { return null; }
61 } 61 }
62 62
63 public void Initialise(IConfigSource source) 63 public void Initialise(IConfigSource source)
64 { 64 {
65 IConfig config = source.Configs["Serialiser"]; 65 IConfig config = source.Configs["Serialiser"];
66 if (config != null) 66 if (config != null)
67 { 67 {
68 m_savedir = config.GetString("save_dir", m_savedir); 68 m_savedir = config.GetString("save_dir", m_savedir);
69 } 69 }
@@ -150,7 +150,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
150 { 150 {
151 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max); 151 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max);
152 } 152 }
153 153
154 public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) 154 public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName)
155 { 155 {
156 SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName); 156 SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName);
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
index a5bb1a7..c9e3141 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
43 [TestFixture] 43 [TestFixture]
44 public class SerialiserTests : OpenSimTestCase 44 public class SerialiserTests : OpenSimTestCase
45 { 45 {
46 private const string ObjectRootPartStubXml = 46 private const string ObjectRootPartStubXml =
47@"<SceneObjectGroup> 47@"<SceneObjectGroup>
48 <RootPart> 48 <RootPart>
49 <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> 49 <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
@@ -149,9 +149,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
149 <llsd> 149 <llsd>
150 <map> 150 <map>
151 <key>MyNamespace</key> 151 <key>MyNamespace</key>
152 <map> 152 <map>
153 <key>MyStore</key> 153 <key>MyStore</key>
154 <map> 154 <map>
155 <key>the answer</key> 155 <key>the answer</key>
156 <integer>42</integer> 156 <integer>42</integer>
157 </map> 157 </map>
@@ -162,12 +162,12 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
162 </SceneObjectPart> 162 </SceneObjectPart>
163 </RootPart>"; 163 </RootPart>";
164 164
165 private const string ObjectWithNoOtherPartsXml = ObjectRootPartStubXml + 165 private const string ObjectWithNoOtherPartsXml = ObjectRootPartStubXml +
166@" 166@"
167 <OtherParts /> 167 <OtherParts />
168</SceneObjectGroup>"; 168</SceneObjectGroup>";
169 169
170 private const string ObjectWithOtherPartsXml = ObjectRootPartStubXml + 170 private const string ObjectWithOtherPartsXml = ObjectRootPartStubXml +
171@" 171@"
172 <OtherParts> 172 <OtherParts>
173 <Part> 173 <Part>
@@ -574,9 +574,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
574 <llsd> 574 <llsd>
575 <map> 575 <map>
576 <key>MyNamespace</key> 576 <key>MyNamespace</key>
577 <map> 577 <map>
578 <key>MyStore</key> 578 <key>MyStore</key>
579 <map> 579 <map>
580 <key>last words</key> 580 <key>last words</key>
581 <string>Rosebud</string> 581 <string>Rosebud</string>
582 </map> 582 </map>
@@ -636,7 +636,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
636 Assert.That(part.Name, Is.EqualTo("PrimMyRide")); 636 Assert.That(part.Name, Is.EqualTo("PrimMyRide"));
637 OSDMap store = part.DynAttrs.GetStore("MyNamespace", "MyStore"); 637 OSDMap store = part.DynAttrs.GetStore("MyNamespace", "MyStore");
638 Assert.AreEqual(42, store["the answer"].AsInteger()); 638 Assert.AreEqual(42, store["the answer"].AsInteger());
639 } 639 }
640 640
641 { 641 {
642 SceneObjectPart part = parts[1]; 642 SceneObjectPart part = parts[1];
@@ -723,7 +723,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
723 xtr.ReadStartElement("SceneObjectGroup"); 723 xtr.ReadStartElement("SceneObjectGroup");
724 xtr.ReadStartElement("RootPart"); 724 xtr.ReadStartElement("RootPart");
725 xtr.ReadStartElement("SceneObjectPart"); 725 xtr.ReadStartElement("SceneObjectPart");
726 726
727 UUID uuid = UUID.Zero; 727 UUID uuid = UUID.Zero;
728 string name = null; 728 string name = null;
729 UUID creatorId = UUID.Zero; 729 UUID creatorId = UUID.Zero;
@@ -733,7 +733,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
733 { 733 {
734 if (xtr.NodeType != XmlNodeType.Element) 734 if (xtr.NodeType != XmlNodeType.Element)
735 continue; 735 continue;
736 736
737 switch (xtr.Name) 737 switch (xtr.Name)
738 { 738 {
739 case "UUID": 739 case "UUID":
@@ -833,7 +833,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
833 XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); 833 XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
834 xtr.ReadStartElement("SceneObjectGroup"); 834 xtr.ReadStartElement("SceneObjectGroup");
835 xtr.ReadStartElement("SceneObjectPart"); 835 xtr.ReadStartElement("SceneObjectPart");
836 836
837 UUID uuid = UUID.Zero; 837 UUID uuid = UUID.Zero;
838 string name = null; 838 string name = null;
839 UUID creatorId = UUID.Zero; 839 UUID creatorId = UUID.Zero;
@@ -843,7 +843,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
843 { 843 {
844 if (xtr.NodeType != XmlNodeType.Element) 844 if (xtr.NodeType != XmlNodeType.Element)
845 continue; 845 continue;
846 846
847 switch (xtr.Name) 847 switch (xtr.Name)
848 { 848 {
849 case "UUID": 849 case "UUID":
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index 45f3ccf..2b7db18 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
279 279
280 m_host.Sound = soundID; 280 m_host.Sound = soundID;
281 m_host.SoundGain = volume; 281 m_host.SoundGain = volume;
282 m_host.SoundFlags = iflags; 282 m_host.SoundFlags = iflags;
283 m_host.SoundRadius = radius; 283 m_host.SoundRadius = radius;
284 284
285 m_host.ScheduleFullUpdate(); 285 m_host.ScheduleFullUpdate();
@@ -309,14 +309,14 @@ namespace OpenSim.Region.CoreModules.World.Sound
309 else 309 else
310 { 310 {
311 byte bflags = 0; 311 byte bflags = 0;
312 312
313 if (isMaster) 313 if (isMaster)
314 bflags |= (byte)SoundFlags.SYNC_MASTER; 314 bflags |= (byte)SoundFlags.SYNC_MASTER;
315 // TODO check viewer seems to accept both 315 // TODO check viewer seems to accept both
316 if (useMaster) 316 if (useMaster)
317 bflags |= (byte)SoundFlags.SYNC_SLAVE; 317 bflags |= (byte)SoundFlags.SYNC_SLAVE;
318 PlayAttachedSound(soundID, part.OwnerID, part.UUID, volume, position, bflags, radius); 318 PlayAttachedSound(soundID, part.OwnerID, part.UUID, volume, position, bflags, radius);
319 } 319 }
320 } 320 }
321 321
322 public void TriggerSoundLimited(UUID objectID, UUID sound, 322 public void TriggerSoundLimited(UUID objectID, UUID sound,
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
index d0318eb..e2b3487 100644
--- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules
77 // Number of virtual days to a virtual year 77 // Number of virtual days to a virtual year
78 private int m_YearLengthDays = 0; 78 private int m_YearLengthDays = 0;
79 79
80 // Ratio of Daylight hours to Night time hours. This is accomplished by shifting the 80 // Ratio of Daylight hours to Night time hours. This is accomplished by shifting the
81 // sun's orbit above the horizon 81 // sun's orbit above the horizon
82 private double m_HorizonShift = 0; 82 private double m_HorizonShift = 0;
83 83
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules
162 // Determine the current "day" from current time, so we can use "today" 162 // Determine the current "day" from current time, so we can use "today"
163 // to determine Seasonal Tilt and what'not 163 // to determine Seasonal Tilt and what'not
164 164
165 // Integer math rounded is on purpose to drop fractional day, determines number 165 // Integer math rounded is on purpose to drop fractional day, determines number
166 // of virtual days since Epoch 166 // of virtual days since Epoch
167 PosTime = CurrentTime / SecondsPerSunCycle; 167 PosTime = CurrentTime / SecondsPerSunCycle;
168 168
@@ -343,7 +343,7 @@ namespace OpenSim.Region.CoreModules
343 m_log.Debug("[SUN]: Positional data updated every " + m_UpdateInterval + " frames"); 343 m_log.Debug("[SUN]: Positional data updated every " + m_UpdateInterval + " frames");
344 } 344 }
345 345
346 public Type ReplaceableInterface 346 public Type ReplaceableInterface
347 { 347 {
348 get { return null; } 348 get { return null; }
349 } 349 }
@@ -417,7 +417,7 @@ namespace OpenSim.Region.CoreModules
417 client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); 417 client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
418 } 418 }
419 } 419 }
420 } 420 }
421 421
422 public void SunUpdate() 422 public void SunUpdate()
423 { 423 {
@@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules
464 464
465 while (sunFixedHour < 0) 465 while (sunFixedHour < 0)
466 sunFixedHour += 24; 466 sunFixedHour += 24;
467 467
468 m_SunFixedHour = sunFixedHour; 468 m_SunFixedHour = sunFixedHour;
469 m_SunFixed = fixedSun; 469 m_SunFixed = fixedSun;
470 470
@@ -516,7 +516,7 @@ namespace OpenSim.Region.CoreModules
516 516
517 case "current_time": 517 case "current_time":
518 return GetCurrentTimeAsLindenSunHour(); 518 return GetCurrentTimeAsLindenSunHour();
519 519
520 default: 520 default:
521 throw new Exception("Unknown sun parameter."); 521 throw new Exception("Unknown sun parameter.");
522 } 522 }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index 1e67f72..bcd9dcd 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -247,4 +247,4 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
247 } 247 }
248} 248}
249 249
250 250
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
index 36c2bbf..d604dc7 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
@@ -104,10 +104,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
104 using (Bitmap gradientmapLd = new Bitmap("defaultstripe.png")) 104 using (Bitmap gradientmapLd = new Bitmap("defaultstripe.png"))
105 { 105 {
106 pallete = gradientmapLd.Height; 106 pallete = gradientmapLd.Height;
107 107
108 bmp = new Bitmap(map.Width, map.Height); 108 bmp = new Bitmap(map.Width, map.Height);
109 colours = new Color[pallete]; 109 colours = new Color[pallete];
110 110
111 for (int i = 0; i < pallete; i++) 111 for (int i = 0; i < pallete; i++)
112 { 112 {
113 colours[i] = gradientmapLd.GetPixel(0, i); 113 colours[i] = gradientmapLd.GetPixel(0, i);
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
index 59994e4..68d6ed2 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
@@ -275,6 +275,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
275 public bool SupportsTileSave() 275 public bool SupportsTileSave()
276 { 276 {
277 return false; 277 return false;
278 } 278 }
279 } 279 }
280} \ No newline at end of file 280} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs
index 6324aca..f7be25f 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
32{ 32{
33 public interface ITerrainFloodEffect 33 public interface ITerrainFloodEffect
34 { 34 {
35 void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength, 35 void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength,
36 int startX, int endX, int startY, int endY); 36 int startX, int endX, int startY, int endY);
37 } 37 }
38} \ No newline at end of file 38} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
index 3ba3657..855d131 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
33 public interface ITerrainLoader 33 public interface ITerrainLoader
34 { 34 {
35 // Returns true if that extension can be used for terrain save-tile 35 // Returns true if that extension can be used for terrain save-tile
36 // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders) 36 // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders)
37 bool SupportsTileSave(); 37 bool SupportsTileSave();
38 38
39 string FileExtension { get; } 39 string FileExtension { get; }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs
index 8937f63..9d3d4cb 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
77 { 77 {
78 map[x, y] += delta; 78 map[x, y] += delta;
79 } 79 }
80 80
81 } 81 }
82 } 82 }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs
index bbf9407..a88a022 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
58 map[x, y] = 0.0; 58 map[x, y] = 0.0;
59 else 59 else
60 map[x, y] = newz; 60 map[x, y] = newz;
61 } 61 }
62 } 62 }
63 } 63 }
64 64
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs
index 1b704bb..5305cb4 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
33 public class RaiseSphere : ITerrainPaintableEffect 33 public class RaiseSphere : ITerrainPaintableEffect
34 { 34 {
35 #region ITerrainPaintableEffect Members 35 #region ITerrainPaintableEffect Members
36 36
37 37
38 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, 38 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz,
39 double strength, double duration, int startX, int endX, int startY, int endY) 39 double strength, double duration, int startX, int endX, int startY, int endY)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs
index efc5324..ca30e9e 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
46 { 46 {
47 strength = TerrainUtil.MetersToSphericalStrength(strength); 47 strength = TerrainUtil.MetersToSphericalStrength(strength);
48 duration = 0.03; //MCP Should be read from ini file 48 duration = 0.03; //MCP Should be read from ini file
49 49
50 if (duration > 1.0) 50 if (duration > 1.0)
51 duration = 1.0; 51 duration = 1.0;
52 if (duration < 0) 52 if (duration < 0)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs
index 65dd0a6..0342962 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs
@@ -42,10 +42,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
42 int x, y; 42 int x, y;
43 double[,] tweak = new double[map.Width,map.Height]; 43 double[,] tweak = new double[map.Width,map.Height];
44 44
45 double area = strength; 45 double area = strength;
46 double step = strength / 4.0; 46 double step = strength / 4.0;
47 duration = 0.03; //MCP Should be read from ini file 47 duration = 0.03; //MCP Should be read from ini file
48 48
49 49
50 // compute delta map 50 // compute delta map
51 for (x = startX; x <= endX; x++) 51 for (x = startX; x <= endX; x++)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index e21681d..65d4c4a 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -218,7 +218,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
218 if (terrainConfig != null) 218 if (terrainConfig != null)
219 { 219 {
220 m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); 220 m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain);
221 m_sendTerrainUpdatesByViewDistance = 221 m_sendTerrainUpdatesByViewDistance =
222 terrainConfig.GetBoolean( 222 terrainConfig.GetBoolean(
223 "SendTerrainUpdatesByViewDistance",m_sendTerrainUpdatesByViewDistance); 223 "SendTerrainUpdatesByViewDistance",m_sendTerrainUpdatesByViewDistance);
224 } 224 }
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
240 if(m_baked != null) 240 if(m_baked != null)
241 m_channel = m_baked.MakeCopy(); 241 m_channel = m_baked.MakeCopy();
242 else 242 else
243 m_channel = new TerrainChannel(m_InitialTerrain, 243 m_channel = new TerrainChannel(m_InitialTerrain,
244 (int)m_scene.RegionInfo.RegionSizeX, 244 (int)m_scene.RegionInfo.RegionSizeX,
245 (int)m_scene.RegionInfo.RegionSizeY, 245 (int)m_scene.RegionInfo.RegionSizeY,
246 (int)m_scene.RegionInfo.RegionSizeZ); 246 (int)m_scene.RegionInfo.RegionSizeZ);
@@ -463,7 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
463 throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename)); 463 throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename));
464 } 464 }
465 465
466 public void LoadFromStream(string filename, Vector3 displacement, 466 public void LoadFromStream(string filename, Vector3 displacement,
467 float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream) 467 float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream)
468 { 468 {
469 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) 469 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders)
@@ -724,7 +724,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
724 724
725 /// <summary> 725 /// <summary>
726 /// Saves the current state of the region into the baked map buffer. 726 /// Saves the current state of the region into the baked map buffer.
727 727
728 /// </summary> 728 /// </summary>
729 public void UpdateBakedMap() 729 public void UpdateBakedMap()
730 { 730 {
@@ -825,7 +825,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
825 m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave); 825 m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave);
826 } 826 }
827 827
828 828
829 /// <summary> 829 /// <summary>
830 /// This is used to check to see of any of the terrain is tainted and, if so, schedule 830 /// This is used to check to see of any of the terrain is tainted and, if so, schedule
831 /// updates for all the presences. 831 /// updates for all the presences.
@@ -945,7 +945,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
945 lock (m_perClientPatchUpdates) 945 lock (m_perClientPatchUpdates)
946 m_perClientPatchUpdates.Remove(client); 946 m_perClientPatchUpdates.Remove(client);
947 } 947 }
948 948
949 /// <summary> 949 /// <summary>
950 /// Scan over changes in the terrain and limit height changes. This enforces the 950 /// Scan over changes in the terrain and limit height changes. This enforces the
951 /// non-estate owner limits on rate of terrain editting. 951 /// non-estate owner limits on rate of terrain editting.
@@ -1312,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1312 } 1312 }
1313 } 1313 }
1314 return ret; 1314 return ret;
1315 } 1315 }
1316 1316
1317 private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action, 1317 private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action,
1318 float north, float west, float south, float east, UUID agentId) 1318 float north, float west, float south, float east, UUID agentId)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs
index 0563ad0..6a832bc 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs
@@ -45,8 +45,8 @@ namespace OpenSim.Region.CoreModules.Terrain.Tests
45 //UUID userId = TestHelpers.ParseTail(0x1); 45 //UUID userId = TestHelpers.ParseTail(0x1);
46 46
47 TerrainModule tm = new TerrainModule(); 47 TerrainModule tm = new TerrainModule();
48 Scene scene = new SceneHelpers().SetupScene(); 48 Scene scene = new SceneHelpers().SetupScene();
49 SceneHelpers.SetupSceneModules(scene, tm); 49 SceneHelpers.SetupSceneModules(scene, tm);
50 50
51 // Fillheight of 30 51 // Fillheight of 30
52 { 52 {
diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs
index 3f5d375..04b6f00 100644
--- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs
+++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs
@@ -39,14 +39,14 @@ namespace OpenSim.Region.CoreModules.World.Vegetation
39{ 39{
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VegetationModule")] 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VegetationModule")]
41 public class VegetationModule : INonSharedRegionModule, IVegetationModule 41 public class VegetationModule : INonSharedRegionModule, IVegetationModule
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 protected Scene m_scene; 45 protected Scene m_scene;
46 46
47 protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree }; 47 protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree };
48 public PCode[] CreationCapabilities { get { return creationCapabilities; } } 48 public PCode[] CreationCapabilities { get { return creationCapabilities; } }
49 49
50 public void Initialise(IConfigSource source) 50 public void Initialise(IConfigSource source)
51 { 51 {
52 } 52 }
@@ -83,10 +83,10 @@ namespace OpenSim.Region.CoreModules.World.Vegetation
83 treeShape.PCode = newTree ? (byte)PCode.NewTree : (byte)PCode.Tree; 83 treeShape.PCode = newTree ? (byte)PCode.NewTree : (byte)PCode.Tree;
84 treeShape.Scale = scale; 84 treeShape.Scale = scale;
85 treeShape.State = (byte)treeType; 85 treeShape.State = (byte)treeType;
86 86
87 return m_scene.AddNewPrim(uuid, groupID, position, rotation, treeShape); 87 return m_scene.AddNewPrim(uuid, groupID, position, rotation, treeShape);
88 } 88 }
89 89
90 public SceneObjectGroup CreateEntity( 90 public SceneObjectGroup CreateEntity(
91 UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) 91 UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
92 { 92 {
@@ -95,22 +95,22 @@ namespace OpenSim.Region.CoreModules.World.Vegetation
95 m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name); 95 m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name);
96 return null; 96 return null;
97 } 97 }
98 98
99 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); 99 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
100 SceneObjectPart rootPart = sceneObject.GetPart(sceneObject.UUID); 100 SceneObjectPart rootPart = sceneObject.GetPart(sceneObject.UUID);
101 101
102 // if grass or tree, make phantom 102 // if grass or tree, make phantom
103 //rootPart.TrimPermissions(); 103 //rootPart.TrimPermissions();
104 rootPart.AddFlag(PrimFlags.Phantom); 104 rootPart.AddFlag(PrimFlags.Phantom);
105 if (rootPart.Shape.PCode != (byte)PCode.Grass) 105 if (rootPart.Shape.PCode != (byte)PCode.Grass)
106 AdaptTree(ref shape); 106 AdaptTree(ref shape);
107 107
108 m_scene.AddNewSceneObject(sceneObject, true); 108 m_scene.AddNewSceneObject(sceneObject, true);
109 sceneObject.SetGroup(groupID, null); 109 sceneObject.SetGroup(groupID, null);
110 110
111 return sceneObject; 111 return sceneObject;
112 } 112 }
113 113
114 protected void AdaptTree(ref PrimitiveBaseShape tree) 114 protected void AdaptTree(ref PrimitiveBaseShape tree)
115 { 115 {
116 // Tree size has to be adapted depending on its type 116 // Tree size has to be adapted depending on its type
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
index 4719ba3..226b330 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
226 float pctX = (float)x / 255f; 226 float pctX = (float)x / 255f;
227 float pctY = (float)y / 255f; 227 float pctY = (float)y / 255f;
228 228
229 // Use bilinear interpolation between the four corners of start height and 229 // Use bilinear interpolation between the four corners of start height and
230 // height range to select the current values at this position 230 // height range to select the current values at this position
231 float startHeight = ImageUtils.Bilinear( 231 float startHeight = ImageUtils.Bilinear(
232 startHeights[0], 232 startHeights[0],
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
257 float highFreq = Perlin.turbulence2(vec.X, vec.Y, 2f) * 2.25f; 257 float highFreq = Perlin.turbulence2(vec.X, vec.Y, 2f) * 2.25f;
258 float noise = (lowFreq + highFreq) * 2f; 258 float noise = (lowFreq + highFreq) * 2f;
259 259
260 // Combine the current height, generated noise, start height, and height range parameters, then scale all of it 260 // Combine the current height, generated noise, start height, and height range parameters, then scale all of it
261 float layer = ((height + noise - startHeight) / heightRange) * 4f; 261 float layer = ((height + noise - startHeight) / heightRange) * 4f;
262 if (Single.IsNaN(layer)) 262 if (Single.IsNaN(layer))
263 layer = 0f; 263 layer = 0f;
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
index cb37067..4934ebd 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
96 96
97 m_Enabled = true; 97 m_Enabled = true;
98 98
99 m_drawPrimVolume 99 m_drawPrimVolume
100 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume); 100 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume);
101 m_textureTerrain 101 m_textureTerrain
102 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain); 102 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain);
103 m_texturePrims 103 m_texturePrims
104 = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims); 104 = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims);
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
277 m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f); 277 m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f);
278 278
279 warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR)); 279 warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR));
280 waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif 280 waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif
281 waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); 281 waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
282 renderer.Scene.addMaterial("WaterColor", waterColorMaterial); 282 renderer.Scene.addMaterial("WaterColor", waterColorMaterial);
283 renderer.SetObjectMaterial("Water", "WaterColor"); 283 renderer.SetObjectMaterial("Water", "WaterColor");
@@ -292,7 +292,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
292 292
293 float regionsx = m_scene.RegionInfo.RegionSizeX; 293 float regionsx = m_scene.RegionInfo.RegionSizeX;
294 float regionsy = m_scene.RegionInfo.RegionSizeY; 294 float regionsy = m_scene.RegionInfo.RegionSizeY;
295 295
296 // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding 296 // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding
297 float diff = regionsx / 256f; 297 float diff = regionsx / 256f;
298 298
@@ -377,7 +377,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
377 warp_Material material = new warp_Material(texture); 377 warp_Material material = new warp_Material(texture);
378 material.setReflectivity(50); 378 material.setReflectivity(50);
379 renderer.Scene.addMaterial("TerrainColor", material); 379 renderer.Scene.addMaterial("TerrainColor", material);
380 renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif 380 renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif
381 renderer.SetObjectMaterial("Terrain", "TerrainColor"); 381 renderer.SetObjectMaterial("Terrain", "TerrainColor");
382 } 382 }
383 383
@@ -530,7 +530,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
530 530
531 if (!fetched) 531 if (!fetched)
532 { 532 {
533 // Fetch the texture, decode and get the average color, 533 // Fetch the texture, decode and get the average color,
534 // then save it to a temporary metadata asset 534 // then save it to a temporary metadata asset
535 AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); 535 AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString());
536 if (textureAsset != null) 536 if (textureAsset != null)
@@ -616,7 +616,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
616 catch (Exception e) 616 catch (Exception e)
617 { 617 {
618 m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); 618 m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e);
619 } 619 }
620 } 620 }
621 621
622 return ret; 622 return ret;
@@ -678,10 +678,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
678 { 678 {
679 width = bitmap.Width; 679 width = bitmap.Width;
680 height = bitmap.Height; 680 height = bitmap.Height;
681 681
682 BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat); 682 BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
683 pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4; 683 pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4;
684 684
685 // Sum up the individual channels 685 // Sum up the individual channels
686 unsafe 686 unsafe
687 { 687 {
@@ -690,7 +690,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
690 for (int y = 0; y < height; y++) 690 for (int y = 0; y < height; y++)
691 { 691 {
692 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); 692 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride);
693 693
694 for (int x = 0; x < width; x++) 694 for (int x = 0; x < width; x++)
695 { 695 {
696 b += row[x * pixelBytes + 0]; 696 b += row[x * pixelBytes + 0];
@@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
705 for (int y = 0; y < height; y++) 705 for (int y = 0; y < height; y++)
706 { 706 {
707 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); 707 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride);
708 708
709 for (int x = 0; x < width; x++) 709 for (int x = 0; x < width; x++)
710 { 710 {
711 b += row[x * pixelBytes + 0]; 711 b += row[x * pixelBytes + 0];
diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs
index 65691fe..a2b44df 100644
--- a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs
+++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
50 private float m_avgDirection = 0.0f; // Average direction of the wind in degrees 50 private float m_avgDirection = 0.0f; // Average direction of the wind in degrees
51 private float m_varStrength = 5.0f; // Max Strength Variance 51 private float m_varStrength = 5.0f; // Max Strength Variance
52 private float m_varDirection = 30.0f;// Max Direction Variance 52 private float m_varDirection = 30.0f;// Max Direction Variance
53 private float m_rateChange = 1.0f; // 53 private float m_rateChange = 1.0f; //
54 54
55 private Vector2 m_curPredominateWind = new Vector2(); 55 private Vector2 m_curPredominateWind = new Vector2();
56 56
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
70 70
71 public void Initialise() 71 public void Initialise()
72 { 72 {
73 73
74 } 74 }
75 75
76 #endregion 76 #endregion
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
111 // Prevailing wind algorithm 111 // Prevailing wind algorithm
112 // Inspired by Kanker Greenacre 112 // Inspired by Kanker Greenacre
113 113
114 // TODO: 114 // TODO:
115 // * This should probably be based on in-world time. 115 // * This should probably be based on in-world time.
116 // * should probably move all these local variables to class members and constants 116 // * should probably move all these local variables to class members and constants
117 double time = DateTime.Now.TimeOfDay.Seconds / 86400.0f; 117 double time = DateTime.Now.TimeOfDay.Seconds / 86400.0f;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
125 offset = Math.Sin(theta) * Math.Sin(theta*4) + (Math.Sin(theta*13) / 3); 125 offset = Math.Sin(theta) * Math.Sin(theta*4) + (Math.Sin(theta*13) / 3);
126 double windSpeed = m_avgStrength + (m_varStrength * offset); 126 double windSpeed = m_avgStrength + (m_varStrength * offset);
127 127
128 if (windSpeed < 0) 128 if (windSpeed < 0)
129 windSpeed = -windSpeed; 129 windSpeed = -windSpeed;
130 130
131 m_curPredominateWind.X = (float)Math.Cos(windDir); 131 m_curPredominateWind.X = (float)Math.Cos(windDir);
@@ -157,9 +157,9 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
157 157
158 public string Description 158 public string Description
159 { 159 {
160 get 160 get
161 { 161 {
162 return "Provides a predominate wind direction that can change within configured variances for direction and speed."; 162 return "Provides a predominate wind direction that can change within configured variances for direction and speed.";
163 } 163 }
164 } 164 }
165 165
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs
index 95cf57d..a1fff62 100644
--- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs
+++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules
155 // Register event handlers for when Avatars enter the region, and frame ticks 155 // Register event handlers for when Avatars enter the region, and frame ticks
156 m_scene.EventManager.OnFrame += WindUpdate; 156 m_scene.EventManager.OnFrame += WindUpdate;
157 157
158 // Register the wind module 158 // Register the wind module
159 m_scene.RegisterModuleInterface<IWindModule>(this); 159 m_scene.RegisterModuleInterface<IWindModule>(this);
160 160
161 // Generate initial wind values 161 // Generate initial wind values
@@ -351,7 +351,7 @@ namespace OpenSim.Region.CoreModules
351 #region IWindModule Methods 351 #region IWindModule Methods
352 352
353 /// <summary> 353 /// <summary>
354 /// Retrieve the wind speed at the given region coordinate. This 354 /// Retrieve the wind speed at the given region coordinate. This
355 /// implimentation ignores Z. 355 /// implimentation ignores Z.
356 /// </summary> 356 /// </summary>
357 /// <param name="x">0...255</param> 357 /// <param name="x">0...255</param>
@@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules
396 396
397 public string WindActiveModelPluginName 397 public string WindActiveModelPluginName
398 { 398 {
399 get 399 get
400 { 400 {
401 if (m_activeWindPlugin != null) 401 if (m_activeWindPlugin != null)
402 { 402 {
@@ -429,7 +429,7 @@ namespace OpenSim.Region.CoreModules
429 { 429 {
430 client.SendWindData(m_dataVersion, windSpeeds); 430 client.SendWindData(m_dataVersion, windSpeeds);
431 }); 431 });
432 432
433 } 433 }
434 finally 434 finally
435 { 435 {
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules
440 } 440 }
441 441
442 /// <summary> 442 /// <summary>
443 /// Calculate new wind 443 /// Calculate new wind
444 /// returns false if no change 444 /// returns false if no change
445 /// </summary> 445 /// </summary>
446 446
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index fb63c6a..5876df3 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
186 // remoteClient.SendAlertMessage("Hyperlink could not be established."); 186 // remoteClient.SendAlertMessage("Hyperlink could not be established.");
187 187
188 //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); 188 //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count);
189 189
190 MapBlockData data; 190 MapBlockData data;
191 if (regionInfos != null && regionInfos.Count > 0) 191 if (regionInfos != null && regionInfos.Count > 0)
192 { 192 {
@@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
214 // send extra user messages for V3 214 // send extra user messages for V3
215 // because the UI is very confusing 215 // because the UI is very confusing
216 // while we don't fix the hard-coded urls 216 // while we don't fix the hard-coded urls
217 if (flags == 2) 217 if (flags == 2)
218 { 218 {
219 if (regionInfos == null || regionInfos.Count == 0) 219 if (regionInfos == null || regionInfos.Count == 0)
220 remoteClient.SendAgentAlertMessage("No regions found with that name.", true); 220 remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index c249e9d..5dcf326 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
68 private static readonly UUID STOP_UUID = UUID.Random(); 68 private static readonly UUID STOP_UUID = UUID.Random();
69 69
70 private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>(); 70 private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>();
71 71
72 private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false); 72 private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false);
73 private Dictionary<UUID, Queue<MapBlockRequestData>> m_mapBlockRequests = new Dictionary<UUID, Queue<MapBlockRequestData>>(); 73 private Dictionary<UUID, Queue<MapBlockRequestData>> m_mapBlockRequests = new Dictionary<UUID, Queue<MapBlockRequestData>>();
74 74
@@ -729,7 +729,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
729 break; 729 break;
730 730
731 // agent gone? 731 // agent gone?
732 732
733 m_scene.TryGetScenePresence(st.agentID, out av); 733 m_scene.TryGetScenePresence(st.agentID, out av);
734 if (av == null || av.IsChildAgent || av.IsDeleted || av.IsInTransit) 734 if (av == null || av.IsChildAgent || av.IsDeleted || av.IsInTransit)
735 continue; 735 continue;
@@ -748,7 +748,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
748 { 748 {
749 m_cachedRegionMapItemsResponses.TryGetValue(st.regionhandle, out responseMap); 749 m_cachedRegionMapItemsResponses.TryGetValue(st.regionhandle, out responseMap);
750 dorequest = false; 750 dorequest = false;
751 } 751 }
752 else 752 else
753 m_cachedRegionMapItemsResponses.Add(st.regionhandle, null, expireResponsesTime); // a bit more time for the access 753 m_cachedRegionMapItemsResponses.Add(st.regionhandle, null, expireResponsesTime); // a bit more time for the access
754 } 754 }
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1133 if(m_mapBlockRequests[agentID].Count < 150 ) 1133 if(m_mapBlockRequests[agentID].Count < 150 )
1134 m_mapBlockRequests[agentID].Enqueue(req); 1134 m_mapBlockRequests[agentID].Enqueue(req);
1135 else 1135 else
1136 { 1136 {
1137 spamBlocked[agentID] = now + SPAMBLOCKTIMEms; 1137 spamBlocked[agentID] = now + SPAMBLOCKTIMEms;
1138 m_log.DebugFormat("[WoldMapModule] RequestMapBlocks blocking spammer {0} for {1} s",agentID, SPAMBLOCKTIMEms/1000.0); 1138 m_log.DebugFormat("[WoldMapModule] RequestMapBlocks blocking spammer {0} for {1} s",agentID, SPAMBLOCKTIMEms/1000.0);
1139 } 1139 }
@@ -1193,7 +1193,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1193 maxY * (int)Constants.RegionSize); 1193 maxY * (int)Constants.RegionSize);
1194 1194
1195 // only send a negative answer for a single region request 1195 // only send a negative answer for a single region request
1196 // corresponding to a click on the map. Current viewers 1196 // corresponding to a click on the map. Current viewers
1197 // keep displaying "loading.." without this 1197 // keep displaying "loading.." without this
1198 if (regions.Count == 0 && (flag & 0x10000) != 0 && minX == maxX && minY == maxY) 1198 if (regions.Count == 0 && (flag & 0x10000) != 0 && minX == maxX && minY == maxY)
1199 { 1199 {
@@ -1539,7 +1539,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1539 responsemap["10"] = responsearr; 1539 responsemap["10"] = responsearr;
1540 else 1540 else
1541 responsemap["7"] = responsearr; 1541 responsemap["7"] = responsearr;
1542 } 1542 }
1543 } 1543 }
1544 1544
1545 if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) 1545 if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
diff --git a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
index e0aad2b..b8278d6 100644
--- a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Framework.Interfaces
39 bool HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, 39 bool HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
40 uint callbackID, string description, string name, sbyte invType, 40 uint callbackID, string description, string name, sbyte invType,
41 sbyte type, byte wearableType, uint nextOwnerMask); 41 sbyte type, byte wearableType, uint nextOwnerMask);
42 42
43 void HandleTaskItemUpdateFromTransaction( 43 void HandleTaskItemUpdateFromTransaction(
44 IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item); 44 IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item);
45 45
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index b008068..2f5ff9b 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Interfaces
112 /// <param name="sp"></param> 112 /// <param name="sp"></param>
113 /// <param name="rezlist"></param> 113 /// <param name="rezlist"></param>
114 void RezMultipleAttachmentsFromInventory(IScenePresence sp,List<KeyValuePair<UUID, uint>> rezlist); 114 void RezMultipleAttachmentsFromInventory(IScenePresence sp,List<KeyValuePair<UUID, uint>> rezlist);
115 115
116 /// <summary> 116 /// <summary>
117 /// Detach the given item to the ground. 117 /// Detach the given item to the ground.
118 /// </summary> 118 /// </summary>
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Interfaces
135 /// <param name="sp">/param> 135 /// <param name="sp">/param>
136 /// <param name="grp">The attachment to detach.</param> 136 /// <param name="grp">The attachment to detach.</param>
137 void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp); 137 void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp);
138 138
139 /// Update the position of an attachment. 139 /// Update the position of an attachment.
140 /// </summary> 140 /// </summary>
141 /// <param name="sog"></param> 141 /// <param name="sog"></param>
diff --git a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
index d1ce4c0..1bbf10e 100644
--- a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
@@ -31,7 +31,7 @@ using OpenSim.Framework;
31namespace OpenSim.Region.Framework.Interfaces 31namespace OpenSim.Region.Framework.Interfaces
32{ 32{
33 public interface IBuySellModule 33 public interface IBuySellModule
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// Try to buy an object 36 /// Try to buy an object
37 /// </summary> 37 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs
index 30d404e..761b1bb 100644
--- a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs
@@ -41,13 +41,13 @@ namespace OpenSim.Region.Framework.Interfaces
41 /// <param name="agentId"></param> 41 /// <param name="agentId"></param>
42 /// <param name="capsObjectPath"></param> 42 /// <param name="capsObjectPath"></param>
43 void CreateCaps(UUID agentId, uint circuitCode); 43 void CreateCaps(UUID agentId, uint circuitCode);
44 44
45 /// <summary> 45 /// <summary>
46 /// Remove the caps handler for a given agent. 46 /// Remove the caps handler for a given agent.
47 /// </summary> 47 /// </summary>
48 /// <param name="agentId"></param> 48 /// <param name="agentId"></param>
49 void RemoveCaps(UUID agentId, uint circuitCode); 49 void RemoveCaps(UUID agentId, uint circuitCode);
50 50
51 /// <summary> 51 /// <summary>
52 /// Will return null if the agent doesn't have a caps handler registered 52 /// Will return null if the agent doesn't have a caps handler registered
53 /// </summary> 53 /// </summary>
@@ -55,13 +55,13 @@ namespace OpenSim.Region.Framework.Interfaces
55 Caps GetCapsForUser(uint circuitCode); 55 Caps GetCapsForUser(uint circuitCode);
56 56
57 void SetAgentCapsSeeds(AgentCircuitData agent); 57 void SetAgentCapsSeeds(AgentCircuitData agent);
58 58
59 Dictionary<ulong, string> GetChildrenSeeds(UUID agentID); 59 Dictionary<ulong, string> GetChildrenSeeds(UUID agentID);
60 60
61 string GetChildSeed(UUID agentID, ulong handle); 61 string GetChildSeed(UUID agentID, ulong handle);
62 62
63 void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds); 63 void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds);
64 64
65 void DropChildSeed(UUID agentID, ulong handle); 65 void DropChildSeed(UUID agentID, ulong handle);
66 66
67 string GetCapsPath(UUID agentId); 67 string GetCapsPath(UUID agentId);
diff --git a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
index 54172bd..a73b564 100644
--- a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
@@ -27,7 +27,7 @@
27 27
28namespace OpenSim.Region.Framework.Interfaces 28namespace OpenSim.Region.Framework.Interfaces
29{ 29{
30 public interface ICloudModule 30 public interface ICloudModule
31 { 31 {
32 /// <summary> 32 /// <summary>
33 /// Retrieves the cloud density at the given region coordinates 33 /// Retrieves the cloud density at the given region coordinates
diff --git a/OpenSim/Region/Framework/Interfaces/ICommander.cs b/OpenSim/Region/Framework/Interfaces/ICommander.cs
index 6b872c1..5d6428a 100644
--- a/OpenSim/Region/Framework/Interfaces/ICommander.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICommander.cs
@@ -40,12 +40,12 @@ namespace OpenSim.Region.Framework.Interfaces
40 /// Provide general help information about this commander. 40 /// Provide general help information about this commander.
41 /// </value> 41 /// </value>
42 string Help { get; } 42 string Help { get; }
43 43
44 /// <summary> 44 /// <summary>
45 /// The commands available for this commander 45 /// The commands available for this commander
46 /// </summary> 46 /// </summary>
47 Dictionary<string, ICommand> Commands { get; } 47 Dictionary<string, ICommand> Commands { get; }
48 48
49 void ProcessConsoleCommand(string function, string[] args); 49 void ProcessConsoleCommand(string function, string[] args);
50 void RegisterCommand(string commandName, ICommand command); 50 void RegisterCommand(string commandName, ICommand command);
51 void Run(string function, object[] args); 51 void Run(string function, object[] args);
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
index 7684ce3..1ff8fd2 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Framework.Interfaces
36 36
37 public abstract class FloaterData 37 public abstract class FloaterData
38 { 38 {
39 public abstract int Channel { get; } 39 public abstract int Channel { get; }
40 public abstract string FloaterName { get; set; } 40 public abstract string FloaterName { get; set; }
41 public virtual string XmlName { get; set; } 41 public virtual string XmlName { get; set; }
42 public virtual string XmlText { get; set; } 42 public virtual string XmlText { get; set; }
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
index 6df5cc2..441076d 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Interfaces
112 UUID AddDynamicTextureData( 112 UUID AddDynamicTextureData(
113 UUID simID, UUID primID, string contentType, string data, string extraParams, 113 UUID simID, UUID primID, string contentType, string data, string extraParams,
114 int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); 114 int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face);
115 115
116 void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, 116 void GetDrawStringSize(string contentType, string text, string fontName, int fontSize,
117 out double xSize, out double ySize); 117 out double xSize, out double ySize);
118 } 118 }
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Interfaces
140 bool AsyncConvertUrl(UUID id, string url, string extraParams); 140 bool AsyncConvertUrl(UUID id, string url, string extraParams);
141 bool AsyncConvertData(UUID id, string bodyData, string extraParams); 141 bool AsyncConvertData(UUID id, string bodyData, string extraParams);
142 142
143 void GetDrawStringSize(string text, string fontName, int fontSize, 143 void GetDrawStringSize(string text, string fontName, int fontSize,
144 out double xSize, out double ySize); 144 out double xSize, out double ySize);
145 } 145 }
146 146
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs b/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs
index c39627c..1df6486 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Interfaces
41 /// </summary> 41 /// </summary>
42 /// <returns></returns> 42 /// <returns></returns>
43 PCode[] CreationCapabilities { get; } 43 PCode[] CreationCapabilities { get; }
44 44
45 /// <summary> 45 /// <summary>
46 /// Create an entity 46 /// Create an entity
47 /// </summary> 47 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
index b85fd8b..0c4017e 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
@@ -36,8 +36,8 @@ namespace OpenSim.Region.Framework.Interfaces
36 /// <summary> 36 /// <summary>
37 /// Interface to an entity's (SceneObjectPart's) inventory 37 /// Interface to an entity's (SceneObjectPart's) inventory
38 /// </summary> 38 /// </summary>
39 /// 39 ///
40 /// This is not a finished 1.0 candidate interface 40 /// This is not a finished 1.0 candidate interface
41 public interface IEntityInventory 41 public interface IEntityInventory
42 { 42 {
43 /// <summary> 43 /// <summary>
@@ -48,21 +48,21 @@ namespace OpenSim.Region.Framework.Interfaces
48 /// <summary> 48 /// <summary>
49 /// Reset UUIDs for all the items in the prim's inventory. 49 /// Reset UUIDs for all the items in the prim's inventory.
50 /// </summary> 50 /// </summary>
51 /// 51 ///
52 /// This involves either generating 52 /// This involves either generating
53 /// new ones or setting existing UUIDs to the correct parent UUIDs. 53 /// new ones or setting existing UUIDs to the correct parent UUIDs.
54 /// 54 ///
55 /// If this method is called and there are inventory items, then we regard the inventory as having changed. 55 /// If this method is called and there are inventory items, then we regard the inventory as having changed.
56 /// 56 ///
57 /// <param name="linkNum">Link number for the part</param> 57 /// <param name="linkNum">Link number for the part</param>
58 void ResetInventoryIDs(); 58 void ResetInventoryIDs();
59 59
60 /// <summary> 60 /// <summary>
61 /// Reset parent object UUID for all the items in the prim's inventory. 61 /// Reset parent object UUID for all the items in the prim's inventory.
62 /// </summary> 62 /// </summary>
63 /// 63 ///
64 /// If this method is called and there are inventory items, then we regard the inventory as having changed. 64 /// If this method is called and there are inventory items, then we regard the inventory as having changed.
65 /// 65 ///
66 /// <param name="linkNum">Link number for the part</param> 66 /// <param name="linkNum">Link number for the part</param>
67 void ResetObjectID(); 67 void ResetObjectID();
68 68
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Interfaces
87 /// <param name="stateSource"></param> 87 /// <param name="stateSource"></param>
88 /// <returns>Number of scripts started.</returns> 88 /// <returns>Number of scripts started.</returns>
89 int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource); 89 int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource);
90 90
91 ArrayList GetScriptErrors(UUID itemID); 91 ArrayList GetScriptErrors(UUID itemID);
92 void ResumeScripts(); 92 void ResumeScripts();
93 93
@@ -238,10 +238,10 @@ namespace OpenSim.Region.Framework.Interfaces
238 /// <summary> 238 /// <summary>
239 /// Get the scene object(s) referenced by an inventory item. 239 /// Get the scene object(s) referenced by an inventory item.
240 /// </summary> 240 /// </summary>
241 /// 241 ///
242 /// This is returned in a 'rez ready' state. That is, name, description, permissions and other details have 242 /// This is returned in a 'rez ready' state. That is, name, description, permissions and other details have
243 /// been adjusted to reflect the part and item from which it originates. 243 /// been adjusted to reflect the part and item from which it originates.
244 /// 244 ///
245 /// <param name="item">Inventory item</param> 245 /// <param name="item">Inventory item</param>
246 /// <param name="objlist">The scene objects</param> 246 /// <param name="objlist">The scene objects</param>
247 /// <param name="veclist">Relative offsets for each object</param> 247 /// <param name="veclist">Relative offsets for each object</param>
@@ -312,7 +312,7 @@ namespace OpenSim.Region.Framework.Interfaces
312 /// </summary> 312 /// </summary>
313 /// <returns></returns> 313 /// <returns></returns>
314 List<UUID> GetInventoryList(); 314 List<UUID> GetInventoryList();
315 315
316 /// <summary> 316 /// <summary>
317 /// Get the xml representing the saved states of scripts in this inventory. 317 /// Get the xml representing the saved states of scripts in this inventory.
318 /// </summary> 318 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index d172780..9585082 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Interfaces
83 /// </summary> 83 /// </summary>
84 /// <param name='id'>The agent ID</para></param> 84 /// <param name='id'>The agent ID</para></param>
85 /// <returns>true if the agent is in the process of being teleported, false otherwise.</returns> 85 /// <returns>true if the agent is in the process of being teleported, false otherwise.</returns>
86 bool IsInTransit(UUID id); 86 bool IsInTransit(UUID id);
87 87
88 bool Cross(ScenePresence agent, bool isFlying); 88 bool Cross(ScenePresence agent, bool isFlying);
89 89
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Framework.Interfaces
95 95
96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx, 96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx,
97 out Vector3 newpos, out string reason); 97 out Vector3 newpos, out string reason);
98 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos); 98 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos);
99 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, EntityTransferContext ctx, out string reason); 99 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, EntityTransferContext ctx, out string reason);
100 100
101 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts); 101 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts);
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
index 3f54ea5..7af56cb 100644
--- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Framework.Interfaces
41 // These are required to decouple Scenes from EventQueueHelper 41 // These are required to decouple Scenes from EventQueueHelper
42 void DisableSimulator(ulong handle, UUID avatarID); 42 void DisableSimulator(ulong handle, UUID avatarID);
43 void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY); 43 void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY);
44 void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, 44 void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint,
45 string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY); 45 string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY);
46 void TeleportFinishEvent(ulong regionHandle, byte simAccess, 46 void TeleportFinishEvent(ulong regionHandle, byte simAccess,
47 IPEndPoint regionExternalEndPoint, 47 IPEndPoint regionExternalEndPoint,
48 uint locationID, uint flags, string capsURL, 48 uint locationID, uint flags, string capsURL,
49 UUID agentID, int regionSizeX, int regionSizeY); 49 UUID agentID, int regionSizeX, int regionSizeY);
50 void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, 50 void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
51 IPEndPoint newRegionExternalEndPoint, 51 IPEndPoint newRegionExternalEndPoint,
diff --git a/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs b/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs
index a730cfd..4ce150f 100644
--- a/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces
37 /// <summary> 37 /// <summary>
38 /// This function extends the simple URL configuration in the caps handlers 38 /// This function extends the simple URL configuration in the caps handlers
39 /// to facilitate more interesting computation when an external handler is 39 /// to facilitate more interesting computation when an external handler is
40 /// sent to the viewer. 40 /// sent to the viewer.
41 /// </summary> 41 /// </summary>
42 /// <param name="agentID">New user UUID</param> 42 /// <param name="agentID">New user UUID</param>
43 /// <param name="caps">Internal caps registry, where the external handler will be registered</param> 43 /// <param name="caps">Internal caps registry, where the external handler will be registered</param>
diff --git a/OpenSim/Region/Framework/Interfaces/IGodsModule.cs b/OpenSim/Region/Framework/Interfaces/IGodsModule.cs
index 1cb9a30..52615e3 100644
--- a/OpenSim/Region/Framework/Interfaces/IGodsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGodsModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Interfaces
44 /// <param name="godLike"></param> 44 /// <param name="godLike"></param>
45 /// <param name="controllingClient"></param> 45 /// <param name="controllingClient"></param>
46 void RequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike); 46 void RequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike);
47 47
48 /// <summary> 48 /// <summary>
49 /// Kicks User specified from the simulator. This logs them off of the grid. 49 /// Kicks User specified from the simulator. This logs them off of the grid.
50 /// </summary> 50 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
index 7dc1552..46d6863 100644
--- a/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
@@ -34,9 +34,9 @@ namespace OpenSim.Region.Framework.Interfaces
34 /// <summary> 34 /// <summary>
35 /// Provide mechanisms for messaging groups. 35 /// Provide mechanisms for messaging groups.
36 /// </summary> 36 /// </summary>
37 /// 37 ///
38 /// TODO: Provide a mechanism for receiving group messages as well as sending them 38 /// TODO: Provide a mechanism for receiving group messages as well as sending them
39 /// 39 ///
40 public interface IGroupsMessagingModule 40 public interface IGroupsMessagingModule
41 { 41 {
42 /// <summary> 42 /// <summary>
@@ -56,13 +56,13 @@ namespace OpenSim.Region.Framework.Interfaces
56 /// True if the chat session was started successfully, false otherwise. 56 /// True if the chat session was started successfully, false otherwise.
57 /// </returns> 57 /// </returns>
58 bool StartGroupChatSession(UUID agentID, UUID groupID); 58 bool StartGroupChatSession(UUID agentID, UUID groupID);
59 59
60 /// <summary> 60 /// <summary>
61 /// Send a message to each member of a group whose chat session is active. 61 /// Send a message to each member of a group whose chat session is active.
62 /// </summary> 62 /// </summary>
63 /// <param name="im"> 63 /// <param name="im">
64 /// The message itself. The fields that must be populated are 64 /// The message itself. The fields that must be populated are
65 /// 65 ///
66 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical) 66 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical)
67 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog 67 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog
68 /// message - The message itself 68 /// message - The message itself
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Interfaces
76 /// </summary> 76 /// </summary>
77 /// <param name="im"> 77 /// <param name="im">
78 /// The message itself. The fields that must be populated are 78 /// The message itself. The fields that must be populated are
79 /// 79 ///
80 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical) 80 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical)
81 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog 81 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog
82 /// message - The message itself 82 /// message - The message itself
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Framework.Interfaces
84 /// </param> 84 /// </param>
85 /// <param name="groupID"></param> 85 /// <param name="groupID"></param>
86 /// <param name="sendingAgentForGroupCalls"> 86 /// <param name="sendingAgentForGroupCalls">
87 /// The requesting agent to use when querying the groups service. Sometimes this is different from 87 /// The requesting agent to use when querying the groups service. Sometimes this is different from
88 /// im.fromAgentID, with group notices, for example. 88 /// im.fromAgentID, with group notices, for example.
89 /// </param> 89 /// </param>
90 /// <param name="sendCondition"> 90 /// <param name="sendCondition">
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
index 110cb00..0d1f4f4 100644
--- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Interfaces
51 /// <param name="maturePublish"></param> 51 /// <param name="maturePublish"></param>
52 /// <returns>The UUID of the created group</returns> 52 /// <returns>The UUID of the created group</returns>
53 UUID CreateGroup( 53 UUID CreateGroup(
54 IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, 54 IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee,
55 bool openEnrollment, bool allowPublish, bool maturePublish); 55 bool openEnrollment, bool allowPublish, bool maturePublish);
56 56
57 /// <summary> 57 /// <summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Interfaces
67 /// <param name="GroupID">ID of the group</param> 67 /// <param name="GroupID">ID of the group</param>
68 /// <returns>The group's data. Null if there is no such group.</returns> 68 /// <returns>The group's data. Null if there is no such group.</returns>
69 GroupRecord GetGroupRecord(UUID GroupID); 69 GroupRecord GetGroupRecord(UUID GroupID);
70 70
71 void ActivateGroup(IClientAPI remoteClient, UUID groupID); 71 void ActivateGroup(IClientAPI remoteClient, UUID groupID);
72 List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID); 72 List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID);
73 List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID); 73 List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Interfaces
83 void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); 83 void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile);
84 84
85 void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); 85 void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
86 86
87 GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); 87 GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
88 string GetGroupTitle(UUID avatarID); 88 string GetGroupTitle(UUID avatarID);
89 void GroupRoleUpdate(IClientAPI remoteClient, UUID GroupID, UUID RoleID, string name, string description, string title, ulong powers, byte updateType); 89 void GroupRoleUpdate(IClientAPI remoteClient, UUID GroupID, UUID RoleID, string name, string description, string title, ulong powers, byte updateType);
diff --git a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs
index efc9ddc..978c248 100644
--- a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs
+++ b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Interfaces
77 /// then returned via IServiceRequest when the response is asynchronously fetched. 77 /// then returned via IServiceRequest when the response is asynchronously fetched.
78 /// </param> 78 /// </param>
79 UUID StartHttpRequest( 79 UUID StartHttpRequest(
80 uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body, 80 uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body,
81 out HttpInitialRequestStatus status); 81 out HttpInitialRequestStatus status);
82 82
83 /// <summary> 83 /// <summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
index 1a89721..86aca8e 100644
--- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Interfaces
40 Array = 2, 40 Array = 2,
41 Value = 3 41 Value = 3
42 } 42 }
43 43
44 public enum JsonStoreValueType 44 public enum JsonStoreValueType
45 { 45 {
46 Undefined = 0, 46 Undefined = 0,
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Interfaces
50 String = 4, 50 String = 4,
51 UUID = 5 51 UUID = 5
52 } 52 }
53 53
54 public struct JsonStoreStats 54 public struct JsonStoreStats
55 { 55 {
56 public int StoreCount; 56 public int StoreCount;
diff --git a/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs
index 290b826..b06ff2b 100644
--- a/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public delegate void MessageResultNotification(bool success); 32 public delegate void MessageResultNotification(bool success);
33 public delegate void UndeliveredMessage(GridInstantMessage im); 33 public delegate void UndeliveredMessage(GridInstantMessage im);
34 34
35 public interface IMessageTransferModule 35 public interface IMessageTransferModule
36 { 36 {
37 event UndeliveredMessage OnUndeliveredMessage; 37 event UndeliveredMessage OnUndeliveredMessage;
diff --git a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs
index 1d3d240..e8be70f 100644
--- a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Interfaces
45 /// <param name="face"></param> 45 /// <param name="face"></param>
46 /// <returns></returns> 46 /// <returns></returns>
47 MediaEntry GetMediaEntry(SceneObjectPart part, int face); 47 MediaEntry GetMediaEntry(SceneObjectPart part, int face);
48 48
49 /// <summary> 49 /// <summary>
50 /// Set the media entry for a given prim face. 50 /// Set the media entry for a given prim face.
51 /// </summary> 51 /// </summary>
@@ -53,13 +53,13 @@ namespace OpenSim.Region.Framework.Interfaces
53 /// <param name="face"></param> 53 /// <param name="face"></param>
54 /// <param name="me"></param> 54 /// <param name="me"></param>
55 void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me); 55 void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me);
56 56
57 /// <summary> 57 /// <summary>
58 /// Clear the media entry for a given prim face. 58 /// Clear the media entry for a given prim face.
59 /// </summary> 59 /// </summary>
60 /// 60 ///
61 /// This is the equivalent of setting a media entry of null 61 /// This is the equivalent of setting a media entry of null
62 /// 62 ///
63 /// <param name="part"></param> 63 /// <param name="part"></param>
64 /// <param name="face">/param> 64 /// <param name="face">/param>
65 void ClearMediaEntry(SceneObjectPart part, int face); 65 void ClearMediaEntry(SceneObjectPart part, int face);
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index 813be4f..df872f4 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Interfaces
49 /// </summary> 49 /// </summary>
50 public interface INPC 50 public interface INPC
51 { 51 {
52 52
53 /// <summary> 53 /// <summary>
54 /// Should this NPC be sensed by LSL sensors as an 'agent' 54 /// Should this NPC be sensed by LSL sensors as an 'agent'
55 /// (interpreted here to mean a normal user) rather than an OpenSim 55 /// (interpreted here to mean a normal user) rather than an OpenSim
@@ -301,7 +301,7 @@ namespace OpenSim.Region.Framework.Interfaces
301 /// agent, the agent is unowned or the agent was not an NPC. 301 /// agent, the agent is unowned or the agent was not an NPC.
302 /// </returns> 302 /// </returns>
303 UUID GetOwner(UUID agentID); 303 UUID GetOwner(UUID agentID);
304 304
305 NPCOptionsFlags NPCOptionFlags {get;} 305 NPCOptionsFlags NPCOptionFlags {get;}
306 } 306 }
307} 307}
diff --git a/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs b/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs
index 1ed978b..933ca14 100644
--- a/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Interfaces
42 42
43 public interface IPermissionsModule 43 public interface IPermissionsModule
44 { 44 {
45 45
46 /// <summary> 46 /// <summary>
47 /// Returns the type of permissions that the user has over an object. 47 /// Returns the type of permissions that the user has over an object.
48 /// </summary> 48 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs
index d44c1e1..fb5933c 100644
--- a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Framework.Interfaces
33 { 33 {
34 public string UserID; 34 public string UserID;
35 public UUID RegionID; 35 public UUID RegionID;
36 36
37 public PresenceInfo(string userID, UUID regionID) 37 public PresenceInfo(string userID, UUID regionID)
38 { 38 {
39 UserID = userID; 39 UserID = userID;
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs
index 99bc87d..9370ccd 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs
@@ -40,17 +40,17 @@ namespace OpenSim.Region.Framework.Interfaces
40 { 40 {
41 void HandleLoadOarConsoleCommand(string module, string[] cmdparams); 41 void HandleLoadOarConsoleCommand(string module, string[] cmdparams);
42 void HandleSaveOarConsoleCommand(string module, string[] cmdparams); 42 void HandleSaveOarConsoleCommand(string module, string[] cmdparams);
43 43
44 /// <summary> 44 /// <summary>
45 /// Archive the region to the given path 45 /// Archive the region to the given path
46 /// </summary> 46 /// </summary>
47 /// 47 ///
48 /// This method occurs asynchronously. If you want notification of when it has completed then subscribe to 48 /// This method occurs asynchronously. If you want notification of when it has completed then subscribe to
49 /// the EventManager.OnOarFileSaved event. 49 /// the EventManager.OnOarFileSaved event.
50 /// 50 ///
51 /// <param name="savePath"></param> 51 /// <param name="savePath"></param>
52 void ArchiveRegion(string savePath, Dictionary<string, object> options); 52 void ArchiveRegion(string savePath, Dictionary<string, object> options);
53 53
54 /// <summary> 54 /// <summary>
55 /// Archive the region to the given path 55 /// Archive the region to the given path
56 /// </summary> 56 /// </summary>
@@ -94,35 +94,35 @@ namespace OpenSim.Region.Framework.Interfaces
94 /// </remarks> 94 /// </remarks>
95 /// <param name="loadPath"></param> 95 /// <param name="loadPath"></param>
96 void DearchiveRegion(string loadPath); 96 void DearchiveRegion(string loadPath);
97 97
98 /// <summary> 98 /// <summary>
99 /// Dearchive the given region archive. This replaces the existing scene. 99 /// Dearchive the given region archive. This replaces the existing scene.
100 /// </summary> 100 /// </summary>
101 /// 101 ///
102 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event. 102 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
103 /// 103 ///
104 /// <param name="loadPath"></param> 104 /// <param name="loadPath"></param>
105 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param> 105 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
106 /// <param name="options"> 106 /// <param name="options">
107 /// Dictionary of options. 107 /// Dictionary of options.
108 /// </param> 108 /// </param>
109 void DearchiveRegion(string loadPath, Guid requestId, Dictionary<string,object> options); 109 void DearchiveRegion(string loadPath, Guid requestId, Dictionary<string,object> options);
110 110
111 /// <summary> 111 /// <summary>
112 /// Dearchive a region from a stream. This replaces the existing scene. 112 /// Dearchive a region from a stream. This replaces the existing scene.
113 /// </summary> 113 /// </summary>
114 /// 114 ///
115 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event. 115 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
116 /// 116 ///
117 /// <param name="loadStream"></param> 117 /// <param name="loadStream"></param>
118 void DearchiveRegion(Stream loadStream); 118 void DearchiveRegion(Stream loadStream);
119 119
120 /// <summary> 120 /// <summary>
121 /// Dearchive a region from a stream. This replaces the existing scene. 121 /// Dearchive a region from a stream. This replaces the existing scene.
122 /// </summary> 122 /// </summary>
123 /// 123 ///
124 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event. 124 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
125 /// 125 ///
126 /// <param name="loadStream"></param> 126 /// <param name="loadStream"></param>
127 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param> 127 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
128 /// <param name="options"> 128 /// <param name="options">
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
index 2089bce..5b8f0f0 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Interfaces
92 /// this will be multiple times in one instance, while a nonshared 92 /// this will be multiple times in one instance, while a nonshared
93 /// module instance will only be called once. 93 /// module instance will only be called once.
94 /// This method is called after AddRegion has been called in all 94 /// This method is called after AddRegion has been called in all
95 /// modules for that scene, providing an opportunity to request 95 /// modules for that scene, providing an opportunity to request
96 /// another module's interface, or hook an event from another module. 96 /// another module's interface, or hook an event from another module.
97 /// </summary> 97 /// </summary>
98 /// <param name="scene"> 98 /// <param name="scene">
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
index c5b21a8..60586ff 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
@@ -102,9 +102,9 @@ namespace OpenSim.Region.Framework.Interfaces
102 /// <param name="min"></param> 102 /// <param name="min"></param>
103 /// <param name="max"></param> 103 /// <param name="max"></param>
104 void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max); 104 void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max);
105 105
106 void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName); 106 void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName);
107 107
108 /// <summary> 108 /// <summary>
109 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene. 109 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
110 /// </summary> 110 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index 8536db0..19ba787 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Interfaces
45 /// Dispose the database 45 /// Dispose the database
46 /// </summary> 46 /// </summary>
47 void Dispose(); 47 void Dispose();
48 48
49 /// <summary> 49 /// <summary>
50 /// Stores all object's details apart from inventory 50 /// Stores all object's details apart from inventory
51 /// </summary> 51 /// </summary>
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Interfaces
91 91
92 // Legacy version kept for downward compabibility 92 // Legacy version kept for downward compabibility
93 void StoreTerrain(double[,] terrain, UUID regionID); 93 void StoreTerrain(double[,] terrain, UUID regionID);
94 94
95 /// <summary> 95 /// <summary>
96 /// Load terrain from region storage 96 /// Load terrain from region storage
97 /// </summary> 97 /// </summary>
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Interfaces
107 double[,] LoadTerrain(UUID regionID); 107 double[,] LoadTerrain(UUID regionID);
108 108
109 void StoreLandObject(ILandObject Parcel); 109 void StoreLandObject(ILandObject Parcel);
110 110
111 /// <summary> 111 /// <summary>
112 /// <list type="bullet"> 112 /// <list type="bullet">
113 /// <item>delete from land where UUID=globalID</item> 113 /// <item>delete from land where UUID=globalID</item>
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Interfaces
116 /// </summary> 116 /// </summary>
117 /// <param name="globalID"></param> 117 /// <param name="globalID"></param>
118 void RemoveLandObject(UUID globalID); 118 void RemoveLandObject(UUID globalID);
119 119
120 List<LandData> LoadLandObjects(UUID regionUUID); 120 List<LandData> LoadLandObjects(UUID regionUUID);
121 121
122 void StoreRegionSettings(RegionSettings rs); 122 void StoreRegionSettings(RegionSettings rs);
diff --git a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
index f805863..10f421b 100644
--- a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
@@ -35,9 +35,9 @@ public interface ISnmpModule
35 void Major(string Message, Scene scene); 35 void Major(string Message, Scene scene);
36 void ColdStart(int step , Scene scene); 36 void ColdStart(int step , Scene scene);
37 void Shutdown(int step , Scene scene); 37 void Shutdown(int step , Scene scene);
38 // 38 //
39 // Node Start/stop events 39 // Node Start/stop events
40 // 40 //
41 void LinkUp(Scene scene); 41 void LinkUp(Scene scene);
42 void LinkDown(Scene scene); 42 void LinkDown(Scene scene);
43 void BootInfo(string data, Scene scene); 43 void BootInfo(string data, Scene scene);
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
index 2d33f51..3fc5ce7 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Framework.Interfaces
48 /// This call causes all the terrain patches to be sent to the client. 48 /// This call causes all the terrain patches to be sent to the client.
49 /// </summary> 49 /// </summary>
50 void PushTerrain(IClientAPI pClient); 50 void PushTerrain(IClientAPI pClient);
51 51
52 /// <summary> 52 /// <summary>
53 /// Load a terrain from a stream. 53 /// Load a terrain from a stream.
54 /// </summary> 54 /// </summary>
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces
60 void LoadFromStream(string filename, System.Uri pathToTerrainHeightmap); 60 void LoadFromStream(string filename, System.Uri pathToTerrainHeightmap);
61 void LoadFromStream(string filename, Vector3 displacement, 61 void LoadFromStream(string filename, Vector3 displacement,
62 float radianRotation, Vector2 rotationDisplacement, Stream stream); 62 float radianRotation, Vector2 rotationDisplacement, Stream stream);
63 void LoadFromStream(string filename, Vector3 displacement, 63 void LoadFromStream(string filename, Vector3 displacement,
64 float rotationDegress, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream); 64 float rotationDegress, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream);
65 /// <summary> 65 /// <summary>
66 /// Save a terrain to a stream. 66 /// Save a terrain to a stream.
diff --git a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
index 2987184..3fc0c44 100644
--- a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Interfaces
41 void ReleaseURL(string url); 41 void ReleaseURL(string url);
42 void HttpResponse(UUID request, int status, string body); 42 void HttpResponse(UUID request, int status, string body);
43 void HttpContentType(UUID request, string type); 43 void HttpContentType(UUID request, string type);
44 44
45 string GetHttpHeader(UUID request, string header); 45 string GetHttpHeader(UUID request, string header);
46 int GetFreeUrls(); 46 int GetFreeUrls();
47 47
diff --git a/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs b/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs
index 2e555fa..2fe7454 100644
--- a/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs
@@ -40,6 +40,6 @@ namespace OpenSim.Region.Framework.Interfaces
40 /// This is used by osSetParcelSIPAddress 40 /// This is used by osSetParcelSIPAddress
41 /// </summary> 41 /// </summary>
42 void setLandSIPAddress(string SIPAddress,UUID GlobalID); 42 void setLandSIPAddress(string SIPAddress,UUID GlobalID);
43 43
44 } 44 }
45} 45}
diff --git a/OpenSim/Region/Framework/Interfaces/IWindModule.cs b/OpenSim/Region/Framework/Interfaces/IWindModule.cs
index 4a26a71..424df87 100644
--- a/OpenSim/Region/Framework/Interfaces/IWindModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWindModule.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public interface IWindModule : INonSharedRegionModule 32 public interface IWindModule : INonSharedRegionModule
33 { 33 {
34 34
35 /// <summary> 35 /// <summary>
36 /// Retrieves the current wind speed at the given Region Coordinates 36 /// Retrieves the current wind speed at the given Region Coordinates
37 /// </summary> 37 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
index d76a0d7..3da4130 100644
--- a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Interfaces
140 /// </summary> 140 /// </summary>
141 /// <returns>ListenerInfo with filter filled in</returns> 141 /// <returns>ListenerInfo with filter filled in</returns>
142 IWorldCommListenerInfo GetNextMessage(); 142 IWorldCommListenerInfo GetNextMessage();
143 143
144 void ListenControl(UUID itemID, int handle, int active); 144 void ListenControl(UUID itemID, int handle, int active);
145 void ListenRemove(UUID itemID, int handle); 145 void ListenRemove(UUID itemID, int handle);
146 void DeleteListener(UUID itemID); 146 void DeleteListener(UUID itemID);
diff --git a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
index a6965ba..f91dfd3 100644
--- a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.Framework")] 9[assembly: AssemblyTitle("OpenSim.Region.Framework")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -27,7 +27,7 @@ using Mono.Addins;
27// Version information for an assembly consists of the following four values: 27// Version information for an assembly consists of the following four values:
28// 28//
29// Major Version 29// Major Version
30// Minor Version 30// Minor Version
31// Build Number 31// Build Number
32// Revision 32// Revision
33// 33//
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index eb1a970..4d350dd 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -48,16 +48,16 @@ namespace OpenSim.Region.Framework.Scenes.Animation
48 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); 48 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
49 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); 49 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>();
50 50
51 public OpenSim.Framework.Animation DefaultAnimation 51 public OpenSim.Framework.Animation DefaultAnimation
52 { 52 {
53 get { return m_defaultAnimation; } 53 get { return m_defaultAnimation; }
54 } 54 }
55 55
56 public OpenSim.Framework.Animation ImplicitDefaultAnimation 56 public OpenSim.Framework.Animation ImplicitDefaultAnimation
57 { 57 {
58 get { return m_implicitDefaultAnimation; } 58 get { return m_implicitDefaultAnimation; }
59 } 59 }
60 60
61 public AnimationSet() 61 public AnimationSet()
62 { 62 {
63 ResetDefaultAnimation(); 63 ResetDefaultAnimation();
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
101 /// </summary> 101 /// </summary>
102 /// <param name='animID'></param> 102 /// <param name='animID'></param>
103 /// <param name='allowNoDefault'> 103 /// <param name='allowNoDefault'>
104 /// If true, then the default animation can be entirely removed. 104 /// If true, then the default animation can be entirely removed.
105 /// If false, then removing the default animation will reset it to the simulator default (currently STAND). 105 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
106 /// </param> 106 /// </param>
107 public bool Remove(UUID animID, bool allowNoDefault) 107 public bool Remove(UUID animID, bool allowNoDefault)
@@ -215,9 +215,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
215 foreach (OpenSim.Framework.Animation anim in m_animations) 215 foreach (OpenSim.Framework.Animation anim in m_animations)
216 theArray[i++] = anim; 216 theArray[i++] = anim;
217 } 217 }
218 catch 218 catch
219 { 219 {
220 /* S%^t happens. Ignore. */ 220 /* S%^t happens. Ignore. */
221 } 221 }
222 return theArray; 222 return theArray;
223 } 223 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
index b3b38b2..def993f 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
@@ -33,8 +33,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// Written to decode and encode a binary animation asset. 35 /// Written to decode and encode a binary animation asset.
36 /// The SecondLife Client reads in a BVH file and converts 36 /// The SecondLife Client reads in a BVH file and converts
37 /// it to the format described here. This isn't 37 /// it to the format described here. This isn't
38 /// </summary> 38 /// </summary>
39 public class BinBVHAnimation 39 public class BinBVHAnimation
40 { 40 {
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
109 /// Contains an array of joints 109 /// Contains an array of joints
110 /// </summary> 110 /// </summary>
111 public binBVHJoint[] Joints; 111 public binBVHJoint[] Joints;
112 112
113 113
114 public byte[] ToBytes() 114 public byte[] ToBytes()
115 { 115 {
@@ -136,14 +136,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
136 Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint); 136 Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint);
137 } 137 }
138 iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0))); 138 iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0)));
139 139
140 using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream) 140 using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream)
141 outputbytes = ms2.ToArray(); 141 outputbytes = ms2.ToArray();
142 } 142 }
143 143
144 return outputbytes; 144 return outputbytes;
145 } 145 }
146 146
147 public BinBVHAnimation() 147 public BinBVHAnimation()
148 { 148 {
149 rotationkeys = 0; 149 rotationkeys = 0;
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
160 EaseOutTime = 0; 160 EaseOutTime = 0;
161 HandPose = 1; 161 HandPose = 1;
162 m_jointCount = 0; 162 m_jointCount = 0;
163 163
164 Joints = new binBVHJoint[1]; 164 Joints = new binBVHJoint[1];
165 Joints[0] = new binBVHJoint(); 165 Joints[0] = new binBVHJoint();
166 Joints[0].Name = "mPelvis"; 166 Joints[0].Name = "mPelvis";
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
180 Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1); 180 Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1);
181 Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1); 181 Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1);
182 Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1); 182 Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1);
183 183
184 184
185 } 185 }
186 186
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
235 } 235 }
236 } 236 }
237 237
238 238
239 /// <summary> 239 /// <summary>
240 /// Variable length strings seem to be null terminated in the animation asset.. but.. 240 /// Variable length strings seem to be null terminated in the animation asset.. but..
241 /// use with caution, home grown. 241 /// use with caution, home grown.
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
294 /// <returns>The Joint data serialized into the binBVHJoint structure</returns> 294 /// <returns>The Joint data serialized into the binBVHJoint structure</returns>
295 private binBVHJoint readJoint(byte[] data, ref int i) 295 private binBVHJoint readJoint(byte[] data, ref int i)
296 { 296 {
297 297
298 binBVHJointKey[] positions; 298 binBVHJointKey[] positions;
299 binBVHJointKey[] rotations; 299 binBVHJointKey[] rotations;
300 300
@@ -312,14 +312,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
312 312
313 pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name 313 pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name
314 314
315 /* 315 /*
316 2 <- Priority Revisited 316 2 <- Priority Revisited
317 0 317 0
318 0 318 0
319 0 319 0
320 */ 320 */
321 321
322 /* 322 /*
323 5 <-- 5 keyframes 323 5 <-- 5 keyframes
324 0 324 0
325 0 325 0
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
327 ... 5 Keyframe data blocks 327 ... 5 Keyframe data blocks
328 */ 328 */
329 329
330 /* 330 /*
331 2 <-- 2 keyframes 331 2 <-- 2 keyframes
332 0 332 0
333 0 333 0
@@ -428,8 +428,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
428 } 428 }
429 return m_keys; 429 return m_keys;
430 } 430 }
431 431
432 432
433 433
434 } 434 }
435 /// <summary> 435 /// <summary>
@@ -443,7 +443,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
443 public string Name; 443 public string Name;
444 444
445 /// <summary> 445 /// <summary>
446 /// Joint Animation Override? Was the same as the Priority in testing.. 446 /// Joint Animation Override? Was the same as the Priority in testing..
447 /// </summary> 447 /// </summary>
448 public int Priority; 448 public int Priority;
449 449
@@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
523 public static class BinBVHUtil 523 public static class BinBVHUtil
524 { 524 {
525 public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue; 525 public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue;
526 526
527 public static UInt16 FloatToUInt16(float val, float lower, float upper) 527 public static UInt16 FloatToUInt16(float val, float lower, float upper)
528 { 528 {
529 UInt16 uival = 0; 529 UInt16 uival = 0;
@@ -536,7 +536,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
536 { 536 {
537 upper -= lower; 537 upper -= lower;
538 val = val - lower; 538 val = val - lower;
539 539
540 // start with 500 upper and 200 lower.. subtract 200 from the upper and the value 540 // start with 500 upper and 200 lower.. subtract 200 from the upper and the value
541 } 541 }
542 else //if (lower < 0 && upper > 0) 542 else //if (lower < 0 && upper > 0)
@@ -558,8 +558,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
558 558
559 return uival; 559 return uival;
560 } 560 }
561 561
562 562
563 /// <summary> 563 /// <summary>
564 /// Endian Swap 564 /// Endian Swap
565 /// Swaps endianness if necessary 565 /// Swaps endianness if necessary
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
590 output[i] = Convert.ToByte(chr[i]); 590 output[i] = Convert.ToByte(chr[i]);
591 591
592 } 592 }
593 593
594 output[i] = Convert.ToByte('\0'); 594 output[i] = Convert.ToByte('\0');
595 return output; 595 return output;
596 } 596 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
index b79dd8f..b8db3a9 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
55 private static void LoadAnimations(string path) 55 private static void LoadAnimations(string path)
56 { 56 {
57// Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); 57// Dictionary<string, UUID> animations = new Dictionary<string, UUID>();
58 58
59 using (XmlTextReader reader = new XmlTextReader(path)) 59 using (XmlTextReader reader = new XmlTextReader(path))
60 { 60 {
61 XmlDocument doc = new XmlDocument(); 61 XmlDocument doc = new XmlDocument();
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 13d4562..6b31555 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
123 /// </summary> 123 /// </summary>
124 /// <param name='animID'></param> 124 /// <param name='animID'></param>
125 /// <param name='allowNoDefault'> 125 /// <param name='allowNoDefault'>
126 /// If true, then the default animation can be entirely removed. 126 /// If true, then the default animation can be entirely removed.
127 /// If false, then removing the default animation will reset it to the simulator default (currently STAND). 127 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
128 /// </param> 128 /// </param>
129 public void RemoveAnimation(UUID animID, bool allowNoDefault) 129 public void RemoveAnimation(UUID animID, bool allowNoDefault)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
192 /// that are mutually exclusive, e.g. flying and sitting. 192 /// that are mutually exclusive, e.g. flying and sitting.
193 /// </summary> 193 /// </summary>
194 /// <returns>'true' if the animation was updated</returns> 194 /// <returns>'true' if the animation was updated</returns>
195 /// 195 ///
196 196
197 197
198 198
@@ -488,7 +488,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
488 m_animTickLand = Environment.TickCount; 488 m_animTickLand = Environment.TickCount;
489 // TODO: SOFT_LAND support 489 // TODO: SOFT_LAND support
490 float fallVsq = m_lastFallVelocity * m_lastFallVelocity; 490 float fallVsq = m_lastFallVelocity * m_lastFallVelocity;
491 if (fallVsq > 300f) // aprox 20*h 491 if (fallVsq > 300f) // aprox 20*h
492 return "STANDUP"; 492 return "STANDUP";
493 else if (fallVsq > 160f) 493 else if (fallVsq > 160f)
494 return "SOFT_LAND"; 494 return "SOFT_LAND";
diff --git a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
index 4362e28..c874fdb 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
@@ -144,10 +144,10 @@ namespace OpenSim.Region.Framework.Scenes
144// "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); 144// "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID);
145 145
146 InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID); 146 InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID);
147 147
148 if (item != null) 148 if (item != null)
149 fh.Client.SendInventoryItemDetails(item.Owner, item); 149 fh.Client.SendInventoryItemDetails(item.Owner, item);
150 150
151 // TODO: Possibly log any failure 151 // TODO: Possibly log any failure
152 } 152 }
153 } 153 }
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
index 11a0146..7509686 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -44,29 +44,29 @@ namespace OpenSim.Region.Framework.Scenes
44 public UUID folderID; 44 public UUID folderID;
45 public bool permissionToDelete; 45 public bool permissionToDelete;
46 } 46 }
47 47
48 /// <summary> 48 /// <summary>
49 /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding 49 /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding
50 /// up the main client thread. 50 /// up the main client thread.
51 /// </summary> 51 /// </summary>
52 public class AsyncSceneObjectGroupDeleter 52 public class AsyncSceneObjectGroupDeleter
53 { 53 {
54 private static readonly ILog m_log 54 private static readonly ILog m_log
55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 /// <value> 57 /// <value>
58 /// Is the deleter currently enabled? 58 /// Is the deleter currently enabled?
59 /// </value> 59 /// </value>
60 public bool Enabled; 60 public bool Enabled;
61 61
62 private Timer m_inventoryTicker = new Timer(2000); 62 private Timer m_inventoryTicker = new Timer(2000);
63 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>(); 63 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>();
64 private Scene m_scene; 64 private Scene m_scene;
65 65
66 public AsyncSceneObjectGroupDeleter(Scene scene) 66 public AsyncSceneObjectGroupDeleter(Scene scene)
67 { 67 {
68 m_scene = scene; 68 m_scene = scene;
69 69
70 m_inventoryTicker.AutoReset = false; 70 m_inventoryTicker.AutoReset = false;
71 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; 71 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
72 } 72 }
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes
75 /// Delete the given object from the scene 75 /// Delete the given object from the scene
76 /// </summary> 76 /// </summary>
77 public void DeleteToInventory(DeRezAction action, UUID folderID, 77 public void DeleteToInventory(DeRezAction action, UUID folderID,
78 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient, 78 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient,
79 bool permissionToDelete) 79 bool permissionToDelete)
80 { 80 {
81 if (Enabled) 81 if (Enabled)
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Scenes
97 if (Enabled) 97 if (Enabled)
98 lock (m_inventoryTicker) 98 lock (m_inventoryTicker)
99 m_inventoryTicker.Start(); 99 m_inventoryTicker.Start();
100 100
101 // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object 101 // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object
102 // has gone to inventory, it will reappear in the region again on restart instead of being lost. 102 // has gone to inventory, it will reappear in the region again on restart instead of being lost.
103 // This is not ideal since the object will still be available for manipulation when it should be, but it's 103 // This is not ideal since the object will still be available for manipulation when it should be, but it's
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
108 g.DeleteGroupFromScene(false); 108 g.DeleteGroupFromScene(false);
109 } 109 }
110 } 110 }
111 111
112 private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) 112 private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e)
113 { 113 {
114// m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop"); 114// m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop");
@@ -116,8 +116,8 @@ namespace OpenSim.Region.Framework.Scenes
116 // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved 116 // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved
117 // in a culture where decimal points are commas and then reloaded in a culture which just treats them as 117 // in a culture where decimal points are commas and then reloaded in a culture which just treats them as
118 // number seperators. 118 // number seperators.
119 Culture.SetCurrentCulture(); 119 Culture.SetCurrentCulture();
120 120
121 while (InventoryDeQueueAndDelete()) 121 while (InventoryDeQueueAndDelete())
122 { 122 {
123 //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing..."); 123 //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing...");
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Framework.Scenes
131 public bool InventoryDeQueueAndDelete() 131 public bool InventoryDeQueueAndDelete()
132 { 132 {
133 DeleteToInventoryHolder x = null; 133 DeleteToInventoryHolder x = null;
134 134
135 try 135 try
136 { 136 {
137 lock (m_inventoryDeletes) 137 lock (m_inventoryDeletes)
@@ -144,13 +144,13 @@ namespace OpenSim.Region.Framework.Scenes
144// m_log.DebugFormat( 144// m_log.DebugFormat(
145// "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", 145// "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.",
146// left, x.action, x.objectGroups.Count); 146// left, x.action, x.objectGroups.Count);
147 147
148 try 148 try
149 { 149 {
150 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); 150 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>();
151 if (invAccess != null) 151 if (invAccess != null)
152 invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false); 152 invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false);
153 153
154 if (x.permissionToDelete) 154 if (x.permissionToDelete)
155 { 155 {
156 foreach (SceneObjectGroup g in x.objectGroups) 156 foreach (SceneObjectGroup g in x.objectGroups)
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes
162 m_log.ErrorFormat( 162 m_log.ErrorFormat(
163 "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace); 163 "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace);
164 } 164 }
165 165
166 return true; 166 return true;
167 } 167 }
168 } 168 }
@@ -173,14 +173,14 @@ namespace OpenSim.Region.Framework.Scenes
173 // FIXME: This needs to be fixed. 173 // FIXME: This needs to be fixed.
174 m_log.ErrorFormat( 174 m_log.ErrorFormat(
175 "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}", 175 "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}",
176 (x != null ? x.remoteClient.Name : "unavailable"), 176 (x != null ? x.remoteClient.Name : "unavailable"),
177 (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), 177 (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"),
178 e.Message, 178 e.Message,
179 e.StackTrace); 179 e.StackTrace);
180 } 180 }
181 181
182// m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue."); 182// m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue.");
183 183
184 return false; 184 return false;
185 } 185 }
186 } 186 }
diff --git a/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs b/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs
index af8ccda..8831764 100644
--- a/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs
+++ b/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs
@@ -37,12 +37,12 @@ namespace OpenSim.Region.Framework.Scenes
37 /// are grouped together. 37 /// are grouped together.
38 /// </summary> 38 /// </summary>
39 public class CoalescedSceneObjects 39 public class CoalescedSceneObjects
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// The creator of this coalesence, though not necessarily the objects within it. 42 /// The creator of this coalesence, though not necessarily the objects within it.
43 /// </summary> 43 /// </summary>
44 public UUID CreatorId { get; set; } 44 public UUID CreatorId { get; set; }
45 45
46 /// <summary> 46 /// <summary>
47 /// The number of objects in this coalesence 47 /// The number of objects in this coalesence
48 /// </summary> 48 /// </summary>
@@ -54,12 +54,12 @@ namespace OpenSim.Region.Framework.Scenes
54 return m_memberObjects.Count; 54 return m_memberObjects.Count;
55 } 55 }
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Does this coalesence have any member objects? 59 /// Does this coalesence have any member objects?
60 /// </summary> 60 /// </summary>
61 public bool HasObjects { get { return Count > 0; } } 61 public bool HasObjects { get { return Count > 0; } }
62 62
63 /// <summary> 63 /// <summary>
64 /// Get the objects currently in this coalescence 64 /// Get the objects currently in this coalescence
65 /// </summary> 65 /// </summary>
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Framework.Scenes
70 lock (m_memberObjects) 70 lock (m_memberObjects)
71 return new List<SceneObjectGroup>(m_memberObjects); 71 return new List<SceneObjectGroup>(m_memberObjects);
72 } 72 }
73 } 73 }
74 74
75 /// <summary> 75 /// <summary>
76 /// Get the scene that contains the objects in this coalescence. If there are no objects then null is returned. 76 /// Get the scene that contains the objects in this coalescence. If there are no objects then null is returned.
77 /// </summary> 77 /// </summary>
78 public Scene Scene 78 public Scene Scene
79 { 79 {
80 get 80 get
81 { 81 {
82 if (!HasObjects) 82 if (!HasObjects)
@@ -85,24 +85,24 @@ namespace OpenSim.Region.Framework.Scenes
85 return Objects[0].Scene; 85 return Objects[0].Scene;
86 } 86 }
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// At this point, we need to preserve the order of objects added to the coalescence, since the first 90 /// At this point, we need to preserve the order of objects added to the coalescence, since the first
91 /// one will end up matching the item name when rerezzed. 91 /// one will end up matching the item name when rerezzed.
92 /// </summary> 92 /// </summary>
93 protected List<SceneObjectGroup> m_memberObjects = new List<SceneObjectGroup>(); 93 protected List<SceneObjectGroup> m_memberObjects = new List<SceneObjectGroup>();
94 94
95 public CoalescedSceneObjects(UUID creatorId) 95 public CoalescedSceneObjects(UUID creatorId)
96 { 96 {
97 CreatorId = creatorId; 97 CreatorId = creatorId;
98 } 98 }
99 99
100 public CoalescedSceneObjects(UUID creatorId, params SceneObjectGroup[] objs) : this(creatorId) 100 public CoalescedSceneObjects(UUID creatorId, params SceneObjectGroup[] objs) : this(creatorId)
101 { 101 {
102 foreach (SceneObjectGroup obj in objs) 102 foreach (SceneObjectGroup obj in objs)
103 Add(obj); 103 Add(obj);
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// Add an object to the coalescence. 107 /// Add an object to the coalescence.
108 /// </summary> 108 /// </summary>
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes
113 lock (m_memberObjects) 113 lock (m_memberObjects)
114 m_memberObjects.Add(obj); 114 m_memberObjects.Add(obj);
115 } 115 }
116 116
117 /// <summary> 117 /// <summary>
118 /// Removes a scene object from the coalescene 118 /// Removes a scene object from the coalescene
119 /// </summary> 119 /// </summary>
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
124 lock (m_memberObjects) 124 lock (m_memberObjects)
125 return m_memberObjects.Remove(obj); 125 return m_memberObjects.Remove(obj);
126 } 126 }
127 127
128 /// <summary> 128 /// <summary>
129 /// Get the total size of the coalescence (the size required to cover all the objects within it) and the 129 /// Get the total size of the coalescence (the size required to cover all the objects within it) and the
130 /// offsets of each of those objects. 130 /// offsets of each of those objects.
@@ -138,16 +138,16 @@ namespace OpenSim.Region.Framework.Scenes
138 float minX, minY, minZ; 138 float minX, minY, minZ;
139 float maxX, maxY, maxZ; 139 float maxX, maxY, maxZ;
140 140
141 Vector3[] offsets 141 Vector3[] offsets
142 = Scene.GetCombinedBoundingBox( 142 = Scene.GetCombinedBoundingBox(
143 Objects, out minX, out maxX, out minY, out maxY, out minZ, out maxZ); 143 Objects, out minX, out maxX, out minY, out maxY, out minZ, out maxZ);
144 144
145 float sizeX = maxX - minX; 145 float sizeX = maxX - minX;
146 float sizeY = maxY - minY; 146 float sizeY = maxY - minY;
147 float sizeZ = maxZ - minZ; 147 float sizeZ = maxZ - minZ;
148 148
149 size = new Vector3(sizeX, sizeY, sizeZ); 149 size = new Vector3(sizeX, sizeY, sizeZ);
150 150
151 return offsets; 151 return offsets;
152 } 152 }
153 } 153 }
diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
index 84817a0..e76fef4 100644
--- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
+++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes
113 snd_StonePlastic, snd_MetalPlastic, snd_GlassPlastic, snd_WoodPlastic, snd_FleshPlastic, snd_PlasticPlastic, snd_PlasticRubber, 113 snd_StonePlastic, snd_MetalPlastic, snd_GlassPlastic, snd_WoodPlastic, snd_FleshPlastic, snd_PlasticPlastic, snd_PlasticRubber,
114 snd_StoneRubber, snd_MetalRubber, snd_GlassRubber, snd_WoodRubber, snd_FleshRubber, snd_PlasticRubber, snd_RubberRubber 114 snd_StoneRubber, snd_MetalRubber, snd_GlassRubber, snd_WoodRubber, snd_FleshRubber, snd_PlasticRubber, snd_RubberRubber
115 }; 115 };
116 116
117 public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) 117 public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist)
118 { 118 {
119 if (collidersinfolist.Count == 0 || part == null) 119 if (collidersinfolist.Count == 0 || part == null)
diff --git a/OpenSim/Region/Framework/Scenes/EntityManager.cs b/OpenSim/Region/Framework/Scenes/EntityManager.cs
index 7181313..4654efe 100644
--- a/OpenSim/Region/Framework/Scenes/EntityManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityManager.cs
@@ -38,8 +38,8 @@ namespace OpenSim.Region.Framework.Scenes
38 public class EntityManager 38 public class EntityManager
39 { 39 {
40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 private readonly DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase> m_entities 42 private readonly DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase> m_entities
43 = new DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase>(); 43 = new DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase>();
44 44
45 public int Count 45 public int Count
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 6ff3049..1e9711d 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes
44 public class EventManager 44 public class EventManager
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 public delegate void OnFrameDelegate(); 48 public delegate void OnFrameDelegate();
49 49
50 /// <summary> 50 /// <summary>
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Scenes
121 public event OnClientConnectCoreDelegate OnClientConnect; 121 public event OnClientConnectCoreDelegate OnClientConnect;
122 122
123 public delegate void OnNewClientDelegate(IClientAPI client); 123 public delegate void OnNewClientDelegate(IClientAPI client);
124 124
125 /// <summary> 125 /// <summary>
126 /// Triggered when a new client is added to the scene. 126 /// Triggered when a new client is added to the scene.
127 /// </summary> 127 /// </summary>
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Framework.Scenes
163 /// <remarks> 163 /// <remarks>
164 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both 164 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both
165 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> 165 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see>
166 /// 166 ///
167 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please 167 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please
168 /// do this on a separate thread. 168 /// do this on a separate thread.
169 /// </remarks> 169 /// </remarks>
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Framework.Scenes
223 /// Triggered when the entire simulator is shutdown. 223 /// Triggered when the entire simulator is shutdown.
224 /// </summary> 224 /// </summary>
225 public event Action OnShutdown; 225 public event Action OnShutdown;
226 226
227 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 227 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
228 public delegate void ScriptResetDelegate(uint localID, UUID itemID); 228 public delegate void ScriptResetDelegate(uint localID, UUID itemID);
229 229
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Framework.Scenes
276 /// </remarks> 276 /// </remarks>
277 public event ObjectGrabDelegate OnObjectGrab; 277 public event ObjectGrabDelegate OnObjectGrab;
278 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 278 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
279 279
280 /// <summary> 280 /// <summary>
281 /// Triggered when an object is being touched/grabbed continuously. 281 /// Triggered when an object is being touched/grabbed continuously.
282 /// </summary> 282 /// </summary>
@@ -503,7 +503,7 @@ namespace OpenSim.Region.Framework.Scenes
503 /// via <see cref="OpenSim.Region.ClientStack.Linden.TaskInventoryScriptUpdater.uploaderCaps"/> 503 /// via <see cref="OpenSim.Region.ClientStack.Linden.TaskInventoryScriptUpdater.uploaderCaps"/>
504 /// </remarks> 504 /// </remarks>
505 public event UpdateScript OnUpdateScript; 505 public event UpdateScript OnUpdateScript;
506 506
507 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) 507 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
508 { 508 {
509 UpdateScript handlerUpdateScript = OnUpdateScript; 509 UpdateScript handlerUpdateScript = OnUpdateScript;
@@ -523,16 +523,16 @@ namespace OpenSim.Region.Framework.Scenes
523 } 523 }
524 } 524 }
525 } 525 }
526 } 526 }
527 527
528 /// <summary> 528 /// <summary>
529 /// Triggered when some scene object properties change. 529 /// Triggered when some scene object properties change.
530 /// </summary> 530 /// </summary>
531 /// <remarks> 531 /// <remarks>
532 /// ScriptChangedEvent is fired when a scene object property that a script might be interested 532 /// ScriptChangedEvent is fired when a scene object property that a script might be interested
533 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. 533 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event.
534 /// This is not an indication that the script has changed (see OnUpdateScript for that). 534 /// This is not an indication that the script has changed (see OnUpdateScript for that).
535 /// This event is sent to a script to tell it that some property changed on 535 /// This event is sent to a script to tell it that some property changed on
536 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . 536 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed .
537 /// Triggered by <see cref="TriggerOnScriptChangedEvent"/> 537 /// Triggered by <see cref="TriggerOnScriptChangedEvent"/>
538 /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>, 538 /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>,
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Framework.Scenes
561 /// TODO: Should be triggered when a physics object starts moving. 561 /// TODO: Should be triggered when a physics object starts moving.
562 /// </summary> 562 /// </summary>
563 public event ScriptMovingStartEvent OnScriptMovingStartEvent; 563 public event ScriptMovingStartEvent OnScriptMovingStartEvent;
564 564
565 public delegate void ScriptMovingEndEvent(uint localID); 565 public delegate void ScriptMovingEndEvent(uint localID);
566 566
567 /// <summary> 567 /// <summary>
@@ -738,7 +738,7 @@ namespace OpenSim.Region.Framework.Scenes
738 /// and <see cref="ScenePresence.CompleteMovement"/> 738 /// and <see cref="ScenePresence.CompleteMovement"/>
739 /// </remarks> 739 /// </remarks>
740 public event Action<ScenePresence> OnMakeRootAgent; 740 public event Action<ScenePresence> OnMakeRootAgent;
741 741
742 public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; 742 public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted;
743 public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; 743 public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile;
744 744
@@ -755,7 +755,7 @@ namespace OpenSim.Region.Framework.Scenes
755 public delegate void RequestChangeWaterHeight(float height); 755 public delegate void RequestChangeWaterHeight(float height);
756 756
757 public event RequestChangeWaterHeight OnRequestChangeWaterHeight; 757 public event RequestChangeWaterHeight OnRequestChangeWaterHeight;
758 758
759 /// <summary> 759 /// <summary>
760 /// Fired if any avatar is 'killed' due to its health falling to zero 760 /// Fired if any avatar is 'killed' due to its health falling to zero
761 /// </summary> 761 /// </summary>
@@ -778,7 +778,7 @@ namespace OpenSim.Region.Framework.Scenes
778 public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); 778 public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID);
779 779
780 public event EstateToolsSunUpdate OnEstateToolsSunUpdate; 780 public event EstateToolsSunUpdate OnEstateToolsSunUpdate;
781 781
782 /// <summary> 782 /// <summary>
783 /// Triggered when an object is added to the scene. 783 /// Triggered when an object is added to the scene.
784 /// </summary> 784 /// </summary>
@@ -789,7 +789,7 @@ namespace OpenSim.Region.Framework.Scenes
789 /// <see cref="Scene.doObjectDuplicateOnRay"/> 789 /// <see cref="Scene.doObjectDuplicateOnRay"/>
790 /// </remarks> 790 /// </remarks>
791 public event Action<SceneObjectGroup> OnObjectAddedToScene; 791 public event Action<SceneObjectGroup> OnObjectAddedToScene;
792 792
793 /// <summary> 793 /// <summary>
794 /// When a client sends a derez request for an object inworld 794 /// When a client sends a derez request for an object inworld
795 /// but before the object is deleted 795 /// but before the object is deleted
@@ -872,21 +872,21 @@ namespace OpenSim.Region.Framework.Scenes
872 /// </summary> 872 /// </summary>
873 public delegate void RegisterCapsEvent(UUID agentID, Caps caps); 873 public delegate void RegisterCapsEvent(UUID agentID, Caps caps);
874 public event RegisterCapsEvent OnRegisterCaps; 874 public event RegisterCapsEvent OnRegisterCaps;
875 875
876 /// <summary> 876 /// <summary>
877 /// DeregisterCapsEvent is called by Scene when the caps 877 /// DeregisterCapsEvent is called by Scene when the caps
878 /// handler for an agent are removed. 878 /// handler for an agent are removed.
879 /// </summary> 879 /// </summary>
880 public delegate void DeregisterCapsEvent(UUID agentID, Caps caps); 880 public delegate void DeregisterCapsEvent(UUID agentID, Caps caps);
881 public event DeregisterCapsEvent OnDeregisterCaps; 881 public event DeregisterCapsEvent OnDeregisterCaps;
882 882
883 /// <summary> 883 /// <summary>
884 /// ChatFromWorldEvent is called via Scene when a chat message 884 /// ChatFromWorldEvent is called via Scene when a chat message
885 /// from world comes in. 885 /// from world comes in.
886 /// </summary> 886 /// </summary>
887 public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat); 887 public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat);
888 public event ChatFromWorldEvent OnChatFromWorld; 888 public event ChatFromWorldEvent OnChatFromWorld;
889 889
890 /// <summary> 890 /// <summary>
891 /// ChatFromClientEvent is triggered via ChatModule (or 891 /// ChatFromClientEvent is triggered via ChatModule (or
892 /// substitutes thereof) when a chat message 892 /// substitutes thereof) when a chat message
@@ -894,18 +894,18 @@ namespace OpenSim.Region.Framework.Scenes
894 /// </summary> 894 /// </summary>
895 public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat); 895 public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat);
896 public event ChatFromClientEvent OnChatFromClient; 896 public event ChatFromClientEvent OnChatFromClient;
897 897
898 /// <summary> 898 /// <summary>
899 /// ChatToClientsEvent is triggered via ChatModule (or 899 /// ChatToClientsEvent is triggered via ChatModule (or
900 /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a 900 /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a
901 /// received chat message if they satisfy various conditions (within audible range, etc.) 901 /// received chat message if they satisfy various conditions (within audible range, etc.)
902 /// </summary> 902 /// </summary>
903 public delegate void ChatToClientsEvent( 903 public delegate void ChatToClientsEvent(
904 UUID senderID, HashSet<UUID> receiverIDs, 904 UUID senderID, HashSet<UUID> receiverIDs,
905 string message, ChatTypeEnum type, Vector3 fromPos, string fromName, 905 string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
906 ChatSourceType src, ChatAudibleLevel level); 906 ChatSourceType src, ChatAudibleLevel level);
907 public event ChatToClientsEvent OnChatToClients; 907 public event ChatToClientsEvent OnChatToClients;
908 908
909 /// <summary> 909 /// <summary>
910 /// ChatBroadcastEvent is called via Scene when a broadcast chat message 910 /// ChatBroadcastEvent is called via Scene when a broadcast chat message
911 /// from world comes in 911 /// from world comes in
@@ -923,11 +923,11 @@ namespace OpenSim.Region.Framework.Scenes
923 /// </summary> 923 /// </summary>
924 public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message); 924 public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message);
925 public event OarFileLoaded OnOarFileLoaded; 925 public event OarFileLoaded OnOarFileLoaded;
926 926
927 /// <summary> 927 /// <summary>
928 /// Called when an oar file has finished saving 928 /// Called when an oar file has finished saving
929 /// Message is non empty string if there were problems saving the oar file 929 /// Message is non empty string if there were problems saving the oar file
930 /// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise 930 /// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise
931 /// Guid.Empty is returned. 931 /// Guid.Empty is returned.
932 /// </summary> 932 /// </summary>
933 public delegate void OarFileSaved(Guid guid, string message); 933 public delegate void OarFileSaved(Guid guid, string message);
@@ -947,14 +947,14 @@ namespace OpenSim.Region.Framework.Scenes
947 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). 947 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical).
948 public delegate void Attach(uint localID, UUID itemID, UUID avatarID); 948 public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
949 public event Attach OnAttach; 949 public event Attach OnAttach;
950 950
951 951
952 /// <summary> 952 /// <summary>
953 /// Called immediately after an object is loaded from storage. 953 /// Called immediately after an object is loaded from storage.
954 /// </summary> 954 /// </summary>
955 public event SceneObjectDelegate OnSceneObjectLoaded; 955 public event SceneObjectDelegate OnSceneObjectLoaded;
956 public delegate void SceneObjectDelegate(SceneObjectGroup so); 956 public delegate void SceneObjectDelegate(SceneObjectGroup so);
957 957
958 /// <summary> 958 /// <summary>
959 /// Called immediately before an object is saved to storage. 959 /// Called immediately before an object is saved to storage.
960 /// </summary> 960 /// </summary>
@@ -967,7 +967,7 @@ namespace OpenSim.Region.Framework.Scenes
967 /// </param> 967 /// </param>
968 public event SceneObjectPreSaveDelegate OnSceneObjectPreSave; 968 public event SceneObjectPreSaveDelegate OnSceneObjectPreSave;
969 public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo); 969 public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo);
970 970
971 /// <summary> 971 /// <summary>
972 /// Called when a scene object part is cloned within the region. 972 /// Called when a scene object part is cloned within the region.
973 /// </summary> 973 /// </summary>
@@ -1001,7 +1001,7 @@ namespace OpenSim.Region.Framework.Scenes
1001 /// Fired when logins to a region are enabled or disabled. 1001 /// Fired when logins to a region are enabled or disabled.
1002 /// </summary> 1002 /// </summary>
1003 /// <remarks> 1003 /// <remarks>
1004 /// 1004 ///
1005 /// </remarks> 1005 /// </remarks>
1006 /// Fired 1006 /// Fired
1007 public event RegionLoginsStatusChange OnRegionLoginsStatusChange; 1007 public event RegionLoginsStatusChange OnRegionLoginsStatusChange;
@@ -1157,7 +1157,7 @@ namespace OpenSim.Region.Framework.Scenes
1157 catch (Exception e) 1157 catch (Exception e)
1158 { 1158 {
1159 m_log.ErrorFormat( 1159 m_log.ErrorFormat(
1160 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", 1160 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
1161 e.Message, e.StackTrace); 1161 e.Message, e.StackTrace);
1162 } 1162 }
1163 } 1163 }
@@ -1178,7 +1178,7 @@ namespace OpenSim.Region.Framework.Scenes
1178 catch (Exception e) 1178 catch (Exception e)
1179 { 1179 {
1180 m_log.ErrorFormat( 1180 m_log.ErrorFormat(
1181 "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}", 1181 "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}",
1182 e.Message, e.StackTrace); 1182 e.Message, e.StackTrace);
1183 } 1183 }
1184 } 1184 }
@@ -1199,7 +1199,7 @@ namespace OpenSim.Region.Framework.Scenes
1199 catch (Exception e) 1199 catch (Exception e)
1200 { 1200 {
1201 m_log.ErrorFormat( 1201 m_log.ErrorFormat(
1202 "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}", 1202 "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}",
1203 e.Message, e.StackTrace); 1203 e.Message, e.StackTrace);
1204 } 1204 }
1205 } 1205 }
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.Framework.Scenes
1220 catch (Exception e) 1220 catch (Exception e)
1221 { 1221 {
1222 m_log.ErrorFormat( 1222 m_log.ErrorFormat(
1223 "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}", 1223 "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}",
1224 e.Message, e.StackTrace); 1224 e.Message, e.StackTrace);
1225 } 1225 }
1226 } 1226 }
@@ -1241,7 +1241,7 @@ namespace OpenSim.Region.Framework.Scenes
1241 catch (Exception e) 1241 catch (Exception e)
1242 { 1242 {
1243 m_log.ErrorFormat( 1243 m_log.ErrorFormat(
1244 "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}", 1244 "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}",
1245 e.Message, e.StackTrace); 1245 e.Message, e.StackTrace);
1246 } 1246 }
1247 } 1247 }
@@ -1262,7 +1262,7 @@ namespace OpenSim.Region.Framework.Scenes
1262 catch (Exception e) 1262 catch (Exception e)
1263 { 1263 {
1264 m_log.ErrorFormat( 1264 m_log.ErrorFormat(
1265 "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}", 1265 "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}",
1266 e.Message, e.StackTrace); 1266 e.Message, e.StackTrace);
1267 } 1267 }
1268 } 1268 }
@@ -1283,7 +1283,7 @@ namespace OpenSim.Region.Framework.Scenes
1283 catch (Exception e) 1283 catch (Exception e)
1284 { 1284 {
1285 m_log.ErrorFormat( 1285 m_log.ErrorFormat(
1286 "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}", 1286 "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}",
1287 e.Message, e.StackTrace); 1287 e.Message, e.StackTrace);
1288 } 1288 }
1289 } 1289 }
@@ -1304,7 +1304,7 @@ namespace OpenSim.Region.Framework.Scenes
1304 catch (Exception e) 1304 catch (Exception e)
1305 { 1305 {
1306 m_log.ErrorFormat( 1306 m_log.ErrorFormat(
1307 "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}", 1307 "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}",
1308 e.Message, e.StackTrace); 1308 e.Message, e.StackTrace);
1309 } 1309 }
1310 } 1310 }
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.Framework.Scenes
1324 catch (Exception e) 1324 catch (Exception e)
1325 { 1325 {
1326 m_log.ErrorFormat( 1326 m_log.ErrorFormat(
1327 "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}", 1327 "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}",
1328 e.Message, e.StackTrace); 1328 e.Message, e.StackTrace);
1329 } 1329 }
1330 } 1330 }
@@ -1368,7 +1368,7 @@ namespace OpenSim.Region.Framework.Scenes
1368 catch (Exception e) 1368 catch (Exception e)
1369 { 1369 {
1370 m_log.ErrorFormat( 1370 m_log.ErrorFormat(
1371 "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}", 1371 "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}",
1372 e.Message, e.StackTrace); 1372 e.Message, e.StackTrace);
1373 } 1373 }
1374 } 1374 }
@@ -1391,7 +1391,7 @@ namespace OpenSim.Region.Framework.Scenes
1391 catch (Exception e) 1391 catch (Exception e)
1392 { 1392 {
1393 m_log.ErrorFormat( 1393 m_log.ErrorFormat(
1394 "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}", 1394 "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}",
1395 e.Message, e.StackTrace); 1395 e.Message, e.StackTrace);
1396 } 1396 }
1397 } 1397 }
@@ -1412,7 +1412,7 @@ namespace OpenSim.Region.Framework.Scenes
1412 catch (Exception e) 1412 catch (Exception e)
1413 { 1413 {
1414 m_log.ErrorFormat( 1414 m_log.ErrorFormat(
1415 "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}", 1415 "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}",
1416 e.Message, e.StackTrace); 1416 e.Message, e.StackTrace);
1417 } 1417 }
1418 } 1418 }
@@ -1433,7 +1433,7 @@ namespace OpenSim.Region.Framework.Scenes
1433 catch (Exception e) 1433 catch (Exception e)
1434 { 1434 {
1435 m_log.ErrorFormat( 1435 m_log.ErrorFormat(
1436 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}", 1436 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}",
1437 e.Message, e.StackTrace); 1437 e.Message, e.StackTrace);
1438 } 1438 }
1439 } 1439 }
@@ -1454,7 +1454,7 @@ namespace OpenSim.Region.Framework.Scenes
1454 catch (Exception e) 1454 catch (Exception e)
1455 { 1455 {
1456 m_log.ErrorFormat( 1456 m_log.ErrorFormat(
1457 "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}", 1457 "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}",
1458 e.Message, e.StackTrace); 1458 e.Message, e.StackTrace);
1459 } 1459 }
1460 } 1460 }
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes
1495 catch (Exception e) 1495 catch (Exception e)
1496 { 1496 {
1497 m_log.ErrorFormat( 1497 m_log.ErrorFormat(
1498 "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}", 1498 "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}",
1499 e.Message, e.StackTrace); 1499 e.Message, e.StackTrace);
1500 } 1500 }
1501 } 1501 }
@@ -1558,7 +1558,7 @@ namespace OpenSim.Region.Framework.Scenes
1558 catch (Exception e) 1558 catch (Exception e)
1559 { 1559 {
1560 m_log.ErrorFormat( 1560 m_log.ErrorFormat(
1561 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}", 1561 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}",
1562 e.Message, e.StackTrace); 1562 e.Message, e.StackTrace);
1563 } 1563 }
1564 } 1564 }
@@ -1579,7 +1579,7 @@ namespace OpenSim.Region.Framework.Scenes
1579 catch (Exception e) 1579 catch (Exception e)
1580 { 1580 {
1581 m_log.ErrorFormat( 1581 m_log.ErrorFormat(
1582 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}", 1582 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}",
1583 e.Message, e.StackTrace); 1583 e.Message, e.StackTrace);
1584 } 1584 }
1585 } 1585 }
@@ -1625,7 +1625,7 @@ namespace OpenSim.Region.Framework.Scenes
1625 catch (Exception e) 1625 catch (Exception e)
1626 { 1626 {
1627 m_log.ErrorFormat( 1627 m_log.ErrorFormat(
1628 "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}", 1628 "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}",
1629 e.Message, e.StackTrace); 1629 e.Message, e.StackTrace);
1630 } 1630 }
1631 } 1631 }
@@ -1646,7 +1646,7 @@ namespace OpenSim.Region.Framework.Scenes
1646 catch (Exception e) 1646 catch (Exception e)
1647 { 1647 {
1648 m_log.ErrorFormat( 1648 m_log.ErrorFormat(
1649 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}", 1649 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}",
1650 e.Message, e.StackTrace); 1650 e.Message, e.StackTrace);
1651 } 1651 }
1652 } 1652 }
@@ -1667,7 +1667,7 @@ namespace OpenSim.Region.Framework.Scenes
1667 catch (Exception e) 1667 catch (Exception e)
1668 { 1668 {
1669 m_log.ErrorFormat( 1669 m_log.ErrorFormat(
1670 "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}", 1670 "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}",
1671 e.Message, e.StackTrace); 1671 e.Message, e.StackTrace);
1672 } 1672 }
1673 } 1673 }
@@ -1688,7 +1688,7 @@ namespace OpenSim.Region.Framework.Scenes
1688 catch (Exception e) 1688 catch (Exception e)
1689 { 1689 {
1690 m_log.ErrorFormat( 1690 m_log.ErrorFormat(
1691 "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}", 1691 "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}",
1692 e.Message, e.StackTrace); 1692 e.Message, e.StackTrace);
1693 } 1693 }
1694 } 1694 }
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes
1709 catch (Exception e) 1709 catch (Exception e)
1710 { 1710 {
1711 m_log.ErrorFormat( 1711 m_log.ErrorFormat(
1712 "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}", 1712 "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}",
1713 e.Message, e.StackTrace); 1713 e.Message, e.StackTrace);
1714 } 1714 }
1715 } 1715 }
@@ -1730,7 +1730,7 @@ namespace OpenSim.Region.Framework.Scenes
1730 catch (Exception e) 1730 catch (Exception e)
1731 { 1731 {
1732 m_log.ErrorFormat( 1732 m_log.ErrorFormat(
1733 "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}", 1733 "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}",
1734 e.Message, e.StackTrace); 1734 e.Message, e.StackTrace);
1735 } 1735 }
1736 } 1736 }
@@ -1751,7 +1751,7 @@ namespace OpenSim.Region.Framework.Scenes
1751 catch (Exception e) 1751 catch (Exception e)
1752 { 1752 {
1753 m_log.ErrorFormat( 1753 m_log.ErrorFormat(
1754 "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}", 1754 "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}",
1755 e.Message, e.StackTrace); 1755 e.Message, e.StackTrace);
1756 } 1756 }
1757 } 1757 }
@@ -1772,7 +1772,7 @@ namespace OpenSim.Region.Framework.Scenes
1772 catch (Exception e) 1772 catch (Exception e)
1773 { 1773 {
1774 m_log.ErrorFormat( 1774 m_log.ErrorFormat(
1775 "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}", 1775 "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}",
1776 e.Message, e.StackTrace); 1776 e.Message, e.StackTrace);
1777 } 1777 }
1778 } 1778 }
@@ -1793,7 +1793,7 @@ namespace OpenSim.Region.Framework.Scenes
1793 catch (Exception e) 1793 catch (Exception e)
1794 { 1794 {
1795 m_log.ErrorFormat( 1795 m_log.ErrorFormat(
1796 "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}", 1796 "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}",
1797 e.Message, e.StackTrace); 1797 e.Message, e.StackTrace);
1798 } 1798 }
1799 } 1799 }
@@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Framework.Scenes
1814 catch (Exception e) 1814 catch (Exception e)
1815 { 1815 {
1816 m_log.ErrorFormat( 1816 m_log.ErrorFormat(
1817 "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}", 1817 "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}",
1818 e.Message, e.StackTrace); 1818 e.Message, e.StackTrace);
1819 } 1819 }
1820 } 1820 }
@@ -1835,7 +1835,7 @@ namespace OpenSim.Region.Framework.Scenes
1835 catch (Exception e) 1835 catch (Exception e)
1836 { 1836 {
1837 m_log.ErrorFormat( 1837 m_log.ErrorFormat(
1838 "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}", 1838 "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}",
1839 e.Message, e.StackTrace); 1839 e.Message, e.StackTrace);
1840 } 1840 }
1841 } 1841 }
@@ -1856,7 +1856,7 @@ namespace OpenSim.Region.Framework.Scenes
1856 catch (Exception e) 1856 catch (Exception e)
1857 { 1857 {
1858 m_log.ErrorFormat( 1858 m_log.ErrorFormat(
1859 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", 1859 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1860 e.Message, e.StackTrace); 1860 e.Message, e.StackTrace);
1861 m_log.ErrorFormat(Environment.StackTrace); 1861 m_log.ErrorFormat(Environment.StackTrace);
1862 } 1862 }
@@ -1867,7 +1867,7 @@ namespace OpenSim.Region.Framework.Scenes
1867 public bool TriggerGroupMove(UUID groupID, Vector3 delta) 1867 public bool TriggerGroupMove(UUID groupID, Vector3 delta)
1868 { 1868 {
1869 bool result = true; 1869 bool result = true;
1870 1870
1871 SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove; 1871 SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove;
1872 if (handlerSceneGroupMove != null) 1872 if (handlerSceneGroupMove != null)
1873 { 1873 {
@@ -1881,19 +1881,19 @@ namespace OpenSim.Region.Framework.Scenes
1881 catch (Exception e) 1881 catch (Exception e)
1882 { 1882 {
1883 m_log.ErrorFormat( 1883 m_log.ErrorFormat(
1884 "[EVENT MANAGER]: Delegate for TriggerGroupMove failed - continuing. {0} {1}", 1884 "[EVENT MANAGER]: Delegate for TriggerGroupMove failed - continuing. {0} {1}",
1885 e.Message, e.StackTrace); 1885 e.Message, e.StackTrace);
1886 } 1886 }
1887 } 1887 }
1888 } 1888 }
1889 1889
1890 return result; 1890 return result;
1891 } 1891 }
1892 1892
1893 public bool TriggerGroupSpinStart(UUID groupID) 1893 public bool TriggerGroupSpinStart(UUID groupID)
1894 { 1894 {
1895 bool result = true; 1895 bool result = true;
1896 1896
1897 SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart; 1897 SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart;
1898 if (handlerSceneGroupSpinStarted != null) 1898 if (handlerSceneGroupSpinStarted != null)
1899 { 1899 {
@@ -1907,19 +1907,19 @@ namespace OpenSim.Region.Framework.Scenes
1907 catch (Exception e) 1907 catch (Exception e)
1908 { 1908 {
1909 m_log.ErrorFormat( 1909 m_log.ErrorFormat(
1910 "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}", 1910 "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}",
1911 e.Message, e.StackTrace); 1911 e.Message, e.StackTrace);
1912 } 1912 }
1913 } 1913 }
1914 } 1914 }
1915 1915
1916 return result; 1916 return result;
1917 } 1917 }
1918 1918
1919 public bool TriggerGroupSpin(UUID groupID, Quaternion rotation) 1919 public bool TriggerGroupSpin(UUID groupID, Quaternion rotation)
1920 { 1920 {
1921 bool result = true; 1921 bool result = true;
1922 1922
1923 SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin; 1923 SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin;
1924 if (handlerSceneGroupSpin != null) 1924 if (handlerSceneGroupSpin != null)
1925 { 1925 {
@@ -1933,12 +1933,12 @@ namespace OpenSim.Region.Framework.Scenes
1933 catch (Exception e) 1933 catch (Exception e)
1934 { 1934 {
1935 m_log.ErrorFormat( 1935 m_log.ErrorFormat(
1936 "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}", 1936 "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}",
1937 e.Message, e.StackTrace); 1937 e.Message, e.StackTrace);
1938 } 1938 }
1939 } 1939 }
1940 } 1940 }
1941 1941
1942 return result; 1942 return result;
1943 } 1943 }
1944 1944
@@ -1956,7 +1956,7 @@ namespace OpenSim.Region.Framework.Scenes
1956 catch (Exception e) 1956 catch (Exception e)
1957 { 1957 {
1958 m_log.ErrorFormat( 1958 m_log.ErrorFormat(
1959 "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}", 1959 "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}",
1960 e.Message, e.StackTrace); 1960 e.Message, e.StackTrace);
1961 } 1961 }
1962 } 1962 }
@@ -1977,7 +1977,7 @@ namespace OpenSim.Region.Framework.Scenes
1977 catch (Exception e) 1977 catch (Exception e)
1978 { 1978 {
1979 m_log.ErrorFormat( 1979 m_log.ErrorFormat(
1980 "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}", 1980 "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}",
1981 e.Message, e.StackTrace); 1981 e.Message, e.StackTrace);
1982 } 1982 }
1983 } 1983 }
@@ -1998,7 +1998,7 @@ namespace OpenSim.Region.Framework.Scenes
1998 catch (Exception e) 1998 catch (Exception e)
1999 { 1999 {
2000 m_log.ErrorFormat( 2000 m_log.ErrorFormat(
2001 "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}", 2001 "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}",
2002 e.Message, e.StackTrace); 2002 e.Message, e.StackTrace);
2003 } 2003 }
2004 } 2004 }
@@ -2024,7 +2024,7 @@ namespace OpenSim.Region.Framework.Scenes
2024 catch (Exception e) 2024 catch (Exception e)
2025 { 2025 {
2026 m_log.ErrorFormat( 2026 m_log.ErrorFormat(
2027 "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}", 2027 "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}",
2028 e.Message, e.StackTrace); 2028 e.Message, e.StackTrace);
2029 } 2029 }
2030 } 2030 }
@@ -2045,7 +2045,7 @@ namespace OpenSim.Region.Framework.Scenes
2045 catch (Exception e) 2045 catch (Exception e)
2046 { 2046 {
2047 m_log.ErrorFormat( 2047 m_log.ErrorFormat(
2048 "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", 2048 "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}",
2049 e.Message, e.StackTrace); 2049 e.Message, e.StackTrace);
2050 } 2050 }
2051 } 2051 }
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Framework.Scenes
2087 catch (Exception e) 2087 catch (Exception e)
2088 { 2088 {
2089 m_log.ErrorFormat( 2089 m_log.ErrorFormat(
2090 "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}", 2090 "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}",
2091 e.Message, e.StackTrace); 2091 e.Message, e.StackTrace);
2092 } 2092 }
2093 } 2093 }
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.Framework.Scenes
2108 catch (Exception e) 2108 catch (Exception e)
2109 { 2109 {
2110 m_log.ErrorFormat( 2110 m_log.ErrorFormat(
2111 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", 2111 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
2112 e.Message, e.StackTrace); 2112 e.Message, e.StackTrace);
2113 } 2113 }
2114 } 2114 }
@@ -2127,12 +2127,12 @@ namespace OpenSim.Region.Framework.Scenes
2127// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString()); 2127// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString());
2128 d(ClientID, scene); 2128 d(ClientID, scene);
2129// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done "); 2129// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done ");
2130 2130
2131 } 2131 }
2132 catch (Exception e) 2132 catch (Exception e)
2133 { 2133 {
2134 m_log.ErrorFormat( 2134 m_log.ErrorFormat(
2135 "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}", 2135 "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}",
2136 e.Message, e.StackTrace); 2136 e.Message, e.StackTrace);
2137 } 2137 }
2138 } 2138 }
@@ -2153,7 +2153,7 @@ namespace OpenSim.Region.Framework.Scenes
2153 catch (Exception e) 2153 catch (Exception e)
2154 { 2154 {
2155 m_log.ErrorFormat( 2155 m_log.ErrorFormat(
2156 "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}", 2156 "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}",
2157 e.Message, e.StackTrace); 2157 e.Message, e.StackTrace);
2158 } 2158 }
2159 } 2159 }
@@ -2192,7 +2192,7 @@ namespace OpenSim.Region.Framework.Scenes
2192 catch (Exception e) 2192 catch (Exception e)
2193 { 2193 {
2194 m_log.ErrorFormat( 2194 m_log.ErrorFormat(
2195 "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}", 2195 "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}",
2196 e.Message, e.StackTrace); 2196 e.Message, e.StackTrace);
2197 } 2197 }
2198 } 2198 }
@@ -2213,7 +2213,7 @@ namespace OpenSim.Region.Framework.Scenes
2213 catch (Exception e) 2213 catch (Exception e)
2214 { 2214 {
2215 m_log.ErrorFormat( 2215 m_log.ErrorFormat(
2216 "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}", 2216 "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}",
2217 e.Message, e.StackTrace); 2217 e.Message, e.StackTrace);
2218 } 2218 }
2219 } 2219 }
@@ -2234,7 +2234,7 @@ namespace OpenSim.Region.Framework.Scenes
2234 catch (Exception e) 2234 catch (Exception e)
2235 { 2235 {
2236 m_log.ErrorFormat( 2236 m_log.ErrorFormat(
2237 "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}", 2237 "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}",
2238 e.Message, e.StackTrace); 2238 e.Message, e.StackTrace);
2239 } 2239 }
2240 } 2240 }
@@ -2255,7 +2255,7 @@ namespace OpenSim.Region.Framework.Scenes
2255 catch (Exception e) 2255 catch (Exception e)
2256 { 2256 {
2257 m_log.ErrorFormat( 2257 m_log.ErrorFormat(
2258 "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}", 2258 "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}",
2259 e.Message, e.StackTrace); 2259 e.Message, e.StackTrace);
2260 } 2260 }
2261 } 2261 }
@@ -2276,7 +2276,7 @@ namespace OpenSim.Region.Framework.Scenes
2276 catch (Exception e) 2276 catch (Exception e)
2277 { 2277 {
2278 m_log.ErrorFormat( 2278 m_log.ErrorFormat(
2279 "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}", 2279 "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}",
2280 e.Message, e.StackTrace); 2280 e.Message, e.StackTrace);
2281 } 2281 }
2282 } 2282 }
@@ -2297,7 +2297,7 @@ namespace OpenSim.Region.Framework.Scenes
2297 catch (Exception e) 2297 catch (Exception e)
2298 { 2298 {
2299 m_log.ErrorFormat( 2299 m_log.ErrorFormat(
2300 "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}", 2300 "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}",
2301 e.Message, e.StackTrace); 2301 e.Message, e.StackTrace);
2302 } 2302 }
2303 } 2303 }
@@ -2318,7 +2318,7 @@ namespace OpenSim.Region.Framework.Scenes
2318 catch (Exception e) 2318 catch (Exception e)
2319 { 2319 {
2320 m_log.ErrorFormat( 2320 m_log.ErrorFormat(
2321 "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}", 2321 "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}",
2322 e.Message, e.StackTrace); 2322 e.Message, e.StackTrace);
2323 } 2323 }
2324 } 2324 }
@@ -2339,7 +2339,7 @@ namespace OpenSim.Region.Framework.Scenes
2339 catch (Exception e) 2339 catch (Exception e)
2340 { 2340 {
2341 m_log.ErrorFormat( 2341 m_log.ErrorFormat(
2342 "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}", 2342 "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}",
2343 e.Message, e.StackTrace); 2343 e.Message, e.StackTrace);
2344 } 2344 }
2345 } 2345 }
@@ -2360,7 +2360,7 @@ namespace OpenSim.Region.Framework.Scenes
2360 catch (Exception e) 2360 catch (Exception e)
2361 { 2361 {
2362 m_log.ErrorFormat( 2362 m_log.ErrorFormat(
2363 "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}", 2363 "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}",
2364 e.Message, e.StackTrace); 2364 e.Message, e.StackTrace);
2365 } 2365 }
2366 } 2366 }
@@ -2381,7 +2381,7 @@ namespace OpenSim.Region.Framework.Scenes
2381 catch (Exception e) 2381 catch (Exception e)
2382 { 2382 {
2383 m_log.ErrorFormat( 2383 m_log.ErrorFormat(
2384 "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}", 2384 "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}",
2385 e.Message, e.StackTrace); 2385 e.Message, e.StackTrace);
2386 } 2386 }
2387 } 2387 }
@@ -2402,7 +2402,7 @@ namespace OpenSim.Region.Framework.Scenes
2402 catch (Exception e) 2402 catch (Exception e)
2403 { 2403 {
2404 m_log.ErrorFormat( 2404 m_log.ErrorFormat(
2405 "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}", 2405 "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}",
2406 e.Message, e.StackTrace); 2406 e.Message, e.StackTrace);
2407 } 2407 }
2408 } 2408 }
@@ -2471,7 +2471,7 @@ namespace OpenSim.Region.Framework.Scenes
2471 catch (Exception e) 2471 catch (Exception e)
2472 { 2472 {
2473 m_log.ErrorFormat( 2473 m_log.ErrorFormat(
2474 "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}", 2474 "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}",
2475 e.Message, e.StackTrace); 2475 e.Message, e.StackTrace);
2476 } 2476 }
2477 } 2477 }
@@ -2492,7 +2492,7 @@ namespace OpenSim.Region.Framework.Scenes
2492 catch (Exception e) 2492 catch (Exception e)
2493 { 2493 {
2494 m_log.ErrorFormat( 2494 m_log.ErrorFormat(
2495 "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}", 2495 "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}",
2496 e.Message, e.StackTrace); 2496 e.Message, e.StackTrace);
2497 } 2497 }
2498 } 2498 }
@@ -2513,7 +2513,7 @@ namespace OpenSim.Region.Framework.Scenes
2513 catch (Exception e) 2513 catch (Exception e)
2514 { 2514 {
2515 m_log.ErrorFormat( 2515 m_log.ErrorFormat(
2516 "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}", 2516 "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}",
2517 e.Message, e.StackTrace); 2517 e.Message, e.StackTrace);
2518 } 2518 }
2519 } 2519 }
@@ -2534,7 +2534,7 @@ namespace OpenSim.Region.Framework.Scenes
2534 catch (Exception e) 2534 catch (Exception e)
2535 { 2535 {
2536 m_log.ErrorFormat( 2536 m_log.ErrorFormat(
2537 "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}", 2537 "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}",
2538 e.Message, e.StackTrace); 2538 e.Message, e.StackTrace);
2539 } 2539 }
2540 } 2540 }
@@ -2555,16 +2555,16 @@ namespace OpenSim.Region.Framework.Scenes
2555 catch (Exception e) 2555 catch (Exception e)
2556 { 2556 {
2557 m_log.ErrorFormat( 2557 m_log.ErrorFormat(
2558 "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}", 2558 "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}",
2559 e.Message, e.StackTrace); 2559 e.Message, e.StackTrace);
2560 } 2560 }
2561 } 2561 }
2562 } 2562 }
2563 } 2563 }
2564 2564
2565 public void TriggerOnChatToClients( 2565 public void TriggerOnChatToClients(
2566 UUID senderID, HashSet<UUID> receiverIDs, 2566 UUID senderID, HashSet<UUID> receiverIDs,
2567 string message, ChatTypeEnum type, Vector3 fromPos, string fromName, 2567 string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
2568 ChatSourceType src, ChatAudibleLevel level) 2568 ChatSourceType src, ChatAudibleLevel level)
2569 { 2569 {
2570 ChatToClientsEvent handler = OnChatToClients; 2570 ChatToClientsEvent handler = OnChatToClients;
@@ -2579,7 +2579,7 @@ namespace OpenSim.Region.Framework.Scenes
2579 catch (Exception e) 2579 catch (Exception e)
2580 { 2580 {
2581 m_log.ErrorFormat( 2581 m_log.ErrorFormat(
2582 "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}", 2582 "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}",
2583 e.Message, e.StackTrace); 2583 e.Message, e.StackTrace);
2584 } 2584 }
2585 } 2585 }
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.Framework.Scenes
2600 catch (Exception e) 2600 catch (Exception e)
2601 { 2601 {
2602 m_log.ErrorFormat( 2602 m_log.ErrorFormat(
2603 "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}", 2603 "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}",
2604 e.Message, e.StackTrace); 2604 e.Message, e.StackTrace);
2605 } 2605 }
2606 } 2606 }
@@ -2621,7 +2621,7 @@ namespace OpenSim.Region.Framework.Scenes
2621 catch (Exception e) 2621 catch (Exception e)
2622 { 2622 {
2623 m_log.ErrorFormat( 2623 m_log.ErrorFormat(
2624 "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}", 2624 "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}",
2625 e.Message, e.StackTrace); 2625 e.Message, e.StackTrace);
2626 } 2626 }
2627 } 2627 }
@@ -2642,7 +2642,7 @@ namespace OpenSim.Region.Framework.Scenes
2642 catch (Exception e) 2642 catch (Exception e)
2643 { 2643 {
2644 m_log.ErrorFormat( 2644 m_log.ErrorFormat(
2645 "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}", 2645 "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}",
2646 e.Message, e.StackTrace); 2646 e.Message, e.StackTrace);
2647 } 2647 }
2648 } 2648 }
@@ -2663,7 +2663,7 @@ namespace OpenSim.Region.Framework.Scenes
2663 catch (Exception e) 2663 catch (Exception e)
2664 { 2664 {
2665 m_log.ErrorFormat( 2665 m_log.ErrorFormat(
2666 "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}", 2666 "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}",
2667 e.Message, e.StackTrace); 2667 e.Message, e.StackTrace);
2668 } 2668 }
2669 } 2669 }
@@ -2684,7 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes
2684 catch (Exception e) 2684 catch (Exception e)
2685 { 2685 {
2686 m_log.ErrorFormat( 2686 m_log.ErrorFormat(
2687 "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}", 2687 "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}",
2688 e.Message, e.StackTrace); 2688 e.Message, e.StackTrace);
2689 } 2689 }
2690 } 2690 }
@@ -2705,7 +2705,7 @@ namespace OpenSim.Region.Framework.Scenes
2705 catch (Exception e) 2705 catch (Exception e)
2706 { 2706 {
2707 m_log.ErrorFormat( 2707 m_log.ErrorFormat(
2708 "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}", 2708 "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}",
2709 e.Message, e.StackTrace); 2709 e.Message, e.StackTrace);
2710 } 2710 }
2711 } 2711 }
@@ -2726,7 +2726,7 @@ namespace OpenSim.Region.Framework.Scenes
2726 catch (Exception e) 2726 catch (Exception e)
2727 { 2727 {
2728 m_log.ErrorFormat( 2728 m_log.ErrorFormat(
2729 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}", 2729 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}",
2730 e.Message, e.StackTrace); 2730 e.Message, e.StackTrace);
2731 } 2731 }
2732 } 2732 }
@@ -2766,7 +2766,7 @@ namespace OpenSim.Region.Framework.Scenes
2766 catch (Exception e) 2766 catch (Exception e)
2767 { 2767 {
2768 m_log.ErrorFormat( 2768 m_log.ErrorFormat(
2769 "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}", 2769 "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}",
2770 e.Message, e.StackTrace); 2770 e.Message, e.StackTrace);
2771 } 2771 }
2772 } 2772 }
@@ -2787,12 +2787,12 @@ namespace OpenSim.Region.Framework.Scenes
2787 catch (Exception e) 2787 catch (Exception e)
2788 { 2788 {
2789 m_log.ErrorFormat( 2789 m_log.ErrorFormat(
2790 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", 2790 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
2791 e.Message, e.StackTrace); 2791 e.Message, e.StackTrace);
2792 } 2792 }
2793 } 2793 }
2794 } 2794 }
2795 2795
2796 return 6; 2796 return 6;
2797 } 2797 }
2798 2798
@@ -2810,13 +2810,13 @@ namespace OpenSim.Region.Framework.Scenes
2810 catch (Exception e) 2810 catch (Exception e)
2811 { 2811 {
2812 m_log.ErrorFormat( 2812 m_log.ErrorFormat(
2813 "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}", 2813 "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}",
2814 e.Message, e.StackTrace); 2814 e.Message, e.StackTrace);
2815 } 2815 }
2816 } 2816 }
2817 } 2817 }
2818 } 2818 }
2819 2819
2820 public void TriggerOarFileSaved(Guid requestId, string message) 2820 public void TriggerOarFileSaved(Guid requestId, string message)
2821 { 2821 {
2822 OarFileSaved handlerOarFileSaved = OnOarFileSaved; 2822 OarFileSaved handlerOarFileSaved = OnOarFileSaved;
@@ -2831,7 +2831,7 @@ namespace OpenSim.Region.Framework.Scenes
2831 catch (Exception e) 2831 catch (Exception e)
2832 { 2832 {
2833 m_log.ErrorFormat( 2833 m_log.ErrorFormat(
2834 "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}", 2834 "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}",
2835 e.Message, e.StackTrace); 2835 e.Message, e.StackTrace);
2836 } 2836 }
2837 } 2837 }
@@ -2852,7 +2852,7 @@ namespace OpenSim.Region.Framework.Scenes
2852 catch (Exception e) 2852 catch (Exception e)
2853 { 2853 {
2854 m_log.ErrorFormat( 2854 m_log.ErrorFormat(
2855 "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}", 2855 "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}",
2856 e.Message, e.StackTrace); 2856 e.Message, e.StackTrace);
2857 } 2857 }
2858 } 2858 }
@@ -2873,7 +2873,7 @@ namespace OpenSim.Region.Framework.Scenes
2873 catch (Exception e) 2873 catch (Exception e)
2874 { 2874 {
2875 m_log.ErrorFormat( 2875 m_log.ErrorFormat(
2876 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}", 2876 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}",
2877 e.Message, e.StackTrace); 2877 e.Message, e.StackTrace);
2878 } 2878 }
2879 } 2879 }
@@ -2894,7 +2894,7 @@ namespace OpenSim.Region.Framework.Scenes
2894 catch (Exception e) 2894 catch (Exception e)
2895 { 2895 {
2896 m_log.ErrorFormat( 2896 m_log.ErrorFormat(
2897 "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}", 2897 "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}",
2898 e.Message, e.StackTrace); 2898 e.Message, e.StackTrace);
2899 } 2899 }
2900 } 2900 }
@@ -2915,7 +2915,7 @@ namespace OpenSim.Region.Framework.Scenes
2915 catch (Exception e) 2915 catch (Exception e)
2916 { 2916 {
2917 m_log.ErrorFormat( 2917 m_log.ErrorFormat(
2918 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}", 2918 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}",
2919 e.Message, e.StackTrace); 2919 e.Message, e.StackTrace);
2920 } 2920 }
2921 } 2921 }
@@ -2936,7 +2936,7 @@ namespace OpenSim.Region.Framework.Scenes
2936 catch (Exception e) 2936 catch (Exception e)
2937 { 2937 {
2938 m_log.ErrorFormat( 2938 m_log.ErrorFormat(
2939 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}", 2939 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}",
2940 e.Message, e.StackTrace); 2940 e.Message, e.StackTrace);
2941 } 2941 }
2942 } 2942 }
@@ -2957,7 +2957,7 @@ namespace OpenSim.Region.Framework.Scenes
2957 catch (Exception e) 2957 catch (Exception e)
2958 { 2958 {
2959 m_log.ErrorFormat( 2959 m_log.ErrorFormat(
2960 "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}", 2960 "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}",
2961 e.Message, e.StackTrace); 2961 e.Message, e.StackTrace);
2962 } 2962 }
2963 } 2963 }
@@ -2978,7 +2978,7 @@ namespace OpenSim.Region.Framework.Scenes
2978 catch (Exception e) 2978 catch (Exception e)
2979 { 2979 {
2980 m_log.ErrorFormat( 2980 m_log.ErrorFormat(
2981 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}", 2981 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}",
2982 e.Message, e.StackTrace); 2982 e.Message, e.StackTrace);
2983 } 2983 }
2984 } 2984 }
@@ -2999,7 +2999,7 @@ namespace OpenSim.Region.Framework.Scenes
2999 catch (Exception e) 2999 catch (Exception e)
3000 { 3000 {
3001 m_log.ErrorFormat( 3001 m_log.ErrorFormat(
3002 "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}", 3002 "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}",
3003 e.Message, e.StackTrace); 3003 e.Message, e.StackTrace);
3004 } 3004 }
3005 } 3005 }
@@ -3020,13 +3020,13 @@ namespace OpenSim.Region.Framework.Scenes
3020 catch (Exception e) 3020 catch (Exception e)
3021 { 3021 {
3022 m_log.ErrorFormat( 3022 m_log.ErrorFormat(
3023 "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}", 3023 "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}",
3024 e.Message, e.StackTrace); 3024 e.Message, e.StackTrace);
3025 } 3025 }
3026 } 3026 }
3027 } 3027 }
3028 } 3028 }
3029 3029
3030 public void TriggerOnSceneObjectLoaded(SceneObjectGroup so) 3030 public void TriggerOnSceneObjectLoaded(SceneObjectGroup so)
3031 { 3031 {
3032 SceneObjectDelegate handler = OnSceneObjectLoaded; 3032 SceneObjectDelegate handler = OnSceneObjectLoaded;
@@ -3041,13 +3041,13 @@ namespace OpenSim.Region.Framework.Scenes
3041 catch (Exception e) 3041 catch (Exception e)
3042 { 3042 {
3043 m_log.ErrorFormat( 3043 m_log.ErrorFormat(
3044 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}", 3044 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}",
3045 e.Message, e.StackTrace); 3045 e.Message, e.StackTrace);
3046 } 3046 }
3047 } 3047 }
3048 } 3048 }
3049 } 3049 }
3050 3050
3051 public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) 3051 public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo)
3052 { 3052 {
3053 SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave; 3053 SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave;
@@ -3062,13 +3062,13 @@ namespace OpenSim.Region.Framework.Scenes
3062 catch (Exception e) 3062 catch (Exception e)
3063 { 3063 {
3064 m_log.ErrorFormat( 3064 m_log.ErrorFormat(
3065 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}", 3065 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}",
3066 e.Message, e.StackTrace); 3066 e.Message, e.StackTrace);
3067 } 3067 }
3068 } 3068 }
3069 } 3069 }
3070 } 3070 }
3071 3071
3072 public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) 3072 public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
3073 { 3073 {
3074 SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; 3074 SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy;
@@ -3083,7 +3083,7 @@ namespace OpenSim.Region.Framework.Scenes
3083 catch (Exception e) 3083 catch (Exception e)
3084 { 3084 {
3085 m_log.ErrorFormat( 3085 m_log.ErrorFormat(
3086 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", 3086 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}",
3087 e.Message, e.StackTrace); 3087 e.Message, e.StackTrace);
3088 } 3088 }
3089 } 3089 }
@@ -3104,7 +3104,7 @@ namespace OpenSim.Region.Framework.Scenes
3104 catch (Exception e) 3104 catch (Exception e)
3105 { 3105 {
3106 m_log.ErrorFormat( 3106 m_log.ErrorFormat(
3107 "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}", 3107 "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}",
3108 e.Message, e.StackTrace); 3108 e.Message, e.StackTrace);
3109 } 3109 }
3110 } 3110 }
@@ -3147,7 +3147,7 @@ namespace OpenSim.Region.Framework.Scenes
3147 catch (Exception e) 3147 catch (Exception e)
3148 { 3148 {
3149 m_log.ErrorFormat( 3149 m_log.ErrorFormat(
3150 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", 3150 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}",
3151 e.Message, e.StackTrace); 3151 e.Message, e.StackTrace);
3152 } 3152 }
3153 } 3153 }
@@ -3169,7 +3169,7 @@ namespace OpenSim.Region.Framework.Scenes
3169 catch (Exception e) 3169 catch (Exception e)
3170 { 3170 {
3171 m_log.ErrorFormat( 3171 m_log.ErrorFormat(
3172 "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}", 3172 "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}",
3173 e.Message, e.StackTrace); 3173 e.Message, e.StackTrace);
3174 } 3174 }
3175 } 3175 }
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
index cdd8d2d..e4aa196 100644
--- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
+++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
140 timer.Start(); 140 timer.Start();
141 }; 141 };
142 } 142 }
143 143
144 // Check again, in case the regions were started while we were adding the event handler 144 // Check again, in case the regions were started while we were adding the event handler
145 if (SceneManager.Instance.AllRegionsReady) 145 if (SceneManager.Instance.AllRegionsReady)
146 { 146 {
@@ -821,7 +821,7 @@ namespace OpenSim.Region.Framework.Scenes
821 821
822 SceneObjectGroup tmp = m_group; 822 SceneObjectGroup tmp = m_group;
823 m_group = null; 823 m_group = null;
824 824
825 using (MemoryStream ms = new MemoryStream()) 825 using (MemoryStream ms = new MemoryStream())
826 { 826 {
827 BinaryFormatter fmt = new BinaryFormatter(); 827 BinaryFormatter fmt = new BinaryFormatter();
@@ -839,10 +839,10 @@ namespace OpenSim.Region.Framework.Scenes
839 public void StartCrossingCheck() 839 public void StartCrossingCheck()
840 { 840 {
841 // timer will be restart by crossingFailure 841 // timer will be restart by crossingFailure
842 // or never since crossing worked and this 842 // or never since crossing worked and this
843 // should be deleted 843 // should be deleted
844 StopTimer(); 844 StopTimer();
845 845
846 m_isCrossing = true; 846 m_isCrossing = true;
847 m_waitingCrossing = true; 847 m_waitingCrossing = true;
848 848
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 97009a0..cbf40c8 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.PhysicsModules.SharedBase;
35 35
36/* 36/*
37 * Steps to add a new prioritization policy: 37 * Steps to add a new prioritization policy:
38 * 38 *
39 * - Add a new value to the UpdatePrioritizationSchemes enum. 39 * - Add a new value to the UpdatePrioritizationSchemes enum.
40 * - Specify this new value in the [InterestManagement] section of your 40 * - Specify this new value in the [InterestManagement] section of your
41 * OpenSim.ini. The name in the config file must match the enum value name 41 * OpenSim.ini. The name in the config file must match the enum value name
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Framework.Scenes
59 public class Prioritizer 59 public class Prioritizer
60 { 60 {
61 private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 private Scene m_scene; 63 private Scene m_scene;
64 64
65 public Prioritizer(Scene scene) 65 public Prioritizer(Scene scene)
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes
91 return 0; 91 return 0;
92 92
93 uint priority; 93 uint priority;
94 94
95 switch (m_scene.UpdatePrioritizationScheme) 95 switch (m_scene.UpdatePrioritizationScheme)
96 { 96 {
97/* 97/*
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Scenes
116 priority = GetPriorityByBestAvatarResponsiveness(client, entity); 116 priority = GetPriorityByBestAvatarResponsiveness(client, entity);
117 break; 117 break;
118 } 118 }
119 119
120 return priority; 120 return priority;
121 } 121 }
122 122
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes
145 145
146 return ComputeDistancePriority(client,entity,false); 146 return ComputeDistancePriority(client,entity,false);
147 } 147 }
148 148
149 private uint GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity) 149 private uint GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity)
150 { 150 {
151 // And anything attached to this avatar gets top priority as well 151 // And anything attached to this avatar gets top priority as well
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Framework.Scenes
172 172
173 if (entity is SceneObjectPart) 173 if (entity is SceneObjectPart)
174 { 174 {
175 // Attachments are high priority, 175 // Attachments are high priority,
176 if (((SceneObjectPart)entity).ParentGroup.IsAttachment) 176 if (((SceneObjectPart)entity).ParentGroup.IsAttachment)
177 return 2; 177 return 2;
178 178
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Framework.Scenes
196 ScenePresence presence = m_scene.GetScenePresence(client.AgentId); 196 ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
197 if (presence == null) 197 if (presence == null)
198 { 198 {
199 // this shouldn't happen, it basically means that we are prioritizing 199 // this shouldn't happen, it basically means that we are prioritizing
200 // updates to send to a client that doesn't have a presence in the scene 200 // updates to send to a client that doesn't have a presence in the scene
201 // seems like there's race condition here... 201 // seems like there's race condition here...
202 202
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Framework.Scenes
204 // throw new InvalidOperationException("Prioritization agent not defined"); 204 // throw new InvalidOperationException("Prioritization agent not defined");
205 return PriorityQueue.NumberOfQueues - 1; 205 return PriorityQueue.NumberOfQueues - 1;
206 } 206 }
207 207
208 // Use group position for child prims, since we are putting child prims in 208 // Use group position for child prims, since we are putting child prims in
209 // the same queue with the root of the group, the root prim (which goes into 209 // the same queue with the root of the group, the root prim (which goes into
210 // the queue first) should always be sent first, no need to adjust child prim 210 // the queue first) should always be sent first, no need to adjust child prim
@@ -227,14 +227,14 @@ namespace OpenSim.Region.Framework.Scenes
227 227
228 Vector3 presencePos = presence.AbsolutePosition; 228 Vector3 presencePos = presence.AbsolutePosition;
229 229
230 // Compute the distance... 230 // Compute the distance...
231 double distance = Vector3.Distance(presencePos, entityPos); 231 double distance = Vector3.Distance(presencePos, entityPos);
232 232
233 // And convert the distance to a priority queue, this computation gives queues 233 // And convert the distance to a priority queue, this computation gives queues
234 // at 10, 20, 40, 80, 160, 320, 640, and 1280m 234 // at 10, 20, 40, 80, 160, 320, 640, and 1280m
235 uint pqueue = PriorityQueue.NumberOfImmediateQueues + 1; // reserve attachments queue 235 uint pqueue = PriorityQueue.NumberOfImmediateQueues + 1; // reserve attachments queue
236 uint queues = PriorityQueue.NumberOfQueues - PriorityQueue.NumberOfImmediateQueues; 236 uint queues = PriorityQueue.NumberOfQueues - PriorityQueue.NumberOfImmediateQueues;
237/* 237/*
238 for (int i = 0; i < queues - 1; i++) 238 for (int i = 0; i < queues - 1; i++)
239 { 239 {
240 if (distance < 30 * Math.Pow(2.0,i)) 240 if (distance < 30 * Math.Pow(2.0,i))
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Framework.Scenes
246 { 246 {
247 float tmp = (float)Math.Log((double)distance) * 1.442695f - 3.321928f; 247 float tmp = (float)Math.Log((double)distance) * 1.442695f - 3.321928f;
248 // for a map identical to original: 248 // for a map identical to original:
249 // now 249 // now
250 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) 250 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance)
251 // 2st constant makes it be log2(distance/10) 251 // 2st constant makes it be log2(distance/10)
252 pqueue += (uint)tmp; 252 pqueue += (uint)tmp;
@@ -265,7 +265,7 @@ namespace OpenSim.Region.Framework.Scenes
265 // Plane equation 265 // Plane equation
266 float d = -Vector3.Dot(camPosition, camAtAxis); 266 float d = -Vector3.Dot(camPosition, camAtAxis);
267 float p = Vector3.Dot(camAtAxis, entityPos) + d; 267 float p = Vector3.Dot(camAtAxis, entityPos) + d;
268 if (p < 0.0f) 268 if (p < 0.0f)
269 pqueue++; 269 pqueue++;
270 } 270 }
271 271
@@ -291,7 +291,7 @@ namespace OpenSim.Region.Framework.Scenes
291// uint pqueue = minpqueue; 291// uint pqueue = minpqueue;
292 uint pqueue = PriorityQueue.NumberOfImmediateQueues; 292 uint pqueue = PriorityQueue.NumberOfImmediateQueues;
293 float distance; 293 float distance;
294 294
295 Vector3 presencePos = presence.AbsolutePosition; 295 Vector3 presencePos = presence.AbsolutePosition;
296 if(entity is ScenePresence) 296 if(entity is ScenePresence)
297 { 297 {
@@ -319,10 +319,10 @@ namespace OpenSim.Region.Framework.Scenes
319 { 319 {
320 float tmp = (float)Math.Log(distance) * 1.442695f - 3.321928f; 320 float tmp = (float)Math.Log(distance) * 1.442695f - 3.321928f;
321 // for a map identical to original: 321 // for a map identical to original:
322 // now 322 // now
323 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) 323 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance)
324 // 2st constant makes it be log2(distance/10) 324 // 2st constant makes it be log2(distance/10)
325 325
326 pqueue += (uint)tmp; 326 pqueue += (uint)tmp;
327 if (pqueue > maxqueue) 327 if (pqueue > maxqueue)
328 pqueue = maxqueue; 328 pqueue = maxqueue;
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
index 3b31281..bf58885 100644
--- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
+++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
@@ -55,13 +55,13 @@ namespace OpenSim.Region.Framework.Scenes
55 public string localZone = TimeZone.CurrentTimeZone.StandardName; 55 public string localZone = TimeZone.CurrentTimeZone.StandardName;
56 public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); 56 public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
57 57
58 public RegionStatsHandler(RegionInfo region_info) 58 public RegionStatsHandler(RegionInfo region_info)
59 : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics") 59 : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics")
60 { 60 {
61 regionInfo = region_info; 61 regionInfo = region_info;
62 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); 62 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
63 } 63 }
64 64
65 protected override byte[] ProcessRequest( 65 protected override byte[] ProcessRequest(
66 string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 66 string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
67 { 67 {
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Framework.Scenes
72 { 72 {
73 get { return "text/plain"; } 73 get { return "text/plain"; }
74 } 74 }
75 75
76 private string Report() 76 private string Report()
77 { 77 {
78 OSDMap args = new OSDMap(30); 78 OSDMap args = new OSDMap(30);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes
83 args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now)); 83 args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now));
84 args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); 84 args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
85 args["Version"] = OSD.FromString(VersionInfo.Version); 85 args["Version"] = OSD.FromString(VersionInfo.Version);
86 86
87 string strBuffer = ""; 87 string strBuffer = "";
88 strBuffer = OSDParser.SerializeJsonString(args); 88 strBuffer = OSDParser.SerializeJsonString(args);
89 89
diff --git a/OpenSim/Region/Framework/Scenes/SOPMaterial.cs b/OpenSim/Region/Framework/Scenes/SOPMaterial.cs
index 10ac37c..651c52e 100644
--- a/OpenSim/Region/Framework/Scenes/SOPMaterial.cs
+++ b/OpenSim/Region/Framework/Scenes/SOPMaterial.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Framework.Scenes
34{ 34{
35 public static class SOPMaterialData 35 public static class SOPMaterialData
36 { 36 {
37 public enum SopMaterial : int // redundante and not in use for now 37 public enum SopMaterial : int // redundante and not in use for now
38 { 38 {
39 Stone = 0, 39 Stone = 0,
40 Metal = 1, 40 Metal = 1,
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
index 897918a..8d11331 100644
--- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
+++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
@@ -571,7 +571,7 @@ namespace OpenSim.Region.Framework.Scenes
571 return errors; 571 return errors;
572 } 572 }
573 573
574 574
575 public string ToXml2() 575 public string ToXml2()
576 { 576 {
577 using (StringWriter sw = new StringWriter()) 577 using (StringWriter sw = new StringWriter())
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 61ea8ac..e3ccf96 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes
164 m_log.DebugFormat( 164 m_log.DebugFormat(
165 "[AGENT INVENTORY]: Found folder {0} type {1} for item {2}", 165 "[AGENT INVENTORY]: Found folder {0} type {1} for item {2}",
166 f.Name, (AssetType)f.Type, item.Name); 166 f.Name, (AssetType)f.Type, item.Name);
167 167
168 item.Folder = f.ID; 168 item.Folder = f.ID;
169 } 169 }
170 else 170 else
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Framework.Scenes
338 // Update item with new asset 338 // Update item with new asset
339 item.AssetID = asset.FullID; 339 item.AssetID = asset.FullID;
340 group.UpdateInventoryItem(item); 340 group.UpdateInventoryItem(item);
341 341
342 part.SendPropertiesToClient(remoteClient); 342 part.SendPropertiesToClient(remoteClient);
343 343
344 // Trigger rerunning of script (use TriggerRezScript event, see RezScript) 344 // Trigger rerunning of script (use TriggerRezScript event, see RezScript)
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Framework.Scenes
519 // needs to be found. If inventory item flags are updated 519 // needs to be found. If inventory item flags are updated
520 // the viewer's notion of the item needs to be refreshed. 520 // the viewer's notion of the item needs to be refreshed.
521 // 521 //
522 // In other situations we cannot send out a bulk update here, since this will cause editing of clothing to start 522 // In other situations we cannot send out a bulk update here, since this will cause editing of clothing to start
523 // failing frequently. Possibly this is a race with a separate transaction that uploads the asset. 523 // failing frequently. Possibly this is a race with a separate transaction that uploads the asset.
524 if (sendUpdate) 524 if (sendUpdate)
525 remoteClient.SendBulkUpdateInventory(item); 525 remoteClient.SendBulkUpdateInventory(item);
@@ -734,7 +734,7 @@ namespace OpenSim.Region.Framework.Scenes
734 itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions; 734 itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
735 itemCopy.BasePermissions = item.BasePermissions; 735 itemCopy.BasePermissions = item.BasePermissions;
736 } 736 }
737 737
738 if (itemCopy.Folder == UUID.Zero) 738 if (itemCopy.Folder == UUID.Zero)
739 { 739 {
740 InventoryFolderBase folder = null; 740 InventoryFolderBase folder = null;
@@ -826,7 +826,7 @@ namespace OpenSim.Region.Framework.Scenes
826 } 826 }
827 827
828 UUID newFolderId = UUID.Random(); 828 UUID newFolderId = UUID.Random();
829 InventoryFolderBase newFolder 829 InventoryFolderBase newFolder
830 = new InventoryFolderBase( 830 = new InventoryFolderBase(
831 newFolderId, folder.Name, recipientId, folder.Type, recipientParentFolderId, folder.Version); 831 newFolderId, folder.Name, recipientId, folder.Type, recipientParentFolderId, folder.Version);
832 InventoryService.AddFolder(newFolder); 832 InventoryService.AddFolder(newFolder);
@@ -906,7 +906,7 @@ namespace OpenSim.Region.Framework.Scenes
906 item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch(), false); 906 item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch(), false);
907 } 907 }
908 else 908 else
909 { 909 {
910 // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item. 910 // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item.
911 if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) 911 if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0)
912 && (m_permissions.BypassPermissions() 912 && (m_permissions.BypassPermissions()
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Framework.Scenes
954 moveitems.Add(n); 954 moveitems.Add(n);
955 remoteClient.SendInventoryItemCreateUpdate(n, 0); 955 remoteClient.SendInventoryItemCreateUpdate(n, 0);
956 } 956 }
957 957
958 MoveInventoryItem(remoteClient, moveitems); 958 MoveInventoryItem(remoteClient, moveitems);
959 } 959 }
960 960
@@ -1308,9 +1308,9 @@ namespace OpenSim.Region.Framework.Scenes
1308 public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, out string message) 1308 public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, out string message)
1309 { 1309 {
1310 m_log.DebugFormat( 1310 m_log.DebugFormat(
1311 "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}", 1311 "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}",
1312 itemId, part.Name, folderId, remoteClient.Name); 1312 itemId, part.Name, folderId, remoteClient.Name);
1313 1313
1314 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId, out message); 1314 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId, out message);
1315 if (agentItem == null) 1315 if (agentItem == null)
1316 return null; 1316 return null;
@@ -1377,7 +1377,7 @@ namespace OpenSim.Region.Framework.Scenes
1377 1377
1378 string message; 1378 string message;
1379 InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message); 1379 InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message);
1380 1380
1381 if (item == null) 1381 if (item == null)
1382 remoteClient.SendAgentAlertMessage(message, false); 1382 remoteClient.SendAgentAlertMessage(message, false);
1383 } 1383 }
@@ -1712,7 +1712,7 @@ namespace OpenSim.Region.Framework.Scenes
1712 else // Updating existing item with new perms etc 1712 else // Updating existing item with new perms etc
1713 { 1713 {
1714// m_log.DebugFormat( 1714// m_log.DebugFormat(
1715// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", 1715// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()",
1716// currentItem.Name, part.Name); 1716// currentItem.Name, part.Name);
1717 1717
1718 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the 1718 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
@@ -1924,12 +1924,12 @@ namespace OpenSim.Region.Framework.Scenes
1924 return null; 1924 return null;
1925 } 1925 }
1926 1926
1927 AssetBase asset 1927 AssetBase asset
1928 = CreateAsset( 1928 = CreateAsset(
1929 itemBase.Name, 1929 itemBase.Name,
1930 itemBase.Description, 1930 itemBase.Description,
1931 (sbyte)itemBase.AssetType, 1931 (sbyte)itemBase.AssetType,
1932 Encoding.ASCII.GetBytes(scriptText), 1932 Encoding.ASCII.GetBytes(scriptText),
1933 agentID); 1933 agentID);
1934 1934
1935 AssetService.Store(asset); 1935 AssetService.Store(asset);
@@ -2008,8 +2008,8 @@ namespace OpenSim.Region.Framework.Scenes
2008 if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || 2008 if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) ||
2009 ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0)) 2009 ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0))
2010 return; 2010 return;
2011 } 2011 }
2012 else 2012 else
2013 { 2013 {
2014 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 2014 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
2015 return; 2015 return;
@@ -2102,7 +2102,7 @@ namespace OpenSim.Region.Framework.Scenes
2102 List<uint> deleteIDs = new List<uint>(); 2102 List<uint> deleteIDs = new List<uint>();
2103 List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>(); 2103 List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>();
2104 List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); 2104 List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>();
2105 2105
2106 // Start with true for both, then remove the flags if objects 2106 // Start with true for both, then remove the flags if objects
2107 // that we can't derez are part of the selection 2107 // that we can't derez are part of the selection
2108 bool permissionToTake = true; 2108 bool permissionToTake = true;
@@ -2146,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes
2146 if (action != DeRezAction.Return) 2146 if (action != DeRezAction.Return)
2147 { 2147 {
2148 m_log.WarnFormat( 2148 m_log.WarnFormat(
2149 "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client", 2149 "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client",
2150 action, grp.Name, grp.UUID); 2150 action, grp.Name, grp.UUID);
2151 return; 2151 return;
2152 } 2152 }
@@ -2166,7 +2166,7 @@ namespace OpenSim.Region.Framework.Scenes
2166 } 2166 }
2167 if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) 2167 if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
2168 permissionToTake = false; 2168 permissionToTake = false;
2169 2169
2170 if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) 2170 if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
2171 permissionToDelete = false; 2171 permissionToDelete = false;
2172 } 2172 }
@@ -2471,9 +2471,9 @@ namespace OpenSim.Region.Framework.Scenes
2471 bool RezSelected, bool RemoveItem, UUID fromTaskID) 2471 bool RezSelected, bool RemoveItem, UUID fromTaskID)
2472 { 2472 {
2473// m_log.DebugFormat( 2473// m_log.DebugFormat(
2474// "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}", 2474// "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}",
2475// remoteClient.Name, itemID, fromTaskID); 2475// remoteClient.Name, itemID, fromTaskID);
2476 2476
2477 if (fromTaskID == UUID.Zero) 2477 if (fromTaskID == UUID.Zero)
2478 { 2478 {
2479 IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); 2479 IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>();
@@ -2483,37 +2483,37 @@ namespace OpenSim.Region.Framework.Scenes
2483 RezSelected, RemoveItem, fromTaskID, false); 2483 RezSelected, RemoveItem, fromTaskID, false);
2484 } 2484 }
2485 else 2485 else
2486 { 2486 {
2487 SceneObjectPart part = GetSceneObjectPart(fromTaskID); 2487 SceneObjectPart part = GetSceneObjectPart(fromTaskID);
2488 if (part == null) 2488 if (part == null)
2489 { 2489 {
2490 m_log.ErrorFormat( 2490 m_log.ErrorFormat(
2491 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object", 2491 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object",
2492 remoteClient.Name, itemID, fromTaskID); 2492 remoteClient.Name, itemID, fromTaskID);
2493 2493
2494 return; 2494 return;
2495 } 2495 }
2496 2496
2497 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); 2497 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID);
2498 if (item == null) 2498 if (item == null)
2499 { 2499 {
2500 m_log.ErrorFormat( 2500 m_log.ErrorFormat(
2501 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item", 2501 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item",
2502 remoteClient.Name, itemID, fromTaskID); 2502 remoteClient.Name, itemID, fromTaskID);
2503 2503
2504 return; 2504 return;
2505 } 2505 }
2506 2506
2507 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 2507 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
2508 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); 2508 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
2509 Vector3 pos = GetNewRezLocation( 2509 Vector3 pos = GetNewRezLocation(
2510 RayStart, RayEnd, RayTargetID, Quaternion.Identity, 2510 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
2511 BypassRayCast, bRayEndIsIntersection, true, scale, false); 2511 BypassRayCast, bRayEndIsIntersection, true, scale, false);
2512 2512
2513 RezObject(part, item, pos, null, Vector3.Zero, 0, false); 2513 RezObject(part, item, pos, null, Vector3.Zero, 0, false);
2514 } 2514 }
2515 } 2515 }
2516 2516
2517 /// <summary> 2517 /// <summary>
2518 /// Rez an object into the scene from a prim's inventory. 2518 /// Rez an object into the scene from a prim's inventory.
2519 /// </summary> 2519 /// </summary>
@@ -2691,7 +2691,7 @@ namespace OpenSim.Region.Framework.Scenes
2691 { 2691 {
2692 if (ownerID != UUID.Zero) 2692 if (ownerID != UUID.Zero)
2693 return; 2693 return;
2694 2694
2695 if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID)) 2695 if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID))
2696 return; 2696 return;
2697 } 2697 }
@@ -2701,8 +2701,8 @@ namespace OpenSim.Region.Framework.Scenes
2701 foreach (uint localID in localIDs) 2701 foreach (uint localID in localIDs)
2702 { 2702 {
2703 SceneObjectPart part = GetSceneObjectPart(localID); 2703 SceneObjectPart part = GetSceneObjectPart(localID);
2704 if (part == null) 2704 if (part == null)
2705 continue; 2705 continue;
2706 2706
2707 if (!groups.Contains(part.ParentGroup)) 2707 if (!groups.Contains(part.ParentGroup))
2708 groups.Add(part.ParentGroup); 2708 groups.Add(part.ParentGroup);
@@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Framework.Scenes
2717 sog.ScheduleGroupForFullUpdate(); 2717 sog.ScheduleGroupForFullUpdate();
2718 2718
2719 SceneObjectPart[] partList = sog.Parts; 2719 SceneObjectPart[] partList = sog.Parts;
2720 2720
2721 foreach (SceneObjectPart child in partList) 2721 foreach (SceneObjectPart child in partList)
2722 { 2722 {
2723 child.Inventory.ChangeInventoryOwner(ownerID); 2723 child.Inventory.ChangeInventoryOwner(ownerID);
@@ -2756,8 +2756,8 @@ namespace OpenSim.Region.Framework.Scenes
2756 foreach (uint localID in localIDs) 2756 foreach (uint localID in localIDs)
2757 { 2757 {
2758 SceneObjectPart part = GetSceneObjectPart(localID); 2758 SceneObjectPart part = GetSceneObjectPart(localID);
2759 if (part == null) 2759 if (part == null)
2760 continue; 2760 continue;
2761 part.SendPropertiesToClient(remoteClient); 2761 part.SendPropertiesToClient(remoteClient);
2762 } 2762 }
2763 } 2763 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 24a2db7..2d62b50 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Framework.Scenes
86 else 86 else
87 EventManager.TriggerOnChatFromWorld(this, args); 87 EventManager.TriggerOnChatFromWorld(this, args);
88 } 88 }
89 89
90 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, 90 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
91 UUID fromID, bool fromAgent, bool broadcast) 91 UUID fromID, bool fromAgent, bool broadcast)
92 { 92 {
@@ -212,13 +212,13 @@ namespace OpenSim.Region.Framework.Scenes
212 if (groupID != UUID.Zero) 212 if (groupID != UUID.Zero)
213 { 213 {
214 GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId); 214 GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId);
215 215
216 if (gmd == null) 216 if (gmd == null)
217 { 217 {
218// m_log.WarnFormat( 218// m_log.WarnFormat(
219// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", 219// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group",
220// remoteClient.Name, GroupID, objectLocalID); 220// remoteClient.Name, GroupID, objectLocalID);
221 221
222 return; 222 return;
223 } 223 }
224 } 224 }
@@ -243,7 +243,7 @@ namespace OpenSim.Region.Framework.Scenes
243 SceneObjectPart part = GetSceneObjectPart(primLocalID); 243 SceneObjectPart part = GetSceneObjectPart(primLocalID);
244 if (part == null) 244 if (part == null)
245 return; 245 return;
246 246
247 bool oldgprSelect = part.ParentGroup.IsSelected; 247 bool oldgprSelect = part.ParentGroup.IsSelected;
248 248
249 // This is wrong, wrong, wrong. Selection should not be 249 // This is wrong, wrong, wrong. Selection should not be
@@ -259,14 +259,14 @@ namespace OpenSim.Region.Framework.Scenes
259 259
260 // restore targetOmega 260 // restore targetOmega
261 if (part.AngularVelocity != Vector3.Zero) 261 if (part.AngularVelocity != Vector3.Zero)
262 part.ScheduleTerseUpdate(); 262 part.ScheduleTerseUpdate();
263 } 263 }
264 } 264 }
265 265
266 public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount, 266 public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount,
267 int transactiontype, string description) 267 int transactiontype, string description)
268 { 268 {
269 EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount, 269 EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount,
270 transactiontype, description); 270 transactiontype, description);
271 271
272 EventManager.TriggerMoneyTransfer(this, args); 272 EventManager.TriggerMoneyTransfer(this, args);
@@ -275,8 +275,8 @@ namespace OpenSim.Region.Framework.Scenes
275 public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned, 275 public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
276 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) 276 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
277 { 277 {
278 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned, 278 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned,
279 removeContribution, parcelLocalID, parcelArea, 279 removeContribution, parcelLocalID, parcelArea,
280 parcelPrice, authenticated); 280 parcelPrice, authenticated);
281 281
282 // First, allow all validators a stab at it 282 // First, allow all validators a stab at it
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Framework.Scenes
289 public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) 289 public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
290 { 290 {
291 SceneObjectPart part = GetSceneObjectPart(localID); 291 SceneObjectPart part = GetSceneObjectPart(localID);
292 292
293 if (part == null) 293 if (part == null)
294 return; 294 return;
295 295
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Framework.Scenes
302 // Currently only grab/touch for the single prim 302 // Currently only grab/touch for the single prim
303 // the client handles rez correctly 303 // the client handles rez correctly
304 obj.ObjectGrabHandler(localID, offsetPos, remoteClient); 304 obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
305 305
306 // If the touched prim handles touches, deliver it 306 // If the touched prim handles touches, deliver it
307 if ((part.ScriptEvents & scriptEvents.touch_start) != 0) 307 if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
308 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 308 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
@@ -310,7 +310,7 @@ namespace OpenSim.Region.Framework.Scenes
310 // Deliver to the root prim if the touched prim doesn't handle touches 310 // Deliver to the root prim if the touched prim doesn't handle touches
311 // or if we're meant to pass on touches anyway. 311 // or if we're meant to pass on touches anyway.
312 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) || 312 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
313 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) 313 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
314 { 314 {
315 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); 315 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
316 } 316 }
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Framework.Scenes
337 // get's it's position on the simulator even if it was the same as before 337 // get's it's position on the simulator even if it was the same as before
338 // This keeps the moving user's client in sync with the rest of the world. 338 // This keeps the moving user's client in sync with the rest of the world.
339 group.SendGroupTerseUpdate(); 339 group.SendGroupTerseUpdate();
340 340
341 SurfaceTouchEventArgs surfaceArg = null; 341 SurfaceTouchEventArgs surfaceArg = null;
342 if (surfaceArgs != null && surfaceArgs.Count > 0) 342 if (surfaceArgs != null && surfaceArgs.Count > 0)
343 surfaceArg = surfaceArgs[0]; 343 surfaceArg = surfaceArgs[0];
@@ -483,7 +483,7 @@ namespace OpenSim.Region.Framework.Scenes
483 } 483 }
484 }); 484 });
485 } 485 }
486 486
487 private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other) 487 private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other)
488 { 488 {
489 return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10; 489 return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10;
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes
603 m_descendentsRequestProcessing = false; 603 m_descendentsRequestProcessing = false;
604 } 604 }
605 } 605 }
606 606
607 /// <summary> 607 /// <summary>
608 /// Handle an inventory folder creation request from the client. 608 /// Handle an inventory folder creation request from the client.
609 /// </summary> 609 /// </summary>
@@ -657,7 +657,7 @@ namespace OpenSim.Region.Framework.Scenes
657 } 657 }
658 } 658 }
659 } 659 }
660 660
661 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) 661 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
662 { 662 {
663 InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID); 663 InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index b26b789..893b38c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -35,7 +35,7 @@ using OpenSim.Framework;
35using OpenSim.Region.Framework.Interfaces; 35using OpenSim.Region.Framework.Interfaces;
36 36
37namespace OpenSim.Region.Framework.Scenes 37namespace OpenSim.Region.Framework.Scenes
38{ 38{
39 #region Delegates 39 #region Delegates
40 public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID); 40 public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID);
41 public delegate void SetBypassPermissionsHandler(bool value); 41 public delegate void SetBypassPermissionsHandler(bool value);
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Framework.Scenes
98 public class ScenePermissions 98 public class ScenePermissions
99 { 99 {
100// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 100// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
101 101
102 private Scene m_scene; 102 private Scene m_scene;
103 103
104 public ScenePermissions(Scene scene) 104 public ScenePermissions(Scene scene)
@@ -261,7 +261,7 @@ namespace OpenSim.Region.Framework.Scenes
261 public bool CanDeleteObject(UUID objectID, UUID deleter) 261 public bool CanDeleteObject(UUID objectID, UUID deleter)
262 { 262 {
263 bool result = true; 263 bool result = true;
264 264
265 DeleteObjectHandler handler = OnDeleteObject; 265 DeleteObjectHandler handler = OnDeleteObject;
266 if (handler != null) 266 if (handler != null)
267 { 267 {
@@ -275,14 +275,14 @@ namespace OpenSim.Region.Framework.Scenes
275 } 275 }
276 } 276 }
277 } 277 }
278 278
279 return result; 279 return result;
280 } 280 }
281 281
282 public bool CanTransferObject(UUID objectID, UUID recipient) 282 public bool CanTransferObject(UUID objectID, UUID recipient)
283 { 283 {
284 bool result = true; 284 bool result = true;
285 285
286 TransferObjectHandler handler = OnTransferObject; 286 TransferObjectHandler handler = OnTransferObject;
287 if (handler != null) 287 if (handler != null)
288 { 288 {
@@ -296,7 +296,7 @@ namespace OpenSim.Region.Framework.Scenes
296 } 296 }
297 } 297 }
298 } 298 }
299 299
300 return result; 300 return result;
301 } 301 }
302 302
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Framework.Scenes
306 public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID) 306 public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID)
307 { 307 {
308 bool result = true; 308 bool result = true;
309 309
310 TakeObjectHandler handler = OnTakeObject; 310 TakeObjectHandler handler = OnTakeObject;
311 if (handler != null) 311 if (handler != null)
312 { 312 {
@@ -320,11 +320,11 @@ namespace OpenSim.Region.Framework.Scenes
320 } 320 }
321 } 321 }
322 } 322 }
323 323
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "[SCENE PERMISSIONS]: CanTakeObject() fired for object {0}, taker {1}, result {2}", 325// "[SCENE PERMISSIONS]: CanTakeObject() fired for object {0}, taker {1}, result {2}",
326// objectID, AvatarTakingUUID, result); 326// objectID, AvatarTakingUUID, result);
327 327
328 return result; 328 return result;
329 } 329 }
330 330
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Framework.Scenes
363 public bool CanTakeCopyObject(UUID objectID, UUID userID) 363 public bool CanTakeCopyObject(UUID objectID, UUID userID)
364 { 364 {
365 bool result = true; 365 bool result = true;
366 366
367 TakeCopyObjectHandler handler = OnTakeCopyObject; 367 TakeCopyObjectHandler handler = OnTakeCopyObject;
368 if (handler != null) 368 if (handler != null)
369 { 369 {
@@ -377,11 +377,11 @@ namespace OpenSim.Region.Framework.Scenes
377 } 377 }
378 } 378 }
379 } 379 }
380 380
381// m_log.DebugFormat( 381// m_log.DebugFormat(
382// "[SCENE PERMISSIONS]: CanTakeCopyObject() fired for object {0}, user {1}, result {2}", 382// "[SCENE PERMISSIONS]: CanTakeCopyObject() fired for object {0}, user {1}, result {2}",
383// objectID, userID, result); 383// objectID, userID, result);
384 384
385 return result; 385 return result;
386 } 386 }
387 387
@@ -478,7 +478,7 @@ namespace OpenSim.Region.Framework.Scenes
478 public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) 478 public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects)
479 { 479 {
480 bool result = true; 480 bool result = true;
481 481
482 ReturnObjectsHandler handler = OnReturnObjects; 482 ReturnObjectsHandler handler = OnReturnObjects;
483 if (handler != null) 483 if (handler != null)
484 { 484 {
@@ -492,11 +492,11 @@ namespace OpenSim.Region.Framework.Scenes
492 } 492 }
493 } 493 }
494 } 494 }
495 495
496// m_log.DebugFormat( 496// m_log.DebugFormat(
497// "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}", 497// "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}",
498// user, objects.Count, land.LandData.Name, result); 498// user, objects.Count, land.LandData.Name, result);
499 499
500 return result; 500 return result;
501 } 501 }
502 502
@@ -1004,7 +1004,7 @@ namespace OpenSim.Region.Framework.Scenes
1004 } 1004 }
1005 return true; 1005 return true;
1006 } 1006 }
1007 1007
1008 public bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID) 1008 public bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID)
1009 { 1009 {
1010 TransferObjectInventoryHandler handler = OnTransferObjectInventory; 1010 TransferObjectInventoryHandler handler = OnTransferObjectInventory;
@@ -1019,7 +1019,7 @@ namespace OpenSim.Region.Framework.Scenes
1019 } 1019 }
1020 return true; 1020 return true;
1021 } 1021 }
1022 1022
1023 /// <summary> 1023 /// <summary>
1024 /// Check whether the specified user is allowed to create the given inventory type in their inventory. 1024 /// Check whether the specified user is allowed to create the given inventory type in their inventory.
1025 /// </summary> 1025 /// </summary>
@@ -1039,8 +1039,8 @@ namespace OpenSim.Region.Framework.Scenes
1039 } 1039 }
1040 } 1040 }
1041 return true; 1041 return true;
1042 } 1042 }
1043 1043
1044 /// <summary> 1044 /// <summary>
1045 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. 1045 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1046 /// </summary> 1046 /// </summary>
@@ -1061,7 +1061,7 @@ namespace OpenSim.Region.Framework.Scenes
1061 } 1061 }
1062 return true; 1062 return true;
1063 } 1063 }
1064 1064
1065 /// <summary> 1065 /// <summary>
1066 /// Check whether the specified user is allowed to copy the given inventory item from their own inventory. 1066 /// Check whether the specified user is allowed to copy the given inventory item from their own inventory.
1067 /// </summary> 1067 /// </summary>
@@ -1082,7 +1082,7 @@ namespace OpenSim.Region.Framework.Scenes
1082 } 1082 }
1083 return true; 1083 return true;
1084 } 1084 }
1085 1085
1086 /// <summary> 1086 /// <summary>
1087 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. 1087 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1088 /// </summary> 1088 /// </summary>
@@ -1103,7 +1103,7 @@ namespace OpenSim.Region.Framework.Scenes
1103 } 1103 }
1104 return true; 1104 return true;
1105 } 1105 }
1106 1106
1107 public bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID) 1107 public bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID)
1108 { 1108 {
1109 TransferUserInventoryHandler handler = OnTransferUserInventory; 1109 TransferUserInventoryHandler handler = OnTransferUserInventory;
@@ -1118,7 +1118,7 @@ namespace OpenSim.Region.Framework.Scenes
1118 } 1118 }
1119 return true; 1119 return true;
1120 } 1120 }
1121 1121
1122 public bool CanTeleport(UUID userID) 1122 public bool CanTeleport(UUID userID)
1123 { 1123 {
1124 TeleportHandler handler = OnTeleport; 1124 TeleportHandler handler = OnTeleport;
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes
1133 } 1133 }
1134 return true; 1134 return true;
1135 } 1135 }
1136 1136
1137 public bool CanControlPrimMedia(UUID userID, UUID primID, int face) 1137 public bool CanControlPrimMedia(UUID userID, UUID primID, int face)
1138 { 1138 {
1139 ControlPrimMediaHandler handler = OnControlPrimMedia; 1139 ControlPrimMediaHandler handler = OnControlPrimMedia;
@@ -1147,8 +1147,8 @@ namespace OpenSim.Region.Framework.Scenes
1147 } 1147 }
1148 } 1148 }
1149 return true; 1149 return true;
1150 } 1150 }
1151 1151
1152 public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face) 1152 public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face)
1153 { 1153 {
1154 InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia; 1154 InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d7a4ca4..352bc05 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes
61 { 61 {
62 private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; 62 private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L;
63 private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; 63 private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L;
64 64
65 65
66 public delegate void SynchronizeSceneHandler(Scene scene); 66 public delegate void SynchronizeSceneHandler(Scene scene);
67 67
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes
88 /// </summary> 88 /// </summary>
89 /// <remarks> 89 /// <remarks>
90 /// Even if false, the scene will still be saved on clean shutdown. 90 /// Even if false, the scene will still be saved on clean shutdown.
91 /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels. 91 /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels.
92 /// This needs to be fixed. 92 /// This needs to be fixed.
93 /// </remarks> 93 /// </remarks>
94 public bool PeriodicBackup { get; set; } 94 public bool PeriodicBackup { get; set; }
@@ -103,9 +103,9 @@ namespace OpenSim.Region.Framework.Scenes
103 /// If false then physical objects are disabled, though collisions will continue as normal. 103 /// If false then physical objects are disabled, though collisions will continue as normal.
104 /// </summary> 104 /// </summary>
105 105
106 public bool PhysicsEnabled 106 public bool PhysicsEnabled
107 { 107 {
108 get 108 get
109 { 109 {
110 return m_physicsEnabled; 110 return m_physicsEnabled;
111 } 111 }
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Framework.Scenes
237 /// to compensate for SL bug 237 /// to compensate for SL bug
238 /// </summary> 238 /// </summary>
239 public bool LegacySitOffsets = true; 239 public bool LegacySitOffsets = true;
240 240
241 /// <summary> 241 /// <summary>
242 /// Can avatars cross from and to this region? 242 /// Can avatars cross from and to this region?
243 /// </summary> 243 /// </summary>
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes
245 245
246 /// Max prims an Physical object will hold 246 /// Max prims an Physical object will hold
247 /// </summary> 247 /// </summary>
248 /// 248 ///
249 public int m_linksetPhysCapacity = 0; 249 public int m_linksetPhysCapacity = 0;
250 250
251 /// <summary> 251 /// <summary>
@@ -383,9 +383,9 @@ namespace OpenSim.Region.Framework.Scenes
383 /// <summary> 383 /// <summary>
384 /// Frame time 384 /// Frame time
385 /// </remarks> 385 /// </remarks>
386 public float FrameTime { get; private set; } 386 public float FrameTime { get; private set; }
387 public int FrameTimeWarnPercent { get; private set; } 387 public int FrameTimeWarnPercent { get; private set; }
388 public int FrameTimeCritPercent { get; private set; } 388 public int FrameTimeCritPercent { get; private set; }
389 389
390 // Normalize the frame related stats to nominal 55fps for viewer and scripts option 390 // Normalize the frame related stats to nominal 55fps for viewer and scripts option
391 // see SimStatsReporter.cs 391 // see SimStatsReporter.cs
@@ -397,7 +397,7 @@ namespace OpenSim.Region.Framework.Scenes
397 /// <remarks> 397 /// <remarks>
398 /// Always derived from MinFrameTicks. 398 /// Always derived from MinFrameTicks.
399 /// </remarks> 399 /// </remarks>
400 public float MinMaintenanceTime { get; private set; } 400 public float MinMaintenanceTime { get; private set; }
401 401
402 private int m_update_physics = 1; 402 private int m_update_physics = 1;
403 private int m_update_entitymovement = 1; 403 private int m_update_entitymovement = 1;
@@ -529,7 +529,7 @@ namespace OpenSim.Region.Framework.Scenes
529 529
530// private int m_lastUpdate; 530// private int m_lastUpdate;
531 private bool m_firstHeartbeat = true; 531 private bool m_firstHeartbeat = true;
532 532
533// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; 533// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
534// private bool m_reprioritizationEnabled = true; 534// private bool m_reprioritizationEnabled = true;
535// private double m_reprioritizationInterval = 5000.0; 535// private double m_reprioritizationInterval = 5000.0;
@@ -868,7 +868,7 @@ namespace OpenSim.Region.Framework.Scenes
868 868
869 #region Constructors 869 #region Constructors
870 870
871 public Scene(RegionInfo regInfo, AgentCircuitManager authen, 871 public Scene(RegionInfo regInfo, AgentCircuitManager authen,
872 ISimulationDataService simDataService, IEstateDataService estateDataService, 872 ISimulationDataService simDataService, IEstateDataService estateDataService,
873 IConfigSource config, string simulatorVersion) 873 IConfigSource config, string simulatorVersion)
874 : this(regInfo) 874 : this(regInfo)
@@ -951,7 +951,7 @@ namespace OpenSim.Region.Framework.Scenes
951 951
952 RegisterDefaultSceneEvents(); 952 RegisterDefaultSceneEvents();
953 953
954 // XXX: Don't set the public property since we don't want to activate here. This needs to be handled 954 // XXX: Don't set the public property since we don't want to activate here. This needs to be handled
955 // better in the future. 955 // better in the future.
956 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; 956 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
957 957
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Framework.Scenes
1212 1212
1213 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 1213 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
1214 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 1214 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
1215 1215
1216 } 1216 }
1217 1217
1218 public Scene(RegionInfo regInfo) 1218 public Scene(RegionInfo regInfo)
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes
1549 /// </summary> 1549 /// </summary>
1550 /// <param name='startScripts'> 1550 /// <param name='startScripts'>
1551 /// Start the scripts within the scene. 1551 /// Start the scripts within the scene.
1552 /// </param> 1552 /// </param>
1553 public void Start(bool startScripts) 1553 public void Start(bool startScripts)
1554 { 1554 {
1555 if (IsRunning) 1555 if (IsRunning)
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes
1569 1569
1570//int pid = System.Diagnostics.Process.GetCurrentProcess().Id; 1570//int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
1571//System.Diagnostics.Process proc = new System.Diagnostics.Process(); 1571//System.Diagnostics.Process proc = new System.Diagnostics.Process();
1572//proc.EnableRaisingEvents=false; 1572//proc.EnableRaisingEvents=false;
1573//proc.StartInfo.FileName = "/bin/kill"; 1573//proc.StartInfo.FileName = "/bin/kill";
1574//proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); 1574//proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
1575//proc.Start(); 1575//proc.Start();
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.Framework.Scenes
1637 Update(-1); 1637 Update(-1);
1638 1638
1639 Watchdog.RemoveThread(); 1639 Watchdog.RemoveThread();
1640 } 1640 }
1641 1641
1642 private void Maintenance() 1642 private void Maintenance()
1643 { 1643 {
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Framework.Scenes
1706 previousMaintenanceTick = m_lastMaintenanceTick; 1706 previousMaintenanceTick = m_lastMaintenanceTick;
1707 m_lastMaintenanceTick = Util.EnvironmentTickCount(); 1707 m_lastMaintenanceTick = Util.EnvironmentTickCount();
1708 runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc); 1708 runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc);
1709 runtc = (int)(MinMaintenanceTime * 1000) - runtc; 1709 runtc = (int)(MinMaintenanceTime * 1000) - runtc;
1710 1710
1711 if (runtc > 0) 1711 if (runtc > 0)
1712 m_maintenanceWaitEvent.WaitOne(runtc); 1712 m_maintenanceWaitEvent.WaitOne(runtc);
@@ -1783,7 +1783,7 @@ namespace OpenSim.Region.Framework.Scenes
1783 if (Frame % m_update_entitymovement == 0) 1783 if (Frame % m_update_entitymovement == 0)
1784 m_sceneGraph.UpdateScenePresenceMovement(); 1784 m_sceneGraph.UpdateScenePresenceMovement();
1785 1785
1786 // Get the simulation frame time that the avatar force input 1786 // Get the simulation frame time that the avatar force input
1787 // took 1787 // took
1788 tmpMS2 = Util.GetTimeStampMS(); 1788 tmpMS2 = Util.GetTimeStampMS();
1789 agentMS = (float)(tmpMS2 - tmpMS); 1789 agentMS = (float)(tmpMS2 - tmpMS);
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 if (SynchronizeScene != null) 1799 if (SynchronizeScene != null)
1800 SynchronizeScene(this); 1800 SynchronizeScene(this);
1801 } 1801 }
1802 1802
1803 tmpMS2 = Util.GetTimeStampMS(); 1803 tmpMS2 = Util.GetTimeStampMS();
1804 physicsMS = (float)(tmpMS2 - tmpMS); 1804 physicsMS = (float)(tmpMS2 - tmpMS);
1805 tmpMS = tmpMS2; 1805 tmpMS = tmpMS2;
@@ -1820,17 +1820,17 @@ namespace OpenSim.Region.Framework.Scenes
1820 tmpMS2 = Util.GetTimeStampMS(); 1820 tmpMS2 = Util.GetTimeStampMS();
1821 agentMS += (float)(tmpMS2 - tmpMS); 1821 agentMS += (float)(tmpMS2 - tmpMS);
1822 tmpMS = tmpMS2; 1822 tmpMS = tmpMS2;
1823 1823
1824 // Delete temp-on-rez stuff 1824 // Delete temp-on-rez stuff
1825 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) 1825 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps)
1826 { 1826 {
1827 m_cleaningTemps = true; 1827 m_cleaningTemps = true;
1828 Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); 1828 Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
1829 tmpMS2 = Util.GetTimeStampMS(); 1829 tmpMS2 = Util.GetTimeStampMS();
1830 tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects 1830 tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects
1831 tmpMS = tmpMS2; 1831 tmpMS = tmpMS2;
1832 } 1832 }
1833 1833
1834 if (Frame % m_update_events == 0) 1834 if (Frame % m_update_events == 0)
1835 { 1835 {
1836 UpdateEvents(); 1836 UpdateEvents();
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
1916 1916
1917 // reuse frameMS as temporary 1917 // reuse frameMS as temporary
1918 frameMS = (float)tmpMS2; 1918 frameMS = (float)tmpMS2;
1919 1919
1920 // sleep if we can 1920 // sleep if we can
1921 if (tmpMS2 > 0) 1921 if (tmpMS2 > 0)
1922 { 1922 {
@@ -1939,9 +1939,9 @@ namespace OpenSim.Region.Framework.Scenes
1939 // script time is not scene frame time, but is displayed per frame 1939 // script time is not scene frame time, but is displayed per frame
1940 float scriptTimeMS = GetAndResetScriptExecutionTime(); 1940 float scriptTimeMS = GetAndResetScriptExecutionTime();
1941 StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS, 1941 StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS,
1942 physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS); 1942 physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS);
1943 1943
1944 1944
1945 1945
1946 // if (Frame%m_update_avatars == 0) 1946 // if (Frame%m_update_avatars == 0)
1947 // UpdateInWorldTime(); 1947 // UpdateInWorldTime();
@@ -2129,7 +2129,7 @@ namespace OpenSim.Region.Framework.Scenes
2129 } 2129 }
2130 2130
2131 /// <summary> 2131 /// <summary>
2132 /// Tell an agent that their object has been returned. 2132 /// Tell an agent that their object has been returned.
2133 /// </summary> 2133 /// </summary>
2134 /// <remarks> 2134 /// <remarks>
2135 /// The actual return is handled by the caller. 2135 /// The actual return is handled by the caller.
@@ -2221,7 +2221,7 @@ namespace OpenSim.Region.Framework.Scenes
2221 { 2221 {
2222 if(Bakedmap != null) 2222 if(Bakedmap != null)
2223 { 2223 {
2224 m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain."); 2224 m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain.");
2225 Heightmap = Bakedmap.MakeCopy(); 2225 Heightmap = Bakedmap.MakeCopy();
2226 SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID); 2226 SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID);
2227 } 2227 }
@@ -2290,7 +2290,7 @@ namespace OpenSim.Region.Framework.Scenes
2290 GridRegion region = new GridRegion(RegionInfo); 2290 GridRegion region = new GridRegion(RegionInfo);
2291 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 2291 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
2292 // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>", 2292 // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>",
2293 // m_regionName, 2293 // m_regionName,
2294 // RegionInfo.RegionID, 2294 // RegionInfo.RegionID,
2295 // RegionInfo.RegionLocX, RegionInfo.RegionLocY, 2295 // RegionInfo.RegionLocX, RegionInfo.RegionLocY,
2296 // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY); 2296 // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY);
@@ -2369,7 +2369,7 @@ namespace OpenSim.Region.Framework.Scenes
2369 return PhysicsScene.SupportsRaycastWorldFiltered(); 2369 return PhysicsScene.SupportsRaycastWorldFiltered();
2370 } 2370 }
2371 2371
2372 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) 2372 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)
2373 { 2373 {
2374 if (PhysicsScene == null) 2374 if (PhysicsScene == null)
2375 return null; 2375 return null;
@@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Framework.Scenes
2463 if (wpos.Z > pos.Z) pos = wpos; 2463 if (wpos.Z > pos.Z) pos = wpos;
2464 return pos; 2464 return pos;
2465 } 2465 }
2466 } 2466 }
2467 } 2467 }
2468 // else the first we got 2468 // else the first we got
2469 pos = physresults[0].Normal * scale; 2469 pos = physresults[0].Normal * scale;
@@ -2775,7 +2775,7 @@ namespace OpenSim.Region.Framework.Scenes
2775 } 2775 }
2776 else 2776 else
2777 { 2777 {
2778 toReturn.Add((SceneObjectGroup)e); 2778 toReturn.Add((SceneObjectGroup)e);
2779 } 2779 }
2780 } 2780 }
2781 } 2781 }
@@ -2847,7 +2847,7 @@ namespace OpenSim.Region.Framework.Scenes
2847 if (removeScripts) 2847 if (removeScripts)
2848 group.Clear(); 2848 group.Clear();
2849 partList = null; 2849 partList = null;
2850 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); 2850 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
2851 } 2851 }
2852 2852
2853 /// <summary> 2853 /// <summary>
@@ -3023,7 +3023,7 @@ namespace OpenSim.Region.Framework.Scenes
3023 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); 3023 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
3024// sceneObject.RootPart.AddFlag(PrimFlags.Phantom); 3024// sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
3025 3025
3026 // Don't sent a full update here because this will cause full updates to be sent twice for 3026 // Don't sent a full update here because this will cause full updates to be sent twice for
3027 // attachments on region crossings, resulting in viewer glitches. 3027 // attachments on region crossings, resulting in viewer glitches.
3028 AddRestoredSceneObject(sceneObject, false, false, false); 3028 AddRestoredSceneObject(sceneObject, false, false, false);
3029 3029
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes
3044 3044
3045 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 3045 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
3046 3046
3047 // We must currently not resume scripts at this stage since AttachmentsModule does not have the 3047 // We must currently not resume scripts at this stage since AttachmentsModule does not have the
3048 // information that this is due to a teleport/border cross rather than an ordinary attachment. 3048 // information that this is due to a teleport/border cross rather than an ordinary attachment.
3049 // We currently do this in Scene.MakeRootAgent() instead. 3049 // We currently do this in Scene.MakeRootAgent() instead.
3050 if (AttachmentsModule != null) 3050 if (AttachmentsModule != null)
@@ -3141,7 +3141,7 @@ namespace OpenSim.Region.Framework.Scenes
3141 vialogin 3141 vialogin
3142 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 3142 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0
3143 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; 3143 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
3144 3144
3145 CheckHeartbeat(); 3145 CheckHeartbeat();
3146 3146
3147 sp = GetScenePresence(client.AgentId); 3147 sp = GetScenePresence(client.AgentId);
@@ -3152,10 +3152,10 @@ namespace OpenSim.Region.Framework.Scenes
3152 "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}", 3152 "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}",
3153 client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos, 3153 client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos,
3154 ((TPFlags)aCircuit.teleportFlags).ToString()); 3154 ((TPFlags)aCircuit.teleportFlags).ToString());
3155 3155
3156 m_clientManager.Add(client); 3156 m_clientManager.Add(client);
3157 SubscribeToClientEvents(client); 3157 SubscribeToClientEvents(client);
3158 3158
3159 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); 3159 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
3160 3160
3161 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; 3161 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
@@ -3167,9 +3167,9 @@ namespace OpenSim.Region.Framework.Scenes
3167 // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the 3167 // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the
3168 // client is for a root or child agent. 3168 // client is for a root or child agent.
3169 // XXX: This may be better set for a new client before that client is added to the client manager. 3169 // XXX: This may be better set for a new client before that client is added to the client manager.
3170 // But need to know what happens in the case where a ScenePresence is already present (and if this 3170 // But need to know what happens in the case where a ScenePresence is already present (and if this
3171 // actually occurs). 3171 // actually occurs).
3172 3172
3173 3173
3174 m_log.WarnFormat( 3174 m_log.WarnFormat(
3175 "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", 3175 "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence",
@@ -3177,9 +3177,9 @@ namespace OpenSim.Region.Framework.Scenes
3177 3177
3178 reallyNew = false; 3178 reallyNew = false;
3179 } 3179 }
3180 client.SceneAgent = sp; 3180 client.SceneAgent = sp;
3181 3181
3182 // This is currently also being done earlier in NewUserConnection for real users to see if this 3182 // This is currently also being done earlier in NewUserConnection for real users to see if this
3183 // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other 3183 // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other
3184 // places. However, we still need to do it here for NPCs. 3184 // places. However, we still need to do it here for NPCs.
3185 CacheUserName(sp, aCircuit); 3185 CacheUserName(sp, aCircuit);
@@ -3610,7 +3610,7 @@ namespace OpenSim.Region.Framework.Scenes
3610 } 3610 }
3611 3611
3612 /// <summary> 3612 /// <summary>
3613 /// Duplicates object specified by localID at position raycasted against RayTargetObject using 3613 /// Duplicates object specified by localID at position raycasted against RayTargetObject using
3614 /// RayEnd and RayStart to determine what the angle of the ray is 3614 /// RayEnd and RayStart to determine what the angle of the ray is
3615 /// </summary> 3615 /// </summary>
3616 /// <param name="localID">ID of object to duplicate</param> 3616 /// <param name="localID">ID of object to duplicate</param>
@@ -3637,7 +3637,7 @@ namespace OpenSim.Region.Framework.Scenes
3637 if (target != null && target2 != null) 3637 if (target != null && target2 != null)
3638 { 3638 {
3639 Vector3 direction = Vector3.Normalize(RayEnd - RayStart); 3639 Vector3 direction = Vector3.Normalize(RayEnd - RayStart);
3640 3640
3641 pos = target2.AbsolutePosition; 3641 pos = target2.AbsolutePosition;
3642 //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); 3642 //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString());
3643 3643
@@ -3715,7 +3715,7 @@ namespace OpenSim.Region.Framework.Scenes
3715 } 3715 }
3716 3716
3717 /// <summary> 3717 /// <summary>
3718 /// Remove the given client from the scene. 3718 /// Remove the given client from the scene.
3719 /// </summary> 3719 /// </summary>
3720 /// <remarks> 3720 /// <remarks>
3721 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead 3721 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead
@@ -3726,7 +3726,7 @@ namespace OpenSim.Region.Framework.Scenes
3726 /// <param name='closeChildAgents'> 3726 /// <param name='closeChildAgents'>
3727 /// Close the neighbour child agents associated with this client. 3727 /// Close the neighbour child agents associated with this client.
3728 /// </param> 3728 /// </param>
3729 /// 3729 ///
3730 3730
3731 private object m_removeClientPrivLock = new Object(); 3731 private object m_removeClientPrivLock = new Object();
3732 3732
@@ -3734,7 +3734,7 @@ namespace OpenSim.Region.Framework.Scenes
3734 { 3734 {
3735 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); 3735 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID);
3736 3736
3737 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which 3737 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which
3738 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not 3738 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not
3739 // However, will keep for now just in case. 3739 // However, will keep for now just in case.
3740 if (acd == null) 3740 if (acd == null)
@@ -3747,12 +3747,12 @@ namespace OpenSim.Region.Framework.Scenes
3747 3747
3748 // TODO: Can we now remove this lock? 3748 // TODO: Can we now remove this lock?
3749 lock (m_removeClientPrivLock) 3749 lock (m_removeClientPrivLock)
3750 { 3750 {
3751 bool isChildAgent = false; 3751 bool isChildAgent = false;
3752 3752
3753 ScenePresence avatar = GetScenePresence(agentID); 3753 ScenePresence avatar = GetScenePresence(agentID);
3754 3754
3755 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which 3755 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which
3756 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not 3756 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not
3757 // However, will keep for now just in case. 3757 // However, will keep for now just in case.
3758 if (avatar == null) 3758 if (avatar == null)
@@ -3792,7 +3792,7 @@ namespace OpenSim.Region.Framework.Scenes
3792 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI 3792 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
3793 if (closeChildAgents && CapsModule != null) 3793 if (closeChildAgents && CapsModule != null)
3794 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); 3794 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode);
3795 3795
3796 if (closeChildAgents && !isChildAgent) 3796 if (closeChildAgents && !isChildAgent)
3797 { 3797 {
3798 List<ulong> regions = avatar.KnownRegionHandles; 3798 List<ulong> regions = avatar.KnownRegionHandles;
@@ -3806,7 +3806,7 @@ namespace OpenSim.Region.Framework.Scenes
3806// m_log.Debug("[Scene]TriggerClientClosed done"); 3806// m_log.Debug("[Scene]TriggerClientClosed done");
3807 m_eventManager.TriggerOnRemovePresence(agentID); 3807 m_eventManager.TriggerOnRemovePresence(agentID);
3808// m_log.Debug("[Scene]TriggerOnRemovePresence done"); 3808// m_log.Debug("[Scene]TriggerOnRemovePresence done");
3809 3809
3810 if (!isChildAgent) 3810 if (!isChildAgent)
3811 { 3811 {
3812 if (AttachmentsModule != null) 3812 if (AttachmentsModule != null)
@@ -3865,7 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes
3865 3865
3866 /// <summary> 3866 /// <summary>
3867 /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry. 3867 /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry.
3868 /// 3868 ///
3869 /// </summary> 3869 /// </summary>
3870 /// <param name="avatarID"></param> 3870 /// <param name="avatarID"></param>
3871 /// <param name="regionslst"></param> 3871 /// <param name="regionslst"></param>
@@ -3914,7 +3914,7 @@ namespace OpenSim.Region.Framework.Scenes
3914 /// <param name="teleportFlags"></param> 3914 /// <param name="teleportFlags"></param>
3915 /// <param name="source">Source region (may be null)</param> 3915 /// <param name="source">Source region (may be null)</param>
3916 /// <param name="reason">Outputs the reason for the false response on this string</param> 3916 /// <param name="reason">Outputs the reason for the false response on this string</param>
3917 /// <returns>True if the region accepts this agent. False if it does not. False will 3917 /// <returns>True if the region accepts this agent. False if it does not. False will
3918 /// also return a reason.</returns> 3918 /// also return a reason.</returns>
3919 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason) 3919 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason)
3920 { 3920 {
@@ -3942,9 +3942,9 @@ namespace OpenSim.Region.Framework.Scenes
3942 /// <param name="reason">Outputs the reason for the false response on this string</param> 3942 /// <param name="reason">Outputs the reason for the false response on this string</param>
3943 /// <param name="requirePresenceLookup">True for normal presence. False for NPC 3943 /// <param name="requirePresenceLookup">True for normal presence. False for NPC
3944 /// or other applications where a full grid/Hypergrid presence may not be required.</param> 3944 /// or other applications where a full grid/Hypergrid presence may not be required.</param>
3945 /// <returns>True if the region accepts this agent. False if it does not. False will 3945 /// <returns>True if the region accepts this agent. False if it does not. False will
3946 /// also return a reason.</returns> 3946 /// also return a reason.</returns>
3947 /// 3947 ///
3948 private object m_newUserConnLock = new object(); 3948 private object m_newUserConnLock = new object();
3949 3949
3950 public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup) 3950 public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup)
@@ -4037,7 +4037,7 @@ namespace OpenSim.Region.Framework.Scenes
4037 { 4037 {
4038 sp = GetScenePresence(acd.AgentID); 4038 sp = GetScenePresence(acd.AgentID);
4039 4039
4040 // We need to ensure that we are not already removing the scene presence before we ask it not to be 4040 // We need to ensure that we are not already removing the scene presence before we ask it not to be
4041 // closed. 4041 // closed.
4042 if (sp != null && sp.IsChildAgent 4042 if (sp != null && sp.IsChildAgent
4043 && (sp.LifecycleState == ScenePresenceState.Running 4043 && (sp.LifecycleState == ScenePresenceState.Running
@@ -4051,16 +4051,16 @@ namespace OpenSim.Region.Framework.Scenes
4051 // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C 4051 // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C
4052 // renews the lease on the child agent at B, we must make sure that the close from A does not succeed. 4052 // renews the lease on the child agent at B, we must make sure that the close from A does not succeed.
4053 // 4053 //
4054 // XXX: In the end, this should not be necessary if child agents are closed without delay on 4054 // XXX: In the end, this should not be necessary if child agents are closed without delay on
4055 // teleport, since realistically, the close request should always be processed before any other 4055 // teleport, since realistically, the close request should always be processed before any other
4056 // region tried to re-establish a child agent. This is much simpler since the logic below is 4056 // region tried to re-establish a child agent. This is much simpler since the logic below is
4057 // vulnerable to an issue when a viewer quits a region without sending a proper logout but then 4057 // vulnerable to an issue when a viewer quits a region without sending a proper logout but then
4058 // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport 4058 // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport
4059 // flag when no teleport had taken place (and hence no close was going to come). 4059 // flag when no teleport had taken place (and hence no close was going to come).
4060// if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle)) 4060// if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle))
4061// { 4061// {
4062// m_log.DebugFormat( 4062// m_log.DebugFormat(
4063// "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.", 4063// "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.",
4064// sp.Name, Name); 4064// sp.Name, Name);
4065// 4065//
4066// sp.DoNotCloseAfterTeleport = true; 4066// sp.DoNotCloseAfterTeleport = true;
@@ -4074,7 +4074,7 @@ namespace OpenSim.Region.Framework.Scenes
4074 sp.DoNotCloseAfterTeleport = true; 4074 sp.DoNotCloseAfterTeleport = true;
4075 4075
4076 m_log.DebugFormat( 4076 m_log.DebugFormat(
4077 "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.", 4077 "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.",
4078 sp.Name, Name); 4078 sp.Name, Name);
4079 } 4079 }
4080 } 4080 }
@@ -4094,7 +4094,7 @@ namespace OpenSim.Region.Framework.Scenes
4094 if (sp.LifecycleState == ScenePresenceState.Removing) 4094 if (sp.LifecycleState == ScenePresenceState.Removing)
4095 { 4095 {
4096 m_log.WarnFormat( 4096 m_log.WarnFormat(
4097 "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.", 4097 "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.",
4098 sp.Name, Name, polls * pollInterval / 1000); 4098 sp.Name, Name, polls * pollInterval / 1000);
4099 4099
4100 return false; 4100 return false;
@@ -4115,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes
4115 // We have a root agent. Is it in transit? 4115 // We have a root agent. Is it in transit?
4116 if (!EntityTransferModule.IsInTransit(sp.UUID)) 4116 if (!EntityTransferModule.IsInTransit(sp.UUID))
4117 { 4117 {
4118 // We have a zombie from a crashed session. 4118 // We have a zombie from a crashed session.
4119 // Or the same user is trying to be root twice here, won't work. 4119 // Or the same user is trying to be root twice here, won't work.
4120 // Kill it. 4120 // Kill it.
4121 m_log.WarnFormat( 4121 m_log.WarnFormat(
@@ -4210,7 +4210,7 @@ namespace OpenSim.Region.Framework.Scenes
4210 { 4210 {
4211 m_log.DebugFormat( 4211 m_log.DebugFormat(
4212 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", 4212 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}",
4213 acd.AgentID, RegionInfo.RegionName); 4213 acd.AgentID, RegionInfo.RegionName);
4214 4214
4215 if (CapsModule != null) 4215 if (CapsModule != null)
4216 { 4216 {
@@ -4253,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes
4253 // only check access, actual relocations will happen later on ScenePresence MakeRoot 4253 // only check access, actual relocations will happen later on ScenePresence MakeRoot
4254 // allow child agents creation 4254 // allow child agents creation
4255 if(!godlike && teleportFlags != (uint) TPFlags.Default) 4255 if(!godlike && teleportFlags != (uint) TPFlags.Default)
4256 { 4256 {
4257 bool checkTeleHub; 4257 bool checkTeleHub;
4258 4258
4259 // don't check hubs if via home or via lure 4259 // don't check hubs if via home or via lure
@@ -4264,7 +4264,7 @@ namespace OpenSim.Region.Framework.Scenes
4264 checkTeleHub = vialogin 4264 checkTeleHub = vialogin
4265 || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 )) 4265 || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 ))
4266 || (teleportFlags & (uint) TPFlags.ViaLocation) != 0; 4266 || (teleportFlags & (uint) TPFlags.ViaLocation) != 0;
4267 4267
4268 if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) 4268 if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason))
4269 { 4269 {
4270 m_authenticateHandler.RemoveCircuit(acd.circuitcode); 4270 m_authenticateHandler.RemoveCircuit(acd.circuitcode);
@@ -4351,7 +4351,7 @@ namespace OpenSim.Region.Framework.Scenes
4351 /// </summary> 4351 /// </summary>
4352 /// <param name="agent">Circuit Data of the Agent we're verifying</param> 4352 /// <param name="agent">Circuit Data of the Agent we're verifying</param>
4353 /// <param name="reason">Outputs the reason for the false response on this string</param> 4353 /// <param name="reason">Outputs the reason for the false response on this string</param>
4354 /// <returns>True if the user has a session on the grid. False if it does not. False will 4354 /// <returns>True if the user has a session on the grid. False if it does not. False will
4355 /// also return a reason.</returns> 4355 /// also return a reason.</returns>
4356 public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason) 4356 public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason)
4357 { 4357 {
@@ -4380,7 +4380,7 @@ namespace OpenSim.Region.Framework.Scenes
4380 /// </summary> 4380 /// </summary>
4381 /// <param name="agent">The circuit data for the agent</param> 4381 /// <param name="agent">The circuit data for the agent</param>
4382 /// <param name="reason">outputs the reason to this string</param> 4382 /// <param name="reason">outputs the reason to this string</param>
4383 /// <returns>True if the region accepts this agent. False if it does not. False will 4383 /// <returns>True if the region accepts this agent. False if it does not. False will
4384 /// also return a reason.</returns> 4384 /// also return a reason.</returns>
4385 protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) 4385 protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason)
4386 { 4386 {
@@ -4434,7 +4434,7 @@ namespace OpenSim.Region.Framework.Scenes
4434 // in access list / owner / manager 4434 // in access list / owner / manager
4435 if (RegionInfo.EstateSettings.HasAccess(agent.AgentID)) 4435 if (RegionInfo.EstateSettings.HasAccess(agent.AgentID))
4436 return true; 4436 return true;
4437 4437
4438 // finally test groups 4438 // finally test groups
4439 bool groupAccess = false; 4439 bool groupAccess = false;
4440 4440
@@ -4576,7 +4576,7 @@ Label_GroupsDone:
4576// } 4576// }
4577 4577
4578 /// <summary> 4578 /// <summary>
4579 /// We've got an update about an agent that sees into this region, 4579 /// We've got an update about an agent that sees into this region,
4580 /// send it to ScenePresence for processing It's the full data. 4580 /// send it to ScenePresence for processing It's the full data.
4581 /// </summary> 4581 /// </summary>
4582 /// <param name="cAgentData">Agent that contains all of the relevant things about an agent. 4582 /// <param name="cAgentData">Agent that contains all of the relevant things about an agent.
@@ -4604,7 +4604,7 @@ Label_GroupsDone:
4604 } 4604 }
4605 4605
4606 // TODO: This check should probably be in QueryAccess(). 4606 // TODO: This check should probably be in QueryAccess().
4607 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, 4607 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID,
4608 (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); 4608 (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f);
4609 if (nearestParcel == null) 4609 if (nearestParcel == null)
4610 { 4610 {
@@ -4616,12 +4616,12 @@ Label_GroupsDone:
4616 } 4616 }
4617 4617
4618 // We have to wait until the viewer contacts this region 4618 // We have to wait until the viewer contacts this region
4619 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) 4619 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol)
4620 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send 4620 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send
4621 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence. 4621 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence.
4622 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); 4622 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID);
4623 4623
4624 if (sp != null) 4624 if (sp != null)
4625 { 4625 {
4626 if (!sp.IsChildAgent) 4626 if (!sp.IsChildAgent)
4627 { 4627 {
@@ -4632,10 +4632,10 @@ Label_GroupsDone:
4632 if (cAgentData.SessionID != sp.ControllingClient.SessionId) 4632 if (cAgentData.SessionID != sp.ControllingClient.SessionId)
4633 { 4633 {
4634 m_log.WarnFormat( 4634 m_log.WarnFormat(
4635 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", 4635 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).",
4636 sp.UUID, cAgentData.SessionID); 4636 sp.UUID, cAgentData.SessionID);
4637 4637
4638 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", 4638 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}",
4639 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); 4639 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID));
4640 } 4640 }
4641 4641
@@ -4667,7 +4667,7 @@ Label_GroupsDone:
4667 } 4667 }
4668 4668
4669 /// <summary> 4669 /// <summary>
4670 /// We've got an update about an agent that sees into this region, 4670 /// We've got an update about an agent that sees into this region,
4671 /// send it to ScenePresence for processing It's only positional data 4671 /// send it to ScenePresence for processing It's only positional data
4672 /// </summary> 4672 /// </summary>
4673 /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param> 4673 /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param>
@@ -4675,7 +4675,7 @@ Label_GroupsDone:
4675 public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData) 4675 public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData)
4676 { 4676 {
4677// m_log.DebugFormat( 4677// m_log.DebugFormat(
4678// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}", 4678// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}",
4679// cAgentData.AgentID, Name, cAgentData.Position); 4679// cAgentData.AgentID, Name, cAgentData.Position);
4680 4680
4681 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); 4681 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
@@ -4683,7 +4683,7 @@ Label_GroupsDone:
4683 { 4683 {
4684// if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID) 4684// if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID)
4685// // Only warn for now 4685// // Only warn for now
4686// m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?", 4686// m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?",
4687// childAgentUpdate.UUID, cAgentData.SessionID); 4687// childAgentUpdate.UUID, cAgentData.SessionID);
4688 4688
4689 // I can't imagine *yet* why we would get an update if the agent is a root agent.. 4689 // I can't imagine *yet* why we would get an update if the agent is a root agent..
@@ -4743,7 +4743,7 @@ Label_GroupsDone:
4743 if (acd == null) 4743 if (acd == null)
4744 { 4744 {
4745 m_log.DebugFormat( 4745 m_log.DebugFormat(
4746 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", 4746 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.",
4747 agentID, Name); 4747 agentID, Name);
4748 4748
4749 return false; 4749 return false;
@@ -4756,7 +4756,7 @@ Label_GroupsDone:
4756 else 4756 else
4757 { 4757 {
4758 m_log.WarnFormat( 4758 m_log.WarnFormat(
4759 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", 4759 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}",
4760 agentID, auth_token, Name); 4760 agentID, auth_token, Name);
4761 } 4761 }
4762 4762
@@ -4850,7 +4850,7 @@ Label_GroupsDone:
4850 return true; 4850 return true;
4851 } 4851 }
4852 m_log.DebugFormat( 4852 m_log.DebugFormat(
4853 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}", 4853 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}",
4854 agentID, Name); 4854 agentID, Name);
4855 4855
4856 return false; 4856 return false;
@@ -5361,7 +5361,7 @@ Label_GroupsDone:
5361 /// Get a scene object group that contains the prim with the given local id 5361 /// Get a scene object group that contains the prim with the given local id
5362 /// </summary> 5362 /// </summary>
5363 /// <param name="localID"></param> 5363 /// <param name="localID"></param>
5364 /// <returns>null if no scene object group containing that prim is found</returns> 5364 /// <returns>null if no scene object group containing that prim is found</returns>
5365 public SceneObjectGroup GetGroupByPrim(uint localID) 5365 public SceneObjectGroup GetGroupByPrim(uint localID)
5366 { 5366 {
5367 return m_sceneGraph.GetGroupByPrim(localID); 5367 return m_sceneGraph.GetGroupByPrim(localID);
@@ -5371,7 +5371,7 @@ Label_GroupsDone:
5371 /// Get a scene object group that contains the prim with the given uuid 5371 /// Get a scene object group that contains the prim with the given uuid
5372 /// </summary> 5372 /// </summary>
5373 /// <param name="fullID"></param> 5373 /// <param name="fullID"></param>
5374 /// <returns>null if no scene object group containing that prim is found</returns> 5374 /// <returns>null if no scene object group containing that prim is found</returns>
5375 public SceneObjectGroup GetGroupByPrim(UUID fullID) 5375 public SceneObjectGroup GetGroupByPrim(UUID fullID)
5376 { 5376 {
5377 return m_sceneGraph.GetGroupByPrim(fullID); 5377 return m_sceneGraph.GetGroupByPrim(fullID);
@@ -5484,7 +5484,7 @@ Label_GroupsDone:
5484 // 1 = sim is up and accepting http requests. The heartbeat has 5484 // 1 = sim is up and accepting http requests. The heartbeat has
5485 // stopped and the sim is probably locked up, but a remote 5485 // stopped and the sim is probably locked up, but a remote
5486 // admin restart may succeed 5486 // admin restart may succeed
5487 // 5487 //
5488 // 2 = Sim is up and the heartbeat is running. The sim is likely 5488 // 2 = Sim is up and the heartbeat is running. The sim is likely
5489 // usable for people within 5489 // usable for people within
5490 // 5490 //
@@ -5533,7 +5533,7 @@ Label_GroupsDone:
5533 { 5533 {
5534int pid = System.Diagnostics.Process.GetCurrentProcess().Id; 5534int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
5535System.Diagnostics.Process proc = new System.Diagnostics.Process(); 5535System.Diagnostics.Process proc = new System.Diagnostics.Process();
5536proc.EnableRaisingEvents=false; 5536proc.EnableRaisingEvents=false;
5537proc.StartInfo.FileName = "/bin/kill"; 5537proc.StartInfo.FileName = "/bin/kill";
5538proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); 5538proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
5539proc.Start(); 5539proc.Start();
@@ -5979,7 +5979,7 @@ Environment.Exit(1);
5979 g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); 5979 g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ);
5980 5980
5981// m_log.DebugFormat( 5981// m_log.DebugFormat(
5982// "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}", 5982// "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}",
5983// g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ)); 5983// g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ));
5984 5984
5985 ominX += vec.X; 5985 ominX += vec.X;
@@ -6175,11 +6175,11 @@ Environment.Exit(1);
6175 reason = "Error authorizing agent: " + e.Message; 6175 reason = "Error authorizing agent: " + e.Message;
6176 return false; 6176 return false;
6177 } 6177 }
6178 6178
6179 // last check aditional land access restrictions and relocations 6179 // last check aditional land access restrictions and relocations
6180 // if crossing (viaTeleport false) check only the specified parcel 6180 // if crossing (viaTeleport false) check only the specified parcel
6181 return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason); 6181 return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason);
6182 } 6182 }
6183 6183
6184 // check access to land. 6184 // check access to land.
6185 public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason) 6185 public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason)
@@ -6192,7 +6192,7 @@ Environment.Exit(1);
6192 bool isAdmin = Permissions.IsAdministrator(agentID); 6192 bool isAdmin = Permissions.IsAdministrator(agentID);
6193 if(isAdmin) 6193 if(isAdmin)
6194 return true; 6194 return true;
6195 6195
6196 // also honor estate managers access rights 6196 // also honor estate managers access rights
6197 bool isManager = Permissions.IsEstateManager(agentID); 6197 bool isManager = Permissions.IsEstateManager(agentID);
6198 if(isManager) 6198 if(isManager)
@@ -6204,14 +6204,14 @@ Environment.Exit(1);
6204 { 6204 {
6205 SceneObjectGroup telehub; 6205 SceneObjectGroup telehub;
6206 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub) 6206 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub)
6207 { 6207 {
6208 bool banned = true; 6208 bool banned = true;
6209 bool validTelehub = false; 6209 bool validTelehub = false;
6210 List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); 6210 List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints();
6211 Vector3 spawnPoint; 6211 Vector3 spawnPoint;
6212 ILandObject land = null; 6212 ILandObject land = null;
6213 Vector3 telehubPosition = telehub.AbsolutePosition; 6213 Vector3 telehubPosition = telehub.AbsolutePosition;
6214 6214
6215 if(spawnPoints.Count == 0) 6215 if(spawnPoints.Count == 0)
6216 { 6216 {
6217 // will this ever happen? 6217 // will this ever happen?
@@ -6225,7 +6225,7 @@ Environment.Exit(1);
6225 } 6225 }
6226 } 6226 }
6227 else 6227 else
6228 { 6228 {
6229 Quaternion telehubRotation = telehub.GroupRotation; 6229 Quaternion telehubRotation = telehub.GroupRotation;
6230 foreach (SpawnPoint spawn in spawnPoints) 6230 foreach (SpawnPoint spawn in spawnPoints)
6231 { 6231 {
@@ -6293,7 +6293,7 @@ Environment.Exit(1);
6293 return true; 6293 return true;
6294 } 6294 }
6295 6295
6296 public void StartTimerWatchdog() 6296 public void StartTimerWatchdog()
6297 { 6297 {
6298 m_timerWatchdog.Interval = 1000; 6298 m_timerWatchdog.Interval = 1000;
6299 m_timerWatchdog.Elapsed += TimerWatchdog; 6299 m_timerWatchdog.Elapsed += TimerWatchdog;
@@ -6304,7 +6304,7 @@ Environment.Exit(1);
6304 public void TimerWatchdog(object sender, ElapsedEventArgs e) 6304 public void TimerWatchdog(object sender, ElapsedEventArgs e)
6305 { 6305 {
6306 CheckHeartbeat(); 6306 CheckHeartbeat();
6307 } 6307 }
6308 6308
6309 /// This method deals with movement when an avatar is automatically moving (but this is distinct from the 6309 /// This method deals with movement when an avatar is automatically moving (but this is distinct from the
6310 /// autopilot that moves an avatar to a sit target!. 6310 /// autopilot that moves an avatar to a sit target!.
@@ -6391,7 +6391,7 @@ Environment.Exit(1);
6391 } 6391 }
6392 6392
6393 /// <summary> 6393 /// <summary>
6394 /// Wrappers to get physics modules retrieve assets. 6394 /// Wrappers to get physics modules retrieve assets.
6395 /// </summary> 6395 /// </summary>
6396 /// <remarks> 6396 /// <remarks>
6397 /// Has to be done this way 6397 /// Has to be done this way
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index d406625..e3e54e2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Scenes
57 #region Fields 57 #region Fields
58 58
59 public string Name { get { return RegionInfo.RegionName; } } 59 public string Name { get { return RegionInfo.RegionName; } }
60 60
61 public IConfigSource Config 61 public IConfigSource Config
62 { 62 {
63 get { return GetConfig(); } 63 get { return GetConfig(); }
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Framework.Scenes
95 /// The module commanders available from this scene 95 /// The module commanders available from this scene
96 /// </value> 96 /// </value>
97 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); 97 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>();
98 98
99 /// <value> 99 /// <value>
100 /// Registered classes that are capable of creating entities. 100 /// Registered classes that are capable of creating entities.
101 /// </value> 101 /// </value>
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
108 protected uint m_lastAllocatedLocalId = 720000; 108 protected uint m_lastAllocatedLocalId = 720000;
109 109
110 private readonly Mutex _primAllocateMutex = new Mutex(false); 110 private readonly Mutex _primAllocateMutex = new Mutex(false);
111 111
112 protected readonly ClientManager m_clientManager = new ClientManager(); 112 protected readonly ClientManager m_clientManager = new ClientManager();
113 113
114 public bool LoginsEnabled 114 public bool LoginsEnabled
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Framework.Scenes
264 public virtual RegionInfo RegionInfo { get; private set; } 264 public virtual RegionInfo RegionInfo { get; private set; }
265 265
266 #region admin stuff 266 #region admin stuff
267 267
268 public abstract void OtherRegionUp(GridRegion otherRegion); 268 public abstract void OtherRegionUp(GridRegion otherRegion);
269 269
270 public virtual string GetSimulatorVersion() 270 public virtual string GetSimulatorVersion()
@@ -307,7 +307,7 @@ namespace OpenSim.Region.Framework.Scenes
307 307
308 return myID; 308 return myID;
309 } 309 }
310 310
311 #region Module Methods 311 #region Module Methods
312 312
313 /// <summary> 313 /// <summary>
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Framework.Scenes
366 if (m_moduleCommanders.ContainsKey(name)) 366 if (m_moduleCommanders.ContainsKey(name))
367 return m_moduleCommanders[name]; 367 return m_moduleCommanders[name];
368 } 368 }
369 369
370 return null; 370 return null;
371 } 371 }
372 372
@@ -416,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
416 public void RegisterModuleInterface<M>(M mod) 416 public void RegisterModuleInterface<M>(M mod)
417 { 417 {
418// m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M)); 418// m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M));
419 419
420 List<Object> l = null; 420 List<Object> l = null;
421 if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) 421 if (!ModuleInterfaces.TryGetValue(typeof(M), out l))
422 { 422 {
@@ -527,9 +527,9 @@ namespace OpenSim.Region.Framework.Scenes
527 return new T[] {}; 527 return new T[] {};
528 } 528 }
529 } 529 }
530 530
531 #endregion 531 #endregion
532 532
533 /// <summary> 533 /// <summary>
534 /// Call this from a region module to add a command to the OpenSim console. 534 /// Call this from a region module to add a command to the OpenSim console.
535 /// </summary> 535 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 3eefd3c..6304778 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Framework.Scenes
115 OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags; 115 OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags;
116 116
117 // m_log.DebugFormat( 117 // m_log.DebugFormat(
118 // "{0}: Region flags for {1} as seen by {2} are {3}", 118 // "{0}: Region flags for {1} as seen by {2} are {3}",
119 // LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present"); 119 // LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present");
120 120
121 // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could 121 // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Framework.Scenes
175 public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) 175 public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence)
176 { 176 {
177 // m_log.DebugFormat( 177 // m_log.DebugFormat(
178 // "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}", 178 // "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}",
179 // presence.Name, m_scene.Name); 179 // presence.Name, m_scene.Name);
180 180
181 // This assumes that we know what our neighbors are. 181 // This assumes that we know what our neighbors are.
@@ -248,7 +248,7 @@ namespace OpenSim.Region.Framework.Scenes
248 } 248 }
249 249
250 /// <summary> 250 /// <summary>
251 /// Closes a child agents in a collection of regions. Does so asynchronously 251 /// Closes a child agents in a collection of regions. Does so asynchronously
252 /// so that the caller doesn't wait. 252 /// so that the caller doesn't wait.
253 /// </summary> 253 /// </summary>
254 /// <param name="agentID"></param> 254 /// <param name="agentID"></param>
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 579874a..2f65ce2 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -87,21 +87,21 @@ namespace OpenSim.Region.Framework.Scenes
87 protected int m_scriptLPS = 0; 87 protected int m_scriptLPS = 0;
88 88
89 protected internal PhysicsScene _PhyScene; 89 protected internal PhysicsScene _PhyScene;
90 90
91 /// <summary> 91 /// <summary>
92 /// Index the SceneObjectGroup for each part by the root part's UUID. 92 /// Index the SceneObjectGroup for each part by the root part's UUID.
93 /// </summary> 93 /// </summary>
94 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>(); 94 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>();
95 95
96 /// <summary> 96 /// <summary>
97 /// Index the SceneObjectGroup for each part by that part's UUID. 97 /// Index the SceneObjectGroup for each part by that part's UUID.
98 /// </summary> 98 /// </summary>
99 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullPartID = new Dictionary<UUID, SceneObjectGroup>(); 99 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullPartID = new Dictionary<UUID, SceneObjectGroup>();
100 100
101 /// <summary> 101 /// <summary>
102 /// Index the SceneObjectGroup for each part by that part's local ID. 102 /// Index the SceneObjectGroup for each part by that part's local ID.
103 /// </summary> 103 /// </summary>
104 protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>(); 104 protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>();
105 105
106 /// <summary> 106 /// <summary>
107 /// Lock to prevent object group update, linking, delinking and duplication operations from running concurrently. 107 /// Lock to prevent object group update, linking, delinking and duplication operations from running concurrently.
@@ -121,11 +121,11 @@ namespace OpenSim.Region.Framework.Scenes
121 121
122 public PhysicsScene PhysicsScene 122 public PhysicsScene PhysicsScene
123 { 123 {
124 get 124 get
125 { 125 {
126 if (_PhyScene == null) 126 if (_PhyScene == null)
127 _PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>(); 127 _PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>();
128 return _PhyScene; 128 return _PhyScene;
129 } 129 }
130 set 130 set
131 { 131 {
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes
215 // the joint in the Scene does not exist in the PhysicsScene. 215 // the joint in the Scene does not exist in the PhysicsScene.
216 // 216 //
217 // To solve this, we have an event in the PhysicsScene that is fired when a joint 217 // To solve this, we have an event in the PhysicsScene that is fired when a joint
218 // has changed position (because one of its associated PhysicsActors has changed 218 // has changed position (because one of its associated PhysicsActors has changed
219 // position). 219 // position).
220 // 220 //
221 // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). 221 // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate().
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Framework.Scenes
244 244
245 // coarse locations are sent as BYTE, so limited to the 255m max of normal regions 245 // coarse locations are sent as BYTE, so limited to the 255m max of normal regions
246 // try to work around that scale down X and Y acording to region size, so reducing the resolution 246 // try to work around that scale down X and Y acording to region size, so reducing the resolution
247 // 247 //
248 // viewers need to scale up 248 // viewers need to scale up
249 float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize; 249 float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize;
250 if (scaleX == 0) 250 if (scaleX == 0)
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes
259 for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) 259 for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
260 { 260 {
261 ScenePresence sp = presences[i]; 261 ScenePresence sp = presences[i];
262 262
263 // If this presence is a child agent, we don't want its coarse locations 263 // If this presence is a child agent, we don't want its coarse locations
264 if (sp.IsChildAgent) 264 if (sp.IsChildAgent)
265 continue; 265 continue;
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Framework.Scenes
346 346
347 return ret; 347 return ret;
348 } 348 }
349 349
350 /// <summary> 350 /// <summary>
351 /// Add a newly created object to the scene. This will both update the scene, and send information about the 351 /// Add a newly created object to the scene. This will both update the scene, and send information about the
352 /// new object to all clients interested in the scene. 352 /// new object to all clients interested in the scene.
@@ -372,11 +372,11 @@ namespace OpenSim.Region.Framework.Scenes
372 372
373 return ret; 373 return ret;
374 } 374 }
375 375
376 /// <summary> 376 /// <summary>
377 /// Add a newly created object to the scene. 377 /// Add a newly created object to the scene.
378 /// </summary> 378 /// </summary>
379 /// 379 ///
380 /// This method does not send updates to the client - callers need to handle this themselves. 380 /// This method does not send updates to the client - callers need to handle this themselves.
381 /// Caller should also trigger EventManager.TriggerObjectAddedToScene 381 /// Caller should also trigger EventManager.TriggerObjectAddedToScene
382 /// <param name="sceneObject"></param> 382 /// <param name="sceneObject"></param>
@@ -630,7 +630,7 @@ namespace OpenSim.Region.Framework.Scenes
630 { 630 {
631 List<SceneObjectGroup> updates; 631 List<SceneObjectGroup> updates;
632 632
633 // Some updates add more updates to the updateList. 633 // Some updates add more updates to the updateList.
634 // Get the current list of updates and clear the list before iterating 634 // Get the current list of updates and clear the list before iterating
635 lock (m_updateList) 635 lock (m_updateList)
636 { 636 {
@@ -762,7 +762,7 @@ namespace OpenSim.Region.Framework.Scenes
762 { 762 {
763 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); 763 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
764 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); 764 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
765 765
766 // Remove the presence reference from the dictionary 766 // Remove the presence reference from the dictionary
767 if (newmap.ContainsKey(agentID)) 767 if (newmap.ContainsKey(agentID))
768 { 768 {
@@ -874,7 +874,7 @@ namespace OpenSim.Region.Framework.Scenes
874 #endregion 874 #endregion
875 875
876 #region Get Methods 876 #region Get Methods
877 877
878 /// <summary> 878 /// <summary>
879 /// Get the controlling client for the given avatar, if there is one. 879 /// Get the controlling client for the given avatar, if there is one.
880 /// 880 ///
@@ -1190,7 +1190,7 @@ namespace OpenSim.Region.Framework.Scenes
1190 return null; 1190 return null;
1191 return group.GetPart(localID); 1191 return group.GetPart(localID);
1192 } 1192 }
1193 1193
1194 /// <summary> 1194 /// <summary>
1195 /// Get a prim by name from the scene (will return the first 1195 /// Get a prim by name from the scene (will return the first
1196 /// found, if there are more than one prim with the same name) 1196 /// found, if there are more than one prim with the same name)
@@ -1209,7 +1209,7 @@ namespace OpenSim.Region.Framework.Scenes
1209 foreach (SceneObjectPart p in ((SceneObjectGroup)entity).Parts) 1209 foreach (SceneObjectPart p in ((SceneObjectGroup)entity).Parts)
1210 { 1210 {
1211// m_log.DebugFormat("[SCENE GRAPH]: Part {0} has name {1}", p.UUID, p.Name); 1211// m_log.DebugFormat("[SCENE GRAPH]: Part {0} has name {1}", p.UUID, p.Name);
1212 1212
1213 if (p.Name == name) 1213 if (p.Name == name)
1214 { 1214 {
1215 sop = p; 1215 sop = p;
@@ -1308,7 +1308,7 @@ namespace OpenSim.Region.Framework.Scenes
1308 /// <summary> 1308 /// <summary>
1309 /// Performs action on all scene presences. This can ultimately run the actions in parallel but 1309 /// Performs action on all scene presences. This can ultimately run the actions in parallel but
1310 /// any delegates passed in will need to implement their own locking on data they reference and 1310 /// any delegates passed in will need to implement their own locking on data they reference and
1311 /// modify outside of the scope of the delegate. 1311 /// modify outside of the scope of the delegate.
1312 /// </summary> 1312 /// </summary>
1313 /// <param name="action"></param> 1313 /// <param name="action"></param>
1314 public void ForEachScenePresence(Action<ScenePresence> action) 1314 public void ForEachScenePresence(Action<ScenePresence> action)
@@ -1343,7 +1343,7 @@ namespace OpenSim.Region.Framework.Scenes
1343 } 1343 }
1344 } 1344 }
1345 } 1345 }
1346 1346
1347 #endregion 1347 #endregion
1348 1348
1349 #region Client Event handlers 1349 #region Client Event handlers
@@ -1574,7 +1574,7 @@ namespace OpenSim.Region.Framework.Scenes
1574 public void UpdatePrimGroupPosition(uint localId, Vector3 pos, UUID updatingAgentId) 1574 public void UpdatePrimGroupPosition(uint localId, Vector3 pos, UUID updatingAgentId)
1575 { 1575 {
1576 SceneObjectGroup group = GetGroupByPrim(localId); 1576 SceneObjectGroup group = GetGroupByPrim(localId);
1577 1577
1578 if (group != null) 1578 if (group != null)
1579 { 1579 {
1580 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) 1580 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
@@ -1589,7 +1589,7 @@ namespace OpenSim.Region.Framework.Scenes
1589 } 1589 }
1590 else 1590 else
1591 { 1591 {
1592 if (m_parentScene.Permissions.CanMoveObject(group.UUID, updatingAgentId) 1592 if (m_parentScene.Permissions.CanMoveObject(group.UUID, updatingAgentId)
1593 && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) 1593 && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos))
1594 { 1594 {
1595 group.UpdateGroupPosition(pos); 1595 group.UpdateGroupPosition(pos);
@@ -1611,7 +1611,7 @@ namespace OpenSim.Region.Framework.Scenes
1611 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) 1611 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
1612 { 1612 {
1613 SceneObjectGroup group = GetGroupByPrim(localID); 1613 SceneObjectGroup group = GetGroupByPrim(localID);
1614 1614
1615 if (group != null) 1615 if (group != null)
1616 { 1616 {
1617 if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId)) 1617 if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId))
@@ -1730,8 +1730,8 @@ namespace OpenSim.Region.Framework.Scenes
1730 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); 1730 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
1731 if (part != null) 1731 if (part != null)
1732 { 1732 {
1733 part.ClickAction = Convert.ToByte(clickAction); 1733 part.ClickAction = Convert.ToByte(clickAction);
1734 group.HasGroupChanged = true; 1734 group.HasGroupChanged = true;
1735 } 1735 }
1736 } 1736 }
1737 } 1737 }
@@ -1966,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes
1966 // However, editing linked parts and unlinking may be different 1966 // However, editing linked parts and unlinking may be different
1967 // 1967 //
1968 SceneObjectGroup group = root.ParentGroup; 1968 SceneObjectGroup group = root.ParentGroup;
1969 1969
1970 List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts); 1970 List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts);
1971 1971
1972 newSet.Remove(root); 1972 newSet.Remove(root);
@@ -1978,7 +1978,7 @@ namespace OpenSim.Region.Framework.Scenes
1978 group.DelinkFromGroup(p, false); 1978 group.DelinkFromGroup(p, false);
1979 1979
1980 SceneObjectPart newRoot = newSet[0]; 1980 SceneObjectPart newRoot = newSet[0];
1981 1981
1982 // If there is more than one prim remaining, we 1982 // If there is more than one prim remaining, we
1983 // need to re-link 1983 // need to re-link
1984 // 1984 //
@@ -1996,7 +1996,7 @@ namespace OpenSim.Region.Framework.Scenes
1996 { 1996 {
1997 newRoot.TriggerScriptChangedEvent(Changed.LINK); 1997 newRoot.TriggerScriptChangedEvent(Changed.LINK);
1998 newRoot.ParentGroup.HasGroupChanged = true; 1998 newRoot.ParentGroup.HasGroupChanged = true;
1999 newRoot.ParentGroup.ScheduleGroupForFullUpdate(); 1999 newRoot.ParentGroup.ScheduleGroupForFullUpdate();
2000 } 2000 }
2001 } 2001 }
2002 2002
@@ -2089,7 +2089,7 @@ namespace OpenSim.Region.Framework.Scenes
2089 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) 2089 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot)
2090 { 2090 {
2091// m_log.DebugFormat( 2091// m_log.DebugFormat(
2092// "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", 2092// "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}",
2093// originalPrimID, offset, AgentID); 2093// originalPrimID, offset, AgentID);
2094 2094
2095 SceneObjectGroup original = GetGroupByPrim(originalPrimID); 2095 SceneObjectGroup original = GetGroupByPrim(originalPrimID);
@@ -2194,6 +2194,6 @@ namespace OpenSim.Region.Framework.Scenes
2194 2194
2195 #endregion 2195 #endregion
2196 2196
2197 2197
2198 } 2198 }
2199} 2199}
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index c5c083a..1e418df 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -91,12 +91,12 @@ namespace OpenSim.Region.Framework.Scenes
91 91
92 private static SceneManager m_instance = null; 92 private static SceneManager m_instance = null;
93 public static SceneManager Instance 93 public static SceneManager Instance
94 { 94 {
95 get { 95 get {
96 if (m_instance == null) 96 if (m_instance == null)
97 m_instance = new SceneManager(); 97 m_instance = new SceneManager();
98 return m_instance; 98 return m_instance;
99 } 99 }
100 } 100 }
101 101
102 private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>(); 102 private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>();
@@ -340,7 +340,7 @@ namespace OpenSim.Region.Framework.Scenes
340 340
341 public bool TrySetCurrentScene(string regionName) 341 public bool TrySetCurrentScene(string regionName)
342 { 342 {
343 if ((String.Compare(regionName, "root") == 0) 343 if ((String.Compare(regionName, "root") == 0)
344 || (String.Compare(regionName, "..") == 0) 344 || (String.Compare(regionName, "..") == 0)
345 || (String.Compare(regionName, "/") == 0)) 345 || (String.Compare(regionName, "/") == 0))
346 { 346 {
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Framework.Scenes
398 return true; 398 return true;
399 } 399 }
400 } 400 }
401 401
402 scene = null; 402 scene = null;
403 return false; 403 return false;
404 } 404 }
@@ -415,7 +415,7 @@ namespace OpenSim.Region.Framework.Scenes
415 return true; 415 return true;
416 } 416 }
417 } 417 }
418 418
419 scene = null; 419 scene = null;
420 return false; 420 return false;
421 } 421 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 98617d1..9f98554 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -114,9 +114,9 @@ namespace OpenSim.Region.Framework.Scenes
114 public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID) 114 public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID)
115 { 115 {
116// m_log.DebugFormat( 116// m_log.DebugFormat(
117// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", 117// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}",
118// item.Name, remoteClient.Name, localID); 118// item.Name, remoteClient.Name, localID);
119 119
120 UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; 120 UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID;
121 121
122 SceneObjectPart part = GetPart(localID); 122 SceneObjectPart part = GetPart(localID);
@@ -147,8 +147,8 @@ namespace OpenSim.Region.Framework.Scenes
147 // We're adding this to a prim we don't own. Force 147 // We're adding this to a prim we don't own. Force
148 // owner change 148 // owner change
149 taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; 149 taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
150 } 150 }
151 else 151 else
152 { 152 {
153 taskItem.BasePermissions = item.BasePermissions; 153 taskItem.BasePermissions = item.BasePermissions;
154 taskItem.CurrentPermissions = item.CurrentPermissions; 154 taskItem.CurrentPermissions = item.CurrentPermissions;
@@ -156,13 +156,13 @@ namespace OpenSim.Region.Framework.Scenes
156 taskItem.GroupPermissions = item.GroupPermissions; 156 taskItem.GroupPermissions = item.GroupPermissions;
157 taskItem.NextPermissions = item.NextPermissions; 157 taskItem.NextPermissions = item.NextPermissions;
158 } 158 }
159 159
160 taskItem.Flags = item.Flags; 160 taskItem.Flags = item.Flags;
161 161
162// m_log.DebugFormat( 162// m_log.DebugFormat(
163// "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}", 163// "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}",
164// taskItem.Flags, taskItem.Name, localID, remoteClient.Name); 164// taskItem.Flags, taskItem.Name, localID, remoteClient.Name);
165 165
166 // TODO: These are pending addition of those fields to TaskInventoryItem 166 // TODO: These are pending addition of those fields to TaskInventoryItem
167// taskItem.SalePrice = item.SalePrice; 167// taskItem.SalePrice = item.SalePrice;
168// taskItem.SaleType = item.SaleType; 168// taskItem.SaleType = item.SaleType;
@@ -328,13 +328,13 @@ namespace OpenSim.Region.Framework.Scenes
328 xmldoc.AppendChild(xmlnode); 328 xmldoc.AppendChild(xmlnode);
329 XmlElement rootElement = xmldoc.CreateElement("", "ScriptData", 329 XmlElement rootElement = xmldoc.CreateElement("", "ScriptData",
330 String.Empty); 330 String.Empty);
331 331
332 xmldoc.AppendChild(rootElement); 332 xmldoc.AppendChild(rootElement);
333 333
334 334
335 XmlElement wrapper = xmldoc.CreateElement("", "ScriptStates", 335 XmlElement wrapper = xmldoc.CreateElement("", "ScriptStates",
336 String.Empty); 336 String.Empty);
337 337
338 rootElement.AppendChild(wrapper); 338 rootElement.AppendChild(wrapper);
339 339
340 foreach (KeyValuePair<UUID, string> state in states) 340 foreach (KeyValuePair<UUID, string> state in states)
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Framework.Scenes
362 return; 362 return;
363 363
364 IScriptModule scriptModule = null; 364 IScriptModule scriptModule = null;
365 365
366 foreach (IScriptModule sm in s.RequestModuleInterfaces<IScriptModule>()) 366 foreach (IScriptModule sm in s.RequestModuleInterfaces<IScriptModule>())
367 { 367 {
368 if (sm.ScriptEngineName == s.DefaultScriptEngine) 368 if (sm.ScriptEngineName == s.DefaultScriptEngine)
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Framework.Scenes
401 return; 401 return;
402 402
403 XmlElement dataE = (XmlElement)dataL[0]; 403 XmlElement dataE = (XmlElement)dataL[0];
404 404
405 foreach (XmlNode n in dataE.ChildNodes) 405 foreach (XmlNode n in dataE.ChildNodes)
406 { 406 {
407 XmlElement stateE = (XmlElement)n; 407 XmlElement stateE = (XmlElement)n;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e42b675..8fdb0f1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -24,7 +24,7 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.ComponentModel; 29using System.ComponentModel;
30using System.Collections.Generic; 30using System.Collections.Generic;
@@ -46,7 +46,7 @@ using OpenSim.Services.Interfaces;
46 46
47namespace OpenSim.Region.Framework.Scenes 47namespace OpenSim.Region.Framework.Scenes
48{ 48{
49 49
50 [Flags] 50 [Flags]
51 public enum scriptEvents 51 public enum scriptEvents
52 { 52 {
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
148 { 148 {
149 if (value) 149 if (value)
150 { 150 {
151 151
152 if (Backup) 152 if (Backup)
153 { 153 {
154 m_scene.SceneGraph.FireChangeBackup(this); 154 m_scene.SceneGraph.FireChangeBackup(this);
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Framework.Scenes
188 } 188 }
189 } 189 }
190 m_hasGroupChanged = value; 190 m_hasGroupChanged = value;
191 191
192// m_log.DebugFormat( 192// m_log.DebugFormat(
193// "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId); 193// "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId);
194 } 194 }
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Framework.Scenes
197 } 197 }
198 198
199 private bool m_groupContainsForeignPrims = false; 199 private bool m_groupContainsForeignPrims = false;
200 200
201 /// <summary> 201 /// <summary>
202 /// Whether the group contains prims that came from a different group. This happens when 202 /// Whether the group contains prims that came from a different group. This happens when
203 /// linking or delinking groups. The implication is that until the group is persisted, 203 /// linking or delinking groups. The implication is that until the group is persisted,
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Framework.Scenes
232 m_maxPersistTime = m_scene.m_persistAfter; 232 m_maxPersistTime = m_scene.m_persistAfter;
233 m_minPersistTime = m_scene.m_dontPersistBefore; 233 m_minPersistTime = m_scene.m_dontPersistBefore;
234 } 234 }
235 235
236 long currentTime = DateTime.UtcNow.Ticks; 236 long currentTime = DateTime.UtcNow.Ticks;
237 237
238 if (timeLastChanged == 0) timeLastChanged = currentTime; 238 if (timeLastChanged == 0) timeLastChanged = currentTime;
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Framework.Scenes
419// { 419// {
420// get { return m_rotation; } 420// get { return m_rotation; }
421// set { 421// set {
422// m_rotation = value; 422// m_rotation = value;
423// } 423// }
424// } 424// }
425 425
@@ -435,27 +435,27 @@ namespace OpenSim.Region.Framework.Scenes
435 Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize); 435 Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize);
436 Vector3 maxScale = Vector3.Zero; 436 Vector3 maxScale = Vector3.Zero;
437 Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f); 437 Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f);
438 438
439 SceneObjectPart[] parts = m_parts.GetArray(); 439 SceneObjectPart[] parts = m_parts.GetArray();
440 for (int i = 0; i < parts.Length; i++) 440 for (int i = 0; i < parts.Length; i++)
441 { 441 {
442 SceneObjectPart part = parts[i]; 442 SceneObjectPart part = parts[i];
443 Vector3 partscale = part.Scale; 443 Vector3 partscale = part.Scale;
444 Vector3 partoffset = part.OffsetPosition; 444 Vector3 partoffset = part.OffsetPosition;
445 445
446 minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X; 446 minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X;
447 minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.Y + partoffset.Y : minScale.Y; 447 minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.Y + partoffset.Y : minScale.Y;
448 minScale.Z = (partscale.Z + partoffset.Z < minScale.Z) ? partscale.Z + partoffset.Z : minScale.Z; 448 minScale.Z = (partscale.Z + partoffset.Z < minScale.Z) ? partscale.Z + partoffset.Z : minScale.Z;
449 449
450 maxScale.X = (partscale.X + partoffset.X > maxScale.X) ? partscale.X + partoffset.X : maxScale.X; 450 maxScale.X = (partscale.X + partoffset.X > maxScale.X) ? partscale.X + partoffset.X : maxScale.X;
451 maxScale.Y = (partscale.Y + partoffset.Y > maxScale.Y) ? partscale.Y + partoffset.Y : maxScale.Y; 451 maxScale.Y = (partscale.Y + partoffset.Y > maxScale.Y) ? partscale.Y + partoffset.Y : maxScale.Y;
452 maxScale.Z = (partscale.Z + partoffset.Z > maxScale.Z) ? partscale.Z + partoffset.Z : maxScale.Z; 452 maxScale.Z = (partscale.Z + partoffset.Z > maxScale.Z) ? partscale.Z + partoffset.Z : maxScale.Z;
453 } 453 }
454 454
455 finalScale.X = (minScale.X > maxScale.X) ? minScale.X : maxScale.X; 455 finalScale.X = (minScale.X > maxScale.X) ? minScale.X : maxScale.X;
456 finalScale.Y = (minScale.Y > maxScale.Y) ? minScale.Y : maxScale.Y; 456 finalScale.Y = (minScale.Y > maxScale.Y) ? minScale.Y : maxScale.Y;
457 finalScale.Z = (minScale.Z > maxScale.Z) ? minScale.Z : maxScale.Z; 457 finalScale.Z = (minScale.Z > maxScale.Z) ? minScale.Z : maxScale.Z;
458 458
459 return finalScale; 459 return finalScale;
460 } 460 }
461 } 461 }
@@ -520,7 +520,7 @@ namespace OpenSim.Region.Framework.Scenes
520 /// <remarks> 520 /// <remarks>
521 /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't 521 /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't
522 /// have the IsAttachment property yet checked. 522 /// have the IsAttachment property yet checked.
523 /// 523 ///
524 /// FIXME: However, this should be fixed so that this property 524 /// FIXME: However, this should be fixed so that this property
525 /// propertly reflects the underlying status. 525 /// propertly reflects the underlying status.
526 /// </remarks> 526 /// </remarks>
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Framework.Scenes
530 return (IsAttachment || 530 return (IsAttachment ||
531 (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0)); 531 (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
532 } 532 }
533 533
534 private struct avtocrossInfo 534 private struct avtocrossInfo
535 { 535 {
536 public ScenePresence av; 536 public ScenePresence av;
@@ -627,7 +627,7 @@ namespace OpenSim.Region.Framework.Scenes
627 OpenSim.Services.Interfaces.GridRegion destination = null; 627 OpenSim.Services.Interfaces.GridRegion destination = null;
628 628
629 if (sog.RootPart.DIE_AT_EDGE) 629 if (sog.RootPart.DIE_AT_EDGE)
630 { 630 {
631 try 631 try
632 { 632 {
633 sogScene.DeleteSceneObject(sog, false); 633 sogScene.DeleteSceneObject(sog, false);
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Framework.Scenes
648 localIDs.Add(sog.RootPart.LocalId); 648 localIDs.Add(sog.RootPart.LocalId);
649 sogScene.AddReturn(sog.OwnerID, sog.Name, sog.AbsolutePosition, 649 sogScene.AddReturn(sog.OwnerID, sog.Name, sog.AbsolutePosition,
650 "Returned at region cross"); 650 "Returned at region cross");
651 sogScene.DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, UUID.Zero); 651 sogScene.DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, UUID.Zero);
652 } 652 }
653 catch (Exception) 653 catch (Exception)
654 { 654 {
@@ -754,7 +754,7 @@ namespace OpenSim.Region.Framework.Scenes
754 // avatar cross failed we need do dedicated standUp 754 // avatar cross failed we need do dedicated standUp
755 // part of it was done at CrossAgentToNewRegionAsync 755 // part of it was done at CrossAgentToNewRegionAsync
756 // so for now just remove the sog controls 756 // so for now just remove the sog controls
757 // this may need extra care 757 // this may need extra care
758 av.UnRegisterSeatControls(sog.UUID); 758 av.UnRegisterSeatControls(sog.UUID);
759 } 759 }
760 760
@@ -869,7 +869,7 @@ namespace OpenSim.Region.Framework.Scenes
869 public override UUID UUID 869 public override UUID UUID
870 { 870 {
871 get { return m_rootPart.UUID; } 871 get { return m_rootPart.UUID; }
872 set 872 set
873 { 873 {
874 lock (m_parts.SyncRoot) 874 lock (m_parts.SyncRoot)
875 { 875 {
@@ -931,7 +931,7 @@ namespace OpenSim.Region.Framework.Scenes
931 { 931 {
932 get { return true; } 932 get { return true; }
933 } 933 }
934 934
935 public bool IsSelected 935 public bool IsSelected
936 { 936 {
937 get { return m_isSelected; } 937 get { return m_isSelected; }
@@ -944,7 +944,7 @@ namespace OpenSim.Region.Framework.Scenes
944 // but ode engines should only really need to know about root part 944 // but ode engines should only really need to know about root part
945 // so they can put entire object simulation on hold and not colliding 945 // so they can put entire object simulation on hold and not colliding
946 // keep as was for now 946 // keep as was for now
947 947
948 PhysicsActor pa = m_rootPart.PhysActor; 948 PhysicsActor pa = m_rootPart.PhysActor;
949 if (pa != null) 949 if (pa != null)
950 { 950 {
@@ -1107,7 +1107,7 @@ namespace OpenSim.Region.Framework.Scenes
1107 /// </summary> 1107 /// </summary>
1108 public SceneObjectGroup() 1108 public SceneObjectGroup()
1109 { 1109 {
1110 1110
1111 } 1111 }
1112 1112
1113 /// <summary> 1113 /// <summary>
@@ -1152,7 +1152,7 @@ namespace OpenSim.Region.Framework.Scenes
1152 if (itemid != UUID.Zero) 1152 if (itemid != UUID.Zero)
1153 m_savedScriptState[itemid] = node.InnerXml; 1153 m_savedScriptState[itemid] = node.InnerXml;
1154 } 1154 }
1155 } 1155 }
1156 } 1156 }
1157 } 1157 }
1158 1158
@@ -1211,11 +1211,11 @@ namespace OpenSim.Region.Framework.Scenes
1211 1211
1212 if (!Backup) 1212 if (!Backup)
1213 m_scene.EventManager.OnBackup += ProcessBackup; 1213 m_scene.EventManager.OnBackup += ProcessBackup;
1214 1214
1215 Backup = true; 1215 Backup = true;
1216 } 1216 }
1217 } 1217 }
1218 1218
1219 /// <summary> 1219 /// <summary>
1220 /// Attach this object to a scene. It will also now appear to agents. 1220 /// Attach this object to a scene. It will also now appear to agents.
1221 /// </summary> 1221 /// </summary>
@@ -1378,7 +1378,7 @@ namespace OpenSim.Region.Framework.Scenes
1378 backBottomRight.Y = orig.Y + (part.Scale.Y / 2); 1378 backBottomRight.Y = orig.Y + (part.Scale.Y / 2);
1379 backBottomRight.Z = orig.Z - (part.Scale.Z / 2); 1379 backBottomRight.Z = orig.Z - (part.Scale.Z / 2);
1380 1380
1381 1381
1382 1382
1383 //m_log.InfoFormat("pre corner 1 is {0} {1} {2}", frontTopLeft.X, frontTopLeft.Y, frontTopLeft.Z); 1383 //m_log.InfoFormat("pre corner 1 is {0} {1} {2}", frontTopLeft.X, frontTopLeft.Y, frontTopLeft.Z);
1384 //m_log.InfoFormat("pre corner 2 is {0} {1} {2}", frontTopRight.X, frontTopRight.Y, frontTopRight.Z); 1384 //m_log.InfoFormat("pre corner 2 is {0} {1} {2}", frontTopRight.X, frontTopRight.Y, frontTopRight.Z);
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.Framework.Scenes
1675 } 1675 }
1676 1676
1677 int nparts = parts.Length; 1677 int nparts = parts.Length;
1678 1678
1679 1679
1680 for (int i = 0; i < nparts; i++) 1680 for (int i = 0; i < nparts; i++)
1681 { 1681 {
@@ -1692,7 +1692,7 @@ namespace OpenSim.Region.Framework.Scenes
1692 { 1692 {
1693 linksetResCost = 0; 1693 linksetResCost = 0;
1694 linksetPhysCost = 0; 1694 linksetPhysCost = 0;
1695 partCost = 0; 1695 partCost = 0;
1696 partPhysCost = 0; 1696 partPhysCost = 0;
1697 1697
1698 for (int i = 0; i < nparts; i++) 1698 for (int i = 0; i < nparts; i++)
@@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Framework.Scenes
1838 else 1838 else
1839 { 1839 {
1840 m_log.WarnFormat( 1840 m_log.WarnFormat(
1841 "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", 1841 "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
1842 UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName); 1842 UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName);
1843 } 1843 }
1844 } 1844 }
@@ -1925,7 +1925,7 @@ namespace OpenSim.Region.Framework.Scenes
1925 { 1925 {
1926 return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 1926 return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
1927 } 1927 }
1928 1928
1929 /// <summary> 1929 /// <summary>
1930 /// Set a part to act as the root part for this scene object 1930 /// Set a part to act as the root part for this scene object
1931 /// </summary> 1931 /// </summary>
@@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Framework.Scenes
1940 if (!IsAttachment) 1940 if (!IsAttachment)
1941 part.ParentID = 0; 1941 part.ParentID = 0;
1942 part.LinkNum = 0; 1942 part.LinkNum = 0;
1943 1943
1944 m_parts.Add(m_rootPart.UUID, m_rootPart); 1944 m_parts.Add(m_rootPart.UUID, m_rootPart);
1945 } 1945 }
1946 1946
@@ -1991,19 +1991,19 @@ namespace OpenSim.Region.Framework.Scenes
1991 // justincc: I don't believe this hack is needed any longer, especially since the physics 1991 // justincc: I don't believe this hack is needed any longer, especially since the physics
1992 // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false 1992 // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false
1993 // this method was preventing proper reload of scene objects. 1993 // this method was preventing proper reload of scene objects.
1994 1994
1995 // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects 1995 // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects
1996 // at region startup 1996 // at region startup
1997 1997
1998 // teravus: After this was removed from the linking algorithm, Linked prims no longer collided 1998 // teravus: After this was removed from the linking algorithm, Linked prims no longer collided
1999 // properly when non-physical if they havn't been moved. This breaks ALL builds. 1999 // properly when non-physical if they havn't been moved. This breaks ALL builds.
2000 // see: http://opensimulator.org/mantis/view.php?id=3108 2000 // see: http://opensimulator.org/mantis/view.php?id=3108
2001 2001
2002 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the 2002 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
2003 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and 2003 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and
2004 // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute 2004 // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute
2005 // Position has been set! 2005 // Position has been set!
2006 2006
2007 public void ResetChildPrimPhysicsPositions() 2007 public void ResetChildPrimPhysicsPositions()
2008 { 2008 {
2009 // Setting this SOG's absolute position also loops through and sets the positions 2009 // Setting this SOG's absolute position also loops through and sets the positions
@@ -2219,9 +2219,9 @@ namespace OpenSim.Region.Framework.Scenes
2219 2219
2220 if (m_rootPart.PhysActor != null) 2220 if (m_rootPart.PhysActor != null)
2221 m_rootPart.PhysActor.Building = false; 2221 m_rootPart.PhysActor.Building = false;
2222 } 2222 }
2223 else 2223 else
2224 { 2224 {
2225 // Apply physics to the root prim 2225 // Apply physics to the root prim
2226 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false); 2226 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false);
2227 } 2227 }
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Framework.Scenes
2309 2309
2310 DetachFromBackup(); 2310 DetachFromBackup();
2311 m_log.DebugFormat( 2311 m_log.DebugFormat(
2312 "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", 2312 "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn",
2313 RootPart.UUID); 2313 RootPart.UUID);
2314 m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn"); 2314 m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn");
2315 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, 2315 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero,
@@ -2364,9 +2364,9 @@ namespace OpenSim.Region.Framework.Scenes
2364 2364
2365 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); 2365 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
2366 2366
2367 backup_group.ForEachPart(delegate(SceneObjectPart part) 2367 backup_group.ForEachPart(delegate(SceneObjectPart part)
2368 { 2368 {
2369 part.Inventory.ProcessInventoryBackup(datastore); 2369 part.Inventory.ProcessInventoryBackup(datastore);
2370 2370
2371 if(part.KeyframeMotion != null) 2371 if(part.KeyframeMotion != null)
2372 { 2372 {
@@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes
2389 catch (Exception e) 2389 catch (Exception e)
2390 { 2390 {
2391 m_log.ErrorFormat( 2391 m_log.ErrorFormat(
2392 "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}{4}", 2392 "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}{4}",
2393 Name, UUID, m_scene.RegionInfo.RegionName, e.Message, e.StackTrace); 2393 Name, UUID, m_scene.RegionInfo.RegionName, e.Message, e.StackTrace);
2394 } 2394 }
2395 } 2395 }
@@ -2427,22 +2427,22 @@ namespace OpenSim.Region.Framework.Scenes
2427 { 2427 {
2428 m_dupeInProgress = true; 2428 m_dupeInProgress = true;
2429 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); 2429 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
2430 2430
2431 dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>(); 2431 dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
2432 2432
2433 // a copy isnt backedup 2433 // a copy isnt backedup
2434 dupe.Backup = false; 2434 dupe.Backup = false;
2435 dupe.InvalidBoundsRadius(); 2435 dupe.InvalidBoundsRadius();
2436 2436
2437 // a copy is not in transit hopefully 2437 // a copy is not in transit hopefully
2438 dupe.inTransit = false; 2438 dupe.inTransit = false;
2439 2439
2440 // new group as no sitting avatars 2440 // new group as no sitting avatars
2441 dupe.m_sittingAvatars = new List<ScenePresence>(); 2441 dupe.m_sittingAvatars = new List<ScenePresence>();
2442 2442
2443 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 2443 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
2444 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 2444 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
2445 2445
2446 2446
2447 if (userExposed) 2447 if (userExposed)
2448 dupe.m_rootPart.TrimPermissions(); 2448 dupe.m_rootPart.TrimPermissions();
@@ -2587,7 +2587,7 @@ namespace OpenSim.Region.Framework.Scenes
2587 2587
2588 if (pa != null) 2588 if (pa != null)
2589 { 2589 {
2590 // false to be applied as a impulse 2590 // false to be applied as a impulse
2591 pa.AddForce(impulse, false); 2591 pa.AddForce(impulse, false);
2592 m_scene.PhysicsScene.AddPhysicsActorTaint(pa); 2592 m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
2593 } 2593 }
@@ -2723,7 +2723,7 @@ namespace OpenSim.Region.Framework.Scenes
2723 if(IsAttachment) 2723 if(IsAttachment)
2724 { 2724 {
2725 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); 2725 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
2726 if (avatar != null) 2726 if (avatar != null)
2727 pa = avatar.PhysicsActor; 2727 pa = avatar.PhysicsActor;
2728 } 2728 }
2729 else 2729 else
@@ -2813,7 +2813,7 @@ namespace OpenSim.Region.Framework.Scenes
2813 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags) 2813 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags)
2814 { 2814 {
2815 remoteClient.SendObjectPropertiesFamilyData(RootPart, RequestFlags); 2815 remoteClient.SendObjectPropertiesFamilyData(RootPart, RequestFlags);
2816 2816
2817// remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask, 2817// remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask,
2818// RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, 2818// RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask,
2819// RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, 2819// RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category,
@@ -2844,7 +2844,7 @@ namespace OpenSim.Region.Framework.Scenes
2844 // return; 2844 // return;
2845 2845
2846 // If we somehow got here to updating the SOG and its root part is not scheduled for update, 2846 // If we somehow got here to updating the SOG and its root part is not scheduled for update,
2847 // check to see if the physical position or rotation warrant an update. 2847 // check to see if the physical position or rotation warrant an update.
2848 if (m_rootPart.UpdateFlag == UpdateRequired.NONE) 2848 if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
2849 { 2849 {
2850 // rootpart SendScheduledUpdates will check if a update is needed 2850 // rootpart SendScheduledUpdates will check if a update is needed
@@ -2885,7 +2885,7 @@ namespace OpenSim.Region.Framework.Scenes
2885 { 2885 {
2886// if (IsAttachment) 2886// if (IsAttachment)
2887// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId); 2887// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId);
2888 2888
2889 checkAtTargets(); 2889 checkAtTargets();
2890 RootPart.ScheduleFullUpdate(); 2890 RootPart.ScheduleFullUpdate();
2891 2891
@@ -2919,11 +2919,11 @@ namespace OpenSim.Region.Framework.Scenes
2919 /// Immediately send a full update for this scene object. 2919 /// Immediately send a full update for this scene object.
2920 /// </summary> 2920 /// </summary>
2921 public void SendGroupFullUpdate() 2921 public void SendGroupFullUpdate()
2922 { 2922 {
2923 if (IsDeleted) 2923 if (IsDeleted)
2924 return; 2924 return;
2925 2925
2926// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); 2926// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID);
2927 2927
2928 if (IsAttachment) 2928 if (IsAttachment)
2929 { 2929 {
@@ -2964,7 +2964,7 @@ namespace OpenSim.Region.Framework.Scenes
2964 { 2964 {
2965 if (m_scene == null) // Need to check here as it's null during object creation 2965 if (m_scene == null) // Need to check here as it's null during object creation
2966 return; 2966 return;
2967 2967
2968 m_scene.SceneGraph.AddToUpdateList(this); 2968 m_scene.SceneGraph.AddToUpdateList(this);
2969 } 2969 }
2970 2970
@@ -3139,7 +3139,7 @@ namespace OpenSim.Region.Framework.Scenes
3139 Vector3 oldGroupPosition = linkPart.GroupPosition; 3139 Vector3 oldGroupPosition = linkPart.GroupPosition;
3140 Quaternion oldRootRotation = linkPart.RotationOffset; 3140 Quaternion oldRootRotation = linkPart.RotationOffset;
3141 3141
3142 // A linked SOP remembers its location and rotation relative to the root of a group. 3142 // A linked SOP remembers its location and rotation relative to the root of a group.
3143 // Convert the root of the group being linked to be relative to the 3143 // Convert the root of the group being linked to be relative to the
3144 // root of the group being linked to. 3144 // root of the group being linked to.
3145 // Note: Some of the assignments have complex side effects. 3145 // Note: Some of the assignments have complex side effects.
@@ -3247,7 +3247,7 @@ namespace OpenSim.Region.Framework.Scenes
3247 objectGroup.IsDeleted = true; 3247 objectGroup.IsDeleted = true;
3248 3248
3249 objectGroup.m_parts.Clear(); 3249 objectGroup.m_parts.Clear();
3250 3250
3251 // Can't do this yet since backup still makes use of the root part without any synchronization 3251 // Can't do this yet since backup still makes use of the root part without any synchronization
3252// objectGroup.m_rootPart = null; 3252// objectGroup.m_rootPart = null;
3253 3253
@@ -3258,8 +3258,8 @@ namespace OpenSim.Region.Framework.Scenes
3258 3258
3259 AttachToBackup(); 3259 AttachToBackup();
3260 3260
3261 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the 3261 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
3262 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and 3262 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and
3263 // unmoved prims! 3263 // unmoved prims!
3264 ResetChildPrimPhysicsPositions(); 3264 ResetChildPrimPhysicsPositions();
3265 3265
@@ -3453,7 +3453,7 @@ namespace OpenSim.Region.Framework.Scenes
3453 lock (m_parts.SyncRoot) 3453 lock (m_parts.SyncRoot)
3454 if(!m_parts.Remove(linkPart.UUID)) 3454 if(!m_parts.Remove(linkPart.UUID))
3455 continue; 3455 continue;
3456 3456
3457 linkPart.ClearUndoState(); 3457 linkPart.ClearUndoState();
3458 3458
3459 Vector3 worldPos = linkPart.GetWorldPosition(); 3459 Vector3 worldPos = linkPart.GetWorldPosition();
@@ -3580,7 +3580,7 @@ namespace OpenSim.Region.Framework.Scenes
3580 part.setOffsetPosition(newPos - AbsolutePosition); 3580 part.setOffsetPosition(newPos - AbsolutePosition);
3581 3581
3582 // (radams1 20120711: I don't know why part.OffsetPosition is set multiple times. 3582 // (radams1 20120711: I don't know why part.OffsetPosition is set multiple times.
3583 // It would have the affect of setting the physics engine position multiple 3583 // It would have the affect of setting the physics engine position multiple
3584 // times. In theory, that is not necessary but I don't have a good linkset 3584 // times. In theory, that is not necessary but I don't have a good linkset
3585 // test to know that cleaning up this code wouldn't break things.) 3585 // test to know that cleaning up this code wouldn't break things.)
3586 3586
@@ -3685,29 +3685,29 @@ namespace OpenSim.Region.Framework.Scenes
3685 /// <param name="remoteClient"></param> 3685 /// <param name="remoteClient"></param>
3686 public void SpinMovement(Quaternion newOrientation, IClientAPI remoteClient) 3686 public void SpinMovement(Quaternion newOrientation, IClientAPI remoteClient)
3687 { 3687 {
3688 // The incoming newOrientation, sent by the client, "seems" to be the 3688 // The incoming newOrientation, sent by the client, "seems" to be the
3689 // desired target orientation. This needs further verification; in particular, 3689 // desired target orientation. This needs further verification; in particular,
3690 // one would expect that the initial incoming newOrientation should be 3690 // one would expect that the initial incoming newOrientation should be
3691 // fairly close to the original prim's physical orientation, 3691 // fairly close to the original prim's physical orientation,
3692 // m_rootPart.PhysActor.Orientation. This however does not seem to be the 3692 // m_rootPart.PhysActor.Orientation. This however does not seem to be the
3693 // case (might just be an issue with different quaternions representing the 3693 // case (might just be an issue with different quaternions representing the
3694 // same rotation, or it might be a coordinate system issue). 3694 // same rotation, or it might be a coordinate system issue).
3695 // 3695 //
3696 // Since it's not clear what the relationship is between the PhysActor.Orientation 3696 // Since it's not clear what the relationship is between the PhysActor.Orientation
3697 // and the incoming orientations sent by the client, we take an alternative approach 3697 // and the incoming orientations sent by the client, we take an alternative approach
3698 // of calculating the delta rotation between the orientations being sent by the 3698 // of calculating the delta rotation between the orientations being sent by the
3699 // client. (Since a spin is invoked by ctrl+shift+drag in the client, we expect 3699 // client. (Since a spin is invoked by ctrl+shift+drag in the client, we expect
3700 // a steady stream of several new orientations coming in from the client.) 3700 // a steady stream of several new orientations coming in from the client.)
3701 // This ensures that the delta rotations are being calculated from self-consistent 3701 // This ensures that the delta rotations are being calculated from self-consistent
3702 // pairs of old/new rotations. Given the delta rotation, we apply a torque around 3702 // pairs of old/new rotations. Given the delta rotation, we apply a torque around
3703 // the delta rotation axis, scaled by the object mass times an arbitrary scaling 3703 // the delta rotation axis, scaled by the object mass times an arbitrary scaling
3704 // factor (to ensure the resulting torque is not "too strong" or "too weak"). 3704 // factor (to ensure the resulting torque is not "too strong" or "too weak").
3705 // 3705 //
3706 // Ideally we need to calculate (probably iteratively) the exact torque or series 3706 // Ideally we need to calculate (probably iteratively) the exact torque or series
3707 // of torques needed to arrive exactly at the destination orientation. However, since 3707 // of torques needed to arrive exactly at the destination orientation. However, since
3708 // it is not yet clear how to map the destination orientation (provided by the viewer) 3708 // it is not yet clear how to map the destination orientation (provided by the viewer)
3709 // into PhysActor orientations (needed by the physics engine), we omit this step. 3709 // into PhysActor orientations (needed by the physics engine), we omit this step.
3710 // This means that the resulting torque will at least be in the correct direction, 3710 // This means that the resulting torque will at least be in the correct direction,
3711 // but it will result in over-shoot or under-shoot of the target orientation. 3711 // but it will result in over-shoot or under-shoot of the target orientation.
3712 // For the end user, this means that ctrl+shift+drag can be used for relative, 3712 // For the end user, this means that ctrl+shift+drag can be used for relative,
3713 // but not absolute, adjustments of orientation for physical prims. 3713 // but not absolute, adjustments of orientation for physical prims.
@@ -3750,7 +3750,7 @@ namespace OpenSim.Region.Framework.Scenes
3750 if(rotationAngle > 0) 3750 if(rotationAngle > 0)
3751 spinforce = spinforce * pa.Mass * 0.1f; // 0.1 is an arbitrary torque scaling factor 3751 spinforce = spinforce * pa.Mass * 0.1f; // 0.1 is an arbitrary torque scaling factor
3752 else 3752 else
3753 spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling 3753 spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling
3754 pa.AddAngularForce(spinforce,true); 3754 pa.AddAngularForce(spinforce,true);
3755 m_scene.PhysicsScene.AddPhysicsActorTaint(pa); 3755 m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
3756 } 3756 }
@@ -3870,8 +3870,8 @@ namespace OpenSim.Region.Framework.Scenes
3870 if (selectionPart != null) 3870 if (selectionPart != null)
3871 { 3871 {
3872 SceneObjectPart[] parts = m_parts.GetArray(); 3872 SceneObjectPart[] parts = m_parts.GetArray();
3873 3873
3874 if (Scene != null && UsePhysics) 3874 if (Scene != null && UsePhysics)
3875 { 3875 {
3876 int maxprims = m_scene.m_linksetPhysCapacity; 3876 int maxprims = m_scene.m_linksetPhysCapacity;
3877 bool checkShape = (maxprims > 0 && 3877 bool checkShape = (maxprims > 0 &&
@@ -3975,7 +3975,7 @@ namespace OpenSim.Region.Framework.Scenes
3975 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); 3975 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask);
3976 3976
3977// m_log.DebugFormat( 3977// m_log.DebugFormat(
3978// "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", 3978// "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}",
3979// (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); 3979// (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name);
3980 3980
3981 RootPart.ScheduleFullUpdate(); 3981 RootPart.ScheduleFullUpdate();
@@ -4273,7 +4273,7 @@ namespace OpenSim.Region.Framework.Scenes
4273 { 4273 {
4274 if (Scene == null || IsDeleted || inTransit) 4274 if (Scene == null || IsDeleted || inTransit)
4275 return 1.0f; 4275 return 1.0f;
4276 4276
4277 float maxsize = Scene.m_maxNonphys; 4277 float maxsize = Scene.m_maxNonphys;
4278 PhysicsActor pa = m_rootPart.PhysActor; 4278 PhysicsActor pa = m_rootPart.PhysActor;
4279 // assuming physics is more restrictive 4279 // assuming physics is more restrictive
@@ -4282,7 +4282,7 @@ namespace OpenSim.Region.Framework.Scenes
4282 4282
4283 SceneObjectPart[] parts = m_parts.GetArray(); 4283 SceneObjectPart[] parts = m_parts.GetArray();
4284 float larger = float.MinValue; 4284 float larger = float.MinValue;
4285 4285
4286 for(int i = 0; i < parts.Length; i++) 4286 for(int i = 0; i < parts.Length; i++)
4287 { 4287 {
4288 SceneObjectPart obPart = parts[i]; 4288 SceneObjectPart obPart = parts[i];
@@ -4310,7 +4310,7 @@ namespace OpenSim.Region.Framework.Scenes
4310 { 4310 {
4311 if (Scene == null || IsDeleted || inTransit) 4311 if (Scene == null || IsDeleted || inTransit)
4312 return 1.0f; 4312 return 1.0f;
4313 4313
4314 float minsize = Scene.m_minNonphys; 4314 float minsize = Scene.m_minNonphys;
4315 PhysicsActor pa = m_rootPart.PhysActor; 4315 PhysicsActor pa = m_rootPart.PhysActor;
4316 // assuming physics is more restrictive 4316 // assuming physics is more restrictive
@@ -4319,7 +4319,7 @@ namespace OpenSim.Region.Framework.Scenes
4319 4319
4320 SceneObjectPart[] parts = m_parts.GetArray(); 4320 SceneObjectPart[] parts = m_parts.GetArray();
4321 float smaller = float.MaxValue; 4321 float smaller = float.MaxValue;
4322 4322
4323 for(int i = 0; i < parts.Length; i++) 4323 for(int i = 0; i < parts.Length; i++)
4324 { 4324 {
4325 SceneObjectPart obPart = parts[i]; 4325 SceneObjectPart obPart = parts[i];
@@ -4388,7 +4388,7 @@ namespace OpenSim.Region.Framework.Scenes
4388 /// </summary> 4388 /// </summary>
4389 /// <param name="pos"></param> 4389 /// <param name="pos"></param>
4390 /// <param name="localID"></param> 4390 /// <param name="localID"></param>
4391 /// 4391 ///
4392 4392
4393 public void UpdateSinglePosition(Vector3 pos, uint localID) 4393 public void UpdateSinglePosition(Vector3 pos, uint localID)
4394 { 4394 {
@@ -4443,7 +4443,7 @@ namespace OpenSim.Region.Framework.Scenes
4443 } 4443 }
4444 4444
4445 AbsolutePosition = newPos; 4445 AbsolutePosition = newPos;
4446 4446
4447 if (IsAttachment) 4447 if (IsAttachment)
4448 m_rootPart.AttachedPos = newPos; 4448 m_rootPart.AttachedPos = newPos;
4449 4449
@@ -4469,7 +4469,7 @@ namespace OpenSim.Region.Framework.Scenes
4469 public void UpdateGroupRotationR(Quaternion rot) 4469 public void UpdateGroupRotationR(Quaternion rot)
4470 { 4470 {
4471 m_rootPart.UpdateRotation(rot); 4471 m_rootPart.UpdateRotation(rot);
4472 4472
4473/* this is done by rootpart RotationOffset set called by UpdateRotation 4473/* this is done by rootpart RotationOffset set called by UpdateRotation
4474 PhysicsActor actor = m_rootPart.PhysActor; 4474 PhysicsActor actor = m_rootPart.PhysActor;
4475 if (actor != null) 4475 if (actor != null)
@@ -4747,7 +4747,7 @@ namespace OpenSim.Region.Framework.Scenes
4747 if (setX || setY || setZ) 4747 if (setX || setY || setZ)
4748 { 4748 {
4749 bool lockaxis = (rotate10 == 0); // zero means axis locked 4749 bool lockaxis = (rotate10 == 0); // zero means axis locked
4750 4750
4751 byte locks = RootPart.RotationAxisLocks; 4751 byte locks = RootPart.RotationAxisLocks;
4752 4752
4753 if (setX) 4753 if (setX)
@@ -4757,7 +4757,7 @@ namespace OpenSim.Region.Framework.Scenes
4757 else 4757 else
4758 locks &= (byte)SceneObjectGroup.axisSelect.NOT_STATUS_ROTATE_X; 4758 locks &= (byte)SceneObjectGroup.axisSelect.NOT_STATUS_ROTATE_X;
4759 } 4759 }
4760 4760
4761 if (setY) 4761 if (setY)
4762 { 4762 {
4763 if(lockaxis) 4763 if(lockaxis)
@@ -4791,7 +4791,7 @@ namespace OpenSim.Region.Framework.Scenes
4791 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) 4791 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X)
4792 return (rotAxislocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) == 0 ? 1:0; 4792 return (rotAxislocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) == 0 ? 1:0;
4793 4793
4794 return 0; 4794 return 0;
4795 } 4795 }
4796 4796
4797 public int registerRotTargetWaypoint(Quaternion target, float tolerance) 4797 public int registerRotTargetWaypoint(Quaternion target, float tolerance)
@@ -4837,7 +4837,7 @@ namespace OpenSim.Region.Framework.Scenes
4837 m_scene.AddGroupTarget(this); 4837 m_scene.AddGroupTarget(this);
4838 return (int)handle; 4838 return (int)handle;
4839 } 4839 }
4840 4840
4841 public void unregisterTargetWaypoint(int handle) 4841 public void unregisterTargetWaypoint(int handle)
4842 { 4842 {
4843 lock (m_targets) 4843 lock (m_targets)
@@ -4879,14 +4879,14 @@ namespace OpenSim.Region.Framework.Scenes
4879 } 4879 }
4880 } 4880 }
4881 } 4881 }
4882 4882
4883 if (atTargets.Count > 0) 4883 if (atTargets.Count > 0)
4884 { 4884 {
4885 SceneObjectPart[] parts = m_parts.GetArray(); 4885 SceneObjectPart[] parts = m_parts.GetArray();
4886 uint[] localids = new uint[parts.Length]; 4886 uint[] localids = new uint[parts.Length];
4887 for (int i = 0; i < parts.Length; i++) 4887 for (int i = 0; i < parts.Length; i++)
4888 localids[i] = parts[i].LocalId; 4888 localids[i] = parts[i].LocalId;
4889 4889
4890 for (int ctr = 0; ctr < localids.Length; ctr++) 4890 for (int ctr = 0; ctr < localids.Length; ctr++)
4891 { 4891 {
4892 foreach (uint target in atTargets.Keys) 4892 foreach (uint target in atTargets.Keys)
@@ -4896,10 +4896,10 @@ namespace OpenSim.Region.Framework.Scenes
4896 localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition); 4896 localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition);
4897 } 4897 }
4898 } 4898 }
4899 4899
4900 return; 4900 return;
4901 } 4901 }
4902 4902
4903 if (m_scriptListens_notAtTarget && !at_target) 4903 if (m_scriptListens_notAtTarget && !at_target)
4904 { 4904 {
4905 //trigger not_at_target 4905 //trigger not_at_target
@@ -4907,7 +4907,7 @@ namespace OpenSim.Region.Framework.Scenes
4907 uint[] localids = new uint[parts.Length]; 4907 uint[] localids = new uint[parts.Length];
4908 for (int i = 0; i < parts.Length; i++) 4908 for (int i = 0; i < parts.Length; i++)
4909 localids[i] = parts[i].LocalId; 4909 localids[i] = parts[i].LocalId;
4910 4910
4911 for (int ctr = 0; ctr < localids.Length; ctr++) 4911 for (int ctr = 0; ctr < localids.Length; ctr++)
4912 { 4912 {
4913 m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]); 4913 m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]);
@@ -4994,7 +4994,7 @@ namespace OpenSim.Region.Framework.Scenes
4994 // http://wiki.secondlife.com/wiki/llGetGeometricCenter 4994 // http://wiki.secondlife.com/wiki/llGetGeometricCenter
4995 // ignoring tortured prims details since sl also seems to ignore 4995 // ignoring tortured prims details since sl also seems to ignore
4996 // so no real use in doing it on physics 4996 // so no real use in doing it on physics
4997 4997
4998 Vector3 gc = Vector3.Zero; 4998 Vector3 gc = Vector3.Zero;
4999 4999
5000 SceneObjectPart[] parts = m_parts.GetArray(); 5000 SceneObjectPart[] parts = m_parts.GetArray();
@@ -5034,7 +5034,7 @@ namespace OpenSim.Region.Framework.Scenes
5034 Vector3 tmp = pa.CenterOfMass; 5034 Vector3 tmp = pa.CenterOfMass;
5035 return tmp; 5035 return tmp;
5036 } 5036 }
5037 5037
5038 Vector3 Ptot = Vector3.Zero; 5038 Vector3 Ptot = Vector3.Zero;
5039 float totmass = 0f; 5039 float totmass = 0f;
5040 float m; 5040 float m;
@@ -5072,7 +5072,7 @@ namespace OpenSim.Region.Framework.Scenes
5072 } 5072 }
5073 5073
5074 HasGroupChanged = true; 5074 HasGroupChanged = true;
5075 5075
5076 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled 5076 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
5077 // for the same object with very different properties. The caller must schedule the update. 5077 // for the same object with very different properties. The caller must schedule the update.
5078 //ScheduleGroupForFullUpdate(); 5078 //ScheduleGroupForFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b95b5be..b97cceb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes
134 ); 134 );
135 private const scriptEvents PhyscicsVolumeDtcSubsEvents = ( 135 private const scriptEvents PhyscicsVolumeDtcSubsEvents = (
136 scriptEvents.collision_start | scriptEvents.collision_end 136 scriptEvents.collision_start | scriptEvents.collision_end
137 ); 137 );
138 138
139 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 139 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
140 140
@@ -148,8 +148,8 @@ namespace OpenSim.Region.Framework.Scenes
148 /// <summary> 148 /// <summary>
149 /// Dynamic objects that can be created and deleted as required. 149 /// Dynamic objects that can be created and deleted as required.
150 /// </summary> 150 /// </summary>
151 public DOMap DynObjs 151 public DOMap DynObjs
152 { 152 {
153 get 153 get
154 { 154 {
155 if (m_dynObjs == null) 155 if (m_dynObjs == null)
@@ -163,16 +163,16 @@ namespace OpenSim.Region.Framework.Scenes
163 m_dynObjs = value; 163 m_dynObjs = value;
164 } 164 }
165 } 165 }
166 166
167 /// <value> 167 /// <value>
168 /// Is this a root part? 168 /// Is this a root part?
169 /// </value> 169 /// </value>
170 /// <remarks> 170 /// <remarks>
171 /// This will return true even if the whole object is attached to an avatar. 171 /// This will return true even if the whole object is attached to an avatar.
172 /// </remarks> 172 /// </remarks>
173 public bool IsRoot 173 public bool IsRoot
174 { 174 {
175 get { return Object.ReferenceEquals(ParentGroup.RootPart, this); } 175 get { return Object.ReferenceEquals(ParentGroup.RootPart, this); }
176 } 176 }
177 177
178 /// <summary> 178 /// <summary>
@@ -192,11 +192,11 @@ namespace OpenSim.Region.Framework.Scenes
192 #region Fields 192 #region Fields
193 193
194 public bool AllowedDrop; 194 public bool AllowedDrop;
195 195
196 public bool DIE_AT_EDGE; 196 public bool DIE_AT_EDGE;
197 197
198 public bool RETURN_AT_EDGE; 198 public bool RETURN_AT_EDGE;
199 199
200 public bool BlockGrab { get; set; } 200 public bool BlockGrab { get; set; }
201 201
202 public bool StatusSandbox; 202 public bool StatusSandbox;
@@ -221,7 +221,7 @@ namespace OpenSim.Region.Framework.Scenes
221 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. 221 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
222 // Not a big problem as long as the script that sets it remains in the prim on startup. 222 // Not a big problem as long as the script that sets it remains in the prim on startup.
223 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) 223 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script)
224 224
225 public UUID Sound; 225 public UUID Sound;
226 226
227 public byte SoundFlags; 227 public byte SoundFlags;
@@ -254,7 +254,7 @@ namespace OpenSim.Region.Framework.Scenes
254 254
255 [XmlIgnore] 255 [XmlIgnore]
256 public int STATUS_ROTATE_X; // this should not be used 256 public int STATUS_ROTATE_X; // this should not be used
257 257
258 [XmlIgnore] 258 [XmlIgnore]
259 public int STATUS_ROTATE_Y; // this should not be used 259 public int STATUS_ROTATE_Y; // this should not be used
260 260
@@ -262,13 +262,13 @@ namespace OpenSim.Region.Framework.Scenes
262 public int STATUS_ROTATE_Z; // this should not be used 262 public int STATUS_ROTATE_Z; // this should not be used
263 263
264 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); 264 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>();
265 265
266 /// <value> 266 /// <value>
267 /// The UUID of the user inventory item from which this object was rezzed if this is a root part. 267 /// The UUID of the user inventory item from which this object was rezzed if this is a root part.
268 /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item. 268 /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item.
269 /// </value> 269 /// </value>
270 private UUID m_fromUserInventoryItemID; 270 private UUID m_fromUserInventoryItemID;
271 271
272 public UUID FromUserInventoryItemID 272 public UUID FromUserInventoryItemID
273 { 273 {
274 get { return m_fromUserInventoryItemID; } 274 get { return m_fromUserInventoryItemID; }
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Framework.Scenes
289 289
290 public bool VolumeDetectActive 290 public bool VolumeDetectActive
291 { 291 {
292 get 292 get
293 { 293 {
294 return (Flags & (PrimFlags)primFlagVolumeDetect) != 0; 294 return (Flags & (PrimFlags)primFlagVolumeDetect) != 0;
295 } 295 }
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Framework.Scenes
313 313
314 /// <summary> 314 /// <summary>
315 /// This part's inventory 315 /// This part's inventory
316 /// </summary> 316 /// </summary>
317 public IEntityInventory Inventory 317 public IEntityInventory Inventory
318 { 318 {
319 get { return m_inventory; } 319 get { return m_inventory; }
@@ -321,20 +321,20 @@ namespace OpenSim.Region.Framework.Scenes
321 protected SceneObjectPartInventory m_inventory; 321 protected SceneObjectPartInventory m_inventory;
322 322
323 public bool Undoing; 323 public bool Undoing;
324 324
325 public bool IgnoreUndoUpdate = false; 325 public bool IgnoreUndoUpdate = false;
326 326
327 public PrimFlags LocalFlags; 327 public PrimFlags LocalFlags;
328 328
329 private float m_damage = -1.0f; 329 private float m_damage = -1.0f;
330 private byte[] m_TextureAnimation; 330 private byte[] m_TextureAnimation;
331 private byte m_clickAction; 331 private byte m_clickAction;
332 private Color m_color = Color.Black; 332 private Color m_color = Color.Black;
333 private readonly List<uint> m_lastColliders = new List<uint>(); 333 private readonly List<uint> m_lastColliders = new List<uint>();
334 private int m_linkNum; 334 private int m_linkNum;
335 335
336 private int m_scriptAccessPin; 336 private int m_scriptAccessPin;
337 337
338 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); 338 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
339 private string m_sitName = String.Empty; 339 private string m_sitName = String.Empty;
340 private Quaternion m_sitTargetOrientation = Quaternion.Identity; 340 private Quaternion m_sitTargetOrientation = Quaternion.Identity;
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Framework.Scenes
403 private UUID m_collisionSound; 403 private UUID m_collisionSound;
404 private float m_collisionSoundVolume; 404 private float m_collisionSoundVolume;
405 405
406 private int LastColSoundSentTime; 406 private int LastColSoundSentTime;
407 407
408 private SOPVehicle m_vehicleParams = null; 408 private SOPVehicle m_vehicleParams = null;
409 409
@@ -454,7 +454,7 @@ namespace OpenSim.Region.Framework.Scenes
454 /// <param name="rotationOffset"></param> 454 /// <param name="rotationOffset"></param>
455 /// <param name="offsetPosition"></param> 455 /// <param name="offsetPosition"></param>
456 public SceneObjectPart( 456 public SceneObjectPart(
457 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, 457 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
458 Quaternion rotationOffset, Vector3 offsetPosition) : this() 458 Quaternion rotationOffset, Vector3 offsetPosition) : this()
459 { 459 {
460 m_name = "Object"; 460 m_name = "Object";
@@ -505,7 +505,7 @@ namespace OpenSim.Region.Framework.Scenes
505 private bool m_createSelected = false; 505 private bool m_createSelected = false;
506 506
507 private UUID _creatorID; 507 private UUID _creatorID;
508 public UUID CreatorID 508 public UUID CreatorID
509 { 509 {
510 get { return _creatorID; } 510 get { return _creatorID; }
511 set { _creatorID = value; } 511 set { _creatorID = value; }
@@ -515,7 +515,7 @@ namespace OpenSim.Region.Framework.Scenes
515 /// <summary> 515 /// <summary>
516 /// Data about the creator in the form home_url;name 516 /// Data about the creator in the form home_url;name
517 /// </summary> 517 /// </summary>
518 public string CreatorData 518 public string CreatorData
519 { 519 {
520 get { return m_creatorData; } 520 get { return m_creatorData; }
521 set { m_creatorData = value; } 521 set { m_creatorData = value; }
@@ -565,7 +565,7 @@ namespace OpenSim.Region.Framework.Scenes
565 } 565 }
566 566
567 /// <summary> 567 /// <summary>
568 /// A relic from when we we thought that prims contained folder objects. In 568 /// A relic from when we we thought that prims contained folder objects. In
569 /// reality, prim == folder 569 /// reality, prim == folder
570 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see 570 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see
571 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. 571 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim.
@@ -611,10 +611,10 @@ namespace OpenSim.Region.Framework.Scenes
611 public UUID UUID 611 public UUID UUID
612 { 612 {
613 get { return m_uuid; } 613 get { return m_uuid; }
614 set 614 set
615 { 615 {
616 m_uuid = value; 616 m_uuid = value;
617 617
618 // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part 618 // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part
619 if (Inventory != null) 619 if (Inventory != null)
620 Inventory.ResetObjectID(); 620 Inventory.ResetObjectID();
@@ -634,8 +634,8 @@ namespace OpenSim.Region.Framework.Scenes
634 public virtual string Name 634 public virtual string Name
635 { 635 {
636 get { return m_name; } 636 get { return m_name; }
637 set 637 set
638 { 638 {
639 m_name = value; 639 m_name = value;
640 640
641 PhysicsActor pa = PhysActor; 641 PhysicsActor pa = PhysActor;
@@ -678,11 +678,11 @@ namespace OpenSim.Region.Framework.Scenes
678 m_isSelected = value; 678 m_isSelected = value;
679 if (ParentGroup != null) 679 if (ParentGroup != null)
680 ParentGroup.PartSelectChanged(value); 680 ParentGroup.PartSelectChanged(value);
681 681
682 } 682 }
683 } 683 }
684 684
685 685
686 public Dictionary<int, string> CollisionFilter 686 public Dictionary<int, string> CollisionFilter
687 { 687 {
688 get { return m_CollisionFilter; } 688 get { return m_CollisionFilter; }
@@ -704,14 +704,14 @@ namespace OpenSim.Region.Framework.Scenes
704 set { m_APIDTarget = value; } 704 set { m_APIDTarget = value; }
705 } 705 }
706 706
707 707
708 protected float APIDDamp 708 protected float APIDDamp
709 { 709 {
710 get { return m_APIDDamp; } 710 get { return m_APIDDamp; }
711 set { m_APIDDamp = value; } 711 set { m_APIDDamp = value; }
712 } 712 }
713 713
714 714
715 protected float APIDStrength 715 protected float APIDStrength
716 { 716 {
717 get { return m_APIDStrength; } 717 get { return m_APIDStrength; }
@@ -769,21 +769,21 @@ namespace OpenSim.Region.Framework.Scenes
769 set { m_particleSystem = value; } 769 set { m_particleSystem = value; }
770 } 770 }
771 771
772 772
773 public DateTime Expires 773 public DateTime Expires
774 { 774 {
775 get { return m_expires; } 775 get { return m_expires; }
776 set { m_expires = value; } 776 set { m_expires = value; }
777 } 777 }
778 778
779 779
780 public DateTime Rezzed 780 public DateTime Rezzed
781 { 781 {
782 get { return m_rezzed; } 782 get { return m_rezzed; }
783 set { m_rezzed = value; } 783 set { m_rezzed = value; }
784 } 784 }
785 785
786 786
787 public float Damage 787 public float Damage
788 { 788 {
789 get { return m_damage; } 789 get { return m_damage; }
@@ -798,7 +798,7 @@ namespace OpenSim.Region.Framework.Scenes
798 /// <summary> 798 /// <summary>
799 /// The position of the entire group that this prim belongs to. 799 /// The position of the entire group that this prim belongs to.
800 /// </summary> 800 /// </summary>
801 /// 801 ///
802 802
803 public Vector3 GroupPosition 803 public Vector3 GroupPosition
804 { 804 {
@@ -837,7 +837,7 @@ namespace OpenSim.Region.Framework.Scenes
837 // Root prim actually goes at Position 837 // Root prim actually goes at Position
838 if (ParentID == 0) 838 if (ParentID == 0)
839 { 839 {
840 actor.Position = value; 840 actor.Position = value;
841 } 841 }
842 else 842 else
843 { 843 {
@@ -955,7 +955,7 @@ namespace OpenSim.Region.Framework.Scenes
955 955
956 return m_rotationOffset; 956 return m_rotationOffset;
957 } 957 }
958 958
959 set 959 set
960 { 960 {
961// StoreUndoState(); 961// StoreUndoState();
@@ -1066,24 +1066,24 @@ namespace OpenSim.Region.Framework.Scenes
1066 if ((actor != null) && actor.IsPhysical && ParentGroup.RootPart == this && VehicleType == (int)Vehicle.TYPE_NONE) 1066 if ((actor != null) && actor.IsPhysical && ParentGroup.RootPart == this && VehicleType == (int)Vehicle.TYPE_NONE)
1067 { 1067 {
1068 actor.RotationalVelocity = m_angularVelocity; 1068 actor.RotationalVelocity = m_angularVelocity;
1069 } 1069 }
1070 } 1070 }
1071 } 1071 }
1072 1072
1073 /// <summary></summary> 1073 /// <summary></summary>
1074 public Vector3 Acceleration 1074 public Vector3 Acceleration
1075 { 1075 {
1076 get 1076 get
1077 { 1077 {
1078 PhysicsActor actor = PhysActor; 1078 PhysicsActor actor = PhysActor;
1079 if (actor != null) 1079 if (actor != null)
1080 { 1080 {
1081 m_acceleration = actor.Acceleration; 1081 m_acceleration = actor.Acceleration;
1082 } 1082 }
1083 return m_acceleration; 1083 return m_acceleration;
1084 } 1084 }
1085 1085
1086 set 1086 set
1087 { 1087 {
1088 if (Util.IsNanOrInfinity(value)) 1088 if (Util.IsNanOrInfinity(value))
1089 m_acceleration = Vector3.Zero; 1089 m_acceleration = Vector3.Zero;
@@ -1217,23 +1217,23 @@ namespace OpenSim.Region.Framework.Scenes
1217 else 1217 else
1218 b = sz; 1218 b = sz;
1219 } 1219 }
1220 1220
1221 return a * b; 1221 return a * b;
1222 } 1222 }
1223 1223
1224 public UpdateRequired UpdateFlag { get; set; } 1224 public UpdateRequired UpdateFlag { get; set; }
1225 1225
1226 /// <summary> 1226 /// <summary>
1227 /// Used for media on a prim. 1227 /// Used for media on a prim.
1228 /// </summary> 1228 /// </summary>
1229 /// Do not change this value directly - always do it through an IMoapModule. 1229 /// Do not change this value directly - always do it through an IMoapModule.
1230 public string MediaUrl 1230 public string MediaUrl
1231 { 1231 {
1232 get 1232 get
1233 { 1233 {
1234 return m_mediaUrl; 1234 return m_mediaUrl;
1235 } 1235 }
1236 1236
1237 set 1237 set
1238 { 1238 {
1239 m_mediaUrl = value; 1239 m_mediaUrl = value;
@@ -1246,10 +1246,10 @@ namespace OpenSim.Region.Framework.Scenes
1246 public bool CreateSelected 1246 public bool CreateSelected
1247 { 1247 {
1248 get { return m_createSelected; } 1248 get { return m_createSelected; }
1249 set 1249 set
1250 { 1250 {
1251// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); 1251// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID);
1252 m_createSelected = value; 1252 m_createSelected = value;
1253 } 1253 }
1254 } 1254 }
1255 1255
@@ -1423,7 +1423,7 @@ namespace OpenSim.Region.Framework.Scenes
1423 } 1423 }
1424 1424
1425 /// <summary> 1425 /// <summary>
1426 /// Property flags. See OpenMetaverse.PrimFlags 1426 /// Property flags. See OpenMetaverse.PrimFlags
1427 /// </summary> 1427 /// </summary>
1428 /// <remarks> 1428 /// <remarks>
1429 /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge 1429 /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge
@@ -1431,18 +1431,18 @@ namespace OpenSim.Region.Framework.Scenes
1431 public PrimFlags Flags 1431 public PrimFlags Flags
1432 { 1432 {
1433 get { return _flags; } 1433 get { return _flags; }
1434 set 1434 set
1435 { 1435 {
1436// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value); 1436// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value);
1437 _flags = value; 1437 _flags = value;
1438 } 1438 }
1439 } 1439 }
1440 1440
1441 [XmlIgnore] 1441 [XmlIgnore]
1442 public bool IsOccupied // KF If an av is sittingon this prim 1442 public bool IsOccupied // KF If an av is sittingon this prim
1443 { 1443 {
1444 get { return m_occupied; } 1444 get { return m_occupied; }
1445 set { m_occupied = value; } 1445 set { m_occupied = value; }
1446 } 1446 }
1447 1447
1448 /// <summary> 1448 /// <summary>
@@ -1474,7 +1474,7 @@ namespace OpenSim.Region.Framework.Scenes
1474 } 1474 }
1475 1475
1476 private UUID _parentUUID = UUID.Zero; 1476 private UUID _parentUUID = UUID.Zero;
1477 1477
1478 public UUID ParentUUID 1478 public UUID ParentUUID
1479 { 1479 {
1480 get 1480 get
@@ -1487,7 +1487,7 @@ namespace OpenSim.Region.Framework.Scenes
1487 1487
1488 set { _parentUUID = value; } 1488 set { _parentUUID = value; }
1489 } 1489 }
1490 1490
1491 public string SitAnimation 1491 public string SitAnimation
1492 { 1492 {
1493 get { return m_sitAnimation; } 1493 get { return m_sitAnimation; }
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes
1519 { 1519 {
1520 get { return m_collisionSound; } 1520 get { return m_collisionSound; }
1521 set 1521 set
1522 { 1522 {
1523 m_collisionSound = value; 1523 m_collisionSound = value;
1524 1524
1525 if (value == invalidCollisionSoundUUID) 1525 if (value == invalidCollisionSoundUUID)
@@ -1589,7 +1589,7 @@ namespace OpenSim.Region.Framework.Scenes
1589 { 1589 {
1590 if (ParentGroup.RootPart == this) 1590 if (ParentGroup.RootPart == this)
1591 return m_torque; 1591 return m_torque;
1592 1592
1593 return ParentGroup.RootPart.Torque; 1593 return ParentGroup.RootPart.Torque;
1594 } 1594 }
1595 1595
@@ -1733,7 +1733,7 @@ namespace OpenSim.Region.Framework.Scenes
1733 set 1733 set
1734 { 1734 {
1735 byte oldv = m_physicsShapeType; 1735 byte oldv = m_physicsShapeType;
1736 1736
1737 if (value >= 0 && value <= (byte)PhysShapeType.convex) 1737 if (value >= 0 && value <= (byte)PhysShapeType.convex)
1738 { 1738 {
1739 if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) 1739 if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this)
@@ -1966,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes
1966 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); 1966 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
1967 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); 1967 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
1968 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); 1968 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
1969 1969
1970 } 1970 }
1971 m_TextureAnimation = data; 1971 m_TextureAnimation = data;
1972 } 1972 }
@@ -2063,7 +2063,7 @@ namespace OpenSim.Region.Framework.Scenes
2063 2063
2064 root.AngularVelocity = pAngVel; 2064 root.AngularVelocity = pAngVel;
2065 } 2065 }
2066 2066
2067 2067
2068 /// <summary> 2068 /// <summary>
2069 /// hook to the physics scene to apply angular impulse 2069 /// hook to the physics scene to apply angular impulse
@@ -2095,7 +2095,7 @@ namespace OpenSim.Region.Framework.Scenes
2095 /// </summary> 2095 /// </summary>
2096 /// <param name="impulsei">Vector force</param> 2096 /// <param name="impulsei">Vector force</param>
2097 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 2097 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
2098 2098
2099 // this is actualy Set Torque.. keeping naming so not to edit lslapi also 2099 // this is actualy Set Torque.. keeping naming so not to edit lslapi also
2100 public void SetAngularImpulse(Vector3 torquei, bool localGlobalTF) 2100 public void SetAngularImpulse(Vector3 torquei, bool localGlobalTF)
2101 { 2101 {
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.Framework.Scenes
2116 /// <param name="VolumeDetectActive"></param> 2116 /// <param name="VolumeDetectActive"></param>
2117 /// <param name="building"></param> 2117 /// <param name="building"></param>
2118 2118
2119 public void ApplyPhysics(uint _ObjectFlags, bool _VolumeDetectActive, bool building) 2119 public void ApplyPhysics(uint _ObjectFlags, bool _VolumeDetectActive, bool building)
2120 { 2120 {
2121 VolumeDetectActive = _VolumeDetectActive; 2121 VolumeDetectActive = _VolumeDetectActive;
2122 2122
@@ -2177,7 +2177,7 @@ namespace OpenSim.Region.Framework.Scenes
2177 /// <returns></returns> 2177 /// <returns></returns>
2178 public SceneObjectPart Copy(uint plocalID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) 2178 public SceneObjectPart Copy(uint plocalID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed)
2179 { 2179 {
2180 // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up 2180 // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up
2181 // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator 2181 // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator
2182 // but not between regions on different simulators). Really, all copying should be done explicitly. 2182 // but not between regions on different simulators). Really, all copying should be done explicitly.
2183 SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone(); 2183 SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone();
@@ -2242,20 +2242,20 @@ namespace OpenSim.Region.Framework.Scenes
2242 dupe.PayPrice = (int[])PayPrice.Clone(); 2242 dupe.PayPrice = (int[])PayPrice.Clone();
2243 2243
2244 dupe.DynAttrs.CopyFrom(DynAttrs); 2244 dupe.DynAttrs.CopyFrom(DynAttrs);
2245 2245
2246 if (userExposed) 2246 if (userExposed)
2247 { 2247 {
2248 bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); 2248 bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0);
2249 dupe.DoPhysicsPropertyUpdate(UsePhysics, true); 2249 dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
2250 } 2250 }
2251 2251
2252 if (dupe.PhysActor != null) 2252 if (dupe.PhysActor != null)
2253 dupe.PhysActor.LocalID = plocalID; 2253 dupe.PhysActor.LocalID = plocalID;
2254 2254
2255 ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); 2255 ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed);
2256 2256
2257// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); 2257// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
2258 2258
2259 return dupe; 2259 return dupe;
2260 } 2260 }
2261 2261
@@ -2428,7 +2428,7 @@ namespace OpenSim.Region.Framework.Scenes
2428 pa.link(parentPa); 2428 pa.link(parentPa);
2429 } 2429 }
2430 } 2430 }
2431 } 2431 }
2432 } 2432 }
2433 2433
2434 bool phan = ((Flags & PrimFlags.Phantom) != 0); 2434 bool phan = ((Flags & PrimFlags.Phantom) != 0);
@@ -2528,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes
2528 2528
2529 public uint GetEffectiveObjectFlags() 2529 public uint GetEffectiveObjectFlags()
2530 { 2530 {
2531 // Commenting this section of code out since it doesn't actually do anything, as enums are handled by 2531 // Commenting this section of code out since it doesn't actually do anything, as enums are handled by
2532 // value rather than reference 2532 // value rather than reference
2533// PrimFlags f = _flags; 2533// PrimFlags f = _flags;
2534// if (m_parentGroup == null || m_parentGroup.RootPart == this) 2534// if (m_parentGroup == null || m_parentGroup.RootPart == this)
@@ -2820,7 +2820,7 @@ namespace OpenSim.Region.Framework.Scenes
2820 2820
2821 ColliderArgs LandCollidingMessage = new ColliderArgs(); 2821 ColliderArgs LandCollidingMessage = new ColliderArgs();
2822 List<DetectedObject> colliding = new List<DetectedObject>(); 2822 List<DetectedObject> colliding = new List<DetectedObject>();
2823 2823
2824 colliding.Add(CreateDetObjectForGround()); 2824 colliding.Add(CreateDetObjectForGround());
2825 LandCollidingMessage.Colliders = colliding; 2825 LandCollidingMessage.Colliders = colliding;
2826 2826
@@ -2969,9 +2969,9 @@ namespace OpenSim.Region.Framework.Scenes
2969 // Note: This is only being called on the root prim at this time. 2969 // Note: This is only being called on the root prim at this time.
2970 2970
2971 m_log.ErrorFormat( 2971 m_log.ErrorFormat(
2972 "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.", 2972 "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.",
2973 Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition); 2973 Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition);
2974 2974
2975 RemFlag(PrimFlags.Physics); 2975 RemFlag(PrimFlags.Physics);
2976 DoPhysicsPropertyUpdate(false, true); 2976 DoPhysicsPropertyUpdate(false, true);
2977 } 2977 }
@@ -3026,7 +3026,7 @@ namespace OpenSim.Region.Framework.Scenes
3026 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 3026 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
3027 //ScheduleFullUpdate(); 3027 //ScheduleFullUpdate();
3028 } 3028 }
3029 3029
3030 public void RemoveScriptEvents(UUID scriptid) 3030 public void RemoveScriptEvents(UUID scriptid)
3031 { 3031 {
3032 lock (m_scriptEvents) 3032 lock (m_scriptEvents)
@@ -3089,7 +3089,7 @@ namespace OpenSim.Region.Framework.Scenes
3089 ParentGroup.HasGroupChanged = true; 3089 ParentGroup.HasGroupChanged = true;
3090 ScheduleFullUpdate(); 3090 ScheduleFullUpdate();
3091 } 3091 }
3092 3092
3093 public void RotLookAt(Quaternion target, float strength, float damping) 3093 public void RotLookAt(Quaternion target, float strength, float damping)
3094 { 3094 {
3095 if(ParentGroup.IsDeleted) 3095 if(ParentGroup.IsDeleted)
@@ -3115,7 +3115,7 @@ namespace OpenSim.Region.Framework.Scenes
3115 m_log.WarnFormat("[SceneObjectPart] Invalid rotation strength {0}",APIDStrength); 3115 m_log.WarnFormat("[SceneObjectPart] Invalid rotation strength {0}",APIDStrength);
3116 return; 3116 return;
3117 } 3117 }
3118 3118
3119 APIDActive = true; 3119 APIDActive = true;
3120 3120
3121 // Necessary to get the lookat deltas applied 3121 // Necessary to get the lookat deltas applied
@@ -3357,7 +3357,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3357 // sl Does send them 3357 // sl Does send them
3358 // if (ParentGroup.IsSelected && ParentGroup.IsAttachment) 3358 // if (ParentGroup.IsSelected && ParentGroup.IsAttachment)
3359 // return; 3359 // return;
3360 3360
3361 if (ParentGroup.IsDeleted) 3361 if (ParentGroup.IsDeleted)
3362 return; 3362 return;
3363 3363
@@ -3487,7 +3487,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3487 public void SetBuoyancy(float fvalue) 3487 public void SetBuoyancy(float fvalue)
3488 { 3488 {
3489 Buoyancy = fvalue; 3489 Buoyancy = fvalue;
3490/* 3490/*
3491 if (PhysActor != null) 3491 if (PhysActor != null)
3492 { 3492 {
3493 PhysActor.Buoyancy = fvalue; 3493 PhysActor.Buoyancy = fvalue;
@@ -3547,7 +3547,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3547 public void SetVehicleType(int type) 3547 public void SetVehicleType(int type)
3548 { 3548 {
3549 m_vehicleParams = null; 3549 m_vehicleParams = null;
3550 3550
3551 if (type == (int)Vehicle.TYPE_NONE) 3551 if (type == (int)Vehicle.TYPE_NONE)
3552 { 3552 {
3553 if (_parentID ==0 && PhysActor != null) 3553 if (_parentID ==0 && PhysActor != null)
@@ -3754,7 +3754,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3754 { 3754 {
3755 if (Shape.SculptEntry) 3755 if (Shape.SculptEntry)
3756 return PrimType.SCULPT; 3756 return PrimType.SCULPT;
3757 3757
3758 if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) 3758 if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
3759 { 3759 {
3760 if (Shape.PathCurve == (byte)Extrusion.Straight) 3760 if (Shape.PathCurve == (byte)Extrusion.Straight)
@@ -3782,12 +3782,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3782 else if (Shape.PathCurve == (byte)Extrusion.Curve1) 3782 else if (Shape.PathCurve == (byte)Extrusion.Curve1)
3783 return PrimType.RING; 3783 return PrimType.RING;
3784 } 3784 }
3785 3785
3786 return PrimType.BOX; 3786 return PrimType.BOX;
3787 } 3787 }
3788 3788
3789 /// <summary> 3789 /// <summary>
3790 /// Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces 3790 /// Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces
3791 /// </summary> 3791 /// </summary>
3792 /// <param name="primType"></param> 3792 /// <param name="primType"></param>
3793 /// <param name="shape"></param> 3793 /// <param name="shape"></param>
@@ -3812,7 +3812,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3812 hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms 3812 hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms
3813 hasProfileCut = hasDimple; // is it the same thing? 3813 hasProfileCut = hasDimple; // is it the same thing?
3814 } 3814 }
3815 3815
3816 public void SetGroup(UUID groupID, IClientAPI client) 3816 public void SetGroup(UUID groupID, IClientAPI client)
3817 { 3817 {
3818 // Scene.AddNewPrims() calls with client == null so can't use this. 3818 // Scene.AddNewPrims() calls with client == null so can't use this.
@@ -3859,7 +3859,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3859 public void SetScriptEvents(UUID scriptid, int events) 3859 public void SetScriptEvents(UUID scriptid, int events)
3860 { 3860 {
3861// m_log.DebugFormat( 3861// m_log.DebugFormat(
3862// "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}", 3862// "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}",
3863// scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name); 3863// scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name);
3864 3864
3865 // scriptEvents oldparts; 3865 // scriptEvents oldparts;
@@ -3896,7 +3896,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3896 ScheduleFullUpdate(); 3896 ScheduleFullUpdate();
3897 } 3897 }
3898 } 3898 }
3899 3899
3900 /// <summary> 3900 /// <summary>
3901 /// Set the text displayed for this part. 3901 /// Set the text displayed for this part.
3902 /// </summary> 3902 /// </summary>
@@ -4491,7 +4491,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4491 public bool IsHingeJoint() 4491 public bool IsHingeJoint()
4492 { 4492 {
4493 // For now, we use the NINJA naming scheme for identifying joints. 4493 // For now, we use the NINJA naming scheme for identifying joints.
4494 // In the future, we can support other joint specification schemes such as a 4494 // In the future, we can support other joint specification schemes such as a
4495 // custom checkbox in the viewer GUI. 4495 // custom checkbox in the viewer GUI.
4496 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4496 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4497 { 4497 {
@@ -4507,7 +4507,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4507 public bool IsBallJoint() 4507 public bool IsBallJoint()
4508 { 4508 {
4509 // For now, we use the NINJA naming scheme for identifying joints. 4509 // For now, we use the NINJA naming scheme for identifying joints.
4510 // In the future, we can support other joint specification schemes such as a 4510 // In the future, we can support other joint specification schemes such as a
4511 // custom checkbox in the viewer GUI. 4511 // custom checkbox in the viewer GUI.
4512 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4512 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4513 { 4513 {
@@ -4523,7 +4523,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4523 public bool IsJoint() 4523 public bool IsJoint()
4524 { 4524 {
4525 // For now, we use the NINJA naming scheme for identifying joints. 4525 // For now, we use the NINJA naming scheme for identifying joints.
4526 // In the future, we can support other joint specification schemes such as a 4526 // In the future, we can support other joint specification schemes such as a
4527 // custom checkbox in the viewer GUI. 4527 // custom checkbox in the viewer GUI.
4528 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4528 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4529 { 4529 {
@@ -4616,8 +4616,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4616 4616
4617 Stop(); 4617 Stop();
4618 } 4618 }
4619 4619
4620 else 4620 else
4621 { 4621 {
4622 if (ParentGroup.Scene.CollidablePrims) 4622 if (ParentGroup.Scene.CollidablePrims)
4623 { 4623 {
@@ -4649,7 +4649,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4649 4649
4650 UpdatePhysicsSubscribedEvents(); 4650 UpdatePhysicsSubscribedEvents();
4651 } 4651 }
4652 } 4652 }
4653 4653
4654 // and last in case we have a new actor and not building 4654 // and last in case we have a new actor and not building
4655 4655
@@ -4658,7 +4658,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4658 ParentGroup.HasGroupChanged = true; 4658 ParentGroup.HasGroupChanged = true;
4659 ScheduleFullUpdate(); 4659 ScheduleFullUpdate();
4660 } 4660 }
4661 4661
4662// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); 4662// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags);
4663 } 4663 }
4664 4664
@@ -4671,10 +4671,10 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4671 /// <param name="building">tells physics to delay full construction of object</param> 4671 /// <param name="building">tells physics to delay full construction of object</param>
4672 /// <param name="applyDynamics">applies velocities, force and torque</param> 4672 /// <param name="applyDynamics">applies velocities, force and torque</param>
4673 private void AddToPhysics(bool isPhysical, bool isPhantom, bool building, bool applyDynamics) 4673 private void AddToPhysics(bool isPhysical, bool isPhantom, bool building, bool applyDynamics)
4674 { 4674 {
4675 PhysicsActor pa; 4675 PhysicsActor pa;
4676 4676
4677 Vector3 velocity = Velocity; 4677 Vector3 velocity = Velocity;
4678 Vector3 rotationalVelocity = AngularVelocity;; 4678 Vector3 rotationalVelocity = AngularVelocity;;
4679 4679
4680 try 4680 try
@@ -4695,7 +4695,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4695 m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom. e={1}", m_uuid, e); 4695 m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom. e={1}", m_uuid, e);
4696 pa = null; 4696 pa = null;
4697 } 4697 }
4698 4698
4699 if (pa != null) 4699 if (pa != null)
4700 { 4700 {
4701 pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info 4701 pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info
@@ -4709,7 +4709,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4709 4709
4710 if(LocalId == ParentGroup.RootPart.LocalId) 4710 if(LocalId == ParentGroup.RootPart.LocalId)
4711 { 4711 {
4712 pa.LockAngularMotion(RotationAxisLocks); 4712 pa.LockAngularMotion(RotationAxisLocks);
4713 } 4713 }
4714 4714
4715 if (VolumeDetectActive) // change if not the default only 4715 if (VolumeDetectActive) // change if not the default only
@@ -4722,7 +4722,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4722 AddFlag(PrimFlags.CameraDecoupled); 4722 AddFlag(PrimFlags.CameraDecoupled);
4723 else 4723 else
4724 RemFlag(PrimFlags.CameraDecoupled); 4724 RemFlag(PrimFlags.CameraDecoupled);
4725 } 4725 }
4726 else 4726 else
4727 RemFlag(PrimFlags.CameraDecoupled); 4727 RemFlag(PrimFlags.CameraDecoupled);
4728 // we are going to tell rest of code about physics so better have this here 4728 // we are going to tell rest of code about physics so better have this here
@@ -4752,8 +4752,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4752 } 4752 }
4753 } 4753 }
4754 4754
4755 if (applyDynamics && LocalId == ParentGroup.RootPart.LocalId) 4755 if (applyDynamics && LocalId == ParentGroup.RootPart.LocalId)
4756 // do independent of isphysical so parameters get setted (at least some) 4756 // do independent of isphysical so parameters get setted (at least some)
4757 { 4757 {
4758 Velocity = velocity; 4758 Velocity = velocity;
4759 AngularVelocity = rotationalVelocity; 4759 AngularVelocity = rotationalVelocity;
@@ -4941,8 +4941,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4941 4941
4942 Primitive.TextureEntryFace fallbackNewFace = newTex.DefaultTexture; 4942 Primitive.TextureEntryFace fallbackNewFace = newTex.DefaultTexture;
4943 Primitive.TextureEntryFace fallbackOldFace = oldTex.DefaultTexture; 4943 Primitive.TextureEntryFace fallbackOldFace = oldTex.DefaultTexture;
4944 4944
4945 // On Incoming packets, sometimes newText.DefaultTexture is null. The assumption is that all 4945 // On Incoming packets, sometimes newText.DefaultTexture is null. The assumption is that all
4946 // other prim-sides are set, but apparently that's not always the case. Lets assume packet/data corruption at this point. 4946 // other prim-sides are set, but apparently that's not always the case. Lets assume packet/data corruption at this point.
4947 if (fallbackNewFace == null) 4947 if (fallbackNewFace == null)
4948 { 4948 {
@@ -4958,7 +4958,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4958 // Materials capable viewers can send a ObjectImage packet 4958 // Materials capable viewers can send a ObjectImage packet
4959 // when nothing in TE has changed. MaterialID should be updated 4959 // when nothing in TE has changed. MaterialID should be updated
4960 // by the RenderMaterials CAP handler, so updating it here may cause a 4960 // by the RenderMaterials CAP handler, so updating it here may cause a
4961 // race condtion. Therefore, if no non-materials TE fields have changed, 4961 // race condtion. Therefore, if no non-materials TE fields have changed,
4962 // we should ignore any changes and not update Shape.TextureEntry 4962 // we should ignore any changes and not update Shape.TextureEntry
4963 4963
4964 bool otherFieldsChanged = false; 4964 bool otherFieldsChanged = false;
@@ -5140,7 +5140,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5140 { 5140 {
5141 return m_forceMouselook; 5141 return m_forceMouselook;
5142 } 5142 }
5143 5143
5144 public override string ToString() 5144 public override string ToString()
5145 { 5145 {
5146 return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup); 5146 return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup);
@@ -5157,7 +5157,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5157 && (ParentGroup.RootPart != this 5157 && (ParentGroup.RootPart != this
5158 || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) 5158 || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint))
5159 return; 5159 return;
5160 5160
5161 // Causes this thread to dig into the Client Thread Data. 5161 // Causes this thread to dig into the Client Thread Data.
5162 // Remember your locking here! 5162 // Remember your locking here!
5163 remoteClient.SendEntityUpdate( 5163 remoteClient.SendEntityUpdate(
@@ -5165,9 +5165,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5165 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity 5165 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
5166 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); 5166 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
5167 5167
5168 ParentGroup.Scene.StatsReporter.AddObjectUpdates(1); 5168 ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
5169 } 5169 }
5170 5170
5171 public void AddScriptLPS(int count) 5171 public void AddScriptLPS(int count)
5172 { 5172 {
5173 ParentGroup.AddScriptLPS(count); 5173 ParentGroup.AddScriptLPS(count);
@@ -5233,7 +5233,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5233 { 5233 {
5234 PermissionsUtil.LogPermissions(Name, message, BaseMask, OwnerMask, NextOwnerMask); 5234 PermissionsUtil.LogPermissions(Name, message, BaseMask, OwnerMask, NextOwnerMask);
5235 } 5235 }
5236 5236
5237 public void ApplyNextOwnerPermissions() 5237 public void ApplyNextOwnerPermissions()
5238 { 5238 {
5239 // Export needs to be preserved in the base and everyone 5239 // Export needs to be preserved in the base and everyone
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 5b64aac..a50f162 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes
55 private object m_inventoryFileLock = new object(); 55 private object m_inventoryFileLock = new object();
56 56
57 private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); 57 private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>();
58 58
59 /// <value> 59 /// <value>
60 /// The part to which the inventory belongs. 60 /// The part to which the inventory belongs.
61 /// </value> 61 /// </value>
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes
76 /// Tracks whether inventory has changed since the last persistent backup 76 /// Tracks whether inventory has changed since the last persistent backup
77 /// </summary> 77 /// </summary>
78 internal bool HasInventoryChanged; 78 internal bool HasInventoryChanged;
79 79
80 /// <value> 80 /// <value>
81 /// Inventory serial number 81 /// Inventory serial number
82 /// </value> 82 /// </value>
@@ -91,8 +91,8 @@ namespace OpenSim.Region.Framework.Scenes
91 /// </value> 91 /// </value>
92 protected internal TaskInventoryDictionary Items 92 protected internal TaskInventoryDictionary Items
93 { 93 {
94 get { 94 get {
95 return m_items; 95 return m_items;
96 } 96 }
97 set 97 set
98 { 98 {
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Framework.Scenes
110 return m_items.Count; 110 return m_items.Count;
111 } 111 }
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Constructor 115 /// Constructor
116 /// </summary> 116 /// </summary>
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes
393 StoreScriptError(item.ItemID, msg); 393 StoreScriptError(item.ItemID, msg);
394 m_log.ErrorFormat( 394 m_log.ErrorFormat(
395 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", 395 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
396 item.Name, item.ItemID, m_part.AbsolutePosition, 396 item.Name, item.ItemID, m_part.AbsolutePosition,
397 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); 397 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
398 398
399 return false; 399 return false;
@@ -410,7 +410,7 @@ namespace OpenSim.Region.Framework.Scenes
410 m_items[item.ItemID].PermsGranter = UUID.Zero; 410 m_items[item.ItemID].PermsGranter = UUID.Zero;
411 411
412 m_items.LockItemsForWrite(false); 412 m_items.LockItemsForWrite(false);
413 413
414 string script = Utils.BytesToString(asset.Data); 414 string script = Utils.BytesToString(asset.Data);
415 m_part.ParentGroup.Scene.EventManager.TriggerRezScript( 415 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
416 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); 416 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
@@ -428,7 +428,7 @@ namespace OpenSim.Region.Framework.Scenes
428 private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID) 428 private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID)
429 { 429 {
430// m_log.DebugFormat( 430// m_log.DebugFormat(
431// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}", 431// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}",
432// newID, oldID, loadedID); 432// newID, oldID, loadedID);
433 433
434 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 434 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
477 477
478 m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml; 478 m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml;
479 } 479 }
480 480
481 foreach (IScriptModule e in engines) 481 foreach (IScriptModule e in engines)
482 { 482 {
483 if (e != null) 483 if (e != null)
@@ -544,7 +544,7 @@ namespace OpenSim.Region.Framework.Scenes
544 { 544 {
545 ArrayList errors; 545 ArrayList errors;
546 546
547 // Indicate to CreateScriptInstanceInternal() we want it to 547 // Indicate to CreateScriptInstanceInternal() we want it to
548 // post any compilation/loading error messages 548 // post any compilation/loading error messages
549 lock (m_scriptErrors) 549 lock (m_scriptErrors)
550 { 550 {
@@ -641,7 +641,7 @@ namespace OpenSim.Region.Framework.Scenes
641 { 641 {
642 if (!sceneObjectBeingDeleted) 642 if (!sceneObjectBeingDeleted)
643 m_part.RemoveScriptEvents(itemId); 643 m_part.RemoveScriptEvents(itemId);
644 644
645 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId); 645 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
646 m_part.ParentGroup.AddActiveScriptCount(-1); 646 m_part.ParentGroup.AddActiveScriptCount(-1);
647 } 647 }
@@ -650,7 +650,7 @@ namespace OpenSim.Region.Framework.Scenes
650 m_log.WarnFormat( 650 m_log.WarnFormat(
651 "[PRIM INVENTORY]: " + 651 "[PRIM INVENTORY]: " +
652 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 652 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
653 itemId, m_part.Name, m_part.UUID, 653 itemId, m_part.Name, m_part.UUID,
654 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 654 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
655 } 655 }
656 } 656 }
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Framework.Scenes
679 m_log.WarnFormat( 679 m_log.WarnFormat(
680 "[PRIM INVENTORY]: " + 680 "[PRIM INVENTORY]: " +
681 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 681 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
682 itemId, m_part.Name, m_part.UUID, 682 itemId, m_part.Name, m_part.UUID,
683 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 683 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
684 } 684 }
685 } 685 }
@@ -802,11 +802,11 @@ namespace OpenSim.Region.Framework.Scenes
802 m_items.LockItemsForWrite(true); 802 m_items.LockItemsForWrite(true);
803 m_items.Add(item.ItemID, item); 803 m_items.Add(item.ItemID, item);
804 m_items.LockItemsForWrite(false); 804 m_items.LockItemsForWrite(false);
805 if (allowedDrop) 805 if (allowedDrop)
806 m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); 806 m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP);
807 else 807 else
808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
809 809
810 m_inventorySerial++; 810 m_inventorySerial++;
811 //m_inventorySerial += 2; 811 //m_inventorySerial += 2;
812 HasInventoryChanged = true; 812 HasInventoryChanged = true;
@@ -887,7 +887,7 @@ namespace OpenSim.Region.Framework.Scenes
887 if (null == rezAsset) 887 if (null == rezAsset)
888 { 888 {
889 m_log.WarnFormat( 889 m_log.WarnFormat(
890 "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}", 890 "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}",
891 item.AssetID, item.Name, m_part.Name); 891 item.AssetID, item.Name, m_part.Name);
892 objlist = null; 892 objlist = null;
893 veclist = null; 893 veclist = null;
@@ -895,7 +895,7 @@ namespace OpenSim.Region.Framework.Scenes
895 offsetHeight = 0; 895 offsetHeight = 0;
896 return false; 896 return false;
897 } 897 }
898 898
899 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); 899 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight);
900 900
901 for (int i = 0; i < objlist.Count; i++) 901 for (int i = 0; i < objlist.Count; i++)
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Framework.Scenes
985 985
986 return true; 986 return true;
987 } 987 }
988 988
989 /// <summary> 989 /// <summary>
990 /// Update an existing inventory item. 990 /// Update an existing inventory item.
991 /// </summary> 991 /// </summary>
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Framework.Scenes
1009 if (m_items.ContainsKey(item.ItemID)) 1009 if (m_items.ContainsKey(item.ItemID))
1010 { 1010 {
1011// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); 1011// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name);
1012 1012
1013 item.ParentID = m_part.UUID; 1013 item.ParentID = m_part.UUID;
1014 item.ParentPartID = m_part.UUID; 1014 item.ParentPartID = m_part.UUID;
1015 1015
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.Framework.Scenes
1025 m_inventorySerial++; 1025 m_inventorySerial++;
1026 if (fireScriptEvents) 1026 if (fireScriptEvents)
1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
1028 1028
1029 if (considerChanged) 1029 if (considerChanged)
1030 { 1030 {
1031 HasInventoryChanged = true; 1031 HasInventoryChanged = true;
@@ -1039,7 +1039,7 @@ namespace OpenSim.Region.Framework.Scenes
1039 m_log.ErrorFormat( 1039 m_log.ErrorFormat(
1040 "[PRIM INVENTORY]: " + 1040 "[PRIM INVENTORY]: " +
1041 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory", 1041 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
1042 item.ItemID, m_part.Name, m_part.UUID, 1042 item.ItemID, m_part.Name, m_part.UUID,
1043 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 1043 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
1044 } 1044 }
1045 m_items.LockItemsForWrite(false); 1045 m_items.LockItemsForWrite(false);
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Framework.Scenes
1084 } 1084 }
1085 } 1085 }
1086 m_items.LockItemsForRead(false); 1086 m_items.LockItemsForRead(false);
1087 1087
1088 1088
1089 if (scriptcount <= 0) 1089 if (scriptcount <= 0)
1090 { 1090 {
@@ -1381,7 +1381,7 @@ namespace OpenSim.Region.Framework.Scenes
1381 item.CurrentPermissions = perms; 1381 item.CurrentPermissions = perms;
1382 item.BasePermissions = perms; 1382 item.BasePermissions = perms;
1383 } 1383 }
1384 1384
1385 m_inventorySerial++; 1385 m_inventorySerial++;
1386 HasInventoryChanged = true; 1386 HasInventoryChanged = true;
1387 } 1387 }
@@ -1485,7 +1485,7 @@ namespace OpenSim.Region.Framework.Scenes
1485 1485
1486 return ret; 1486 return ret;
1487 } 1487 }
1488 1488
1489 public Dictionary<UUID, string> GetScriptStates() 1489 public Dictionary<UUID, string> GetScriptStates()
1490 { 1490 {
1491 return GetScriptStates(false); 1491 return GetScriptStates(false);
@@ -1493,13 +1493,13 @@ namespace OpenSim.Region.Framework.Scenes
1493 1493
1494 public Dictionary<UUID, string> GetScriptStates(bool oldIDs) 1494 public Dictionary<UUID, string> GetScriptStates(bool oldIDs)
1495 { 1495 {
1496 Dictionary<UUID, string> ret = new Dictionary<UUID, string>(); 1496 Dictionary<UUID, string> ret = new Dictionary<UUID, string>();
1497 1497
1498 if (m_part.ParentGroup.Scene == null) // Group not in a scene 1498 if (m_part.ParentGroup.Scene == null) // Group not in a scene
1499 return ret; 1499 return ret;
1500 1500
1501 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 1501 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
1502 1502
1503 if (engines.Length == 0) // No engine at all 1503 if (engines.Length == 0) // No engine at all
1504 return ret; 1504 return ret;
1505 1505
@@ -1535,7 +1535,7 @@ namespace OpenSim.Region.Framework.Scenes
1535 } 1535 }
1536 return ret; 1536 return ret;
1537 } 1537 }
1538 1538
1539 public void ResumeScripts() 1539 public void ResumeScripts()
1540 { 1540 {
1541 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 1541 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c1b1a63..29e139b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -108,8 +108,8 @@ namespace OpenSim.Region.Framework.Scenes
108 /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine 108 /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine
109 /// for more details. 109 /// for more details.
110 /// </summary> 110 /// </summary>
111 public ScenePresenceState LifecycleState 111 public ScenePresenceState LifecycleState
112 { 112 {
113 get 113 get
114 { 114 {
115 return m_stateMachine.GetState(); 115 return m_stateMachine.GetState();
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes
126 /// the viewer fires these in quick succession. 126 /// the viewer fires these in quick succession.
127 /// </summary> 127 /// </summary>
128 /// <remarks> 128 /// <remarks>
129 /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement 129 /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement
130 /// regulation done there. 130 /// regulation done there.
131 /// </remarks> 131 /// </remarks>
132 private object m_completeMovementLock = new object(); 132 private object m_completeMovementLock = new object();
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes
134// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); 134// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes();
135 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); 135 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags));
136 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); 136 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f);
137 137
138 /// <summary> 138 /// <summary>
139 /// Experimentally determined "fudge factor" to make sit-target positions 139 /// Experimentally determined "fudge factor" to make sit-target positions
140 /// the same as in SecondLife. Fudge factor was tested for 36 different 140 /// the same as in SecondLife. Fudge factor was tested for 36 different
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Framework.Scenes
241 return m_currentParcelHide; 241 return m_currentParcelHide;
242 } 242 }
243 } 243 }
244 244
245 /// <value> 245 /// <value>
246 /// The animator for this avatar 246 /// The animator for this avatar
247 /// </value> 247 /// </value>
@@ -356,7 +356,7 @@ namespace OpenSim.Region.Framework.Scenes
356 protected bool m_reprioritizationBusy; 356 protected bool m_reprioritizationBusy;
357 protected Vector3 m_reprioritizationLastPosition; 357 protected Vector3 m_reprioritizationLastPosition;
358 protected float m_reprioritizationLastDrawDistance; 358 protected float m_reprioritizationLastDrawDistance;
359 359
360 private Quaternion m_headrotation = Quaternion.Identity; 360 private Quaternion m_headrotation = Quaternion.Identity;
361 361
362 //PauPaw:Proper PID Controler for autopilot************ 362 //PauPaw:Proper PID Controler for autopilot************
@@ -377,7 +377,7 @@ namespace OpenSim.Region.Framework.Scenes
377 377
378 //private bool m_collisionEventFlag = false; 378 //private bool m_collisionEventFlag = false;
379 private object m_collisionEventLock = new Object(); 379 private object m_collisionEventLock = new Object();
380 380
381 private int m_movementAnimationUpdateCounter = 0; 381 private int m_movementAnimationUpdateCounter = 0;
382 382
383 public Vector3 PrevSitOffset { get; set; } 383 public Vector3 PrevSitOffset { get; set; }
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Framework.Scenes
424 DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS, 424 DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS,
425 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG 425 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG
426 } 426 }
427 427
428 /// <summary> 428 /// <summary>
429 /// Position at which a significant movement was made 429 /// Position at which a significant movement was made
430 /// </summary> 430 /// </summary>
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Framework.Scenes
528 m_rootRegionHandle = value; 528 m_rootRegionHandle = value;
529 // position rounded to lower multiple of 256m 529 // position rounded to lower multiple of 256m
530 m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00); 530 m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00);
531 m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00); 531 m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00);
532 } 532 }
533 } 533 }
534 534
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Framework.Scenes
562 return a; 562 return a;
563 } 563 }
564 } 564 }
565 #endregion 565 #endregion
566 566
567 public string Firstname { get; private set; } 567 public string Firstname { get; private set; }
568 public string Lastname { get; private set; } 568 public string Lastname { get; private set; }
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes
603 public bool AllowMovement { get; set; } 603 public bool AllowMovement { get; set; }
604 604
605 private bool m_setAlwaysRun; 605 private bool m_setAlwaysRun;
606 606
607 public bool SetAlwaysRun 607 public bool SetAlwaysRun
608 { 608 {
609 get 609 get
@@ -689,7 +689,7 @@ namespace OpenSim.Region.Framework.Scenes
689 return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation()); 689 return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation());
690 } 690 }
691 } 691 }
692 692
693 return m_pos; 693 return m_pos;
694 } 694 }
695 set 695 set
@@ -777,7 +777,7 @@ namespace OpenSim.Region.Framework.Scenes
777 777
778// m_log.DebugFormat( 778// m_log.DebugFormat(
779// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}", 779// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
780// Scene.RegionInfo.RegionName, Name, m_velocity); 780// Scene.RegionInfo.RegionName, Name, m_velocity);
781 } 781 }
782 } 782 }
783 783
@@ -821,9 +821,9 @@ namespace OpenSim.Region.Framework.Scenes
821 /// </remarks> 821 /// </remarks>
822 public Quaternion Rotation 822 public Quaternion Rotation
823 { 823 {
824 get 824 get
825 { 825 {
826 return m_bodyRot; 826 return m_bodyRot;
827 } 827 }
828 828
829 set 829 set
@@ -963,10 +963,10 @@ namespace OpenSim.Region.Framework.Scenes
963 } 963 }
964 964
965 DropOldNeighbours(old); 965 DropOldNeighbours(old);
966 966
967 if (Scene.CapsModule != null) 967 if (Scene.CapsModule != null)
968 Scene.CapsModule.SetChildrenSeed(UUID, seeds); 968 Scene.CapsModule.SetChildrenSeed(UUID, seeds);
969*/ 969*/
970 KnownRegions = seeds; 970 KnownRegions = seeds;
971 //m_log.Debug(" ++++++++++AFTER+++++++++++++ "); 971 //m_log.Debug(" ++++++++++AFTER+++++++++++++ ");
972 //DumpKnownRegions(); 972 //DumpKnownRegions();
@@ -991,13 +991,13 @@ namespace OpenSim.Region.Framework.Scenes
991 /// <summary> 991 /// <summary>
992 /// This signals whether the presence is in transit between neighbouring regions. 992 /// This signals whether the presence is in transit between neighbouring regions.
993 /// </summary> 993 /// </summary>
994 /// <remarks> 994 /// <remarks>
995 /// It is not set when the presence is teleporting or logging in/out directly to a region. 995 /// It is not set when the presence is teleporting or logging in/out directly to a region.
996 /// </remarks> 996 /// </remarks>
997 public bool IsInTransit 997 public bool IsInTransit
998 { 998 {
999 get { return m_inTransit; } 999 get { return m_inTransit; }
1000 set { 1000 set {
1001 if(value) 1001 if(value)
1002 { 1002 {
1003 if (Flying) 1003 if (Flying)
@@ -1051,14 +1051,14 @@ namespace OpenSim.Region.Framework.Scenes
1051 { 1051 {
1052 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); } 1052 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); }
1053 } 1053 }
1054 1054
1055 #endregion 1055 #endregion
1056 1056
1057 #region Constructor(s) 1057 #region Constructor(s)
1058 1058
1059 public ScenePresence( 1059 public ScenePresence(
1060 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) 1060 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
1061 { 1061 {
1062 m_scene = world; 1062 m_scene = world;
1063 AttachmentsSyncLock = new Object(); 1063 AttachmentsSyncLock = new Object();
1064 AllowMovement = true; 1064 AllowMovement = true;
@@ -1092,16 +1092,16 @@ namespace OpenSim.Region.Framework.Scenes
1092 // Grouptitle = gm.GetGroupTitle(m_uuid); 1092 // Grouptitle = gm.GetGroupTitle(m_uuid);
1093 1093
1094 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>(); 1094 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
1095 1095
1096 AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition = 1096 AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition =
1097 m_reprioritizationLastPosition = ControllingClient.StartPos; 1097 m_reprioritizationLastPosition = ControllingClient.StartPos;
1098 1098
1099 m_reprioritizationLastDrawDistance = DrawDistance; 1099 m_reprioritizationLastDrawDistance = DrawDistance;
1100 1100
1101 // disable updates workjobs for now 1101 // disable updates workjobs for now
1102 childUpdatesBusy = true; 1102 childUpdatesBusy = true;
1103 m_reprioritizationBusy = true; 1103 m_reprioritizationBusy = true;
1104 1104
1105 AdjustKnownSeeds(); 1105 AdjustKnownSeeds();
1106 1106
1107 RegisterToClientEvents(); 1107 RegisterToClientEvents();
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes
1189 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 1189 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
1190 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 1190 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
1191 } 1191 }
1192 1192
1193 public void RemoveClientEvents() 1193 public void RemoveClientEvents()
1194 { 1194 {
1195 ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; 1195 ControllingClient.OnCompleteMovementToRegion -= CompleteMovement;
@@ -1237,7 +1237,7 @@ namespace OpenSim.Region.Framework.Scenes
1237 /// This method is on the critical path for transferring an avatar from one region to another. Delay here 1237 /// This method is on the critical path for transferring an avatar from one region to another. Delay here
1238 /// delays that crossing. 1238 /// delays that crossing.
1239 /// </remarks> 1239 /// </remarks>
1240 1240
1241 // constants for physics position search 1241 // constants for physics position search
1242 const float PhysSearchHeight = 600f; 1242 const float PhysSearchHeight = 600f;
1243 const float PhysMinSkipGap = 50f; 1243 const float PhysMinSkipGap = 50f;
@@ -1280,7 +1280,7 @@ namespace OpenSim.Region.Framework.Scenes
1280 // if not actually on the target invalidate it 1280 // if not actually on the target invalidate it
1281 if(gotCrossUpdate && (crossingFlags & 0x04) == 0) 1281 if(gotCrossUpdate && (crossingFlags & 0x04) == 0)
1282 part.SitTargetAvatar = UUID.Zero; 1282 part.SitTargetAvatar = UUID.Zero;
1283 1283
1284 ParentID = part.LocalId; 1284 ParentID = part.LocalId;
1285 ParentPart = part; 1285 ParentPart = part;
1286 m_pos = PrevSitOffset; 1286 m_pos = PrevSitOffset;
@@ -1380,7 +1380,7 @@ namespace OpenSim.Region.Framework.Scenes
1380 int physcount = PhysNumberCollisions; 1380 int physcount = PhysNumberCollisions;
1381 1381
1382 float dist = physTestHeight - groundHeight + localAVHalfHeight; 1382 float dist = physTestHeight - groundHeight + localAVHalfHeight;
1383 1383
1384 Vector3 direction = new Vector3(0f, 0f, -1f); 1384 Vector3 direction = new Vector3(0f, 0f, -1f);
1385 Vector3 RayStart = pos; 1385 Vector3 RayStart = pos;
1386 RayStart.Z = physTestHeight; 1386 RayStart.Z = physTestHeight;
@@ -1426,7 +1426,7 @@ namespace OpenSim.Region.Framework.Scenes
1426 AbsolutePosition = pos; 1426 AbsolutePosition = pos;
1427 1427
1428// m_log.DebugFormat( 1428// m_log.DebugFormat(
1429// "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent", 1429// "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent",
1430// Name, Scene.Name, AbsolutePosition, pos); 1430// Name, Scene.Name, AbsolutePosition, pos);
1431// 1431//
1432 if (m_teleportFlags == TeleportFlags.Default) 1432 if (m_teleportFlags == TeleportFlags.Default)
@@ -1453,8 +1453,8 @@ namespace OpenSim.Region.Framework.Scenes
1453 Flying = false; 1453 Flying = false;
1454 } 1454 }
1455 } 1455 }
1456 1456
1457 1457
1458 m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 1458 m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts));
1459 m_scene.SwapRootAgentCount(false); 1459 m_scene.SwapRootAgentCount(false);
1460 1460
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes
1519 m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name); 1519 m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name);
1520 1520
1521 UseFakeGroupTitle = true; 1521 UseFakeGroupTitle = true;
1522 1522
1523 1523
1524 Util.FireAndForget(o => 1524 Util.FireAndForget(o =>
1525 { 1525 {
@@ -1587,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes
1587 else 1587 else
1588 Animator.ResetAnimations(); 1588 Animator.ResetAnimations();
1589 1589
1590 1590
1591// m_log.DebugFormat( 1591// m_log.DebugFormat(
1592// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", 1592// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
1593// Name, UUID, m_scene.RegionInfo.RegionName); 1593// Name, UUID, m_scene.RegionInfo.RegionName);
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.Framework.Scenes
1595 // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing, 1595 // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing,
1596 // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated. 1596 // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated.
1597 //Velocity = new Vector3(0, 0, 0); 1597 //Velocity = new Vector3(0, 0, 0);
1598 1598
1599 IsChildAgent = true; 1599 IsChildAgent = true;
1600 m_scene.SwapRootAgentCount(true); 1600 m_scene.SwapRootAgentCount(true);
1601 RemoveFromPhysicalScene(); 1601 RemoveFromPhysicalScene();
@@ -1656,7 +1656,7 @@ namespace OpenSim.Region.Framework.Scenes
1656 bool isFlying = Flying; 1656 bool isFlying = Flying;
1657 Vector3 vel = Velocity; 1657 Vector3 vel = Velocity;
1658 RemoveFromPhysicalScene(); 1658 RemoveFromPhysicalScene();
1659 1659
1660 AbsolutePosition = pos; 1660 AbsolutePosition = pos;
1661 AddToPhysicalScene(isFlying); 1661 AddToPhysicalScene(isFlying);
1662 if (PhysicsActor != null) 1662 if (PhysicsActor != null)
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes
1709 if (IsInTransit) 1709 if (IsInTransit)
1710 return; 1710 return;
1711 1711
1712 Vector3 pos = AbsolutePosition; 1712 Vector3 pos = AbsolutePosition;
1713 if (Appearance.AvatarHeight != 127.0f) 1713 if (Appearance.AvatarHeight != 127.0f)
1714 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f)); 1714 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f));
1715 else 1715 else
@@ -1737,7 +1737,7 @@ namespace OpenSim.Region.Framework.Scenes
1737 /// <param name="amount">Postive or negative roll amount in radians</param> 1737 /// <param name="amount">Postive or negative roll amount in radians</param>
1738 private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown) 1738 private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown)
1739 { 1739 {
1740 1740
1741 float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS); 1741 float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS);
1742 m_AngularVelocity.Z = rollAmount; 1742 m_AngularVelocity.Z = rollAmount;
1743 1743
@@ -1789,7 +1789,7 @@ namespace OpenSim.Region.Framework.Scenes
1789 1789
1790 if (m_AngularVelocity.Z > 0) 1790 if (m_AngularVelocity.Z > 0)
1791 { 1791 {
1792 1792
1793 float leftOverToMin = m_AngularVelocity.Z - rollMinRadians; 1793 float leftOverToMin = m_AngularVelocity.Z - rollMinRadians;
1794 if (amount > leftOverToMin) 1794 if (amount > leftOverToMin)
1795 return -leftOverToMin; 1795 return -leftOverToMin;
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 } 1799 }
1800 else 1800 else
1801 { 1801 {
1802 1802
1803 float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians; 1803 float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians;
1804 if (amount > leftOverToMin) 1804 if (amount > leftOverToMin)
1805 return leftOverToMin; 1805 return leftOverToMin;
@@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Framework.Scenes
1807 return amount; 1807 return amount;
1808 } 1808 }
1809 } 1809 }
1810 1810
1811 1811
1812 1812
1813 // neighbouring regions we have enabled a child agent in 1813 // neighbouring regions we have enabled a child agent in
@@ -1943,15 +1943,15 @@ namespace OpenSim.Region.Framework.Scenes
1943 private bool WaitForUpdateAgent(IClientAPI client) 1943 private bool WaitForUpdateAgent(IClientAPI client)
1944 { 1944 {
1945 // Before the source region executes UpdateAgent 1945 // Before the source region executes UpdateAgent
1946 // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination, 1946 // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination,
1947 // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the 1947 // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the
1948 // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero 1948 // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero
1949// m_updateAgentReceivedAfterTransferEvent.WaitOne(10000); 1949// m_updateAgentReceivedAfterTransferEvent.WaitOne(10000);
1950 int count = 50; 1950 int count = 50;
1951 UUID originID = UUID.Zero; 1951 UUID originID = UUID.Zero;
1952 1952
1953 lock (m_originRegionIDAccessLock) 1953 lock (m_originRegionIDAccessLock)
1954 originID = m_originRegionID; 1954 originID = m_originRegionID;
1955 1955
1956 1956
1957 while (originID.Equals(UUID.Zero) && count-- > 0) 1957 while (originID.Equals(UUID.Zero) && count-- > 0)
@@ -2014,7 +2014,7 @@ namespace OpenSim.Region.Framework.Scenes
2014 m_log.InfoFormat( 2014 m_log.InfoFormat(
2015 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", 2015 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}",
2016 client.Name, Scene.Name, AbsolutePosition); 2016 client.Name, Scene.Name, AbsolutePosition);
2017 2017
2018 m_inTransit = true; 2018 m_inTransit = true;
2019 2019
2020 try 2020 try
@@ -2110,7 +2110,7 @@ namespace OpenSim.Region.Framework.Scenes
2110// client.Name, client.AgentId, m_scene.RegionInfo.RegionName); 2110// client.Name, client.AgentId, m_scene.RegionInfo.RegionName);
2111// } 2111// }
2112 2112
2113 2113
2114 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2114 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2115 2115
2116 2116
@@ -2138,7 +2138,7 @@ namespace OpenSim.Region.Framework.Scenes
2138 m_currentParcelHide = false; 2138 m_currentParcelHide = false;
2139 m_currentParcelUUID = UUID.Zero; 2139 m_currentParcelUUID = UUID.Zero;
2140 2140
2141 // send initial land overlay and parcel 2141 // send initial land overlay and parcel
2142 ILandChannel landch = m_scene.LandChannel; 2142 ILandChannel landch = m_scene.LandChannel;
2143 if (landch != null) 2143 if (landch != null)
2144 landch.sendClientInitialLandInfo(client); 2144 landch.sendClientInitialLandInfo(client);
@@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Framework.Scenes
2193 2193
2194 // send look and animations to others 2194 // send look and animations to others
2195 // if not cached we send greys 2195 // if not cached we send greys
2196 // uncomented if will wait till avatar does baking 2196 // uncomented if will wait till avatar does baking
2197 //if (cachedbaked) 2197 //if (cachedbaked)
2198 { 2198 {
2199 foreach (ScenePresence p in allpresences) 2199 foreach (ScenePresence p in allpresences)
@@ -2292,7 +2292,7 @@ namespace OpenSim.Region.Framework.Scenes
2292 { 2292 {
2293 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 2293 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
2294 if (friendsModule != null) 2294 if (friendsModule != null)
2295 { 2295 {
2296 if(gotCrossUpdate) 2296 if(gotCrossUpdate)
2297 friendsModule.IsNowRoot(this); 2297 friendsModule.IsNowRoot(this);
2298 else 2298 else
@@ -2331,7 +2331,7 @@ namespace OpenSim.Region.Framework.Scenes
2331 /// <param name="collisionPoint"></param> 2331 /// <param name="collisionPoint"></param>
2332 /// <param name="localid"></param> 2332 /// <param name="localid"></param>
2333 /// <param name="distance"></param> 2333 /// <param name="distance"></param>
2334 /// 2334 ///
2335 2335
2336 private void checkCameraCollision() 2336 private void checkCameraCollision()
2337 { 2337 {
@@ -2486,7 +2486,7 @@ namespace OpenSim.Region.Framework.Scenes
2486 2486
2487 // The Agent's Draw distance setting 2487 // The Agent's Draw distance setting
2488 // When we get to the point of re-computing neighbors everytime this 2488 // When we get to the point of re-computing neighbors everytime this
2489 // changes, then start using the agent's drawdistance rather than the 2489 // changes, then start using the agent's drawdistance rather than the
2490 // region's draw distance. 2490 // region's draw distance.
2491 2491
2492 DrawDistance = agentData.Far; 2492 DrawDistance = agentData.Far;
@@ -2495,7 +2495,7 @@ namespace OpenSim.Region.Framework.Scenes
2495 2495
2496 // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button 2496 // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button
2497 // is first pressed, not whilst it is held down. If this is required in the future then need to look 2497 // is first pressed, not whilst it is held down. If this is required in the future then need to look
2498 // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not 2498 // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not
2499 // received (e.g. on holding LMB down on the avatar in a viewer). 2499 // received (e.g. on holding LMB down on the avatar in a viewer).
2500 m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; 2500 m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
2501 2501
@@ -2549,7 +2549,7 @@ namespace OpenSim.Region.Framework.Scenes
2549 2549
2550 if (AllowMovement && !SitGround) 2550 if (AllowMovement && !SitGround)
2551 { 2551 {
2552// m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name); 2552// m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name);
2553 bool update_rotation = false; 2553 bool update_rotation = false;
2554 if (agentData.BodyRotation != Rotation) 2554 if (agentData.BodyRotation != Rotation)
2555 { 2555 {
@@ -2617,7 +2617,7 @@ namespace OpenSim.Region.Framework.Scenes
2617 } 2617 }
2618 2618
2619 if (((MovementFlag & (uint)DCF) == 0)) 2619 if (((MovementFlag & (uint)DCF) == 0))
2620 { 2620 {
2621 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); 2621 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF);
2622 MovementFlag |= (uint)DCF; 2622 MovementFlag |= (uint)DCF;
2623 update_movementflag = true; 2623 update_movementflag = true;
@@ -2715,11 +2715,11 @@ namespace OpenSim.Region.Framework.Scenes
2715 if (m_AngularVelocity.Z != 0) 2715 if (m_AngularVelocity.Z != 0)
2716 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); 2716 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE);
2717 } 2717 }
2718 2718
2719 /* 2719 /*
2720 if (Flying && IsColliding && controlland) 2720 if (Flying && IsColliding && controlland)
2721 { 2721 {
2722 // nesting this check because LengthSquared() is expensive and we don't 2722 // nesting this check because LengthSquared() is expensive and we don't
2723 // want to do it every step when flying. 2723 // want to do it every step when flying.
2724 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) 2724 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX))
2725 StopFlying(); 2725 StopFlying();
@@ -2730,7 +2730,7 @@ namespace OpenSim.Region.Framework.Scenes
2730 else if (IsColliding && agent_control_v3.Z < 0f) 2730 else if (IsColliding && agent_control_v3.Z < 0f)
2731 agent_control_v3.Z = 0; 2731 agent_control_v3.Z = 0;
2732// else if(AgentControlStopActive %% Velocity.Z <0.01f) 2732// else if(AgentControlStopActive %% Velocity.Z <0.01f)
2733 2733
2734 2734
2735// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name); 2735// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name);
2736 2736
@@ -2738,9 +2738,9 @@ namespace OpenSim.Region.Framework.Scenes
2738 // which occurs later in the main scene loop 2738 // which occurs later in the main scene loop
2739 // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they 2739 // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they
2740 // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update 2740 // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update
2741 // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the 2741 // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the
2742 // avatar location in place). 2742 // avatar location in place).
2743 if (update_movementflag 2743 if (update_movementflag
2744 || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0))) 2744 || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0)))
2745 { 2745 {
2746 2746
@@ -2810,9 +2810,9 @@ namespace OpenSim.Region.Framework.Scenes
2810 2810
2811 // The Agent's Draw distance setting 2811 // The Agent's Draw distance setting
2812 // When we get to the point of re-computing neighbors everytime this 2812 // When we get to the point of re-computing neighbors everytime this
2813 // changes, then start using the agent's drawdistance rather than the 2813 // changes, then start using the agent's drawdistance rather than the
2814 // region's draw distance. 2814 // region's draw distance.
2815 2815
2816 DrawDistance = agentData.Far; 2816 DrawDistance = agentData.Far;
2817 2817
2818 2818
@@ -2839,7 +2839,7 @@ namespace OpenSim.Region.Framework.Scenes
2839 2839
2840 TriggerScenePresenceUpdated(); 2840 TriggerScenePresenceUpdated();
2841 } 2841 }
2842 2842
2843 /// <summary> 2843 /// <summary>
2844 /// Calculate an update to move the presence to the set target. 2844 /// Calculate an update to move the presence to the set target.
2845 /// </summary> 2845 /// </summary>
@@ -2853,7 +2853,7 @@ namespace OpenSim.Region.Framework.Scenes
2853// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); 2853// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
2854 2854
2855 bool updated = false; 2855 bool updated = false;
2856 2856
2857 Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition; 2857 Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition;
2858 2858
2859// m_log.DebugFormat( 2859// m_log.DebugFormat(
@@ -3030,11 +3030,11 @@ namespace OpenSim.Region.Framework.Scenes
3030 || pos.Y < 0 || pos.Y >= regionSize.Y 3030 || pos.Y < 0 || pos.Y >= regionSize.Y
3031 || pos.Z < 0) 3031 || pos.Z < 0)
3032 return; 3032 return;
3033 3033
3034 float terrainHeight; 3034 float terrainHeight;
3035 Scene targetScene = m_scene; 3035 Scene targetScene = m_scene;
3036 terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y); 3036 terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y);
3037 3037
3038 // dont try to land underground 3038 // dont try to land underground
3039 terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f; 3039 terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f;
3040 3040
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes
3044// m_log.DebugFormat( 3044// m_log.DebugFormat(
3045// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", 3045// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
3046// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); 3046// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
3047 3047
3048 if (noFly) 3048 if (noFly)
3049 Flying = false; 3049 Flying = false;
3050 else if (pos.Z > terrainHeight || Flying) 3050 else if (pos.Z > terrainHeight || Flying)
@@ -3068,7 +3068,7 @@ namespace OpenSim.Region.Framework.Scenes
3068 3068
3069 Rotation = Quaternion.CreateFromEulers(angle); 3069 Rotation = Quaternion.CreateFromEulers(angle);
3070// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); 3070// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
3071 3071
3072 Vector3 control = Vector3.Zero; 3072 Vector3 control = Vector3.Zero;
3073 if(HandleMoveToTargetUpdate(1f, ref control)) 3073 if(HandleMoveToTargetUpdate(1f, ref control))
3074 AddNewMovement(control); 3074 AddNewMovement(control);
@@ -3162,7 +3162,7 @@ namespace OpenSim.Region.Framework.Scenes
3162 m_pos = standPos; 3162 m_pos = standPos;
3163 } 3163 }
3164 3164
3165 // We need to wait until we have calculated proper stand positions before sitting up the physical 3165 // We need to wait until we have calculated proper stand positions before sitting up the physical
3166 // avatar to avoid race conditions. 3166 // avatar to avoid race conditions.
3167 if (PhysicsActor == null) 3167 if (PhysicsActor == null)
3168 AddToPhysicalScene(false); 3168 AddToPhysicalScene(false);
@@ -3178,7 +3178,7 @@ namespace OpenSim.Region.Framework.Scenes
3178 3178
3179 // reset to default sitAnimation 3179 // reset to default sitAnimation
3180 sitAnimation = "SIT"; 3180 sitAnimation = "SIT";
3181 3181
3182// Animator.TrySetMovementAnimation("STAND"); 3182// Animator.TrySetMovementAnimation("STAND");
3183 Animator.SetMovementAnimations("STAND"); 3183 Animator.SetMovementAnimations("STAND");
3184 3184
@@ -3244,7 +3244,7 @@ namespace OpenSim.Region.Framework.Scenes
3244 } 3244 }
3245 else 3245 else
3246 { 3246 {
3247 if (PhysicsSit(part,offset)) // physics engine 3247 if (PhysicsSit(part,offset)) // physics engine
3248 return; 3248 return;
3249 3249
3250 Vector3 pos = part.AbsolutePosition + offset; 3250 Vector3 pos = part.AbsolutePosition + offset;
@@ -3275,7 +3275,7 @@ namespace OpenSim.Region.Framework.Scenes
3275 3275
3276 cameraAtOffset = part.GetCameraAtOffset(); 3276 cameraAtOffset = part.GetCameraAtOffset();
3277 cameraEyeOffset = part.GetCameraEyeOffset(); 3277 cameraEyeOffset = part.GetCameraEyeOffset();
3278 3278
3279 forceMouselook = part.GetForceMouselook(); 3279 forceMouselook = part.GetForceMouselook();
3280 3280
3281 if (!part.IsRoot) 3281 if (!part.IsRoot)
@@ -3398,7 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes
3398 if (part == null) 3398 if (part == null)
3399 return; 3399 return;
3400 3400
3401 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation(); 3401 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation();
3402 if(!CanEnterLandPosition(targetPos)) 3402 if(!CanEnterLandPosition(targetPos))
3403 { 3403 {
3404 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot"); 3404 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot");
@@ -3530,7 +3530,7 @@ namespace OpenSim.Region.Framework.Scenes
3530 else 3530 else
3531 { 3531 {
3532 m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W; 3532 m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W;
3533 3533
3534 if (Math.Abs(1.0 - m) > 0.000001) 3534 if (Math.Abs(1.0 - m) > 0.000001)
3535 { 3535 {
3536 if(m != 0) 3536 if(m != 0)
@@ -3554,7 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes
3554 x = 2 * (r.X * r.Z + r.Y * r.W); 3554 x = 2 * (r.X * r.Z + r.Y * r.W);
3555 y = 2 * (-r.X * r.W + r.Y * r.Z); 3555 y = 2 * (-r.X * r.W + r.Y * r.Z);
3556 z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; 3556 z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W;
3557 Vector3 up = new Vector3((float)x, (float)y, (float)z); 3557 Vector3 up = new Vector3((float)x, (float)y, (float)z);
3558 sitOffset = up * Appearance.AvatarHeight * 0.02638f; 3558 sitOffset = up * Appearance.AvatarHeight * 0.02638f;
3559 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; 3559 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT;
3560 } 3560 }
@@ -3670,7 +3670,7 @@ namespace OpenSim.Region.Framework.Scenes
3670 public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false) 3670 public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false)
3671 { 3671 {
3672 // m_log.DebugFormat( 3672 // m_log.DebugFormat(
3673 // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}", 3673 // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}",
3674 // vec, Rotation, thisAddSpeedModifier, Name); 3674 // vec, Rotation, thisAddSpeedModifier, Name);
3675 3675
3676 // rotate from avatar coord space to world 3676 // rotate from avatar coord space to world
@@ -3792,11 +3792,11 @@ namespace OpenSim.Region.Framework.Scenes
3792 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || 3792 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE ||
3793 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || 3793 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE ||
3794 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || 3794 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE ||
3795 3795
3796 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE || 3796 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE ||
3797 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE || 3797 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE ||
3798 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE) 3798 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE)
3799 && vel.LengthSquared() < LOWVELOCITYSQ 3799 && vel.LengthSquared() < LOWVELOCITYSQ
3800 )) 3800 ))
3801 { 3801 {
3802*/ 3802*/
@@ -3833,7 +3833,7 @@ namespace OpenSim.Region.Framework.Scenes
3833 } 3833 }
3834 3834
3835 // this is diferente from SendTerseUpdateToClient 3835 // this is diferente from SendTerseUpdateToClient
3836 // this sends bypassing entities updates 3836 // this sends bypassing entities updates
3837 public void SendAgentTerseUpdate(ISceneEntity p) 3837 public void SendAgentTerseUpdate(ISceneEntity p)
3838 { 3838 {
3839 ControllingClient.SendAgentTerseUpdate(p); 3839 ControllingClient.SendAgentTerseUpdate(p);
@@ -3982,7 +3982,7 @@ namespace OpenSim.Region.Framework.Scenes
3982 3982
3983 p.SendAppearanceToAgentNF(this); 3983 p.SendAppearanceToAgentNF(this);
3984 p.SendAnimPackToAgentNF(this); 3984 p.SendAnimPackToAgentNF(this);
3985 p.SendAttachmentsToAgentNF(this); 3985 p.SendAttachmentsToAgentNF(this);
3986 count++; 3986 count++;
3987 }); 3987 });
3988 3988
@@ -3991,7 +3991,7 @@ namespace OpenSim.Region.Framework.Scenes
3991 3991
3992 /// <summary> 3992 /// <summary>
3993 /// Send this agent's avatar data to all other root and child agents in the scene 3993 /// Send this agent's avatar data to all other root and child agents in the scene
3994 /// This agent must be root. This avatar will receive its own update. 3994 /// This agent must be root. This avatar will receive its own update.
3995 /// </summary> 3995 /// </summary>
3996 public void SendAvatarDataToAllAgents() 3996 public void SendAvatarDataToAllAgents()
3997 { 3997 {
@@ -4222,7 +4222,7 @@ namespace OpenSim.Region.Framework.Scenes
4222 posLastMove = pos; 4222 posLastMove = pos;
4223 m_scene.EventManager.TriggerOnClientMovement(this); 4223 m_scene.EventManager.TriggerOnClientMovement(this);
4224 } 4224 }
4225 4225
4226 diff = pos - posLastSignificantMove; 4226 diff = pos - posLastSignificantMove;
4227 if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT) 4227 if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT)
4228 { 4228 {
@@ -4235,18 +4235,18 @@ namespace OpenSim.Region.Framework.Scenes
4235 4235
4236 if(childUpdatesBusy) 4236 if(childUpdatesBusy)
4237 return; 4237 return;
4238 4238
4239 //possible KnownRegionHandles always contains current region and this check is not needed 4239 //possible KnownRegionHandles always contains current region and this check is not needed
4240 int minhandles = 0; 4240 int minhandles = 0;
4241 if(KnownRegionHandles.Contains(RegionHandle)) 4241 if(KnownRegionHandles.Contains(RegionHandle))
4242 minhandles++; 4242 minhandles++;
4243 4243
4244 if(KnownRegionHandles.Count > minhandles) 4244 if(KnownRegionHandles.Count > minhandles)
4245 { 4245 {
4246 int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime); 4246 int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime);
4247 if(tdiff > CHILDUPDATES_TIME) 4247 if(tdiff > CHILDUPDATES_TIME)
4248 { 4248 {
4249 diff = pos - m_lastChildAgentUpdatePosition; 4249 diff = pos - m_lastChildAgentUpdatePosition;
4250 if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT) 4250 if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT)
4251 { 4251 {
4252 childUpdatesBusy = true; 4252 childUpdatesBusy = true;
@@ -4268,7 +4268,7 @@ namespace OpenSim.Region.Framework.Scenes
4268 Util.FireAndForget( 4268 Util.FireAndForget(
4269 o => 4269 o =>
4270 { 4270 {
4271 m_scene.SendOutChildAgentUpdates(agentpos, this); 4271 m_scene.SendOutChildAgentUpdates(agentpos, this);
4272 lastChildUpdatesTime = Util.EnvironmentTickCount(); 4272 lastChildUpdatesTime = Util.EnvironmentTickCount();
4273 childUpdatesBusy = false; 4273 childUpdatesBusy = false;
4274 }, null, "ScenePresence.SendOutChildAgentUpdates"); 4274 }, null, "ScenePresence.SendOutChildAgentUpdates");
@@ -4309,7 +4309,7 @@ namespace OpenSim.Region.Framework.Scenes
4309 pos2.Z += vel.Z * timeStep; 4309 pos2.Z += vel.Z * timeStep;
4310 4310
4311// m_log.DebugFormat( 4311// m_log.DebugFormat(
4312// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", 4312// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
4313// pos2, Name, Scene.Name); 4313// pos2, Name, Scene.Name);
4314 4314
4315 if (Scene.PositionIsInCurrentRegion(pos2)) 4315 if (Scene.PositionIsInCurrentRegion(pos2))
@@ -4399,7 +4399,7 @@ namespace OpenSim.Region.Framework.Scenes
4399 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); 4399 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);
4400 4400
4401 // Put the child agent back at the center 4401 // Put the child agent back at the center
4402 AbsolutePosition 4402 AbsolutePosition
4403 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70); 4403 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70);
4404 4404
4405 Animator.ResetAnimations(); 4405 Animator.ResetAnimations();
@@ -4511,7 +4511,7 @@ namespace OpenSim.Region.Framework.Scenes
4511 public void GrantGodlikePowers(UUID token, bool godStatus) 4511 public void GrantGodlikePowers(UUID token, bool godStatus)
4512 { 4512 {
4513 int oldgodlevel = GodLevel; 4513 int oldgodlevel = GodLevel;
4514 4514
4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) 4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID))
4516 { 4516 {
4517 GodLevel = 200; 4517 GodLevel = 200;
@@ -4519,7 +4519,7 @@ namespace OpenSim.Region.Framework.Scenes
4519 GodLevel = UserLevel; 4519 GodLevel = UserLevel;
4520 } 4520 }
4521 else 4521 else
4522 GodLevel = 0; 4522 GodLevel = 0;
4523 4523
4524 ControllingClient.SendAdminResponse(token, (uint)GodLevel); 4524 ControllingClient.SendAdminResponse(token, (uint)GodLevel);
4525 if(oldgodlevel != GodLevel) 4525 if(oldgodlevel != GodLevel)
@@ -4535,7 +4535,7 @@ namespace OpenSim.Region.Framework.Scenes
4535 return; 4535 return;
4536 4536
4537 CopyFrom(cAgentData); 4537 CopyFrom(cAgentData);
4538 4538
4539 } 4539 }
4540 4540
4541 private static Vector3 marker = new Vector3(-1f, -1f, -1f); 4541 private static Vector3 marker = new Vector3(-1f, -1f, -1f);
@@ -4621,7 +4621,7 @@ namespace OpenSim.Region.Framework.Scenes
4621 4621
4622 cAgent.Far = DrawDistance; 4622 cAgent.Far = DrawDistance;
4623 4623
4624 // Throttles 4624 // Throttles
4625 cAgent.Throttles = ControllingClient.GetThrottlesPacked(1); 4625 cAgent.Throttles = ControllingClient.GetThrottlesPacked(1);
4626 4626
4627 cAgent.HeadRotation = m_headrotation; 4627 cAgent.HeadRotation = m_headrotation;
@@ -4630,7 +4630,7 @@ namespace OpenSim.Region.Framework.Scenes
4630 4630
4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4632 cAgent.GodLevel = (byte)GodLevel; 4632 cAgent.GodLevel = (byte)GodLevel;
4633 else 4633 else
4634 cAgent.GodLevel = (byte) 0; 4634 cAgent.GodLevel = (byte) 0;
4635 4635
4636 cAgent.AlwaysRun = SetAlwaysRun; 4636 cAgent.AlwaysRun = SetAlwaysRun;
@@ -4640,7 +4640,7 @@ namespace OpenSim.Region.Framework.Scenes
4640 4640
4641 cAgent.ParentPart = ParentUUID; 4641 cAgent.ParentPart = ParentUUID;
4642 cAgent.SitOffset = PrevSitOffset; 4642 cAgent.SitOffset = PrevSitOffset;
4643 4643
4644 lock (scriptedcontrols) 4644 lock (scriptedcontrols)
4645 { 4645 {
4646 ControllerData[] controls = new ControllerData[scriptedcontrols.Count]; 4646 ControllerData[] controls = new ControllerData[scriptedcontrols.Count];
@@ -4675,7 +4675,7 @@ namespace OpenSim.Region.Framework.Scenes
4675 cAgent.CrossingFlags |= 1; 4675 cAgent.CrossingFlags |= 1;
4676 } 4676 }
4677 else 4677 else
4678 cAgent.CrossingFlags = 0; 4678 cAgent.CrossingFlags = 0;
4679 4679
4680 if(isCrossUpdate) 4680 if(isCrossUpdate)
4681 { 4681 {
@@ -4708,7 +4708,7 @@ namespace OpenSim.Region.Framework.Scenes
4708 PrevSitOffset = cAgent.SitOffset; 4708 PrevSitOffset = cAgent.SitOffset;
4709 4709
4710 // When we get to the point of re-computing neighbors everytime this 4710 // When we get to the point of re-computing neighbors everytime this
4711 // changes, then start using the agent's drawdistance rather than the 4711 // changes, then start using the agent's drawdistance rather than the
4712 // region's draw distance. 4712 // region's draw distance.
4713 DrawDistance = cAgent.Far; 4713 DrawDistance = cAgent.Far;
4714 //DrawDistance = Scene.DefaultDrawDistance; 4714 //DrawDistance = Scene.DefaultDrawDistance;
@@ -4727,7 +4727,7 @@ namespace OpenSim.Region.Framework.Scenes
4727 4727
4728 m_headrotation = cAgent.HeadRotation; 4728 m_headrotation = cAgent.HeadRotation;
4729 Rotation = cAgent.BodyRotation; 4729 Rotation = cAgent.BodyRotation;
4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; 4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
4731 4731
4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4733 GodLevel = cAgent.GodLevel; 4733 GodLevel = cAgent.GodLevel;
@@ -4738,14 +4738,14 @@ namespace OpenSim.Region.Framework.Scenes
4738 4738
4739 Appearance = new AvatarAppearance(cAgent.Appearance); 4739 Appearance = new AvatarAppearance(cAgent.Appearance);
4740/* 4740/*
4741 bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); 4741 bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
4742 4742
4743 if (PhysicsActor != null) 4743 if (PhysicsActor != null)
4744 { 4744 {
4745 RemoveFromPhysicalScene(); 4745 RemoveFromPhysicalScene();
4746 AddToPhysicalScene(isFlying); 4746 AddToPhysicalScene(isFlying);
4747 } 4747 }
4748*/ 4748*/
4749 try 4749 try
4750 { 4750 {
4751 lock (scriptedcontrols) 4751 lock (scriptedcontrols)
@@ -4800,7 +4800,7 @@ namespace OpenSim.Region.Framework.Scenes
4800 ControllingClient.ActiveGroupId = cAgent.ActiveGroupID; 4800 ControllingClient.ActiveGroupId = cAgent.ActiveGroupID;
4801 ControllingClient.ActiveGroupName = cAgent.ActiveGroupName; 4801 ControllingClient.ActiveGroupName = cAgent.ActiveGroupName;
4802 Grouptitle = cAgent.ActiveGroupTitle; 4802 Grouptitle = cAgent.ActiveGroupTitle;
4803 ControllingClient.ActiveGroupPowers = 4803 ControllingClient.ActiveGroupPowers =
4804 ControllingClient.GetGroupPowers(cAgent.ActiveGroupID); 4804 ControllingClient.GetGroupPowers(cAgent.ActiveGroupID);
4805 } 4805 }
4806 else 4806 else
@@ -4871,7 +4871,7 @@ namespace OpenSim.Region.Framework.Scenes
4871// m_forceToApplyValid = false; 4871// m_forceToApplyValid = false;
4872 4872
4873 PhysicsScene scene = m_scene.PhysicsScene; 4873 PhysicsScene scene = m_scene.PhysicsScene;
4874 Vector3 pVec = AbsolutePosition; 4874 Vector3 pVec = AbsolutePosition;
4875 4875
4876 PhysicsActor = scene.AddAvatar( 4876 PhysicsActor = scene.AddAvatar(
4877 LocalId, Firstname + "." + Lastname, pVec, 4877 LocalId, Firstname + "." + Lastname, pVec,
@@ -5007,7 +5007,7 @@ namespace OpenSim.Region.Framework.Scenes
5007 } 5007 }
5008 else 5008 else
5009 { 5009 {
5010 5010
5011 } 5011 }
5012 } 5012 }
5013 5013
@@ -5040,13 +5040,13 @@ namespace OpenSim.Region.Framework.Scenes
5040 { 5040 {
5041 // Clear known regions 5041 // Clear known regions
5042 KnownRegions = new Dictionary<ulong, string>(); 5042 KnownRegions = new Dictionary<ulong, string>();
5043 5043
5044 // I don't get it but mono crashes when you try to dispose of this timer, 5044 // I don't get it but mono crashes when you try to dispose of this timer,
5045 // unsetting the elapsed callback should be enough to allow for cleanup however. 5045 // unsetting the elapsed callback should be enough to allow for cleanup however.
5046 // m_reprioritizationTimer.Dispose(); 5046 // m_reprioritizationTimer.Dispose();
5047 5047
5048 RemoveFromPhysicalScene(); 5048 RemoveFromPhysicalScene();
5049 5049
5050 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; 5050 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd;
5051 RemoveClientEvents(); 5051 RemoveClientEvents();
5052 5052
@@ -5106,7 +5106,7 @@ namespace OpenSim.Region.Framework.Scenes
5106 } 5106 }
5107 } 5107 }
5108 } 5108 }
5109 5109
5110 return attachments; 5110 return attachments;
5111 } 5111 }
5112 5112
@@ -5269,7 +5269,7 @@ namespace OpenSim.Region.Framework.Scenes
5269 foreach (SceneObjectGroup sog in m_attachments) 5269 foreach (SceneObjectGroup sog in m_attachments)
5270 { 5270 {
5271 SendAttachmentFullUpdateToAgentNF(sog, p); 5271 SendAttachmentFullUpdateToAgentNF(sog, p);
5272 } 5272 }
5273 } 5273 }
5274 } 5274 }
5275 5275
@@ -5689,14 +5689,14 @@ namespace OpenSim.Region.Framework.Scenes
5689 return; 5689 return;
5690 if(objectID == m_scene.RegionInfo.RegionID) // for all objects 5690 if(objectID == m_scene.RegionInfo.RegionID) // for all objects
5691 { 5691 {
5692 5692
5693 } 5693 }
5694 else 5694 else
5695 { 5695 {
5696 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); 5696 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
5697 if(part != null) 5697 if(part != null)
5698 { 5698 {
5699 5699
5700 } 5700 }
5701 } 5701 }
5702 } 5702 }
@@ -5759,7 +5759,7 @@ namespace OpenSim.Region.Framework.Scenes
5759 return; 5759 return;
5760 5760
5761 ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; 5761 ScriptControlled allflags = ScriptControlled.CONTROL_ZERO;
5762 5762
5763 if (MouseDown) 5763 if (MouseDown)
5764 { 5764 {
5765 allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); 5765 allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON);
@@ -5769,35 +5769,35 @@ namespace OpenSim.Region.Framework.Scenes
5769 MouseDown = true; 5769 MouseDown = true;
5770 } 5770 }
5771 } 5771 }
5772 5772
5773 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) 5773 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0)
5774 { 5774 {
5775 allflags |= ScriptControlled.CONTROL_ML_LBUTTON; 5775 allflags |= ScriptControlled.CONTROL_ML_LBUTTON;
5776 MouseDown = true; 5776 MouseDown = true;
5777 } 5777 }
5778 5778
5779 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) 5779 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0)
5780 { 5780 {
5781 allflags |= ScriptControlled.CONTROL_LBUTTON; 5781 allflags |= ScriptControlled.CONTROL_LBUTTON;
5782 MouseDown = true; 5782 MouseDown = true;
5783 } 5783 }
5784 5784
5785 // find all activated controls, whether the scripts are interested in them or not 5785 // find all activated controls, whether the scripts are interested in them or not
5786 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) 5786 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0)
5787 { 5787 {
5788 allflags |= ScriptControlled.CONTROL_FWD; 5788 allflags |= ScriptControlled.CONTROL_FWD;
5789 } 5789 }
5790 5790
5791 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0) 5791 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0)
5792 { 5792 {
5793 allflags |= ScriptControlled.CONTROL_BACK; 5793 allflags |= ScriptControlled.CONTROL_BACK;
5794 } 5794 }
5795 5795
5796 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0) 5796 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0)
5797 { 5797 {
5798 allflags |= ScriptControlled.CONTROL_UP; 5798 allflags |= ScriptControlled.CONTROL_UP;
5799 } 5799 }
5800 5800
5801 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0) 5801 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)
5802 { 5802 {
5803 allflags |= ScriptControlled.CONTROL_DOWN; 5803 allflags |= ScriptControlled.CONTROL_DOWN;
@@ -5807,17 +5807,17 @@ namespace OpenSim.Region.Framework.Scenes
5807 { 5807 {
5808 allflags |= ScriptControlled.CONTROL_LEFT; 5808 allflags |= ScriptControlled.CONTROL_LEFT;
5809 } 5809 }
5810 5810
5811 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0) 5811 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0)
5812 { 5812 {
5813 allflags |= ScriptControlled.CONTROL_RIGHT; 5813 allflags |= ScriptControlled.CONTROL_RIGHT;
5814 } 5814 }
5815 5815
5816 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) 5816 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)
5817 { 5817 {
5818 allflags |= ScriptControlled.CONTROL_ROT_RIGHT; 5818 allflags |= ScriptControlled.CONTROL_ROT_RIGHT;
5819 } 5819 }
5820 5820
5821 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0) 5821 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0)
5822 { 5822 {
5823 allflags |= ScriptControlled.CONTROL_ROT_LEFT; 5823 allflags |= ScriptControlled.CONTROL_ROT_LEFT;
@@ -5830,7 +5830,7 @@ namespace OpenSim.Region.Framework.Scenes
5830 { 5830 {
5831 UUID scriptUUID = kvp.Key; 5831 UUID scriptUUID = kvp.Key;
5832 ScriptControllers scriptControlData = kvp.Value; 5832 ScriptControllers scriptControlData = kvp.Value;
5833 5833
5834 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us 5834 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us
5835 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle 5835 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle
5836 ScriptControlled localChange = localHeld ^ localLast; // the changed bits 5836 ScriptControlled localChange = localHeld ^ localLast; // the changed bits
@@ -5842,7 +5842,7 @@ namespace OpenSim.Region.Framework.Scenes
5842 } 5842 }
5843 } 5843 }
5844 } 5844 }
5845 5845
5846 LastCommands = allflags; 5846 LastCommands = allflags;
5847 } 5847 }
5848 } 5848 }
@@ -5885,7 +5885,7 @@ namespace OpenSim.Region.Framework.Scenes
5885 } 5885 }
5886 5886
5887 // returns true it local teleport allowed and sets the destiny position into pos 5887 // returns true it local teleport allowed and sets the destiny position into pos
5888 5888
5889 private bool CheckLocalTPLandingPoint(ref Vector3 pos) 5889 private bool CheckLocalTPLandingPoint(ref Vector3 pos)
5890 { 5890 {
5891 // Never constrain lures 5891 // Never constrain lures
@@ -5930,7 +5930,7 @@ namespace OpenSim.Region.Framework.Scenes
5930 spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot); 5930 spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot);
5931 spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos); 5931 spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos);
5932 5932
5933 float testDistSQ; 5933 float testDistSQ;
5934 Vector3 testSpawnPos; 5934 Vector3 testSpawnPos;
5935 for(int i = 1; i< spawnPoints.Length; i++) 5935 for(int i = 1; i< spawnPoints.Length; i++)
5936 { 5936 {
@@ -5960,7 +5960,7 @@ namespace OpenSim.Region.Framework.Scenes
5960 5960
5961 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 5961 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
5962 5962
5963 if (land.LandData.LandingType != (byte)LandingType.LandingPoint 5963 if (land.LandData.LandingType != (byte)LandingType.LandingPoint
5964 || land.LandData.OwnerID == m_uuid) 5964 || land.LandData.OwnerID == m_uuid)
5965 return true; 5965 return true;
5966 5966
@@ -5978,7 +5978,7 @@ namespace OpenSim.Region.Framework.Scenes
5978 return true; 5978 return true;
5979 } 5979 }
5980 5980
5981 const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin 5981 const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin
5982 | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation; 5982 | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation;
5983 5983
5984 private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged) 5984 private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged)
@@ -6011,7 +6011,7 @@ namespace OpenSim.Region.Framework.Scenes
6011 bool selected = false; 6011 bool selected = false;
6012 bool validhub = false; 6012 bool validhub = false;
6013 Vector3 spawnPosition; 6013 Vector3 spawnPosition;
6014 6014
6015 Quaternion teleHubRotation = telehub.GroupRotation; 6015 Quaternion teleHubRotation = telehub.GroupRotation;
6016 6016
6017 switch(m_scene.SpawnPointRouting) 6017 switch(m_scene.SpawnPointRouting)
@@ -6033,14 +6033,14 @@ namespace OpenSim.Region.Framework.Scenes
6033 6033
6034 if(tries <= 0) 6034 if(tries <= 0)
6035 goto case "sequence"; 6035 goto case "sequence";
6036 6036
6037 pos = spawnPosition; 6037 pos = spawnPosition;
6038 return true; 6038 return true;
6039 6039
6040 case "sequence": 6040 case "sequence":
6041 tries = spawnPoints.Length; 6041 tries = spawnPoints.Length;
6042 selected = false; 6042 selected = false;
6043 validhub = false; 6043 validhub = false;
6044 do 6044 do
6045 { 6045 {
6046 index = m_scene.SpawnPoint(); 6046 index = m_scene.SpawnPoint();
@@ -6092,7 +6092,7 @@ namespace OpenSim.Region.Framework.Scenes
6092 closest = i; 6092 closest = i;
6093 } 6093 }
6094 6094
6095 if(!validhub) 6095 if(!validhub)
6096 return false; 6096 return false;
6097 6097
6098 if(closest < 0) 6098 if(closest < 0)
@@ -6437,28 +6437,28 @@ namespace OpenSim.Region.Framework.Scenes
6437 } 6437 }
6438 6438
6439 private void TeleportFlagsDebug() { 6439 private void TeleportFlagsDebug() {
6440 6440
6441 // Some temporary debugging help to show all the TeleportFlags we have... 6441 // Some temporary debugging help to show all the TeleportFlags we have...
6442 bool HG = false; 6442 bool HG = false;
6443 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin) 6443 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin)
6444 HG = true; 6444 HG = true;
6445 6445
6446 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); 6446 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
6447 6447
6448 uint i = 0u; 6448 uint i = 0u;
6449 for (int x = 0; x <= 30 ; x++, i = 1u << x) 6449 for (int x = 0; x <= 30 ; x++, i = 1u << x)
6450 { 6450 {
6451 i = 1u << x; 6451 i = 1u << x;
6452 6452
6453 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) 6453 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
6454 if (HG == false) 6454 if (HG == false)
6455 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); 6455 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
6456 else 6456 else
6457 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); 6457 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
6458 } 6458 }
6459 6459
6460 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); 6460 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
6461 6461
6462 } 6462 }
6463 6463
6464 private void parcelGodCheck(UUID currentParcelID, bool isGod) 6464 private void parcelGodCheck(UUID currentParcelID, bool isGod)
@@ -6509,7 +6509,7 @@ namespace OpenSim.Region.Framework.Scenes
6509 6509
6510 // those on not on parcel see me 6510 // those on not on parcel see me
6511 if (currentParcelID != p.currentParcelUUID) 6511 if (currentParcelID != p.currentParcelUUID)
6512 { 6512 {
6513 viewsToSendto.Add(p); // they see me 6513 viewsToSendto.Add(p); // they see me
6514 } 6514 }
6515 } 6515 }
@@ -6584,7 +6584,7 @@ namespace OpenSim.Region.Framework.Scenes
6584 } 6584 }
6585 } 6585 }
6586 allpresences.Clear(); 6586 allpresences.Clear();
6587 } // now on a private parcel end 6587 } // now on a private parcel end
6588 6588
6589 else 6589 else
6590 { 6590 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs b/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs
index cae7fe5..e7b09ea 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Scenes
40 /// Running => PreRemove, Removing 40 /// Running => PreRemove, Removing
41 /// PreRemove => Running, Removing 41 /// PreRemove => Running, Removing
42 /// Removing => Removed 42 /// Removing => Removed
43 /// 43 ///
44 /// All other methods should only see the scene presence in running state - this is the normal operational state 44 /// All other methods should only see the scene presence in running state - this is the normal operational state
45 /// Removed state occurs when the presence has been removed. This is the end state with no exit. 45 /// Removed state occurs when the presence has been removed. This is the end state with no exit.
46 /// </remarks> 46 /// </remarks>
@@ -89,13 +89,13 @@ namespace OpenSim.Region.Framework.Scenes
89 else if (newState == ScenePresenceState.PreRemove && m_state == ScenePresenceState.Running) 89 else if (newState == ScenePresenceState.PreRemove && m_state == ScenePresenceState.Running)
90 transitionOkay = true; 90 transitionOkay = true;
91 else if (newState == ScenePresenceState.Removing) 91 else if (newState == ScenePresenceState.Removing)
92 { 92 {
93 if (m_state == ScenePresenceState.Running || m_state == ScenePresenceState.PreRemove) 93 if (m_state == ScenePresenceState.Running || m_state == ScenePresenceState.PreRemove)
94 transitionOkay = true; 94 transitionOkay = true;
95 } 95 }
96 else if (newState == ScenePresenceState.Removed && m_state == ScenePresenceState.Removing) 96 else if (newState == ScenePresenceState.Removed && m_state == ScenePresenceState.Removing)
97 transitionOkay = true; 97 transitionOkay = true;
98 } 98 }
99 99
100 if (!transitionOkay) 100 if (!transitionOkay)
101 { 101 {
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
index 998789d..7f7977e 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
@@ -68,54 +68,54 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
68 /// </param> 68 /// </param>
69 /// <returns></returns> 69 /// <returns></returns>
70 public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates) 70 public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates)
71 { 71 {
72 using (StringWriter sw = new StringWriter()) 72 using (StringWriter sw = new StringWriter())
73 { 73 {
74 using (XmlTextWriter writer = new XmlTextWriter(sw)) 74 using (XmlTextWriter writer = new XmlTextWriter(sw))
75 { 75 {
76 Vector3 size; 76 Vector3 size;
77 77
78 List<SceneObjectGroup> coaObjects = coa.Objects; 78 List<SceneObjectGroup> coaObjects = coa.Objects;
79 79
80// m_log.DebugFormat( 80// m_log.DebugFormat(
81// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing {0} objects for coalesced object", 81// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing {0} objects for coalesced object",
82// coaObjects.Count); 82// coaObjects.Count);
83 83
84 // This is weak - we're relying on the set of coalesced objects still being identical 84 // This is weak - we're relying on the set of coalesced objects still being identical
85 Vector3[] offsets = coa.GetSizeAndOffsets(out size); 85 Vector3[] offsets = coa.GetSizeAndOffsets(out size);
86 86
87 writer.WriteStartElement("CoalescedObject"); 87 writer.WriteStartElement("CoalescedObject");
88 88
89 writer.WriteAttributeString("x", size.X.ToString()); 89 writer.WriteAttributeString("x", size.X.ToString());
90 writer.WriteAttributeString("y", size.Y.ToString()); 90 writer.WriteAttributeString("y", size.Y.ToString());
91 writer.WriteAttributeString("z", size.Z.ToString()); 91 writer.WriteAttributeString("z", size.Z.ToString());
92 92
93 // Embed the offsets into the group XML 93 // Embed the offsets into the group XML
94 for (int i = 0; i < coaObjects.Count; i++) 94 for (int i = 0; i < coaObjects.Count; i++)
95 { 95 {
96 SceneObjectGroup obj = coaObjects[i]; 96 SceneObjectGroup obj = coaObjects[i];
97 97
98// m_log.DebugFormat( 98// m_log.DebugFormat(
99// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing offset for object {0}, {1}", 99// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing offset for object {0}, {1}",
100// i, obj.Name); 100// i, obj.Name);
101 101
102 writer.WriteStartElement("SceneObjectGroup"); 102 writer.WriteStartElement("SceneObjectGroup");
103 writer.WriteAttributeString("offsetx", offsets[i].X.ToString()); 103 writer.WriteAttributeString("offsetx", offsets[i].X.ToString());
104 writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); 104 writer.WriteAttributeString("offsety", offsets[i].Y.ToString());
105 writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); 105 writer.WriteAttributeString("offsetz", offsets[i].Z.ToString());
106 106
107 SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); 107 SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates);
108 108
109 writer.WriteEndElement(); // SceneObjectGroup 109 writer.WriteEndElement(); // SceneObjectGroup
110 } 110 }
111 111
112 writer.WriteEndElement(); // CoalescedObject 112 writer.WriteEndElement(); // CoalescedObject
113 } 113 }
114 114
115 string output = sw.ToString(); 115 string output = sw.ToString();
116 116
117// Console.WriteLine(output); 117// Console.WriteLine(output);
118 118
119 return output; 119 return output;
120 } 120 }
121 } 121 }
@@ -123,14 +123,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
123 public static bool TryFromXml(string xml, out CoalescedSceneObjects coa) 123 public static bool TryFromXml(string xml, out CoalescedSceneObjects coa)
124 { 124 {
125// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml); 125// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml);
126 126
127 coa = null; 127 coa = null;
128 128
129 try 129 try
130 { 130 {
131 // Quickly check if this is a coalesced object, without fully parsing the XML 131 // Quickly check if this is a coalesced object, without fully parsing the XML
132 using (StringReader sr = new StringReader(xml)) 132 using (StringReader sr = new StringReader(xml))
133 { 133 {
134 using (XmlTextReader reader = new XmlTextReader(sr)) 134 using (XmlTextReader reader = new XmlTextReader(sr))
135 { 135 {
136 reader.MoveToContent(); // skip possible xml declaration 136 reader.MoveToContent(); // skip possible xml declaration
@@ -138,9 +138,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
138 if (reader.Name != "CoalescedObject") 138 if (reader.Name != "CoalescedObject")
139 { 139 {
140 // m_log.DebugFormat( 140 // m_log.DebugFormat(
141 // "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false", 141 // "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false",
142 // reader.Name); 142 // reader.Name);
143 143
144 return false; 144 return false;
145 } 145 }
146 } 146 }
@@ -151,12 +151,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
151 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); 151 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
152 if (e == null) 152 if (e == null)
153 return false; 153 return false;
154 154
155 coa = new CoalescedSceneObjects(UUID.Zero); 155 coa = new CoalescedSceneObjects(UUID.Zero);
156 156
157 XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); 157 XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
158 int i = 0; 158 int i = 0;
159 159
160 foreach (XmlNode n in groups) 160 foreach (XmlNode n in groups)
161 { 161 {
162 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); 162 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
@@ -166,10 +166,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
166 } 166 }
167 else 167 else
168 { 168 {
169 // XXX: Possibly we should fail outright here rather than continuing if a particular component of the 169 // XXX: Possibly we should fail outright here rather than continuing if a particular component of the
170 // coalesced object fails to load. 170 // coalesced object fails to load.
171 m_log.WarnFormat( 171 m_log.WarnFormat(
172 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.", 172 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
173 i); 173 i);
174 } 174 }
175 175
@@ -181,8 +181,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
181 m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e); 181 m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e);
182 Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml); 182 Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml);
183 return false; 183 return false;
184 } 184 }
185 185
186 return true; 186 return true;
187 } 187 }
188 } 188 }
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 0b7379b..b8d210c 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
107 part.LinkNum = linkNum; 107 part.LinkNum = linkNum;
108 part.TrimPermissions(); 108 part.TrimPermissions();
109 } 109 }
110 } 110 }
111 while (reader.ReadToNextSibling("Part")); 111 while (reader.ReadToNextSibling("Part"));
112 } 112 }
113 113
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
156 { 156 {
157 ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); 157 ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false);
158 } 158 }
159 159
160 public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) 160 public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState)
161 { 161 {
162 using (StringWriter sw = new StringWriter()) 162 using (StringWriter sw = new StringWriter())
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
190 190
191 if (!noRootElement) 191 if (!noRootElement)
192 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); 192 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
193 193
194 writer.WriteStartElement(String.Empty, "RootPart", String.Empty); 194 writer.WriteStartElement(String.Empty, "RootPart", String.Empty);
195 ToXmlFormat(sceneObject.RootPart, writer); 195 ToXmlFormat(sceneObject.RootPart, writer);
196 writer.WriteEndElement(); 196 writer.WriteEndElement();
@@ -212,23 +212,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
212 212
213 if (doScriptStates) 213 if (doScriptStates)
214 sceneObject.SaveScriptedState(writer); 214 sceneObject.SaveScriptedState(writer);
215 215
216 if (!noRootElement) 216 if (!noRootElement)
217 writer.WriteEndElement(); // SceneObjectGroup 217 writer.WriteEndElement(); // SceneObjectGroup
218 218
219// m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time); 219// m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time);
220 } 220 }
221 221
222 protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer) 222 protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer)
223 { 223 {
224 SOPToXml2(writer, part, new Dictionary<string, object>()); 224 SOPToXml2(writer, part, new Dictionary<string, object>());
225 } 225 }
226 226
227 public static SceneObjectGroup FromXml2Format(string xmlData) 227 public static SceneObjectGroup FromXml2Format(string xmlData)
228 { 228 {
229 //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); 229 //m_log.DebugFormat("[SOG]: Starting deserialization of SOG");
230 //int time = System.Environment.TickCount; 230 //int time = System.Environment.TickCount;
231 231
232 try 232 try
233 { 233 {
234 XmlDocument doc = new XmlDocument(); 234 XmlDocument doc = new XmlDocument();
@@ -780,7 +780,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
780 obj.VehicleParams = vehicle; 780 obj.VehicleParams = vehicle;
781 } 781 }
782 } 782 }
783 783
784 private static void ProcessShape(SceneObjectPart obj, XmlReader reader) 784 private static void ProcessShape(SceneObjectPart obj, XmlReader reader)
785 { 785 {
786 List<string> errorNodeNames; 786 List<string> errorNodeNames;
@@ -1235,7 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1235 { 1235 {
1236 shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); 1236 shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape");
1237 } 1237 }
1238 1238
1239 private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) 1239 private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader)
1240 { 1240 {
1241 shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); 1241 shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture");
@@ -1367,13 +1367,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1367 1367
1368 if (sog.RootPart.KeyframeMotion != null) 1368 if (sog.RootPart.KeyframeMotion != null)
1369 { 1369 {
1370 Byte[] data = sog.RootPart.KeyframeMotion.Serialize(); 1370 Byte[] data = sog.RootPart.KeyframeMotion.Serialize();
1371 1371
1372 writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); 1372 writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty);
1373 writer.WriteBase64(data, 0, data.Length); 1373 writer.WriteBase64(data, 0, data.Length);
1374 writer.WriteEndElement(); 1374 writer.WriteEndElement();
1375 } 1375 }
1376 1376
1377 1377
1378 writer.WriteEndElement(); 1378 writer.WriteEndElement();
1379 } 1379 }
@@ -1438,7 +1438,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1438 WriteShape(writer, sop.Shape, options); 1438 WriteShape(writer, sop.Shape, options);
1439 1439
1440 WriteVector(writer, "Scale", sop.Scale); 1440 WriteVector(writer, "Scale", sop.Scale);
1441 WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); 1441 WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation);
1442 WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); 1442 WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
1443 WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); 1443 WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL);
1444 WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL); 1444 WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL);
@@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1472 if (sop.MediaUrl != null) 1472 if (sop.MediaUrl != null)
1473 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1473 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1474 WriteVector(writer, "AttachedPos", sop.AttachedPos); 1474 WriteVector(writer, "AttachedPos", sop.AttachedPos);
1475 1475
1476 if (sop.DynAttrs.CountNamespaces > 0) 1476 if (sop.DynAttrs.CountNamespaces > 0)
1477 { 1477 {
1478 writer.WriteStartElement("DynAttrs"); 1478 writer.WriteStartElement("DynAttrs");
@@ -1520,7 +1520,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1520 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower()); 1520 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower());
1521 } 1521 }
1522 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); 1522 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower());
1523 1523
1524 writer.WriteEndElement(); 1524 writer.WriteEndElement();
1525 } 1525 }
1526 1526
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index c8f525e..bc440fc 100755
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -113,12 +113,12 @@ namespace OpenSim.Region.Framework.Scenes
113 SimSpareMs = 32, 113 SimSpareMs = 32,
114 SimSleepMs = 33, 114 SimSleepMs = 33,
115 SimIoPumpTime = 34, 115 SimIoPumpTime = 34,
116 SimPCTSscriptsRun = 35, 116 SimPCTSscriptsRun = 35,
117 SimRegionIdle = 36, // dataserver only 117 SimRegionIdle = 36, // dataserver only
118 SimRegionIdlePossible = 37, // dataserver only 118 SimRegionIdlePossible = 37, // dataserver only
119 SimAIStepTimeMS = 38, 119 SimAIStepTimeMS = 38,
120 SimSkippedSillouet_PS = 39, 120 SimSkippedSillouet_PS = 39,
121 SimSkippedCharsPerC = 40, 121 SimSkippedCharsPerC = 40,
122 122
123// extra stats IDs irrelevant, just far from viewer defined ones 123// extra stats IDs irrelevant, just far from viewer defined ones
124 SimExtraCountStart = 1000, 124 SimExtraCountStart = 1000,
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes
129 TotalGeoPrim = 1003, 129 TotalGeoPrim = 1003,
130 TotalMesh = 1004, 130 TotalMesh = 1004,
131 ThreadCount = 1005, 131 ThreadCount = 1005,
132 132
133 SimExtraCountEnd = 1006 133 SimExtraCountEnd = 1006
134 } 134 }
135 135
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Framework.Scenes
199 /// </remarks> 199 /// </remarks>
200 private float m_statisticsFPSfactor = 5.0f; 200 private float m_statisticsFPSfactor = 5.0f;
201 private float m_targetFrameTime = 0.1f; 201 private float m_targetFrameTime = 0.1f;
202 // saved last reported value so there is something available for llGetRegionFPS 202 // saved last reported value so there is something available for llGetRegionFPS
203 private float lastReportedSimFPS; 203 private float lastReportedSimFPS;
204 private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize]; 204 private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize];
205 private float m_pfps; 205 private float m_pfps;
@@ -336,7 +336,7 @@ namespace OpenSim.Region.Framework.Scenes
336 { 336 {
337 if (!m_scene.Active) 337 if (!m_scene.Active)
338 return; 338 return;
339 339
340 // dont do it if if still been done 340 // dont do it if if still been done
341 341
342 if(Monitor.TryEnter(m_statsLock)) 342 if(Monitor.TryEnter(m_statsLock))
@@ -367,8 +367,8 @@ namespace OpenSim.Region.Framework.Scenes
367 // factor to consider updates integration time 367 // factor to consider updates integration time
368 float updateTimeFactor = 1.0f / updateElapsed; 368 float updateTimeFactor = 1.0f / updateElapsed;
369 369
370 370
371 // scene frame stats 371 // scene frame stats
372 float reportedFPS; 372 float reportedFPS;
373 float physfps; 373 float physfps;
374 float timeDilation; 374 float timeDilation;
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes
393 sleeptime = m_sleeptimeMS; 393 sleeptime = m_sleeptimeMS;
394 scriptTimeMS = m_scriptTimeMS; 394 scriptTimeMS = m_scriptTimeMS;
395 totalFrameTime = m_frameMS; 395 totalFrameTime = m_frameMS;
396 // still not inv 396 // still not inv
397 invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0); 397 invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0);
398 398
399 ResetFrameStats(); 399 ResetFrameStats();
@@ -424,10 +424,10 @@ namespace OpenSim.Region.Framework.Scenes
424 } 424 }
425 425
426 // some engines track frame time with error related to the simulation step size 426 // some engines track frame time with error related to the simulation step size
427 if(physfps > reportedFPS) 427 if(physfps > reportedFPS)
428 physfps = reportedFPS; 428 physfps = reportedFPS;
429 429
430 // save the reported value so there is something available for llGetRegionFPS 430 // save the reported value so there is something available for llGetRegionFPS
431 lastReportedSimFPS = reportedFPS; 431 lastReportedSimFPS = reportedFPS;
432 432
433 // scale frame stats 433 // scale frame stats
@@ -461,13 +461,13 @@ namespace OpenSim.Region.Framework.Scenes
461 461
462 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code 462 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code
463 // so that stat numbers are always consistent. 463 // so that stat numbers are always consistent.
464 CheckStatSanity(); 464 CheckStatSanity();
465 465
466 for (int i = 0; i < m_statisticViewerArraySize; i++) 466 for (int i = 0; i < m_statisticViewerArraySize; i++)
467 { 467 {
468 sb[i] = new SimStatsPacket.StatBlock(); 468 sb[i] = new SimStatsPacket.StatBlock();
469 } 469 }
470 470
471 sb[0].StatID = (uint) Stats.TimeDilation; 471 sb[0].StatID = (uint) Stats.TimeDilation;
472 sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3); 472 sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3);
473 473
@@ -546,13 +546,13 @@ namespace OpenSim.Region.Framework.Scenes
546 546
547 sb[24].StatID = (uint)Stats.ResidentSizeKb; 547 sb[24].StatID = (uint)Stats.ResidentSizeKb;
548 sb[24].StatValue = 0; 548 sb[24].StatValue = 0;
549 549
550 sb[25].StatID = (uint)Stats.PendingLocalUploads; 550 sb[25].StatID = (uint)Stats.PendingLocalUploads;
551 sb[25].StatValue = 0; 551 sb[25].StatValue = 0;
552 552
553 sb[26].StatID = (uint)Stats.PhysicsPinnedTasks; 553 sb[26].StatID = (uint)Stats.PhysicsPinnedTasks;
554 sb[26].StatValue = 0; 554 sb[26].StatValue = 0;
555 555
556 sb[27].StatID = (uint)Stats.PhysicsLodTasks; 556 sb[27].StatID = (uint)Stats.PhysicsLodTasks;
557 sb[27].StatValue = 0; 557 sb[27].StatValue = 0;
558 558
@@ -623,7 +623,7 @@ namespace OpenSim.Region.Framework.Scenes
623 sbex[5].StatValue = m_inUseThreads; 623 sbex[5].StatValue = m_inUseThreads;
624 lastReportedSimStats[43] = m_inUseThreads; 624 lastReportedSimStats[43] = m_inUseThreads;
625 625
626 SimStats simStats 626 SimStats simStats
627 = new SimStats( 627 = new SimStats(
628 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, 628 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity,
629 rb, sb, sbex, m_scene.RegionInfo.originRegionID); 629 rb, sb, sbex, m_scene.RegionInfo.originRegionID);
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Framework.Scenes
643 m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value; 643 m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value;
644 644
645 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); 645 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats();
646 646
647 if (physicsStats != null) 647 if (physicsStats != null)
648 { 648 {
649 foreach (KeyValuePair<string, float> tuple in physicsStats) 649 foreach (KeyValuePair<string, float> tuple in physicsStats)
@@ -717,7 +717,7 @@ namespace OpenSim.Region.Framework.Scenes
717 717
718 m_FrameStatsTS = Util.GetTimeStampMS(); 718 m_FrameStatsTS = Util.GetTimeStampMS();
719 } 719 }
720 } 720 }
721 721
722 private void ResetFrameStats() 722 private void ResetFrameStats()
723 { 723 {
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index 1aa1194..89d78cf 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Region.Framework.Scenes
158 { 158 {
159 if (Double.IsNaN(value) || Double.IsInfinity(value)) 159 if (Double.IsNaN(value) || Double.IsInfinity(value))
160 return; 160 return;
161 161
162 m_terrainData[x, y] = (float)value; 162 m_terrainData[x, y] = (float)value;
163 } 163 }
164 } 164 }
@@ -486,7 +486,7 @@ namespace OpenSim.Region.Framework.Scenes
486 int index = 0; 486 int index = 0;
487 487
488 m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight); 488 m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight);
489 489
490 for (int y = 0; y < Height; y++) 490 for (int y = 0; y < Height; y++)
491 { 491 {
492 for (int x = 0; x < Width; x++) 492 for (int x = 0; x < Width; x++)
diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
index fd65735..9d1f815 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
@@ -400,7 +400,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
400 block[k++] = (terrData[x, y] - sub) * premult; 400 block[k++] = (terrData[x, y] - sub) * premult;
401 } 401 }
402 } 402 }
403 403
404 wbits = (prequant >> 1); 404 wbits = (prequant >> 1);
405 405
406 dct16x16(block, iout, ref wbits); 406 dct16x16(block, iout, ref wbits);
@@ -490,22 +490,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
490 #region DCT 490 #region DCT
491 491
492 /* DCT (Discrete Cosine Transform) 492 /* DCT (Discrete Cosine Transform)
493 adaptation from 493 adaptation from
494 General Purpose 2D,3D FFT (Fast Fourier Transform) Package 494 General Purpose 2D,3D FFT (Fast Fourier Transform) Package
495 by Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp) 495 by Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp)
496 496
497 -------- 16x16 DCT (Discrete Cosine Transform) / Inverse of DCT -------- 497 -------- 16x16 DCT (Discrete Cosine Transform) / Inverse of DCT --------
498 [definition] 498 [definition]
499 <case1> Normalized 16x16 IDCT 499 <case1> Normalized 16x16 IDCT
500 C[k1 + k2] = (1/8) * sum_j1=0^15 sum_j2=0^15 500 C[k1 + k2] = (1/8) * sum_j1=0^15 sum_j2=0^15
501 tmp[j1 + j2] * s[j1] * s[j2] * 501 tmp[j1 + j2] * s[j1] * s[j2] *
502 cos(pi*j1*(k1+1/2)/16) * 502 cos(pi*j1*(k1+1/2)/16) *
503 cos(pi*j2*(k2+1/2)/16), 0<=k1<16, 0<=k2<16 503 cos(pi*j2*(k2+1/2)/16), 0<=k1<16, 0<=k2<16
504 (s[0] = 1/sqrt(2), s[j] = 1, j > 0) 504 (s[0] = 1/sqrt(2), s[j] = 1, j > 0)
505 <case2> Normalized 16x16 DCT 505 <case2> Normalized 16x16 DCT
506 C[k1 + k2] = (1/8) * s[k1] * s[k2] * sum_j1=0^15 sum_j2=0^15 506 C[k1 + k2] = (1/8) * s[k1] * s[k2] * sum_j1=0^15 sum_j2=0^15
507 tmp[j1 + j2] * 507 tmp[j1 + j2] *
508 cos(pi*(j1+1/2)*k1/16) * 508 cos(pi*(j1+1/2)*k1/16) *
509 cos(pi*(j2+1/2)*k2/16), 0<=k1<16, 0<=k2<16 509 cos(pi*(j2+1/2)*k2/16), 0<=k1<16, 0<=k2<16
510 (s[0] = 1/sqrt(2), s[j] = 1, j > 0) 510 (s[0] = 1/sqrt(2), s[j] = 1, j > 0)
511 */ 511 */
diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs
index da18941..fa698a9 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
50 public void T010_AddObjects() 50 public void T010_AddObjects()
51 { 51 {
52 TestHelpers.InMethod(); 52 TestHelpers.InMethod();
53 53
54 random = new Random(); 54 random = new Random();
55 SceneObjectGroup found; 55 SceneObjectGroup found;
56 EntityManager entman = new EntityManager(); 56 EntityManager entman = new EntityManager();
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
62 UUID obj2 = sog.UUID; 62 UUID obj2 = sog.UUID;
63 uint li2 = sog.LocalId; 63 uint li2 = sog.LocalId;
64 entman.Add(sog); 64 entman.Add(sog);
65 65
66 found = (SceneObjectGroup)entman[obj1]; 66 found = (SceneObjectGroup)entman[obj1];
67 Assert.That(found.UUID ,Is.EqualTo(obj1)); 67 Assert.That(found.UUID ,Is.EqualTo(obj1));
68 found = (SceneObjectGroup)entman[li1]; 68 found = (SceneObjectGroup)entman[li1];
@@ -85,15 +85,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests
85 public void T011_ThreadAddRemoveTest() 85 public void T011_ThreadAddRemoveTest()
86 { 86 {
87 TestHelpers.InMethod(); 87 TestHelpers.InMethod();
88 88
89 // This test adds and removes with mutiple threads, attempting to break the 89 // This test adds and removes with mutiple threads, attempting to break the
90 // uuid and localid dictionary coherence. 90 // uuid and localid dictionary coherence.
91 EntityManager entman = new EntityManager(); 91 EntityManager entman = new EntityManager();
92 SceneObjectGroup sog = NewSOG(); 92 SceneObjectGroup sog = NewSOG();
93 for (int j=0; j<20; j++) 93 for (int j=0; j<20; j++)
94 { 94 {
95 List<Thread> trdlist = new List<Thread>(); 95 List<Thread> trdlist = new List<Thread>();
96 96
97 for (int i=0; i<4; i++) 97 for (int i=0; i<4; i++)
98 { 98 {
99 // Adds scene object 99 // Adds scene object
@@ -101,14 +101,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
101 Thread start = new Thread(new ThreadStart(test.TestAddSceneObject)); 101 Thread start = new Thread(new ThreadStart(test.TestAddSceneObject));
102 start.Start(); 102 start.Start();
103 trdlist.Add(start); 103 trdlist.Add(start);
104 104
105 // Removes it 105 // Removes it
106 test = new NewTestThreads(entman,sog); 106 test = new NewTestThreads(entman,sog);
107 start = new Thread(new ThreadStart(test.TestRemoveSceneObject)); 107 start = new Thread(new ThreadStart(test.TestRemoveSceneObject));
108 start.Start(); 108 start.Start();
109 trdlist.Add(start); 109 trdlist.Add(start);
110 } 110 }
111 foreach (Thread thread in trdlist) 111 foreach (Thread thread in trdlist)
112 { 112 {
113 thread.Join(); 113 thread.Join();
114 } 114 }
@@ -133,14 +133,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
133 133
134 SceneObjectGroup sog = new SceneObjectGroup(sop); 134 SceneObjectGroup sog = new SceneObjectGroup(sop);
135 scene.AddNewSceneObject(sog, false); 135 scene.AddNewSceneObject(sog, false);
136 136
137 return sog; 137 return sog;
138 } 138 }
139 139
140 private static string RandomName() 140 private static string RandomName()
141 { 141 {
142 StringBuilder name = new StringBuilder(); 142 StringBuilder name = new StringBuilder();
143 int size = random.Next(40,80); 143 int size = random.Next(40,80);
144 char ch ; 144 char ch ;
145 for (int i=0; i<size; i++) 145 for (int i=0; i<size; i++)
146 { 146 {
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
156 private EntityManager entman; 156 private EntityManager entman;
157 private SceneObjectGroup sog; 157 private SceneObjectGroup sog;
158 private Random random; 158 private Random random;
159 159
160 public NewTestThreads(EntityManager entman, SceneObjectGroup sog) 160 public NewTestThreads(EntityManager entman, SceneObjectGroup sog)
161 { 161 {
162 this.entman = entman; 162 this.entman = entman;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
index ee7c8a9..56723bf 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
@@ -55,29 +55,29 @@ namespace OpenSim.Region.Framework.Scenes.Tests
55 UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002"); 55 UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002");
56 56
57 SceneObjectPart part1 57 SceneObjectPart part1
58 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 58 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
59 { Name = part1Name, UUID = part1Id }; 59 { Name = part1Name, UUID = part1Id };
60 SceneObjectGroup so = new SceneObjectGroup(part1); 60 SceneObjectGroup so = new SceneObjectGroup(part1);
61 SceneObjectPart part2 61 SceneObjectPart part2
62 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 62 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
63 { Name = part2Name, UUID = part2Id }; 63 { Name = part2Name, UUID = part2Id };
64 so.AddPart(part2); 64 so.AddPart(part2);
65 65
66 scene.AddNewSceneObject(so, false); 66 scene.AddNewSceneObject(so, false);
67 67
68 SceneObjectGroup dupeSo 68 SceneObjectGroup dupeSo
69 = scene.SceneGraph.DuplicateObject( 69 = scene.SceneGraph.DuplicateObject(
70 part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); 70 part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity);
71 Assert.That(dupeSo.Parts.Length, Is.EqualTo(2)); 71 Assert.That(dupeSo.Parts.Length, Is.EqualTo(2));
72 72
73 SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); 73 SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1);
74 SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); 74 SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2);
75 Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); 75 Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId));
76 Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); 76 Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId));
77 77
78 Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags)); 78 Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags));
79 Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags)); 79 Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags));
80 80
81 /* 81 /*
82 Assert.That(part1.PhysActor, Is.Not.Null); 82 Assert.That(part1.PhysActor, Is.Not.Null);
83 Assert.That(part2.PhysActor, Is.Not.Null); 83 Assert.That(part2.PhysActor, Is.Not.Null);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index ac8c32d..8961a26 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
99 Assert.That(scene.AddNewSceneObject(so, false), Is.True); 99 Assert.That(scene.AddNewSceneObject(so, false), Is.True);
100 SceneObjectGroup retrievedSo = scene.GetSceneObjectGroup(so.UUID); 100 SceneObjectGroup retrievedSo = scene.GetSceneObjectGroup(so.UUID);
101 SceneObjectPart[] retrievedParts = retrievedSo.Parts; 101 SceneObjectPart[] retrievedParts = retrievedSo.Parts;
102 102
103 //m_log.Debug("retrievedPart : {0}", retrievedPart); 103 //m_log.Debug("retrievedPart : {0}", retrievedPart);
104 // If the parts have the same UUID then we will consider them as one and the same 104 // If the parts have the same UUID then we will consider them as one and the same
105 Assert.That(retrievedSo.PrimCount, Is.EqualTo(partsToTestCount)); 105 Assert.That(retrievedSo.PrimCount, Is.EqualTo(partsToTestCount));
@@ -126,19 +126,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests
126 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); 126 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001");
127 127
128 SceneObjectPart part1 128 SceneObjectPart part1
129 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 129 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
130 { Name = obj1Name, UUID = objUuid }; 130 { Name = obj1Name, UUID = objUuid };
131 131
132 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); 132 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True);
133 133
134 SceneObjectPart part2 134 SceneObjectPart part2
135 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 135 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
136 { Name = obj2Name, UUID = objUuid }; 136 { Name = obj2Name, UUID = objUuid };
137 137
138 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False); 138 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False);
139 139
140 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); 140 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid);
141 141
142 //m_log.Debug("retrievedPart : {0}", retrievedPart); 142 //m_log.Debug("retrievedPart : {0}", retrievedPart);
143 // If the parts have the same UUID then we will consider them as one and the same 143 // If the parts have the same UUID then we will consider them as one and the same
144 Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name)); 144 Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name));
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
180 Assert.That(scene.GetGroupByPrim(soid), Is.Null); 180 Assert.That(scene.GetGroupByPrim(soid), Is.Null);
181 Assert.That(scene.GetGroupByPrim(spid), Is.Null); 181 Assert.That(scene.GetGroupByPrim(spid), Is.Null);
182 } 182 }
183 183
184 /// <summary> 184 /// <summary>
185 /// Test deleting an object from a scene. 185 /// Test deleting an object from a scene.
186 /// </summary> 186 /// </summary>
@@ -205,10 +205,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
205 205
206 Assert.That(retrievedPart, Is.Null); 206 Assert.That(retrievedPart, Is.Null);
207 } 207 }
208 208
209 /// <summary> 209 /// <summary>
210 /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not 210 /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not
211 /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by 211 /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by
212 /// OpenSim. 212 /// OpenSim.
213 /// </summary> 213 /// </summary>
214 [Test] 214 [Test]
@@ -218,24 +218,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests
218 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); 218 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
219 string childPartName = "childPart"; 219 string childPartName = "childPart";
220 UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); 220 UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000");
221 221
222 SceneObjectPart rootPart 222 SceneObjectPart rootPart
223 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 223 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
224 { Name = rootPartName, UUID = rootPartUuid }; 224 { Name = rootPartName, UUID = rootPartUuid };
225 SceneObjectPart linkPart 225 SceneObjectPart linkPart
226 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 226 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
227 { Name = childPartName, UUID = childPartUuid }; 227 { Name = childPartName, UUID = childPartUuid };
228 228
229 SceneObjectGroup sog = new SceneObjectGroup(rootPart); 229 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
230 sog.AddPart(linkPart); 230 sog.AddPart(linkPart);
231 231
232 Assert.That(sog.UUID, Is.EqualTo(rootPartUuid)); 232 Assert.That(sog.UUID, Is.EqualTo(rootPartUuid));
233 Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid)); 233 Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid));
234 Assert.That(sog.Parts.Length, Is.EqualTo(2)); 234 Assert.That(sog.Parts.Length, Is.EqualTo(2));
235 235
236 UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002"); 236 UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002");
237 sog.UUID = newRootPartUuid; 237 sog.UUID = newRootPartUuid;
238 238
239 Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid)); 239 Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid));
240 Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid)); 240 Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid));
241 Assert.That(sog.Parts.Length, Is.EqualTo(2)); 241 Assert.That(sog.Parts.Length, Is.EqualTo(2));
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs
index dc3b717..c27bc1a 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
87 87
88 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 88 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
89 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 89 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
90 sogd.Enabled = false; 90 sogd.Enabled = false;
91 91
92 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); 92 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID);
93 uint soLocalId = so.LocalId; 93 uint soLocalId = so.LocalId;
@@ -119,11 +119,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
119 119
120 // Check that object is still there. 120 // Check that object is still there.
121 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 121 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
122 Assert.That(retrievedPart2, Is.Not.Null); 122 Assert.That(retrievedPart2, Is.Not.Null);
123 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 123 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
124 124
125 // Check that we have a copy in inventory 125 // Check that we have a copy in inventory
126 InventoryItemBase item 126 InventoryItemBase item
127 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); 127 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1");
128 Assert.That(item, Is.Not.Null); 128 Assert.That(item, Is.Not.Null);
129 } 129 }
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
145 145
146 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 146 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
147 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 147 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
148 sogd.Enabled = false; 148 sogd.Enabled = false;
149 149
150 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); 150 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID);
151 uint soLocalId = so.LocalId; 151 uint soLocalId = so.LocalId;
@@ -168,11 +168,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
168 168
169 // Check that object is still there. 169 // Check that object is still there.
170 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 170 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
171 Assert.That(retrievedPart2, Is.Not.Null); 171 Assert.That(retrievedPart2, Is.Not.Null);
172 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 172 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
173 173
174 // Check that we do not have a copy in inventory 174 // Check that we do not have a copy in inventory
175 InventoryItemBase item 175 InventoryItemBase item
176 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); 176 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1");
177 Assert.That(item, Is.Null); 177 Assert.That(item, Is.Null);
178 } 178 }
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
194 194
195 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 195 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
196 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 196 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
197 sogd.Enabled = false; 197 sogd.Enabled = false;
198 198
199 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); 199 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2));
200 uint soLocalId = so.LocalId; 200 uint soLocalId = so.LocalId;
@@ -219,11 +219,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
219 219
220 // Check that object is still there. 220 // Check that object is still there.
221 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 221 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
222 Assert.That(retrievedPart2, Is.Not.Null); 222 Assert.That(retrievedPart2, Is.Not.Null);
223 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 223 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
224 224
225 // Check that we have a copy in inventory 225 // Check that we have a copy in inventory
226 InventoryItemBase item 226 InventoryItemBase item
227 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 227 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
228 Assert.That(item, Is.Not.Null); 228 Assert.That(item, Is.Not.Null);
229 } 229 }
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
245 245
246 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 246 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
247 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 247 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
248 sogd.Enabled = false; 248 sogd.Enabled = false;
249 249
250 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); 250 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2));
251 uint soLocalId = so.LocalId; 251 uint soLocalId = so.LocalId;
@@ -272,11 +272,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
272 sogd.InventoryDeQueueAndDelete(); 272 sogd.InventoryDeQueueAndDelete();
273 // Check that object is still there. 273 // Check that object is still there.
274 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 274 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
275 Assert.That(retrievedPart2, Is.Not.Null); 275 Assert.That(retrievedPart2, Is.Not.Null);
276 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 276 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
277 277
278 // Check that we have a copy in inventory 278 // Check that we have a copy in inventory
279 InventoryItemBase item 279 InventoryItemBase item
280 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 280 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
281 Assert.That(item, Is.Null); 281 Assert.That(item, Is.Null);
282 } 282 }
@@ -303,11 +303,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
303 sogd.InventoryDeQueueAndDelete(); 303 sogd.InventoryDeQueueAndDelete();
304 // Check that object is still there. 304 // Check that object is still there.
305 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 305 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
306 Assert.That(retrievedPart2, Is.Not.Null); 306 Assert.That(retrievedPart2, Is.Not.Null);
307 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 307 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
308 308
309 // Check that we have a copy in inventory 309 // Check that we have a copy in inventory
310 InventoryItemBase item 310 InventoryItemBase item
311 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 311 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
312 Assert.That(item, Is.Null); 312 Assert.That(item, Is.Null);
313 } 313 }
@@ -334,11 +334,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
334 sogd.InventoryDeQueueAndDelete(); 334 sogd.InventoryDeQueueAndDelete();
335 // Check that object is still there. 335 // Check that object is still there.
336 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 336 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
337 Assert.That(retrievedPart2, Is.Not.Null); 337 Assert.That(retrievedPart2, Is.Not.Null);
338 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 338 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
339 339
340 // Check that we have a copy in inventory 340 // Check that we have a copy in inventory
341 InventoryItemBase item 341 InventoryItemBase item
342 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 342 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
343 Assert.That(item, Is.Null); 343 Assert.That(item, Is.Null);
344 } 344 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
index 4a98746..e1e973c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
98 98
99 // crossing is async 99 // crossing is async
100 Thread.Sleep(500); 100 Thread.Sleep(500);
101 101
102 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id)); 102 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id));
103 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id)); 103 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id));
104 } 104 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
index f0debd0..b84ecac 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
@@ -77,19 +77,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests
77 public void TestDeRezSceneObject() 77 public void TestDeRezSceneObject()
78 { 78 {
79 TestHelpers.InMethod(); 79 TestHelpers.InMethod();
80 80
81 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 81 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
82 82
83 TestScene scene = new SceneHelpers().SetupScene(); 83 TestScene scene = new SceneHelpers().SetupScene();
84 IConfigSource configSource = new IniConfigSource(); 84 IConfigSource configSource = new IniConfigSource();
85 IConfig config = configSource.AddConfig("Startup"); 85 IConfig config = configSource.AddConfig("Startup");
86 config.Set("serverside_object_permissions", true); 86 config.Set("serverside_object_permissions", true);
87 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); 87 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
88 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 88 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
89 89
90 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 90 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
91 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 91 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
92 sogd.Enabled = false; 92 sogd.Enabled = false;
93 93
94 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); 94 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId);
95 uint soLocalId = so.LocalId; 95 uint soLocalId = so.LocalId;
@@ -104,9 +104,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
104// Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); 104// Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False);
105 105
106 sogd.InventoryDeQueueAndDelete(); 106 sogd.InventoryDeQueueAndDelete();
107 107
108// SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 108// SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
109 Assert.That(retrievedPart, Is.Null); 109 Assert.That(retrievedPart, Is.Null);
110 } 110 }
111 111
112 /// <summary> 112 /// <summary>
@@ -154,48 +154,48 @@ namespace OpenSim.Region.Framework.Scenes.Tests
154 154
155 sceneA.DeleteSceneObject(so, false); 155 sceneA.DeleteSceneObject(so, false);
156 } 156 }
157 157
158 /// <summary> 158 /// <summary>
159 /// Test deleting an object from a scene where the deleter is not the owner 159 /// Test deleting an object from a scene where the deleter is not the owner
160 /// </summary> 160 /// </summary>
161 /// <remarks> 161 /// <remarks>
162 /// This test assumes that the deleter is not a god. 162 /// This test assumes that the deleter is not a god.
163 /// </remarks> 163 /// </remarks>
164 [Test] 164 [Test]
165 public void TestDeRezSceneObjectNotOwner() 165 public void TestDeRezSceneObjectNotOwner()
166 { 166 {
167 TestHelpers.InMethod(); 167 TestHelpers.InMethod();
168// log4net.Config.XmlConfigurator.Configure(); 168// log4net.Config.XmlConfigurator.Configure();
169 169
170 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 170 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
171 UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); 171 UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001");
172 172
173 TestScene scene = new SceneHelpers().SetupScene(); 173 TestScene scene = new SceneHelpers().SetupScene();
174 IConfigSource configSource = new IniConfigSource(); 174 IConfigSource configSource = new IniConfigSource();
175 IConfig config = configSource.AddConfig("Startup"); 175 IConfig config = configSource.AddConfig("Startup");
176 config.Set("serverside_object_permissions", true); 176 config.Set("serverside_object_permissions", true);
177 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); 177 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
178 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 178 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
179 179
180 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 180 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
181 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 181 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
182 sogd.Enabled = false; 182 sogd.Enabled = false;
183 183
184 SceneObjectPart part 184 SceneObjectPart part
185 = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); 185 = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero);
186 part.Name = "obj1"; 186 part.Name = "obj1";
187 scene.AddNewSceneObject(new SceneObjectGroup(part), false); 187 scene.AddNewSceneObject(new SceneObjectGroup(part), false);
188 List<uint> localIds = new List<uint>(); 188 List<uint> localIds = new List<uint>();
189 localIds.Add(part.LocalId); 189 localIds.Add(part.LocalId);
190 190
191 scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); 191 scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero);
192 sogd.InventoryDeQueueAndDelete(); 192 sogd.InventoryDeQueueAndDelete();
193 193
194 // Object should still be in the scene. 194 // Object should still be in the scene.
195 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 195 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
196 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); 196 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
197 } 197 }
198 198
199 /// <summary> 199 /// <summary>
200 /// Test deleting an object asynchronously to user inventory. 200 /// Test deleting an object asynchronously to user inventory.
201 /// </summary> 201 /// </summary>
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
211 TestScene scene = new SceneHelpers().SetupScene(); 211 TestScene scene = new SceneHelpers().SetupScene();
212 212
213 IConfigSource configSource = new IniConfigSource(); 213 IConfigSource configSource = new IniConfigSource();
214 IConfig config = configSource.AddConfig("Modules"); 214 IConfig config = configSource.AddConfig("Modules");
215 config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); 215 config.Set("InventoryAccessModule", "BasicInventoryAccessModule");
216 SceneHelpers.SetupSceneModules( 216 SceneHelpers.SetupSceneModules(
217 scene, configSource, new object[] { new BasicInventoryAccessModule() }); 217 scene, configSource, new object[] { new BasicInventoryAccessModule() });
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
index 1718734..41f61ac 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
@@ -66,8 +66,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 public void TestLinkDelink2SceneObjects() 66 public void TestLinkDelink2SceneObjects()
67 { 67 {
68 TestHelpers.InMethod(); 68 TestHelpers.InMethod();
69 69
70 bool debugtest = false; 70 bool debugtest = false;
71 71
72 Scene scene = new SceneHelpers().SetupScene(); 72 Scene scene = new SceneHelpers().SetupScene();
73 SceneObjectGroup grp1 = SceneHelpers.AddSceneObject(scene); 73 SceneObjectGroup grp1 = SceneHelpers.AddSceneObject(scene);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
83 83
84 // <180,0,0> 84 // <180,0,0>
85 grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); 85 grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0));
86 86
87 // Required for linking 87 // Required for linking
88 grp1.RootPart.ClearUpdateSchedule(); 88 grp1.RootPart.ClearUpdateSchedule();
89 grp2.RootPart.ClearUpdateSchedule(); 89 grp2.RootPart.ClearUpdateSchedule();
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
111 } 111 }
112 112
113 // root part should have no offset position or rotation 113 // root part should have no offset position or rotation
114 Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity, 114 Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity,
115 "root part should have no offset position or rotation"); 115 "root part should have no offset position or rotation");
116 116
117 // offset position should be root part position - part2.absolute position. 117 // offset position should be root part position - part2.absolute position.
@@ -125,13 +125,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
125 // There's a euler anomoly at 180, 0, 0 so expect 180 to turn into -180. 125 // There's a euler anomoly at 180, 0, 0 so expect 180 to turn into -180.
126 part1.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); 126 part1.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
127 Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); 127 Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
128 128
129 if (debugtest) 129 if (debugtest)
130 m_log.Debug(rotEuler1); 130 m_log.Debug(rotEuler1);
131 131
132 part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); 132 part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
133 Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); 133 Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
134 134
135 if (debugtest) 135 if (debugtest)
136 m_log.Debug(rotEuler2); 136 m_log.Debug(rotEuler2);
137 137
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
153 public void TestLinkDelink2groups4SceneObjects() 153 public void TestLinkDelink2groups4SceneObjects()
154 { 154 {
155 TestHelpers.InMethod(); 155 TestHelpers.InMethod();
156 156
157 bool debugtest = false; 157 bool debugtest = false;
158 158
159 Scene scene = new SceneHelpers().SetupScene(); 159 Scene scene = new SceneHelpers().SetupScene();
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
194 194
195 // Link grp4 to grp3. 195 // Link grp4 to grp3.
196 grp3.LinkToGroup(grp4); 196 grp3.LinkToGroup(grp4);
197 197
198 // At this point we should have 4 parts total in two groups. 198 // At this point we should have 4 parts total in two groups.
199 Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2"); 199 Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2");
200 Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); 200 Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link.");
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
202 Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2"); 202 Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2");
203 Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); 203 Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link.");
204 Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink."); 204 Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink.");
205 205
206 if (debugtest) 206 if (debugtest)
207 { 207 {
208 m_log.Debug("--------After Link-------"); 208 m_log.Debug("--------After Link-------");
@@ -273,13 +273,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
273 Assert.That(part2.AbsolutePosition == Vector3.Zero, "Badness 1"); 273 Assert.That(part2.AbsolutePosition == Vector3.Zero, "Badness 1");
274 Assert.That(part4.OffsetPosition == new Vector3(20, 20, 20), "Badness 2"); 274 Assert.That(part4.OffsetPosition == new Vector3(20, 20, 20), "Badness 2");
275 Quaternion compareQuaternion = new Quaternion(0, 0.7071068f, 0, 0.7071068f); 275 Quaternion compareQuaternion = new Quaternion(0, 0.7071068f, 0, 0.7071068f);
276 Assert.That((part4.RotationOffset.X - compareQuaternion.X < 0.00003) 276 Assert.That((part4.RotationOffset.X - compareQuaternion.X < 0.00003)
277 && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003) 277 && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003)
278 && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003) 278 && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003)
279 && (part4.RotationOffset.W - compareQuaternion.W < 0.00003), 279 && (part4.RotationOffset.W - compareQuaternion.W < 0.00003),
280 "Badness 3"); 280 "Badness 3");
281 } 281 }
282 282
283 /// <summary> 283 /// <summary>
284 /// Test that a new scene object which is already linked is correctly persisted to the persistence layer. 284 /// Test that a new scene object which is already linked is correctly persisted to the persistence layer.
285 /// </summary> 285 /// </summary>
@@ -288,37 +288,37 @@ namespace OpenSim.Region.Framework.Scenes.Tests
288 { 288 {
289 TestHelpers.InMethod(); 289 TestHelpers.InMethod();
290 //log4net.Config.XmlConfigurator.Configure(); 290 //log4net.Config.XmlConfigurator.Configure();
291 291
292 TestScene scene = new SceneHelpers().SetupScene(); 292 TestScene scene = new SceneHelpers().SetupScene();
293 293
294 string rootPartName = "rootpart"; 294 string rootPartName = "rootpart";
295 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); 295 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
296 string linkPartName = "linkpart"; 296 string linkPartName = "linkpart";
297 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); 297 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000");
298 298
299 SceneObjectPart rootPart 299 SceneObjectPart rootPart
300 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 300 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
301 { Name = rootPartName, UUID = rootPartUuid }; 301 { Name = rootPartName, UUID = rootPartUuid };
302 SceneObjectPart linkPart 302 SceneObjectPart linkPart
303 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 303 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
304 { Name = linkPartName, UUID = linkPartUuid }; 304 { Name = linkPartName, UUID = linkPartUuid };
305 305
306 SceneObjectGroup sog = new SceneObjectGroup(rootPart); 306 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
307 sog.AddPart(linkPart); 307 sog.AddPart(linkPart);
308 scene.AddNewSceneObject(sog, true); 308 scene.AddNewSceneObject(sog, true);
309 309
310 // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked 310 // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked
311 // scene backup thread. 311 // scene backup thread.
312 scene.Backup(true); 312 scene.Backup(true);
313 313
314 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); 314 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
315 315
316 Assert.That(storedObjects.Count, Is.EqualTo(1)); 316 Assert.That(storedObjects.Count, Is.EqualTo(1));
317 Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2)); 317 Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2));
318 Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); 318 Assert.That(storedObjects[0].ContainsPart(rootPartUuid));
319 Assert.That(storedObjects[0].ContainsPart(linkPartUuid)); 319 Assert.That(storedObjects[0].ContainsPart(linkPartUuid));
320 } 320 }
321 321
322 /// <summary> 322 /// <summary>
323 /// Test that a delink of a previously linked object is correctly persisted to the database 323 /// Test that a delink of a previously linked object is correctly persisted to the database
324 /// </summary> 324 /// </summary>
@@ -327,20 +327,20 @@ namespace OpenSim.Region.Framework.Scenes.Tests
327 { 327 {
328 TestHelpers.InMethod(); 328 TestHelpers.InMethod();
329 //log4net.Config.XmlConfigurator.Configure(); 329 //log4net.Config.XmlConfigurator.Configure();
330 330
331 TestScene scene = new SceneHelpers().SetupScene(); 331 TestScene scene = new SceneHelpers().SetupScene();
332 332
333 string rootPartName = "rootpart"; 333 string rootPartName = "rootpart";
334 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); 334 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
335 string linkPartName = "linkpart"; 335 string linkPartName = "linkpart";
336 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); 336 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000");
337 337
338 SceneObjectPart rootPart 338 SceneObjectPart rootPart
339 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 339 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
340 { Name = rootPartName, UUID = rootPartUuid }; 340 { Name = rootPartName, UUID = rootPartUuid };
341 341
342 SceneObjectPart linkPart 342 SceneObjectPart linkPart
343 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 343 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
344 { Name = linkPartName, UUID = linkPartUuid }; 344 { Name = linkPartName, UUID = linkPartUuid };
345 SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart); 345 SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart);
346 scene.AddNewSceneObject(linkGroup, true); 346 scene.AddNewSceneObject(linkGroup, true);
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
359 SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); 359 SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false);
360 Assert.IsFalse(groupToDelete.GroupContainsForeignPrims); 360 Assert.IsFalse(groupToDelete.GroupContainsForeignPrims);
361 361
362/* backup is async 362/* backup is async
363 scene.DeleteSceneObject(groupToDelete, false); 363 scene.DeleteSceneObject(groupToDelete, false);
364 364
365 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); 365 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
index ec58a5a..c2c7822 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
137 Vector3 childPosition = new Vector3(rootPartPosition + rotatedChildOffsetPosition); 137 Vector3 childPosition = new Vector3(rootPartPosition + rotatedChildOffsetPosition);
138 138
139 SceneObjectPart childPart = so.Parts[1]; 139 SceneObjectPart childPart = so.Parts[1];
140 140
141 Assert.That(childPart.AbsolutePosition, Is.EqualTo(childPosition)); 141 Assert.That(childPart.AbsolutePosition, Is.EqualTo(childPosition));
142 142
143 Assert.That(childPart.GroupPosition, Is.EqualTo(rootPartPosition)); 143 Assert.That(childPart.GroupPosition, Is.EqualTo(rootPartPosition));
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
index e98e631..8d88083 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
71 m_so1.ScriptSetTemporaryStatus(false); 71 m_so1.ScriptSetTemporaryStatus(false);
72 72
73 Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None)); 73 Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None));
74 Assert.That(m_so1.Backup, Is.True); 74 Assert.That(m_so1.Backup, Is.True);
75 } 75 }
76 76
77 [Test] 77 [Test]
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
91 91
92 m_so1.ScriptSetPhantomStatus(false); 92 m_so1.ScriptSetPhantomStatus(false);
93 93
94 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 94 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
95 } 95 }
96 96
97 [Test] 97 [Test]
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
112 112
113 m_so1.ScriptSetVolumeDetect(false); 113 m_so1.ScriptSetVolumeDetect(false);
114 114
115 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 115 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
116 } 116 }
117 117
118 [Test] 118 [Test]
@@ -152,9 +152,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
152 152
153 m_so1.ScriptSetVolumeDetect(false); 153 m_so1.ScriptSetVolumeDetect(false);
154 154
155 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); 155 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
156 } 156 }
157 157
158 [Test] 158 [Test]
159 public void TestSetPhysicsLinkset() 159 public void TestSetPhysicsLinkset()
160 { 160 {
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
index a92e364..4ec69cd 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
@@ -53,30 +53,30 @@ namespace OpenSim.Region.Framework.Scenes.Tests
53 { 53 {
54 TestHelpers.InMethod(); 54 TestHelpers.InMethod();
55// log4net.Config.XmlConfigurator.Configure(); 55// log4net.Config.XmlConfigurator.Configure();
56 56
57 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 57 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
58 58
59 TestScene scene = new SceneHelpers().SetupScene(); 59 TestScene scene = new SceneHelpers().SetupScene();
60 IConfigSource configSource = new IniConfigSource(); 60 IConfigSource configSource = new IniConfigSource();
61 61
62 IConfig startupConfig = configSource.AddConfig("Startup"); 62 IConfig startupConfig = configSource.AddConfig("Startup");
63 startupConfig.Set("serverside_object_permissions", true); 63 startupConfig.Set("serverside_object_permissions", true);
64 64
65 IConfig groupsConfig = configSource.AddConfig("Groups"); 65 IConfig groupsConfig = configSource.AddConfig("Groups");
66 groupsConfig.Set("Enabled", true); 66 groupsConfig.Set("Enabled", true);
67 groupsConfig.Set("Module", "GroupsModule"); 67 groupsConfig.Set("Module", "GroupsModule");
68 groupsConfig.Set("DebugEnabled", true); 68 groupsConfig.Set("DebugEnabled", true);
69 69
70 SceneHelpers.SetupSceneModules( 70 SceneHelpers.SetupSceneModules(
71 scene, configSource, new object[] 71 scene, configSource, new object[]
72 { new DefaultPermissionsModule(), 72 { new DefaultPermissionsModule(),
73 new GroupsModule(), 73 new GroupsModule(),
74 new MockGroupsServicesConnector() }); 74 new MockGroupsServicesConnector() });
75 75
76 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 76 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
77 77
78 IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>(); 78 IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>();
79 79
80 groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); 80 groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true);
81 } 81 }
82 } 82 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index ada407f..0f386bc 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
142 // Check rest of exepcted parameters. 142 // Check rest of exepcted parameters.
143 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null); 143 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null);
144 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); 144 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
145 145
146 Assert.That(sp.IsChildAgent, Is.False); 146 Assert.That(sp.IsChildAgent, Is.False);
147 Assert.That(sp.UUID, Is.EqualTo(spUuid)); 147 Assert.That(sp.UUID, Is.EqualTo(spUuid));
148 148
@@ -262,9 +262,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
262 { 262 {
263 TestHelpers.InMethod(); 263 TestHelpers.InMethod();
264// log4net.Config.XmlConfigurator.Configure(); 264// log4net.Config.XmlConfigurator.Configure();
265 265
266// UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); 266// UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
267 267
268 TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000); 268 TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
269 TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); 269 TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
270 270
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
279 279
280 EventQueueGetModule eqgm2 = new EventQueueGetModule(); 280 EventQueueGetModule eqgm2 = new EventQueueGetModule();
281 SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2); 281 SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2);
282 282
283// SceneHelpers.AddScenePresence(myScene1, agent1Id); 283// SceneHelpers.AddScenePresence(myScene1, agent1Id);
284// ScenePresence childPresence = myScene2.GetScenePresence(agent1); 284// ScenePresence childPresence = myScene2.GetScenePresence(agent1);
285// 285//
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index b8f7458..86500c7 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -465,7 +465,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
465 teleportLookAt, 465 teleportLookAt,
466 (uint)TeleportFlags.ViaLocation); 466 (uint)TeleportFlags.ViaLocation);
467 467
468 // FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate 468 // FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate
469 // communication with the destination region. But this is a very non-obvious way of doing it - really we 469 // communication with the destination region. But this is a very non-obvious way of doing it - really we
470 // should be forced to expicitly set this up. 470 // should be forced to expicitly set this up.
471 471
@@ -627,8 +627,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
627 // Both these operations will occur on different threads and will wait for each other. 627 // Both these operations will occur on different threads and will wait for each other.
628 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 628 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1
629 // test protocol, where we are trying to avoid unpredictable async operations in regression tests. 629 // test protocol, where we are trying to avoid unpredictable async operations in regression tests.
630 tc.OnTestClientSendRegionTeleport 630 tc.OnTestClientSendRegionTeleport
631 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) 631 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL)
632 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); 632 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null);
633 633
634 sceneA.RequestTeleportLocation( 634 sceneA.RequestTeleportLocation(
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs
index 584a03c..dbb6a37 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
70 // Must still be possible to successfully log in 70 // Must still be possible to successfully log in
71 UUID loggingInUserId = TestHelpers.ParseTail(0x2); 71 UUID loggingInUserId = TestHelpers.ParseTail(0x2);
72 72
73 UserAccount ua 73 UserAccount ua
74 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); 74 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password");
75 75
76 SceneHelpers.AddScenePresence(scene, ua); 76 SceneHelpers.AddScenePresence(scene, ua);
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
107 // Must still be possible to successfully log in 107 // Must still be possible to successfully log in
108 UUID loggingInUserId = TestHelpers.ParseTail(0x2); 108 UUID loggingInUserId = TestHelpers.ParseTail(0x2);
109 109
110 UserAccount ua 110 UserAccount ua
111 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); 111 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password");
112 112
113 SceneHelpers.AddScenePresence(scene, ua); 113 SceneHelpers.AddScenePresence(scene, ua);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index 517faf1..6c0af8f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 uint sizeX = 512; 66 uint sizeX = 512;
67 uint sizeY = 512; 67 uint sizeY = 512;
68 68
69 Scene scene 69 Scene scene
70 = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource()); 70 = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource());
71 71
72 Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX); 72 Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
83 83
84 Scene scene = new SceneHelpers().SetupScene(); 84 Scene scene = new SceneHelpers().SetupScene();
85 scene.Update(1); 85 scene.Update(1);
86 86
87 Assert.That(scene.Frame, Is.EqualTo(1)); 87 Assert.That(scene.Frame, Is.EqualTo(1));
88 } 88 }
89 89
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs
index eeda84f..c74c83f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
105// rmcp.LoadModulesFromAddins = false; 105// rmcp.LoadModulesFromAddins = false;
106//// reg.RegisterInterface<IRegionModulesController>(rmcp); 106//// reg.RegisterInterface<IRegionModulesController>(rmcp);
107// rmcp.Initialise(sim); 107// rmcp.Initialise(sim);
108// rmcp.PostInitialise(); 108// rmcp.PostInitialise();
109// TypeExtensionNode node = new TypeExtensionNode(); 109// TypeExtensionNode node = new TypeExtensionNode();
110// node. 110// node.
111// rmcp.AddNode(node, configSource.Configs["Modules"], new Dictionary<RuntimeAddin, IList<int>>()); 111// rmcp.AddNode(node, configSource.Configs["Modules"], new Dictionary<RuntimeAddin, IList<int>>());
@@ -120,9 +120,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
120 int expectedEventCount = 6; 120 int expectedEventCount = 6;
121 121
122 Assert.AreEqual( 122 Assert.AreEqual(
123 expectedEventCount, 123 expectedEventCount,
124 co.Count, 124 co.Count,
125 "Expected {0} events but only got {1} ({2})", 125 "Expected {0} events but only got {1} ({2})",
126 expectedEventCount, co.Count, string.Join(",", co)); 126 expectedEventCount, co.Count, string.Join(",", co));
127 Assert.AreEqual("Initialise", co[0]); 127 Assert.AreEqual("Initialise", co[0]);
128 Assert.AreEqual("PostInitialise", co[1]); 128 Assert.AreEqual("PostInitialise", co[1]);
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
137 { 137 {
138 // FIXME: Should really use MethodInfo 138 // FIXME: Should really use MethodInfo
139 public List<string> CallOrder = new List<string>(); 139 public List<string> CallOrder = new List<string>();
140 140
141 public string Name { get { return "TestSharedRegion"; } } 141 public string Name { get { return "TestSharedRegion"; } }
142 142
143 public Type ReplaceableInterface { get { return null; } } 143 public Type ReplaceableInterface { get { return null; } }
@@ -186,13 +186,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
186 186
187 public void Initialise() {} 187 public void Initialise() {}
188 188
189 public void Initialise(OpenSimBase sim) 189 public void Initialise(OpenSimBase sim)
190 { 190 {
191 m_openSim = sim; 191 m_openSim = sim;
192 } 192 }
193 193
194 /// <summary> 194 /// <summary>
195 /// Called when the application loading is completed 195 /// Called when the application loading is completed
196 /// </summary> 196 /// </summary>
197 public void PostInitialise() 197 public void PostInitialise()
198 { 198 {
@@ -228,8 +228,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
228 } 228 }
229 229
230 scene.RegionModules.Clear(); 230 scene.RegionModules.Clear();
231 } 231 }
232 232
233 public void AddNode(ISharedRegionModule module) 233 public void AddNode(ISharedRegionModule module)
234 { 234 {
235 m_sharedInstances.Add(module); 235 m_sharedInstances.Add(module);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index 33a630c..8273e32 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Tests
55 { 55 {
56 TestHelpers.InMethod(); 56 TestHelpers.InMethod();
57// log4net.Config.XmlConfigurator.Configure(); 57// log4net.Config.XmlConfigurator.Configure();
58 58
59 Scene scene = new SceneHelpers().SetupScene(); 59 Scene scene = new SceneHelpers().SetupScene();
60 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 60 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
61 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 61 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Tests
78 { 78 {
79 TestHelpers.InMethod(); 79 TestHelpers.InMethod();
80// log4net.Config.XmlConfigurator.Configure(); 80// log4net.Config.XmlConfigurator.Configure();
81 81
82 Scene scene = new SceneHelpers().SetupScene(); 82 Scene scene = new SceneHelpers().SetupScene();
83 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 83 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
84 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 84 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Tests
121 { 121 {
122 TestHelpers.InMethod(); 122 TestHelpers.InMethod();
123// log4net.Config.XmlConfigurator.Configure(); 123// log4net.Config.XmlConfigurator.Configure();
124 124
125 Scene scene = new SceneHelpers().SetupScene(); 125 Scene scene = new SceneHelpers().SetupScene();
126 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 126 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
127 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 127 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -130,18 +130,18 @@ namespace OpenSim.Region.Framework.Tests
130 = TaskInventoryHelpers.AddNotecard( 130 = TaskInventoryHelpers.AddNotecard(
131 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 131 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
132 132
133 InventoryFolderBase folder 133 InventoryFolderBase folder
134 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; 134 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0];
135 135
136 // Perform test 136 // Perform test
137 string message; 137 string message;
138 scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID, out message); 138 scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID, out message);
139 139
140 InventoryItemBase ncUserItem 140 InventoryItemBase ncUserItem
141 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); 141 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem");
142 Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); 142 Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found");
143 } 143 }
144 144
145 /// <summary> 145 /// <summary>
146 /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned. 146 /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned.
147 /// </summary> 147 /// </summary>
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Tests
153 { 153 {
154 TestHelpers.InMethod(); 154 TestHelpers.InMethod();
155// log4net.Config.XmlConfigurator.Configure(); 155// log4net.Config.XmlConfigurator.Configure();
156 156
157 Scene scene = new SceneHelpers().SetupScene(); 157 Scene scene = new SceneHelpers().SetupScene();
158 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 158 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
159 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 159 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -162,11 +162,11 @@ namespace OpenSim.Region.Framework.Tests
162 TaskInventoryItem sopItem1 162 TaskInventoryItem sopItem1
163 = TaskInventoryHelpers.AddNotecard( 163 = TaskInventoryHelpers.AddNotecard(
164 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 164 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
165 165
166 // Perform test 166 // Perform test
167 string message; 167 string message;
168 scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID, out message); 168 scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID, out message);
169 169
170 InventoryItemBase ncUserItem 170 InventoryItemBase ncUserItem
171 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); 171 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem");
172 Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); 172 Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found");
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
index 142ad84..58e157c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Tests
113 { 113 {
114 TestHelpers.InMethod(); 114 TestHelpers.InMethod();
115// TestHelpers.EnableLogging(); 115// TestHelpers.EnableLogging();
116 116
117 Scene scene = new SceneHelpers().SetupScene(); 117 Scene scene = new SceneHelpers().SetupScene();
118 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); 118 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001));
119 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); 119 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002));
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
index 937c414..4ceebc1 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
41 { 41 {
42 protected IAssetService m_assetService; 42 protected IAssetService m_assetService;
43 protected UuidGatherer m_uuidGatherer; 43 protected UuidGatherer m_uuidGatherer;
44 44
45 [SetUp] 45 [SetUp]
46 public void Init() 46 public void Init()
47 { 47 {
@@ -55,9 +55,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
55 public void TestCorruptAsset() 55 public void TestCorruptAsset()
56 { 56 {
57 TestHelpers.InMethod(); 57 TestHelpers.InMethod();
58 58
59 UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 59 UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
60 AssetBase corruptAsset 60 AssetBase corruptAsset
61 = AssetHelpers.CreateAsset(corruptAssetUuid, AssetType.Notecard, "CORRUPT ASSET", UUID.Zero); 61 = AssetHelpers.CreateAsset(corruptAssetUuid, AssetType.Notecard, "CORRUPT ASSET", UUID.Zero);
62 m_assetService.Store(corruptAsset); 62 m_assetService.Store(corruptAsset);
63 63
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
67 // We count the uuid as gathered even if the asset itself is corrupt. 67 // We count the uuid as gathered even if the asset itself is corrupt.
68 Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(1)); 68 Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(1));
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Test requests made for non-existent assets while we're gathering 72 /// Test requests made for non-existent assets while we're gathering
73 /// </summary> 73 /// </summary>
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
75 public void TestMissingAsset() 75 public void TestMissingAsset()
76 { 76 {
77 TestHelpers.InMethod(); 77 TestHelpers.InMethod();
78 78
79 UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 79 UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
80 80
81 m_uuidGatherer.AddForInspection(missingAssetUuid); 81 m_uuidGatherer.AddForInspection(missingAssetUuid);
@@ -89,23 +89,23 @@ namespace OpenSim.Region.Framework.Scenes.Tests
89 { 89 {
90 TestHelpers.InMethod(); 90 TestHelpers.InMethod();
91// TestHelpers.EnableLogging(); 91// TestHelpers.EnableLogging();
92 92
93 UUID ownerId = TestHelpers.ParseTail(0x10); 93 UUID ownerId = TestHelpers.ParseTail(0x10);
94 UUID embeddedId = TestHelpers.ParseTail(0x20); 94 UUID embeddedId = TestHelpers.ParseTail(0x20);
95 UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); 95 UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21);
96 UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); 96 UUID missingEmbeddedId = TestHelpers.ParseTail(0x22);
97 UUID ncAssetId = TestHelpers.ParseTail(0x30); 97 UUID ncAssetId = TestHelpers.ParseTail(0x30);
98 98
99 AssetBase ncAsset 99 AssetBase ncAsset
100 = AssetHelpers.CreateNotecardAsset( 100 = AssetHelpers.CreateNotecardAsset(
101 ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); 101 ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId));
102 m_assetService.Store(ncAsset); 102 m_assetService.Store(ncAsset);
103 103
104 AssetBase embeddedAsset 104 AssetBase embeddedAsset
105 = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); 105 = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId));
106 m_assetService.Store(embeddedAsset); 106 m_assetService.Store(embeddedAsset);
107 107
108 AssetBase secondLevelEmbeddedAsset 108 AssetBase secondLevelEmbeddedAsset
109 = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); 109 = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when.");
110 m_assetService.Store(secondLevelEmbeddedAsset); 110 m_assetService.Store(secondLevelEmbeddedAsset);
111 111
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs
index 7bbf1bd..8fff38f 100644
--- a/OpenSim/Region/Framework/Scenes/UndoState.cs
+++ b/OpenSim/Region/Framework/Scenes/UndoState.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Framework.Scenes
46 /// </summary> 46 /// </summary>
47 /// <param name="part"></param> 47 /// <param name="part"></param>
48 /// <param name="change">bit field with what is changed</param> 48 /// <param name="change">bit field with what is changed</param>
49 /// 49 ///
50 public UndoState(SceneObjectPart part, ObjectChangeType change) 50 public UndoState(SceneObjectPart part, ObjectChangeType change)
51 { 51 {
52 data = new ObjectChangeData(); 52 data = new ObjectChangeData();
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes
73 } 73 }
74 } 74 }
75 /// <summary> 75 /// <summary>
76 /// check if undo or redo is too old 76 /// check if undo or redo is too old
77 /// </summary> 77 /// </summary>
78 78
79 public bool checkExpire() 79 public bool checkExpire()
@@ -97,8 +97,8 @@ namespace OpenSim.Region.Framework.Scenes
97 /// </summary> 97 /// </summary>
98 /// <param name="part"></param> 98 /// <param name="part"></param>
99 /// <returns>true what fiels and related data are equal, False otherwise.</returns> 99 /// <returns>true what fiels and related data are equal, False otherwise.</returns>
100 /// 100 ///
101 public bool Compare(SceneObjectPart part, ObjectChangeType change) 101 public bool Compare(SceneObjectPart part, ObjectChangeType change)
102 { 102 {
103 if (data.change != change) // if diferent targets, then they are diferent 103 if (data.change != change) // if diferent targets, then they are diferent
104 return false; 104 return false;
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Framework.Scenes
130 /// executes the undo or redo to a part or its group 130 /// executes the undo or redo to a part or its group
131 /// </summary> 131 /// </summary>
132 /// <param name="part"></param> 132 /// <param name="part"></param>
133 /// 133 ///
134 134
135 public void PlayState(SceneObjectPart part) 135 public void PlayState(SceneObjectPart part)
136 { 136 {
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
140 140
141 if (grp != null) 141 if (grp != null)
142 { 142 {
143 grp.doChangeObject(part, data); 143 grp.doChangeObject(part, data);
144 } 144 }
145 part.Undoing = false; 145 part.Undoing = false;
146 } 146 }
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 37b91d3..93406cb 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes
92 /// <param name="assetService"> 92 /// <param name="assetService">
93 /// Asset service. 93 /// Asset service.
94 /// </param> 94 /// </param>
95 public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {} 95 public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {}
96 96
97 /// <summary> 97 /// <summary>
98 /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class. 98 /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class.
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes
101 /// Asset service. 101 /// Asset service.
102 /// </param> 102 /// </param>
103 /// <param name="collector"> 103 /// <param name="collector">
104 /// Gathered UUIDs will be collected in this dictinaory. 104 /// Gathered UUIDs will be collected in this dictinaory.
105 /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. 105 /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected.
106 /// </param> 106 /// </param>
107 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector) 107 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector)
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Framework.Scenes
128 m_assetUuidsToInspect.Enqueue(uuid); 128 m_assetUuidsToInspect.Enqueue(uuid);
129 return true; 129 return true;
130 } 130 }
131 131
132 /// <summary> 132 /// <summary>
133 /// Gather all the asset uuids associated with a given object. 133 /// Gather all the asset uuids associated with a given object.
134 /// </summary> 134 /// </summary>
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes
194 catch (Exception) 194 catch (Exception)
195 { 195 {
196 m_log.WarnFormat( 196 m_log.WarnFormat(
197 "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.", 197 "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.",
198 part.Name, part.UUID, sceneObject.Name, sceneObject.UUID); 198 part.Name, part.UUID, sceneObject.Name, sceneObject.UUID);
199 } 199 }
200 } 200 }
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Framework.Scenes
205 foreach (TaskInventoryItem tii in taskDictionary.Values) 205 foreach (TaskInventoryItem tii in taskDictionary.Values)
206 { 206 {
207 // m_log.DebugFormat( 207 // m_log.DebugFormat(
208 // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}", 208 // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}",
209 // tii.Name, tii.Type, part.Name, part.UUID); 209 // tii.Name, tii.Type, part.Name, part.UUID);
210 210
211 if (!GatheredUuids.ContainsKey(tii.AssetID)) 211 if (!GatheredUuids.ContainsKey(tii.AssetID))
@@ -214,19 +214,19 @@ namespace OpenSim.Region.Framework.Scenes
214 214
215 // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed 215 // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed
216 // to be called with scene objects that are in a scene (e.g. in the case of hg asset mapping and 216 // to be called with scene objects that are in a scene (e.g. in the case of hg asset mapping and
217 // inventory transfer. There needs to be a way for a module to register a method without assuming a 217 // inventory transfer. There needs to be a way for a module to register a method without assuming a
218 // Scene.EventManager is present. 218 // Scene.EventManager is present.
219 // part.ParentGroup.Scene.EventManager.TriggerGatherUuids(part, assetUuids); 219 // part.ParentGroup.Scene.EventManager.TriggerGatherUuids(part, assetUuids);
220 220
221 221
222 // still needed to retrieve textures used as materials for any parts containing legacy materials stored in DynAttrs 222 // still needed to retrieve textures used as materials for any parts containing legacy materials stored in DynAttrs
223 RecordMaterialsUuids(part); 223 RecordMaterialsUuids(part);
224 } 224 }
225 catch (Exception e) 225 catch (Exception e)
226 { 226 {
227 m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); 227 m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e);
228 m_log.DebugFormat( 228 m_log.DebugFormat(
229 "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)", 229 "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)",
230 part.Shape.TextureEntry.Length); 230 part.Shape.TextureEntry.Length);
231 } 231 }
232 } 232 }
@@ -283,7 +283,7 @@ namespace OpenSim.Region.Framework.Scenes
283 return; 283 return;
284 284
285 try 285 try
286 { 286 {
287 AssetBase assetBase = GetAsset(assetUuid); 287 AssetBase assetBase = GetAsset(assetUuid);
288 288
289 if (null != assetBase) 289 if (null != assetBase)
@@ -322,14 +322,14 @@ namespace OpenSim.Region.Framework.Scenes
322 m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid); 322 m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid);
323 throw; 323 throw;
324 } 324 }
325 } 325 }
326 326
327 private void AddForInspection(UUID assetUuid, sbyte assetType) 327 private void AddForInspection(UUID assetUuid, sbyte assetType)
328 { 328 {
329 // Here, we want to collect uuids which require further asset fetches but mark the others as gathered 329 // Here, we want to collect uuids which require further asset fetches but mark the others as gathered
330 try 330 try
331 { 331 {
332 if ((sbyte)AssetType.Bodypart == assetType 332 if ((sbyte)AssetType.Bodypart == assetType
333 || (sbyte)AssetType.Clothing == assetType 333 || (sbyte)AssetType.Clothing == assetType
334 || (sbyte)AssetType.Gesture == assetType 334 || (sbyte)AssetType.Gesture == assetType
335 || (sbyte)AssetType.Notecard == assetType 335 || (sbyte)AssetType.Notecard == assetType
@@ -347,7 +347,7 @@ namespace OpenSim.Region.Framework.Scenes
347 catch (Exception) 347 catch (Exception)
348 { 348 {
349 m_log.ErrorFormat( 349 m_log.ErrorFormat(
350 "[UUID GATHERER]: Failed to gather uuids for asset id {0}, type {1}", 350 "[UUID GATHERER]: Failed to gather uuids for asset id {0}, type {1}",
351 assetUuid, assetType); 351 assetUuid, assetType);
352 throw; 352 throw;
353 } 353 }
@@ -511,7 +511,7 @@ namespace OpenSim.Region.Framework.Scenes
511 /// </summary> 511 /// </summary>
512 /// <param name="gestureAsset"></param> 512 /// <param name="gestureAsset"></param>
513 private void RecordGestureAssetUuids(AssetBase gestureAsset) 513 private void RecordGestureAssetUuids(AssetBase gestureAsset)
514 { 514 {
515 using (MemoryStream ms = new MemoryStream(gestureAsset.Data)) 515 using (MemoryStream ms = new MemoryStream(gestureAsset.Data))
516 using (StreamReader sr = new StreamReader(ms)) 516 using (StreamReader sr = new StreamReader(ms))
517 { 517 {
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 8b8ebe0..83b534b 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -589,8 +589,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
589 { 589 {
590 return new Dictionary<UUID, ulong>(); 590 return new Dictionary<UUID, ulong>();
591 } 591 }
592 592
593 public void SetGroupPowers(Dictionary<UUID, ulong> powers) { } 593 public void SetGroupPowers(Dictionary<UUID, ulong> powers) { }
594 594
595 public ulong GetGroupPowers(UUID groupID) 595 public ulong GetGroupPowers(UUID groupID)
596 { 596 {
@@ -898,12 +898,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
898 898
899 public void InPacket(object NewPack) 899 public void InPacket(object NewPack)
900 { 900 {
901 901
902 } 902 }
903 903
904 public void ProcessInPacket(Packet NewPack) 904 public void ProcessInPacket(Packet NewPack)
905 { 905 {
906 906
907 } 907 }
908 908
909 public void Close() 909 public void Close()
@@ -953,32 +953,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
953 953
954 public void SendWearables(AvatarWearable[] wearables, int serial) 954 public void SendWearables(AvatarWearable[] wearables, int serial)
955 { 955 {
956 956
957 } 957 }
958 958
959 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) 959 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
960 { 960 {
961 961
962 } 962 }
963 963
964 public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures) 964 public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures)
965 { 965 {
966 966
967 } 967 }
968 968
969 public void SendStartPingCheck(byte seq) 969 public void SendStartPingCheck(byte seq)
970 { 970 {
971 971
972 } 972 }
973 973
974 public void SendKillObject(List<uint> localID) 974 public void SendKillObject(List<uint> localID)
975 { 975 {
976 976
977 } 977 }
978 978
979 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) 979 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
980 { 980 {
981 981
982 } 982 }
983 983
984 public void SendChatMessage( 984 public void SendChatMessage(
@@ -1005,7 +1005,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1005 1005
1006 public void SendGenericMessage(string method, UUID invoice, List<byte[]> message) 1006 public void SendGenericMessage(string method, UUID invoice, List<byte[]> message)
1007 { 1007 {
1008 1008
1009 } 1009 }
1010 1010
1011 public virtual bool CanSendLayerData() 1011 public virtual bool CanSendLayerData()
@@ -1015,32 +1015,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1015 1015
1016 public void SendLayerData(float[] map) 1016 public void SendLayerData(float[] map)
1017 { 1017 {
1018 1018
1019 } 1019 }
1020 1020
1021 public void SendLayerData(int px, int py, float[] map) 1021 public void SendLayerData(int px, int py, float[] map)
1022 { 1022 {
1023 1023
1024 } 1024 }
1025 1025
1026 public void SendWindData(int version, Vector2[] windSpeeds) 1026 public void SendWindData(int version, Vector2[] windSpeeds)
1027 { 1027 {
1028 1028
1029 } 1029 }
1030 1030
1031 public void SendCloudData(int version, float[] cloudCover) 1031 public void SendCloudData(int version, float[] cloudCover)
1032 { 1032 {
1033 1033
1034 } 1034 }
1035 1035
1036 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) 1036 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
1037 { 1037 {
1038 1038
1039 } 1039 }
1040 1040
1041 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) 1041 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
1042 { 1042 {
1043 1043
1044 } 1044 }
1045 1045
1046 public AgentCircuitData RequestClientInfo() 1046 public AgentCircuitData RequestClientInfo()
@@ -1050,32 +1050,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1050 1050
1051 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) 1051 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL)
1052 { 1052 {
1053 1053
1054 } 1054 }
1055 1055
1056 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag) 1056 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
1057 { 1057 {
1058 1058
1059 } 1059 }
1060 1060
1061 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) 1061 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
1062 { 1062 {
1063 1063
1064 } 1064 }
1065 1065
1066 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) 1066 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL)
1067 { 1067 {
1068 1068
1069 } 1069 }
1070 1070
1071 public void SendTeleportFailed(string reason) 1071 public void SendTeleportFailed(string reason)
1072 { 1072 {
1073 1073
1074 } 1074 }
1075 1075
1076 public void SendTeleportStart(uint flags) 1076 public void SendTeleportStart(uint flags)
1077 { 1077 {
1078 1078
1079 } 1079 }
1080 1080
1081 public void SendTeleportProgress(uint flags, string message) 1081 public void SendTeleportProgress(uint flags, string message)
@@ -1084,17 +1084,17 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1084 1084
1085 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) 1085 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item)
1086 { 1086 {
1087 1087
1088 } 1088 }
1089 1089
1090 public void SendPayPrice(UUID objectID, int[] payPrice) 1090 public void SendPayPrice(UUID objectID, int[] payPrice)
1091 { 1091 {
1092 1092
1093 } 1093 }
1094 1094
1095 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) 1095 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
1096 { 1096 {
1097 1097
1098 } 1098 }
1099 1099
1100 public void SendAvatarDataImmediate(ISceneEntity avatar) 1100 public void SendAvatarDataImmediate(ISceneEntity avatar)
@@ -1119,12 +1119,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1119 1119
1120 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) 1120 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems)
1121 { 1121 {
1122 1122
1123 } 1123 }
1124 1124
1125 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) 1125 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
1126 { 1126 {
1127 1127
1128 } 1128 }
1129 1129
1130 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) 1130 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
@@ -1139,72 +1139,72 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1139 1139
1140 public void SendRemoveInventoryItem(UUID itemID) 1140 public void SendRemoveInventoryItem(UUID itemID)
1141 { 1141 {
1142 1142
1143 } 1143 }
1144 1144
1145 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) 1145 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
1146 { 1146 {
1147 1147
1148 } 1148 }
1149 1149
1150 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) 1150 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
1151 { 1151 {
1152 1152
1153 } 1153 }
1154 1154
1155 public void SendBulkUpdateInventory(InventoryNodeBase node) 1155 public void SendBulkUpdateInventory(InventoryNodeBase node)
1156 { 1156 {
1157 1157
1158 } 1158 }
1159 1159
1160 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) 1160 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
1161 { 1161 {
1162 1162
1163 } 1163 }
1164 1164
1165 public void SendAbortXferPacket(ulong xferID) 1165 public void SendAbortXferPacket(ulong xferID)
1166 { 1166 {
1167 1167
1168 } 1168 }
1169 1169
1170 public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) 1170 public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
1171 { 1171 {
1172 1172
1173 } 1173 }
1174 1174
1175 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) 1175 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
1176 { 1176 {
1177 1177
1178 } 1178 }
1179 1179
1180 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 1180 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
1181 { 1181 {
1182 1182
1183 } 1183 }
1184 1184
1185 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) 1185 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
1186 { 1186 {
1187 1187
1188 } 1188 }
1189 1189
1190 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) 1190 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
1191 { 1191 {
1192 1192
1193 } 1193 }
1194 1194
1195 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) 1195 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
1196 { 1196 {
1197 1197
1198 } 1198 }
1199 1199
1200 public void SendAttachedSoundGainChange(UUID objectID, float gain) 1200 public void SendAttachedSoundGainChange(UUID objectID, float gain)
1201 { 1201 {
1202 1202
1203 } 1203 }
1204 1204
1205 public void SendNameReply(UUID profileId, string firstname, string lastname) 1205 public void SendNameReply(UUID profileId, string firstname, string lastname)
1206 { 1206 {
1207 1207
1208 } 1208 }
1209 1209
1210 public void SendAlertMessage(string message) 1210 public void SendAlertMessage(string message)
@@ -1214,12 +1214,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1214 1214
1215 public void SendAgentAlertMessage(string message, bool modal) 1215 public void SendAgentAlertMessage(string message, bool modal)
1216 { 1216 {
1217 1217
1218 } 1218 }
1219 1219
1220 public void SendAlertMessage(string message, string info) 1220 public void SendAlertMessage(string message, string info)
1221 { 1221 {
1222 1222
1223 } 1223 }
1224 1224
1225 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) 1225 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
@@ -1229,77 +1229,77 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1229 1229
1230 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 1230 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
1231 { 1231 {
1232 1232
1233 } 1233 }
1234 1234
1235 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) 1235 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
1236 { 1236 {
1237 1237
1238 } 1238 }
1239 1239
1240 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 1240 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
1241 { 1241 {
1242 1242
1243 } 1243 }
1244 1244
1245 public void SendViewerTime(int phase) 1245 public void SendViewerTime(int phase)
1246 { 1246 {
1247 1247
1248 } 1248 }
1249 1249
1250 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) 1250 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
1251 { 1251 {
1252 1252
1253 } 1253 }
1254 1254
1255 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) 1255 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
1256 { 1256 {
1257 1257
1258 } 1258 }
1259 1259
1260 public void SendHealth(float health) 1260 public void SendHealth(float health)
1261 { 1261 {
1262 1262
1263 } 1263 }
1264 1264
1265 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) 1265 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
1266 { 1266 {
1267 1267
1268 } 1268 }
1269 1269
1270 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) 1270 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
1271 { 1271 {
1272 1272
1273 } 1273 }
1274 1274
1275 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 1275 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
1276 { 1276 {
1277 1277
1278 } 1278 }
1279 1279
1280 public void SendEstateCovenantInformation(UUID covenant) 1280 public void SendEstateCovenantInformation(UUID covenant)
1281 { 1281 {
1282 1282
1283 } 1283 }
1284 1284
1285 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) 1285 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner)
1286 { 1286 {
1287 1287
1288 } 1288 }
1289 1289
1290 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 1290 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
1291 { 1291 {
1292 1292
1293 } 1293 }
1294 1294
1295 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID) 1295 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)
1296 { 1296 {
1297 1297
1298 } 1298 }
1299 1299
1300 public void SendForceClientSelectObjects(List<uint> objectIDs) 1300 public void SendForceClientSelectObjects(List<uint> objectIDs)
1301 { 1301 {
1302 1302
1303 } 1303 }
1304 1304
1305 public void SendCameraConstraint(Vector4 ConstraintPlane) 1305 public void SendCameraConstraint(Vector4 ConstraintPlane)
@@ -1309,57 +1309,57 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1309 1309
1310 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount) 1310 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
1311 { 1311 {
1312 1312
1313 } 1313 }
1314 1314
1315 public void SendLandParcelOverlay(byte[] data, int sequence_id) 1315 public void SendLandParcelOverlay(byte[] data, int sequence_id)
1316 { 1316 {
1317 1317
1318 } 1318 }
1319 1319
1320 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) 1320 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
1321 { 1321 {
1322 1322
1323 } 1323 }
1324 1324
1325 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) 1325 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
1326 { 1326 {
1327 1327
1328 } 1328 }
1329 1329
1330 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 1330 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
1331 { 1331 {
1332 1332
1333 } 1333 }
1334 1334
1335 public void SendConfirmXfer(ulong xferID, uint PacketID) 1335 public void SendConfirmXfer(ulong xferID, uint PacketID)
1336 { 1336 {
1337 1337
1338 } 1338 }
1339 1339
1340 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) 1340 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
1341 { 1341 {
1342 1342
1343 } 1343 }
1344 1344
1345 public void SendInitiateDownload(string simFileName, string clientFileName) 1345 public void SendInitiateDownload(string simFileName, string clientFileName)
1346 { 1346 {
1347 1347
1348 } 1348 }
1349 1349
1350 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 1350 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
1351 { 1351 {
1352 1352
1353 } 1353 }
1354 1354
1355 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 1355 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
1356 { 1356 {
1357 1357
1358 } 1358 }
1359 1359
1360 public void SendImageNotFound(UUID imageid) 1360 public void SendImageNotFound(UUID imageid)
1361 { 1361 {
1362 1362
1363 } 1363 }
1364 1364
1365 public void SendShutdownConnectionNotice() 1365 public void SendShutdownConnectionNotice()
@@ -1369,12 +1369,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1369 1369
1370 public void SendSimStats(SimStats stats) 1370 public void SendSimStats(SimStats stats)
1371 { 1371 {
1372 1372
1373 } 1373 }
1374 1374
1375 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) 1375 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
1376 { 1376 {
1377 1377
1378 } 1378 }
1379 1379
1380 public void SendObjectPropertiesReply(ISceneEntity entity) 1380 public void SendObjectPropertiesReply(ISceneEntity entity)
@@ -1383,12 +1383,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1383 1383
1384 public void SendAgentOffline(UUID[] agentIDs) 1384 public void SendAgentOffline(UUID[] agentIDs)
1385 { 1385 {
1386 1386
1387 } 1387 }
1388 1388
1389 public void SendAgentOnline(UUID[] agentIDs) 1389 public void SendAgentOnline(UUID[] agentIDs)
1390 { 1390 {
1391 1391
1392 } 1392 }
1393 1393
1394 public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) 1394 public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY)
@@ -1397,62 +1397,62 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1397 1397
1398 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 1398 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
1399 { 1399 {
1400 1400
1401 } 1401 }
1402 1402
1403 public void SendAdminResponse(UUID Token, uint AdminLevel) 1403 public void SendAdminResponse(UUID Token, uint AdminLevel)
1404 { 1404 {
1405 1405
1406 } 1406 }
1407 1407
1408 public void SendGroupMembership(GroupMembershipData[] GroupMembership) 1408 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
1409 { 1409 {
1410 1410
1411 } 1411 }
1412 1412
1413 public void SendGroupNameReply(UUID groupLLUID, string GroupName) 1413 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
1414 { 1414 {
1415 1415
1416 } 1416 }
1417 1417
1418 public void SendJoinGroupReply(UUID groupID, bool success) 1418 public void SendJoinGroupReply(UUID groupID, bool success)
1419 { 1419 {
1420 1420
1421 } 1421 }
1422 1422
1423 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) 1423 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
1424 { 1424 {
1425 1425
1426 } 1426 }
1427 1427
1428 public void SendLeaveGroupReply(UUID groupID, bool success) 1428 public void SendLeaveGroupReply(UUID groupID, bool success)
1429 { 1429 {
1430 1430
1431 } 1431 }
1432 1432
1433 public void SendCreateGroupReply(UUID groupID, bool success, string message) 1433 public void SendCreateGroupReply(UUID groupID, bool success, string message)
1434 { 1434 {
1435 1435
1436 } 1436 }
1437 1437
1438 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) 1438 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
1439 { 1439 {
1440 1440
1441 } 1441 }
1442 1442
1443 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) 1443 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
1444 { 1444 {
1445 1445
1446 } 1446 }
1447 1447
1448 public void SendAsset(AssetRequestToClient req) 1448 public void SendAsset(AssetRequestToClient req)
1449 { 1449 {
1450 1450
1451 } 1451 }
1452 1452
1453 public void SendTexture(AssetBase TextureAsset) 1453 public void SendTexture(AssetBase TextureAsset)
1454 { 1454 {
1455 1455
1456 } 1456 }
1457 1457
1458 public virtual void SetChildAgentThrottle(byte[] throttle) 1458 public virtual void SetChildAgentThrottle(byte[] throttle)
@@ -1467,7 +1467,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1467 1467
1468 public void SetAgentThrottleSilent(int throttle, int setting) 1468 public void SetAgentThrottleSilent(int throttle, int setting)
1469 { 1469 {
1470 1470
1471 1471
1472 } 1472 }
1473 public byte[] GetThrottlesPacked(float multiplier) 1473 public byte[] GetThrottlesPacked(float multiplier)
@@ -1498,12 +1498,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1498 1498
1499 public void SetClientInfo(ClientInfo info) 1499 public void SetClientInfo(ClientInfo info)
1500 { 1500 {
1501 1501
1502 } 1502 }
1503 1503
1504 public void SetClientOption(string option, string value) 1504 public void SetClientOption(string option, string value)
1505 { 1505 {
1506 1506
1507 } 1507 }
1508 1508
1509 public string GetClientOption(string option) 1509 public string GetClientOption(string option)
@@ -1518,67 +1518,67 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1518 1518
1519 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters) 1519 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
1520 { 1520 {
1521 1521
1522 } 1522 }
1523 1523
1524 public void SendClearFollowCamProperties(UUID objectID) 1524 public void SendClearFollowCamProperties(UUID objectID)
1525 { 1525 {
1526 1526
1527 } 1527 }
1528 1528
1529 public void SendRegionHandle(UUID regoinID, ulong handle) 1529 public void SendRegionHandle(UUID regoinID, ulong handle)
1530 { 1530 {
1531 1531
1532 } 1532 }
1533 1533
1534 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) 1534 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
1535 { 1535 {
1536 1536
1537 } 1537 }
1538 1538
1539 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) 1539 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
1540 { 1540 {
1541 1541
1542 } 1542 }
1543 1543
1544 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) 1544 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
1545 { 1545 {
1546 1546
1547 } 1547 }
1548 1548
1549 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) 1549 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
1550 { 1550 {
1551 1551
1552 } 1552 }
1553 1553
1554 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) 1554 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
1555 { 1555 {
1556 1556
1557 } 1557 }
1558 1558
1559 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) 1559 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
1560 { 1560 {
1561 1561
1562 } 1562 }
1563 1563
1564 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) 1564 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
1565 { 1565 {
1566 1566
1567 } 1567 }
1568 1568
1569 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) 1569 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
1570 { 1570 {
1571 1571
1572 } 1572 }
1573 1573
1574 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) 1574 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
1575 { 1575 {
1576 1576
1577 } 1577 }
1578 1578
1579 public void SendEventInfoReply(EventData info) 1579 public void SendEventInfoReply(EventData info)
1580 { 1580 {
1581 1581
1582 } 1582 }
1583 1583
1584 public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint) 1584 public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint)
@@ -1588,7 +1588,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1588 1588
1589 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 1589 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
1590 { 1590 {
1591 1591
1592 } 1592 }
1593 1593
1594 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) 1594 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
@@ -1603,78 +1603,78 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1603 1603
1604 public void SendOfferCallingCard(UUID srcID, UUID transactionID) 1604 public void SendOfferCallingCard(UUID srcID, UUID transactionID)
1605 { 1605 {
1606 1606
1607 } 1607 }
1608 1608
1609 public void SendAcceptCallingCard(UUID transactionID) 1609 public void SendAcceptCallingCard(UUID transactionID)
1610 { 1610 {
1611 1611
1612 } 1612 }
1613 1613
1614 public void SendDeclineCallingCard(UUID transactionID) 1614 public void SendDeclineCallingCard(UUID transactionID)
1615 { 1615 {
1616 1616
1617 } 1617 }
1618 1618
1619 public void SendTerminateFriend(UUID exFriendID) 1619 public void SendTerminateFriend(UUID exFriendID)
1620 { 1620 {
1621 1621
1622 } 1622 }
1623 1623
1624 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) 1624 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
1625 { 1625 {
1626 1626
1627 } 1627 }
1628 1628
1629 public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) 1629 public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price)
1630 { 1630 {
1631 1631
1632 } 1632 }
1633 1633
1634 public void SendAgentDropGroup(UUID groupID) 1634 public void SendAgentDropGroup(UUID groupID)
1635 { 1635 {
1636 1636
1637 } 1637 }
1638 1638
1639 public void RefreshGroupMembership() 1639 public void RefreshGroupMembership()
1640 { 1640 {
1641 1641
1642 } 1642 }
1643 1643
1644 public void UpdateGroupMembership(GroupMembershipData[] data) 1644 public void UpdateGroupMembership(GroupMembershipData[] data)
1645 { 1645 {
1646 1646
1647 } 1647 }
1648 1648
1649 public void GroupMembershipRemove(UUID GroupID) 1649 public void GroupMembershipRemove(UUID GroupID)
1650 { 1650 {
1651 1651
1652 } 1652 }
1653 1653
1654 public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers) 1654 public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
1655 { 1655 {
1656 1656
1657 } 1657 }
1658 1658
1659 1659
1660 public void SendAvatarNotesReply(UUID targetID, string text) 1660 public void SendAvatarNotesReply(UUID targetID, string text)
1661 { 1661 {
1662 1662
1663 } 1663 }
1664 1664
1665 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks) 1665 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
1666 { 1666 {
1667 1667
1668 } 1668 }
1669 1669
1670 public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) 1670 public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled)
1671 { 1671 {
1672 1672
1673 } 1673 }
1674 1674
1675 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds) 1675 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
1676 { 1676 {
1677 1677
1678 } 1678 }
1679 1679
1680 public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages) 1680 public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages)
@@ -1684,22 +1684,22 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1684 1684
1685 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) 1685 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
1686 { 1686 {
1687 1687
1688 } 1688 }
1689 1689
1690 public void SendUserInfoReply(bool imViaEmail, bool visible, string email) 1690 public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
1691 { 1691 {
1692 1692
1693 } 1693 }
1694 1694
1695 public void SendUseCachedMuteList() 1695 public void SendUseCachedMuteList()
1696 { 1696 {
1697 1697
1698 } 1698 }
1699 1699
1700 public void SendMuteListUpdate(string filename) 1700 public void SendMuteListUpdate(string filename)
1701 { 1701 {
1702 1702
1703 } 1703 }
1704 1704
1705 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) 1705 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
@@ -1716,15 +1716,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1716 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) 1716 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1717 { 1717 {
1718 } 1718 }
1719 1719
1720 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) 1720 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1721 { 1721 {
1722 } 1722 }
1723 1723
1724 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) 1724 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1725 { 1725 {
1726 } 1726 }
1727 1727
1728 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) 1728 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1729 { 1729 {
1730 } 1730 }
@@ -1748,7 +1748,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1748 public void SendAgentTerseUpdate(ISceneEntity presence) 1748 public void SendAgentTerseUpdate(ISceneEntity presence)
1749 { 1749 {
1750 } 1750 }
1751 1751
1752 public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) 1752 public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
1753 { 1753 {
1754 } 1754 }
diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
index c897aa5..e93fcdc 100644
--- a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
@@ -54,36 +54,36 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
56 private Scene m_scene; 56 private Scene m_scene;
57 57
58 public string Name { get { return "Asset Information Module"; } } 58 public string Name { get { return "Asset Information Module"; } }
59 59
60 public Type ReplaceableInterface { get { return null; } } 60 public Type ReplaceableInterface { get { return null; } }
61 61
62 public void Initialise(IConfigSource source) 62 public void Initialise(IConfigSource source)
63 { 63 {
64// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: INITIALIZED MODULE"); 64// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: INITIALIZED MODULE");
65 } 65 }
66 66
67 public void PostInitialise() 67 public void PostInitialise()
68 { 68 {
69// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: POST INITIALIZED MODULE"); 69// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: POST INITIALIZED MODULE");
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: CLOSED MODULE"); 74// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: CLOSED MODULE");
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 79// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
80 } 80 }
81 81
82 public void RemoveRegion(Scene scene) 82 public void RemoveRegion(Scene scene)
83 { 83 {
84// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 84// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
85 } 85 }
86 86
87 public void RegionLoaded(Scene scene) 87 public void RegionLoaded(Scene scene)
88 { 88 {
89// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 89// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -117,10 +117,10 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
117 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); 117 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
118 return; 118 return;
119 } 119 }
120 120
121 AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); 121 AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
122 if (asset == null) 122 if (asset == null)
123 { 123 {
124 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); 124 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
125 return; 125 return;
126 } 126 }
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 071530b..3be5a07 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -52,48 +52,48 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
52 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] 52 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")]
53 public class LindenUDPInfoModule : ISharedRegionModule 53 public class LindenUDPInfoModule : ISharedRegionModule
54 { 54 {
55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 57 protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
58 58
59 public string Name { get { return "Linden UDP Module"; } } 59 public string Name { get { return "Linden UDP Module"; } }
60 60
61 public Type ReplaceableInterface { get { return null; } } 61 public Type ReplaceableInterface { get { return null; } }
62 62
63 public void Initialise(IConfigSource source) 63 public void Initialise(IConfigSource source)
64 { 64 {
65// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE"); 65// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE");
66 } 66 }
67 67
68 public void PostInitialise() 68 public void PostInitialise()
69 { 69 {
70// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE"); 70// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE");
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE"); 75// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE");
76 } 76 }
77 77
78 public void AddRegion(Scene scene) 78 public void AddRegion(Scene scene)
79 { 79 {
80// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 80// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
81 81
82 lock (m_scenes) 82 lock (m_scenes)
83 m_scenes[scene.RegionInfo.RegionID] = scene; 83 m_scenes[scene.RegionInfo.RegionID] = scene;
84 84
85 scene.AddCommand( 85 scene.AddCommand(
86 "Comms", this, "show pqueues", 86 "Comms", this, "show pqueues",
87 "show pqueues [full]", 87 "show pqueues [full]",
88 "Show priority queue data for each client", 88 "Show priority queue data for each client",
89 "Without the 'full' option, only root agents are shown." 89 "Without the 'full' option, only root agents are shown."
90 + " With the 'full' option child agents are also shown.", 90 + " With the 'full' option child agents are also shown.",
91 (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); 91 (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd)));
92 92
93 scene.AddCommand( 93 scene.AddCommand(
94 "Comms", this, "show queues", 94 "Comms", this, "show queues",
95 "show queues [full]", 95 "show queues [full]",
96 "Show queue data for each client", 96 "Show queue data for each client",
97 "Without the 'full' option, only root agents are shown.\n" 97 "Without the 'full' option, only root agents are shown.\n"
98 + "With the 'full' option child agents are also shown.\n\n" 98 + "With the 'full' option child agents are also shown.\n\n"
99 + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n" 99 + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n"
@@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
116 "clear image queues <first-name> <last-name>", 116 "clear image queues <first-name> <last-name>",
117 "Clear the image queues (textures downloaded via UDP) for a particular client.", 117 "Clear the image queues (textures downloaded via UDP) for a particular client.",
118 (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); 118 (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd)));
119 119
120 scene.AddCommand( 120 scene.AddCommand(
121 "Comms", this, "show throttles", 121 "Comms", this, "show throttles",
122 "show throttles [full]", 122 "show throttles [full]",
123 "Show throttle settings for each client and for the server overall", 123 "Show throttle settings for each client and for the server overall",
124 "Without the 'full' option, only root agents are shown." 124 "Without the 'full' option, only root agents are shown."
125 + " With the 'full' option child agents are also shown.", 125 + " With the 'full' option child agents are also shown.",
126 (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); 126 (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd)));
127 127
128 scene.AddCommand( 128 scene.AddCommand(
@@ -134,15 +134,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
134 (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); 134 (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd)));
135 135
136 } 136 }
137 137
138 public void RemoveRegion(Scene scene) 138 public void RemoveRegion(Scene scene)
139 { 139 {
140// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 140// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
141 141
142 lock (m_scenes) 142 lock (m_scenes)
143 m_scenes.Remove(scene.RegionInfo.RegionID); 143 m_scenes.Remove(scene.RegionInfo.RegionID);
144 } 144 }
145 145
146 public void RegionLoaded(Scene scene) 146 public void RegionLoaded(Scene scene)
147 { 147 {
148// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 148// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
176 foreach (ScenePresence agent in foundAgents) 176 foreach (ScenePresence agent in foundAgents)
177 { 177 {
178 LLClientView client = agent.ControllingClient as LLClientView; 178 LLClientView client = agent.ControllingClient as LLClientView;
179 179
180 if (client == null) 180 if (client == null)
181 return "This command is only supported for LLClientView"; 181 return "This command is only supported for LLClientView";
182 182
@@ -191,10 +191,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
191 } 191 }
192 192
193 protected string GetColumnEntry(string entry, int maxLength, int columnPadding) 193 protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
194 { 194 {
195 return string.Format( 195 return string.Format(
196 "{0,-" + maxLength + "}{1,-" + columnPadding + "}", 196 "{0,-" + maxLength + "}{1,-" + columnPadding + "}",
197 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, 197 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry,
198 ""); 198 "");
199 } 199 }
200 200
@@ -207,29 +207,29 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
207 { 207 {
208 bool showChildren = false; 208 bool showChildren = false;
209 string pname = ""; 209 string pname = "";
210 210
211 if (showParams.Length > 2 && showParams[2] == "full") 211 if (showParams.Length > 2 && showParams[2] == "full")
212 showChildren = true; 212 showChildren = true;
213 else if (showParams.Length > 3) 213 else if (showParams.Length > 3)
214 pname = showParams[2] + " " + showParams[3]; 214 pname = showParams[2] + " " + showParams[3];
215 215
216 StringBuilder report = new StringBuilder(); 216 StringBuilder report = new StringBuilder();
217 217
218 int columnPadding = 2; 218 int columnPadding = 2;
219 int maxNameLength = 18; 219 int maxNameLength = 18;
220 int maxRegionNameLength = 14; 220 int maxRegionNameLength = 14;
221 int maxTypeLength = 4; 221 int maxTypeLength = 4;
222// int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; 222// int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
223 223
224 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 224 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
225 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 225 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
226 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 226 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
227 227
228 report.AppendFormat( 228 report.AppendFormat(
229 "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n", 229 "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n",
230 "Pri 0", 230 "Pri 0",
231 "Pri 1", 231 "Pri 1",
232 "Pri 2", 232 "Pri 2",
233 "Pri 3", 233 "Pri 3",
234 "Pri 4", 234 "Pri 4",
235 "Pri 5", 235 "Pri 5",
@@ -252,16 +252,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
252 bool isChild = client.SceneAgent.IsChildAgent; 252 bool isChild = client.SceneAgent.IsChildAgent;
253 if (isChild && !showChildren) 253 if (isChild && !showChildren)
254 return; 254 return;
255 255
256 string name = client.Name; 256 string name = client.Name;
257 if (pname != "" && name != pname) 257 if (pname != "" && name != pname)
258 return; 258 return;
259 259
260 string regionName = scene.RegionInfo.RegionName; 260 string regionName = scene.RegionInfo.RegionName;
261 261
262 report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); 262 report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
263 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 263 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
264 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 264 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
265 report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); 265 report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString());
266 } 266 }
267 }); 267 });
@@ -306,17 +306,17 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
306 foreach (ScenePresence agent in foundAgents) 306 foreach (ScenePresence agent in foundAgents)
307 { 307 {
308 LLClientView client = agent.ControllingClient as LLClientView; 308 LLClientView client = agent.ControllingClient as LLClientView;
309 309
310 if (client == null) 310 if (client == null)
311 return "This command is only supported for LLClientView"; 311 return "This command is only supported for LLClientView";
312 312
313 J2KImage[] images = client.ImageManager.GetImages(); 313 J2KImage[] images = client.ImageManager.GetImages();
314 314
315 report.AppendFormat( 315 report.AppendFormat(
316 "In region {0} ({1} agent)\n", 316 "In region {0} ({1} agent)\n",
317 agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root"); 317 agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root");
318 report.AppendFormat("Images in queue: {0}\n", images.Length); 318 report.AppendFormat("Images in queue: {0}\n", images.Length);
319 319
320 if (images.Length > 0) 320 if (images.Length > 0)
321 { 321 {
322 report.AppendFormat( 322 report.AppendFormat(
@@ -327,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
327 "Start Pkt", 327 "Start Pkt",
328 "Has Asset", 328 "Has Asset",
329 "Decoded"); 329 "Decoded");
330 330
331 foreach (J2KImage image in images) 331 foreach (J2KImage image in images)
332 report.AppendFormat( 332 report.AppendFormat(
333 "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n", 333 "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n",
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
337 337
338 return report.ToString(); 338 return report.ToString();
339 } 339 }
340 340
341 /// <summary> 341 /// <summary>
342 /// Generate UDP Queue data report for each client 342 /// Generate UDP Queue data report for each client
343 /// </summary> 343 /// </summary>
@@ -347,16 +347,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
347 { 347 {
348 bool showChildren = false; 348 bool showChildren = false;
349 string pname = ""; 349 string pname = "";
350 350
351 if (showParams.Length > 2 && showParams[2] == "full") 351 if (showParams.Length > 2 && showParams[2] == "full")
352 showChildren = true; 352 showChildren = true;
353 else if (showParams.Length > 3) 353 else if (showParams.Length > 3)
354 pname = showParams[2] + " " + showParams[3]; 354 pname = showParams[2] + " " + showParams[3];
355 355
356 StringBuilder report = new StringBuilder(); 356 StringBuilder report = new StringBuilder();
357 357
358 int columnPadding = 2; 358 int columnPadding = 2;
359 int maxNameLength = 18; 359 int maxNameLength = 18;
360 int maxRegionNameLength = 14; 360 int maxRegionNameLength = 14;
361 int maxTypeLength = 4; 361 int maxTypeLength = 4;
362 362
@@ -364,11 +364,11 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
364 = maxNameLength + columnPadding 364 = maxNameLength + columnPadding
365 + maxRegionNameLength + columnPadding 365 + maxRegionNameLength + columnPadding
366 + maxTypeLength + columnPadding; 366 + maxTypeLength + columnPadding;
367 367
368 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 368 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
369 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 369 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
370 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 370 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
371 371
372 report.AppendFormat( 372 report.AppendFormat(
373 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", 373 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n",
374 "Since", 374 "Since",
@@ -383,7 +383,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
383 "Q Pkts", 383 "Q Pkts",
384 "Q Pkts", 384 "Q Pkts",
385 "Q Pkts"); 385 "Q Pkts");
386 386
387 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); 387 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
388 report.AppendFormat( 388 report.AppendFormat(
389 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", 389 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n",
@@ -398,8 +398,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
398 "Cloud", 398 "Cloud",
399 "Task", 399 "Task",
400 "Texture", 400 "Texture",
401 "Asset"); 401 "Asset");
402 402
403 lock (m_scenes) 403 lock (m_scenes)
404 { 404 {
405 foreach (Scene scene in m_scenes.Values) 405 foreach (Scene scene in m_scenes.Values)
@@ -413,7 +413,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
413 bool isChild = client.SceneAgent.IsChildAgent; 413 bool isChild = client.SceneAgent.IsChildAgent;
414 if (isChild && !showChildren) 414 if (isChild && !showChildren)
415 return; 415 return;
416 416
417 string name = client.Name; 417 string name = client.Name;
418 if (pname != "" && name != pname) 418 if (pname != "" && name != pname)
419 return; 419 return;
@@ -424,7 +424,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
424 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 424 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
425 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 425 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
426 426
427 IStatsCollector stats = (IStatsCollector)client; 427 IStatsCollector stats = (IStatsCollector)client;
428 report.AppendLine(stats.Report()); 428 report.AppendLine(stats.Report());
429 } 429 }
430 }); 430 });
@@ -432,8 +432,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
432 } 432 }
433 433
434 return report.ToString(); 434 return report.ToString();
435 } 435 }
436 436
437 /// <summary> 437 /// <summary>
438 /// Show throttle data 438 /// Show throttle data
439 /// </summary> 439 /// </summary>
@@ -443,28 +443,28 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
443 { 443 {
444 bool showChildren = false; 444 bool showChildren = false;
445 string pname = ""; 445 string pname = "";
446 446
447 if (showParams.Length > 2 && showParams[2] == "full") 447 if (showParams.Length > 2 && showParams[2] == "full")
448 showChildren = true; 448 showChildren = true;
449 else if (showParams.Length > 3) 449 else if (showParams.Length > 3)
450 pname = showParams[2] + " " + showParams[3]; 450 pname = showParams[2] + " " + showParams[3];
451 451
452 StringBuilder report = new StringBuilder(); 452 StringBuilder report = new StringBuilder();
453 453
454 int columnPadding = 2; 454 int columnPadding = 2;
455 int maxNameLength = 18; 455 int maxNameLength = 18;
456 int maxRegionNameLength = 14; 456 int maxRegionNameLength = 14;
457 int maxTypeLength = 4; 457 int maxTypeLength = 4;
458 int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; 458 int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
459 459
460 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 460 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
461 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 461 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
462 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 462 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
463 463
464 report.AppendFormat( 464 report.AppendFormat(
465 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", 465 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n",
466 "Max", 466 "Max",
467 "Target", 467 "Target",
468 "Actual", 468 "Actual",
469 "Resend", 469 "Resend",
470 "Land", 470 "Land",
@@ -472,8 +472,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
472 "Cloud", 472 "Cloud",
473 "Task", 473 "Task",
474 "Texture", 474 "Texture",
475 "Asset"); 475 "Asset");
476 476
477 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); 477 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
478 report.AppendFormat( 478 report.AppendFormat(
479 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", 479 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n",
@@ -486,10 +486,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
486 "kb/s", 486 "kb/s",
487 "kb/s", 487 "kb/s",
488 "kb/s", 488 "kb/s",
489 "kb/s"); 489 "kb/s");
490 490
491 report.AppendLine(); 491 report.AppendLine();
492 492
493 lock (m_scenes) 493 lock (m_scenes)
494 { 494 {
495 foreach (Scene scene in m_scenes.Values) 495 foreach (Scene scene in m_scenes.Values)
@@ -504,25 +504,25 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
504 bool isChild = client.SceneAgent.IsChildAgent; 504 bool isChild = client.SceneAgent.IsChildAgent;
505 if (isChild && !showChildren) 505 if (isChild && !showChildren)
506 return; 506 return;
507 507
508 string name = client.Name; 508 string name = client.Name;
509 if (pname != "" && name != pname) 509 if (pname != "" && name != pname)
510 return; 510 return;
511 511
512 string regionName = scene.RegionInfo.RegionName; 512 string regionName = scene.RegionInfo.RegionName;
513 513
514 LLUDPClient llUdpClient = llClient.UDPClient; 514 LLUDPClient llUdpClient = llClient.UDPClient;
515 ClientInfo ci = llUdpClient.GetClientInfo(); 515 ClientInfo ci = llUdpClient.GetClientInfo();
516 516
517 report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); 517 report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
518 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 518 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
519 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 519 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
520 520
521 report.AppendFormat( 521 report.AppendFormat(
522 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", 522 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n",
523 ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-", 523 ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-",
524 llUdpClient.FlowThrottle.AdaptiveEnabled 524 llUdpClient.FlowThrottle.AdaptiveEnabled
525 ? ((ci.targetThrottle * 8) / 1000).ToString() 525 ? ((ci.targetThrottle * 8) / 1000).ToString()
526 : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(), 526 : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(),
527 (ci.totalThrottle * 8) / 1000, 527 (ci.totalThrottle * 8) / 1000,
528 (ci.resendThrottle * 8) / 1000, 528 (ci.resendThrottle * 8) / 1000,
@@ -538,7 +538,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
538 } 538 }
539 539
540 return report.ToString(); 540 return report.ToString();
541 } 541 }
542 542
543 /// <summary> 543 /// <summary>
544 /// Show client stats data 544 /// Show client stats data
@@ -568,20 +568,20 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
568 string childAgentStatus; 568 string childAgentStatus;
569 569
570 if (llClient.SceneAgent != null) 570 if (llClient.SceneAgent != null)
571 childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; 571 childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y";
572 else 572 else
573 childAgentStatus = "Off!"; 573 childAgentStatus = "Off!";
574 574
575 m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", 575 m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}",
576 scene.RegionInfo.RegionName, llClient.Name, 576 scene.RegionInfo.RegionName, llClient.Name,
577 childAgentStatus, 577 childAgentStatus,
578 (DateTime.Now - cinfo.StartedTime).Minutes, 578 (DateTime.Now - cinfo.StartedTime).Minutes,
579 avg_reqs, 579 avg_reqs,
580 string.Format( 580 string.Format(
581 "{0} ({1:0.00}%)", 581 "{0} ({1:0.00}%)",
582 llClient.TotalAgentUpdates, 582 llClient.TotalAgentUpdates,
583 cinfo.SyncRequests.ContainsKey("AgentUpdate") 583 cinfo.SyncRequests.ContainsKey("AgentUpdate")
584 ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 584 ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100
585 : 0)); 585 : 0));
586 } 586 }
587 }); 587 });
diff --git a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs
index 7639c6c..906e1ee 100644
--- a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs
@@ -50,36 +50,36 @@ namespace OpenSim.Region.OptionalModules.Asset
50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private Scene m_scene; 52 private Scene m_scene;
53 53
54 public string Name { get { return "Asset Information Module"; } } 54 public string Name { get { return "Asset Information Module"; } }
55 55
56 public Type ReplaceableInterface { get { return null; } } 56 public Type ReplaceableInterface { get { return null; } }
57 57
58 public void Initialise(IConfigSource source) 58 public void Initialise(IConfigSource source)
59 { 59 {
60// m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE"); 60// m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE");
61 } 61 }
62 62
63 public void PostInitialise() 63 public void PostInitialise()
64 { 64 {
65// m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE"); 65// m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE");
66 } 66 }
67 67
68 public void Close() 68 public void Close()
69 { 69 {
70// m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE"); 70// m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE");
71 } 71 }
72 72
73 public void AddRegion(Scene scene) 73 public void AddRegion(Scene scene)
74 { 74 {
75// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 75// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
76 } 76 }
77 77
78 public void RemoveRegion(Scene scene) 78 public void RemoveRegion(Scene scene)
79 { 79 {
80// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 80// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
81 } 81 }
82 82
83 public void RegionLoaded(Scene scene) 83 public void RegionLoaded(Scene scene)
84 { 84 {
85// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 85// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -118,27 +118,27 @@ namespace OpenSim.Region.OptionalModules.Asset
118 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); 118 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
119 return; 119 return;
120 } 120 }
121 121
122 AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); 122 AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
123 if (asset == null) 123 if (asset == null)
124 { 124 {
125 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); 125 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
126 return; 126 return;
127 } 127 }
128 128
129 string fileName = rawAssetId; 129 string fileName = rawAssetId;
130 130
131 if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) 131 if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName))
132 return; 132 return;
133 133
134 using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) 134 using (FileStream fs = new FileStream(fileName, FileMode.CreateNew))
135 { 135 {
136 using (BinaryWriter bw = new BinaryWriter(fs)) 136 using (BinaryWriter bw = new BinaryWriter(fs))
137 { 137 {
138 bw.Write(asset.Data); 138 bw.Write(asset.Data);
139 } 139 }
140 } 140 }
141 141
142 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); 142 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName);
143 } 143 }
144 144
diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
index 5c45e4d..0698cec 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
@@ -57,41 +57,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
57 private List<Scene> m_scenes = new List<Scene>(); 57 private List<Scene> m_scenes = new List<Scene>();
58 58
59 public string Name { get { return "Animations Command Module"; } } 59 public string Name { get { return "Animations Command Module"; } }
60 60
61 public Type ReplaceableInterface { get { return null; } } 61 public Type ReplaceableInterface { get { return null; } }
62 62
63 public void Initialise(IConfigSource source) 63 public void Initialise(IConfigSource source)
64 { 64 {
65// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE"); 65// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE");
66 } 66 }
67 67
68 public void PostInitialise() 68 public void PostInitialise()
69 { 69 {
70// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE"); 70// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE");
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE"); 75// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE");
76 } 76 }
77 77
78 public void AddRegion(Scene scene) 78 public void AddRegion(Scene scene)
79 { 79 {
80// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 80// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
81 } 81 }
82 82
83 public void RemoveRegion(Scene scene) 83 public void RemoveRegion(Scene scene)
84 { 84 {
85// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 85// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
86 86
87 lock (m_scenes) 87 lock (m_scenes)
88 m_scenes.Remove(scene); 88 m_scenes.Remove(scene);
89 } 89 }
90 90
91 public void RegionLoaded(Scene scene) 91 public void RegionLoaded(Scene scene)
92 { 92 {
93// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 93// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
94 94
95 lock (m_scenes) 95 lock (m_scenes)
96 m_scenes.Add(scene); 96 m_scenes.Add(scene);
97 97
@@ -156,18 +156,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
156 156
157 string cma = spa.CurrentMovementAnimation; 157 string cma = spa.CurrentMovementAnimation;
158 cdl.AddRow( 158 cdl.AddRow(
159 "Current movement anim", 159 "Current movement anim",
160 string.Format("{0}, {1}", DefaultAvatarAnimations.GetDefaultAnimation(cma), cma)); 160 string.Format("{0}, {1}", DefaultAvatarAnimations.GetDefaultAnimation(cma), cma));
161 161
162 UUID defaultAnimId = anims.DefaultAnimation.AnimID; 162 UUID defaultAnimId = anims.DefaultAnimation.AnimID;
163 cdl.AddRow( 163 cdl.AddRow(
164 "Default anim", 164 "Default anim",
165 string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId))); 165 string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId)));
166 166
167 UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID; 167 UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID;
168 cdl.AddRow( 168 cdl.AddRow(
169 "Implicit default anim", 169 "Implicit default anim",
170 string.Format("{0}, {1}", 170 string.Format("{0}, {1}",
171 implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId))); 171 implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId)));
172 172
173 cdl.AddToStringBuilder(sb); 173 cdl.AddToStringBuilder(sb);
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index 2f9bb1e..60ae0cb 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -54,43 +54,43 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
54 private List<Scene> m_scenes = new List<Scene>(); 54 private List<Scene> m_scenes = new List<Scene>();
55 55
56// private IAvatarFactoryModule m_avatarFactory; 56// private IAvatarFactoryModule m_avatarFactory;
57 57
58 public string Name { get { return "Appearance Information Module"; } } 58 public string Name { get { return "Appearance Information Module"; } }
59 59
60 public Type ReplaceableInterface { get { return null; } } 60 public Type ReplaceableInterface { get { return null; } }
61 61
62 public void Initialise(IConfigSource source) 62 public void Initialise(IConfigSource source)
63 { 63 {
64// m_log.DebugFormat("[APPEARANCE INFO MODULE]: INITIALIZED MODULE"); 64// m_log.DebugFormat("[APPEARANCE INFO MODULE]: INITIALIZED MODULE");
65 } 65 }
66 66
67 public void PostInitialise() 67 public void PostInitialise()
68 { 68 {
69// m_log.DebugFormat("[APPEARANCE INFO MODULE]: POST INITIALIZED MODULE"); 69// m_log.DebugFormat("[APPEARANCE INFO MODULE]: POST INITIALIZED MODULE");
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74// m_log.DebugFormat("[APPEARANCE INFO MODULE]: CLOSED MODULE"); 74// m_log.DebugFormat("[APPEARANCE INFO MODULE]: CLOSED MODULE");
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 79// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
80 } 80 }
81 81
82 public void RemoveRegion(Scene scene) 82 public void RemoveRegion(Scene scene)
83 { 83 {
84// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 84// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
85 85
86 lock (m_scenes) 86 lock (m_scenes)
87 m_scenes.Remove(scene); 87 m_scenes.Remove(scene);
88 } 88 }
89 89
90 public void RegionLoaded(Scene scene) 90 public void RegionLoaded(Scene scene)
91 { 91 {
92// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 92// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
93 93
94 lock (m_scenes) 94 lock (m_scenes)
95 m_scenes.Add(scene); 95 m_scenes.Add(scene);
96 96
@@ -99,7 +99,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
99 "show appearance [<first-name> <last-name>]", 99 "show appearance [<first-name> <last-name>]",
100 "Synonym for 'appearance show'", 100 "Synonym for 'appearance show'",
101 HandleShowAppearanceCommand); 101 HandleShowAppearanceCommand);
102 102
103 scene.AddCommand( 103 scene.AddCommand(
104 "Users", this, "appearance show", 104 "Users", this, "appearance show",
105 "appearance show [<first-name> <last-name>]", 105 "appearance show [<first-name> <last-name>]",
@@ -222,7 +222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
222 } 222 }
223 223
224 lock (m_scenes) 224 lock (m_scenes)
225 { 225 {
226 foreach (Scene scene in m_scenes) 226 foreach (Scene scene in m_scenes)
227 { 227 {
228 if (targetNameSupplied) 228 if (targetNameSupplied)
@@ -344,7 +344,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
344 344
345 if (targetNameSupplied) 345 if (targetNameSupplied)
346 { 346 {
347 lock (m_scenes) 347 lock (m_scenes)
348 { 348 {
349 foreach (Scene scene in m_scenes) 349 foreach (Scene scene in m_scenes)
350 { 350 {
@@ -360,12 +360,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
360 cdt.AddColumn("Name", ConsoleDisplayUtil.UserNameSize); 360 cdt.AddColumn("Name", ConsoleDisplayUtil.UserNameSize);
361 cdt.AddColumn("Wearables", 2); 361 cdt.AddColumn("Wearables", 2);
362 362
363 lock (m_scenes) 363 lock (m_scenes)
364 { 364 {
365 foreach (Scene scene in m_scenes) 365 foreach (Scene scene in m_scenes)
366 { 366 {
367 scene.ForEachRootScenePresence( 367 scene.ForEachRootScenePresence(
368 sp => 368 sp =>
369 { 369 {
370 int count = 0; 370 int count = 0;
371 371
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
428 428
429 uuidGatherer.AddForInspection(wi.AssetID); 429 uuidGatherer.AddForInspection(wi.AssetID);
430 uuidGatherer.GatherAll(); 430 uuidGatherer.GatherAll();
431 string[] assetStrings 431 string[] assetStrings
432 = Array.ConvertAll<UUID, string>(uuidGatherer.GatheredUuids.Keys.ToArray(), u => u.ToString()); 432 = Array.ConvertAll<UUID, string>(uuidGatherer.GatheredUuids.Keys.ToArray(), u => u.ToString());
433 433
434 bool[] existChecks = scene.AssetService.AssetsExist(assetStrings); 434 bool[] existChecks = scene.AssetService.AssetsExist(assetStrings);
@@ -438,10 +438,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
438 cdt.AddColumn("Type", 10); 438 cdt.AddColumn("Type", 10);
439 cdt.AddColumn("UUID", ConsoleDisplayUtil.UuidSize); 439 cdt.AddColumn("UUID", ConsoleDisplayUtil.UuidSize);
440 cdt.AddColumn("Found", 5); 440 cdt.AddColumn("Found", 5);
441 441
442 for (int k = 0; k < existChecks.Length; k++) 442 for (int k = 0; k < existChecks.Length; k++)
443 cdt.AddRow( 443 cdt.AddRow(
444 (AssetType)uuidGatherer.GatheredUuids[new UUID(assetStrings[k])], 444 (AssetType)uuidGatherer.GatheredUuids[new UUID(assetStrings[k])],
445 assetStrings[k], existChecks[k] ? "yes" : "no"); 445 assetStrings[k], existChecks[k] ? "yes" : "no");
446 446
447 sb.Append(cdt.ToString()); 447 sb.Append(cdt.ToString());
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs
index a147e9b..3685041 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs
@@ -55,41 +55,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
55// private IAvatarFactoryModule m_avatarFactory; 55// private IAvatarFactoryModule m_avatarFactory;
56 56
57 public string Name { get { return "Attachments Command Module"; } } 57 public string Name { get { return "Attachments Command Module"; } }
58 58
59 public Type ReplaceableInterface { get { return null; } } 59 public Type ReplaceableInterface { get { return null; } }
60 60
61 public void Initialise(IConfigSource source) 61 public void Initialise(IConfigSource source)
62 { 62 {
63// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: INITIALIZED MODULE"); 63// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: INITIALIZED MODULE");
64 } 64 }
65 65
66 public void PostInitialise() 66 public void PostInitialise()
67 { 67 {
68// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: POST INITIALIZED MODULE"); 68// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: POST INITIALIZED MODULE");
69 } 69 }
70 70
71 public void Close() 71 public void Close()
72 { 72 {
73// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: CLOSED MODULE"); 73// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: CLOSED MODULE");
74 } 74 }
75 75
76 public void AddRegion(Scene scene) 76 public void AddRegion(Scene scene)
77 { 77 {
78// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 78// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
79 } 79 }
80 80
81 public void RemoveRegion(Scene scene) 81 public void RemoveRegion(Scene scene)
82 { 82 {
83// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 83// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
84 84
85 lock (m_scenes) 85 lock (m_scenes)
86 m_scenes.Remove(scene); 86 m_scenes.Remove(scene);
87 } 87 }
88 88
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
92 92
93 lock (m_scenes) 93 lock (m_scenes)
94 m_scenes.Add(scene); 94 m_scenes.Add(scene);
95 95
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index 535bf67..ed27385 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
125 SendConsoleOutput(agentID, "Command parameter error"); 125 SendConsoleOutput(agentID, "Command parameter error");
126 return; 126 return;
127 } 127 }
128 128
129 m_scene.StoreExtraSetting("auto_grant_attach_perms", val); 129 m_scene.StoreExtraSetting("auto_grant_attach_perms", val);
130 130
131 SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val)); 131 SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val));
@@ -155,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
155 ScenePresence target; 155 ScenePresence target;
156 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) 156 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target))
157 return 0; 157 return 0;
158 158
159 if (target.UUID != hostPart.ParentGroup.OwnerID) 159 if (target.UUID != hostPart.ParentGroup.OwnerID)
160 { 160 {
161 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions(); 161 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions();
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
index 73215cb..27ab32f 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
@@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Scenes;
38namespace OpenSim.Region.OptionalModules.Avatar.Chat 38namespace OpenSim.Region.OptionalModules.Avatar.Chat
39{ 39{
40 40
41 // An instance of this class exists for each unique combination of 41 // An instance of this class exists for each unique combination of
42 // IRC chat interface characteristics, as determined by the supplied 42 // IRC chat interface characteristics, as determined by the supplied
43 // configuration file. 43 // configuration file.
44 44
@@ -266,11 +266,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
266 ChannelState cs = p_cs; 266 ChannelState cs = p_cs;
267 267
268 // Check to see if we have an existing server/channel setup that can be used 268 // Check to see if we have an existing server/channel setup that can be used
269 // In the absence of variable substitution this will always resolve to the 269 // In the absence of variable substitution this will always resolve to the
270 // same ChannelState instance, and the table will only contains a single 270 // same ChannelState instance, and the table will only contains a single
271 // entry, so the performance considerations for the existing behavior are 271 // entry, so the performance considerations for the existing behavior are
272 // zero. Only the IRC connector is shared, the ChannelState still contains 272 // zero. Only the IRC connector is shared, the ChannelState still contains
273 // values that, while independent of the IRC connetion, do still distinguish 273 // values that, while independent of the IRC connetion, do still distinguish
274 // this region's behavior. 274 // this region's behavior.
275 275
276 lock (IRCBridgeModule.m_channels) 276 lock (IRCBridgeModule.m_channels)
@@ -335,7 +335,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
335 335
336 } 336 }
337 337
338 // These routines allow differentiating changes to 338 // These routines allow differentiating changes to
339 // the underlying channel state. If necessary, a 339 // the underlying channel state. If necessary, a
340 // new channel state will be created. 340 // new channel state will be created.
341 341
@@ -426,7 +426,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
426 } 426 }
427 427
428 // This level of obsessive matching allows us to produce 428 // This level of obsessive matching allows us to produce
429 // a minimal overhead int he case of a server which does 429 // a minimal overhead int he case of a server which does
430 // need to differentiate IRC at a region level. 430 // need to differentiate IRC at a region level.
431 431
432 private bool IsAPerfectMatchFor(ChannelState cs) 432 private bool IsAPerfectMatchFor(ChannelState cs)
@@ -447,8 +447,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
447 ); 447 );
448 } 448 }
449 449
450 // This function implements the variable substitution mechanism 450 // This function implements the variable substitution mechanism
451 // for the configuration values. Each string read from the 451 // for the configuration values. Each string read from the
452 // configuration file is scanned for '[...]' enclosures. Each 452 // configuration file is scanned for '[...]' enclosures. Each
453 // one that is found is replaced by either a runtime variable 453 // one that is found is replaced by either a runtime variable
454 // (%xxx) or an existing configuration key. When no further 454 // (%xxx) or an existing configuration key. When no further
@@ -585,7 +585,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
585 585
586 } 586 }
587 587
588 // This function is lifted from the IRCConnector because it 588 // This function is lifted from the IRCConnector because it
589 // contains information that is not differentiating from an 589 // contains information that is not differentiating from an
590 // IRC point-of-view. 590 // IRC point-of-view.
591 591
@@ -598,7 +598,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
598 { 598 {
599 599
600 // Scan through the set of unique channel configuration for those 600 // Scan through the set of unique channel configuration for those
601 // that belong to this connector. And then forward the message to 601 // that belong to this connector. And then forward the message to
602 // all regions known to those channels. 602 // all regions known to those channels.
603 // Note that this code is responsible for completing some of the 603 // Note that this code is responsible for completing some of the
604 // settings for the inbound OSChatMessage 604 // settings for the inbound OSChatMessage
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
index 941379f..ffbebe7 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
@@ -97,14 +97,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
97 97
98 // How many regions depend upon this connection 98 // How many regions depend upon this connection
99 // This count is updated by the ChannelState object and reflects the sum 99 // This count is updated by the ChannelState object and reflects the sum
100 // of the region clients associated with the set of associated channel 100 // of the region clients associated with the set of associated channel
101 // state instances. That's why it cannot be managed here. 101 // state instances. That's why it cannot be managed here.
102 102
103 internal int depends = 0; 103 internal int depends = 0;
104 104
105 // This variable counts the number of resets that have been performed 105 // This variable counts the number of resets that have been performed
106 // on the connector. When a listener thread terminates, it checks to 106 // on the connector. When a listener thread terminates, it checks to
107 // see of the reset count has changed before it schedules another 107 // see of the reset count has changed before it schedules another
108 // reset. 108 // reset.
109 109
110 internal int m_resetk = 0; 110 internal int m_resetk = 0;
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
428 public void PrivMsg(string pattern, string from, string region, string msg) 428 public void PrivMsg(string pattern, string from, string region, string msg)
429 { 429 {
430 430
431 // m_log.DebugFormat("[IRC-Connector-{0}] PrivMsg to IRC from {1}: <{2}>", idn, from, 431 // m_log.DebugFormat("[IRC-Connector-{0}] PrivMsg to IRC from {1}: <{2}>", idn, from,
432 // String.Format(pattern, m_ircChannel, from, region, msg)); 432 // String.Format(pattern, m_ircChannel, from, region, msg));
433 433
434 // One message to the IRC server 434 // One message to the IRC server
@@ -510,7 +510,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
510 c.Sender = null; 510 c.Sender = null;
511 c.SenderUUID = UUID.Zero; 511 c.SenderUUID = UUID.Zero;
512 512
513 // Is message "\001ACTION foo bar\001"? 513 // Is message "\001ACTION foo bar\001"?
514 // Then change to: "/me foo bar" 514 // Then change to: "/me foo bar"
515 515
516 if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION")) 516 if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION"))
@@ -608,8 +608,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
608 string parms = String.Empty; 608 string parms = String.Empty;
609 609
610 // ":" indicates that a prefix is present 610 // ":" indicates that a prefix is present
611 // There are NEVER more than 17 real 611 // There are NEVER more than 17 real
612 // fields. A parameter that starts with 612 // fields. A parameter that starts with
613 // ":" indicates that the remainder of the 613 // ":" indicates that the remainder of the
614 // line is a single parameter value. 614 // line is a single parameter value.
615 615
@@ -873,7 +873,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
873 } 873 }
874 874
875 // Being marked connected is not enough to ping. Socket establishment can sometimes take a long 875 // Being marked connected is not enough to ping. Socket establishment can sometimes take a long
876 // time, in which case the watch dog might try to ping the server before the socket has been 876 // time, in which case the watch dog might try to ping the server before the socket has been
877 // set up, with nasty side-effects. 877 // set up, with nasty side-effects.
878 878
879 else if (_pdk_ == 0) 879 else if (_pdk_ == 0)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
index 5505001..a3ef83b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
@@ -414,7 +414,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
414 } 414 }
415 } 415 }
416 416
417 // This method gives the region an opportunity to interfere with 417 // This method gives the region an opportunity to interfere with
418 // message delivery. For now we just enforce the enable/disable 418 // message delivery. For now we just enforce the enable/disable
419 // flag. 419 // flag.
420 420
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
428 } 428 }
429 } 429 }
430 430
431 // This supports any local message traffic that might be needed in 431 // This supports any local message traffic that might be needed in
432 // support of command processing. At present there is none. 432 // support of command processing. At present there is none.
433 433
434 internal void LocalChat(string msg) 434 internal void LocalChat(string msg)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
index 6c147f4..c0de3d9 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
98 // replace it. 98 // replace it.
99 m_replacingChatModule = false; 99 m_replacingChatModule = false;
100 } 100 }
101 else 101 else
102 { 102 {
103 m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true); 103 m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true);
104 } 104 }
@@ -107,7 +107,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
107 { 107 {
108 m_replacingChatModule = false; 108 m_replacingChatModule = false;
109 } 109 }
110 110
111 m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); 111 m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing");
112 112
113 // take note of concierge channel and of identity 113 // take note of concierge channel and of identity
@@ -119,7 +119,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
119 m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword); 119 m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword);
120 m_brokerURI = config.GetString("broker", m_brokerURI); 120 m_brokerURI = config.GetString("broker", m_brokerURI);
121 m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout); 121 m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout);
122 122
123 m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami); 123 m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami);
124 124
125 // calculate regions Regex 125 // calculate regions Regex
@@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
207 { 207 {
208 } 208 }
209 209
210 new public Type ReplaceableInterface 210 new public Type ReplaceableInterface
211 { 211 {
212 get { return null; } 212 get { return null; }
213 } 213 }
@@ -278,7 +278,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
278 // range of chat to cover the whole 278 // range of chat to cover the whole
279 // region. however, we don't do this for whisper 279 // region. however, we don't do this for whisper
280 // (got to have some privacy) 280 // (got to have some privacy)
281 if (c.Type != ChatTypeEnum.Whisper) 281 if (c.Type != ChatTypeEnum.Whisper)
282 { 282 {
283 base.OnChatBroadcast(sender, c); 283 base.OnChatBroadcast(sender, c);
284 return; 284 return;
@@ -296,17 +296,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
296 { 296 {
297 client.OnLogout += OnClientLoggedOut; 297 client.OnLogout += OnClientLoggedOut;
298 298
299 if (m_replacingChatModule) 299 if (m_replacingChatModule)
300 client.OnChatFromClient += OnChatFromClient; 300 client.OnChatFromClient += OnChatFromClient;
301 } 301 }
302 302
303 303
304 304
305 public void OnClientLoggedOut(IClientAPI client) 305 public void OnClientLoggedOut(IClientAPI client)
306 { 306 {
307 client.OnLogout -= OnClientLoggedOut; 307 client.OnLogout -= OnClientLoggedOut;
308 client.OnConnectionClosed -= OnClientLoggedOut; 308 client.OnConnectionClosed -= OnClientLoggedOut;
309 309
310 if (m_conciergedScenes.Contains(client.Scene)) 310 if (m_conciergedScenes.Contains(client.Scene))
311 { 311 {
312 Scene scene = client.Scene as Scene; 312 Scene scene = client.Scene as Scene;
@@ -324,7 +324,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
324 Scene scene = agent.Scene; 324 Scene scene = agent.Scene;
325 m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName); 325 m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName);
326 WelcomeAvatar(agent, scene); 326 WelcomeAvatar(agent, scene);
327 AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name, 327 AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name,
328 scene.RegionInfo.RegionName, scene.GetRootAgentCount())); 328 scene.RegionInfo.RegionName, scene.GetRootAgentCount()));
329 UpdateBroker(scene); 329 UpdateBroker(scene);
330 } 330 }
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
337 { 337 {
338 Scene scene = agent.Scene; 338 Scene scene = agent.Scene;
339 m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName); 339 m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName);
340 AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name, 340 AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name,
341 scene.RegionInfo.RegionName, scene.GetRootAgentCount())); 341 scene.RegionInfo.RegionName, scene.GetRootAgentCount()));
342 UpdateBroker(scene); 342 UpdateBroker(scene);
343 } 343 }
@@ -374,7 +374,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
374 374
375 scene.ForEachRootScenePresence(delegate(ScenePresence sp) 375 scene.ForEachRootScenePresence(delegate(ScenePresence sp)
376 { 376 {
377 list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", sp.Name, sp.UUID)); 377 list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", sp.Name, sp.UUID));
378 }); 378 });
379 379
380 list.Append("</avatars>"); 380 list.Append("</avatars>");
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
437 private void UpdateBrokerDone(IAsyncResult result) 437 private void UpdateBrokerDone(IAsyncResult result)
438 { 438 {
439 BrokerState bs = null; 439 BrokerState bs = null;
440 try 440 try
441 { 441 {
442 bs = result.AsyncState as BrokerState; 442 bs = result.AsyncState as BrokerState;
443 HttpWebRequest updatePost = bs.Poster; 443 HttpWebRequest updatePost = bs.Poster;
@@ -450,15 +450,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
450 catch (WebException we) 450 catch (WebException we)
451 { 451 {
452 m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status); 452 m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status);
453 if (null != we.Response) 453 if (null != we.Response)
454 { 454 {
455 using (HttpWebResponse resp = we.Response as HttpWebResponse) 455 using (HttpWebResponse resp = we.Response as HttpWebResponse)
456 { 456 {
457 m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode); 457 m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode);
458 m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription); 458 m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription);
459 m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server); 459 m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server);
460 460
461 if (resp.ContentLength > 0) 461 if (resp.ContentLength > 0)
462 { 462 {
463 StreamReader content = new StreamReader(resp.GetResponseStream()); 463 StreamReader content = new StreamReader(resp.GetResponseStream());
464 m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); 464 m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd());
@@ -476,12 +476,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
476 // welcome file there: if yes, send it to the agent 476 // welcome file there: if yes, send it to the agent
477 if (!String.IsNullOrEmpty(m_welcomes)) 477 if (!String.IsNullOrEmpty(m_welcomes))
478 { 478 {
479 string[] welcomes = new string[] { 479 string[] welcomes = new string[] {
480 Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName), 480 Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName),
481 Path.Combine(m_welcomes, "DEFAULT")}; 481 Path.Combine(m_welcomes, "DEFAULT")};
482 foreach (string welcome in welcomes) 482 foreach (string welcome in welcomes)
483 { 483 {
484 if (File.Exists(welcome)) 484 if (File.Exists(welcome))
485 { 485 {
486 try 486 try
487 { 487 {
@@ -500,7 +500,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
500 { 500 {
501 m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe); 501 m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe);
502 } 502 }
503 } 503 }
504 return; 504 return;
505 } 505 }
506 m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName); 506 m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName);
@@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
512 // protected void AnnounceToAgentsRegion(Scene scene, string msg) 512 // protected void AnnounceToAgentsRegion(Scene scene, string msg)
513 // { 513 // {
514 // ScenePresence agent = null; 514 // ScenePresence agent = null;
515 // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) 515 // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent))
516 // AnnounceToAgentsRegion(agent, msg); 516 // AnnounceToAgentsRegion(agent, msg);
517 // else 517 // else
518 // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); 518 // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name);
@@ -587,7 +587,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
587 587
588 string regionName = (string)requestData["region"]; 588 string regionName = (string)requestData["region"];
589 IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; }); 589 IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; });
590 if (scene == null) 590 if (scene == null)
591 throw new Exception(String.Format("unknown region \"{0}\"", regionName)); 591 throw new Exception(String.Format("unknown region \"{0}\"", regionName));
592 592
593 if (!m_conciergedScenes.Contains(scene)) 593 if (!m_conciergedScenes.Contains(scene))
diff --git a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
index 026ceca..31fc56a 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
@@ -61,31 +61,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
61 private IPresenceService m_presenceService; 61 private IPresenceService m_presenceService;
62 62
63// private IAvatarFactoryModule m_avatarFactory; 63// private IAvatarFactoryModule m_avatarFactory;
64 64
65 public string Name { get { return "Appearance Information Module"; } } 65 public string Name { get { return "Appearance Information Module"; } }
66 66
67 public Type ReplaceableInterface { get { return null; } } 67 public Type ReplaceableInterface { get { return null; } }
68 68
69 public void Initialise(IConfigSource source) 69 public void Initialise(IConfigSource source)
70 { 70 {
71// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: INITIALIZED MODULE"); 71// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: INITIALIZED MODULE");
72 } 72 }
73 73
74 public void PostInitialise() 74 public void PostInitialise()
75 { 75 {
76// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: POST INITIALIZED MODULE"); 76// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: POST INITIALIZED MODULE");
77 } 77 }
78 78
79 public void Close() 79 public void Close()
80 { 80 {
81// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: CLOSED MODULE"); 81// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: CLOSED MODULE");
82 } 82 }
83 83
84 public void AddRegion(Scene scene) 84 public void AddRegion(Scene scene)
85 { 85 {
86// m_log.DebugFormat("[FRIENDS COMMANDO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 86// m_log.DebugFormat("[FRIENDS COMMANDO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
87 } 87 }
88 88
89 public void RemoveRegion(Scene scene) 89 public void RemoveRegion(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
index 5a6b284..1b5ee04 100644
--- a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
@@ -54,34 +54,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
54 private Scene m_scene; 54 private Scene m_scene;
55 55
56 public string Name { get { return "SitStand Command Module"; } } 56 public string Name { get { return "SitStand Command Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
78 } 78 }
79 79
80 public void RemoveRegion(Scene scene) 80 public void RemoveRegion(Scene scene)
81 { 81 {
82// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 82// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
83 } 83 }
84 84
85 public void RegionLoaded(Scene scene) 85 public void RegionLoaded(Scene scene)
86 { 86 {
87// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 87// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
143 if (sitPart != null) 143 if (sitPart != null)
144 { 144 {
145 MainConsole.Instance.OutputFormat( 145 MainConsole.Instance.OutputFormat(
146 "Sitting {0} on {1} {2} in {3}", 146 "Sitting {0} on {1} {2} in {3}",
147 sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name); 147 sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name);
148 148
149 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero); 149 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero);
@@ -202,14 +202,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
202 202
203 foreach (ScenePresence sp in scenePresences) 203 foreach (ScenePresence sp in scenePresences)
204 { 204 {
205 if (!sp.IsChildAgent && nameRegex.IsMatch(sp.Name)) 205 if (!sp.IsChildAgent && nameRegex.IsMatch(sp.Name))
206 scenePresencesMatched.Add(sp); 206 scenePresencesMatched.Add(sp);
207 } 207 }
208 } 208 }
209 else 209 else
210 { 210 {
211 ScenePresence sp = m_scene.GetScenePresence(firstName, lastName); 211 ScenePresence sp = m_scene.GetScenePresence(firstName, lastName);
212 212
213 if (sp != null && !sp.IsChildAgent) 213 if (sp != null && !sp.IsChildAgent)
214 scenePresencesMatched.Add(sp); 214 scenePresencesMatched.Add(sp);
215 } 215 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index 3db0781..c6d7fe6 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
143 if (String.IsNullOrEmpty(m_freeSwitchRealm) || 143 if (String.IsNullOrEmpty(m_freeSwitchRealm) ||
144 String.IsNullOrEmpty(m_freeSwitchAPIPrefix)) 144 String.IsNullOrEmpty(m_freeSwitchAPIPrefix))
145 { 145 {
146 m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting."); 146 m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting.");
147 return; 147 return;
148 } 148 }
149 149
@@ -168,9 +168,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
168 168
169 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), 169 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
170 FreeSwitchSLVoiceBuddyHTTPHandler); 170 FreeSwitchSLVoiceBuddyHTTPHandler);
171 171
172 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_watcher.php", m_freeSwitchAPIPrefix), 172 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_watcher.php", m_freeSwitchAPIPrefix),
173 FreeSwitchSLVoiceWatcherHTTPHandler); 173 FreeSwitchSLVoiceWatcherHTTPHandler);
174 174
175 m_log.InfoFormat("[FreeSwitchVoice]: using FreeSwitch server {0}", m_freeSwitchRealm); 175 m_log.InfoFormat("[FreeSwitchVoice]: using FreeSwitch server {0}", m_freeSwitchRealm);
176 176
@@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
302 public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) 302 public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps)
303 { 303 {
304 m_log.DebugFormat( 304 m_log.DebugFormat(
305 "[FreeSwitchVoice]: OnRegisterCaps() called with agentID {0} caps {1} in scene {2}", 305 "[FreeSwitchVoice]: OnRegisterCaps() called with agentID {0} caps {1} in scene {2}",
306 agentID, caps, scene.RegionInfo.RegionName); 306 agentID, caps, scene.RegionInfo.RegionName);
307 307
308 string capsBase = "/CAPS/" + caps.CapsObjectPath; 308 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -352,7 +352,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
352 { 352 {
353 m_log.DebugFormat( 353 m_log.DebugFormat(
354 "[FreeSwitchVoice][PROVISIONVOICE]: ProvisionVoiceAccountRequest() request: {0}, path: {1}, param: {2}", request, path, param); 354 "[FreeSwitchVoice][PROVISIONVOICE]: ProvisionVoiceAccountRequest() request: {0}, path: {1}, param: {2}", request, path, param);
355 355
356 ScenePresence avatar = scene.GetScenePresence(agentID); 356 ScenePresence avatar = scene.GetScenePresence(agentID);
357 if (avatar == null) 357 if (avatar == null)
358 { 358 {
@@ -423,9 +423,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
423 UUID agentID, Caps caps) 423 UUID agentID, Caps caps)
424 { 424 {
425 m_log.DebugFormat( 425 m_log.DebugFormat(
426 "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", 426 "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}",
427 scene.RegionInfo.RegionName, agentID); 427 scene.RegionInfo.RegionName, agentID);
428 428
429 ScenePresence avatar = scene.GetScenePresence(agentID); 429 ScenePresence avatar = scene.GetScenePresence(agentID);
430 string avatarName = avatar.Name; 430 string avatarName = avatar.Name;
431 431
@@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
512 512
513 m_log.DebugFormat("[FreeSwitchVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", 513 m_log.DebugFormat("[FreeSwitchVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}",
514 avatarName, request, path, param); 514 avatarName, request, path, param);
515 515
516 return "<llsd>true</llsd>"; 516 return "<llsd>true</llsd>";
517 } 517 }
518 518
@@ -610,7 +610,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
610 public Hashtable FreeSwitchSLVoiceBuddyHTTPHandler(Hashtable request) 610 public Hashtable FreeSwitchSLVoiceBuddyHTTPHandler(Hashtable request)
611 { 611 {
612 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceBuddyHTTPHandler called"); 612 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceBuddyHTTPHandler called");
613 613
614 Hashtable response = new Hashtable(); 614 Hashtable response = new Hashtable();
615 response["int_response_code"] = 200; 615 response["int_response_code"] = 200;
616 response["str_response_string"] = string.Empty; 616 response["str_response_string"] = string.Empty;
@@ -678,16 +678,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
678// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); 678// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline);
679// 679//
680// m_log.DebugFormat( 680// m_log.DebugFormat(
681// "[FREESWITCH]: FreeSwitchSLVoiceBuddyHTTPHandler() response {0}", 681// "[FREESWITCH]: FreeSwitchSLVoiceBuddyHTTPHandler() response {0}",
682// normalizeEndLines.Replace((string)response["str_response_string"],"")); 682// normalizeEndLines.Replace((string)response["str_response_string"],""));
683 683
684 return response; 684 return response;
685 } 685 }
686 686
687 public Hashtable FreeSwitchSLVoiceWatcherHTTPHandler(Hashtable request) 687 public Hashtable FreeSwitchSLVoiceWatcherHTTPHandler(Hashtable request)
688 { 688 {
689 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceWatcherHTTPHandler called"); 689 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceWatcherHTTPHandler called");
690 690
691 Hashtable response = new Hashtable(); 691 Hashtable response = new Hashtable();
692 response["int_response_code"] = 200; 692 response["int_response_code"] = 200;
693 response["content-type"] = "text/xml"; 693 response["content-type"] = "text/xml";
@@ -700,8 +700,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
700 700
701 StringBuilder resp = new StringBuilder(); 701 StringBuilder resp = new StringBuilder();
702 resp.Append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><response xmlns=\"http://www.vivox.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation= \"/xsd/buddy_list.xsd\">"); 702 resp.Append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><response xmlns=\"http://www.vivox.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation= \"/xsd/buddy_list.xsd\">");
703 703
704 // FIXME: This is enough of a response to stop viewer 2 complaining about a login failure and get voice to work. If we don't 704 // FIXME: This is enough of a response to stop viewer 2 complaining about a login failure and get voice to work. If we don't
705 // give an OK response, then viewer 2 engages in an continuous viv_signin.php, viv_buddy.php, viv_watcher.php loop 705 // give an OK response, then viewer 2 engages in an continuous viv_signin.php, viv_buddy.php, viv_watcher.php loop
706 // Viewer 1 appeared happy to ignore the lack of reply and still works with this reply. 706 // Viewer 1 appeared happy to ignore the lack of reply and still works with this reply.
707 // 707 //
@@ -711,19 +711,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
711 <cookie_name>lib_session</cookie_name> 711 <cookie_name>lib_session</cookie_name>
712 <cookie>{0}</cookie> 712 <cookie>{0}</cookie>
713 <auth_token>{0}</auth_token> 713 <auth_token>{0}</auth_token>
714 <body/></level0></response>", auth_token)); 714 <body/></level0></response>", auth_token));
715 715
716 response["str_response_string"] = resp.ToString(); 716 response["str_response_string"] = resp.ToString();
717 717
718// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); 718// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline);
719// 719//
720// m_log.DebugFormat( 720// m_log.DebugFormat(
721// "[FREESWITCH]: FreeSwitchSLVoiceWatcherHTTPHandler() response {0}", 721// "[FREESWITCH]: FreeSwitchSLVoiceWatcherHTTPHandler() response {0}",
722// normalizeEndLines.Replace((string)response["str_response_string"],"")); 722// normalizeEndLines.Replace((string)response["str_response_string"],""));
723 723
724 return response; 724 return response;
725 } 725 }
726 726
727 public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request) 727 public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request)
728 { 728 {
729 //m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called"); 729 //m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called");
@@ -771,10 +771,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
771 </level0> 771 </level0>
772 </response>", userid, pos, avatarName); 772 </response>", userid, pos, avatarName);
773 773
774 response["int_response_code"] = 200; 774 response["int_response_code"] = 200;
775 775
776// m_log.DebugFormat("[FreeSwitchVoice]: Sending FreeSwitchSLVoiceSigninHTTPHandler response"); 776// m_log.DebugFormat("[FreeSwitchVoice]: Sending FreeSwitchSLVoiceSigninHTTPHandler response");
777 777
778 return response; 778 return response;
779 } 779 }
780 780
@@ -859,23 +859,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
859 response["keepalive"] = false; 859 response["keepalive"] = false;
860 response["int_response_code"] = 500; 860 response["int_response_code"] = 500;
861 861
862 Hashtable requestBody = ParseRequestBody((string)request["body"]); 862 Hashtable requestBody = ParseRequestBody((string)request["body"]);
863 863
864 string section = (string) requestBody["section"]; 864 string section = (string) requestBody["section"];
865 865
866 if (section == "directory") 866 if (section == "directory")
867 { 867 {
868 string eventCallingFunction = (string)requestBody["Event-Calling-Function"]; 868 string eventCallingFunction = (string)requestBody["Event-Calling-Function"];
869 m_log.DebugFormat( 869 m_log.DebugFormat(
870 "[FreeSwitchVoice]: Received request for config section directory, event calling function '{0}'", 870 "[FreeSwitchVoice]: Received request for config section directory, event calling function '{0}'",
871 eventCallingFunction); 871 eventCallingFunction);
872 872
873 response = m_FreeswitchService.HandleDirectoryRequest(requestBody); 873 response = m_FreeswitchService.HandleDirectoryRequest(requestBody);
874 } 874 }
875 else if (section == "dialplan") 875 else if (section == "dialplan")
876 { 876 {
877 m_log.DebugFormat("[FreeSwitchVoice]: Received request for config section dialplan"); 877 m_log.DebugFormat("[FreeSwitchVoice]: Received request for config section dialplan");
878 878
879 response = m_FreeswitchService.HandleDialplanRequest(requestBody); 879 response = m_FreeswitchService.HandleDialplanRequest(requestBody);
880 } 880 }
881 else 881 else
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index 5ea4a31..57930d7 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -114,7 +114,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
114 114
115 private static Dictionary<string,string> m_parents = new Dictionary<string,string>(); 115 private static Dictionary<string,string> m_parents = new Dictionary<string,string>();
116 private static bool m_dumpXml; 116 private static bool m_dumpXml;
117 117
118 private IConfig m_config; 118 private IConfig m_config;
119 119
120 private object m_Lock; 120 private object m_Lock;
@@ -153,22 +153,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
153 // Validate against constraints and default if necessary 153 // Validate against constraints and default if necessary
154 if (m_vivoxChannelRollOff < CHAN_ROLL_OFF_MIN || m_vivoxChannelRollOff > CHAN_ROLL_OFF_MAX) 154 if (m_vivoxChannelRollOff < CHAN_ROLL_OFF_MIN || m_vivoxChannelRollOff > CHAN_ROLL_OFF_MAX)
155 { 155 {
156 m_log.WarnFormat("[VivoxVoice] Invalid value for roll off ({0}), reset to {1}.", 156 m_log.WarnFormat("[VivoxVoice] Invalid value for roll off ({0}), reset to {1}.",
157 m_vivoxChannelRollOff, CHAN_ROLL_OFF_DEFAULT); 157 m_vivoxChannelRollOff, CHAN_ROLL_OFF_DEFAULT);
158 m_vivoxChannelRollOff = CHAN_ROLL_OFF_DEFAULT; 158 m_vivoxChannelRollOff = CHAN_ROLL_OFF_DEFAULT;
159 } 159 }
160 160
161 if (m_vivoxChannelMaximumRange < CHAN_MAX_RANGE_MIN || m_vivoxChannelMaximumRange > CHAN_MAX_RANGE_MAX) 161 if (m_vivoxChannelMaximumRange < CHAN_MAX_RANGE_MIN || m_vivoxChannelMaximumRange > CHAN_MAX_RANGE_MAX)
162 { 162 {
163 m_log.WarnFormat("[VivoxVoice] Invalid value for maximum range ({0}), reset to {1}.", 163 m_log.WarnFormat("[VivoxVoice] Invalid value for maximum range ({0}), reset to {1}.",
164 m_vivoxChannelMaximumRange, CHAN_MAX_RANGE_DEFAULT); 164 m_vivoxChannelMaximumRange, CHAN_MAX_RANGE_DEFAULT);
165 m_vivoxChannelMaximumRange = CHAN_MAX_RANGE_DEFAULT; 165 m_vivoxChannelMaximumRange = CHAN_MAX_RANGE_DEFAULT;
166 } 166 }
167 167
168 if (m_vivoxChannelClampingDistance < CHAN_CLAMPING_DISTANCE_MIN || 168 if (m_vivoxChannelClampingDistance < CHAN_CLAMPING_DISTANCE_MIN ||
169 m_vivoxChannelClampingDistance > CHAN_CLAMPING_DISTANCE_MAX) 169 m_vivoxChannelClampingDistance > CHAN_CLAMPING_DISTANCE_MAX)
170 { 170 {
171 m_log.WarnFormat("[VivoxVoice] Invalid value for clamping distance ({0}), reset to {1}.", 171 m_log.WarnFormat("[VivoxVoice] Invalid value for clamping distance ({0}), reset to {1}.",
172 m_vivoxChannelClampingDistance, CHAN_CLAMPING_DISTANCE_DEFAULT); 172 m_vivoxChannelClampingDistance, CHAN_CLAMPING_DISTANCE_DEFAULT);
173 m_vivoxChannelClampingDistance = CHAN_CLAMPING_DISTANCE_DEFAULT; 173 m_vivoxChannelClampingDistance = CHAN_CLAMPING_DISTANCE_DEFAULT;
174 } 174 }
@@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
180 case "presentation" : break; 180 case "presentation" : break;
181 case "auditorium" : break; 181 case "auditorium" : break;
182 default : 182 default :
183 m_log.WarnFormat("[VivoxVoice] Invalid value for channel mode ({0}), reset to {1}.", 183 m_log.WarnFormat("[VivoxVoice] Invalid value for channel mode ({0}), reset to {1}.",
184 m_vivoxChannelMode, CHAN_MODE_DEFAULT); 184 m_vivoxChannelMode, CHAN_MODE_DEFAULT);
185 m_vivoxChannelMode = CHAN_MODE_DEFAULT; 185 m_vivoxChannelMode = CHAN_MODE_DEFAULT;
186 break; 186 break;
@@ -191,7 +191,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
191 case "positional" : break; 191 case "positional" : break;
192 case "channel" : break; 192 case "channel" : break;
193 default : 193 default :
194 m_log.WarnFormat("[VivoxVoice] Invalid value for channel type ({0}), reset to {1}.", 194 m_log.WarnFormat("[VivoxVoice] Invalid value for channel type ({0}), reset to {1}.",
195 m_vivoxChannelType, CHAN_TYPE_DEFAULT); 195 m_vivoxChannelType, CHAN_TYPE_DEFAULT);
196 m_vivoxChannelType = CHAN_TYPE_DEFAULT; 196 m_vivoxChannelType = CHAN_TYPE_DEFAULT;
197 break; 197 break;
@@ -230,7 +230,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
230 230
231 public void AddRegion(Scene scene) 231 public void AddRegion(Scene scene)
232 { 232 {
233 if (m_pluginEnabled) 233 if (m_pluginEnabled)
234 { 234 {
235 lock (vlock) 235 lock (vlock)
236 { 236 {
@@ -238,13 +238,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
238 238
239 string sceneUUID = scene.RegionInfo.RegionID.ToString(); 239 string sceneUUID = scene.RegionInfo.RegionID.ToString();
240 string sceneName = scene.RegionInfo.RegionName; 240 string sceneName = scene.RegionInfo.RegionName;
241 241
242 // Make sure that all local channels are deleted. 242 // Make sure that all local channels are deleted.
243 // So we have to search for the children, and then do an 243 // So we have to search for the children, and then do an
244 // iteration over the set of chidren identified. 244 // iteration over the set of chidren identified.
245 // This assumes that there is just one directory per 245 // This assumes that there is just one directory per
246 // region. 246 // region.
247 247
248 if (VivoxTryGetDirectory(sceneUUID + "D", out channelId)) 248 if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
249 { 249 {
250 m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}", 250 m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
@@ -263,7 +263,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
263 { 263 {
264 if (!IsOK(VivoxDeleteChannel(channelId, id))) 264 if (!IsOK(VivoxDeleteChannel(channelId, id)))
265 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); 265 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id);
266 } 266 }
267 } 267 }
268 } 268 }
269 } 269 }
@@ -311,7 +311,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
311 311
312 public void RemoveRegion(Scene scene) 312 public void RemoveRegion(Scene scene)
313 { 313 {
314 if (m_pluginEnabled) 314 if (m_pluginEnabled)
315 { 315 {
316 lock (vlock) 316 lock (vlock)
317 { 317 {
@@ -319,7 +319,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
319 319
320 string sceneUUID = scene.RegionInfo.RegionID.ToString(); 320 string sceneUUID = scene.RegionInfo.RegionID.ToString();
321 string sceneName = scene.RegionInfo.RegionName; 321 string sceneName = scene.RegionInfo.RegionName;
322 322
323 // Make sure that all local channels are deleted. 323 // Make sure that all local channels are deleted.
324 // So we have to search for the children, and then do an 324 // So we have to search for the children, and then do an
325 // iteration over the set of chidren identified. 325 // iteration over the set of chidren identified.
@@ -343,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
343 { 343 {
344 if (!IsOK(VivoxDeleteChannel(channelId, id))) 344 if (!IsOK(VivoxDeleteChannel(channelId, id)))
345 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); 345 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id);
346 } 346 }
347 } 347 }
348 } 348 }
349 } 349 }
@@ -353,7 +353,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
353 353
354 // Remove the channel umbrella entry 354 // Remove the channel umbrella entry
355 355
356 lock (m_parents) 356 lock (m_parents)
357 { 357 {
358 if (m_parents.ContainsKey(sceneUUID)) 358 if (m_parents.ContainsKey(sceneUUID))
359 { 359 {
@@ -375,7 +375,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
375 VivoxLogout(); 375 VivoxLogout();
376 } 376 }
377 377
378 public Type ReplaceableInterface 378 public Type ReplaceableInterface
379 { 379 {
380 get { return null; } 380 get { return null; }
381 } 381 }
@@ -396,11 +396,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
396 // (login, region crossing). We contribute two capabilities to 396 // (login, region crossing). We contribute two capabilities to
397 // the set of capabilities handed back to the client: 397 // the set of capabilities handed back to the client:
398 // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest. 398 // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest.
399 // 399 //
400 // ProvisionVoiceAccountRequest allows the client to obtain 400 // ProvisionVoiceAccountRequest allows the client to obtain
401 // the voice account credentials for the avatar it is 401 // the voice account credentials for the avatar it is
402 // controlling (e.g., user name, password, etc). 402 // controlling (e.g., user name, password, etc).
403 // 403 //
404 // ParcelVoiceInfoRequest is invoked whenever the client 404 // ParcelVoiceInfoRequest is invoked whenever the client
405 // changes from one region or parcel to another. 405 // changes from one region or parcel to another.
406 // 406 //
@@ -493,9 +493,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
493 493
494 if (XmlFind(resp, "response.level0.status", out code)) 494 if (XmlFind(resp, "response.level0.status", out code))
495 { 495 {
496 if (code != "OK") 496 if (code != "OK")
497 { 497 {
498 if (XmlFind(resp, "response.level0.body.code", out code)) 498 if (XmlFind(resp, "response.level0.body.code", out code))
499 { 499 {
500 // If the request was recognized, then this should be set to something 500 // If the request was recognized, then this should be set to something
501 switch (code) 501 switch (code)
@@ -530,27 +530,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
530 switch (code) 530 switch (code)
531 { 531 {
532 case "201" : // Account expired 532 case "201" : // Account expired
533 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : expired credentials", 533 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : expired credentials",
534 avatarName); 534 avatarName);
535 m_adminConnected = false; 535 m_adminConnected = false;
536 retry = DoAdminLogin(); 536 retry = DoAdminLogin();
537 break; 537 break;
538 538
539 case "202" : // Missing credentials 539 case "202" : // Missing credentials
540 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : missing credentials", 540 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : missing credentials",
541 avatarName); 541 avatarName);
542 break; 542 break;
543 543
544 case "212" : // Not authorized 544 case "212" : // Not authorized
545 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : not authorized", 545 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : not authorized",
546 avatarName); 546 avatarName);
547 break; 547 break;
548 548
549 case "300" : // Required parameter missing 549 case "300" : // Required parameter missing
550 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : parameter missing", 550 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : parameter missing",
551 avatarName); 551 avatarName);
552 break; 552 break;
553 553
554 case "400" : // Create failed 554 case "400" : // Create failed
555 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : create failed", 555 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : create failed",
556 avatarName); 556 avatarName);
@@ -558,7 +558,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
558 } 558 }
559 } 559 }
560 break; 560 break;
561 561
562 case "404" : // Failed to retrieve account 562 case "404" : // Failed to retrieve account
563 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Get account information failed : retrieve failed"); 563 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Get account information failed : retrieve failed");
564 // [AMW] Sleep and retry for a fixed period? Or just abandon? 564 // [AMW] Sleep and retry for a fixed period? Or just abandon?
@@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
575 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: Get Account Request failed for \"{0}\"", avatarName); 575 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: Get Account Request failed for \"{0}\"", avatarName);
576 throw new Exception("Unable to execute request"); 576 throw new Exception("Unable to execute request");
577 } 577 }
578 578
579 // Unconditionally change the password on each request 579 // Unconditionally change the password on each request
580 VivoxPassword(agentname, password); 580 VivoxPassword(agentname, password);
581 581
@@ -613,7 +613,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
613 string avatarName = avatar.Name; 613 string avatarName = avatar.Name;
614 614
615 // - check whether we have a region channel in our cache 615 // - check whether we have a region channel in our cache
616 // - if not: 616 // - if not:
617 // create it and cache it 617 // create it and cache it
618 // - send it to the client 618 // - send it to the client
619 // - send channel_uri: as "sip:regionID@m_sipDomain" 619 // - send channel_uri: as "sip:regionID@m_sipDomain"
@@ -622,7 +622,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
622 LLSDParcelVoiceInfoResponse parcelVoiceInfo; 622 LLSDParcelVoiceInfoResponse parcelVoiceInfo;
623 string channel_uri; 623 string channel_uri;
624 624
625 if (null == scene.LandChannel) 625 if (null == scene.LandChannel)
626 throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available", 626 throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available",
627 scene.RegionInfo.RegionName, avatarName)); 627 scene.RegionInfo.RegionName, avatarName));
628 628
@@ -667,15 +667,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
667 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); 667 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds);
668 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); 668 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
669 669
670// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", 670// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}",
671// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); 671// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r);
672 return r; 672 return r;
673 } 673 }
674 catch (Exception e) 674 catch (Exception e)
675 { 675 {
676 m_log.ErrorFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", 676 m_log.ErrorFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later",
677 scene.RegionInfo.RegionName, avatarName, e.Message); 677 scene.RegionInfo.RegionName, avatarName, e.Message);
678 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", 678 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed",
679 scene.RegionInfo.RegionName, avatarName, e.ToString()); 679 scene.RegionInfo.RegionName, avatarName, e.ToString());
680 680
681 return "<llsd><undef /></llsd>"; 681 return "<llsd><undef /></llsd>";
@@ -721,17 +721,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
721 { 721 {
722 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); 722 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
723 landUUID = land.GlobalID.ToString(); 723 landUUID = land.GlobalID.ToString();
724 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", 724 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
725 landName, land.LocalID, landUUID); 725 landName, land.LocalID, landUUID);
726 } 726 }
727 else 727 else
728 { 728 {
729 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName); 729 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName);
730 landUUID = scene.RegionInfo.RegionID.ToString(); 730 landUUID = scene.RegionInfo.RegionID.ToString();
731 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", 731 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
732 landName, land.LocalID, landUUID); 732 landName, land.LocalID, landUUID);
733 } 733 }
734 734
735 lock (vlock) 735 lock (vlock)
736 { 736 {
737 // Added by Adam to help debug channel not availible errors. 737 // Added by Adam to help debug channel not availible errors.
@@ -742,7 +742,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
742 else 742 else
743 throw new Exception("vivox channel uri not available"); 743 throw new Exception("vivox channel uri not available");
744 744
745 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ", 745 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
746 landName, parentId, channelUri); 746 landName, parentId, channelUri);
747 } 747 }
748 748
@@ -817,14 +817,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
817 817
818 /// <summary> 818 /// <summary>
819 /// Create a channel. 819 /// Create a channel.
820 /// Once again, there a multitude of options possible. In the simplest case 820 /// Once again, there a multitude of options possible. In the simplest case
821 /// we specify only the name and get a non-persistent cannel in return. Non 821 /// we specify only the name and get a non-persistent cannel in return. Non
822 /// persistent means that the channel gets deleted if no-one uses it for 822 /// persistent means that the channel gets deleted if no-one uses it for
823 /// 5 hours. To accomodate future requirements, it may be a good idea to 823 /// 5 hours. To accomodate future requirements, it may be a good idea to
824 /// initially create channels under the umbrella of a parent ID based upon 824 /// initially create channels under the umbrella of a parent ID based upon
825 /// the region name. That way we have a context for side channels, if those 825 /// the region name. That way we have a context for side channels, if those
826 /// are required in a later phase. 826 /// are required in a later phase.
827 /// 827 ///
828 /// In this case the call handles parent and description as optional values. 828 /// In this case the call handles parent and description as optional values.
829 /// </summary> 829 /// </summary>
830 private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri) 830 private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
@@ -846,7 +846,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
846 requrl = String.Format("{0}&chan_dist_model={1}", requrl, m_vivoxChannelDistanceModel); 846 requrl = String.Format("{0}&chan_dist_model={1}", requrl, m_vivoxChannelDistanceModel);
847 requrl = String.Format("{0}&chan_max_range={1}", requrl, m_vivoxChannelMaximumRange); 847 requrl = String.Format("{0}&chan_max_range={1}", requrl, m_vivoxChannelMaximumRange);
848 requrl = String.Format("{0}&chan_clamping_distance={1}", requrl, m_vivoxChannelClampingDistance); 848 requrl = String.Format("{0}&chan_clamping_distance={1}", requrl, m_vivoxChannelClampingDistance);
849 849
850 XmlElement resp = VivoxCall(requrl, true); 850 XmlElement resp = VivoxCall(requrl, true);
851 if (XmlFind(resp, "response.level0.body.chan_uri", out channelUri)) 851 if (XmlFind(resp, "response.level0.body.chan_uri", out channelUri))
852 return true; 852 return true;
@@ -889,7 +889,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
889 889
890 /// <summary> 890 /// <summary>
891 /// Retrieve a channel. 891 /// Retrieve a channel.
892 /// Once again, there a multitude of options possible. In the simplest case 892 /// Once again, there a multitude of options possible. In the simplest case
893 /// we specify only the name and get a non-persistent cannel in return. Non 893 /// we specify only the name and get a non-persistent cannel in return. Non
894 /// persistent means that the channel gets deleted if no-one uses it for 894 /// persistent means that the channel gets deleted if no-one uses it for
895 /// 5 hours. To accomodate future requirements, it may be a good idea to 895 /// 5 hours. To accomodate future requirements, it may be a good idea to
@@ -898,7 +898,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
898 /// are required in a later phase. 898 /// are required in a later phase.
899 /// In this case the call handles parent and description as optional values. 899 /// In this case the call handles parent and description as optional values.
900 /// </summary> 900 /// </summary>
901 private bool VivoxTryGetChannel(string channelParent, string channelName, 901 private bool VivoxTryGetChannel(string channelParent, string channelName,
902 out string channelId, out string channelUri) 902 out string channelId, out string channelUri)
903 { 903 {
904 string count; 904 string count;
@@ -1006,7 +1006,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1006 string type; 1006 string type;
1007 1007
1008 // skip if not a directory 1008 // skip if not a directory
1009 if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.type", i, out type) || 1009 if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.type", i, out type) ||
1010 type != "dir") 1010 type != "dir")
1011 continue; 1011 continue;
1012 1012
@@ -1044,7 +1044,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1044 1044
1045 /// <summary> 1045 /// <summary>
1046 /// Delete a channel. 1046 /// Delete a channel.
1047 /// Once again, there a multitude of options possible. In the simplest case 1047 /// Once again, there a multitude of options possible. In the simplest case
1048 /// we specify only the name and get a non-persistent cannel in return. Non 1048 /// we specify only the name and get a non-persistent cannel in return. Non
1049 /// persistent means that the channel gets deleted if no-one uses it for 1049 /// persistent means that the channel gets deleted if no-one uses it for
1050 /// 5 hours. To accomodate future requirements, it may be a good idea to 1050 /// 5 hours. To accomodate future requirements, it may be a good idea to
@@ -1098,7 +1098,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1098 // return VivoxGetChannelById(null, id); 1098 // return VivoxGetChannelById(null, id);
1099 // } 1099 // }
1100 // } 1100 // }
1101 // } 1101 // }
1102 // } 1102 // }
1103 // } 1103 // }
1104 1104
@@ -1106,12 +1106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1106 // return VivoxGetChannel(null, Guid.NewGuid().ToString()); 1106 // return VivoxGetChannel(null, Guid.NewGuid().ToString());
1107 1107
1108 // } 1108 // }
1109 1109
1110 /// <summary> 1110 /// <summary>
1111 /// This method handles the WEB side of making a request over the 1111 /// This method handles the WEB side of making a request over the
1112 /// Vivox interface. The returned values are tansferred to a has 1112 /// Vivox interface. The returned values are tansferred to a has
1113 /// table which is returned as the result. 1113 /// table which is returned as the result.
1114 /// The outcome of the call can be determined by examining the 1114 /// The outcome of the call can be determined by examining the
1115 /// status value in the hash table. 1115 /// status value in the hash table.
1116 /// </summary> 1116 /// </summary>
1117 private XmlElement VivoxCall(string requrl, bool admin) 1117 private XmlElement VivoxCall(string requrl, bool admin)
@@ -1127,7 +1127,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1127 doc = new XmlDocument(); 1127 doc = new XmlDocument();
1128 1128
1129 // Let's serialize all calls to Vivox. Most of these are driven by 1129 // Let's serialize all calls to Vivox. Most of these are driven by
1130 // the clients (CAPs), when the user arrives at the region. We don't 1130 // the clients (CAPs), when the user arrives at the region. We don't
1131 // want to issue many simultaneous http requests to Vivox, because mono 1131 // want to issue many simultaneous http requests to Vivox, because mono
1132 // doesn't like that 1132 // doesn't like that
1133 lock (m_Lock) 1133 lock (m_Lock)
@@ -1173,7 +1173,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1173 1173
1174 /// <summary> 1174 /// <summary>
1175 /// Login has been factored in this way because it gets called 1175 /// Login has been factored in this way because it gets called
1176 /// from several places in the module, and we want it to work 1176 /// from several places in the module, and we want it to work
1177 /// the same way each time. 1177 /// the same way each time.
1178 /// </summary> 1178 /// </summary>
1179 private bool DoAdminLogin() 1179 private bool DoAdminLogin()
@@ -1188,15 +1188,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1188 XmlElement resp = null; 1188 XmlElement resp = null;
1189 1189
1190 resp = VivoxLogin(m_vivoxAdminUser, m_vivoxAdminPassword); 1190 resp = VivoxLogin(m_vivoxAdminUser, m_vivoxAdminPassword);
1191 1191
1192 if (XmlFind(resp, "response.level0.body.status", out status)) 1192 if (XmlFind(resp, "response.level0.body.status", out status))
1193 { 1193 {
1194 if (status == "Ok") 1194 if (status == "Ok")
1195 { 1195 {
1196 m_log.Info("[VivoxVoice] Admin connection established"); 1196 m_log.Info("[VivoxVoice] Admin connection established");
1197 if (XmlFind(resp, "response.level0.body.auth_token", out m_authToken)) 1197 if (XmlFind(resp, "response.level0.body.auth_token", out m_authToken))
1198 { 1198 {
1199 if (m_dumpXml) m_log.DebugFormat("[VivoxVoice] Auth Token <{0}>", 1199 if (m_dumpXml) m_log.DebugFormat("[VivoxVoice] Auth Token <{0}>",
1200 m_authToken); 1200 m_authToken);
1201 m_adminConnected = true; 1201 m_adminConnected = true;
1202 } 1202 }
@@ -1215,9 +1215,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1215 1215
1216 /// <summary> 1216 /// <summary>
1217 /// The XmlScan routine is provided to aid in the 1217 /// The XmlScan routine is provided to aid in the
1218 /// reverse engineering of incompletely 1218 /// reverse engineering of incompletely
1219 /// documented packets returned by the Vivox 1219 /// documented packets returned by the Vivox
1220 /// voice server. It is only called if the 1220 /// voice server. It is only called if the
1221 /// m_dumpXml switch is set. 1221 /// m_dumpXml switch is set.
1222 /// </summary> 1222 /// </summary>
1223 private void XmlScanl(XmlElement e, int index) 1223 private void XmlScanl(XmlElement e, int index)
@@ -1262,7 +1262,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1262 private bool XmlFind(XmlElement root, string tag, int nth, out string result) 1262 private bool XmlFind(XmlElement root, string tag, int nth, out string result)
1263 { 1263 {
1264 if (root == null || tag == null || tag == String.Empty) 1264 if (root == null || tag == null || tag == String.Empty)
1265 { 1265 {
1266 result = String.Empty; 1266 result = String.Empty;
1267 return false; 1267 return false;
1268 } 1268 }
@@ -1273,7 +1273,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1273 { 1273 {
1274 int nth = 0; 1274 int nth = 0;
1275 if (root == null || tag == null || tag == String.Empty) 1275 if (root == null || tag == null || tag == String.Empty)
1276 { 1276 {
1277 result = String.Empty; 1277 result = String.Empty;
1278 return false; 1278 return false;
1279 } 1279 }
@@ -1284,7 +1284,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1284 /// XmlSearch is initially called by XmlFind, and then 1284 /// XmlSearch is initially called by XmlFind, and then
1285 /// recursively called by itself until the document 1285 /// recursively called by itself until the document
1286 /// supplied to XmlFind is either exhausted or the name hierarchy 1286 /// supplied to XmlFind is either exhausted or the name hierarchy
1287 /// is matched. 1287 /// is matched.
1288 /// 1288 ///
1289 /// If the hierarchy is matched, the value is returned in 1289 /// If the hierarchy is matched, the value is returned in
1290 /// result, and true returned as the function's 1290 /// result, and true returned as the function's
@@ -1298,7 +1298,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1298 result = String.Empty; 1298 result = String.Empty;
1299 return false; 1299 return false;
1300 } 1300 }
1301 1301
1302 if (tags.Length-index == 1) 1302 if (tags.Length-index == 1)
1303 { 1303 {
1304 if (nth == 0) 1304 if (nth == 0)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 0aaf95c..8791235 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
125 { 125 {
126 if (!m_groupMessagingEnabled) 126 if (!m_groupMessagingEnabled)
127 return; 127 return;
128 128
129 scene.RegisterModuleInterface<IGroupsMessagingModule>(this); 129 scene.RegisterModuleInterface<IGroupsMessagingModule>(this);
130 130
131 scene.AddCommand( 131 scene.AddCommand(
@@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
136 "This setting turns on very verbose groups messaging debugging", 136 "This setting turns on very verbose groups messaging debugging",
137 HandleDebugGroupsMessagingVerbose); 137 HandleDebugGroupsMessagingVerbose);
138 } 138 }
139 139
140 public void RegionLoaded(Scene scene) 140 public void RegionLoaded(Scene scene)
141 { 141 {
142 if (!m_groupMessagingEnabled) 142 if (!m_groupMessagingEnabled)
@@ -205,7 +205,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
205 m_msgTransferModule = null; 205 m_msgTransferModule = null;
206 } 206 }
207 207
208 public Type ReplaceableInterface 208 public Type ReplaceableInterface
209 { 209 {
210 get { return null; } 210 get { return null; }
211 } 211 }
@@ -253,7 +253,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
253 { 253 {
254 if (m_debugEnabled) 254 if (m_debugEnabled)
255 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 255 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
256 256
257 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); 257 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null);
258 258
259 if (groupInfo != null) 259 if (groupInfo != null)
@@ -270,7 +270,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
270 { 270 {
271 SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null); 271 SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null);
272 } 272 }
273 273
274 public void SendMessageToGroup( 274 public void SendMessageToGroup(
275 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) 275 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition)
276 { 276 {
@@ -294,19 +294,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
294 m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds); 294 m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds);
295 } 295 }
296 296
297 attemptDeliveryUuidSet 297 attemptDeliveryUuidSet
298 = new HashSet<string>(Array.ConvertAll<PresenceInfo, string>(onlineAgents, pi => pi.UserID)); 298 = new HashSet<string>(Array.ConvertAll<PresenceInfo, string>(onlineAgents, pi => pi.UserID));
299 } 299 }
300 else 300 else
301 { 301 {
302 attemptDeliveryUuidSet 302 attemptDeliveryUuidSet
303 = new HashSet<string>(groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString())); 303 = new HashSet<string>(groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString()));
304 304
305 if (m_debugEnabled) 305 if (m_debugEnabled)
306 m_log.DebugFormat( 306 m_log.DebugFormat(
307 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", 307 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members",
308 groupID, groupMembers.Count); 308 groupID, groupMembers.Count);
309 } 309 }
310 310
311 foreach (GroupMembersData member in groupMembers) 311 foreach (GroupMembersData member in groupMembers)
312 { 312 {
@@ -314,9 +314,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
314 { 314 {
315 if (!sendCondition(member)) 315 if (!sendCondition(member))
316 { 316 {
317 if (m_debugEnabled) 317 if (m_debugEnabled)
318 m_log.DebugFormat( 318 m_log.DebugFormat(
319 "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition", 319 "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition",
320 member.AgentID); 320 member.AgentID);
321 321
322 continue; 322 continue;
@@ -325,7 +325,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
325 else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) 325 else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
326 { 326 {
327 // Don't deliver messages to people who have dropped this session 327 // Don't deliver messages to people who have dropped this session
328 if (m_debugEnabled) 328 if (m_debugEnabled)
329 m_log.DebugFormat( 329 m_log.DebugFormat(
330 "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID); 330 "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID);
331 331
@@ -360,9 +360,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
360 // If they're not local, forward across the grid 360 // If they're not local, forward across the grid
361 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); 361 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { });
362 362
363 if (m_debugEnabled) 363 if (m_debugEnabled)
364 m_log.DebugFormat( 364 m_log.DebugFormat(
365 "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms", 365 "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms",
366 member.AgentID, Environment.TickCount - startTick); 366 member.AgentID, Environment.TickCount - startTick);
367 } 367 }
368 else 368 else
@@ -372,9 +372,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
372 ProcessMessageFromGroupSession(msg, client); 372 ProcessMessageFromGroupSession(msg, client);
373 373
374 // Deliver locally, directly 374 // Deliver locally, directly
375 if (m_debugEnabled) 375 if (m_debugEnabled)
376 m_log.DebugFormat( 376 m_log.DebugFormat(
377 "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms", 377 "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms",
378 member.AgentID, Environment.TickCount - startTick); 378 member.AgentID, Environment.TickCount - startTick);
379 } 379 }
380 } 380 }
@@ -385,9 +385,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
385 385
386 m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { }); 386 m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { });
387 387
388 if (m_debugEnabled) 388 if (m_debugEnabled)
389 m_log.DebugFormat( 389 m_log.DebugFormat(
390 "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms", 390 "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms",
391 member.AgentID, Environment.TickCount - startTick); 391 member.AgentID, Environment.TickCount - startTick);
392 } 392 }
393 } 393 }
@@ -397,7 +397,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
397 "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms", 397 "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms",
398 groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick); 398 groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick);
399 } 399 }
400 400
401 #region SimGridEventHandlers 401 #region SimGridEventHandlers
402 402
403 void OnClientLogin(IClientAPI client) 403 void OnClientLogin(IClientAPI client)
@@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
417 // The instant message module will only deliver messages of dialog types: 417 // The instant message module will only deliver messages of dialog types:
418 // MessageFromAgent, StartTyping, StopTyping, MessageFromObject 418 // MessageFromAgent, StartTyping, StopTyping, MessageFromObject
419 // 419 //
420 // Any other message type will not be delivered to a client by the 420 // Any other message type will not be delivered to a client by the
421 // Instant Message Module 421 // Instant Message Module
422 422
423 if (m_debugEnabled) 423 if (m_debugEnabled)
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
428 } 428 }
429 429
430 // Incoming message from a group 430 // Incoming message from a group
431 if ((msg.fromGroup == true) && 431 if ((msg.fromGroup == true) &&
432 ((msg.dialog == (byte)InstantMessageDialog.SessionSend) 432 ((msg.dialog == (byte)InstantMessageDialog.SessionSend)
433 || (msg.dialog == (byte)InstantMessageDialog.SessionAdd) 433 || (msg.dialog == (byte)InstantMessageDialog.SessionAdd)
434 || (msg.dialog == (byte)InstantMessageDialog.SessionDrop))) 434 || (msg.dialog == (byte)InstantMessageDialog.SessionDrop)))
@@ -450,7 +450,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
450 450
451 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) 451 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client)
452 { 452 {
453 if (m_debugEnabled) 453 if (m_debugEnabled)
454 m_log.DebugFormat( 454 m_log.DebugFormat(
455 "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}", 455 "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}",
456 msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog); 456 msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog);
@@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
522 } 522 }
523 } 523 }
524 } 524 }
525 else 525 else
526 { 526 {
527 client.SendInstantMessage(msg); 527 client.SendInstantMessage(msg);
528 } 528 }
@@ -570,7 +570,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
570 if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID); 570 if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID);
571 571
572 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null); 572 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null);
573 573
574 if (groupInfo != null) 574 if (groupInfo != null)
575 { 575 {
576 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); 576 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);
@@ -586,7 +586,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
586 // Send a message from locally connected client to a group 586 // Send a message from locally connected client to a group
587 if ((im.dialog == (byte)InstantMessageDialog.SessionSend)) 587 if ((im.dialog == (byte)InstantMessageDialog.SessionSend))
588 { 588 {
589 if (m_debugEnabled) 589 if (m_debugEnabled)
590 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); 590 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString());
591 591
592 //If this agent is sending a message, then they want to be in the session 592 //If this agent is sending a message, then they want to be in the session
@@ -597,7 +597,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
597 597
598 if ((im.dialog == (byte)InstantMessageDialog.SessionDrop)) 598 if ((im.dialog == (byte)InstantMessageDialog.SessionDrop))
599 { 599 {
600 if (m_debugEnabled) 600 if (m_debugEnabled)
601 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); 601 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString());
602 602
603 m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID); 603 m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID);
@@ -659,7 +659,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
659 /// </summary> 659 /// </summary>
660 private IClientAPI GetActiveClient(UUID agentID) 660 private IClientAPI GetActiveClient(UUID agentID)
661 { 661 {
662 if (m_debugEnabled) 662 if (m_debugEnabled)
663 m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); 663 m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID);
664 664
665 IClientAPI child = null; 665 IClientAPI child = null;
@@ -672,14 +672,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
672 { 672 {
673 if (!sp.IsChildAgent) 673 if (!sp.IsChildAgent)
674 { 674 {
675 if (m_debugEnabled) 675 if (m_debugEnabled)
676 m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name); 676 m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name);
677 677
678 return sp.ControllingClient; 678 return sp.ControllingClient;
679 } 679 }
680 else 680 else
681 { 681 {
682 if (m_debugEnabled) 682 if (m_debugEnabled)
683 m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name); 683 m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name);
684 684
685 child = sp.ControllingClient; 685 child = sp.ControllingClient;
@@ -690,12 +690,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
690 // If we didn't find a root, then just return whichever child we found, or null if none 690 // If we didn't find a root, then just return whichever child we found, or null if none
691 if (child == null) 691 if (child == null)
692 { 692 {
693 if (m_debugEnabled) 693 if (m_debugEnabled)
694 m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); 694 m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID);
695 } 695 }
696 else 696 else
697 { 697 {
698 if (m_debugEnabled) 698 if (m_debugEnabled)
699 m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); 699 m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name);
700 } 700 }
701 701
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 81add13..f0de7d4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -50,19 +50,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
50 /// ; To use this module, you must specify the following in your OpenSim.ini 50 /// ; To use this module, you must specify the following in your OpenSim.ini
51 /// [GROUPS] 51 /// [GROUPS]
52 /// Enabled = true 52 /// Enabled = true
53 /// 53 ///
54 /// Module = GroupsModule 54 /// Module = GroupsModule
55 /// NoticesEnabled = true 55 /// NoticesEnabled = true
56 /// DebugEnabled = true 56 /// DebugEnabled = true
57 /// 57 ///
58 /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector 58 /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector
59 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php 59 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php
60 /// XmlRpcServiceReadKey = 1234 60 /// XmlRpcServiceReadKey = 1234
61 /// XmlRpcServiceWriteKey = 1234 61 /// XmlRpcServiceWriteKey = 1234
62 /// 62 ///
63 /// MessagingModule = GroupsMessagingModule 63 /// MessagingModule = GroupsMessagingModule
64 /// MessagingEnabled = true 64 /// MessagingEnabled = true
65 /// 65 ///
66 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for 66 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for
67 /// ; a problem discovered on some Windows based region servers. Only disable 67 /// ; a problem discovered on some Windows based region servers. Only disable
68 /// ; if you see a large number (dozens) of the following Exceptions: 68 /// ; if you see a large number (dozens) of the following Exceptions:
@@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
332 remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); 332 remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups);
333 } 333 }
334 334
335 335
336 private void OnClientClosed(UUID AgentId, Scene scene) 336 private void OnClientClosed(UUID AgentId, Scene scene)
337 { 337 {
338 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 338 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -387,7 +387,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
387 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 387 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
388 388
389 string GroupName; 389 string GroupName;
390 390
391 GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null); 391 GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null);
392 if (group != null) 392 if (group != null)
393 { 393 {
@@ -403,9 +403,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
403 403
404 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 404 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
405 { 405 {
406 if (m_debugEnabled) 406 if (m_debugEnabled)
407 m_log.DebugFormat( 407 m_log.DebugFormat(
408 "[GROUPS]: {0} called for {1}, message type {2}", 408 "[GROUPS]: {0} called for {1}, message type {2}",
409 System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog); 409 System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog);
410 410
411 // Group invitations 411 // Group invitations
@@ -569,20 +569,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
569 if (targetUser != null) 569 if (targetUser != null)
570 { 570 {
571 m_log.DebugFormat( 571 m_log.DebugFormat(
572 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", 572 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})",
573 NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); 573 NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices);
574 } 574 }
575 else 575 else
576 { 576 {
577 m_log.DebugFormat( 577 m_log.DebugFormat(
578 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", 578 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})",
579 NoticeID, member.AgentID, member.AcceptNotices); 579 NoticeID, member.AgentID, member.AcceptNotices);
580 } 580 }
581 } 581 }
582 } 582 }
583 } 583 }
584 584
585 GridInstantMessage msg 585 GridInstantMessage msg
586 = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); 586 = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
587 587
588 if (m_groupsMessagingModule != null) 588 if (m_groupsMessagingModule != null)
@@ -599,7 +599,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
599 599
600 UUID noticeID = new UUID(im.imSessionID); 600 UUID noticeID = new UUID(im.imSessionID);
601 601
602 if (m_debugEnabled) 602 if (m_debugEnabled)
603 m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId); 603 m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId);
604 604
605 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); 605 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID);
@@ -625,10 +625,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
625 } 625 }
626 else 626 else
627 { 627 {
628 if (m_debugEnabled) 628 if (m_debugEnabled)
629 m_log.DebugFormat( 629 m_log.DebugFormat(
630 "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.", 630 "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.",
631 noticeID, remoteClient.AgentId); 631 noticeID, remoteClient.AgentId);
632 } 632 }
633 } 633 }
634 634
@@ -698,7 +698,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
698 { 698 {
699 return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name); 699 return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name);
700 } 700 }
701 701
702 public void ActivateGroup(IClientAPI remoteClient, UUID groupID) 702 public void ActivateGroup(IClientAPI remoteClient, UUID groupID)
703 { 703 {
704 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 704 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -739,10 +739,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
739 739
740 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 740 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
741 { 741 {
742 if (m_debugEnabled) 742 if (m_debugEnabled)
743 m_log.DebugFormat( 743 m_log.DebugFormat(
744 "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); 744 "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name);
745 745
746 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); 746 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
747 747
748 if (m_debugEnabled) 748 if (m_debugEnabled)
@@ -829,7 +829,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
829 829
830 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) 830 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID)
831 { 831 {
832 if (m_debugEnabled) 832 if (m_debugEnabled)
833 m_log.DebugFormat( 833 m_log.DebugFormat(
834 "[GROUPS]: {0} called with groupID={1}, agentID={2}", 834 "[GROUPS]: {0} called with groupID={1}, agentID={2}",
835 System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); 835 System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID);
@@ -926,7 +926,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
926 if (membership != null) 926 if (membership != null)
927 { 927 {
928 return membership.GroupTitle; 928 return membership.GroupTitle;
929 } 929 }
930 return string.Empty; 930 return string.Empty;
931 } 931 }
932 932
@@ -999,7 +999,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
999 case 1: 999 case 1:
1000 // Remove 1000 // Remove
1001 m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID); 1001 m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID);
1002 1002
1003 break; 1003 break;
1004 default: 1004 default:
1005 m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); 1005 m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes);
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1185 1185
1186 // Send Message to Ejectee 1186 // Send Message to Ejectee
1187 GridInstantMessage msg = new GridInstantMessage(); 1187 GridInstantMessage msg = new GridInstantMessage();
1188 1188
1189 string ejecteeName = "Unknown member"; 1189 string ejecteeName = "Unknown member";
1190 // if local send a normal message 1190 // if local send a normal message
1191 if(ejecteeClient != null) 1191 if(ejecteeClient != null)
@@ -1219,7 +1219,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1219 msg.timestamp = 0; 1219 msg.timestamp = 0;
1220 msg.fromAgentName = agentName; 1220 msg.fromAgentName = agentName;
1221 msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName); 1221 msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName);
1222// 1222//
1223 msg.fromGroup = false; 1223 msg.fromGroup = false;
1224 msg.offline = (byte)0; 1224 msg.offline = (byte)0;
1225 msg.ParentEstateID = 0; 1225 msg.ParentEstateID = 0;
@@ -1470,7 +1470,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1470 membershipArray = membershipData.ToArray(); 1470 membershipArray = membershipData.ToArray();
1471 } 1471 }
1472 } 1472 }
1473 1473
1474 if (m_debugEnabled) 1474 if (m_debugEnabled)
1475 { 1475 {
1476 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); 1476 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
index cff3212..08c7096 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
43 /// <returns></returns> 43 /// <returns></returns>
44 /// <param name='RequestingAgentID'>The UUID of the user making the request.</param> 44 /// <param name='RequestingAgentID'>The UUID of the user making the request.</param>
45 /// <param name='GroupID'> 45 /// <param name='GroupID'>
46 /// The ID of the record to retrieve. 46 /// The ID of the record to retrieve.
47 /// GroupName may be specified instead, in which case this parameter will be UUID.Zero 47 /// GroupName may be specified instead, in which case this parameter will be UUID.Zero
48 /// </param> 48 /// </param>
49 /// <param name='GroupName'> 49 /// <param name='GroupName'>
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
89 /// If the user is a member of the group then the data structure is returned. If not, then null is returned. 89 /// If the user is a member of the group then the data structure is returned. If not, then null is returned.
90 /// </returns> 90 /// </returns>
91 GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); 91 GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID);
92 92
93 /// <summary> 93 /// <summary>
94 /// Get information about the groups to which a user belongs. 94 /// Get information about the groups to which a user belongs.
95 /// </summary> 95 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
index 2c45712..98c7ed4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
@@ -48,16 +48,16 @@ using OpenSim.Services.Interfaces;
48/*************************************************************************** 48/***************************************************************************
49 * Simian Data Map 49 * Simian Data Map
50 * =============== 50 * ===============
51 * 51 *
52 * OwnerID -> Type -> Key 52 * OwnerID -> Type -> Key
53 * ----------------------- 53 * -----------------------
54 * 54 *
55 * UserID -> Group -> ActiveGroup 55 * UserID -> Group -> ActiveGroup
56 * + GroupID 56 * + GroupID
57 * 57 *
58 * UserID -> GroupSessionDropped -> GroupID 58 * UserID -> GroupSessionDropped -> GroupID
59 * UserID -> GroupSessionInvited -> GroupID 59 * UserID -> GroupSessionInvited -> GroupID
60 * 60 *
61 * UserID -> GroupMember -> GroupID 61 * UserID -> GroupMember -> GroupID
62 * + SelectedRoleID [UUID] 62 * + SelectedRoleID [UUID]
63 * + AcceptNotices [bool] 63 * + AcceptNotices [bool]
@@ -65,9 +65,9 @@ using OpenSim.Services.Interfaces;
65 * + Contribution [int] 65 * + Contribution [int]
66 * 66 *
67 * UserID -> GroupRole[GroupID] -> RoleID 67 * UserID -> GroupRole[GroupID] -> RoleID
68 * 68 *
69 * 69 *
70 * GroupID -> Group -> GroupName 70 * GroupID -> Group -> GroupName
71 * + Charter 71 * + Charter
72 * + ShowInList 72 * + ShowInList
73 * + InsigniaID 73 * + InsigniaID
@@ -79,17 +79,17 @@ using OpenSim.Services.Interfaces;
79 * + EveryonePowers 79 * + EveryonePowers
80 * + OwnerRoleID 80 * + OwnerRoleID
81 * + OwnersPowers 81 * + OwnersPowers
82 * 82 *
83 * GroupID -> GroupRole -> RoleID 83 * GroupID -> GroupRole -> RoleID
84 * + Name 84 * + Name
85 * + Description 85 * + Description
86 * + Title 86 * + Title
87 * + Powers 87 * + Powers
88 * 88 *
89 * GroupID -> GroupMemberInvite -> InviteID 89 * GroupID -> GroupMemberInvite -> InviteID
90 * + AgentID 90 * + AgentID
91 * + RoleID 91 * + RoleID
92 * 92 *
93 * GroupID -> GroupNotice -> NoticeID 93 * GroupID -> GroupNotice -> NoticeID
94 * + TimeStamp [uint] 94 * + TimeStamp [uint]
95 * + FromName [string] 95 * + FromName [string]
@@ -106,12 +106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
106 { 106 {
107 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 107 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
108 108
109 public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | 109 public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome |
110 GroupPowers.Accountable | 110 GroupPowers.Accountable |
111 GroupPowers.JoinChat | 111 GroupPowers.JoinChat |
112 GroupPowers.AllowVoiceChat | 112 GroupPowers.AllowVoiceChat |
113 GroupPowers.ReceiveNotices | 113 GroupPowers.ReceiveNotices |
114 GroupPowers.StartProposal | 114 GroupPowers.StartProposal |
115 GroupPowers.VoteOnProposal; 115 GroupPowers.VoteOnProposal;
116 116
117 // Would this be cleaner as (GroupPowers)ulong.MaxValue; 117 // Would this be cleaner as (GroupPowers)ulong.MaxValue;
@@ -168,12 +168,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
168 private bool m_debugEnabled = false; 168 private bool m_debugEnabled = false;
169 169
170 private Dictionary<string, bool> m_pendingRequests = new Dictionary<string,bool>(); 170 private Dictionary<string, bool> m_pendingRequests = new Dictionary<string,bool>();
171 171
172 private ExpiringCache<string, OSDMap> m_memoryCache; 172 private ExpiringCache<string, OSDMap> m_memoryCache;
173 private int m_cacheTimeout = 30; 173 private int m_cacheTimeout = 30;
174 174
175 // private IUserAccountService m_accountService = null; 175 // private IUserAccountService m_accountService = null;
176 176
177 177
178 #region Region Module interfaceBase Members 178 #region Region Module interfaceBase Members
179 179
@@ -229,10 +229,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
229 m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout); 229 m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout);
230 } 230 }
231 231
232 232
233 233
234 m_memoryCache = new ExpiringCache<string,OSDMap>(); 234 m_memoryCache = new ExpiringCache<string,OSDMap>();
235 235
236 236
237 // If we got all the config options we need, lets start'er'up 237 // If we got all the config options we need, lets start'er'up
238 m_connectorEnabled = true; 238 m_connectorEnabled = true;
@@ -287,8 +287,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
287 /// <summary> 287 /// <summary>
288 /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. 288 /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role.
289 /// </summary> 289 /// </summary>
290 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, 290 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID,
291 int membershipFee, bool openEnrollment, bool allowPublish, 291 int membershipFee, bool openEnrollment, bool allowPublish,
292 bool maturePublish, UUID founderID) 292 bool maturePublish, UUID founderID)
293 { 293 {
294 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 294 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -313,7 +313,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
313 { 313 {
314 AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); 314 AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers);
315 AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); 315 AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers);
316 316
317 AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); 317 AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID);
318 318
319 return GroupID; 319 return GroupID;
@@ -325,8 +325,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
325 } 325 }
326 326
327 327
328 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, 328 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
329 UUID insigniaID, int membershipFee, bool openEnrollment, 329 UUID insigniaID, int membershipFee, bool openEnrollment,
330 bool allowPublish, bool maturePublish) 330 bool allowPublish, bool maturePublish)
331 { 331 {
332 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 332 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
350 } 350 }
351 351
352 352
353 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 353 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
354 string title, ulong powers) 354 string title, ulong powers)
355 { 355 {
356 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 356 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
393 } 393 }
394 394
395 395
396 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 396 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
397 string title, ulong powers) 397 string title, ulong powers)
398 { 398 {
399 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 399 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -434,7 +434,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
434 { 434 {
435 return null; 435 return null;
436 } 436 }
437 } 437 }
438 else if (!string.IsNullOrEmpty(groupName)) 438 else if (!string.IsNullOrEmpty(groupName))
439 { 439 {
440 if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) 440 if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap))
@@ -481,7 +481,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
481 { 481 {
482 MemberGroupProfile.Charter = groupProfile["Charter"].AsString(); 482 MemberGroupProfile.Charter = groupProfile["Charter"].AsString();
483 } 483 }
484 484
485 MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1"; 485 MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1";
486 MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID(); 486 MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID();
487 MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger(); 487 MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger();
@@ -489,7 +489,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
489 MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean(); 489 MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean();
490 MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean(); 490 MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean();
491 MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();; 491 MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();;
492 MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID(); 492 MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID();
493 493
494 Dictionary<UUID, OSDMap> Members; 494 Dictionary<UUID, OSDMap> Members;
495 if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members)) 495 if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members))
@@ -546,7 +546,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
546 { 546 {
547 GroupMemberInfo = new OSDMap(); 547 GroupMemberInfo = new OSDMap();
548 } 548 }
549 549
550 GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices); 550 GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices);
551 GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile); 551 GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile);
552 GroupMemberInfo["Contribution"] = OSD.FromInteger(0); 552 GroupMemberInfo["Contribution"] = OSD.FromInteger(0);
@@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
624 // Remove Group Member information for this group 624 // Remove Group Member information for this group
625 SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString()); 625 SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString());
626 626
627 // By using a Simian Generics Type consisting of a prefix and a groupID, 627 // By using a Simian Generics Type consisting of a prefix and a groupID,
628 // combined with RoleID as key allows us to get a list of roles a particular member 628 // combined with RoleID as key allows us to get a list of roles a particular member
629 // of a group is assigned to. 629 // of a group is assigned to.
630 string GroupRoleMemberType = "GroupRole" + groupID.ToString(); 630 string GroupRoleMemberType = "GroupRole" + groupID.ToString();
@@ -696,7 +696,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
696 { 696 {
697 data.members = 0; 697 data.members = 0;
698 } 698 }
699 699
700 // TODO: sort results? 700 // TODO: sort results?
701 // data.searchOrder = order; 701 // data.searchOrder = order;
702 702
@@ -721,8 +721,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
721 data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); 721 data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
722 data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); 722 data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
723 data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); 723 data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean();
724 data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); 724 data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID();
725 725
726 /////////////////////////////// 726 ///////////////////////////////
727 // Agent Specific Information: 727 // Agent Specific Information:
728 // 728 //
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
730 if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) 730 if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup))
731 { 731 {
732 data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); 732 data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID);
733 } 733 }
734 734
735 /////////////////////////////// 735 ///////////////////////////////
736 // Role Specific Information: 736 // Role Specific Information:
@@ -740,8 +740,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
740 { 740 {
741 data.GroupTitle = GroupRoleInfo["Title"].AsString(); 741 data.GroupTitle = GroupRoleInfo["Title"].AsString();
742 data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); 742 data.GroupPowers = GroupRoleInfo["Powers"].AsULong();
743 } 743 }
744 744
745 /////////////////////////////// 745 ///////////////////////////////
746 // Group Specific Information: 746 // Group Specific Information:
747 // 747 //
@@ -759,7 +759,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
759 data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); 759 data.MembershipFee = GroupInfo["MembershipFee"].AsInteger();
760 data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); 760 data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean();
761 data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); 761 data.ShowInList = GroupInfo["ShowInList"].AsBoolean();
762 } 762 }
763 } 763 }
764 764
765 return data; 765 return data;
@@ -794,7 +794,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
794 memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key))); 794 memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key)));
795 } 795 }
796 } 796 }
797 797
798 return memberships; 798 return memberships;
799 } 799 }
800 800
@@ -1017,7 +1017,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1017 Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket); 1017 Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket);
1018 1018
1019 SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice); 1019 SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice);
1020 1020
1021 } 1021 }
1022 #endregion 1022 #endregion
1023 1023
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1250 { "OwnerID", ownerID.ToString() }, 1250 { "OwnerID", ownerID.ToString() },
1251 { "Type", type } 1251 { "Type", type }
1252 }; 1252 };
1253 1253
1254 1254
1255 1255
1256 OSDMap response = CachedPostRequest(requestArgs); 1256 OSDMap response = CachedPostRequest(requestArgs);
@@ -1357,7 +1357,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1357 || requestArgs["RequestMethod"] == "AddGeneric") 1357 || requestArgs["RequestMethod"] == "AddGeneric")
1358 { 1358 {
1359 m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache"); 1359 m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache");
1360 1360
1361 // Any and all updates cause the cache to clear 1361 // Any and all updates cause the cache to clear
1362 m_memoryCache.Clear(); 1362 m_memoryCache.Clear();
1363 1363
@@ -1383,14 +1383,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1383 { 1383 {
1384 if (m_memoryCache.TryGetValue(CacheKey, out response)) 1384 if (m_memoryCache.TryGetValue(CacheKey, out response))
1385 return response; 1385 return response;
1386 1386
1387 if (! m_pendingRequests.ContainsKey(CacheKey)) 1387 if (! m_pendingRequests.ContainsKey(CacheKey))
1388 { 1388 {
1389 m_pendingRequests.Add(CacheKey,true); 1389 m_pendingRequests.Add(CacheKey,true);
1390 firstRequest = true; 1390 firstRequest = true;
1391 } 1391 }
1392 } 1392 }
1393 1393
1394 if (firstRequest) 1394 if (firstRequest)
1395 { 1395 {
1396 // if it wasn't in the cache, pass the request to the Simian Grid Services 1396 // if it wasn't in the cache, pass the request to the Simian Grid Services
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1402 { 1402 {
1403 m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey); 1403 m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey);
1404 } 1404 }
1405 1405
1406 // and cache the response 1406 // and cache the response
1407 lock (m_memoryCache) 1407 lock (m_memoryCache)
1408 { 1408 {
@@ -1420,7 +1420,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1420 // { 1420 // {
1421 // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache"); 1421 // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache");
1422 // Util.PrintCallStack(); 1422 // Util.PrintCallStack();
1423 1423
1424 // // if it wasn't in the cache, pass the request to the Simian Grid Services 1424 // // if it wasn't in the cache, pass the request to the Simian Grid Services
1425 // response = WebUtil.PostToService(m_groupsServerURI, requestArgs); 1425 // response = WebUtil.PostToService(m_groupsServerURI, requestArgs);
1426 1426
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
index a942516..ccfcd8b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
@@ -77,12 +77,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
77/* AgentGroupDataUpdate is udp 77/* AgentGroupDataUpdate is udp
78 TestHelpers.InMethod(); 78 TestHelpers.InMethod();
79// TestHelpers.EnableLogging(); 79// TestHelpers.EnableLogging();
80 80
81 TestScene scene = new SceneHelpers().SetupScene(); 81 TestScene scene = new SceneHelpers().SetupScene();
82 IConfigSource configSource = new IniConfigSource(); 82 IConfigSource configSource = new IniConfigSource();
83 IConfig config = configSource.AddConfig("Groups"); 83 IConfig config = configSource.AddConfig("Groups");
84 config.Set("Enabled", true); 84 config.Set("Enabled", true);
85 config.Set("Module", "GroupsModule"); 85 config.Set("Module", "GroupsModule");
86 config.Set("DebugEnabled", true); 86 config.Set("DebugEnabled", true);
87 87
88 GroupsModule gm = new GroupsModule(); 88 GroupsModule gm = new GroupsModule();
@@ -124,8 +124,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
124 124
125 Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response"); 125 Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response");
126 126
127 // TODO: More checking of more actual event data. 127 // TODO: More checking of more actual event data.
128*/ 128*/
129 } 129 }
130 130
131 [Test] 131 [Test]
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
133 { 133 {
134 TestHelpers.InMethod(); 134 TestHelpers.InMethod();
135// TestHelpers.EnableLogging(); 135// TestHelpers.EnableLogging();
136 136
137 TestScene scene = new SceneHelpers().SetupScene(); 137 TestScene scene = new SceneHelpers().SetupScene();
138 138
139 MessageTransferModule mtm = new MessageTransferModule(); 139 MessageTransferModule mtm = new MessageTransferModule();
@@ -144,12 +144,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
144 IConfigSource configSource = new IniConfigSource(); 144 IConfigSource configSource = new IniConfigSource();
145 145
146 { 146 {
147 IConfig config = configSource.AddConfig("Messaging"); 147 IConfig config = configSource.AddConfig("Messaging");
148 config.Set("MessageTransferModule", mtm.Name); 148 config.Set("MessageTransferModule", mtm.Name);
149 } 149 }
150 150
151 { 151 {
152 IConfig config = configSource.AddConfig("Groups"); 152 IConfig config = configSource.AddConfig("Groups");
153 config.Set("Enabled", true); 153 config.Set("Enabled", true);
154 config.Set("Module", gm.Name); 154 config.Set("Module", gm.Name);
155 config.Set("DebugEnabled", true); 155 config.Set("DebugEnabled", true);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index eb64f71..50d3f94 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -53,17 +53,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
53 53
54 private bool m_debugEnabled = false; 54 private bool m_debugEnabled = false;
55 55
56 public const GroupPowers DefaultEveryonePowers 56 public const GroupPowers DefaultEveryonePowers
57 = GroupPowers.AllowSetHome 57 = GroupPowers.AllowSetHome
58 | GroupPowers.Accountable 58 | GroupPowers.Accountable
59 | GroupPowers.JoinChat 59 | GroupPowers.JoinChat
60 | GroupPowers.AllowVoiceChat 60 | GroupPowers.AllowVoiceChat
61 | GroupPowers.ReceiveNotices 61 | GroupPowers.ReceiveNotices
62 | GroupPowers.StartProposal 62 | GroupPowers.StartProposal
63 | GroupPowers.VoteOnProposal; 63 | GroupPowers.VoteOnProposal;
64 64
65 // Would this be cleaner as (GroupPowers)ulong.MaxValue? 65 // Would this be cleaner as (GroupPowers)ulong.MaxValue?
66 public const GroupPowers DefaultOwnerPowers 66 public const GroupPowers DefaultOwnerPowers
67 = GroupPowers.Accountable 67 = GroupPowers.Accountable
68 | GroupPowers.AllowEditLand 68 | GroupPowers.AllowEditLand
69 | GroupPowers.AllowFly 69 | GroupPowers.AllowFly
@@ -823,7 +823,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
823 823
824 if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID)) 824 if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID))
825 m_groupsAgentsInvitedToChatSession[groupID].Add(agentID); 825 m_groupsAgentsInvitedToChatSession[groupID].Add(agentID);
826 } 826 }
827 827
828 private void CreateGroupChatSessionTracking(UUID groupID) 828 private void CreateGroupChatSessionTracking(UUID groupID)
829 { 829 {
@@ -1051,7 +1051,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1051 private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData) 1051 private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData)
1052 { 1052 {
1053 m_log.ErrorFormat( 1053 m_log.ErrorFormat(
1054 "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}", 1054 "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}",
1055 function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData)); 1055 function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData));
1056 } 1056 }
1057 1057
@@ -1151,7 +1151,7 @@ namespace Nwc.XmlRpc
1151 { 1151 {
1152 _serializer.Serialize(xml, this); 1152 _serializer.Serialize(xml, this);
1153 xml.Flush(); 1153 xml.Flush();
1154 } 1154 }
1155 } 1155 }
1156 1156
1157 XmlRpcResponse resp; 1157 XmlRpcResponse resp;
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
index 4e766eb..0436f96 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Region.DataSnapshot
101 101
102 public void Initialise(IConfigSource config) 102 public void Initialise(IConfigSource config)
103 { 103 {
104 if (!m_configLoaded) 104 if (!m_configLoaded)
105 { 105 {
106 m_configLoaded = true; 106 m_configLoaded = true;
107 //m_log.Debug("[DATASNAPSHOT]: Loading configuration"); 107 //m_log.Debug("[DATASNAPSHOT]: Loading configuration");
@@ -248,7 +248,7 @@ namespace OpenSim.Region.DataSnapshot
248 m_snapStore.ForceSceneStale(scene); 248 m_snapStore.ForceSceneStale(scene);
249 } 249 }
250 250
251 public void Close() 251 public void Close()
252 { 252 {
253 if (!m_enabled) 253 if (!m_enabled)
254 return; 254 return;
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
index eb2867d..8e6a30e 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
143 143
144 LandData parcel = land.LandData; 144 LandData parcel = land.LandData;
145 if (m_parent.ExposureLevel.Equals("all") || 145 if (m_parent.ExposureLevel.Equals("all") ||
146 (m_parent.ExposureLevel.Equals("minimum") && 146 (m_parent.ExposureLevel.Equals("minimum") &&
147 (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) 147 (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory))
148 { 148 {
149 149
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs
index bbf7168..95a2dd6 100644
--- a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs
@@ -46,12 +46,12 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared
46 /// </summary> 46 /// </summary>
47 /// <remarks> 47 /// <remarks>
48 /// This module is the simplest possible example of a non-shared region module (a module where each scene/region 48 /// This module is the simplest possible example of a non-shared region module (a module where each scene/region
49 /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then 49 /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then
50 /// please create a separate class. 50 /// please create a separate class.
51 /// 51 ///
52 /// This module is not active by default. If you want to see it in action, 52 /// This module is not active by default. If you want to see it in action,
53 /// then just uncomment the line below starting with [Extension(Path... 53 /// then just uncomment the line below starting with [Extension(Path...
54 /// 54 ///
55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log 55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log
56 /// file. 56 /// file.
57 /// </remarks> 57 /// </remarks>
@@ -59,34 +59,34 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared
59 public class BareBonesNonSharedModule : INonSharedRegionModule 59 public class BareBonesNonSharedModule : INonSharedRegionModule
60 { 60 {
61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 public string Name { get { return "Bare Bones Non Shared Module"; } } 63 public string Name { get { return "Bare Bones Non Shared Module"; } }
64 64
65 public Type ReplaceableInterface { get { return null; } } 65 public Type ReplaceableInterface { get { return null; } }
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE"); 69 m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE");
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74 m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE"); 74 m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE");
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); 79 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName);
80 } 80 }
81 81
82 public void RemoveRegion(Scene scene) 82 public void RemoveRegion(Scene scene)
83 { 83 {
84 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 84 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
85 } 85 }
86 86
87 public void RegionLoaded(Scene scene) 87 public void RegionLoaded(Scene scene)
88 { 88 {
89 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); 89 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName);
90 } 90 }
91 } 91 }
92} \ No newline at end of file 92} \ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
index 46fea3e..1271e3f 100644
--- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
@@ -46,52 +46,52 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesShared
46 /// </summary> 46 /// </summary>
47 /// <remarks> 47 /// <remarks>
48 /// This module is the simplest possible example of a shared region module (a module which is shared by every 48 /// This module is the simplest possible example of a shared region module (a module which is shared by every
49 /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then 49 /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then
50 /// please create a separate class. 50 /// please create a separate class.
51 /// 51 ///
52 /// This module is not active by default. If you want to see it in action, 52 /// This module is not active by default. If you want to see it in action,
53 /// then just uncomment the line below starting with [Extension(Path... 53 /// then just uncomment the line below starting with [Extension(Path...
54 /// 54 ///
55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log 55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log
56 /// file. 56 /// file.
57 /// </remarks> 57 /// </remarks>
58 //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")] 58 //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")]
59 public class BareBonesSharedModule : ISharedRegionModule 59 public class BareBonesSharedModule : ISharedRegionModule
60 { 60 {
61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 public string Name { get { return "Bare Bones Shared Module"; } } 63 public string Name { get { return "Bare Bones Shared Module"; } }
64 64
65 public Type ReplaceableInterface { get { return null; } } 65 public Type ReplaceableInterface { get { return null; } }
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE"); 69 m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE");
70 } 70 }
71 71
72 public void PostInitialise() 72 public void PostInitialise()
73 { 73 {
74 m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE"); 74 m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE");
75 } 75 }
76 76
77 public void Close() 77 public void Close()
78 { 78 {
79 m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE"); 79 m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE");
80 } 80 }
81 81
82 public void AddRegion(Scene scene) 82 public void AddRegion(Scene scene)
83 { 83 {
84 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); 84 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName);
85 } 85 }
86 86
87 public void RemoveRegion(Scene scene) 87 public void RemoveRegion(Scene scene)
88 { 88 {
89 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 89 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
90 } 90 }
91 91
92 public void RegionLoaded(Scene scene) 92 public void RegionLoaded(Scene scene)
93 { 93 {
94 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); 94 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName);
95 } 95 }
96 } 96 }
97} \ No newline at end of file 97} \ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs
index 5bf0ed4..0747cc0 100644
--- a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs
@@ -40,7 +40,7 @@ using OpenSim.Framework.Servers.HttpServer;
40 40
41namespace OpenSim.Region.OptionalModules.WebSocketEchoModule 41namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
42{ 42{
43 43
44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")] 44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")]
45 public class WebSocketEchoModule : ISharedRegionModule 45 public class WebSocketEchoModule : ISharedRegionModule
46 { 46 {
@@ -111,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
111 obj.SendPingCheck(); 111 obj.SendPingCheck();
112 } 112 }
113 113
114 114
115 private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata) 115 private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata)
116 { 116 {
117 WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler; 117 WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler;
@@ -136,14 +136,14 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
136 obj.Dispose(); 136 obj.Dispose();
137 } 137 }
138 138
139 // Shutting down.. so shut down all sockets. 139 // Shutting down.. so shut down all sockets.
140 // Note.. this should be done outside of an ienumerable if you're also hook to the close event. 140 // Note.. this should be done outside of an ienumerable if you're also hook to the close event.
141 public void Close() 141 public void Close()
142 { 142 {
143 if (!enabled) 143 if (!enabled)
144 return; 144 return;
145 145
146 // We convert this to a for loop so we're not in in an IEnumerable when the close 146 // We convert this to a for loop so we're not in in an IEnumerable when the close
147 //call triggers an event which then removes item from _activeHandlers that we're enumerating 147 //call triggers an event which then removes item from _activeHandlers that we're enumerating
148 WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count]; 148 WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count];
149 _activeHandlers.CopyTo(items); 149 _activeHandlers.CopyTo(items);
diff --git a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs
index a25e034..95bb13e 100644
--- a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs
+++ b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs
@@ -48,11 +48,11 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring
48 protected Scene m_scene; 48 protected Scene m_scene;
49 49
50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 public string Name { get { return "Services Health Monitoring Module"; } } 52 public string Name { get { return "Services Health Monitoring Module"; } }
53 53
54 public Type ReplaceableInterface { get { return null; } } 54 public Type ReplaceableInterface { get { return null; } }
55 55
56 public void Initialise(IConfigSource source) 56 public void Initialise(IConfigSource source)
57 { 57 {
58 } 58 }
@@ -64,7 +64,7 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring
64 public void Close() 64 public void Close()
65 { 65 {
66 } 66 }
67 67
68 public void AddRegion(Scene scene) 68 public void AddRegion(Scene scene)
69 { 69 {
70 if (m_scene == null) 70 if (m_scene == null)
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
index b259f52..52fa908 100644
--- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
+++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
@@ -59,8 +59,8 @@ namespace OpenSim.Region.OptionalModules.Materials
59 { 59 {
60 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 60 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
61 61
62 public string Name { get { return "MaterialsModule"; } } 62 public string Name { get { return "MaterialsModule"; } }
63 63
64 public Type ReplaceableInterface { get { return null; } } 64 public Type ReplaceableInterface { get { return null; } }
65 65
66 IAssetCache m_cache; 66 IAssetCache m_cache;
@@ -88,13 +88,13 @@ namespace OpenSim.Region.OptionalModules.Materials
88 if (m_enabled) 88 if (m_enabled)
89 m_log.DebugFormat("[Materials]: Initialized"); 89 m_log.DebugFormat("[Materials]: Initialized");
90 } 90 }
91 91
92 public void Close() 92 public void Close()
93 { 93 {
94 if (!m_enabled) 94 if (!m_enabled)
95 return; 95 return;
96 } 96 }
97 97
98 public void AddRegion(Scene scene) 98 public void AddRegion(Scene scene)
99 { 99 {
100 if (!m_enabled) 100 if (!m_enabled)
@@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Materials
152 m_scene.AssetService.Store(a); 152 m_scene.AssetService.Store(a);
153 } 153 }
154 }); 154 });
155 } 155 }
156 } 156 }
157 157
158 private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj) 158 private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj)
@@ -166,7 +166,7 @@ namespace OpenSim.Region.OptionalModules.Materials
166 { 166 {
167 string capsBase = "/CAPS/" + caps.CapsObjectPath; 167 string capsBase = "/CAPS/" + caps.CapsObjectPath;
168 168
169 IRequestHandler renderMaterialsPostHandler 169 IRequestHandler renderMaterialsPostHandler
170 = new RestStreamHandler("POST", capsBase + "/", 170 = new RestStreamHandler("POST", capsBase + "/",
171 (request, path, param, httpRequest, httpResponse) 171 (request, path, param, httpRequest, httpResponse)
172 => RenderMaterialsPostCap(request, agentID), 172 => RenderMaterialsPostCap(request, agentID),
@@ -177,7 +177,7 @@ namespace OpenSim.Region.OptionalModules.Materials
177 // and POST handlers, (at least at the time this was originally written), so we first set up a POST 177 // and POST handlers, (at least at the time this was originally written), so we first set up a POST
178 // handler normally and then add a GET handler via MainServer 178 // handler normally and then add a GET handler via MainServer
179 179
180 IRequestHandler renderMaterialsGetHandler 180 IRequestHandler renderMaterialsGetHandler
181 = new RestStreamHandler("GET", capsBase + "/", 181 = new RestStreamHandler("GET", capsBase + "/",
182 (request, path, param, httpRequest, httpResponse) 182 (request, path, param, httpRequest, httpResponse)
183 => RenderMaterialsGetCap(request), 183 => RenderMaterialsGetCap(request),
@@ -185,14 +185,14 @@ namespace OpenSim.Region.OptionalModules.Materials
185 MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); 185 MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler);
186 186
187 // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well 187 // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well
188 IRequestHandler renderMaterialsPutHandler 188 IRequestHandler renderMaterialsPutHandler
189 = new RestStreamHandler("PUT", capsBase + "/", 189 = new RestStreamHandler("PUT", capsBase + "/",
190 (request, path, param, httpRequest, httpResponse) 190 (request, path, param, httpRequest, httpResponse)
191 => RenderMaterialsPutCap(request, agentID), 191 => RenderMaterialsPutCap(request, agentID),
192 "RenderMaterials", null); 192 "RenderMaterials", null);
193 MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); 193 MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler);
194 } 194 }
195 195
196 public void RemoveRegion(Scene scene) 196 public void RemoveRegion(Scene scene)
197 { 197 {
198 if (!m_enabled) 198 if (!m_enabled)
@@ -201,8 +201,8 @@ namespace OpenSim.Region.OptionalModules.Materials
201 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; 201 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
202 m_scene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene; 202 m_scene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene;
203 m_scene.EventManager.OnBackup -= EventManager_OnBackup; 203 m_scene.EventManager.OnBackup -= EventManager_OnBackup;
204 } 204 }
205 205
206 public void RegionLoaded(Scene scene) 206 public void RegionLoaded(Scene scene)
207 { 207 {
208 if (!m_enabled) return; 208 if (!m_enabled) return;
@@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Materials
285 /// Find the materials used in the SOP, and add them to 'm_regionMaterials'. 285 /// Find the materials used in the SOP, and add them to 'm_regionMaterials'.
286 /// </summary> 286 /// </summary>
287 private void GetStoredMaterialsInPart(SceneObjectPart part) 287 private void GetStoredMaterialsInPart(SceneObjectPart part)
288 { 288 {
289 if (part.Shape == null) 289 if (part.Shape == null)
290 return; 290 return;
291 291
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Materials
299 GetStoredMaterialInFace(part, te.DefaultTexture); 299 GetStoredMaterialInFace(part, te.DefaultTexture);
300 else 300 else
301 m_log.WarnFormat( 301 m_log.WarnFormat(
302 "[Materials]: Default texture for part {0} (part of object {1}) in {2} unexpectedly null. Ignoring.", 302 "[Materials]: Default texture for part {0} (part of object {1}) in {2} unexpectedly null. Ignoring.",
303 part.Name, part.ParentGroup.Name, m_scene.Name); 303 part.Name, part.ParentGroup.Name, m_scene.Name);
304 304
305 foreach (Primitive.TextureEntryFace face in te.FaceTextures) 305 foreach (Primitive.TextureEntryFace face in te.FaceTextures)
@@ -363,7 +363,7 @@ namespace OpenSim.Region.OptionalModules.Materials
363 363
364 byte[] inBytes = req["Zipped"].AsBinary(); 364 byte[] inBytes = req["Zipped"].AsBinary();
365 365
366 try 366 try
367 { 367 {
368 osd = ZDecompressBytesToOsd(inBytes); 368 osd = ZDecompressBytesToOsd(inBytes);
369 369
@@ -409,7 +409,7 @@ namespace OpenSim.Region.OptionalModules.Materials
409 //return ""; 409 //return "";
410 } 410 }
411 } 411 }
412 412
413 resp["Zipped"] = ZCompressOSD(respArr, false); 413 resp["Zipped"] = ZCompressOSD(respArr, false);
414 string response = OSDParser.SerializeLLSDXmlString(resp); 414 string response = OSDParser.SerializeLLSDXmlString(resp);
415 415
@@ -435,7 +435,7 @@ namespace OpenSim.Region.OptionalModules.Materials
435 435
436 byte[] inBytes = req["Zipped"].AsBinary(); 436 byte[] inBytes = req["Zipped"].AsBinary();
437 437
438 try 438 try
439 { 439 {
440 osd = ZDecompressBytesToOsd(inBytes); 440 osd = ZDecompressBytesToOsd(inBytes);
441 441
@@ -493,7 +493,7 @@ namespace OpenSim.Region.OptionalModules.Materials
493 m_log.WarnFormat("[Materials]: Error in TextureEntry for SOP {0} {1}", sop.Name, sop.UUID); 493 m_log.WarnFormat("[Materials]: Error in TextureEntry for SOP {0} {1}", sop.Name, sop.UUID);
494 continue; 494 continue;
495 } 495 }
496 496
497 UUID id; 497 UUID id;
498 if (mat == null) 498 if (mat == null)
499 { 499 {
@@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Materials
588 //return ""; 588 //return "";
589 } 589 }
590 } 590 }
591 591
592 resp["Zipped"] = ZCompressOSD(respArr, false); 592 resp["Zipped"] = ZCompressOSD(respArr, false);
593 string response = OSDParser.SerializeLLSDXmlString(resp); 593 string response = OSDParser.SerializeLLSDXmlString(resp);
594 594
@@ -684,7 +684,7 @@ namespace OpenSim.Region.OptionalModules.Materials
684 684
685 if (sop.Name != "Primitive") 685 if (sop.Name != "Primitive")
686 return sop.Name; 686 return sop.Name;
687 687
688 if ((sop.ParentGroup != null) && (sop.ParentGroup.Name != "Primitive")) 688 if ((sop.ParentGroup != null) && (sop.ParentGroup.Name != "Primitive"))
689 return sop.ParentGroup.Name; 689 return sop.ParentGroup.Name;
690 690
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Materials
748 748
749 using (MemoryStream msSinkCompressed = new MemoryStream()) 749 using (MemoryStream msSinkCompressed = new MemoryStream())
750 { 750 {
751 using (Ionic.Zlib.ZlibStream zOut = new Ionic.Zlib.ZlibStream(msSinkCompressed, 751 using (Ionic.Zlib.ZlibStream zOut = new Ionic.Zlib.ZlibStream(msSinkCompressed,
752 Ionic.Zlib.CompressionMode.Compress, CompressionLevel.BestCompression, true)) 752 Ionic.Zlib.CompressionMode.Compress, CompressionLevel.BestCompression, true))
753 { 753 {
754 zOut.Write(data, 0, data.Length); 754 zOut.Write(data, 0, data.Length);
diff --git a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs
index 1d9179c..bcfb34d 100755
--- a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs
+++ b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs
@@ -54,10 +54,10 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters
54 private static bool m_commandsLoaded = false; 54 private static bool m_commandsLoaded = false;
55 55
56 #region ISharedRegionModule 56 #region ISharedRegionModule
57 public string Name { get { return "Runtime Physics Parameter Module"; } } 57 public string Name { get { return "Runtime Physics Parameter Module"; } }
58 58
59 public Type ReplaceableInterface { get { return null; } } 59 public Type ReplaceableInterface { get { return null; } }
60 60
61 public void Initialise(IConfigSource source) 61 public void Initialise(IConfigSource source)
62 { 62 {
63 // m_log.DebugFormat("{0}: INITIALIZED MODULE", LogHeader); 63 // m_log.DebugFormat("{0}: INITIALIZED MODULE", LogHeader);
@@ -68,29 +68,29 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters
68 // m_log.DebugFormat("[{0}: POST INITIALIZED MODULE", LogHeader); 68 // m_log.DebugFormat("[{0}: POST INITIALIZED MODULE", LogHeader);
69 InstallInterfaces(); 69 InstallInterfaces();
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74 // m_log.DebugFormat("{0}: CLOSED MODULE", LogHeader); 74 // m_log.DebugFormat("{0}: CLOSED MODULE", LogHeader);
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79 // m_log.DebugFormat("{0}: REGION {1} ADDED", LogHeader, scene.RegionInfo.RegionName); 79 // m_log.DebugFormat("{0}: REGION {1} ADDED", LogHeader, scene.RegionInfo.RegionName);
80 m_scenes.Add(scene); 80 m_scenes.Add(scene);
81 } 81 }
82 82
83 public void RemoveRegion(Scene scene) 83 public void RemoveRegion(Scene scene)
84 { 84 {
85 // m_log.DebugFormat("{0}: REGION {1} REMOVED", LogHeader, scene.RegionInfo.RegionName); 85 // m_log.DebugFormat("{0}: REGION {1} REMOVED", LogHeader, scene.RegionInfo.RegionName);
86 if (m_scenes.Contains(scene)) 86 if (m_scenes.Contains(scene))
87 m_scenes.Remove(scene); 87 m_scenes.Remove(scene);
88 } 88 }
89 89
90 public void RegionLoaded(Scene scene) 90 public void RegionLoaded(Scene scene)
91 { 91 {
92 // m_log.DebugFormat("{0}: REGION {1} LOADED", LogHeader, scene.RegionInfo.RegionName); 92 // m_log.DebugFormat("{0}: REGION {1} LOADED", LogHeader, scene.RegionInfo.RegionName);
93 } 93 }
94 #endregion INonSharedRegionModule 94 #endregion INonSharedRegionModule
95 95
96 private const string getInvocation = "physics get [<param>|ALL]"; 96 private const string getInvocation = "physics get [<param>|ALL]";
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index 4ffb03b..9c0fa75 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -52,14 +52,14 @@ namespace OpenSim.Region.OptionalModules
52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
53 private bool m_enabled; 53 private bool m_enabled;
54 54
55 public string Name { get { return "PrimLimitsModule"; } } 55 public string Name { get { return "PrimLimitsModule"; } }
56 56
57 public Type ReplaceableInterface { get { return null; } } 57 public Type ReplaceableInterface { get { return null; } }
58 58
59 public void Initialise(IConfigSource config) 59 public void Initialise(IConfigSource config)
60 { 60 {
61 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules", 61 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
62 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); 62 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
63 63
64 List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim())); 64 List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim()));
65 65
@@ -69,11 +69,11 @@ namespace OpenSim.Region.OptionalModules
69 m_log.DebugFormat("[PRIM LIMITS]: Initialized module"); 69 m_log.DebugFormat("[PRIM LIMITS]: Initialized module");
70 m_enabled = true; 70 m_enabled = true;
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79 if (!m_enabled) 79 if (!m_enabled)
@@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules
86 86
87 m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName); 87 m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName);
88 } 88 }
89 89
90 public void RemoveRegion(Scene scene) 90 public void RemoveRegion(Scene scene)
91 { 91 {
92 if (m_enabled) 92 if (m_enabled)
@@ -97,8 +97,8 @@ namespace OpenSim.Region.OptionalModules
97 scene.Permissions.OnRezObject -= CanRezObject; 97 scene.Permissions.OnRezObject -= CanRezObject;
98 scene.Permissions.OnObjectEntry -= CanObjectEnter; 98 scene.Permissions.OnObjectEntry -= CanObjectEnter;
99 scene.Permissions.OnDuplicateObject -= CanDuplicateObject; 99 scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
100 } 100 }
101 101
102 public void RegionLoaded(Scene scene) 102 public void RegionLoaded(Scene scene)
103 { 103 {
104 m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); 104 m_dialogModule = scene.RequestModuleInterface<IDialogModule>();
@@ -158,7 +158,7 @@ namespace OpenSim.Region.OptionalModules
158 158
159 Vector3 oldPoint = obj.GroupPosition; 159 Vector3 oldPoint = obj.GroupPosition;
160 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); 160 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
161 161
162 // The prim hasn't crossed a region boundry so we don't need to worry 162 // The prim hasn't crossed a region boundry so we don't need to worry
163 // about prim counts here 163 // about prim counts here
164 if(oldParcel != null && oldParcel.Equals(newParcel)) 164 if(oldParcel != null && oldParcel.Equals(newParcel))
diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
index 78a9c58..cbfd2d2 100644
--- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.OptionalModules")] 9[assembly: AssemblyTitle("OpenSim.Region.OptionalModules")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
index c38bb3e..9343aab 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
67 67
68 protected List<TakeValueCallbackClass> m_TakeStore; 68 protected List<TakeValueCallbackClass> m_TakeStore;
69 protected List<TakeValueCallbackClass> m_ReadStore; 69 protected List<TakeValueCallbackClass> m_ReadStore;
70 70
71 // add separators for quoted paths and array references 71 // add separators for quoted paths and array references
72 protected static Regex m_ParsePassOne = new Regex("({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])"); 72 protected static Regex m_ParsePassOne = new Regex("({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])");
73 73
@@ -98,10 +98,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
98 /// </summary> 98 /// </summary>
99 // ----------------------------------------------------------------- 99 // -----------------------------------------------------------------
100 public int StringSpace { get; set; } 100 public int StringSpace { get; set; }
101 101
102 // ----------------------------------------------------------------- 102 // -----------------------------------------------------------------
103 /// <summary> 103 /// <summary>
104 /// 104 ///
105 /// </summary> 105 /// </summary>
106 // ----------------------------------------------------------------- 106 // -----------------------------------------------------------------
107 public static bool CanonicalPathExpression(string ipath, out string opath) 107 public static bool CanonicalPathExpression(string ipath, out string opath)
@@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
116 opath = PathExpressionToKey(path); 116 opath = PathExpressionToKey(path);
117 return true; 117 return true;
118 } 118 }
119 119
120 // ----------------------------------------------------------------- 120 // -----------------------------------------------------------------
121 /// <summary> 121 /// <summary>
122 /// 122 ///
123 /// </summary> 123 /// </summary>
124 // ----------------------------------------------------------------- 124 // -----------------------------------------------------------------
125 public JsonStore() 125 public JsonStore()
126 { 126 {
127 StringSpace = 0; 127 StringSpace = 0;
128 m_TakeStore = new List<TakeValueCallbackClass>(); 128 m_TakeStore = new List<TakeValueCallbackClass>();
@@ -132,17 +132,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
132 public JsonStore(string value) : this() 132 public JsonStore(string value) : this()
133 { 133 {
134 // This is going to throw an exception if the value is not 134 // This is going to throw an exception if the value is not
135 // a valid JSON chunk. Calling routines should catch the 135 // a valid JSON chunk. Calling routines should catch the
136 // exception and handle it appropriately 136 // exception and handle it appropriately
137 if (String.IsNullOrEmpty(value)) 137 if (String.IsNullOrEmpty(value))
138 ValueStore = new OSDMap(); 138 ValueStore = new OSDMap();
139 else 139 else
140 ValueStore = OSDParser.DeserializeJson(value); 140 ValueStore = OSDParser.DeserializeJson(value);
141 } 141 }
142 142
143 // ----------------------------------------------------------------- 143 // -----------------------------------------------------------------
144 /// <summary> 144 /// <summary>
145 /// 145 ///
146 /// </summary> 146 /// </summary>
147 // ----------------------------------------------------------------- 147 // -----------------------------------------------------------------
148 public JsonStoreNodeType GetNodeType(string expr) 148 public JsonStoreNodeType GetNodeType(string expr)
@@ -150,27 +150,27 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
150 Stack<string> path; 150 Stack<string> path;
151 if (! ParsePathExpression(expr,out path)) 151 if (! ParsePathExpression(expr,out path))
152 return JsonStoreNodeType.Undefined; 152 return JsonStoreNodeType.Undefined;
153 153
154 OSD result = ProcessPathExpression(ValueStore,path); 154 OSD result = ProcessPathExpression(ValueStore,path);
155 155
156 if (result == null) 156 if (result == null)
157 return JsonStoreNodeType.Undefined; 157 return JsonStoreNodeType.Undefined;
158 158
159 if (result is OSDMap) 159 if (result is OSDMap)
160 return JsonStoreNodeType.Object; 160 return JsonStoreNodeType.Object;
161 161
162 if (result is OSDArray) 162 if (result is OSDArray)
163 return JsonStoreNodeType.Array; 163 return JsonStoreNodeType.Array;
164 164
165 if (OSDBaseType(result.Type)) 165 if (OSDBaseType(result.Type))
166 return JsonStoreNodeType.Value; 166 return JsonStoreNodeType.Value;
167 167
168 return JsonStoreNodeType.Undefined; 168 return JsonStoreNodeType.Undefined;
169 } 169 }
170 170
171 // ----------------------------------------------------------------- 171 // -----------------------------------------------------------------
172 /// <summary> 172 /// <summary>
173 /// 173 ///
174 /// </summary> 174 /// </summary>
175 // ----------------------------------------------------------------- 175 // -----------------------------------------------------------------
176 public JsonStoreValueType GetValueType(string expr) 176 public JsonStoreValueType GetValueType(string expr)
@@ -178,18 +178,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
178 Stack<string> path; 178 Stack<string> path;
179 if (! ParsePathExpression(expr,out path)) 179 if (! ParsePathExpression(expr,out path))
180 return JsonStoreValueType.Undefined; 180 return JsonStoreValueType.Undefined;
181 181
182 OSD result = ProcessPathExpression(ValueStore,path); 182 OSD result = ProcessPathExpression(ValueStore,path);
183 183
184 if (result == null) 184 if (result == null)
185 return JsonStoreValueType.Undefined; 185 return JsonStoreValueType.Undefined;
186 186
187 if (result is OSDMap) 187 if (result is OSDMap)
188 return JsonStoreValueType.Undefined; 188 return JsonStoreValueType.Undefined;
189 189
190 if (result is OSDArray) 190 if (result is OSDArray)
191 return JsonStoreValueType.Undefined; 191 return JsonStoreValueType.Undefined;
192 192
193 if (result is OSDBoolean) 193 if (result is OSDBoolean)
194 return JsonStoreValueType.Boolean; 194 return JsonStoreValueType.Boolean;
195 195
@@ -204,10 +204,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
204 204
205 return JsonStoreValueType.Undefined; 205 return JsonStoreValueType.Undefined;
206 } 206 }
207 207
208 // ----------------------------------------------------------------- 208 // -----------------------------------------------------------------
209 /// <summary> 209 /// <summary>
210 /// 210 ///
211 /// </summary> 211 /// </summary>
212 // ----------------------------------------------------------------- 212 // -----------------------------------------------------------------
213 public int ArrayLength(string expr) 213 public int ArrayLength(string expr)
@@ -228,7 +228,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
228 228
229 // ----------------------------------------------------------------- 229 // -----------------------------------------------------------------
230 /// <summary> 230 /// <summary>
231 /// 231 ///
232 /// </summary> 232 /// </summary>
233 // ----------------------------------------------------------------- 233 // -----------------------------------------------------------------
234 public bool GetValue(string expr, out string value, bool useJson) 234 public bool GetValue(string expr, out string value, bool useJson)
@@ -241,23 +241,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
241 } 241 }
242 242
243 OSD result = ProcessPathExpression(ValueStore,path); 243 OSD result = ProcessPathExpression(ValueStore,path);
244 return ConvertOutputValue(result,out value,useJson); 244 return ConvertOutputValue(result,out value,useJson);
245 } 245 }
246 246
247 247
248 // ----------------------------------------------------------------- 248 // -----------------------------------------------------------------
249 /// <summary> 249 /// <summary>
250 /// 250 ///
251 /// </summary> 251 /// </summary>
252 // ----------------------------------------------------------------- 252 // -----------------------------------------------------------------
253 public bool RemoveValue(string expr) 253 public bool RemoveValue(string expr)
254 { 254 {
255 return SetValueFromExpression(expr,null); 255 return SetValueFromExpression(expr,null);
256 } 256 }
257 257
258 // ----------------------------------------------------------------- 258 // -----------------------------------------------------------------
259 /// <summary> 259 /// <summary>
260 /// 260 ///
261 /// </summary> 261 /// </summary>
262 // ----------------------------------------------------------------- 262 // -----------------------------------------------------------------
263 public bool SetValue(string expr, string value, bool useJson) 263 public bool SetValue(string expr, string value, bool useJson)
@@ -272,7 +272,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
272 { 272 {
273 // There doesn't appear to be a good way to determine if the 273 // There doesn't appear to be a good way to determine if the
274 // value is valid Json other than to let the parser crash 274 // value is valid Json other than to let the parser crash
275 try 275 try
276 { 276 {
277 ovalue = OSDParser.DeserializeJson(value); 277 ovalue = OSDParser.DeserializeJson(value);
278 } 278 }
@@ -292,13 +292,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
292 { 292 {
293 ovalue = new OSDString(value); 293 ovalue = new OSDString(value);
294 } 294 }
295 295
296 return SetValueFromExpression(expr,ovalue); 296 return SetValueFromExpression(expr,ovalue);
297 } 297 }
298 298
299 // ----------------------------------------------------------------- 299 // -----------------------------------------------------------------
300 /// <summary> 300 /// <summary>
301 /// 301 ///
302 /// </summary> 302 /// </summary>
303 // ----------------------------------------------------------------- 303 // -----------------------------------------------------------------
304 public bool TakeValue(string expr, bool useJson, TakeValueCallback cback) 304 public bool TakeValue(string expr, bool useJson, TakeValueCallback cback)
@@ -315,7 +315,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
315 m_TakeStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback)); 315 m_TakeStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback));
316 return false; 316 return false;
317 } 317 }
318 318
319 string value = String.Empty; 319 string value = String.Empty;
320 if (! ConvertOutputValue(result,out value,useJson)) 320 if (! ConvertOutputValue(result,out value,useJson))
321 { 321 {
@@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
332 332
333 // ----------------------------------------------------------------- 333 // -----------------------------------------------------------------
334 /// <summary> 334 /// <summary>
335 /// 335 ///
336 /// </summary> 336 /// </summary>
337 // ----------------------------------------------------------------- 337 // -----------------------------------------------------------------
338 public bool ReadValue(string expr, bool useJson, TakeValueCallback cback) 338 public bool ReadValue(string expr, bool useJson, TakeValueCallback cback)
@@ -349,7 +349,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
349 m_ReadStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback)); 349 m_ReadStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback));
350 return false; 350 return false;
351 } 351 }
352 352
353 string value = String.Empty; 353 string value = String.Empty;
354 if (! ConvertOutputValue(result,out value,useJson)) 354 if (! ConvertOutputValue(result,out value,useJson))
355 { 355 {
@@ -362,10 +362,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
362 362
363 return true; 363 return true;
364 } 364 }
365 365
366 // ----------------------------------------------------------------- 366 // -----------------------------------------------------------------
367 /// <summary> 367 /// <summary>
368 /// 368 ///
369 /// </summary> 369 /// </summary>
370 // ----------------------------------------------------------------- 370 // -----------------------------------------------------------------
371 protected bool SetValueFromExpression(string expr, OSD ovalue) 371 protected bool SetValueFromExpression(string expr, OSD ovalue)
@@ -447,7 +447,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
447 Match match = hmatches[0]; 447 Match match = hmatches[0];
448 GroupCollection groups = match.Groups; 448 GroupCollection groups = match.Groups;
449 string hkey = groups[1].Value; 449 string hkey = groups[1].Value;
450 450
451 if (result is OSDMap) 451 if (result is OSDMap)
452 { 452 {
453 // this is the assignment case 453 // this is the assignment case
@@ -456,7 +456,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
456 { 456 {
457 StringSpace -= ComputeSizeOf(hmap[hkey]); 457 StringSpace -= ComputeSizeOf(hmap[hkey]);
458 StringSpace += ComputeSizeOf(ovalue); 458 StringSpace += ComputeSizeOf(ovalue);
459 459
460 hmap[hkey] = ovalue; 460 hmap[hkey] = ovalue;
461 InvokeNextCallback(pexpr + pkey); 461 InvokeNextCallback(pexpr + pkey);
462 return true; 462 return true;
@@ -483,13 +483,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
483 483
484 // ----------------------------------------------------------------- 484 // -----------------------------------------------------------------
485 /// <summary> 485 /// <summary>
486 /// 486 ///
487 /// </summary> 487 /// </summary>
488 // ----------------------------------------------------------------- 488 // -----------------------------------------------------------------
489 protected bool InvokeNextCallback(string pexpr) 489 protected bool InvokeNextCallback(string pexpr)
490 { 490 {
491 // Process all of the reads that match the expression first 491 // Process all of the reads that match the expression first
492 List<TakeValueCallbackClass> reads = 492 List<TakeValueCallbackClass> reads =
493 m_ReadStore.FindAll(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); }); 493 m_ReadStore.FindAll(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); });
494 494
495 foreach (TakeValueCallbackClass readcb in reads) 495 foreach (TakeValueCallbackClass readcb in reads)
@@ -501,7 +501,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
501 // Process one take next 501 // Process one take next
502 TakeValueCallbackClass takecb = 502 TakeValueCallbackClass takecb =
503 m_TakeStore.Find(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); }); 503 m_TakeStore.Find(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); });
504 504
505 if (takecb != null) 505 if (takecb != null)
506 { 506 {
507 m_TakeStore.Remove(takecb); 507 m_TakeStore.Remove(takecb);
@@ -525,13 +525,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
525 525
526 // add front and rear separators 526 // add front and rear separators
527 expr = "." + expr + "."; 527 expr = "." + expr + ".";
528 528
529 // add separators for quoted exprs and array references 529 // add separators for quoted exprs and array references
530 expr = m_ParsePassOne.Replace(expr,".$1.",-1,0); 530 expr = m_ParsePassOne.Replace(expr,".$1.",-1,0);
531 531
532 // add quotes to bare identifier 532 // add quotes to bare identifier
533 expr = m_ParsePassThree.Replace(expr,".{$1}",-1,0); 533 expr = m_ParsePassThree.Replace(expr,".{$1}",-1,0);
534 534
535 // remove extra separators 535 // remove extra separators
536 expr = m_ParsePassFour.Replace(expr,".",-1,0); 536 expr = m_ParsePassFour.Replace(expr,".",-1,0);
537 537
@@ -550,7 +550,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
550 550
551 // ----------------------------------------------------------------- 551 // -----------------------------------------------------------------
552 /// <summary> 552 /// <summary>
553 /// 553 ///
554 /// </summary> 554 /// </summary>
555 /// <param>path is a stack where the top level of the path is at the bottom of the stack</param> 555 /// <param>path is a stack where the top level of the path is at the bottom of the stack</param>
556 // ----------------------------------------------------------------- 556 // -----------------------------------------------------------------
@@ -558,13 +558,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
558 { 558 {
559 if (path.Count == 0) 559 if (path.Count == 0)
560 return map; 560 return map;
561 561
562 string pkey = path.Pop(); 562 string pkey = path.Pop();
563 563
564 OSD rmap = ProcessPathExpression(map,path); 564 OSD rmap = ProcessPathExpression(map,path);
565 if (rmap == null) 565 if (rmap == null)
566 return null; 566 return null;
567 567
568 // ---------- Check for an array index ---------- 568 // ---------- Check for an array index ----------
569 MatchCollection amatches = m_SimpleArrayPattern.Matches(pkey,0); 569 MatchCollection amatches = m_SimpleArrayPattern.Matches(pkey,0);
570 570
@@ -582,7 +582,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
582 GroupCollection groups = match.Groups; 582 GroupCollection groups = match.Groups;
583 string akey = groups[1].Value; 583 string akey = groups[1].Value;
584 int aval = Convert.ToInt32(akey); 584 int aval = Convert.ToInt32(akey);
585 585
586 if (aval < amap.Count) 586 if (aval < amap.Count)
587 return (OSD) amap[aval]; 587 return (OSD) amap[aval];
588 588
@@ -599,13 +599,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
599 m_log.WarnFormat("[JsonStore] wrong type for key {2}, expecting {0}, got {1}",OSDType.Map,rmap.Type,pkey); 599 m_log.WarnFormat("[JsonStore] wrong type for key {2}, expecting {0}, got {1}",OSDType.Map,rmap.Type,pkey);
600 return null; 600 return null;
601 } 601 }
602 602
603 OSDMap hmap = rmap as OSDMap; 603 OSDMap hmap = rmap as OSDMap;
604 604
605 Match match = hmatches[0]; 605 Match match = hmatches[0];
606 GroupCollection groups = match.Groups; 606 GroupCollection groups = match.Groups;
607 string hkey = groups[1].Value; 607 string hkey = groups[1].Value;
608 608
609 if (hmap.ContainsKey(hkey)) 609 if (hmap.ContainsKey(hkey))
610 return (OSD) hmap[hkey]; 610 return (OSD) hmap[hkey];
611 611
@@ -619,13 +619,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
619 619
620 // ----------------------------------------------------------------- 620 // -----------------------------------------------------------------
621 /// <summary> 621 /// <summary>
622 /// 622 ///
623 /// </summary> 623 /// </summary>
624 // ----------------------------------------------------------------- 624 // -----------------------------------------------------------------
625 protected static bool ConvertOutputValue(OSD result, out string value, bool useJson) 625 protected static bool ConvertOutputValue(OSD result, out string value, bool useJson)
626 { 626 {
627 value = String.Empty; 627 value = String.Empty;
628 628
629 // If we couldn't process the path 629 // If we couldn't process the path
630 if (result == null) 630 if (result == null)
631 return false; 631 return false;
@@ -646,13 +646,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
646 return true; 646 return true;
647 } 647 }
648 648
649 value = "'" + result.AsString() + "'"; 649 value = "'" + result.AsString() + "'";
650 return true; 650 return true;
651 } 651 }
652 652
653 if (OSDBaseType(result.Type)) 653 if (OSDBaseType(result.Type))
654 { 654 {
655 value = result.AsString(); 655 value = result.AsString();
656 return true; 656 return true;
657 } 657 }
658 658
@@ -661,24 +661,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
661 661
662 // ----------------------------------------------------------------- 662 // -----------------------------------------------------------------
663 /// <summary> 663 /// <summary>
664 /// 664 ///
665 /// </summary> 665 /// </summary>
666 // ----------------------------------------------------------------- 666 // -----------------------------------------------------------------
667 protected static string PathExpressionToKey(Stack<string> path) 667 protected static string PathExpressionToKey(Stack<string> path)
668 { 668 {
669 if (path.Count == 0) 669 if (path.Count == 0)
670 return ""; 670 return "";
671 671
672 string pkey = ""; 672 string pkey = "";
673 foreach (string k in path) 673 foreach (string k in path)
674 pkey = (pkey == "") ? k : (k + "." + pkey); 674 pkey = (pkey == "") ? k : (k + "." + pkey);
675 675
676 return pkey; 676 return pkey;
677 } 677 }
678 678
679 // ----------------------------------------------------------------- 679 // -----------------------------------------------------------------
680 /// <summary> 680 /// <summary>
681 /// 681 ///
682 /// </summary> 682 /// </summary>
683 // ----------------------------------------------------------------- 683 // -----------------------------------------------------------------
684 protected static bool OSDBaseType(OSDType type) 684 protected static bool OSDBaseType(OSDType type)
@@ -705,7 +705,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
705 705
706 // ----------------------------------------------------------------- 706 // -----------------------------------------------------------------
707 /// <summary> 707 /// <summary>
708 /// 708 ///
709 /// </summary> 709 /// </summary>
710 // ----------------------------------------------------------------- 710 // -----------------------------------------------------------------
711 protected static int ComputeSizeOf(OSD value) 711 protected static int ComputeSizeOf(OSD value)
@@ -731,7 +731,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
731 private Scene m_scene; 731 private Scene m_scene;
732 private UUID m_objectID; 732 private UUID m_objectID;
733 733
734 protected override OSD ValueStore 734 protected override OSD ValueStore
735 { 735 {
736 get 736 get
737 { 737 {
@@ -741,7 +741,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
741 // This is bad 741 // This is bad
742 return null; 742 return null;
743 } 743 }
744 744
745 return sop.DynAttrs.TopLevelMap; 745 return sop.DynAttrs.TopLevelMap;
746 } 746 }
747 747
@@ -761,5 +761,5 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
761 StringSpace = ComputeSizeOf(ValueStore); 761 StringSpace = ComputeSizeOf(ValueStore);
762 } 762 }
763 } 763 }
764 764
765} 765}
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
index d4b19dd..9bf9cb0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
79 // ----------------------------------------------------------------- 79 // -----------------------------------------------------------------
80 public void Initialise(IConfigSource config) 80 public void Initialise(IConfigSource config)
81 { 81 {
82 try 82 try
83 { 83 {
84 if ((m_config = config.Configs["JsonStore"]) == null) 84 if ((m_config = config.Configs["JsonStore"]) == null)
85 { 85 {
@@ -127,7 +127,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
127 if (m_enabled) 127 if (m_enabled)
128 { 128 {
129 m_scene = scene; 129 m_scene = scene;
130 130
131 } 131 }
132 } 132 }
133 133
@@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
143 143
144 // ----------------------------------------------------------------- 144 // -----------------------------------------------------------------
145 /// <summary> 145 /// <summary>
146 /// Called when all modules have been added for a region. This is 146 /// Called when all modules have been added for a region. This is
147 /// where we hook up events 147 /// where we hook up events
148 /// </summary> 148 /// </summary>
149 // ----------------------------------------------------------------- 149 // -----------------------------------------------------------------
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs
index 26044f0..ae8341f 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
83 // ----------------------------------------------------------------- 83 // -----------------------------------------------------------------
84 public void Initialise(IConfigSource config) 84 public void Initialise(IConfigSource config)
85 { 85 {
86 try 86 try
87 { 87 {
88 if ((m_config = config.Configs["JsonStore"]) == null) 88 if ((m_config = config.Configs["JsonStore"]) == null)
89 { 89 {
@@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
159 159
160 // ----------------------------------------------------------------- 160 // -----------------------------------------------------------------
161 /// <summary> 161 /// <summary>
162 /// Called when all modules have been added for a region. This is 162 /// Called when all modules have been added for a region. This is
163 /// where we hook up events 163 /// where we hook up events
164 /// </summary> 164 /// </summary>
165 // ----------------------------------------------------------------- 165 // -----------------------------------------------------------------
@@ -184,7 +184,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
184#region SceneEvents 184#region SceneEvents
185 // ----------------------------------------------------------------- 185 // -----------------------------------------------------------------
186 /// <summary> 186 /// <summary>
187 /// 187 ///
188 /// </summary> 188 /// </summary>
189 // ----------------------------------------------------------------- 189 // -----------------------------------------------------------------
190 public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) 190 public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
@@ -196,10 +196,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
196 196
197#region ScriptInvocationInteface 197#region ScriptInvocationInteface
198 198
199 199
200 // ----------------------------------------------------------------- 200 // -----------------------------------------------------------------
201 /// <summary> 201 /// <summary>
202 /// 202 ///
203 /// </summary> 203 /// </summary>
204 // ----------------------------------------------------------------- 204 // -----------------------------------------------------------------
205 public JsonStoreStats GetStoreStats() 205 public JsonStoreStats GetStoreStats()
@@ -210,13 +210,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
210 { 210 {
211 stats.StoreCount = m_JsonValueStore.Count; 211 stats.StoreCount = m_JsonValueStore.Count;
212 } 212 }
213 213
214 return stats; 214 return stats;
215 } 215 }
216 216
217 // ----------------------------------------------------------------- 217 // -----------------------------------------------------------------
218 /// <summary> 218 /// <summary>
219 /// 219 ///
220 /// </summary> 220 /// </summary>
221 // ----------------------------------------------------------------- 221 // -----------------------------------------------------------------
222 public bool AttachObjectStore(UUID objectID) 222 public bool AttachObjectStore(UUID objectID)
@@ -235,17 +235,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
235 { 235 {
236 if (m_JsonValueStore.ContainsKey(objectID)) 236 if (m_JsonValueStore.ContainsKey(objectID))
237 return true; 237 return true;
238 238
239 JsonStore map = new JsonObjectStore(m_scene,objectID); 239 JsonStore map = new JsonObjectStore(m_scene,objectID);
240 m_JsonValueStore.Add(objectID,map); 240 m_JsonValueStore.Add(objectID,map);
241 } 241 }
242 242
243 return true; 243 return true;
244 } 244 }
245 245
246 // ----------------------------------------------------------------- 246 // -----------------------------------------------------------------
247 /// <summary> 247 /// <summary>
248 /// 248 ///
249 /// </summary> 249 /// </summary>
250 // ----------------------------------------------------------------- 250 // -----------------------------------------------------------------
251 public bool CreateStore(string value, ref UUID result) 251 public bool CreateStore(string value, ref UUID result)
@@ -254,12 +254,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
254 result = UUID.Random(); 254 result = UUID.Random();
255 255
256 JsonStore map = null; 256 JsonStore map = null;
257 257
258 if (! m_enabled) return false; 258 if (! m_enabled) return false;
259 259
260 260
261 try 261 try
262 { 262 {
263 map = new JsonStore(value); 263 map = new JsonStore(value);
264 } 264 }
265 catch (Exception) 265 catch (Exception)
@@ -270,13 +270,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
270 270
271 lock (m_JsonValueStore) 271 lock (m_JsonValueStore)
272 m_JsonValueStore.Add(result,map); 272 m_JsonValueStore.Add(result,map);
273 273
274 return true; 274 return true;
275 } 275 }
276 276
277 // ----------------------------------------------------------------- 277 // -----------------------------------------------------------------
278 /// <summary> 278 /// <summary>
279 /// 279 ///
280 /// </summary> 280 /// </summary>
281 // ----------------------------------------------------------------- 281 // -----------------------------------------------------------------
282 public bool DestroyStore(UUID storeID) 282 public bool DestroyStore(UUID storeID)
@@ -289,7 +289,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
289 289
290 // ----------------------------------------------------------------- 290 // -----------------------------------------------------------------
291 /// <summary> 291 /// <summary>
292 /// 292 ///
293 /// </summary> 293 /// </summary>
294 // ----------------------------------------------------------------- 294 // -----------------------------------------------------------------
295 public bool TestStore(UUID storeID) 295 public bool TestStore(UUID storeID)
@@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
302 302
303 // ----------------------------------------------------------------- 303 // -----------------------------------------------------------------
304 /// <summary> 304 /// <summary>
305 /// 305 ///
306 /// </summary> 306 /// </summary>
307 // ----------------------------------------------------------------- 307 // -----------------------------------------------------------------
308 public JsonStoreNodeType GetNodeType(UUID storeID, string path) 308 public JsonStoreNodeType GetNodeType(UUID storeID, string path)
@@ -318,7 +318,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
318 return JsonStoreNodeType.Undefined; 318 return JsonStoreNodeType.Undefined;
319 } 319 }
320 } 320 }
321 321
322 try 322 try
323 { 323 {
324 lock (map) 324 lock (map)
@@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
334 334
335 // ----------------------------------------------------------------- 335 // -----------------------------------------------------------------
336 /// <summary> 336 /// <summary>
337 /// 337 ///
338 /// </summary> 338 /// </summary>
339 // ----------------------------------------------------------------- 339 // -----------------------------------------------------------------
340 public JsonStoreValueType GetValueType(UUID storeID, string path) 340 public JsonStoreValueType GetValueType(UUID storeID, string path)
@@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
350 return JsonStoreValueType.Undefined; 350 return JsonStoreValueType.Undefined;
351 } 351 }
352 } 352 }
353 353
354 try 354 try
355 { 355 {
356 lock (map) 356 lock (map)
@@ -366,7 +366,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
366 366
367 // ----------------------------------------------------------------- 367 // -----------------------------------------------------------------
368 /// <summary> 368 /// <summary>
369 /// 369 ///
370 /// </summary> 370 /// </summary>
371 // ----------------------------------------------------------------- 371 // -----------------------------------------------------------------
372 public bool SetValue(UUID storeID, string path, string value, bool useJson) 372 public bool SetValue(UUID storeID, string path, string value, bool useJson)
@@ -382,7 +382,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
382 return false; 382 return false;
383 } 383 }
384 } 384 }
385 385
386 try 386 try
387 { 387 {
388 lock (map) 388 lock (map)
@@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
393 storeID,map.StringSpace,m_maxStringSpace); 393 storeID,map.StringSpace,m_maxStringSpace);
394 return false; 394 return false;
395 } 395 }
396 396
397 return map.SetValue(path,value,useJson); 397 return map.SetValue(path,value,useJson);
398 } 398 }
399 } 399 }
@@ -404,10 +404,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
404 404
405 return false; 405 return false;
406 } 406 }
407 407
408 // ----------------------------------------------------------------- 408 // -----------------------------------------------------------------
409 /// <summary> 409 /// <summary>
410 /// 410 ///
411 /// </summary> 411 /// </summary>
412 // ----------------------------------------------------------------- 412 // -----------------------------------------------------------------
413 public bool RemoveValue(UUID storeID, string path) 413 public bool RemoveValue(UUID storeID, string path)
@@ -423,7 +423,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
423 return false; 423 return false;
424 } 424 }
425 } 425 }
426 426
427 try 427 try
428 { 428 {
429 lock (map) 429 lock (map)
@@ -436,10 +436,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
436 436
437 return false; 437 return false;
438 } 438 }
439 439
440 // ----------------------------------------------------------------- 440 // -----------------------------------------------------------------
441 /// <summary> 441 /// <summary>
442 /// 442 ///
443 /// </summary> 443 /// </summary>
444 // ----------------------------------------------------------------- 444 // -----------------------------------------------------------------
445 public int GetArrayLength(UUID storeID, string path) 445 public int GetArrayLength(UUID storeID, string path)
@@ -464,19 +464,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
464 { 464 {
465 m_log.Error("[JsonStore]: unable to retrieve value", e); 465 m_log.Error("[JsonStore]: unable to retrieve value", e);
466 } 466 }
467 467
468 return -1; 468 return -1;
469 } 469 }
470 470
471 // ----------------------------------------------------------------- 471 // -----------------------------------------------------------------
472 /// <summary> 472 /// <summary>
473 /// 473 ///
474 /// </summary> 474 /// </summary>
475 // ----------------------------------------------------------------- 475 // -----------------------------------------------------------------
476 public bool GetValue(UUID storeID, string path, bool useJson, out string value) 476 public bool GetValue(UUID storeID, string path, bool useJson, out string value)
477 { 477 {
478 value = String.Empty; 478 value = String.Empty;
479 479
480 if (! m_enabled) return false; 480 if (! m_enabled) return false;
481 481
482 JsonStore map = null; 482 JsonStore map = null;
@@ -497,13 +497,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
497 { 497 {
498 m_log.Error("[JsonStore]: unable to retrieve value", e); 498 m_log.Error("[JsonStore]: unable to retrieve value", e);
499 } 499 }
500 500
501 return false; 501 return false;
502 } 502 }
503 503
504 // ----------------------------------------------------------------- 504 // -----------------------------------------------------------------
505 /// <summary> 505 /// <summary>
506 /// 506 ///
507 /// </summary> 507 /// </summary>
508 // ----------------------------------------------------------------- 508 // -----------------------------------------------------------------
509 public void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback) 509 public void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback)
@@ -536,13 +536,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
536 { 536 {
537 m_log.Error("[JsonStore] unable to retrieve value", e); 537 m_log.Error("[JsonStore] unable to retrieve value", e);
538 } 538 }
539 539
540 cback(String.Empty); 540 cback(String.Empty);
541 } 541 }
542 542
543 // ----------------------------------------------------------------- 543 // -----------------------------------------------------------------
544 /// <summary> 544 /// <summary>
545 /// 545 ///
546 /// </summary> 546 /// </summary>
547 // ----------------------------------------------------------------- 547 // -----------------------------------------------------------------
548 public void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback) 548 public void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback)
@@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
575 { 575 {
576 m_log.Error("[JsonStore]: unable to retrieve value", e); 576 m_log.Error("[JsonStore]: unable to retrieve value", e);
577 } 577 }
578 578
579 cback(String.Empty); 579 cback(String.Empty);
580 } 580 }
581 581
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
index 7a0370a..a9fdb66 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
83 // ----------------------------------------------------------------- 83 // -----------------------------------------------------------------
84 public void Initialise(IConfigSource config) 84 public void Initialise(IConfigSource config)
85 { 85 {
86 try 86 try
87 { 87 {
88 if ((m_config = config.Configs["JsonStore"]) == null) 88 if ((m_config = config.Configs["JsonStore"]) == null)
89 { 89 {
@@ -166,7 +166,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
166 166
167 // ----------------------------------------------------------------- 167 // -----------------------------------------------------------------
168 /// <summary> 168 /// <summary>
169 /// Called when all modules have been added for a region. This is 169 /// Called when all modules have been added for a region. This is
170 /// where we hook up events 170 /// where we hook up events
171 /// </summary> 171 /// </summary>
172 // ----------------------------------------------------------------- 172 // -----------------------------------------------------------------
@@ -251,7 +251,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
251#region ScriptInvocationInteface 251#region ScriptInvocationInteface
252 // ----------------------------------------------------------------- 252 // -----------------------------------------------------------------
253 /// <summary> 253 /// <summary>
254 /// 254 ///
255 /// </summary> 255 /// </summary>
256 // ----------------------------------------------------------------- 256 // -----------------------------------------------------------------
257 [ScriptInvocation] 257 [ScriptInvocation]
@@ -260,13 +260,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
260 UUID uuid = UUID.Zero; 260 UUID uuid = UUID.Zero;
261 if (! m_store.AttachObjectStore(hostID)) 261 if (! m_store.AttachObjectStore(hostID))
262 GenerateRuntimeError("Failed to create Json store"); 262 GenerateRuntimeError("Failed to create Json store");
263 263
264 return hostID; 264 return hostID;
265 } 265 }
266 266
267 // ----------------------------------------------------------------- 267 // -----------------------------------------------------------------
268 /// <summary> 268 /// <summary>
269 /// 269 ///
270 /// </summary> 270 /// </summary>
271 // ----------------------------------------------------------------- 271 // -----------------------------------------------------------------
272 [ScriptInvocation] 272 [ScriptInvocation]
@@ -275,12 +275,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
275 UUID uuid = UUID.Zero; 275 UUID uuid = UUID.Zero;
276 if (! m_store.CreateStore(value, ref uuid)) 276 if (! m_store.CreateStore(value, ref uuid))
277 GenerateRuntimeError("Failed to create Json store"); 277 GenerateRuntimeError("Failed to create Json store");
278 278
279 lock (m_scriptStores) 279 lock (m_scriptStores)
280 { 280 {
281 if (! m_scriptStores.ContainsKey(scriptID)) 281 if (! m_scriptStores.ContainsKey(scriptID))
282 m_scriptStores[scriptID] = new HashSet<UUID>(); 282 m_scriptStores[scriptID] = new HashSet<UUID>();
283 283
284 m_scriptStores[scriptID].Add(uuid); 284 m_scriptStores[scriptID].Add(uuid);
285 } 285 }
286 return uuid; 286 return uuid;
@@ -288,7 +288,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
288 288
289 // ----------------------------------------------------------------- 289 // -----------------------------------------------------------------
290 /// <summary> 290 /// <summary>
291 /// 291 ///
292 /// </summary> 292 /// </summary>
293 // ----------------------------------------------------------------- 293 // -----------------------------------------------------------------
294 [ScriptInvocation] 294 [ScriptInvocation]
@@ -305,7 +305,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
305 305
306 // ----------------------------------------------------------------- 306 // -----------------------------------------------------------------
307 /// <summary> 307 /// <summary>
308 /// 308 ///
309 /// </summary> 309 /// </summary>
310 // ----------------------------------------------------------------- 310 // -----------------------------------------------------------------
311 [ScriptInvocation] 311 [ScriptInvocation]
@@ -316,7 +316,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
316 316
317 // ----------------------------------------------------------------- 317 // -----------------------------------------------------------------
318 /// <summary> 318 /// <summary>
319 /// 319 ///
320 /// </summary> 320 /// </summary>
321 // ----------------------------------------------------------------- 321 // -----------------------------------------------------------------
322 [ScriptInvocation] 322 [ScriptInvocation]
@@ -330,7 +330,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
330 330
331 // ----------------------------------------------------------------- 331 // -----------------------------------------------------------------
332 /// <summary> 332 /// <summary>
333 /// 333 ///
334 /// </summary> 334 /// </summary>
335 // ----------------------------------------------------------------- 335 // -----------------------------------------------------------------
336 [ScriptInvocation] 336 [ScriptInvocation]
@@ -341,10 +341,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
341 o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier), null, "JsonStoreScriptModule.JsonReadNotecard"); 341 o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier), null, "JsonStoreScriptModule.JsonReadNotecard");
342 return reqID; 342 return reqID;
343 } 343 }
344 344
345 // ----------------------------------------------------------------- 345 // -----------------------------------------------------------------
346 /// <summary> 346 /// <summary>
347 /// 347 ///
348 /// </summary> 348 /// </summary>
349 // ----------------------------------------------------------------- 349 // -----------------------------------------------------------------
350 [ScriptInvocation] 350 [ScriptInvocation]
@@ -358,7 +358,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
358 358
359 // ----------------------------------------------------------------- 359 // -----------------------------------------------------------------
360 /// <summary> 360 /// <summary>
361 /// 361 ///
362 /// </summary> 362 /// </summary>
363 // ----------------------------------------------------------------- 363 // -----------------------------------------------------------------
364 [ScriptInvocation] 364 [ScriptInvocation]
@@ -366,7 +366,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
366 { 366 {
367 string ipath = ConvertList2Path(pathlist); 367 string ipath = ConvertList2Path(pathlist);
368 string opath; 368 string opath;
369 369
370 if (JsonStore.CanonicalPathExpression(ipath,out opath)) 370 if (JsonStore.CanonicalPathExpression(ipath,out opath))
371 return opath; 371 return opath;
372 372
@@ -375,10 +375,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
375 // the entire store 375 // the entire store
376 return "**INVALID**"; 376 return "**INVALID**";
377 } 377 }
378 378
379 // ----------------------------------------------------------------- 379 // -----------------------------------------------------------------
380 /// <summary> 380 /// <summary>
381 /// 381 ///
382 /// </summary> 382 /// </summary>
383 // ----------------------------------------------------------------- 383 // -----------------------------------------------------------------
384 [ScriptInvocation] 384 [ScriptInvocation]
@@ -389,7 +389,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
389 389
390 // ----------------------------------------------------------------- 390 // -----------------------------------------------------------------
391 /// <summary> 391 /// <summary>
392 /// 392 ///
393 /// </summary> 393 /// </summary>
394 // ----------------------------------------------------------------- 394 // -----------------------------------------------------------------
395 [ScriptInvocation] 395 [ScriptInvocation]
@@ -400,7 +400,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
400 400
401 // ----------------------------------------------------------------- 401 // -----------------------------------------------------------------
402 /// <summary> 402 /// <summary>
403 /// 403 ///
404 /// </summary> 404 /// </summary>
405 // ----------------------------------------------------------------- 405 // -----------------------------------------------------------------
406 [ScriptInvocation] 406 [ScriptInvocation]
@@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
417 417
418 // ----------------------------------------------------------------- 418 // -----------------------------------------------------------------
419 /// <summary> 419 /// <summary>
420 /// 420 ///
421 /// </summary> 421 /// </summary>
422 // ----------------------------------------------------------------- 422 // -----------------------------------------------------------------
423 [ScriptInvocation] 423 [ScriptInvocation]
@@ -425,10 +425,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
425 { 425 {
426 return m_store.RemoveValue(storeID,path) ? 1 : 0; 426 return m_store.RemoveValue(storeID,path) ? 1 : 0;
427 } 427 }
428 428
429 // ----------------------------------------------------------------- 429 // -----------------------------------------------------------------
430 /// <summary> 430 /// <summary>
431 /// 431 ///
432 /// </summary> 432 /// </summary>
433 // ----------------------------------------------------------------- 433 // -----------------------------------------------------------------
434 [ScriptInvocation] 434 [ScriptInvocation]
@@ -436,10 +436,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
436 { 436 {
437 return m_store.GetArrayLength(storeID,path); 437 return m_store.GetArrayLength(storeID,path);
438 } 438 }
439 439
440 // ----------------------------------------------------------------- 440 // -----------------------------------------------------------------
441 /// <summary> 441 /// <summary>
442 /// 442 ///
443 /// </summary> 443 /// </summary>
444 // ----------------------------------------------------------------- 444 // -----------------------------------------------------------------
445 [ScriptInvocation] 445 [ScriptInvocation]
@@ -457,10 +457,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
457 m_store.GetValue(storeID,path,true, out value); 457 m_store.GetValue(storeID,path,true, out value);
458 return value; 458 return value;
459 } 459 }
460 460
461 // ----------------------------------------------------------------- 461 // -----------------------------------------------------------------
462 /// <summary> 462 /// <summary>
463 /// 463 ///
464 /// </summary> 464 /// </summary>
465 // ----------------------------------------------------------------- 465 // -----------------------------------------------------------------
466 [ScriptInvocation] 466 [ScriptInvocation]
@@ -480,10 +480,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
480 o => DoJsonTakeValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonTakeValueJson"); 480 o => DoJsonTakeValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonTakeValueJson");
481 return reqID; 481 return reqID;
482 } 482 }
483 483
484 // ----------------------------------------------------------------- 484 // -----------------------------------------------------------------
485 /// <summary> 485 /// <summary>
486 /// 486 ///
487 /// </summary> 487 /// </summary>
488 // ----------------------------------------------------------------- 488 // -----------------------------------------------------------------
489 [ScriptInvocation] 489 [ScriptInvocation]
@@ -503,12 +503,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
503 o => DoJsonReadValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonReadValueJson"); 503 o => DoJsonReadValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonReadValueJson");
504 return reqID; 504 return reqID;
505 } 505 }
506 506
507#endregion 507#endregion
508 508
509 // ----------------------------------------------------------------- 509 // -----------------------------------------------------------------
510 /// <summary> 510 /// <summary>
511 /// 511 ///
512 /// </summary> 512 /// </summary>
513 // ----------------------------------------------------------------- 513 // -----------------------------------------------------------------
514 protected void GenerateRuntimeError(string msg) 514 protected void GenerateRuntimeError(string msg)
@@ -516,10 +516,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
516 m_log.InfoFormat("[JsonStore] runtime error: {0}",msg); 516 m_log.InfoFormat("[JsonStore] runtime error: {0}",msg);
517 throw new Exception("JsonStore Runtime Error: " + msg); 517 throw new Exception("JsonStore Runtime Error: " + msg);
518 } 518 }
519 519
520 // ----------------------------------------------------------------- 520 // -----------------------------------------------------------------
521 /// <summary> 521 /// <summary>
522 /// 522 ///
523 /// </summary> 523 /// </summary>
524 // ----------------------------------------------------------------- 524 // -----------------------------------------------------------------
525 protected void DispatchValue(UUID scriptID, UUID reqID, string value) 525 protected void DispatchValue(UUID scriptID, UUID reqID, string value)
@@ -529,7 +529,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
529 529
530 // ----------------------------------------------------------------- 530 // -----------------------------------------------------------------
531 /// <summary> 531 /// <summary>
532 /// 532 ///
533 /// </summary> 533 /// </summary>
534 // ----------------------------------------------------------------- 534 // -----------------------------------------------------------------
535 private void DoJsonTakeValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson) 535 private void DoJsonTakeValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson)
@@ -543,14 +543,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
543 { 543 {
544 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString()); 544 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString());
545 } 545 }
546 546
547 DispatchValue(scriptID,reqID,String.Empty); 547 DispatchValue(scriptID,reqID,String.Empty);
548 } 548 }
549 549
550 550
551 // ----------------------------------------------------------------- 551 // -----------------------------------------------------------------
552 /// <summary> 552 /// <summary>
553 /// 553 ///
554 /// </summary> 554 /// </summary>
555 // ----------------------------------------------------------------- 555 // -----------------------------------------------------------------
556 private void DoJsonReadValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson) 556 private void DoJsonReadValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson)
@@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
564 { 564 {
565 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString()); 565 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString());
566 } 566 }
567 567
568 DispatchValue(scriptID,reqID,String.Empty); 568 DispatchValue(scriptID,reqID,String.Empty);
569 } 569 }
570 570
571 // ----------------------------------------------------------------- 571 // -----------------------------------------------------------------
572 /// <summary> 572 /// <summary>
573 /// 573 ///
574 /// </summary> 574 /// </summary>
575 // ----------------------------------------------------------------- 575 // -----------------------------------------------------------------
576 private void DoJsonReadNotecard( 576 private void DoJsonReadNotecard(
@@ -580,7 +580,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
580 580
581 if (!UUID.TryParse(notecardIdentifier, out assetID)) 581 if (!UUID.TryParse(notecardIdentifier, out assetID))
582 { 582 {
583 SceneObjectPart part = m_scene.GetSceneObjectPart(hostID); 583 SceneObjectPart part = m_scene.GetSceneObjectPart(hostID);
584 assetID = ScriptUtils.GetAssetIdFromItemName(part, notecardIdentifier, (int)AssetType.Notecard); 584 assetID = ScriptUtils.GetAssetIdFromItemName(part, notecardIdentifier, (int)AssetType.Notecard);
585 } 585 }
586 586
@@ -590,10 +590,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
590 590
591 if (a.Type != (sbyte)AssetType.Notecard) 591 if (a.Type != (sbyte)AssetType.Notecard)
592 GenerateRuntimeError(String.Format("Invalid notecard asset {0}", assetID)); 592 GenerateRuntimeError(String.Format("Invalid notecard asset {0}", assetID));
593 593
594 m_log.DebugFormat("[JsonStoreScripts]: read notecard in context {0}",storeID); 594 m_log.DebugFormat("[JsonStoreScripts]: read notecard in context {0}",storeID);
595 595
596 try 596 try
597 { 597 {
598 string jsondata = SLUtil.ParseNotecardToString(a.Data); 598 string jsondata = SLUtil.ParseNotecardToString(a.Data);
599 int result = m_store.SetValue(storeID, path, jsondata,true) ? 1 : 0; 599 int result = m_store.SetValue(storeID, path, jsondata,true) ? 1 : 0;
@@ -612,10 +612,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
612 GenerateRuntimeError(String.Format("Json parsing failed for {0}", assetID)); 612 GenerateRuntimeError(String.Format("Json parsing failed for {0}", assetID));
613 m_comms.DispatchReply(scriptID, 0, "", reqID.ToString()); 613 m_comms.DispatchReply(scriptID, 0, "", reqID.ToString());
614 } 614 }
615 615
616 // ----------------------------------------------------------------- 616 // -----------------------------------------------------------------
617 /// <summary> 617 /// <summary>
618 /// 618 ///
619 /// </summary> 619 /// </summary>
620 // ----------------------------------------------------------------- 620 // -----------------------------------------------------------------
621 private void DoJsonWriteNotecard(UUID reqID, UUID hostID, UUID scriptID, UUID storeID, string path, string name) 621 private void DoJsonWriteNotecard(UUID reqID, UUID hostID, UUID scriptID, UUID storeID, string path, string name)
@@ -626,9 +626,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
626 m_comms.DispatchReply(scriptID,0,UUID.Zero.ToString(),reqID.ToString()); 626 m_comms.DispatchReply(scriptID,0,UUID.Zero.ToString(),reqID.ToString());
627 return; 627 return;
628 } 628 }
629 629
630 SceneObjectPart host = m_scene.GetSceneObjectPart(hostID); 630 SceneObjectPart host = m_scene.GetSceneObjectPart(hostID);
631 631
632 // Create new asset 632 // Create new asset
633 UUID assetID = UUID.Random(); 633 UUID assetID = UUID.Random();
634 AssetBase asset = new AssetBase(assetID, name, (sbyte)AssetType.Notecard, host.OwnerID.ToString()); 634 AssetBase asset = new AssetBase(assetID, name, (sbyte)AssetType.Notecard, host.OwnerID.ToString());
@@ -681,7 +681,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
681 for (int i = 0; i < pathlist.Length; i++) 681 for (int i = 0; i < pathlist.Length; i++)
682 { 682 {
683 string token = ""; 683 string token = "";
684 684
685 if (pathlist[i] is string) 685 if (pathlist[i] is string)
686 { 686 {
687 token = pathlist[i].ToString(); 687 token = pathlist[i].ToString();
@@ -699,16 +699,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
699 { 699 {
700 token = "." + pathlist[i].ToString() + "."; 700 token = "." + pathlist[i].ToString() + ".";
701 } 701 }
702 702
703 path += token + "."; 703 path += token + ".";
704 } 704 }
705 705
706 return path; 706 return path;
707 } 707 }
708 708
709 // ----------------------------------------------------------------- 709 // -----------------------------------------------------------------
710 /// <summary> 710 /// <summary>
711 /// 711 ///
712 /// </summary> 712 /// </summary>
713 // ----------------------------------------------------------------- 713 // -----------------------------------------------------------------
714 private void DoJsonRezObject(UUID hostID, UUID scriptID, UUID reqID, string name, Vector3 pos, Vector3 vel, Quaternion rot, string param) 714 private void DoJsonRezObject(UUID hostID, UUID scriptID, UUID reqID, string name, Vector3 pos, Vector3 vel, Quaternion rot, string param)
@@ -801,7 +801,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
801 801
802 group.ScheduleGroupForFullUpdate(); 802 group.ScheduleGroupForFullUpdate();
803 803
804 // send the reply back to the host object, use the integer param to indicate the number 804 // send the reply back to the host object, use the integer param to indicate the number
805 // of remaining objects 805 // of remaining objects
806 m_comms.DispatchReply(scriptID, objlist.Count-i-1, group.RootPart.UUID.ToString(), reqID.ToString()); 806 m_comms.DispatchReply(scriptID, objlist.Count-i-1, group.RootPart.UUID.ToString(), reqID.ToString());
807 } 807 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
index 99a7076..77ee785 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
180 TestHelpers.InMethod(); 180 TestHelpers.InMethod();
181// TestHelpers.EnableLogging(); 181// TestHelpers.EnableLogging();
182 182
183 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); 183 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }");
184 184
185 { 185 {
186 string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World"); 186 string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World");
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
213 TestHelpers.InMethod(); 213 TestHelpers.InMethod();
214// TestHelpers.EnableLogging(); 214// TestHelpers.EnableLogging();
215 215
216 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); 216 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }");
217 217
218 { 218 {
219 string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World"); 219 string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World");
@@ -246,11 +246,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
246// TestHelpers.InMethod(); 246// TestHelpers.InMethod();
247//// TestHelpers.EnableLogging(); 247//// TestHelpers.EnableLogging();
248// 248//
249// UUID storeId 249// UUID storeId
250// = (UUID)m_smcm.InvokeOperation( 250// = (UUID)m_smcm.InvokeOperation(
251// UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); 251// UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" });
252// 252//
253// string value 253// string value
254// = (string)m_smcm.InvokeOperation( 254// = (string)m_smcm.InvokeOperation(
255// UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" }); 255// UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" });
256// 256//
@@ -271,7 +271,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
271 271
272 // Test remove of node in object pointing to a string 272 // Test remove of node in object pointing to a string
273 { 273 {
274 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); 274 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }");
275 275
276 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); 276 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello");
277 Assert.That(returnValue, Is.EqualTo(1)); 277 Assert.That(returnValue, Is.EqualTo(1));
@@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
285 285
286 // Test remove of node in object pointing to another object 286 // Test remove of node in object pointing to another object
287 { 287 {
288 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }"); 288 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }");
289 289
290 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); 290 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello");
291 Assert.That(returnValue, Is.EqualTo(1)); 291 Assert.That(returnValue, Is.EqualTo(1));
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
299 299
300 // Test remove of node in an array 300 // Test remove of node in an array
301 { 301 {
302 UUID storeId 302 UUID storeId
303 = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }"); 303 = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }");
304 304
305 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]"); 305 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]");
@@ -320,7 +320,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
320 320
321 // Test remove of non-existing value 321 // Test remove of non-existing value
322 { 322 {
323 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); 323 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }");
324 324
325 int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese"); 325 int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese");
326 Assert.That(fakeValueRemove, Is.EqualTo(0)); 326 Assert.That(fakeValueRemove, Is.EqualTo(0));
@@ -340,7 +340,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
340// TestHelpers.InMethod(); 340// TestHelpers.InMethod();
341//// TestHelpers.EnableLogging(); 341//// TestHelpers.EnableLogging();
342// 342//
343// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); 343// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
344// 344//
345// { 345// {
346// int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World"); 346// int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World");
@@ -372,7 +372,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
372// TestHelpers.InMethod(); 372// TestHelpers.InMethod();
373//// TestHelpers.EnableLogging(); 373//// TestHelpers.EnableLogging();
374// 374//
375// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); 375// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
376// 376//
377// { 377// {
378// int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World"); 378// int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World");
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
437 TestHelpers.InMethod(); 437 TestHelpers.InMethod();
438// TestHelpers.EnableLogging(); 438// TestHelpers.EnableLogging();
439 439
440 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }"); 440 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }");
441 441
442 { 442 {
443 int result = (int)InvokeOp("JsonGetNodeType", storeId, "."); 443 int result = (int)InvokeOp("JsonGetNodeType", storeId, ".");
@@ -509,7 +509,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
509// TestHelpers.EnableLogging(); 509// TestHelpers.EnableLogging();
510 510
511 { 511 {
512 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 512 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
513 513
514 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times"); 514 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times");
515 Assert.That(result, Is.EqualTo(1)); 515 Assert.That(result, Is.EqualTo(1));
@@ -520,7 +520,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
520 520
521 // Test setting a key containing periods with delineation 521 // Test setting a key containing periods with delineation
522 { 522 {
523 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 523 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
524 524
525 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times"); 525 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times");
526 Assert.That(result, Is.EqualTo(1)); 526 Assert.That(result, Is.EqualTo(1));
@@ -533,7 +533,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
533 533
534 // Test setting a key containing unbalanced ] without delineation. Expecting failure 534 // Test setting a key containing unbalanced ] without delineation. Expecting failure
535 { 535 {
536 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 536 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
537 537
538 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times"); 538 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times");
539 Assert.That(result, Is.EqualTo(0)); 539 Assert.That(result, Is.EqualTo(0));
@@ -544,7 +544,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
544 544
545 // Test setting a key containing unbalanced [ without delineation. Expecting failure 545 // Test setting a key containing unbalanced [ without delineation. Expecting failure
546 { 546 {
547 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 547 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
548 548
549 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times"); 549 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times");
550 Assert.That(result, Is.EqualTo(0)); 550 Assert.That(result, Is.EqualTo(0));
@@ -555,7 +555,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
555 555
556 // Test setting a key containing unbalanced [] without delineation. Expecting failure 556 // Test setting a key containing unbalanced [] without delineation. Expecting failure
557 { 557 {
558 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 558 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
559 559
560 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times"); 560 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times");
561 Assert.That(result, Is.EqualTo(0)); 561 Assert.That(result, Is.EqualTo(0));
@@ -566,7 +566,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
566 566
567 // Test setting a key containing unbalanced ] with delineation 567 // Test setting a key containing unbalanced ] with delineation
568 { 568 {
569 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 569 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
570 570
571 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times"); 571 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times");
572 Assert.That(result, Is.EqualTo(1)); 572 Assert.That(result, Is.EqualTo(1));
@@ -577,7 +577,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
577 577
578 // Test setting a key containing unbalanced [ with delineation 578 // Test setting a key containing unbalanced [ with delineation
579 { 579 {
580 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 580 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
581 581
582 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times"); 582 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times");
583 Assert.That(result, Is.EqualTo(1)); 583 Assert.That(result, Is.EqualTo(1));
@@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
588 588
589 // Test setting a key containing empty balanced [] with delineation 589 // Test setting a key containing empty balanced [] with delineation
590 { 590 {
591 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 591 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
592 592
593 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times"); 593 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times");
594 Assert.That(result, Is.EqualTo(1)); 594 Assert.That(result, Is.EqualTo(1));
@@ -600,7 +600,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
600// // Commented out as this currently unexpectedly fails. 600// // Commented out as this currently unexpectedly fails.
601// // Test setting a key containing brackets around an integer with delineation 601// // Test setting a key containing brackets around an integer with delineation
602// { 602// {
603// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 603// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
604// 604//
605// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times"); 605// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times");
606// Assert.That(result, Is.EqualTo(1)); 606// Assert.That(result, Is.EqualTo(1));
@@ -610,10 +610,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
610// } 610// }
611 611
612 // *** Test {} *** 612 // *** Test {} ***
613 613
614 // Test setting a key containing unbalanced } without delineation. Expecting failure (?) 614 // Test setting a key containing unbalanced } without delineation. Expecting failure (?)
615 { 615 {
616 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 616 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
617 617
618 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times"); 618 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times");
619 Assert.That(result, Is.EqualTo(0)); 619 Assert.That(result, Is.EqualTo(0));
@@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
624 624
625 // Test setting a key containing unbalanced { without delineation. Expecting failure (?) 625 // Test setting a key containing unbalanced { without delineation. Expecting failure (?)
626 { 626 {
627 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 627 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
628 628
629 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times"); 629 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times");
630 Assert.That(result, Is.EqualTo(0)); 630 Assert.That(result, Is.EqualTo(0));
@@ -636,7 +636,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
636// // Commented out as this currently unexpectedly fails. 636// // Commented out as this currently unexpectedly fails.
637// // Test setting a key containing unbalanced } 637// // Test setting a key containing unbalanced }
638// { 638// {
639// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 639// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
640// 640//
641// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times"); 641// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times");
642// Assert.That(result, Is.EqualTo(0)); 642// Assert.That(result, Is.EqualTo(0));
@@ -644,7 +644,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
644 644
645 // Test setting a key containing unbalanced { with delineation 645 // Test setting a key containing unbalanced { with delineation
646 { 646 {
647 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 647 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
648 648
649 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times"); 649 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times");
650 Assert.That(result, Is.EqualTo(1)); 650 Assert.That(result, Is.EqualTo(1));
@@ -655,7 +655,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
655 655
656 // Test setting a key containing balanced {} with delineation. This should fail. 656 // Test setting a key containing balanced {} with delineation. This should fail.
657 { 657 {
658 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 658 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
659 659
660 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times"); 660 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times");
661 Assert.That(result, Is.EqualTo(0)); 661 Assert.That(result, Is.EqualTo(0));
@@ -666,7 +666,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
666 666
667 // Test setting to location that does not exist. This should fail. 667 // Test setting to location that does not exist. This should fail.
668 { 668 {
669 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 669 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
670 670
671 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times"); 671 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times");
672 Assert.That(result, Is.EqualTo(0)); 672 Assert.That(result, Is.EqualTo(0));
@@ -691,7 +691,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
691 691
692 // Single quoted token case 692 // Single quoted token case
693 { 693 {
694 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 694 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
695 695
696 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'"); 696 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'");
697 Assert.That(result, Is.EqualTo(1)); 697 Assert.That(result, Is.EqualTo(1));
@@ -702,7 +702,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
702 702
703 // Sub-tree case 703 // Sub-tree case
704 { 704 {
705 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 705 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
706 706
707 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }"); 707 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }");
708 Assert.That(result, Is.EqualTo(1)); 708 Assert.That(result, Is.EqualTo(1));
@@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
713 713
714 // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings. 714 // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings.
715 { 715 {
716 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 716 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
717 717
718 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times"); 718 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times");
719 Assert.That(result, Is.EqualTo(0)); 719 Assert.That(result, Is.EqualTo(0));
@@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
724 724
725 // Test setting to location that does not exist. This should fail. 725 // Test setting to location that does not exist. This should fail.
726 { 726 {
727 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 727 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
728 728
729 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'"); 729 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'");
730 Assert.That(result, Is.EqualTo(0)); 730 Assert.That(result, Is.EqualTo(0));
@@ -757,7 +757,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
757 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); 757 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1));
758 m_scene.AddSceneObject(so); 758 m_scene.AddSceneObject(so);
759 759
760 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); 760 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }");
761 761
762 { 762 {
763 string notecardName = "nc1"; 763 string notecardName = "nc1";
@@ -820,14 +820,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
820 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); 820 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1));
821 m_scene.AddSceneObject(so); 821 m_scene.AddSceneObject(so);
822 822
823 UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); 823 UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }");
824 824
825 // Write notecard 825 // Write notecard
826 InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName); 826 InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName);
827 827
828 { 828 {
829 // Read notecard 829 // Read notecard
830 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 830 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
831 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName); 831 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName);
832 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 832 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
833 833
@@ -837,10 +837,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
837 837
838 { 838 {
839 // Read notecard to new single component path 839 // Read notecard to new single component path
840 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 840 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
841 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName); 841 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName);
842 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 842 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
843 843
844 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); 844 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
845 Assert.That(value, Is.EqualTo("")); 845 Assert.That(value, Is.EqualTo(""));
846 846
@@ -850,7 +850,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
850 850
851 { 851 {
852 // Read notecard to new multi-component path. This should not work. 852 // Read notecard to new multi-component path. This should not work.
853 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 853 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
854 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); 854 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
855 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 855 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
856 856
@@ -863,7 +863,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
863 863
864 { 864 {
865 // Read notecard to existing multi-component path. This should work 865 // Read notecard to existing multi-component path. This should work
866 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); 866 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
867 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); 867 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
868 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 868 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
869 869
@@ -876,7 +876,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
876 876
877 { 877 {
878 // Read notecard to invalid path. This should not work. 878 // Read notecard to invalid path. This should not work.
879 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); 879 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
880 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName); 880 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName);
881 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 881 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
882 882
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs
index 1993948..2368a23 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33 /// Describes where on the avatar the attachment is located 33 /// Describes where on the avatar the attachment is located
34 /// </value> 34 /// </value>
35 int Location { get ; } 35 int Location { get ; }
36 36
37 //// <value> 37 //// <value>
38 /// Accessor to the rez'ed asset, representing the attachment 38 /// Accessor to the rez'ed asset, representing the attachment
39 /// </value> 39 /// </value>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs
index a8e545c..d61f52a 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs
@@ -30,7 +30,7 @@ using OpenMetaverse;
30using OpenMetaverse.Assets; 30using OpenMetaverse.Assets;
31 31
32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// This implements the methods needed to operate on individual inventory items. 35 /// This implements the methods needed to operate on individual inventory items.
36 /// </summary> 36 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index e189489..dc2edd9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -60,19 +60,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
60 /// <summary> 60 /// <summary>
61 /// Returns whether or not this object is still in the world. 61 /// Returns whether or not this object is still in the world.
62 /// Eg, if you store an IObject reference, however the object 62 /// Eg, if you store an IObject reference, however the object
63 /// is deleted before you use it, it will throw a NullReference 63 /// is deleted before you use it, it will throw a NullReference
64 /// exception. 'Exists' allows you to check the object is still 64 /// exception. 'Exists' allows you to check the object is still
65 /// in play before utilizing it. 65 /// in play before utilizing it.
66 /// </summary> 66 /// </summary>
67 /// <example> 67 /// <example>
68 /// IObject deleteMe = World.Objects[0]; 68 /// IObject deleteMe = World.Objects[0];
69 /// 69 ///
70 /// if (deleteMe.Exists) { 70 /// if (deleteMe.Exists) {
71 /// deleteMe.Say("Hello, I still exist!"); 71 /// deleteMe.Say("Hello, I still exist!");
72 /// } 72 /// }
73 /// 73 ///
74 /// World.Objects.Remove(deleteMe); 74 /// World.Objects.Remove(deleteMe);
75 /// 75 ///
76 /// if (!deleteMe.Exists) { 76 /// if (!deleteMe.Exists) {
77 /// Host.Console.Info("I was deleted"); 77 /// Host.Console.Info("I was deleted");
78 /// } 78 /// }
@@ -81,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
81 /// Objects should be near-guarunteed to exist for any event which 81 /// Objects should be near-guarunteed to exist for any event which
82 /// passes them as an argument. Storing an object for a longer period 82 /// passes them as an argument. Storing an object for a longer period
83 /// of time however will limit their reliability. 83 /// of time however will limit their reliability.
84 /// 84 ///
85 /// It is a good practice to use Try/Catch blocks handling for 85 /// It is a good practice to use Try/Catch blocks handling for
86 /// NullReferenceException, when accessing remote objects. 86 /// NullReferenceException, when accessing remote objects.
87 /// </remarks> 87 /// </remarks>
@@ -118,8 +118,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
118 IObject[] Children { get; } 118 IObject[] Children { get; }
119 119
120 /// <summary> 120 /// <summary>
121 /// Returns a list of materials attached to this object. Each may contain unique texture 121 /// Returns a list of materials attached to this object. Each may contain unique texture
122 /// and other visual information. For primitive based objects, this correlates with 122 /// and other visual information. For primitive based objects, this correlates with
123 /// Object Faces. For mesh based objects, this correlates with Materials. 123 /// Object Faces. For mesh based objects, this correlates with Materials.
124 /// </summary> 124 /// </summary>
125 IObjectMaterial[] Materials { get; } 125 IObjectMaterial[] Materials { get; }
@@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
152 String TouchText { get; set; } 152 String TouchText { get; set; }
153 153
154 /// <summary> 154 /// <summary>
155 /// Text to be associated with this object, in the 155 /// Text to be associated with this object, in the
156 /// Second Life(r) viewer, this is shown above the 156 /// Second Life(r) viewer, this is shown above the
157 /// object. 157 /// object.
158 /// </summary> 158 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs
index bf85cbc..bec8f38 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
40 { 40 {
41 TaskInventoryItem m_privateItem; 41 TaskInventoryItem m_privateItem;
42 Scene m_rootScene; 42 Scene m_rootScene;
43 43
44 public InventoryItem(Scene rootScene, TaskInventoryItem internalItem) 44 public InventoryItem(Scene rootScene, TaskInventoryItem internalItem)
45 { 45 {
46 m_rootScene = rootScene; 46 m_rootScene = rootScene;
@@ -77,10 +77,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
77 throw new ApplicationException("[MRM] There is no legal conversion from IInventoryItem to InventoryItem"); 77 throw new ApplicationException("[MRM] There is no legal conversion from IInventoryItem to InventoryItem");
78 } 78 }
79 } 79 }
80 80
81 public int Type { get { return m_privateItem.Type; } } 81 public int Type { get { return m_privateItem.Type; } }
82 public UUID AssetID { get { return m_privateItem.AssetID; } } 82 public UUID AssetID { get { return m_privateItem.AssetID; } }
83 83
84 // This method exposes OpenSim/OpenMetaverse internals and needs to be replaced with a IAsset specific to MRM. 84 // This method exposes OpenSim/OpenMetaverse internals and needs to be replaced with a IAsset specific to MRM.
85 public T RetrieveAsset<T>() where T : OpenMetaverse.Assets.Asset, new() 85 public T RetrieveAsset<T>() where T : OpenMetaverse.Assets.Asset, new()
86 { 86 {
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
89 89
90 if ((sbyte)result.AssetType != a.Type) 90 if ((sbyte)result.AssetType != a.Type)
91 throw new ApplicationException("[MRM] The supplied asset class does not match the found asset"); 91 throw new ApplicationException("[MRM] The supplied asset class does not match the found asset");
92 92
93 result.AssetData = a.Data; 93 result.AssetData = a.Data;
94 result.Decode(); 94 result.Decode();
95 return result; 95 return result;
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs
index 73fe8b8..5861486 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces;
35 35
36namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 36namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
37{ 37{
38 public class MicroScheduler : System.MarshalByRefObject, IMicrothreader 38 public class MicroScheduler : System.MarshalByRefObject, IMicrothreader
39 { 39 {
40 private readonly List<IEnumerator> m_threads = new List<IEnumerator>(); 40 private readonly List<IEnumerator> m_threads = new List<IEnumerator>();
41 41
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 47b9c09..5513cd5 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
165 get { return GetSOP().Description; } 165 get { return GetSOP().Description; }
166 set 166 set
167 { 167 {
168 if (CanEdit()) 168 if (CanEdit())
169 GetSOP().Description = value; 169 GetSOP().Description = value;
170 } 170 }
171 } 171 }
@@ -192,7 +192,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
192 rets = new IObject[total]; 192 rets = new IObject[total];
193 193
194 int i = 0; 194 int i = 0;
195 195
196 foreach (SceneObjectPart part in my.ParentGroup.Parts) 196 foreach (SceneObjectPart part in my.ParentGroup.Parts)
197 { 197 {
198 rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security); 198 rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security);
@@ -273,8 +273,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
273 public Vector3 SitTarget 273 public Vector3 SitTarget
274 { 274 {
275 get { return GetSOP().SitTargetPosition; } 275 get { return GetSOP().SitTargetPosition; }
276 set 276 set
277 { 277 {
278 if (CanEdit()) 278 if (CanEdit())
279 { 279 {
280 GetSOP().SitTargetPosition = value; 280 GetSOP().SitTargetPosition = value;
@@ -285,8 +285,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
285 public string SitTargetText 285 public string SitTargetText
286 { 286 {
287 get { return GetSOP().SitName; } 287 get { return GetSOP().SitName; }
288 set 288 set
289 { 289 {
290 if (CanEdit()) 290 if (CanEdit())
291 { 291 {
292 GetSOP().SitName = value; 292 GetSOP().SitName = value;
@@ -297,7 +297,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
297 public string TouchText 297 public string TouchText
298 { 298 {
299 get { return GetSOP().TouchName; } 299 get { return GetSOP().TouchName; }
300 set 300 set
301 { 301 {
302 if (CanEdit()) 302 if (CanEdit())
303 { 303 {
@@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
309 public string Text 309 public string Text
310 { 310 {
311 get { return GetSOP().Text; } 311 get { return GetSOP().Text; }
312 set 312 set
313 { 313 {
314 if (CanEdit()) 314 if (CanEdit())
315 { 315 {
@@ -382,11 +382,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
382 get { return this; } 382 get { return this; }
383 } 383 }
384 384
385 public IObjectInventory Inventory 385 public IObjectInventory Inventory
386 { 386 {
387 get { return new SOPObjectInventory(m_rootScene, GetSOP().TaskInventory); } 387 get { return new SOPObjectInventory(m_rootScene, GetSOP().TaskInventory); }
388 } 388 }
389 389
390 #region Public Functions 390 #region Public Functions
391 391
392 public void Say(string msg) 392 public void Say(string msg)
@@ -406,7 +406,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
406 SceneObjectPart sop = GetSOP(); 406 SceneObjectPart sop = GetSOP();
407 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); 407 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false);
408 } 408 }
409 409
410 public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel) 410 public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel)
411 { 411 {
412 if (!CanEdit()) 412 if (!CanEdit())
@@ -445,9 +445,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
445 dm.SendDialogToUser( 445 dm.SendDialogToUser(
446 avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, 446 avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID,
447 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); 447 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons);
448 448
449 } 449 }
450 450
451 #endregion 451 #endregion
452 452
453 453
@@ -540,7 +540,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
540 if (hasCut) ret += 2; 540 if (hasCut) ret += 2;
541 if (hasDimple) ret += 2; 541 if (hasDimple) ret += 2;
542 if (hasHollow) 542 if (hasHollow)
543 ret += 1; // GOTCHA: LSL shows 2 additional sides here. 543 ret += 1; // GOTCHA: LSL shows 2 additional sides here.
544 // This has been fixed, but may cause porting issues. 544 // This has been fixed, but may cause porting issues.
545 break; 545 break;
546 case (int) PrimType.Torus: 546 case (int) PrimType.Torus:
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs
index d20f4a4..8c3158c 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs
@@ -61,25 +61,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
61 if (!m_publicInventory.ContainsKey(privateItem.ItemID)) 61 if (!m_publicInventory.ContainsKey(privateItem.ItemID))
62 m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem)); 62 m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem));
63 } 63 }
64 64
65 #region IDictionary<UUID, IInventoryItem> implementation 65 #region IDictionary<UUID, IInventoryItem> implementation
66 public void Add (UUID key, IInventoryItem value) 66 public void Add (UUID key, IInventoryItem value)
67 { 67 {
68 m_publicInventory.Add(key, value); 68 m_publicInventory.Add(key, value);
69 m_privateInventory.Add(key, InventoryItem.FromInterface(value).ToTaskInventoryItem()); 69 m_privateInventory.Add(key, InventoryItem.FromInterface(value).ToTaskInventoryItem());
70 } 70 }
71 71
72 public bool ContainsKey (UUID key) 72 public bool ContainsKey (UUID key)
73 { 73 {
74 return m_privateInventory.ContainsKey(key); 74 return m_privateInventory.ContainsKey(key);
75 } 75 }
76 76
77 public bool Remove (UUID key) 77 public bool Remove (UUID key)
78 { 78 {
79 m_publicInventory.Remove(key); 79 m_publicInventory.Remove(key);
80 return m_privateInventory.Remove(key); 80 return m_privateInventory.Remove(key);
81 } 81 }
82 82
83 public bool TryGetValue (UUID key, out IInventoryItem value) 83 public bool TryGetValue (UUID key, out IInventoryItem value)
84 { 84 {
85 value = null; 85 value = null;
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
89 { 89 {
90 // wasn't found in the public inventory 90 // wasn't found in the public inventory
91 TaskInventoryItem privateItem; 91 TaskInventoryItem privateItem;
92 92
93 result = m_privateInventory.TryGetValue(key, out privateItem); 93 result = m_privateInventory.TryGetValue(key, out privateItem);
94 if (result) 94 if (result)
95 { 95 {
@@ -98,16 +98,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
98 } 98 }
99 } else 99 } else
100 return true; 100 return true;
101 101
102 return result; 102 return result;
103 } 103 }
104 104
105 public ICollection<UUID> Keys { 105 public ICollection<UUID> Keys {
106 get { 106 get {
107 return m_privateInventory.Keys; 107 return m_privateInventory.Keys;
108 } 108 }
109 } 109 }
110 110
111 public ICollection<IInventoryItem> Values { 111 public ICollection<IInventoryItem> Values {
112 get { 112 get {
113 SynchronizeDictionaries(); 113 SynchronizeDictionaries();
@@ -139,41 +139,41 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
139 { 139 {
140 Add(item.Key, item.Value); 140 Add(item.Key, item.Value);
141 } 141 }
142 142
143 public void Clear () 143 public void Clear ()
144 { 144 {
145 m_publicInventory.Clear(); 145 m_publicInventory.Clear();
146 m_privateInventory.Clear(); 146 m_privateInventory.Clear();
147 } 147 }
148 148
149 public bool Contains (KeyValuePair<UUID, IInventoryItem> item) 149 public bool Contains (KeyValuePair<UUID, IInventoryItem> item)
150 { 150 {
151 return m_privateInventory.ContainsKey(item.Key); 151 return m_privateInventory.ContainsKey(item.Key);
152 } 152 }
153 153
154 public void CopyTo (KeyValuePair<UUID, IInventoryItem>[] array, int arrayIndex) 154 public void CopyTo (KeyValuePair<UUID, IInventoryItem>[] array, int arrayIndex)
155 { 155 {
156 throw new NotImplementedException(); 156 throw new NotImplementedException();
157 } 157 }
158 158
159 public bool Remove (KeyValuePair<UUID, IInventoryItem> item) 159 public bool Remove (KeyValuePair<UUID, IInventoryItem> item)
160 { 160 {
161 return Remove(item.Key); 161 return Remove(item.Key);
162 } 162 }
163 163
164 public int Count { 164 public int Count {
165 get { 165 get {
166 return m_privateInventory.Count; 166 return m_privateInventory.Count;
167 } 167 }
168 } 168 }
169 169
170 public bool IsReadOnly { 170 public bool IsReadOnly {
171 get { 171 get {
172 return false; 172 return false;
173 } 173 }
174 } 174 }
175 #endregion 175 #endregion
176 176
177 #region Explicit implementations 177 #region Explicit implementations
178 IInventoryItem System.Collections.Generic.IDictionary<UUID, IInventoryItem>.this[UUID key] 178 IInventoryItem System.Collections.Generic.IDictionary<UUID, IInventoryItem>.this[UUID key]
179 { 179 {
@@ -189,13 +189,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
189 m_privateInventory[key] = InventoryItem.FromInterface(value).ToTaskInventoryItem(); 189 m_privateInventory[key] = InventoryItem.FromInterface(value).ToTaskInventoryItem();
190 } 190 }
191 } 191 }
192 192
193 void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<UUID, IInventoryItem>>.CopyTo(System.Collections.Generic.KeyValuePair<UUID,IInventoryItem>[] array, int offset) 193 void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<UUID, IInventoryItem>>.CopyTo(System.Collections.Generic.KeyValuePair<UUID,IInventoryItem>[] array, int offset)
194 { 194 {
195 throw new NotImplementedException(); 195 throw new NotImplementedException();
196 } 196 }
197 #endregion 197 #endregion
198 198
199 public IInventoryItem this[string name] 199 public IInventoryItem this[string name]
200 { 200 {
201 get { 201 get {
@@ -204,7 +204,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
204 { 204 {
205 if (!m_publicInventory.ContainsKey(i.ItemID)) 205 if (!m_publicInventory.ContainsKey(i.ItemID))
206 m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i)); 206 m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i));
207 207
208 return m_publicInventory[i.ItemID]; 208 return m_publicInventory[i.ItemID];
209 } 209 }
210 throw new KeyNotFoundException(); 210 throw new KeyNotFoundException();
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index d192309..a380f66 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -70,18 +70,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
70 get { return GetSP().AbsolutePosition; } 70 get { return GetSP().AbsolutePosition; }
71 set { GetSP().Teleport(value); } 71 set { GetSP().Teleport(value); }
72 } 72 }
73 73
74 public bool IsChildAgent 74 public bool IsChildAgent
75 { 75 {
76 get { return GetSP().IsChildAgent; } 76 get { return GetSP().IsChildAgent; }
77 } 77 }
78 78
79 #region IAvatar implementation 79 #region IAvatar implementation
80 public IAvatarAttachment[] Attachments 80 public IAvatarAttachment[] Attachments
81 { 81 {
82 get { 82 get {
83 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>(); 83 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
84 84
85 List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments(); 85 List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments();
86 foreach (AvatarAttachment attach in internalAttachments) 86 foreach (AvatarAttachment attach in internalAttachments)
87 { 87 {
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
89 new UUID(attach.ItemID), 89 new UUID(attach.ItemID),
90 new UUID(attach.AssetID), m_security)); 90 new UUID(attach.AssetID), m_security));
91 } 91 }
92 92
93 return attachments.ToArray(); 93 return attachments.ToArray();
94 } 94 }
95 } 95 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
index 570459a..bcf6053 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
41 private readonly UUID m_assetId; 41 private readonly UUID m_assetId;
42 42
43 private readonly ISecurityCredential m_security; 43 private readonly ISecurityCredential m_security;
44 44
45 public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security) 45 public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security)
46 { 46 {
47 m_rootScene = rootScene; 47 m_rootScene = rootScene;
@@ -51,9 +51,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
51 //m_itemId = itemId; 51 //m_itemId = itemId;
52 m_assetId = assetId; 52 m_assetId = assetId;
53 } 53 }
54 54
55 public int Location { get { return m_location; } } 55 public int Location { get { return m_location; } }
56 56
57 public IObject Asset 57 public IObject Asset
58 { 58 {
59 get 59 get
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs
index 13d0140..724c2a9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim
51 51
52 public void Microthread(IEnumerable thread) 52 public void Microthread(IEnumerable thread)
53 { 53 {
54 54
55 } 55 }
56 56
57 public void RunMicrothread() 57 public void RunMicrothread()
@@ -92,7 +92,7 @@ namespace OpenSim
92 92
93 public override void Stop() 93 public override void Stop()
94 { 94 {
95 95
96 } 96 }
97 } 97 }
98} 98}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
index f2324d2..36f70d0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -34,7 +34,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX;
34 34
35namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 35namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
36{ 36{
37 public class World : System.MarshalByRefObject, IWorld, IWorldAudio 37 public class World : System.MarshalByRefObject, IWorld, IWorldAudio
38 { 38 {
39 private readonly Scene m_internalScene; 39 private readonly Scene m_internalScene;
40 private readonly ISecurityCredential m_security; 40 private readonly ISecurityCredential m_security;
@@ -149,7 +149,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security); 149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security);
150 e.Text = chat.Message; 150 e.Text = chat.Message;
151 e.Channel = chat.Channel; 151 e.Channel = chat.Channel;
152 152
153 _OnChat(this, e); 153 _OnChat(this, e);
154 return; 154 return;
155 } 155 }
@@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
160 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); 160 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security);
161 e.Text = chat.Message; 161 e.Text = chat.Message;
162 e.Channel = chat.Channel; 162 e.Channel = chat.Channel;
163 163
164 _OnChat(this, e); 164 _OnChat(this, e);
165 return; 165 return;
166 } 166 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index 1725eb4..a1dd711 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")]
47 public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule 47 public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule
48 { 48 {
49 private static readonly ILog m_log = 49 private static readonly ILog m_log =
50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private IConfig m_config = null; 52 private IConfig m_config = null;
@@ -57,24 +57,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
57 private bool m_enabled = false; 57 private bool m_enabled = false;
58 private bool m_disable_logins; 58 private bool m_disable_logins;
59 private string m_uri = string.Empty; 59 private string m_uri = string.Empty;
60 60
61 Scene m_scene; 61 Scene m_scene;
62 62
63 #region INonSharedRegionModule interface 63 #region INonSharedRegionModule interface
64 64
65 public Type ReplaceableInterface 65 public Type ReplaceableInterface
66 { 66 {
67 get { return null; } 67 get { return null; }
68 } 68 }
69 69
70 public void Initialise(IConfigSource config) 70 public void Initialise(IConfigSource config)
71 { 71 {
72 m_config = config.Configs["RegionReady"]; 72 m_config = config.Configs["RegionReady"];
73 if (m_config != null) 73 if (m_config != null)
74 { 74 {
75 m_enabled = m_config.GetBoolean("enabled", false); 75 m_enabled = m_config.GetBoolean("enabled", false);
76 76
77 if (m_enabled) 77 if (m_enabled)
78 { 78 {
79 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify); 79 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
80 m_disable_logins = m_config.GetBoolean("login_disable", false); 80 m_disable_logins = m_config.GetBoolean("login_disable", false);
@@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; 106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
107 107
108 // This should always show up to the user but should not trigger warn/errors as these messages are 108 // This should always show up to the user but should not trigger warn/errors as these messages are
109 // expected and are not simulator problems. Ideally, there would be a status level in log4net but 109 // expected and are not simulator problems. Ideally, there would be a status level in log4net but
110 // failing that, we will print out to console instead. 110 // failing that, we will print out to console instead.
111 MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); 111 MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
112 112
@@ -152,12 +152,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
152 { 152 {
153 m_log.DebugFormat("[RegionReady]: Script compile queue empty!"); 153 m_log.DebugFormat("[RegionReady]: Script compile queue empty!");
154 154
155 if (m_firstEmptyCompileQueue || m_oarFileLoading) 155 if (m_firstEmptyCompileQueue || m_oarFileLoading)
156 { 156 {
157 OSChatMessage c = new OSChatMessage(); 157 OSChatMessage c = new OSChatMessage();
158 if (m_firstEmptyCompileQueue) 158 if (m_firstEmptyCompileQueue)
159 c.Message = "server_startup,"; 159 c.Message = "server_startup,";
160 else 160 else
161 c.Message = "oar_file_load,"; 161 c.Message = "oar_file_load,";
162 m_firstEmptyCompileQueue = false; 162 m_firstEmptyCompileQueue = false;
163 m_oarFileLoading = false; 163 m_oarFileLoading = false;
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
165 m_scene.Backup(false); 165 m_scene.Backup(false);
166 166
167 c.From = "RegionReady"; 167 c.From = "RegionReady";
168 if (m_lastOarLoadedOk) 168 if (m_lastOarLoadedOk)
169 c.Message += "1,"; 169 c.Message += "1,";
170 else 170 else
171 c.Message += "0,"; 171 c.Message += "0,";
@@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
193 { 193 {
194 m_oarFileLoading = true; 194 m_oarFileLoading = true;
195 195
196 if (message==String.Empty) 196 if (message==String.Empty)
197 { 197 {
198 m_lastOarLoadedOk = true; 198 m_lastOarLoadedOk = true;
199 } 199 }
@@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
226 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); 226 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString());
227 227
228 // Putting this out to console to make it eye-catching for people who are running OpenSimulator 228 // Putting this out to console to make it eye-catching for people who are running OpenSimulator
229 // without info log messages enabled. Making this a warning is arguably misleading since it isn't a 229 // without info log messages enabled. Making this a warning is arguably misleading since it isn't a
230 // warning, and monitor scripts looking for warn/error/fatal messages will received false positives. 230 // warning, and monitor scripts looking for warn/error/fatal messages will received false positives.
231 // Arguably, log4net needs a status log level (like Apache). 231 // Arguably, log4net needs a status log level (like Apache).
232 MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name); 232 MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
@@ -256,7 +256,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
256// m_scene.EventManager.OnRezScript += OnRezScript; 256// m_scene.EventManager.OnRezScript += OnRezScript;
257// m_oarFileLoading = true; 257// m_oarFileLoading = true;
258// m_firstEmptyCompileQueue = true; 258// m_firstEmptyCompileQueue = true;
259// 259//
260// m_scene.LoginsDisabled = true; 260// m_scene.LoginsDisabled = true;
261// m_scene.LoginLock = true; 261// m_scene.LoginLock = true;
262// if ( m_uri != string.Empty ) 262// if ( m_uri != string.Empty )
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
index 4b7295d..bf33996 100644
--- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
54 public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter 54 public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter
55 { 55 {
56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
58 private Dictionary<UUID, UUID> m_Channels = 58 private Dictionary<UUID, UUID> m_Channels =
59 new Dictionary<UUID, UUID>(); 59 new Dictionary<UUID, UUID>();
60 60
@@ -94,7 +94,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
94 { 94 {
95 scriptEngine.OnScriptRemoved += this.ScriptRemoved; 95 scriptEngine.OnScriptRemoved += this.ScriptRemoved;
96 scriptEngine.OnObjectRemoved += this.ObjectRemoved; 96 scriptEngine.OnObjectRemoved += this.ObjectRemoved;
97 97
98 } 98 }
99 } 99 }
100 100
@@ -131,7 +131,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
131 if (!m_Enabled) 131 if (!m_Enabled)
132 return; 132 return;
133 133
134 m_log.InfoFormat("[XMLRPC GRID ROUTER]: New receiver Obj: {0} Ch: {1} ID: {2} URI: {3}", 134 m_log.InfoFormat("[XMLRPC GRID ROUTER]: New receiver Obj: {0} Ch: {1} ID: {2} URI: {3}",
135 objectID.ToString(), channel.ToString(), itemID.ToString(), uri); 135 objectID.ToString(), channel.ToString(), itemID.ToString(), uri);
136 136
137 XmlRpcInfo info = new XmlRpcInfo(); 137 XmlRpcInfo info = new XmlRpcInfo();
diff --git a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs
index 78c870a..8654896 100644
--- a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 private static bool m_Enabled = false; 46 private static bool m_Enabled = false;
47 47
48 private IConfigSource m_Config; 48 private IConfigSource m_Config;
49 bool m_Registered = false; 49 bool m_Registered = false;
50 50
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch
73 { 73 {
74 } 74 }
75 75
76 public Type ReplaceableInterface 76 public Type ReplaceableInterface
77 { 77 {
78 get { return null; } 78 get { return null; }
79 } 79 }
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs
index 3f36e32..d3b97b1 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Region.UserStatistics
115 udata.fps = Convert.ToSingle(sdr["simfps"]); 115 udata.fps = Convert.ToSingle(sdr["simfps"]);
116 clidata.Add(udata); 116 clidata.Add(udata);
117 totalclients += udata.count; 117 totalclients += udata.count;
118 118
119 } 119 }
120 } 120 }
121 sdr.Close(); 121 sdr.Close();
@@ -126,9 +126,9 @@ namespace OpenSim.Region.UserStatistics
126 sql = 126 sql =
127 "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;"; 127 "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;";
128 cmd = new SqliteCommand(sql, dbConn); 128 cmd = new SqliteCommand(sql, dbConn);
129 129
130 sdr = cmd.ExecuteReader(); 130 sdr = cmd.ExecuteReader();
131 131
132 if (sdr.HasRows) 132 if (sdr.HasRows)
133 { 133 {
134 while (sdr.Read()) 134 while (sdr.Read())
@@ -145,10 +145,10 @@ namespace OpenSim.Region.UserStatistics
145 cmd.Dispose(); 145 cmd.Dispose();
146 } 146 }
147 } 147 }
148 148
149 foreach (ClientVersionData cvd in cliRegData) 149 foreach (ClientVersionData cvd in cliRegData)
150 { 150 {
151 151
152 if (regionTotals.ContainsKey(cvd.region_id)) 152 if (regionTotals.ContainsKey(cvd.region_id))
153 { 153 {
154 int regiontotal = (int)regionTotals[cvd.region_id]; 154 int regiontotal = (int)regionTotals[cvd.region_id];
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs
index 8745acd..fcc7cee 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.UserStatistics
61 Hashtable nh = new Hashtable(); 61 Hashtable nh = new Hashtable();
62 nh.Add("hdata", mData); 62 nh.Add("hdata", mData);
63 nh.Add("Reports", pParams["Reports"]); 63 nh.Add("Reports", pParams["Reports"]);
64 64
65 return nh; 65 return nh;
66 } 66 }
67 67
@@ -76,7 +76,7 @@ namespace OpenSim.Region.UserStatistics
76 public string rep_Default_report_view(stats_default_page_values values) 76 public string rep_Default_report_view(stats_default_page_values values)
77 { 77 {
78 78
79 79
80 StringBuilder output = new StringBuilder(); 80 StringBuilder output = new StringBuilder();
81 81
82 82
@@ -105,7 +105,7 @@ TD.align_top { vertical-align: top; }
105</STYLE> 105</STYLE>
106"; 106";
107 HTMLUtil.HtmlHeaders_O(ref output); 107 HTMLUtil.HtmlHeaders_O(ref output);
108 108
109 HTMLUtil.InsertProtoTypeAJAX(ref output); 109 HTMLUtil.InsertProtoTypeAJAX(ref output);
110 string[] ajaxUpdaterDivs = new string[3]; 110 string[] ajaxUpdaterDivs = new string[3];
111 int[] ajaxUpdaterSeconds = new int[3]; 111 int[] ajaxUpdaterSeconds = new int[3];
@@ -124,7 +124,7 @@ TD.align_top { vertical-align: top; }
124 ajaxUpdaterReportFragments[2] = "activelogajax.html"; 124 ajaxUpdaterReportFragments[2] = "activelogajax.html";
125 125
126 HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments); 126 HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments);
127 127
128 output.Append(STYLESHEET); 128 output.Append(STYLESHEET);
129 HTMLUtil.HtmlHeaders_C(ref output); 129 HTMLUtil.HtmlHeaders_C(ref output);
130 HTMLUtil.AddReportLinks(ref output, values.stats_reports, ""); 130 HTMLUtil.AddReportLinks(ref output, values.stats_reports, "");
@@ -200,7 +200,7 @@ TD.align_top { vertical-align: top; }
200 return output.ToString(); 200 return output.ToString();
201 } 201 }
202 202
203 203
204 204
205 public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List<Scene> m_scene) 205 public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List<Scene> m_scene)
206 { 206 {
@@ -208,8 +208,8 @@ TD.align_top { vertical-align: top; }
208 returnstruct.all_scenes = m_scene.ToArray(); 208 returnstruct.all_scenes = m_scene.ToArray();
209 lock (db) 209 lock (db)
210 { 210 {
211 string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps, 211 string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps,
212 AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb, 212 AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb,
213 SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use 213 SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use
214 FROM stats_session_data;"; 214 FROM stats_session_data;";
215 SqliteCommand cmd = new SqliteCommand(SQL, db); 215 SqliteCommand cmd = new SqliteCommand(SQL, db);
@@ -230,7 +230,7 @@ TD.align_top { vertical-align: top; }
230 sdr.Close(); 230 sdr.Close();
231 cmd.Dispose(); 231 cmd.Dispose();
232 } 232 }
233 233
234 return returnstruct; 234 return returnstruct;
235 } 235 }
236 236
@@ -276,5 +276,5 @@ TD.align_top { vertical-align: top; }
276 public Dictionary<UUID, USimStatsData> sim_stat_data; 276 public Dictionary<UUID, USimStatsData> sim_stat_data;
277 public Dictionary<string, IStatsController> stats_reports; 277 public Dictionary<string, IStatsController> stats_reports;
278 } 278 }
279 279
280} 280}
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs
index c07619f..20e045a 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.UserStatistics
95 { 95 {
96 o.Append("</table>\n"); 96 o.Append("</table>\n");
97 } 97 }
98 98
99 public static void BLOCKQUOTE_O(ref StringBuilder o, string pclass) 99 public static void BLOCKQUOTE_O(ref StringBuilder o, string pclass)
100 { 100 {
101 o.Append("<blockquote"); 101 o.Append("<blockquote");
@@ -199,7 +199,7 @@ namespace OpenSim.Region.UserStatistics
199"); 199");
200 for (int i = 0; i < divID.Length; i++) 200 for (int i = 0; i < divID.Length; i++)
201 { 201 {
202 202
203 o.Append("new updater('"); 203 o.Append("new updater('");
204 o.Append(divID[i]); 204 o.Append(divID[i]);
205 o.Append("', "); 205 o.Append("', ");
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs
index 4d45b80..3e0f45e 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.UserStatistics
66 public string RenderView(Hashtable pModelResult) 66 public string RenderView(Hashtable pModelResult)
67 { 67 {
68 StringBuilder output = new StringBuilder(); 68 StringBuilder output = new StringBuilder();
69 69
70 HTMLUtil.HR(ref output, ""); 70 HTMLUtil.HR(ref output, "");
71 output.Append("<H3>ActiveLog</H3>\n"); 71 output.Append("<H3>ActiveLog</H3>\n");
72 72
@@ -102,13 +102,13 @@ namespace OpenSim.Region.UserStatistics
102 } 102 }
103 } 103 }
104 StringBuilder replaceStr = new StringBuilder(); 104 StringBuilder replaceStr = new StringBuilder();
105 //string titlecolorresults = 105 //string titlecolorresults =
106 106
107 string formatresult = Regex.Replace(TitleColor.Replace(result[i], "$1"), "[^ABCDEFabcdef0-9]", ""); 107 string formatresult = Regex.Replace(TitleColor.Replace(result[i], "$1"), "[^ABCDEFabcdef0-9]", "");
108 if (formatresult.Length > 6) 108 if (formatresult.Length > 6)
109 { 109 {
110 formatresult = formatresult.Substring(0, 6); 110 formatresult = formatresult.Substring(0, 6);
111 111
112 } 112 }
113 for (int j = formatresult.Length; j <= 5; j++) 113 for (int j = formatresult.Length; j <= 5; j++)
114 formatresult += "0"; 114 formatresult += "0";
@@ -116,12 +116,12 @@ namespace OpenSim.Region.UserStatistics
116 replaceStr.Append(formatresult); 116 replaceStr.Append(formatresult);
117 replaceStr.Append("\">$3</font>] $4<br />"); 117 replaceStr.Append("\">$3</font>] $4<br />");
118 string repstr = replaceStr.ToString(); 118 string repstr = replaceStr.ToString();
119 119
120 output.Append(formatopen); 120 output.Append(formatopen);
121 output.Append(webFormat.Replace(result[i], repstr)); 121 output.Append(webFormat.Replace(result[i], repstr));
122 output.Append(formatclose); 122 output.Append(formatclose);
123 } 123 }
124 124
125 125
126 return output.ToString(); 126 return output.ToString();
127 } 127 }
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs
index 6f8b2aa..63dc87e 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.UserStatistics
44 jsFileName = "prototype.js"; 44 jsFileName = "prototype.js";
45 } 45 }
46 46
47 public Prototype_distributor(string jsName) 47 public Prototype_distributor(string jsName)
48 { 48 {
49 jsFileName = jsName; 49 jsFileName = jsName;
50 } 50 }
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs
index 74e9c66..8d5434f 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.UserStatistics
52 SqliteConnection dbConn = (SqliteConnection)pParams["DatabaseConnection"]; 52 SqliteConnection dbConn = (SqliteConnection)pParams["DatabaseConnection"];
53 List<SessionList> lstSessions = new List<SessionList>(); 53 List<SessionList> lstSessions = new List<SessionList>();
54 Hashtable requestvars = (Hashtable) pParams["RequestVars"]; 54 Hashtable requestvars = (Hashtable) pParams["RequestVars"];
55 55
56 56
57 string puserUUID = string.Empty; 57 string puserUUID = string.Empty;
58 string clientVersionString = string.Empty; 58 string clientVersionString = string.Empty;
@@ -113,7 +113,7 @@ namespace OpenSim.Region.UserStatistics
113 cmd.Parameters.Add(new SqliteParameter(":client_version", clientVersionString)); 113 cmd.Parameters.Add(new SqliteParameter(":client_version", clientVersionString));
114 114
115 SqliteDataReader sdr = cmd.ExecuteReader(); 115 SqliteDataReader sdr = cmd.ExecuteReader();
116 116
117 if (sdr.HasRows) 117 if (sdr.HasRows)
118 { 118 {
119 UUID userUUID = UUID.Zero; 119 UUID userUUID = UUID.Zero;
@@ -134,7 +134,7 @@ namespace OpenSim.Region.UserStatistics
134 } 134 }
135 135
136 ShortSessionData ssd = new ShortSessionData(); 136 ShortSessionData ssd = new ShortSessionData();
137 137
138 ssd.last_update = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["last_updated"])); 138 ssd.last_update = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["last_updated"]));
139 ssd.start_time = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["start_time"])); 139 ssd.start_time = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["start_time"]));
140 ssd.session_id = UUID.Parse(sdr["session_id"].ToString()); 140 ssd.session_id = UUID.Parse(sdr["session_id"].ToString());
@@ -145,7 +145,7 @@ namespace OpenSim.Region.UserStatistics
145 } 145 }
146 } 146 }
147 sdr.Close(); 147 sdr.Close();
148 cmd.Dispose(); 148 cmd.Dispose();
149 } 149 }
150 modeldata["SessionData"] = lstSessions; 150 modeldata["SessionData"] = lstSessions;
151 return modeldata; 151 return modeldata;
@@ -248,7 +248,7 @@ TD.align_top { vertical-align: top; }
248 output.Append(sesdata.client_version); 248 output.Append(sesdata.client_version);
249 HTMLUtil.TD_C(ref output); 249 HTMLUtil.TD_C(ref output);
250 HTMLUtil.TR_C(ref output); 250 HTMLUtil.TR_C(ref output);
251 251
252 } 252 }
253 HTMLUtil.TR_O(ref output, ""); 253 HTMLUtil.TR_O(ref output, "");
254 HTMLUtil.TD_O(ref output, "align_top", 1, 5); 254 HTMLUtil.TD_O(ref output, "align_top", 1, 5);
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs
index 06d9e91..513686d 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.UserStatistics
50 public Hashtable ProcessModel(Hashtable pParams) 50 public Hashtable ProcessModel(Hashtable pParams)
51 { 51 {
52 List<Scene> m_scene = (List<Scene>)pParams["Scenes"]; 52 List<Scene> m_scene = (List<Scene>)pParams["Scenes"];
53 53
54 Hashtable nh = new Hashtable(); 54 Hashtable nh = new Hashtable();
55 nh.Add("hdata", m_scene); 55 nh.Add("hdata", m_scene);
56 nh.Add("simstats", pParams["SimStats"]); 56 nh.Add("simstats", pParams["SimStats"]);
@@ -207,9 +207,9 @@ namespace OpenSim.Region.UserStatistics
207 HTMLUtil.TD_C(ref output); 207 HTMLUtil.TD_C(ref output);
208 HTMLUtil.TR_C(ref output); 208 HTMLUtil.TR_C(ref output);
209 HTMLUtil.TABLE_C(ref output); 209 HTMLUtil.TABLE_C(ref output);
210 210
211 } 211 }
212 212
213 return output.ToString(); 213 return output.ToString();
214 } 214 }
215 215
@@ -218,7 +218,7 @@ namespace OpenSim.Region.UserStatistics
218 /// <pre> 218 /// <pre>
219 /// {"REGIONNAME": { 219 /// {"REGIONNAME": {
220 /// "region": "REGIONNAME", 220 /// "region": "REGIONNAME",
221 /// "timeDilation": "101", 221 /// "timeDilation": "101",
222 /// ... // the rest of the stat info 222 /// ... // the rest of the stat info
223 /// }, 223 /// },
224 /// ... // entries for each region 224 /// ... // entries for each region
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
index bd5289f..c15b194 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.UserStatistics
57 { 57 {
58 private static readonly ILog m_log = 58 private static readonly ILog m_log =
59 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 59 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 private static SqliteConnection dbConn; 61 private static SqliteConnection dbConn;
62 62
63 /// <summary> 63 /// <summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Region.UserStatistics
67 67
68 private List<Scene> m_scenes = new List<Scene>(); 68 private List<Scene> m_scenes = new List<Scene>();
69 private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>(); 69 private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>();
70 private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>(); 70 private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>();
71 private const int updateStatsMod = 6; 71 private const int updateStatsMod = 6;
72 private int updateLogMod = 1; 72 private int updateLogMod = 1;
73 private volatile int updateLogCounter = 0; 73 private volatile int updateLogCounter = 0;
@@ -217,7 +217,7 @@ namespace OpenSim.Region.UserStatistics
217 { 217 {
218 m_loglines = readLogLines(10); 218 m_loglines = readLogLines(10);
219 219
220 if (updateLogCounter > 10000) 220 if (updateLogCounter > 10000)
221 updateLogCounter = 1; 221 updateLogCounter = 1;
222 } 222 }
223 223
@@ -228,12 +228,12 @@ namespace OpenSim.Region.UserStatistics
228 ss.ConsumeSimStats(stats); 228 ss.ConsumeSimStats(stats);
229 } 229 }
230 } 230 }
231 } 231 }
232 catch (KeyNotFoundException) 232 catch (KeyNotFoundException)
233 { 233 {
234 } 234 }
235 } 235 }
236 236
237 private Hashtable HandleUnknownCAPSRequest(Hashtable request) 237 private Hashtable HandleUnknownCAPSRequest(Hashtable request)
238 { 238 {
239 //string regpath = request["uri"].ToString(); 239 //string regpath = request["uri"].ToString();
@@ -257,7 +257,7 @@ namespace OpenSim.Region.UserStatistics
257 int response_code = 404; 257 int response_code = 404;
258 string contenttype = "text/html"; 258 string contenttype = "text/html";
259 bool jsonFormatOutput = false; 259 bool jsonFormatOutput = false;
260 260
261 string strOut = string.Empty; 261 string strOut = string.Empty;
262 262
263 // The request patch should be "/SStats/reportName" where 'reportName' 263 // The request patch should be "/SStats/reportName" where 'reportName'
@@ -288,15 +288,15 @@ namespace OpenSim.Region.UserStatistics
288 repParams["SimStats"] = m_simstatsCounters; 288 repParams["SimStats"] = m_simstatsCounters;
289 repParams["LogLines"] = m_loglines; 289 repParams["LogLines"] = m_loglines;
290 repParams["Reports"] = reports; 290 repParams["Reports"] = reports;
291 291
292 concurrencyCounter++; 292 concurrencyCounter++;
293 293
294 if (jsonFormatOutput) 294 if (jsonFormatOutput)
295 { 295 {
296 strOut = rep.RenderJson(rep.ProcessModel(repParams)); 296 strOut = rep.RenderJson(rep.ProcessModel(repParams));
297 contenttype = "text/json"; 297 contenttype = "text/json";
298 } 298 }
299 else 299 else
300 { 300 {
301 strOut = rep.RenderView(rep.ProcessModel(repParams)); 301 strOut = rep.RenderView(rep.ProcessModel(repParams));
302 } 302 }
@@ -312,7 +312,7 @@ namespace OpenSim.Region.UserStatistics
312 } 312 }
313 313
314 concurrencyCounter--; 314 concurrencyCounter--;
315 315
316 response_code = 200; 316 response_code = 200;
317 } 317 }
318 else 318 else
@@ -463,7 +463,7 @@ namespace OpenSim.Region.UserStatistics
463 UUID agentID, Caps caps) 463 UUID agentID, Caps caps)
464 { 464 {
465// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID); 465// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID);
466 466
467 UpdateUserStats(ParseViewerStats(request, agentID), dbConn); 467 UpdateUserStats(ParseViewerStats(request, agentID), dbConn);
468 468
469 return String.Empty; 469 return String.Empty;
@@ -525,7 +525,7 @@ namespace OpenSim.Region.UserStatistics
525 } 525 }
526 } 526 }
527 } 527 }
528 528
529 usd = uid.session_data; 529 usd = uid.session_data;
530 530
531 if (message.Type != OSDType.Map) 531 if (message.Type != OSDType.Map)
@@ -747,16 +747,16 @@ namespace OpenSim.Region.UserStatistics
747 );"; 747 );";
748 748
749 private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data ( 749 private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data (
750session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view, 750session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view,
751mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping, 751mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping,
752regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram, 752regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram,
753d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit, 753d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit,
754f_resent, f_send_packet 754f_resent, f_send_packet
755) 755)
756VALUES 756VALUES
757( 757(
758:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view, 758:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view,
759:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping, 759:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping,
760:regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram, 760:regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram,
761:d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit, 761:d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit,
762:f_resent, :f_send_packet 762:f_resent, :f_send_packet
@@ -980,7 +980,7 @@ VALUES
980 980
981 if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1) 981 if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1)
982 return 0; 982 return 0;
983 983
984 float freqtest = (float)freq.Length / freq.Rank; 984 float freqtest = (float)freq.Length / freq.Rank;
985 985
986 for (i = 0; i < freqtest; i++) 986 for (i = 0; i < freqtest; i++)
@@ -1116,7 +1116,7 @@ VALUES
1116 public List<float> _sim_fps; 1116 public List<float> _sim_fps;
1117 public List<int> _agents_in_view; 1117 public List<int> _agents_in_view;
1118 } 1118 }
1119 1119
1120 #endregion 1120 #endregion
1121 1121
1122 public class USimStatsData 1122 public class USimStatsData
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
index 770b1f2..54f3ab6 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
@@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
161 { 161 {
162 foreach (SceneObjectGroup sog in attachs) 162 foreach (SceneObjectGroup sog in attachs)
163 { 163 {
164 m_log.DebugFormat("[CAMERA-ONLY MODE]: Forcibly detaching attach {0} from {1} in {2}", 164 m_log.DebugFormat("[CAMERA-ONLY MODE]: Forcibly detaching attach {0} from {1} in {2}",
165 sog.Name, sp.Name, m_scene.RegionInfo.RegionName); 165 sog.Name, sp.Name, m_scene.RegionInfo.RegionName);
166 166
167 m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, sog); 167 m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, sog);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
index 709a16d..9833086 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
@@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
159 159
160 if (loc == null) 160 if (loc == null)
161 continue; 161 continue;
162 162
163 loc[d.Title] = OSD.FromString(d.Title); 163 loc[d.Title] = OSD.FromString(d.Title);
164 } 164 }
165 } 165 }
@@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
193 193
194 if (loc == null) 194 if (loc == null)
195 continue; 195 continue;
196 196
197 loc[d.Title] = OSD.FromString(d.Title); 197 loc[d.Title] = OSD.FromString(d.Title);
198 } 198 }
199 } 199 }
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
index e0537a4..8ed0bb3 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
50 private static List<String> m_lastNames = new List<String>(); 50 private static List<String> m_lastNames = new List<String>();
51 private static List<String> m_fullNames = new List<String>(); 51 private static List<String> m_fullNames = new List<String>();
52 52
53 public void Initialise(IConfigSource config) 53 public void Initialise(IConfigSource config)
54 { 54 {
55 IConfig moduleConfig = config.Configs["GodNames"]; 55 IConfig moduleConfig = config.Configs["GodNames"];
56 56
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
133 fnames.Add(name); 133 fnames.Add(name);
134 } 134 }
135 ((OSDMap)namesmap)["full_names"] = fnames; 135 ((OSDMap)namesmap)["full_names"] = fnames;
136 136
137 OSDArray lnames = new OSDArray(); 137 OSDArray lnames = new OSDArray();
138 foreach (string name in m_lastNames) { 138 foreach (string name in m_lastNames) {
139 lnames.Add(name); 139 lnames.Add(name);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
index 1ae18dd..2c2042d 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
@@ -49,7 +49,7 @@ using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
49 49
50namespace OpenSim.Region.OptionalModules.ViewerSupport 50namespace OpenSim.Region.OptionalModules.ViewerSupport
51{ 51{
52 public class SimulatorFeaturesHelper 52 public class SimulatorFeaturesHelper
53 { 53 {
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
index ceb3332..79b80f8 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
@@ -63,28 +63,28 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
63 /// If specified in Regions.ini, the settings should be within the region's section name. 63 /// If specified in Regions.ini, the settings should be within the region's section name.
64 /// If specified in OpenSim.ini, the settings should be within the [AutoBackupModule] section. 64 /// If specified in OpenSim.ini, the settings should be within the [AutoBackupModule] section.
65 /// Region-specific settings take precedence. 65 /// Region-specific settings take precedence.
66 /// 66 ///
67 /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. This setting does not support per-region basis. 67 /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. This setting does not support per-region basis.
68 /// All other settings under [AutoBackupModule] are ignored if AutoBackupModuleEnabled is false, even per-region settings! 68 /// All other settings under [AutoBackupModule] are ignored if AutoBackupModuleEnabled is false, even per-region settings!
69 /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality. 69 /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality.
70 /// This is the only required option for enabling auto-backup; the other options have sane defaults. 70 /// This is the only required option for enabling auto-backup; the other options have sane defaults.
71 /// If False for a particular region, the auto-backup module becomes a no-op for the region, and all other AutoBackup* settings are ignored. 71 /// If False for a particular region, the auto-backup module becomes a no-op for the region, and all other AutoBackup* settings are ignored.
72 /// If False globally (the default), only regions that specifically override it in Regions.ini will get AutoBackup functionality. 72 /// If False globally (the default), only regions that specifically override it in Regions.ini will get AutoBackup functionality.
73 /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours). 73 /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours).
74 /// The number of minutes between each backup attempt. 74 /// The number of minutes between each backup attempt.
75 /// If a negative or zero value is given, it is equivalent to setting AutoBackup = False. 75 /// If a negative or zero value is given, it is equivalent to setting AutoBackup = False.
76 /// AutoBackupBusyCheck: True/False. Default: True. 76 /// AutoBackupBusyCheck: True/False. Default: True.
77 /// If True, we will only take an auto-backup if a set of conditions are met. 77 /// If True, we will only take an auto-backup if a set of conditions are met.
78 /// These conditions are heuristics to try and avoid taking a backup when the sim is busy. 78 /// These conditions are heuristics to try and avoid taking a backup when the sim is busy.
79 /// AutoBackupSkipAssets 79 /// AutoBackupSkipAssets
80 /// If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately 80 /// If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately
81 /// AutoBackupKeepFilesForDays 81 /// AutoBackupKeepFilesForDays
82 /// Backup files older than this value (in days) are deleted during the current backup process, 0 will disable this and keep all backup files indefinitely 82 /// Backup files older than this value (in days) are deleted during the current backup process, 0 will disable this and keep all backup files indefinitely
83 /// AutoBackupScript: String. Default: not specified (disabled). 83 /// AutoBackupScript: String. Default: not specified (disabled).
84 /// File path to an executable script or binary to run when an automatic backup is taken. 84 /// File path to an executable script or binary to run when an automatic backup is taken.
85 /// The file should really be (Windows) an .exe or .bat, or (Linux/Mac) a shell script or binary. 85 /// The file should really be (Windows) an .exe or .bat, or (Linux/Mac) a shell script or binary.
86 /// Trying to "run" directories, or things with weird file associations on Win32, might cause unexpected results! 86 /// Trying to "run" directories, or things with weird file associations on Win32, might cause unexpected results!
87 /// argv[1] of the executed file/script will be the file name of the generated OAR. 87 /// argv[1] of the executed file/script will be the file name of the generated OAR.
88 /// If the process can't be spawned for some reason (file not found, no execute permission, etc), write a warning to the console. 88 /// If the process can't be spawned for some reason (file not found, no execute permission, etc), write a warning to the console.
89 /// AutoBackupNaming: string. Default: Time. 89 /// AutoBackupNaming: string. Default: Time.
90 /// One of three strings (case insensitive): 90 /// One of three strings (case insensitive):
@@ -295,7 +295,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
295 if (args.Length != 2) { 295 if (args.Length != 2) {
296 MainConsole.Instance.OutputFormat ("Usage: dobackup <regionname>"); 296 MainConsole.Instance.OutputFormat ("Usage: dobackup <regionname>");
297 return; 297 return;
298 } 298 }
299 bool found = false; 299 bool found = false;
300 string name = args [1]; 300 string name = args [1];
301 lock (m_Scenes) { 301 lock (m_Scenes) {
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
index ce7c368..b90f0c4 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque. 35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque.
36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation. 36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation.
37 /// </summary> 37 /// </summary>
38 /// 38 ///
39 public class AutoBackupModuleState 39 public class AutoBackupModuleState
40 { 40 {
41 private Dictionary<Guid, string> m_liveRequests = null; 41 private Dictionary<Guid, string> m_liveRequests = null;
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 8565f5a..47edeb9 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -151,13 +151,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
151 // to the command line parameters you use to start up your client 151 // to the command line parameters you use to start up your client
152 // This commonly looks like -helperuri http://127.0.0.1:9000/ 152 // This commonly looks like -helperuri http://127.0.0.1:9000/
153 153
154 154
155 // Local Server.. enables functionality only. 155 // Local Server.. enables functionality only.
156 httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func); 156 httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
157 httpServer.AddXmlRPCHandler("buyCurrency", buy_func); 157 httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
158 httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func); 158 httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
159 httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func); 159 httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func);
160 160
161 } 161 }
162 162
163 if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle)) 163 if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
@@ -212,7 +212,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
212 212
213 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); 213 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
214 214
215 215
216 BalanceUpdate(fromID, toID, give_result, description); 216 BalanceUpdate(fromID, toID, give_result, description);
217 217
218 return give_result; 218 return give_result;
@@ -303,7 +303,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
303 private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description) 303 private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description)
304 { 304 {
305 bool result = true; 305 bool result = true;
306 306
307 return result; 307 return result;
308 } 308 }
309 309
@@ -377,10 +377,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
377 else 377 else
378 { 378 {
379 m_log.ErrorFormat( 379 m_log.ErrorFormat(
380 "[MONEY]: Could not resolve user {0}", 380 "[MONEY]: Could not resolve user {0}",
381 agentID); 381 agentID);
382 } 382 }
383 383
384 return String.Empty; 384 return String.Empty;
385 } 385 }
386 386
@@ -464,7 +464,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
464 Hashtable quoteResponse = new Hashtable(); 464 Hashtable quoteResponse = new Hashtable();
465 XmlRpcResponse returnval = new XmlRpcResponse(); 465 XmlRpcResponse returnval = new XmlRpcResponse();
466 466
467 467
468 Hashtable currencyResponse = new Hashtable(); 468 Hashtable currencyResponse = new Hashtable();
469 currencyResponse.Add("estimatedCost", 0); 469 currencyResponse.Add("estimatedCost", 0);
470 currencyResponse.Add("currencyBuy", amount); 470 currencyResponse.Add("currencyBuy", amount);
@@ -475,7 +475,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
475 475
476 returnval.Value = quoteResponse; 476 returnval.Value = quoteResponse;
477 return returnval; 477 return returnval;
478 478
479 479
480 480
481 } 481 }
@@ -485,7 +485,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
485 // Hashtable requestData = (Hashtable) request.Params[0]; 485 // Hashtable requestData = (Hashtable) request.Params[0];
486 // UUID agentId = UUID.Zero; 486 // UUID agentId = UUID.Zero;
487 // int amount = 0; 487 // int amount = 0;
488 488
489 XmlRpcResponse returnval = new XmlRpcResponse(); 489 XmlRpcResponse returnval = new XmlRpcResponse();
490 Hashtable returnresp = new Hashtable(); 490 Hashtable returnresp = new Hashtable();
491 returnresp.Add("success", true); 491 returnresp.Add("success", true);
@@ -536,7 +536,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
536 536
537 // UUID agentId = UUID.Zero; 537 // UUID agentId = UUID.Zero;
538 // int amount = 0; 538 // int amount = 0;
539 539
540 retparam.Add("success", true); 540 retparam.Add("success", true);
541 ret.Value = retparam; 541 ret.Value = retparam;
542 542
@@ -553,7 +553,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
553 /// <param name="agentID"></param> 553 /// <param name="agentID"></param>
554 private void CheckExistAndRefreshFunds(UUID agentID) 554 private void CheckExistAndRefreshFunds(UUID agentID)
555 { 555 {
556 556
557 } 557 }
558 558
559 /// <summary> 559 /// <summary>
@@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
564 private int GetFundsForAgentID(UUID AgentID) 564 private int GetFundsForAgentID(UUID AgentID)
565 { 565 {
566 int returnfunds = 0; 566 int returnfunds = 0;
567 567
568 return returnfunds; 568 return returnfunds;
569 } 569 }
570 570
571 // private void SetLocalFundsForAgentID(UUID AgentID, int amount) 571 // private void SetLocalFundsForAgentID(UUID AgentID, int amount)
572 // { 572 // {
573 573
574 // } 574 // }
575 575
576 #endregion 576 #endregion
@@ -689,7 +689,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
689 /// <see cref="OpenSim.Region.Framework.Scenes.EventManager.ClientClosed"/> 689 /// <see cref="OpenSim.Region.Framework.Scenes.EventManager.ClientClosed"/>
690 public void ClientClosed(UUID AgentID, Scene scene) 690 public void ClientClosed(UUID AgentID, Scene scene)
691 { 691 {
692 692
693 } 693 }
694 694
695 /// <summary> 695 /// <summary>
@@ -708,19 +708,19 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
708 708
709 private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e) 709 private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e)
710 { 710 {
711 711
712 712
713 lock (e) 713 lock (e)
714 { 714 {
715 e.economyValidated = true; 715 e.economyValidated = true;
716 } 716 }
717 717
718 718
719 } 719 }
720 720
721 private void processLandBuy(Object osender, EventManager.LandBuyArgs e) 721 private void processLandBuy(Object osender, EventManager.LandBuyArgs e)
722 { 722 {
723 723
724 } 724 }
725 725
726 /// <summary> 726 /// <summary>
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
730 /// <param name="e"></param> 730 /// <param name="e"></param>
731 private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e) 731 private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e)
732 { 732 {
733 733
734 } 734 }
735 735
736 /// <summary> 736 /// <summary>
@@ -739,7 +739,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
739 /// <param name="avatar"></param> 739 /// <param name="avatar"></param>
740 private void MakeChildAgent(ScenePresence avatar) 740 private void MakeChildAgent(ScenePresence avatar)
741 { 741 {
742 742
743 } 743 }
744 744
745 /// <summary> 745 /// <summary>
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
748 /// <param name="AgentId"></param> 748 /// <param name="AgentId"></param>
749 private void ClientLoggedOut(UUID AgentId, Scene scene) 749 private void ClientLoggedOut(UUID AgentId, Scene scene)
750 { 750 {
751 751
752 } 752 }
753 753
754 /// <summary> 754 /// <summary>
@@ -768,7 +768,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
768 /// <param name="regionID"></param> 768 /// <param name="regionID"></param>
769 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) 769 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
770 { 770 {
771 771
772 //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); 772 //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
773 } 773 }
774 774
@@ -809,12 +809,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
809 809
810 Scene s = LocateSceneClientIn(remoteClient.AgentId); 810 Scene s = LocateSceneClientIn(remoteClient.AgentId);
811 811
812 // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless 812 // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless
813 // combined with other implementations. We're actually validating that the client is sending the data 813 // combined with other implementations. We're actually validating that the client is sending the data
814 // that it should. In theory, the client should already know what to send here because it'll see it when it 814 // that it should. In theory, the client should already know what to send here because it'll see it when it
815 // gets the object data. If the data sent by the client doesn't match the object, the viewer probably has an 815 // gets the object data. If the data sent by the client doesn't match the object, the viewer probably has an
816 // old idea of what the object properties are. Viewer developer Hazim informed us that the base module 816 // old idea of what the object properties are. Viewer developer Hazim informed us that the base module
817 // didn't check the client sent data against the object do any. Since the base modules are the 817 // didn't check the client sent data against the object do any. Since the base modules are the
818 // 'crowning glory' examples of good practice.. 818 // 'crowning glory' examples of good practice..
819 819
820 // Validate that the object exists in the scene the user is in 820 // Validate that the object exists in the scene the user is in
@@ -824,15 +824,15 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
824 remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); 824 remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false);
825 return; 825 return;
826 } 826 }
827 827
828 // Validate that the client sent the price that the object is being sold for 828 // Validate that the client sent the price that the object is being sold for
829 if (part.SalePrice != salePrice) 829 if (part.SalePrice != salePrice)
830 { 830 {
831 remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false); 831 remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false);
832 return; 832 return;
833 } 833 }
834 834
835 // Validate that the client sent the proper sale type the object has set 835 // Validate that the client sent the proper sale type the object has set
836 if (part.ObjectSaleType != saleType) 836 if (part.ObjectSaleType != saleType)
837 { 837 {
838 remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false); 838 remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false);
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 0cabe47..6a7c735 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
49 } 49 }
50 50
51 public delegate void ChatToNPC( 51 public delegate void ChatToNPC(
52 string message, byte type, Vector3 fromPos, string fromName, 52 string message, byte type, Vector3 fromPos, string fromName,
53 UUID fromAgentID, UUID ownerID, byte source, byte audible); 53 UUID fromAgentID, UUID ownerID, byte source, byte audible);
54 54
55 /// <summary> 55 /// <summary>
@@ -223,7 +223,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
223 { 223 {
224 224
225 } 225 }
226 226
227 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, 227 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos,
228 Quaternion SitOrientation, bool autopilot, 228 Quaternion SitOrientation, bool autopilot,
229 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 229 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
@@ -519,7 +519,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
519 public event AvatarInterestUpdate OnAvatarInterestUpdate; 519 public event AvatarInterestUpdate OnAvatarInterestUpdate;
520 520
521 public event PlacesQuery OnPlacesQuery; 521 public event PlacesQuery OnPlacesQuery;
522 522
523 public event FindAgentUpdate OnFindAgent; 523 public event FindAgentUpdate OnFindAgent;
524 public event TrackAgentUpdate OnTrackAgent; 524 public event TrackAgentUpdate OnTrackAgent;
525 public event NewUserReport OnUserReport; 525 public event NewUserReport OnUserReport;
@@ -931,7 +931,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
931 OnRegionHandShakeReply(this); 931 OnRegionHandShakeReply(this);
932 } 932 }
933 } 933 }
934 934
935 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 935 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
936 { 936 {
937 } 937 }
@@ -951,7 +951,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
951 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 951 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
952 { 952 {
953 } 953 }
954 954
955 public void SendImageNotFound(UUID imageid) 955 public void SendImageNotFound(UUID imageid)
956 { 956 {
957 } 957 }
@@ -959,7 +959,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
959 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 959 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
960 { 960 {
961 } 961 }
962 962
963 public void SendShutdownConnectionNotice() 963 public void SendShutdownConnectionNotice()
964 { 964 {
965 } 965 }
@@ -970,7 +970,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
970 970
971 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) 971 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
972 { 972 {
973 973
974 } 974 }
975 975
976 public void SendObjectPropertiesReply(ISceneEntity entity) 976 public void SendObjectPropertiesReply(ISceneEntity entity)
@@ -984,7 +984,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
984 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 984 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
985 { 985 {
986 } 986 }
987 987
988 public void SendViewerTime(int phase) 988 public void SendViewerTime(int phase)
989 { 989 {
990 } 990 }
@@ -1029,7 +1029,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1029 // We never start the client, so always fail. 1029 // We never start the client, so always fail.
1030 throw new NotImplementedException(); 1030 throw new NotImplementedException();
1031 } 1031 }
1032 1032
1033 public void Stop() 1033 public void Stop()
1034 { 1034 {
1035 } 1035 }
@@ -1224,11 +1224,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1224 public void SendJoinGroupReply(UUID groupID, bool success) 1224 public void SendJoinGroupReply(UUID groupID, bool success)
1225 { 1225 {
1226 } 1226 }
1227 1227
1228 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) 1228 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
1229 { 1229 {
1230 } 1230 }
1231 1231
1232 public void SendLeaveGroupReply(UUID groupID, bool success) 1232 public void SendLeaveGroupReply(UUID groupID, bool success)
1233 { 1233 {
1234 } 1234 }
@@ -1318,7 +1318,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1318 { 1318 {
1319 } 1319 }
1320 #endregion 1320 #endregion
1321 1321
1322 public void SendRebakeAvatarTextures(UUID textureID) 1322 public void SendRebakeAvatarTextures(UUID textureID)
1323 { 1323 {
1324 } 1324 }
@@ -1326,15 +1326,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1326 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) 1326 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1327 { 1327 {
1328 } 1328 }
1329 1329
1330 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) 1330 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1331 { 1331 {
1332 } 1332 }
1333 1333
1334 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) 1334 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1335 { 1335 {
1336 } 1336 }
1337 1337
1338 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) 1338 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1339 { 1339 {
1340 } 1340 }
@@ -1354,7 +1354,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1354 public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId) 1354 public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId)
1355 { 1355 {
1356 } 1356 }
1357 1357
1358 public void SendAgentTerseUpdate(ISceneEntity presence) 1358 public void SendAgentTerseUpdate(ISceneEntity presence)
1359 { 1359 {
1360 } 1360 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index a892cf4..9a1ea73 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -209,10 +209,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
209 UserAccountHelpers.CreateUserWithInventory(m_scene, userId); 209 UserAccountHelpers.CreateUserWithInventory(m_scene, userId);
210 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 210 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
211 211
212 InventoryItemBase att1Item 212 InventoryItemBase att1Item
213 = UserInventoryHelpers.CreateInventoryItem( 213 = UserInventoryHelpers.CreateInventoryItem(
214 m_scene, "att1", TestHelpers.ParseTail(0x2), TestHelpers.ParseTail(0x3), sp.UUID, InventoryType.Object); 214 m_scene, "att1", TestHelpers.ParseTail(0x2), TestHelpers.ParseTail(0x3), sp.UUID, InventoryType.Object);
215 InventoryItemBase att2Item 215 InventoryItemBase att2Item
216 = UserInventoryHelpers.CreateInventoryItem( 216 = UserInventoryHelpers.CreateInventoryItem(
217 m_scene, "att2", TestHelpers.ParseTail(0x12), TestHelpers.ParseTail(0x13), sp.UUID, InventoryType.Object); 217 m_scene, "att2", TestHelpers.ParseTail(0x12), TestHelpers.ParseTail(0x13), sp.UUID, InventoryType.Object);
218 218
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index bea3a1e..d0d726c 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -54,38 +54,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
54 private Scene m_scene; 54 private Scene m_scene;
55 55
56 public string Name { get { return "Scene Commands Module"; } } 56 public string Name { get { return "Scene Commands Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
78 78
79 m_scene = scene; 79 m_scene = scene;
80 80
81 m_scene.RegisterModuleInterface<ISceneCommandsModule>(this); 81 m_scene.RegisterModuleInterface<ISceneCommandsModule>(this);
82 } 82 }
83 83
84 public void RemoveRegion(Scene scene) 84 public void RemoveRegion(Scene scene)
85 { 85 {
86// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 86// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
87 } 87 }
88 88
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -101,7 +101,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
101 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" 101 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
102 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n" 102 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
103 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n" 103 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n"
104 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n" 104 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
105 + "collisions - if false then collisions with other objects are turned off.\n" 105 + "collisions - if false then collisions with other objects are turned off.\n"
106 + "pbackup - if false then periodic scene backup is turned off.\n" 106 + "pbackup - if false then periodic scene backup is turned off.\n"
107 + "physics - if false then all physics objects are non-physical.\n" 107 + "physics - if false then all physics objects are non-physical.\n"
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
213 213
214 // FIXME: This can only come from the console at the moment but might not always be true. 214 // FIXME: This can only come from the console at the moment but might not always be true.
215 if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue)) 215 if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue))
216 m_scene.SendPeriodicAppearanceUpdates = newValue; 216 m_scene.SendPeriodicAppearanceUpdates = newValue;
217 } 217 }
218 218
219 if (options.ContainsKey("client-pos-upd")) 219 if (options.ContainsKey("client-pos-upd"))
@@ -222,7 +222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
222 222
223 // FIXME: This can only come from the console at the moment but might not always be true. 223 // FIXME: This can only come from the console at the moment but might not always be true.
224 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue)) 224 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue))
225 m_scene.RootPositionUpdateTolerance = newValue; 225 m_scene.RootPositionUpdateTolerance = newValue;
226 } 226 }
227 227
228 if (options.ContainsKey("client-rot-upd")) 228 if (options.ContainsKey("client-rot-upd"))
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
231 231
232 // FIXME: This can only come from the console at the moment but might not always be true. 232 // FIXME: This can only come from the console at the moment but might not always be true.
233 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue)) 233 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue))
234 m_scene.RootRotationUpdateTolerance = newValue; 234 m_scene.RootRotationUpdateTolerance = newValue;
235 } 235 }
236 236
237 if (options.ContainsKey("client-vel-upd")) 237 if (options.ContainsKey("client-vel-upd"))
@@ -240,7 +240,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
240 240
241 // FIXME: This can only come from the console at the moment but might not always be true. 241 // FIXME: This can only come from the console at the moment but might not always be true.
242 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue)) 242 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue))
243 m_scene.RootVelocityUpdateTolerance = newValue; 243 m_scene.RootVelocityUpdateTolerance = newValue;
244 } 244 }
245 245
246 if (options.ContainsKey("root-upd-per")) 246 if (options.ContainsKey("root-upd-per"))
@@ -249,7 +249,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
249 249
250 // FIXME: This can only come from the console at the moment but might not always be true. 250 // FIXME: This can only come from the console at the moment but might not always be true.
251 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue)) 251 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue))
252 m_scene.RootTerseUpdatePeriod = newValue; 252 m_scene.RootTerseUpdatePeriod = newValue;
253 } 253 }
254 254
255 if (options.ContainsKey("child-upd-per")) 255 if (options.ContainsKey("child-upd-per"))
@@ -258,7 +258,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
258 258
259 // FIXME: This can only come from the console at the moment but might not always be true. 259 // FIXME: This can only come from the console at the moment but might not always be true.
260 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue)) 260 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue))
261 m_scene.ChildTerseUpdatePeriod = newValue; 261 m_scene.ChildTerseUpdatePeriod = newValue;
262 } 262 }
263 263
264 if (options.ContainsKey("pbackup")) 264 if (options.ContainsKey("pbackup"))
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index e4a3382..e22c6ea 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -45,7 +45,7 @@ using System.IO;
45namespace OpenSim.Region.OptionalModules.World.TreePopulator 45namespace OpenSim.Region.OptionalModules.World.TreePopulator
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// Version 2.02 - Still hacky 48 /// Version 2.02 - Still hacky
49 /// </summary> 49 /// </summary>
50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")] 50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")]
51 public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule 51 public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
@@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
60 public string m_name; 60 public string m_name;
61 public Boolean m_frozen; 61 public Boolean m_frozen;
62 public Tree m_tree_type; 62 public Tree m_tree_type;
63 public int m_tree_quantity; 63 public int m_tree_quantity;
64 public float m_treeline_low; 64 public float m_treeline_low;
65 public float m_treeline_high; 65 public float m_treeline_high;
66 public Vector3 m_seed_point; 66 public Vector3 m_seed_point;
@@ -78,7 +78,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
78 { 78 {
79 } 79 }
80 80
81 public Copse(string fileName, Boolean planted) 81 public Copse(string fileName, Boolean planted)
82 { 82 {
83 Copse cp = (Copse)DeserializeObject(fileName); 83 Copse cp = (Copse)DeserializeObject(fileName);
84 84
@@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
139 { 139 {
140 string frozen = (this.m_frozen ? "F" : "A"); 140 string frozen = (this.m_frozen ? "F" : "A");
141 141
142 return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};", 142 return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};",
143 frozen, 143 frozen,
144 this.m_name, 144 this.m_name,
145 this.m_tree_quantity, 145 this.m_tree_quantity,
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
156 156
157 private List<Copse> m_copse; 157 private List<Copse> m_copse;
158 158
159 private double m_update_ms = 1000.0; // msec between updates 159 private double m_update_ms = 1000.0; // msec between updates
160 private bool m_active_trees = false; 160 private bool m_active_trees = false;
161 161
162 Timer CalculateTrees; 162 Timer CalculateTrees;
@@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
174 174
175 public void Initialise(IConfigSource config) 175 public void Initialise(IConfigSource config)
176 { 176 {
177 177
178 // ini file settings 178 // ini file settings
179 try 179 try
180 { 180 {
@@ -621,11 +621,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
621 CalculateTrees.Elapsed += CalculateTrees_Elapsed; 621 CalculateTrees.Elapsed += CalculateTrees_Elapsed;
622 CalculateTrees.Start(); 622 CalculateTrees.Start();
623 } 623 }
624 else 624 else
625 { 625 {
626 CalculateTrees.Stop(); 626 CalculateTrees.Stop();
627 } 627 }
628 } 628 }
629 629
630 private void growTrees() 630 private void growTrees()
631 { 631 {
@@ -670,7 +670,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
670 if (copse.m_trees.Count < copse.m_tree_quantity) 670 if (copse.m_trees.Count < copse.m_tree_quantity)
671 { 671 {
672 // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height 672 // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height
673 if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0) 673 if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0)
674 { 674 {
675 if (Util.RandomClass.NextDouble() > 0.75) 675 if (Util.RandomClass.NextDouble() > 0.75)
676 { 676 {
diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs
index 3944047..67d9207 100644
--- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs
+++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs
@@ -268,23 +268,23 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
268 set { return; } 268 set { return; }
269 } 269 }
270 270
271 public override Quaternion APIDTarget 271 public override Quaternion APIDTarget
272 { 272 {
273 set { return; } 273 set { return; }
274 } 274 }
275 275
276 public override bool APIDActive 276 public override bool APIDActive
277 { 277 {
278 set { return; } 278 set { return; }
279 } 279 }
280 280
281 public override float APIDStrength 281 public override float APIDStrength
282 { 282 {
283 set { return; } 283 set { return; }
284 } 284 }
285 285
286 public override float APIDDamping 286 public override float APIDDamping
287 { 287 {
288 set { return; } 288 set { return; }
289 } 289 }
290 290
diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs
index d2cd028..58c2581 100644
--- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs
+++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs
@@ -281,23 +281,23 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
281 set { return; } 281 set { return; }
282 } 282 }
283 283
284 public override Quaternion APIDTarget 284 public override Quaternion APIDTarget
285 { 285 {
286 set { return; } 286 set { return; }
287 } 287 }
288 288
289 public override bool APIDActive 289 public override bool APIDActive
290 { 290 {
291 set { return; } 291 set { return; }
292 } 292 }
293 293
294 public override float APIDStrength 294 public override float APIDStrength
295 { 295 {
296 set { return; } 296 set { return; }
297 } 297 }
298 298
299 public override float APIDDamping 299 public override float APIDDamping
300 { 300 {
301 set { return; } 301 set { return; }
302 } 302 }
303 303
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs
index c4a923c..42db7fe 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs
@@ -155,8 +155,8 @@ public BSAPIUnman(string paramName, BSScene physScene)
155 155
156// Initialization and simulation 156// Initialization and simulation
157public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, 157public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms,
158 int maxCollisions, ref CollisionDesc[] collisionArray, 158 int maxCollisions, ref CollisionDesc[] collisionArray,
159 int maxUpdates, ref EntityProperties[] updateArray 159 int maxUpdates, ref EntityProperties[] updateArray
160 ) 160 )
161{ 161{
162 // Pin down the memory that will be used to pass object collisions and updates back from unmanaged code 162 // Pin down the memory that will be used to pass object collisions and updates back from unmanaged code
@@ -1472,8 +1472,8 @@ public delegate void DebugLogCallback([MarshalAs(UnmanagedType.LPStr)]string msg
1472// Initialization and simulation 1472// Initialization and simulation
1473[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1473[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1474public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms, 1474public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms,
1475 int maxCollisions, IntPtr collisionArray, 1475 int maxCollisions, IntPtr collisionArray,
1476 int maxUpdates, IntPtr updateArray, 1476 int maxUpdates, IntPtr updateArray,
1477 DebugLogCallback logRoutine); 1477 DebugLogCallback logRoutine);
1478 1478
1479[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1479[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs
index 887311d..37017b0 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs
@@ -815,161 +815,161 @@ private sealed class BulletConstraintXNA : BulletConstraint
815 public override bool SliderSetLimits(BulletConstraint pConstraint, int lowerUpper, int linAng, float val) 815 public override bool SliderSetLimits(BulletConstraint pConstraint, int lowerUpper, int linAng, float val)
816 { 816 {
817 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 817 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
818 switch (lowerUpper) 818 switch (lowerUpper)
819 { 819 {
820 case SLIDER_LOWER_LIMIT: 820 case SLIDER_LOWER_LIMIT:
821 switch (linAng) 821 switch (linAng)
822 { 822 {
823 case SLIDER_LINEAR: 823 case SLIDER_LINEAR:
824 constraint.SetLowerLinLimit(val); 824 constraint.SetLowerLinLimit(val);
825 break; 825 break;
826 case SLIDER_ANGULAR: 826 case SLIDER_ANGULAR:
827 constraint.SetLowerAngLimit(val); 827 constraint.SetLowerAngLimit(val);
828 break; 828 break;
829 } 829 }
830 break; 830 break;
831 case SLIDER_UPPER_LIMIT: 831 case SLIDER_UPPER_LIMIT:
832 switch (linAng) 832 switch (linAng)
833 { 833 {
834 case SLIDER_LINEAR: 834 case SLIDER_LINEAR:
835 constraint.SetUpperLinLimit(val); 835 constraint.SetUpperLinLimit(val);
836 break; 836 break;
837 case SLIDER_ANGULAR: 837 case SLIDER_ANGULAR:
838 constraint.SetUpperAngLimit(val); 838 constraint.SetUpperAngLimit(val);
839 break; 839 break;
840 } 840 }
841 break; 841 break;
842 } 842 }
843 return true; 843 return true;
844 } 844 }
845 public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val) 845 public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val)
846 { 846 {
847 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 847 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
848 switch (softRestDamp) 848 switch (softRestDamp)
849 { 849 {
850 case SLIDER_SET_SOFTNESS: 850 case SLIDER_SET_SOFTNESS:
851 switch (dirLimOrtho) 851 switch (dirLimOrtho)
852 { 852 {
853 case SLIDER_SET_DIRECTION: 853 case SLIDER_SET_DIRECTION:
854 switch (linAng) 854 switch (linAng)
855 { 855 {
856 case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break; 856 case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break;
857 case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break; 857 case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break;
858 } 858 }
859 break; 859 break;
860 case SLIDER_SET_LIMIT: 860 case SLIDER_SET_LIMIT:
861 switch (linAng) 861 switch (linAng)
862 { 862 {
863 case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break; 863 case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break;
864 case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break; 864 case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break;
865 } 865 }
866 break; 866 break;
867 case SLIDER_SET_ORTHO: 867 case SLIDER_SET_ORTHO:
868 switch (linAng) 868 switch (linAng)
869 { 869 {
870 case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break; 870 case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break;
871 case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break; 871 case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break;
872 } 872 }
873 break; 873 break;
874 } 874 }
875 break; 875 break;
876 case SLIDER_SET_RESTITUTION: 876 case SLIDER_SET_RESTITUTION:
877 switch (dirLimOrtho) 877 switch (dirLimOrtho)
878 { 878 {
879 case SLIDER_SET_DIRECTION: 879 case SLIDER_SET_DIRECTION:
880 switch (linAng) 880 switch (linAng)
881 { 881 {
882 case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break; 882 case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break;
883 case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break; 883 case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break;
884 } 884 }
885 break; 885 break;
886 case SLIDER_SET_LIMIT: 886 case SLIDER_SET_LIMIT:
887 switch (linAng) 887 switch (linAng)
888 { 888 {
889 case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break; 889 case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break;
890 case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break; 890 case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break;
891 } 891 }
892 break; 892 break;
893 case SLIDER_SET_ORTHO: 893 case SLIDER_SET_ORTHO:
894 switch (linAng) 894 switch (linAng)
895 { 895 {
896 case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break; 896 case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break;
897 case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break; 897 case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break;
898 } 898 }
899 break; 899 break;
900 } 900 }
901 break; 901 break;
902 case SLIDER_SET_DAMPING: 902 case SLIDER_SET_DAMPING:
903 switch (dirLimOrtho) 903 switch (dirLimOrtho)
904 { 904 {
905 case SLIDER_SET_DIRECTION: 905 case SLIDER_SET_DIRECTION:
906 switch (linAng) 906 switch (linAng)
907 { 907 {
908 case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break; 908 case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break;
909 case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break; 909 case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break;
910 } 910 }
911 break; 911 break;
912 case SLIDER_SET_LIMIT: 912 case SLIDER_SET_LIMIT:
913 switch (linAng) 913 switch (linAng)
914 { 914 {
915 case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break; 915 case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break;
916 case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break; 916 case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break;
917 } 917 }
918 break; 918 break;
919 case SLIDER_SET_ORTHO: 919 case SLIDER_SET_ORTHO:
920 switch (linAng) 920 switch (linAng)
921 { 921 {
922 case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break; 922 case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break;
923 case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break; 923 case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break;
924 } 924 }
925 break; 925 break;
926 } 926 }
927 break; 927 break;
928 } 928 }
929 return true; 929 return true;
930 } 930 }
931 public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse) 931 public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse)
932 { 932 {
933 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 933 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
934 switch (linAng) 934 switch (linAng)
935 { 935 {
936 case SLIDER_LINEAR: 936 case SLIDER_LINEAR:
937 constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true); 937 constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true);
938 break; 938 break;
939 case SLIDER_ANGULAR: 939 case SLIDER_ANGULAR:
940 constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true); 940 constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true);
941 break; 941 break;
942 } 942 }
943 return true; 943 return true;
944 } 944 }
945 public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val) 945 public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val)
946 { 946 {
947 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 947 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
948 switch (forceVel) 948 switch (forceVel)
949 { 949 {
950 case SLIDER_MOTOR_VELOCITY: 950 case SLIDER_MOTOR_VELOCITY:
951 switch (linAng) 951 switch (linAng)
952 { 952 {
953 case SLIDER_LINEAR: 953 case SLIDER_LINEAR:
954 constraint.SetTargetLinMotorVelocity(val); 954 constraint.SetTargetLinMotorVelocity(val);
955 break; 955 break;
956 case SLIDER_ANGULAR: 956 case SLIDER_ANGULAR:
957 constraint.SetTargetAngMotorVelocity(val); 957 constraint.SetTargetAngMotorVelocity(val);
958 break; 958 break;
959 } 959 }
960 break; 960 break;
961 case SLIDER_MAX_MOTOR_FORCE: 961 case SLIDER_MAX_MOTOR_FORCE:
962 switch (linAng) 962 switch (linAng)
963 { 963 {
964 case SLIDER_LINEAR: 964 case SLIDER_LINEAR:
965 constraint.SetMaxLinMotorForce(val); 965 constraint.SetMaxLinMotorForce(val);
966 break; 966 break;
967 case SLIDER_ANGULAR: 967 case SLIDER_ANGULAR:
968 constraint.SetMaxAngMotorForce(val); 968 constraint.SetMaxAngMotorForce(val);
969 break; 969 break;
970 } 970 }
971 break; 971 break;
972 } 972 }
973 return true; 973 return true;
974 } 974 }
975 975
@@ -1197,20 +1197,20 @@ private sealed class BulletConstraintXNA : BulletConstraint
1197 }; 1197 };
1198 /* 1198 /*
1199 m_mass = mass; 1199 m_mass = mass;
1200 m_motionState =motionState; 1200 m_motionState =motionState;
1201 m_collisionShape = collisionShape; 1201 m_collisionShape = collisionShape;
1202 m_localInertia = localInertia; 1202 m_localInertia = localInertia;
1203 m_linearDamping = 0f; 1203 m_linearDamping = 0f;
1204 m_angularDamping = 0f; 1204 m_angularDamping = 0f;
1205 m_friction = 0.5f; 1205 m_friction = 0.5f;
1206 m_restitution = 0f; 1206 m_restitution = 0f;
1207 m_linearSleepingThreshold = 0.8f; 1207 m_linearSleepingThreshold = 0.8f;
1208 m_angularSleepingThreshold = 1f; 1208 m_angularSleepingThreshold = 1f;
1209 m_additionalDamping = false; 1209 m_additionalDamping = false;
1210 m_additionalDampingFactor = 0.005f; 1210 m_additionalDampingFactor = 0.005f;
1211 m_additionalLinearDampingThresholdSqr = 0.01f; 1211 m_additionalLinearDampingThresholdSqr = 0.01f;
1212 m_additionalAngularDampingThresholdSqr = 0.01f; 1212 m_additionalAngularDampingThresholdSqr = 0.01f;
1213 m_additionalAngularDampingFactor = 0.01f; 1213 m_additionalAngularDampingFactor = 0.01f;
1214 m_startWorldTransform = IndexedMatrix.Identity; 1214 m_startWorldTransform = IndexedMatrix.Identity;
1215 */ 1215 */
1216 body.SetUserPointer(pLocalID); 1216 body.SetUserPointer(pLocalID);
@@ -2172,7 +2172,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2172 } 2172 }
2173 2173
2174 public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, 2174 public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
2175 float scaleFactor, float collisionMargin) 2175 float scaleFactor, float collisionMargin)
2176 { 2176 {
2177 const int upAxis = 2; 2177 const int upAxis = 2;
2178 HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y, 2178 HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y,
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs
index 87cf972..f2019ae 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs
@@ -205,7 +205,7 @@ public class BSActorMoveToTarget : BSActor
205 addedForce = correctionVector / timeStep; 205 addedForce = correctionVector / timeStep;
206 // Remove the existing velocity (only the moveToTarget force counts) 206 // Remove the existing velocity (only the moveToTarget force counts)
207 addedForce -= m_controllingPrim.RawVelocity; 207 addedForce -= m_controllingPrim.RawVelocity;
208 // Overcome gravity. 208 // Overcome gravity.
209 addedForce -= m_controllingPrim.Gravity; 209 addedForce -= m_controllingPrim.Gravity;
210 210
211 // Add enough force to overcome the mass of the object 211 // Add enough force to overcome the mass of the object
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
index 7756b10..816189f 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
@@ -36,16 +36,16 @@ namespace OpenSim.Region.PhysicsModule.BulletS {
36 // Constraint type values as defined by Bullet 36 // Constraint type values as defined by Bullet
37public enum ConstraintType : int 37public enum ConstraintType : int
38{ 38{
39 POINT2POINT_CONSTRAINT_TYPE = 3, 39 POINT2POINT_CONSTRAINT_TYPE = 3,
40 HINGE_CONSTRAINT_TYPE, 40 HINGE_CONSTRAINT_TYPE,
41 CONETWIST_CONSTRAINT_TYPE, 41 CONETWIST_CONSTRAINT_TYPE,
42 D6_CONSTRAINT_TYPE, 42 D6_CONSTRAINT_TYPE,
43 SLIDER_CONSTRAINT_TYPE, 43 SLIDER_CONSTRAINT_TYPE,
44 CONTACT_CONSTRAINT_TYPE, 44 CONTACT_CONSTRAINT_TYPE,
45 D6_SPRING_CONSTRAINT_TYPE, 45 D6_SPRING_CONSTRAINT_TYPE,
46 GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82 46 GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82
47 FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82 47 FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82
48 MAX_CONSTRAINT_TYPE, // last type defined by Bullet 48 MAX_CONSTRAINT_TYPE, // last type defined by Bullet
49 // 49 //
50 BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving 50 BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving
51} 51}
@@ -54,25 +54,25 @@ public enum ConstraintType : int
54[StructLayout(LayoutKind.Sequential)] 54[StructLayout(LayoutKind.Sequential)]
55public struct ConvexHull 55public struct ConvexHull
56{ 56{
57 Vector3 Offset; 57 Vector3 Offset;
58 int VertexCount; 58 int VertexCount;
59 Vector3[] Vertices; 59 Vector3[] Vertices;
60} 60}
61public enum BSPhysicsShapeType 61public enum BSPhysicsShapeType
62{ 62{
63 SHAPE_UNKNOWN = 0, 63 SHAPE_UNKNOWN = 0,
64 SHAPE_CAPSULE = 1, 64 SHAPE_CAPSULE = 1,
65 SHAPE_BOX = 2, 65 SHAPE_BOX = 2,
66 SHAPE_CONE = 3, 66 SHAPE_CONE = 3,
67 SHAPE_CYLINDER = 4, 67 SHAPE_CYLINDER = 4,
68 SHAPE_SPHERE = 5, 68 SHAPE_SPHERE = 5,
69 SHAPE_MESH = 6, 69 SHAPE_MESH = 6,
70 SHAPE_HULL = 7, 70 SHAPE_HULL = 7,
71 // following defined by BulletSim 71 // following defined by BulletSim
72 SHAPE_GROUNDPLANE = 20, 72 SHAPE_GROUNDPLANE = 20,
73 SHAPE_TERRAIN = 21, 73 SHAPE_TERRAIN = 21,
74 SHAPE_COMPOUND = 22, 74 SHAPE_COMPOUND = 22,
75 SHAPE_HEIGHTMAP = 23, 75 SHAPE_HEIGHTMAP = 23,
76 SHAPE_AVATAR = 24, 76 SHAPE_AVATAR = 24,
77 SHAPE_CONVEXHULL= 25, 77 SHAPE_CONVEXHULL= 25,
78 SHAPE_GIMPACT = 26, 78 SHAPE_GIMPACT = 26,
@@ -180,16 +180,16 @@ public struct ConfigurationParameters
180 public float collisionMargin; 180 public float collisionMargin;
181 public float gravity; 181 public float gravity;
182 182
183 public float maxPersistantManifoldPoolSize; 183 public float maxPersistantManifoldPoolSize;
184 public float maxCollisionAlgorithmPoolSize; 184 public float maxCollisionAlgorithmPoolSize;
185 public float shouldDisableContactPoolDynamicAllocation; 185 public float shouldDisableContactPoolDynamicAllocation;
186 public float shouldForceUpdateAllAabbs; 186 public float shouldForceUpdateAllAabbs;
187 public float shouldRandomizeSolverOrder; 187 public float shouldRandomizeSolverOrder;
188 public float shouldSplitSimulationIslands; 188 public float shouldSplitSimulationIslands;
189 public float shouldEnableFrictionCaching; 189 public float shouldEnableFrictionCaching;
190 public float numberOfSolverIterations; 190 public float numberOfSolverIterations;
191 public float useSingleSidedMeshes; 191 public float useSingleSidedMeshes;
192 public float globalContactBreakingThreshold; 192 public float globalContactBreakingThreshold;
193 193
194 public float physicsLoggingFrames; 194 public float physicsLoggingFrames;
195 195
@@ -202,30 +202,30 @@ public struct ConfigurationParameters
202public struct HACDParams 202public struct HACDParams
203{ 203{
204 // usual default values 204 // usual default values
205 public float maxVerticesPerHull; // 100 205 public float maxVerticesPerHull; // 100
206 public float minClusters; // 2 206 public float minClusters; // 2
207 public float compacityWeight; // 0.1 207 public float compacityWeight; // 0.1
208 public float volumeWeight; // 0.0 208 public float volumeWeight; // 0.0
209 public float concavity; // 100 209 public float concavity; // 100
210 public float addExtraDistPoints; // false 210 public float addExtraDistPoints; // false
211 public float addNeighboursDistPoints; // false 211 public float addNeighboursDistPoints; // false
212 public float addFacesPoints; // false 212 public float addFacesPoints; // false
213 public float shouldAdjustCollisionMargin; // false 213 public float shouldAdjustCollisionMargin; // false
214 // VHACD 214 // VHACD
215 public float whichHACD; // zero if Bullet HACD, non-zero says VHACD 215 public float whichHACD; // zero if Bullet HACD, non-zero says VHACD
216 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html 216 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html
217 public float vHACDresolution; // 100,000 max number of voxels generated during voxelization stage 217 public float vHACDresolution; // 100,000 max number of voxels generated during voxelization stage
218 public float vHACDdepth; // 20 max number of clipping stages 218 public float vHACDdepth; // 20 max number of clipping stages
219 public float vHACDconcavity; // 0.0025 maximum concavity 219 public float vHACDconcavity; // 0.0025 maximum concavity
220 public float vHACDplaneDownsampling; // 4 granularity of search for best clipping plane 220 public float vHACDplaneDownsampling; // 4 granularity of search for best clipping plane
221 public float vHACDconvexHullDownsampling; // 4 precision of hull gen process 221 public float vHACDconvexHullDownsampling; // 4 precision of hull gen process
222 public float vHACDalpha; // 0.05 bias toward clipping along symmetry planes 222 public float vHACDalpha; // 0.05 bias toward clipping along symmetry planes
223 public float vHACDbeta; // 0.05 bias toward clipping along revolution axis 223 public float vHACDbeta; // 0.05 bias toward clipping along revolution axis
224 public float vHACDgamma; // 0.00125 max concavity when merging 224 public float vHACDgamma; // 0.00125 max concavity when merging
225 public float vHACDpca; // 0 on/off normalizing mesh before decomp 225 public float vHACDpca; // 0 on/off normalizing mesh before decomp
226 public float vHACDmode; // 0 0:voxel based, 1: tetrahedron based 226 public float vHACDmode; // 0 0:voxel based, 1: tetrahedron based
227 public float vHACDmaxNumVerticesPerCH; // 64 max triangles per convex hull 227 public float vHACDmaxNumVerticesPerCH; // 64 max triangles per convex hull
228 public float vHACDminVolumePerCH; // 0.0001 sampling of generated convex hulls 228 public float vHACDminVolumePerCH; // 0.0001 sampling of generated convex hulls
229} 229}
230 230
231// The states a bullet collision object can have 231// The states a bullet collision object can have
@@ -322,8 +322,8 @@ public abstract string BulletEngineVersion { get; protected set;}
322 322
323// Initialization and simulation 323// Initialization and simulation
324public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, 324public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms,
325 int maxCollisions, ref CollisionDesc[] collisionArray, 325 int maxCollisions, ref CollisionDesc[] collisionArray,
326 int maxUpdates, ref EntityProperties[] updateArray 326 int maxUpdates, ref EntityProperties[] updateArray
327 ); 327 );
328 328
329public abstract int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, 329public abstract int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep,
@@ -398,7 +398,7 @@ public abstract void DestroyObject(BulletWorld sim, BulletBody obj);
398public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin); 398public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin);
399 399
400public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, 400public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
401 float scaleFactor, float collisionMargin); 401 float scaleFactor, float collisionMargin);
402 402
403// ===================================================================================== 403// =====================================================================================
404// Constraint creation and helper routines 404// Constraint creation and helper routines
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
index 6322695..57f03fb 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
@@ -64,9 +64,9 @@ public sealed class BSCharacter : BSPhysObject
64 private OMV.Vector3 _PIDTarget; 64 private OMV.Vector3 _PIDTarget;
65 private float _PIDTau; 65 private float _PIDTau;
66 66
67// public override OMV.Vector3 RawVelocity 67// public override OMV.Vector3 RawVelocity
68// { get { return base.RawVelocity; } 68// { get { return base.RawVelocity; }
69// set { 69// set {
70// if (value != base.RawVelocity) 70// if (value != base.RawVelocity)
71// Util.PrintCallStack(); 71// Util.PrintCallStack();
72// Console.WriteLine("Set rawvel to {0}", value); 72// Console.WriteLine("Set rawvel to {0}", value);
@@ -82,7 +82,7 @@ public sealed class BSCharacter : BSPhysObject
82 : base(parent_scene, localID, avName, "BSCharacter") 82 : base(parent_scene, localID, avName, "BSCharacter")
83 { 83 {
84 _physicsActorType = (int)ActorTypes.Agent; 84 _physicsActorType = (int)ActorTypes.Agent;
85 RawPosition = pos; 85 RawPosition = pos;
86 86
87 _flying = isFlying; 87 _flying = isFlying;
88 RawOrientation = OMV.Quaternion.Identity; 88 RawOrientation = OMV.Quaternion.Identity;
@@ -819,7 +819,7 @@ public sealed class BSCharacter : BSPhysObject
819 // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many 819 // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many
820 // extra updates. 820 // extra updates.
821 // 821 //
822 // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to 822 // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to
823 // avatar movement rather than removes it. The larger the threshold, the bigger the jitter. 823 // avatar movement rather than removes it. The larger the threshold, the bigger the jitter.
824 // This is most noticeable in level flight and can be seen with 824 // This is most noticeable in level flight and can be seen with
825 // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower 825 // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs
index 313c961..c4ccdbe 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs
@@ -125,8 +125,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
125 125
126 // Just some recomputed constants: 126 // Just some recomputed constants:
127#pragma warning disable 414 127#pragma warning disable 414
128 static readonly float TwoPI = ((float)Math.PI) * 2f; 128 static readonly float TwoPI = ((float)Math.PI) * 2f;
129 static readonly float FourPI = ((float)Math.PI) * 4f; 129 static readonly float FourPI = ((float)Math.PI) * 4f;
130 static readonly float PIOverFour = ((float)Math.PI) / 4f; 130 static readonly float PIOverFour = ((float)Math.PI) / 4f;
131 static readonly float PIOverTwo = ((float)Math.PI) / 2f; 131 static readonly float PIOverTwo = ((float)Math.PI) / 2f;
132#pragma warning restore 414 132#pragma warning restore 414
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
1595 // in that direction. 1595 // in that direction.
1596 // TODO: implement reference frame. 1596 // TODO: implement reference frame.
1597 public void ComputeAngularDeflection() 1597 public void ComputeAngularDeflection()
1598 { 1598 {
1599 1599
1600 if (BSParam.VehicleEnableAngularDeflection && m_angularDeflectionEfficiency != 0 && VehicleForwardSpeed > 0.2) 1600 if (BSParam.VehicleEnableAngularDeflection && m_angularDeflectionEfficiency != 0 && VehicleForwardSpeed > 0.2)
1601 { 1601 {
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs
index e73f0e8..13c1361 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs
@@ -319,7 +319,7 @@ public abstract class BSLinkset
319 public virtual bool AllPartsComplete 319 public virtual bool AllPartsComplete
320 { 320 {
321 get { 321 get {
322 bool ret = true; 322 bool ret = true;
323 this.ForEachMember((member) => 323 this.ForEachMember((member) =>
324 { 324 {
325 if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting) 325 if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting)
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
index 28df2d9..352c03e 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
@@ -90,8 +90,8 @@ public static class BSParam
90 public static float DeactivationTime { get; private set; } 90 public static float DeactivationTime { get; private set; }
91 public static float LinearSleepingThreshold { get; private set; } 91 public static float LinearSleepingThreshold { get; private set; }
92 public static float AngularSleepingThreshold { get; private set; } 92 public static float AngularSleepingThreshold { get; private set; }
93 public static float CcdMotionThreshold { get; private set; } 93 public static float CcdMotionThreshold { get; private set; }
94 public static float CcdSweptSphereRadius { get; private set; } 94 public static float CcdSweptSphereRadius { get; private set; }
95 public static float ContactProcessingThreshold { get; private set; } 95 public static float ContactProcessingThreshold { get; private set; }
96 96
97 public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed 97 public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed
@@ -119,14 +119,14 @@ public static class BSParam
119 public static float Gravity { get; private set; } 119 public static float Gravity { get; private set; }
120 120
121 // Physics Engine operation 121 // Physics Engine operation
122 public static float MaxPersistantManifoldPoolSize { get; private set; } 122 public static float MaxPersistantManifoldPoolSize { get; private set; }
123 public static float MaxCollisionAlgorithmPoolSize { get; private set; } 123 public static float MaxCollisionAlgorithmPoolSize { get; private set; }
124 public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; } 124 public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; }
125 public static bool ShouldForceUpdateAllAabbs { get; private set; } 125 public static bool ShouldForceUpdateAllAabbs { get; private set; }
126 public static bool ShouldRandomizeSolverOrder { get; private set; } 126 public static bool ShouldRandomizeSolverOrder { get; private set; }
127 public static bool ShouldSplitSimulationIslands { get; private set; } 127 public static bool ShouldSplitSimulationIslands { get; private set; }
128 public static bool ShouldEnableFrictionCaching { get; private set; } 128 public static bool ShouldEnableFrictionCaching { get; private set; }
129 public static float NumberOfSolverIterations { get; private set; } 129 public static float NumberOfSolverIterations { get; private set; }
130 public static bool UseSingleSidedMeshes { get; private set; } 130 public static bool UseSingleSidedMeshes { get; private set; }
131 public static float GlobalContactBreakingThreshold { get; private set; } 131 public static float GlobalContactBreakingThreshold { get; private set; }
132 public static float PhysicsUnmanLoggingFrames { get; private set; } 132 public static float PhysicsUnmanLoggingFrames { get; private set; }
@@ -149,19 +149,19 @@ public static class BSParam
149 public static float AvatarFlyingGroundMargin { get; private set; } 149 public static float AvatarFlyingGroundMargin { get; private set; }
150 public static float AvatarFlyingGroundUpForce { get; private set; } 150 public static float AvatarFlyingGroundUpForce { get; private set; }
151 public static float AvatarTerminalVelocity { get; private set; } 151 public static float AvatarTerminalVelocity { get; private set; }
152 public static float AvatarContactProcessingThreshold { get; private set; } 152 public static float AvatarContactProcessingThreshold { get; private set; }
153 public static float AvatarAddForcePushFactor { get; private set; } 153 public static float AvatarAddForcePushFactor { get; private set; }
154 public static float AvatarStopZeroThreshold { get; private set; } 154 public static float AvatarStopZeroThreshold { get; private set; }
155 public static float AvatarStopZeroThresholdSquared { get; private set; } 155 public static float AvatarStopZeroThresholdSquared { get; private set; }
156 public static int AvatarJumpFrames { get; private set; } 156 public static int AvatarJumpFrames { get; private set; }
157 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } 157 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; }
158 public static float AvatarStepHeight { get; private set; } 158 public static float AvatarStepHeight { get; private set; }
159 public static float AvatarStepAngle { get; private set; } 159 public static float AvatarStepAngle { get; private set; }
160 public static float AvatarStepGroundFudge { get; private set; } 160 public static float AvatarStepGroundFudge { get; private set; }
161 public static float AvatarStepApproachFactor { get; private set; } 161 public static float AvatarStepApproachFactor { get; private set; }
162 public static float AvatarStepForceFactor { get; private set; } 162 public static float AvatarStepForceFactor { get; private set; }
163 public static float AvatarStepUpCorrectionFactor { get; private set; } 163 public static float AvatarStepUpCorrectionFactor { get; private set; }
164 public static int AvatarStepSmoothingSteps { get; private set; } 164 public static int AvatarStepSmoothingSteps { get; private set; }
165 165
166 // Vehicle parameters 166 // Vehicle parameters
167 public static float VehicleMaxLinearVelocity { get; private set; } 167 public static float VehicleMaxLinearVelocity { get; private set; }
@@ -193,31 +193,31 @@ public static class BSParam
193 public static float CSHullVolumeConservationThresholdPercent { get; private set; } 193 public static float CSHullVolumeConservationThresholdPercent { get; private set; }
194 public static int CSHullMaxVertices { get; private set; } 194 public static int CSHullMaxVertices { get; private set; }
195 public static float CSHullMaxSkinWidth { get; private set; } 195 public static float CSHullMaxSkinWidth { get; private set; }
196 public static float BHullMaxVerticesPerHull { get; private set; } // 100 196 public static float BHullMaxVerticesPerHull { get; private set; } // 100
197 public static float BHullMinClusters { get; private set; } // 2 197 public static float BHullMinClusters { get; private set; } // 2
198 public static float BHullCompacityWeight { get; private set; } // 0.1 198 public static float BHullCompacityWeight { get; private set; } // 0.1
199 public static float BHullVolumeWeight { get; private set; } // 0.0 199 public static float BHullVolumeWeight { get; private set; } // 0.0
200 public static float BHullConcavity { get; private set; } // 100 200 public static float BHullConcavity { get; private set; } // 100
201 public static bool BHullAddExtraDistPoints { get; private set; } // false 201 public static bool BHullAddExtraDistPoints { get; private set; } // false
202 public static bool BHullAddNeighboursDistPoints { get; private set; } // false 202 public static bool BHullAddNeighboursDistPoints { get; private set; } // false
203 public static bool BHullAddFacesPoints { get; private set; } // false 203 public static bool BHullAddFacesPoints { get; private set; } // false
204 public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false 204 public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false
205 public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD 205 public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD
206 // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd 206 // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd
207 // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1 207 // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1
208 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html 208 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html
209 public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage 209 public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage
210 public static float VHACDdepth { get; private set; } // 20 max number of clipping stages 210 public static float VHACDdepth { get; private set; } // 20 max number of clipping stages
211 public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity 211 public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity
212 public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane 212 public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane
213 public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process 213 public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process
214 public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes 214 public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes
215 public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis 215 public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis
216 public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging 216 public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging
217 public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp 217 public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp
218 public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based 218 public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based
219 public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull 219 public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull
220 public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls 220 public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls
221 221
222 // Linkset implementation parameters 222 // Linkset implementation parameters
223 public static float LinksetImplementation { get; private set; } 223 public static float LinksetImplementation { get; private set; }
@@ -579,7 +579,7 @@ public static class BSParam
579 (s,v) => { ContactProcessingThreshold = v;}, 579 (s,v) => { ContactProcessingThreshold = v;},
580 (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ), 580 (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ),
581 581
582 new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", 582 new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)",
583 (float)BSTerrainPhys.TerrainImplementation.Heightmap ), 583 (float)BSTerrainPhys.TerrainImplementation.Heightmap ),
584 new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" , 584 new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" ,
585 2 ), 585 2 ),
@@ -631,31 +631,31 @@ public static class BSParam
631 2.0f ), 631 2.0f ),
632 new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar", 632 new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar",
633 -54.0f ), 633 -54.0f ),
634 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", 634 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
635 0.1f ), 635 0.1f ),
636 new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines", 636 new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines",
637 0.315f ), 637 0.315f ),
638 new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped", 638 new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped",
639 0.45f, 639 0.45f,
640 (s) => { return (float)AvatarStopZeroThreshold; }, 640 (s) => { return (float)AvatarStopZeroThreshold; },
641 (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ), 641 (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ),
642 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", 642 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
643 1.0f ), 643 1.0f ),
644 new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", 644 new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.",
645 4 ), 645 4 ),
646 new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction", 646 new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction",
647 0.999f ) , 647 0.999f ) ,
648 new ParameterDefn<float>("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step", 648 new ParameterDefn<float>("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step",
649 0.3f ) , 649 0.3f ) ,
650 new ParameterDefn<float>("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height", 650 new ParameterDefn<float>("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height",
651 0.1f ) , 651 0.1f ) ,
652 new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", 652 new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)",
653 2f ), 653 2f ),
654 new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", 654 new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step",
655 0f ), 655 0f ),
656 new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", 656 new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step",
657 0.8f ), 657 0.8f ),
658 new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", 658 new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs",
659 1 ), 659 1 ),
660 660
661 new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", 661 new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle",
@@ -699,131 +699,131 @@ public static class BSParam
699 new ParameterDefn<bool>("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect", 699 new ParameterDefn<bool>("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect",
700 true ), 700 true ),
701 701
702 new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", 702 new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
703 0f, 703 0f,
704 (s) => { return MaxPersistantManifoldPoolSize; }, 704 (s) => { return MaxPersistantManifoldPoolSize; },
705 (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ), 705 (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ),
706 new ParameterDefn<float>("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", 706 new ParameterDefn<float>("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)",
707 0f, 707 0f,
708 (s) => { return MaxCollisionAlgorithmPoolSize; }, 708 (s) => { return MaxCollisionAlgorithmPoolSize; },
709 (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ), 709 (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ),
710 new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", 710 new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count",
711 false, 711 false,
712 (s) => { return ShouldDisableContactPoolDynamicAllocation; }, 712 (s) => { return ShouldDisableContactPoolDynamicAllocation; },
713 (s,v) => { ShouldDisableContactPoolDynamicAllocation = v; 713 (s,v) => { ShouldDisableContactPoolDynamicAllocation = v;
714 s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ), 714 s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ),
715 new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", 715 new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step",
716 false, 716 false,
717 (s) => { return ShouldForceUpdateAllAabbs; }, 717 (s) => { return ShouldForceUpdateAllAabbs; },
718 (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ), 718 (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ),
719 new ParameterDefn<bool>("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", 719 new ParameterDefn<bool>("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction",
720 true, 720 true,
721 (s) => { return ShouldRandomizeSolverOrder; }, 721 (s) => { return ShouldRandomizeSolverOrder; },
722 (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ), 722 (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ),
723 new ParameterDefn<bool>("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", 723 new ParameterDefn<bool>("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands",
724 true, 724 true,
725 (s) => { return ShouldSplitSimulationIslands; }, 725 (s) => { return ShouldSplitSimulationIslands; },
726 (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ), 726 (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ),
727 new ParameterDefn<bool>("ShouldEnableFrictionCaching", "Enable friction computation caching", 727 new ParameterDefn<bool>("ShouldEnableFrictionCaching", "Enable friction computation caching",
728 true, 728 true,
729 (s) => { return ShouldEnableFrictionCaching; }, 729 (s) => { return ShouldEnableFrictionCaching; },
730 (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ), 730 (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ),
731 new ParameterDefn<float>("NumberOfSolverIterations", "Number of internal iterations (0 means default)", 731 new ParameterDefn<float>("NumberOfSolverIterations", "Number of internal iterations (0 means default)",
732 0f, // zero says use Bullet default 732 0f, // zero says use Bullet default
733 (s) => { return NumberOfSolverIterations; }, 733 (s) => { return NumberOfSolverIterations; },
734 (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ), 734 (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ),
735 new ParameterDefn<bool>("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.", 735 new ParameterDefn<bool>("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.",
736 true, 736 true,
737 (s) => { return UseSingleSidedMeshes; }, 737 (s) => { return UseSingleSidedMeshes; },
738 (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ), 738 (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ),
739 new ParameterDefn<float>("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", 739 new ParameterDefn<float>("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))",
740 0f, 740 0f,
741 (s) => { return GlobalContactBreakingThreshold; }, 741 (s) => { return GlobalContactBreakingThreshold; },
742 (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), 742 (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
743 new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", 743 new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics",
744 0f, 744 0f,
745 (s) => { return PhysicsUnmanLoggingFrames; }, 745 (s) => { return PhysicsUnmanLoggingFrames; },
746 (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ), 746 (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ),
747 747
748 new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", 748 new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
749 7 ), 749 7 ),
750 new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes", 750 new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes",
751 2 ), 751 2 ),
752 new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)", 752 new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)",
753 5f ), 753 5f ),
754 new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)", 754 new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)",
755 5f ), 755 5f ),
756 new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.", 756 new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.",
757 32 ), 757 32 ),
758 new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.", 758 new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.",
759 0f ), 759 0f ),
760 760
761 new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull", 761 new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull",
762 200f ), 762 200f ),
763 new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh", 763 new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh",
764 10f ), 764 10f ),
765 new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls", 765 new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls",
766 20f ), 766 20f ),
767 new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull", 767 new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull",
768 0.1f ), 768 0.1f ),
769 new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be", 769 new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be",
770 10f ), 770 10f ),
771 new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors", 771 new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors",
772 true ), 772 true ),
773 new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls", 773 new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls",
774 true ), 774 true ),
775 new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces", 775 new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces",
776 true ), 776 true ),
777 new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", 777 new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin",
778 false ), 778 false ),
779 779
780 new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", 780 new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD",
781 0f ), 781 0f ),
782 new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage", 782 new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage",
783 100000f ), 783 100000f ),
784 new ParameterDefn<float>("VHACDdepth", "max number of clipping stages", 784 new ParameterDefn<float>("VHACDdepth", "max number of clipping stages",
785 20f ), 785 20f ),
786 new ParameterDefn<float>("VHACDconcavity", "maximum concavity", 786 new ParameterDefn<float>("VHACDconcavity", "maximum concavity",
787 0.0025f ), 787 0.0025f ),
788 new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane", 788 new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane",
789 4f ), 789 4f ),
790 new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process", 790 new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process",
791 4f ), 791 4f ),
792 new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes", 792 new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes",
793 0.05f ), 793 0.05f ),
794 new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis", 794 new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis",
795 0.05f ), 795 0.05f ),
796 new ParameterDefn<float>("VHACDgamma", "max concavity when merging", 796 new ParameterDefn<float>("VHACDgamma", "max concavity when merging",
797 0.00125f ), 797 0.00125f ),
798 new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp", 798 new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp",
799 0f ), 799 0f ),
800 new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based", 800 new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based",
801 0f ), 801 0f ),
802 new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", 802 new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull",
803 64f ), 803 64f ),
804 new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls", 804 new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls",
805 0.0001f ), 805 0.0001f ),
806 806
807 new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", 807 new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)",
808 (float)BSLinkset.LinksetImplementation.Compound ), 808 (float)BSLinkset.LinksetImplementation.Compound ),
809 new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", 809 new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same",
810 true ), 810 true ),
811 new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", 811 new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.",
812 false ), 812 false ),
813 new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints", 813 new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints",
814 true ), 814 true ),
815 new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints", 815 new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints",
816 5.0f ), 816 5.0f ),
817 new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints", 817 new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints",
818 0.1f ), 818 0.1f ),
819 new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1", 819 new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1",
820 0.1f ), 820 0.1f ),
821 new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2", 821 new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2",
822 0.1f ), 822 0.1f ),
823 new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)", 823 new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)",
824 40 ), 824 40 ),
825 825
826 new ParameterDefn<float>("DebugNumber", "A console setable number sometimes used for debugging", 826 new ParameterDefn<float>("DebugNumber", "A console setable number sometimes used for debugging",
827 1.0f ), 827 1.0f ),
828 828
829 new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)", 829 new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)",
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
index a846869..6aa24d5 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
@@ -317,10 +317,10 @@ public abstract class BSPhysObject : PhysicsActor
317 317
318 public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; } 318 public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; }
319 319
320 public override bool PIDActive 320 public override bool PIDActive
321 { 321 {
322 get { return MoveToTargetActive; } 322 get { return MoveToTargetActive; }
323 set { MoveToTargetActive = value; } 323 set { MoveToTargetActive = value; }
324 } 324 }
325 325
326 public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } } 326 public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } }
@@ -572,7 +572,7 @@ public abstract class BSPhysObject : PhysicsActor
572 newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal); 572 newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal);
573 // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}", 573 // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}",
574 // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed); 574 // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed);
575 575
576 lock (PhysScene.CollisionLock) 576 lock (PhysScene.CollisionLock)
577 { 577 {
578 CollisionCollection.AddCollider(collideeLocalID, newContact); 578 CollisionCollection.AddCollider(collideeLocalID, newContact);
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
index db2b9db..b153761 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
@@ -1144,14 +1144,14 @@ public class BSPrim : BSPhysObject
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 public override bool PIDActive 1147 public override bool PIDActive
1148 { 1148 {
1149 get 1149 get
1150 { 1150 {
1151 return MoveToTargetActive; 1151 return MoveToTargetActive;
1152 } 1152 }
1153 1153
1154 set 1154 set
1155 { 1155 {
1156 MoveToTargetActive = value; 1156 MoveToTargetActive = value;
1157 1157
@@ -1179,13 +1179,13 @@ public class BSPrim : BSPhysObject
1179 // if the actor exists, tell it to refresh its values. 1179 // if the actor exists, tell it to refresh its values.
1180 actor.Refresh(); 1180 actor.Refresh();
1181 } 1181 }
1182 1182
1183 } 1183 }
1184 } 1184 }
1185 // Used for llSetHoverHeight and maybe vehicle height 1185 // Used for llSetHoverHeight and maybe vehicle height
1186 // Hover Height will override MoveTo target's Z 1186 // Hover Height will override MoveTo target's Z
1187 public override bool PIDHoverActive { 1187 public override bool PIDHoverActive {
1188 get 1188 get
1189 { 1189 {
1190 return base.HoverActive; 1190 return base.HoverActive;
1191 } 1191 }
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
index ee57f0c..7ff0a07 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
@@ -351,12 +351,12 @@ namespace OpenSim.Region.PhysicsModule.BulletS
351 if (BSParam.UseSeparatePhysicsThread) 351 if (BSParam.UseSeparatePhysicsThread)
352 { 352 {
353 // The physics simulation should happen independently of the heartbeat loop 353 // The physics simulation should happen independently of the heartbeat loop
354 m_physicsThread 354 m_physicsThread
355 = WorkManager.StartThread( 355 = WorkManager.StartThread(
356 BulletSPluginPhysicsThread, 356 BulletSPluginPhysicsThread,
357 string.Format("{0} ({1})", BulletEngineName, RegionName), 357 string.Format("{0} ({1})", BulletEngineName, RegionName),
358 ThreadPriority.Normal, 358 ThreadPriority.Normal,
359 true, 359 true,
360 true); 360 true);
361 } 361 }
362 } 362 }
diff --git a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs
index 2ba3c5a..ab5d4849 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
136 136
137 return; 137 return;
138 } 138 }
139 139
140 // Register as LSL functions all the [ScriptInvocation] marked methods. 140 // Register as LSL functions all the [ScriptInvocation] marked methods.
141 Comms.RegisterScriptInvocations(this); 141 Comms.RegisterScriptInvocations(this);
142 Comms.RegisterConstants(this); 142 Comms.RegisterConstants(this);
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
index 6ed7af1..91ce468 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.Physics.BulletSPlugin")] 9[assembly: AssemblyTitle("OpenSim.Region.Physics.BulletSPlugin")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
index 109e19c..3e8c1cd 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
@@ -80,7 +80,7 @@ public static class BulletSimTestsUtil
80 } 80 }
81 81
82 Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); 82 Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
83 83
84 RegionInfo info = new RegionInfo(); 84 RegionInfo info = new RegionInfo();
85 info.RegionName = "BSTestRegion"; 85 info.RegionName = "BSTestRegion";
86 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; 86 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs
index c0cf19a..c2be568 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs
@@ -146,7 +146,7 @@ public class HullCreation : OpenSimTestCase
146 uint torusLocalID = 125; 146 uint torusLocalID = 125;
147 PhysicsScene.AddPrimShape("testTorus", pbs, pos, size, rot, isPhys, torusLocalID); 147 PhysicsScene.AddPrimShape("testTorus", pbs, pos, size, rot, isPhys, torusLocalID);
148 BSPrim primTypeTorus = (BSPrim)PhysicsScene.PhysObjects[torusLocalID]; 148 BSPrim primTypeTorus = (BSPrim)PhysicsScene.PhysObjects[torusLocalID];
149 149
150 // The actual prim shape creation happens at taint time 150 // The actual prim shape creation happens at taint time
151 PhysicsScene.ProcessTaints(); 151 PhysicsScene.ProcessTaints();
152 152
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs
index 3d81439..bd1f75e 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -246,13 +246,13 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
246 } 246 }
247 247
248 private static float DistToPt(float3 p, float4 plane) 248 private static float DistToPt(float3 p, float4 plane)
249 { 249 {
250 float x = p.x; 250 float x = p.x;
251 float y = p.y; 251 float y = p.y;
252 float z = p.z; 252 float z = p.z;
253 float d = x*plane.x + y*plane.y + z*plane.z + plane.w; 253 float d = x*plane.x + y*plane.y + z*plane.z + plane.w;
254 return d; 254 return d;
255 } 255 }
256 256
257 private static void intersect(float3 p1, float3 p2, ref float3 split, float4 plane) 257 private static void intersect(float3 p1, float3 p2, ref float3 split, float4 plane)
258 { 258 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs
index 6a98535..0d22d71 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs
index 4480036..810e95d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs
index e6dc98a..a382f9d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs
index 09129ed..300fed3 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs
index 7d342d1..73fb252 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs
index 66457ac..6e73fd5 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs
index 72f2d6d..cf7161a 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -763,7 +763,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
763 } 763 }
764 else if ((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == (0)) 764 else if ((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == (0))
765 { 765 {
766 // both endpoints coplanar 766 // both endpoints coplanar
767 // must check a 3rd point to see if UNDER 767 // must check a 3rd point to see if UNDER
768 int e2 = e1 + 1; 768 int e2 = e1 + 1;
769 if (e2 >= convex.edges.Count || convex.edges[e2].p != currentplane) 769 if (e2 >= convex.edges.Count || convex.edges[e2].p != currentplane)
@@ -792,7 +792,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
792 } 792 }
793 else if (vertflag[edge0.v].planetest == (1) && vertflag[edge1.v].planetest == (2)) 793 else if (vertflag[edge0.v].planetest == (1) && vertflag[edge1.v].planetest == (2))
794 { 794 {
795 // first is under 2nd is over 795 // first is under 2nd is over
796 796
797 edgeflag[e0].undermap = (short)under_edge_count; 797 edgeflag[e0].undermap = (short)under_edge_count;
798 tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap; 798 tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap;
@@ -815,7 +815,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
815 vout = vertcountunder++; 815 vout = vertcountunder++;
816 } 816 }
817 under_edge_count++; 817 under_edge_count++;
818 /// hmmm something to think about: i might be able to output this edge regarless of 818 /// hmmm something to think about: i might be able to output this edge regarless of
819 // wheter or not we know v-in yet. ok i;ll try this now: 819 // wheter or not we know v-in yet. ok i;ll try this now:
820 tmpunderedges[under_edge_count].v = (byte)vout; 820 tmpunderedges[under_edge_count].v = (byte)vout;
821 tmpunderedges[under_edge_count].p = (byte)underplanescount; 821 tmpunderedges[under_edge_count].p = (byte)underplanescount;
@@ -834,7 +834,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
834 } 834 }
835 else if (vertflag[edge0.v].planetest == (0) && vertflag[edge1.v].planetest == (2)) 835 else if (vertflag[edge0.v].planetest == (0) && vertflag[edge1.v].planetest == (2))
836 { 836 {
837 // first is coplanar 2nd is over 837 // first is coplanar 2nd is over
838 838
839 edgeflag[e0].undermap = -1; 839 edgeflag[e0].undermap = -1;
840 vout = vertflag[edge0.v].undermap; 840 vout = vertflag[edge0.v].undermap;
@@ -858,7 +858,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
858 } 858 }
859 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (1)) 859 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (1))
860 { 860 {
861 // first is over next is under 861 // first is over next is under
862 // new vertex!!! 862 // new vertex!!!
863 Debug.Assert(vin == -1); 863 Debug.Assert(vin == -1);
864 if (e0 < edge0.ea) 864 if (e0 < edge0.ea)
@@ -901,7 +901,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
901 } 901 }
902 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (0)) 902 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (0))
903 { 903 {
904 // first is over next is coplanar 904 // first is over next is coplanar
905 905
906 edgeflag[e0].undermap = -1; 906 edgeflag[e0].undermap = -1;
907 vin = vertflag[edge1.v].undermap; 907 vin = vertflag[edge1.v].undermap;
@@ -1543,7 +1543,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
1543 public static bool ComputeHull(List<float3> vertices, out List<int> indices) 1543 public static bool ComputeHull(List<float3> vertices, out List<int> indices)
1544 { 1544 {
1545 List<HullTriangle> tris = new List<HullTriangle>(); 1545 List<HullTriangle> tris = new List<HullTriangle>();
1546 1546
1547 bool ret = calchull(vertices, out indices, 0, tris); 1547 bool ret = calchull(vertices, out indices, 0, tris);
1548 if (ret == false) 1548 if (ret == false)
1549 { 1549 {
@@ -1636,7 +1636,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
1636 addPoint(ref vcount, vertices, x2, y2, z2); 1636 addPoint(ref vcount, vertices, x2, y2, z2);
1637 addPoint(ref vcount, vertices, x1, y2, z2); 1637 addPoint(ref vcount, vertices, x1, y2, z2);
1638 1638
1639 return true; // return cube 1639 return true; // return cube
1640 } 1640 }
1641 else 1641 else
1642 { 1642 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs
index f58cad6..0f10e5f 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs
index 8f08ddf..5915c29 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
index e9ff26e..9b418d6 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("ConvexDecompositionDotNet")] 8[assembly: AssemblyTitle("ConvexDecompositionDotNet")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,11 +25,11 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32// You can specify all the values or you can default the Build and Revision Numbers 32// You can specify all the values or you can default the Build and Revision Numbers
33// by using the '*' as shown below: 33// by using the '*' as shown below:
34// [assembly: AssemblyVersion("1.0.*")] 34// [assembly: AssemblyVersion("1.0.*")]
35[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)] 35[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)]
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs
index 2d72117..571677d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -126,9 +126,9 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
126 } 126 }
127 127
128 public static Quaternion operator *(Quaternion a, float b) 128 public static Quaternion operator *(Quaternion a, float b)
129 { 129 {
130 return new Quaternion(a.x *b, a.y *b, a.z *b, a.w *b); 130 return new Quaternion(a.x *b, a.y *b, a.z *b, a.w *b);
131 } 131 }
132 132
133 public static Quaternion normalize(Quaternion a) 133 public static Quaternion normalize(Quaternion a)
134 { 134 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs
index cc5f99c..d8c10c7 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs
index da2255e..915bec6 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs
index 2a58ec4..c2c8940 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs
index 64a9ef8..1ea003b 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs
index 266ed0b..4b6cd5d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs
index 058934d..1f2ab02 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs
index 58f4f58..85a8cf1 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -127,88 +127,88 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
127 } 127 }
128 128
129 public static float4x4 Inverse(float4x4 m) 129 public static float4x4 Inverse(float4x4 m)
130 { 130 {
131 float4x4 d = new float4x4(); 131 float4x4 d = new float4x4();
132 //float dst = d.x.x; 132 //float dst = d.x.x;
133 float[] tmp = new float[12]; // temp array for pairs 133 float[] tmp = new float[12]; // temp array for pairs
134 float[] src = new float[16]; // array of transpose source matrix 134 float[] src = new float[16]; // array of transpose source matrix
135 float det; // determinant 135 float det; // determinant
136 // transpose matrix 136 // transpose matrix
137 for (int i = 0; i < 4; i++) 137 for (int i = 0; i < 4; i++)
138 { 138 {
139 src[i] = m[i].x; 139 src[i] = m[i].x;
140 src[i + 4] = m[i].y; 140 src[i + 4] = m[i].y;
141 src[i + 8] = m[i].z; 141 src[i + 8] = m[i].z;
142 src[i + 12] = m[i].w; 142 src[i + 12] = m[i].w;
143 } 143 }
144 // calculate pairs for first 8 elements (cofactors) 144 // calculate pairs for first 8 elements (cofactors)
145 tmp[0] = src[10] * src[15]; 145 tmp[0] = src[10] * src[15];
146 tmp[1] = src[11] * src[14]; 146 tmp[1] = src[11] * src[14];
147 tmp[2] = src[9] * src[15]; 147 tmp[2] = src[9] * src[15];
148 tmp[3] = src[11] * src[13]; 148 tmp[3] = src[11] * src[13];
149 tmp[4] = src[9] * src[14]; 149 tmp[4] = src[9] * src[14];
150 tmp[5] = src[10] * src[13]; 150 tmp[5] = src[10] * src[13];
151 tmp[6] = src[8] * src[15]; 151 tmp[6] = src[8] * src[15];
152 tmp[7] = src[11] * src[12]; 152 tmp[7] = src[11] * src[12];
153 tmp[8] = src[8] * src[14]; 153 tmp[8] = src[8] * src[14];
154 tmp[9] = src[10] * src[12]; 154 tmp[9] = src[10] * src[12];
155 tmp[10] = src[8] * src[13]; 155 tmp[10] = src[8] * src[13];
156 tmp[11] = src[9] * src[12]; 156 tmp[11] = src[9] * src[12];
157 // calculate first 8 elements (cofactors) 157 // calculate first 8 elements (cofactors)
158 d.x.x = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7]; 158 d.x.x = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7];
159 d.x.x -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7]; 159 d.x.x -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7];
160 d.x.y = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7]; 160 d.x.y = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7];
161 d.x.y -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7]; 161 d.x.y -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7];
162 d.x.z = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7]; 162 d.x.z = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7];
163 d.x.z -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7]; 163 d.x.z -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7];
164 d.x.w = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6]; 164 d.x.w = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6];
165 d.x.w -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6]; 165 d.x.w -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6];
166 d.y.x = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3]; 166 d.y.x = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3];
167 d.y.x -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3]; 167 d.y.x -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3];
168 d.y.y = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3]; 168 d.y.y = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3];
169 d.y.y -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3]; 169 d.y.y -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3];
170 d.y.z = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3]; 170 d.y.z = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3];
171 d.y.z -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3]; 171 d.y.z -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3];
172 d.y.w = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2]; 172 d.y.w = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2];
173 d.y.w -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2]; 173 d.y.w -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2];
174 // calculate pairs for second 8 elements (cofactors) 174 // calculate pairs for second 8 elements (cofactors)
175 tmp[0] = src[2]*src[7]; 175 tmp[0] = src[2]*src[7];
176 tmp[1] = src[3]*src[6]; 176 tmp[1] = src[3]*src[6];
177 tmp[2] = src[1]*src[7]; 177 tmp[2] = src[1]*src[7];
178 tmp[3] = src[3]*src[5]; 178 tmp[3] = src[3]*src[5];
179 tmp[4] = src[1]*src[6]; 179 tmp[4] = src[1]*src[6];
180 tmp[5] = src[2]*src[5]; 180 tmp[5] = src[2]*src[5];
181 tmp[6] = src[0]*src[7]; 181 tmp[6] = src[0]*src[7];
182 tmp[7] = src[3]*src[4]; 182 tmp[7] = src[3]*src[4];
183 tmp[8] = src[0]*src[6]; 183 tmp[8] = src[0]*src[6];
184 tmp[9] = src[2]*src[4]; 184 tmp[9] = src[2]*src[4];
185 tmp[10] = src[0]*src[5]; 185 tmp[10] = src[0]*src[5];
186 tmp[11] = src[1]*src[4]; 186 tmp[11] = src[1]*src[4];
187 // calculate second 8 elements (cofactors) 187 // calculate second 8 elements (cofactors)
188 d.z.x = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15]; 188 d.z.x = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15];
189 d.z.x -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15]; 189 d.z.x -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15];
190 d.z.y = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15]; 190 d.z.y = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15];
191 d.z.y -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15]; 191 d.z.y -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15];
192 d.z.z = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15]; 192 d.z.z = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15];
193 d.z.z -= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15]; 193 d.z.z -= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15];
194 d.z.w = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14]; 194 d.z.w = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14];
195 d.z.w-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14]; 195 d.z.w-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14];
196 d.w.x = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9]; 196 d.w.x = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9];
197 d.w.x-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10]; 197 d.w.x-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10];
198 d.w.y = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10]; 198 d.w.y = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10];
199 d.w.y-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8]; 199 d.w.y-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8];
200 d.w.z = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8]; 200 d.w.z = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8];
201 d.w.z-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9]; 201 d.w.z-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9];
202 d.w.w = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9]; 202 d.w.w = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9];
203 d.w.w-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8]; 203 d.w.w-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8];
204 // calculate determinant 204 // calculate determinant
205 det = src[0] * d.x.x + src[1] * d.x.y + src[2] * d.x.z + src[3] * d.x.w; 205 det = src[0] * d.x.x + src[1] * d.x.y + src[2] * d.x.z + src[3] * d.x.w;
206 // calculate matrix inverse 206 // calculate matrix inverse
207 det = 1/det; 207 det = 1/det;
208 for (int j = 0; j < 4; j++) 208 for (int j = 0; j < 4; j++)
209 d[j] *= det; 209 d[j] *= det;
210 return d; 210 return d;
211 } 211 }
212 212
213 public static float4x4 MatrixRigidInverse(float4x4 m) 213 public static float4x4 MatrixRigidInverse(float4x4 m)
214 { 214 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs
index b3d4ecb..e7bb6e7 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs
index 41e0912..9950be2 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
index e63ad01..42ba37e 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
@@ -102,8 +102,8 @@ namespace OpenSim.Region.PhysicsModule.Meshing
102 if ((triangle.v1.X == triangle.v2.X && triangle.v1.Y == triangle.v2.Y && triangle.v1.Z == triangle.v2.Z) 102 if ((triangle.v1.X == triangle.v2.X && triangle.v1.Y == triangle.v2.Y && triangle.v1.Z == triangle.v2.Z)
103 || (triangle.v1.X == triangle.v3.X && triangle.v1.Y == triangle.v3.Y && triangle.v1.Z == triangle.v3.Z) 103 || (triangle.v1.X == triangle.v3.X && triangle.v1.Y == triangle.v3.Y && triangle.v1.Z == triangle.v3.Z)
104 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == triangle.v3.Z) 104 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == triangle.v3.Z)
105 ) 105 )
106 { 106 {
107 return; 107 return;
108 } 108 }
109 109
@@ -259,7 +259,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
259 public void getVertexListAsPtrToFloatArray(out IntPtr vertices, out int vertexStride, out int vertexCount) 259 public void getVertexListAsPtrToFloatArray(out IntPtr vertices, out int vertexStride, out int vertexCount)
260 { 260 {
261 // A vertex is 3 floats 261 // A vertex is 3 floats
262 262
263 vertexStride = 3 * sizeof(float); 263 vertexStride = 3 * sizeof(float);
264 264
265 // If there isn't an unmanaged array allocated yet, do it now 265 // If there isn't an unmanaged array allocated yet, do it now
@@ -299,7 +299,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
299 { 299 {
300 if (m_pinnedIndex.IsAllocated) 300 if (m_pinnedIndex.IsAllocated)
301 return (int[])(m_pinnedIndex.Target); 301 return (int[])(m_pinnedIndex.Target);
302 302
303 int[] result = getIndexListAsInt(); 303 int[] result = getIndexListAsInt();
304 m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned); 304 m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned);
305 // Inform the garbage collector of this unmanaged allocation so it can schedule 305 // Inform the garbage collector of this unmanaged allocation so it can schedule
@@ -357,7 +357,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
357 { 357 {
358 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero) 358 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
359 throw new NotSupportedException("Attempt to Append to a pinned Mesh"); 359 throw new NotSupportedException("Attempt to Append to a pinned Mesh");
360 360
361 if (!(newMesh is Mesh)) 361 if (!(newMesh is Mesh))
362 return; 362 return;
363 363
@@ -370,7 +370,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
370 { 370 {
371 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero) 371 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
372 throw new NotSupportedException("Attempt to TransformLinear a pinned Mesh"); 372 throw new NotSupportedException("Attempt to TransformLinear a pinned Mesh");
373 373
374 foreach (Vertex v in m_vertices.Keys) 374 foreach (Vertex v in m_vertices.Keys)
375 { 375 {
376 if (v == null) 376 if (v == null)
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
index 0d22e96..4f95554 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
@@ -247,13 +247,13 @@ namespace OpenSim.Region.PhysicsModule.Meshing
247 private void AddSubMesh(OSDMap subMeshData, Vector3 size, List<Coord> coords, List<Face> faces) 247 private void AddSubMesh(OSDMap subMeshData, Vector3 size, List<Coord> coords, List<Face> faces)
248 { 248 {
249 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap)); 249 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap));
250 250
251 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level 251 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level
252 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no 252 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no
253 // geometry for this submesh. 253 // geometry for this submesh.
254 if (subMeshData.ContainsKey("NoGeometry") && ((OSDBoolean)subMeshData["NoGeometry"])) 254 if (subMeshData.ContainsKey("NoGeometry") && ((OSDBoolean)subMeshData["NoGeometry"]))
255 return; 255 return;
256 256
257 OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshData["PositionDomain"])["Max"].AsVector3(); 257 OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshData["PositionDomain"])["Max"].AsVector3();
258 OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshData["PositionDomain"])["Min"].AsVector3(); 258 OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshData["PositionDomain"])["Min"].AsVector3();
259 ushort faceIndexOffset = (ushort)coords.Count; 259 ushort faceIndexOffset = (ushort)coords.Count;
@@ -264,15 +264,15 @@ namespace OpenSim.Region.PhysicsModule.Meshing
264 ushort uX = Utils.BytesToUInt16(posBytes, i); 264 ushort uX = Utils.BytesToUInt16(posBytes, i);
265 ushort uY = Utils.BytesToUInt16(posBytes, i + 2); 265 ushort uY = Utils.BytesToUInt16(posBytes, i + 2);
266 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4); 266 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4);
267 267
268 Coord c = new Coord( 268 Coord c = new Coord(
269 Utils.UInt16ToFloat(uX, posMin.X, posMax.X) * size.X, 269 Utils.UInt16ToFloat(uX, posMin.X, posMax.X) * size.X,
270 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y) * size.Y, 270 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y) * size.Y,
271 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z) * size.Z); 271 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z) * size.Z);
272 272
273 coords.Add(c); 273 coords.Add(c);
274 } 274 }
275 275
276 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary(); 276 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary();
277 for (int i = 0; i < triangleBytes.Length; i += 6) 277 for (int i = 0; i < triangleBytes.Length; i += 6)
278 { 278 {
@@ -436,9 +436,9 @@ namespace OpenSim.Region.PhysicsModule.Meshing
436 int convexSize = convexBlock["size"].AsInteger(); 436 int convexSize = convexBlock["size"].AsInteger();
437 437
438 byte[] convexBytes = new byte[convexSize]; 438 byte[] convexBytes = new byte[convexSize];
439 439
440 System.Buffer.BlockCopy(primShape.SculptData, convexOffset, convexBytes, 0, convexSize); 440 System.Buffer.BlockCopy(primShape.SculptData, convexOffset, convexBytes, 0, convexSize);
441 441
442 try 442 try
443 { 443 {
444 convexBlockOsd = DecompressOsd(convexBytes); 444 convexBlockOsd = DecompressOsd(convexBytes);
@@ -449,7 +449,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
449 //return false; 449 //return false;
450 } 450 }
451 } 451 }
452 452
453 if (convexBlockOsd != null && convexBlockOsd is OSDMap) 453 if (convexBlockOsd != null && convexBlockOsd is OSDMap)
454 { 454 {
455 convexBlock = convexBlockOsd as OSDMap; 455 convexBlock = convexBlockOsd as OSDMap;
@@ -762,7 +762,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
762 { 762 {
763 PrimMesh primMesh; 763 PrimMesh primMesh;
764 coords = new List<Coord>(); 764 coords = new List<Coord>();
765 faces = new List<Face>(); 765 faces = new List<Face>();
766 766
767 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; 767 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;
768 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; 768 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
@@ -994,7 +994,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
994 if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh) 994 if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
995 { 995 {
996#if SPAM 996#if SPAM
997 m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " + 997 m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
998 minSizeForComplexMesh.ToString() + " - creating simple bounding box"); 998 minSizeForComplexMesh.ToString() + " - creating simple bounding box");
999#endif 999#endif
1000 mesh = CreateBoundingBoxMesh(mesh); 1000 mesh = CreateBoundingBoxMesh(mesh);
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs
index 4049ee1..fd2b1ea 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs
@@ -445,7 +445,7 @@ namespace PrimMesher
445 new Angle(1.0f, 1.0f, 0.0f) 445 new Angle(1.0f, 1.0f, 0.0f)
446 }; 446 };
447 447
448 private static Coord[] normals4 = 448 private static Coord[] normals4 =
449 { 449 {
450 new Coord(0.5f, 0.5f, 0.0f).Normalize(), 450 new Coord(0.5f, 0.5f, 0.0f).Normalize(),
451 new Coord(-0.5f, 0.5f, 0.0f).Normalize(), 451 new Coord(-0.5f, 0.5f, 0.0f).Normalize(),
@@ -2066,7 +2066,7 @@ namespace PrimMesher
2066 /// DEPRICATED - use Extrude(PathType.Linear) instead 2066 /// DEPRICATED - use Extrude(PathType.Linear) instead
2067 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism. 2067 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism.
2068 /// </summary> 2068 /// </summary>
2069 /// 2069 ///
2070 public void ExtrudeLinear() 2070 public void ExtrudeLinear()
2071 { 2071 {
2072 this.Extrude(PathType.Linear); 2072 this.Extrude(PathType.Linear);
@@ -2077,7 +2077,7 @@ namespace PrimMesher
2077 /// DEPRICATED - use Extrude(PathType.Circular) instead 2077 /// DEPRICATED - use Extrude(PathType.Circular) instead
2078 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring. 2078 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring.
2079 /// </summary> 2079 /// </summary>
2080 /// 2080 ///
2081 public void ExtrudeCircular() 2081 public void ExtrudeCircular()
2082 { 2082 {
2083 this.Extrude(PathType.Circular); 2083 this.Extrude(PathType.Circular);
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs
index b3d9cb6..01d11f4 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs
@@ -163,11 +163,11 @@ namespace PrimMesher
163 { 163 {
164 164
165 Bitmap scaledImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb); 165 Bitmap scaledImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb);
166 166
167 Color c; 167 Color c;
168 float xscale = srcImage.Width / destWidth; 168 float xscale = srcImage.Width / destWidth;
169 float yscale = srcImage.Height / destHeight; 169 float yscale = srcImage.Height / destHeight;
170 170
171 float sy = 0.5f; 171 float sy = 0.5f;
172 for (int y = 0; y < destHeight; y++) 172 for (int y = 0; y < destHeight; y++)
173 { 173 {
@@ -191,7 +191,7 @@ namespace PrimMesher
191 return scaledImage; 191 return scaledImage;
192 } 192 }
193 193
194 } 194 }
195 195
196 } 196 }
197#endif 197#endif
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
index 8a842d4..5c257e6 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.Meshing")] 9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.Meshing")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs b/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs
index 12086c8..c851b12 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs
@@ -34,8 +34,8 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 * 37 *
38 * changes by opensim team; 38 * changes by opensim team;
39 * changes by Aurora team http://www.aurora-sim.org/ 39 * changes by Aurora team http://www.aurora-sim.org/
40 * changes by Ubit Umarov 40 * changes by Ubit Umarov
41 */ 41 */
@@ -52,18 +52,18 @@ namespace OpenSim.Region.PhysicsModule.ODE
52// at least we save same memory and memory access time, FPU performance on intel usually is similar 52// at least we save same memory and memory access time, FPU performance on intel usually is similar
53// using dReal = System.Double; 53// using dReal = System.Double;
54//#else 54//#else
55 using dReal = System.Single; 55 using dReal = System.Single;
56//#endif 56//#endif
57 57
58 public static class d 58 public static class d
59 { 59 {
60 public static dReal Infinity = dReal.MaxValue; 60 public static dReal Infinity = dReal.MaxValue;
61 public static int NTotalBodies = 0; 61 public static int NTotalBodies = 0;
62 public static int NTotalGeoms = 0; 62 public static int NTotalGeoms = 0;
63 63
64 public const uint CONTACTS_UNIMPORTANT = 0x80000000; 64 public const uint CONTACTS_UNIMPORTANT = 0x80000000;
65 65
66 #region Flags and Enumerations 66 #region Flags and Enumerations
67 67
68 [Flags] 68 [Flags]
69 public enum AllocateODEDataFlags : uint 69 public enum AllocateODEDataFlags : uint
@@ -79,101 +79,101 @@ namespace OpenSim.Region.PhysicsModule.ODE
79 dInitFlagManualThreadCleanup = 0x00000001 79 dInitFlagManualThreadCleanup = 0x00000001
80 } 80 }
81 81
82 [Flags] 82 [Flags]
83 public enum ContactFlags : int 83 public enum ContactFlags : int
84 { 84 {
85 Mu2 = 0x001, 85 Mu2 = 0x001,
86 FDir1 = 0x002, 86 FDir1 = 0x002,
87 Bounce = 0x004, 87 Bounce = 0x004,
88 SoftERP = 0x008, 88 SoftERP = 0x008,
89 SoftCFM = 0x010, 89 SoftCFM = 0x010,
90 Motion1 = 0x020, 90 Motion1 = 0x020,
91 Motion2 = 0x040, 91 Motion2 = 0x040,
92 MotionN = 0x080, 92 MotionN = 0x080,
93 Slip1 = 0x100, 93 Slip1 = 0x100,
94 Slip2 = 0x200, 94 Slip2 = 0x200,
95 Approx0 = 0x0000, 95 Approx0 = 0x0000,
96 Approx1_1 = 0x1000, 96 Approx1_1 = 0x1000,
97 Approx1_2 = 0x2000, 97 Approx1_2 = 0x2000,
98 Approx1 = 0x3000 98 Approx1 = 0x3000
99 } 99 }
100 100
101 public enum GeomClassID : int 101 public enum GeomClassID : int
102 { 102 {
103 SphereClass, 103 SphereClass,
104 BoxClass, 104 BoxClass,
105 CapsuleClass, 105 CapsuleClass,
106 CylinderClass, 106 CylinderClass,
107 PlaneClass, 107 PlaneClass,
108 RayClass, 108 RayClass,
109 ConvexClass, 109 ConvexClass,
110 GeomTransformClass, 110 GeomTransformClass,
111 TriMeshClass, 111 TriMeshClass,
112 HeightfieldClass, 112 HeightfieldClass,
113 FirstSpaceClass, 113 FirstSpaceClass,
114 SimpleSpaceClass = FirstSpaceClass, 114 SimpleSpaceClass = FirstSpaceClass,
115 HashSpaceClass, 115 HashSpaceClass,
116 QuadTreeSpaceClass, 116 QuadTreeSpaceClass,
117 LastSpaceClass = QuadTreeSpaceClass, 117 LastSpaceClass = QuadTreeSpaceClass,
118 ubtTerrainClass, 118 ubtTerrainClass,
119 FirstUserClass, 119 FirstUserClass,
120 LastUserClass = FirstUserClass + MaxUserClasses - 1, 120 LastUserClass = FirstUserClass + MaxUserClasses - 1,
121 NumClasses, 121 NumClasses,
122 MaxUserClasses = 5 122 MaxUserClasses = 5
123 } 123 }
124 124
125 public enum JointType : int 125 public enum JointType : int
126 { 126 {
127 None, 127 None,
128 Ball, 128 Ball,
129 Hinge, 129 Hinge,
130 Slider, 130 Slider,
131 Contact, 131 Contact,
132 Universal, 132 Universal,
133 Hinge2, 133 Hinge2,
134 Fixed, 134 Fixed,
135 Null, 135 Null,
136 AMotor, 136 AMotor,
137 LMotor, 137 LMotor,
138 Plane2D 138 Plane2D
139 } 139 }
140 140
141 public enum JointParam : int 141 public enum JointParam : int
142 { 142 {
143 LoStop, 143 LoStop,
144 HiStop, 144 HiStop,
145 Vel, 145 Vel,
146 FMax, 146 FMax,
147 FudgeFactor, 147 FudgeFactor,
148 Bounce, 148 Bounce,
149 CFM, 149 CFM,
150 StopERP, 150 StopERP,
151 StopCFM, 151 StopCFM,
152 SuspensionERP, 152 SuspensionERP,
153 SuspensionCFM, 153 SuspensionCFM,
154 LoStop2 = 256, 154 LoStop2 = 256,
155 HiStop2, 155 HiStop2,
156 Vel2, 156 Vel2,
157 FMax2, 157 FMax2,
158 FudgeFactor2, 158 FudgeFactor2,
159 Bounce2, 159 Bounce2,
160 CFM2, 160 CFM2,
161 StopERP2, 161 StopERP2,
162 StopCFM2, 162 StopCFM2,
163 SuspensionERP2, 163 SuspensionERP2,
164 SuspensionCFM2, 164 SuspensionCFM2,
165 LoStop3 = 512, 165 LoStop3 = 512,
166 HiStop3, 166 HiStop3,
167 Vel3, 167 Vel3,
168 FMax3, 168 FMax3,
169 FudgeFactor3, 169 FudgeFactor3,
170 Bounce3, 170 Bounce3,
171 CFM3, 171 CFM3,
172 StopERP3, 172 StopERP3,
173 StopCFM3, 173 StopCFM3,
174 SuspensionERP3, 174 SuspensionERP3,
175 SuspensionCFM3 175 SuspensionCFM3
176 } 176 }
177 177
178 public enum dSweepAndPruneAxis : int 178 public enum dSweepAndPruneAxis : int
179 { 179 {
@@ -185,24 +185,24 @@ namespace OpenSim.Region.PhysicsModule.ODE
185 ZYX = ((2)|(1<<2)|(0<<4)) 185 ZYX = ((2)|(1<<2)|(0<<4))
186 } 186 }
187 187
188 #endregion 188 #endregion
189 189
190 #region Callbacks 190 #region Callbacks
191 191
192 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 192 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
193 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); 193 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb);
194 194
195 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 195 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
196 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); 196 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip);
197 197
198 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 198 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
199 public delegate void GetAABBFn(IntPtr geom, out AABB aabb); 199 public delegate void GetAABBFn(IntPtr geom, out AABB aabb);
200 200
201 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 201 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
202 public delegate ColliderFn GetColliderFnFn(int num); 202 public delegate ColliderFn GetColliderFnFn(int num);
203 203
204 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 204 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
205 public delegate void GeomDtorFn(IntPtr o); 205 public delegate void GeomDtorFn(IntPtr o);
206 206
207 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 207 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
208 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); 208 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z);
@@ -210,230 +210,230 @@ namespace OpenSim.Region.PhysicsModule.ODE
210 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 210 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
211 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z); 211 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z);
212 212
213 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 213 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
214 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); 214 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2);
215 215
216 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 216 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
217 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); 217 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex);
218 218
219 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 219 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
220 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); 220 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount);
221 221
222 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 222 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
223 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); 223 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v);
224 224
225 #endregion 225 #endregion
226 226
227 #region Structs 227 #region Structs
228 228
229 [StructLayout(LayoutKind.Sequential)] 229 [StructLayout(LayoutKind.Sequential)]
230 public struct AABB 230 public struct AABB
231 { 231 {
232 public dReal MinX, MaxX; 232 public dReal MinX, MaxX;
233 public dReal MinY, MaxY; 233 public dReal MinY, MaxY;
234 public dReal MinZ, MaxZ; 234 public dReal MinZ, MaxZ;
235 } 235 }
236 236
237 237
238 [StructLayout(LayoutKind.Sequential)] 238 [StructLayout(LayoutKind.Sequential)]
239 public struct Contact 239 public struct Contact
240 { 240 {
241 public SurfaceParameters surface; 241 public SurfaceParameters surface;
242 public ContactGeom geom; 242 public ContactGeom geom;
243 public Vector3 fdir1; 243 public Vector3 fdir1;
244 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact)); 244 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact));
245 } 245 }
246 246
247 247
248 [StructLayout(LayoutKind.Sequential)] 248 [StructLayout(LayoutKind.Sequential)]
249 public struct ContactGeom 249 public struct ContactGeom
250 { 250 {
251 251
252 public Vector3 pos; 252 public Vector3 pos;
253 public Vector3 normal; 253 public Vector3 normal;
254 public dReal depth; 254 public dReal depth;
255 public IntPtr g1; 255 public IntPtr g1;
256 public IntPtr g2; 256 public IntPtr g2;
257 public int side1; 257 public int side1;
258 public int side2; 258 public int side2;
259 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom)); 259 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom));
260 } 260 }
261 261
262 [StructLayout(LayoutKind.Sequential)] 262 [StructLayout(LayoutKind.Sequential)]
263 public struct GeomClass 263 public struct GeomClass
264 { 264 {
265 public int bytes; 265 public int bytes;
266 public GetColliderFnFn collider; 266 public GetColliderFnFn collider;
267 public GetAABBFn aabb; 267 public GetAABBFn aabb;
268 public AABBTestFn aabb_test; 268 public AABBTestFn aabb_test;
269 public GeomDtorFn dtor; 269 public GeomDtorFn dtor;
270 } 270 }
271 271
272 272
273 [StructLayout(LayoutKind.Sequential)] 273 [StructLayout(LayoutKind.Sequential)]
274 public struct JointFeedback 274 public struct JointFeedback
275 { 275 {
276 public Vector3 f1; 276 public Vector3 f1;
277 public Vector3 t1; 277 public Vector3 t1;
278 public Vector3 f2; 278 public Vector3 f2;
279 public Vector3 t2; 279 public Vector3 t2;
280 } 280 }
281 281
282 282
283 [StructLayout(LayoutKind.Sequential)] 283 [StructLayout(LayoutKind.Sequential)]
284 public struct Mass 284 public struct Mass
285 { 285 {
286 public dReal mass; 286 public dReal mass;
287 public Vector4 c; 287 public Vector4 c;
288 public Matrix3 I; 288 public Matrix3 I;
289 } 289 }
290 290
291 291
292 [StructLayout(LayoutKind.Sequential)] 292 [StructLayout(LayoutKind.Sequential)]
293 public struct Matrix3 293 public struct Matrix3
294 { 294 {
295 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) 295 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22)
296 { 296 {
297 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; 297 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f;
298 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; 298 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f;
299 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; 299 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f;
300 } 300 }
301 public dReal M00, M10, M20; 301 public dReal M00, M10, M20;
302 private dReal _m30; 302 private dReal _m30;
303 public dReal M01, M11, M21; 303 public dReal M01, M11, M21;
304 private dReal _m31; 304 private dReal _m31;
305 public dReal M02, M12, M22; 305 public dReal M02, M12, M22;
306 private dReal _m32; 306 private dReal _m32;
307 } 307 }
308 308
309 [StructLayout(LayoutKind.Sequential)] 309 [StructLayout(LayoutKind.Sequential)]
310 public struct Matrix4 310 public struct Matrix4
311 { 311 {
312 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, 312 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30,
313 dReal m01, dReal m11, dReal m21, dReal m31, 313 dReal m01, dReal m11, dReal m21, dReal m31,
314 dReal m02, dReal m12, dReal m22, dReal m32, 314 dReal m02, dReal m12, dReal m22, dReal m32,
315 dReal m03, dReal m13, dReal m23, dReal m33) 315 dReal m03, dReal m13, dReal m23, dReal m33)
316 { 316 {
317 M00 = m00; M10 = m10; M20 = m20; M30 = m30; 317 M00 = m00; M10 = m10; M20 = m20; M30 = m30;
318 M01 = m01; M11 = m11; M21 = m21; M31 = m31; 318 M01 = m01; M11 = m11; M21 = m21; M31 = m31;
319 M02 = m02; M12 = m12; M22 = m22; M32 = m32; 319 M02 = m02; M12 = m12; M22 = m22; M32 = m32;
320 M03 = m03; M13 = m13; M23 = m23; M33 = m33; 320 M03 = m03; M13 = m13; M23 = m23; M33 = m33;
321 } 321 }
322 public dReal M00, M10, M20, M30; 322 public dReal M00, M10, M20, M30;
323 public dReal M01, M11, M21, M31; 323 public dReal M01, M11, M21, M31;
324 public dReal M02, M12, M22, M32; 324 public dReal M02, M12, M22, M32;
325 public dReal M03, M13, M23, M33; 325 public dReal M03, M13, M23, M33;
326 } 326 }
327 327
328 [StructLayout(LayoutKind.Sequential)] 328 [StructLayout(LayoutKind.Sequential)]
329 public struct Quaternion 329 public struct Quaternion
330 { 330 {
331 public dReal W, X, Y, Z; 331 public dReal W, X, Y, Z;
332 } 332 }
333 333
334 334
335 [StructLayout(LayoutKind.Sequential)] 335 [StructLayout(LayoutKind.Sequential)]
336 public struct SurfaceParameters 336 public struct SurfaceParameters
337 { 337 {
338 public ContactFlags mode; 338 public ContactFlags mode;
339 public dReal mu; 339 public dReal mu;
340 public dReal mu2; 340 public dReal mu2;
341 public dReal bounce; 341 public dReal bounce;
342 public dReal bounce_vel; 342 public dReal bounce_vel;
343 public dReal soft_erp; 343 public dReal soft_erp;
344 public dReal soft_cfm; 344 public dReal soft_cfm;
345 public dReal motion1; 345 public dReal motion1;
346 public dReal motion2; 346 public dReal motion2;
347 public dReal motionN; 347 public dReal motionN;
348 public dReal slip1; 348 public dReal slip1;
349 public dReal slip2; 349 public dReal slip2;
350 } 350 }
351 351
352 352
353 [StructLayout(LayoutKind.Sequential)] 353 [StructLayout(LayoutKind.Sequential)]
354 public struct Vector3 354 public struct Vector3
355 { 355 {
356 public Vector3(dReal x, dReal y, dReal z) 356 public Vector3(dReal x, dReal y, dReal z)
357 { 357 {
358 X = x; Y = y; Z = z; _w = 0.0f; 358 X = x; Y = y; Z = z; _w = 0.0f;
359 } 359 }
360 public dReal X, Y, Z; 360 public dReal X, Y, Z;
361 private dReal _w; 361 private dReal _w;
362 } 362 }
363 363
364 364
365 [StructLayout(LayoutKind.Sequential)] 365 [StructLayout(LayoutKind.Sequential)]
366 public struct Vector4 366 public struct Vector4
367 { 367 {
368 public Vector4(dReal x, dReal y, dReal z, dReal w) 368 public Vector4(dReal x, dReal y, dReal z, dReal w)
369 { 369 {
370 X = x; Y = y; Z = z; W = w; 370 X = x; Y = y; Z = z; W = w;
371 } 371 }
372 public dReal X, Y, Z, W; 372 public dReal X, Y, Z, W;
373 } 373 }
374 374
375 #endregion 375 #endregion
376 376
377 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] 377 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity]
378 public static extern int AllocateODEDataForThread(uint ODEInitFlags); 378 public static extern int AllocateODEDataForThread(uint ODEInitFlags);
379 379
380 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] 380 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity]
381 public static extern bool AreConnected(IntPtr b1, IntPtr b2); 381 public static extern bool AreConnected(IntPtr b1, IntPtr b2);
382 382
383 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] 383 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity]
384 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); 384 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type);
385 385
386 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] 386 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity]
387 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); 387 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz);
388 388
389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] 389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity]
390 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 390 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
391 391
392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] 392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity]
393 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 393 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
394 394
395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] 395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity]
396 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); 396 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz);
397 397
398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] 398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity]
399 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 399 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
400 400
401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] 401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity]
402 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 402 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
403 403
404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] 404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity]
405 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 405 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
406 406
407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] 407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity]
408 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 408 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
409 409
410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
411 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); 411 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos);
412 412
413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
414 public static extern void BodyCopyPosition(IntPtr body, out dReal X); 414 public static extern void BodyCopyPosition(IntPtr body, out dReal X);
415 415
416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
417 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); 417 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat);
418 418
419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
420 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X); 420 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X);
421 421
422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
423 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); 423 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R);
424 424
425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
426 public static extern void BodyCopyRotation(IntPtr body, out dReal M00); 426 public static extern void BodyCopyRotation(IntPtr body, out dReal M00);
427 427
428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] 428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity]
429 public static extern IntPtr BodyiCreate(IntPtr world); 429 public static extern IntPtr BodyiCreate(IntPtr world);
430 public static IntPtr BodyCreate(IntPtr world) 430 public static IntPtr BodyCreate(IntPtr world)
431 { 431 {
432 NTotalBodies++; 432 NTotalBodies++;
433 return BodyiCreate(world); 433 return BodyiCreate(world);
434 } 434 }
435 435
436 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] 436 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity]
437 public static extern void BodyiDestroy(IntPtr body); 437 public static extern void BodyiDestroy(IntPtr body);
438 public static void BodyDestroy(IntPtr body) 438 public static void BodyDestroy(IntPtr body)
439 { 439 {
@@ -441,114 +441,114 @@ namespace OpenSim.Region.PhysicsModule.ODE
441 BodyiDestroy(body); 441 BodyiDestroy(body);
442 } 442 }
443 443
444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] 444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity]
445 public static extern void BodyDisable(IntPtr body); 445 public static extern void BodyDisable(IntPtr body);
446 446
447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] 447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity]
448 public static extern void BodyEnable(IntPtr body); 448 public static extern void BodyEnable(IntPtr body);
449 449
450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
451 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); 451 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body);
452 452
453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
454 public static extern bool BodyGetAutoDisableFlag(IntPtr body); 454 public static extern bool BodyGetAutoDisableFlag(IntPtr body);
455 455
456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
457 public static extern void BodyGetAutoDisableDefaults(IntPtr body); 457 public static extern void BodyGetAutoDisableDefaults(IntPtr body);
458 458
459 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 459 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
460 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); 460 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body);
461 461
462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
463 public static extern int BodyGetAutoDisableSteps(IntPtr body); 463 public static extern int BodyGetAutoDisableSteps(IntPtr body);
464 464
465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
466 public static extern dReal BodyGetAutoDisableTime(IntPtr body); 466 public static extern dReal BodyGetAutoDisableTime(IntPtr body);
467 467
468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] 468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity]
469 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); 469 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body);
470 public static Vector3 BodyGetAngularVel(IntPtr body) 470 public static Vector3 BodyGetAngularVel(IntPtr body)
471 { 471 {
472 unsafe { return *(BodyGetAngularVelUnsafe(body)); } 472 unsafe { return *(BodyGetAngularVelUnsafe(body)); }
473 } 473 }
474 474
475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] 475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity]
476 public static extern IntPtr BodyGetData(IntPtr body); 476 public static extern IntPtr BodyGetData(IntPtr body);
477 477
478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
479 public static extern int BodyGetFiniteRotationMode(IntPtr body); 479 public static extern int BodyGetFiniteRotationMode(IntPtr body);
480 480
481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
482 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); 482 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result);
483 483
484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] 484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity]
485 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); 485 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body);
486 public static Vector3 BodyGetForce(IntPtr body) 486 public static Vector3 BodyGetForce(IntPtr body)
487 { 487 {
488 unsafe { return *(BodyGetForceUnsafe(body)); } 488 unsafe { return *(BodyGetForceUnsafe(body)); }
489 } 489 }
490 490
491 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] 491 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity]
492 public static extern bool BodyGetGravityMode(IntPtr body); 492 public static extern bool BodyGetGravityMode(IntPtr body);
493 493
494 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 494 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
495 public static extern int BodyGetGyroscopicMode(IntPtr body); 495 public static extern int BodyGetGyroscopicMode(IntPtr body);
496 496
497 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] 497 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity]
498 public static extern IntPtr BodyGetJoint(IntPtr body, int index); 498 public static extern IntPtr BodyGetJoint(IntPtr body, int index);
499 499
500 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] 500 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity]
501 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); 501 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body);
502 public static Vector3 BodyGetLinearVel(IntPtr body) 502 public static Vector3 BodyGetLinearVel(IntPtr body)
503 { 503 {
504 unsafe { return *(BodyGetLinearVelUnsafe(body)); } 504 unsafe { return *(BodyGetLinearVelUnsafe(body)); }
505 } 505 }
506 506
507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] 507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity]
508 public static extern void BodyGetMass(IntPtr body, out Mass mass); 508 public static extern void BodyGetMass(IntPtr body, out Mass mass);
509 509
510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] 510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity]
511 public static extern int BodyGetNumJoints(IntPtr body); 511 public static extern int BodyGetNumJoints(IntPtr body);
512 512
513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] 513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity]
514 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 514 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
515 515
516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] 516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity]
517 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); 517 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body);
518 public static Vector3 BodyGetPosition(IntPtr body) 518 public static Vector3 BodyGetPosition(IntPtr body)
519 { 519 {
520 unsafe { return *(BodyGetPositionUnsafe(body)); } 520 unsafe { return *(BodyGetPositionUnsafe(body)); }
521 } 521 }
522 522
523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] 523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity]
524 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 524 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
525 525
526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] 526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity]
527 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); 527 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body);
528 public static Quaternion BodyGetQuaternion(IntPtr body) 528 public static Quaternion BodyGetQuaternion(IntPtr body)
529 { 529 {
530 unsafe { return *(BodyGetQuaternionUnsafe(body)); } 530 unsafe { return *(BodyGetQuaternionUnsafe(body)); }
531 } 531 }
532 532
533 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] 533 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity]
534 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 534 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
535 535
536 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] 536 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity]
537 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 537 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
538 538
539 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] 539 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity]
540 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); 540 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body);
541 public static Matrix3 BodyGetRotation(IntPtr body) 541 public static Matrix3 BodyGetRotation(IntPtr body)
542 { 542 {
543 unsafe { return *(BodyGetRotationUnsafe(body)); } 543 unsafe { return *(BodyGetRotationUnsafe(body)); }
544 } 544 }
545 545
546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] 546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity]
547 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); 547 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body);
548 public static Vector3 BodyGetTorque(IntPtr body) 548 public static Vector3 BodyGetTorque(IntPtr body)
549 { 549 {
550 unsafe { return *(BodyGetTorqueUnsafe(body)); } 550 unsafe { return *(BodyGetTorqueUnsafe(body)); }
551 } 551 }
552 552
553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] 553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity]
554 public static extern IntPtr BodyGetWorld(IntPtr body); 554 public static extern IntPtr BodyGetWorld(IntPtr body);
@@ -560,38 +560,38 @@ namespace OpenSim.Region.PhysicsModule.ODE
560 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom); 560 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom);
561 561
562 562
563 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] 563 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity]
564 public static extern bool BodyIsEnabled(IntPtr body); 564 public static extern bool BodyIsEnabled(IntPtr body);
565 565
566 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] 566 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity]
567 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); 567 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z);
568 568
569 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 569 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
570 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); 570 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold);
571 571
572 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 572 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
573 public static extern void BodySetAutoDisableDefaults(IntPtr body); 573 public static extern void BodySetAutoDisableDefaults(IntPtr body);
574 574
575 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 575 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
576 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); 576 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable);
577 577
578 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 578 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
579 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); 579 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold);
580 580
581 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 581 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
582 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps); 582 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps);
583 583
584 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 584 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
585 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time); 585 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time);
586 586
587 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] 587 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity]
588 public static extern void BodySetData(IntPtr body, IntPtr data); 588 public static extern void BodySetData(IntPtr body, IntPtr data);
589 589
590 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 590 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
591 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode); 591 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode);
592 592
593 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 593 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
594 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); 594 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z);
595 595
596 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] 596 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity]
597 public static extern void BodySetLinearDamping(IntPtr body, dReal scale); 597 public static extern void BodySetLinearDamping(IntPtr body, dReal scale);
@@ -620,11 +620,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
620 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 620 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
621 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body); 621 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body);
622 622
623 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] 623 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity]
624 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); 624 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z);
625 625
626 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] 626 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity]
627 public static extern void BodySetGravityMode(IntPtr body, bool mode); 627 public static extern void BodySetGravityMode(IntPtr body, bool mode);
628 628
629 /// <summary> 629 /// <summary>
630 /// Sets the Gyroscopic term status on the body specified. 630 /// Sets the Gyroscopic term status on the body specified.
@@ -634,76 +634,76 @@ namespace OpenSim.Region.PhysicsModule.ODE
634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
635 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); 635 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled);
636 636
637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] 637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity]
638 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); 638 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z);
639 639
640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] 640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity]
641 public static extern void BodySetMass(IntPtr body, ref Mass mass); 641 public static extern void BodySetMass(IntPtr body, ref Mass mass);
642 642
643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] 643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity]
644 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); 644 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z);
645 645
646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
647 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); 647 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q);
648 648
649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
650 public static extern void BodySetQuaternion(IntPtr body, ref dReal w); 650 public static extern void BodySetQuaternion(IntPtr body, ref dReal w);
651 651
652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
653 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R); 653 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R);
654 654
655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
656 public static extern void BodySetRotation(IntPtr body, ref dReal M00); 656 public static extern void BodySetRotation(IntPtr body, ref dReal M00);
657 657
658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] 658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity]
659 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); 659 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z);
660 660
661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] 661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity]
662 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 662 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
663 663
664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] 664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity]
665 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 665 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
666 666
667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] 667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity]
668 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, 668 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1,
669 ref Vector3 side1, ref Vector3 p2, 669 ref Vector3 side1, ref Vector3 p2,
670 ref Matrix3 R2, ref Vector3 side2, 670 ref Matrix3 R2, ref Vector3 side2,
671 ref Vector3 normal, out dReal depth, out int return_code, 671 ref Vector3 normal, out dReal depth, out int return_code,
672 int maxc, out ContactGeom contact, int skip); 672 int maxc, out ContactGeom contact, int skip);
673 673
674 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] 674 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity]
675 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, 675 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1,
676 ref Vector3 side1, ref Vector3 _p2, 676 ref Vector3 side1, ref Vector3 _p2,
677 ref Matrix3 R2, ref Vector3 side2); 677 ref Matrix3 R2, ref Vector3 side2);
678 678
679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] 679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity]
680 public static extern void CleanupODEAllDataForThread(); 680 public static extern void CleanupODEAllDataForThread();
681 681
682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] 682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity]
683 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, 683 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2,
684 ref Vector3 b1, ref Vector3 b2, 684 ref Vector3 b1, ref Vector3 b2,
685 ref Vector3 cp1, ref Vector3 cp2); 685 ref Vector3 cp1, ref Vector3 cp2);
686 686
687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] 687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity]
688 public static extern void CloseODE(); 688 public static extern void CloseODE();
689 689
690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
691 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); 691 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip);
692 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 692 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
693 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip); 693 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip);
694 694
695 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] 695 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity]
696 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); 696 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2);
697 697
698 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] 698 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity]
699 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz); 699 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz);
700 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz) 700 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz)
701 { 701 {
702 NTotalGeoms++; 702 NTotalGeoms++;
703 return CreateiBox(space, lx, ly, lz); 703 return CreateiBox(space, lx, ly, lz);
704 } 704 }
705 705
706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] 706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity]
707 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length); 707 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length);
708 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length) 708 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length)
709 { 709 {
@@ -711,23 +711,23 @@ namespace OpenSim.Region.PhysicsModule.ODE
711 return CreateiCapsule(space, radius, length); 711 return CreateiCapsule(space, radius, length);
712 } 712 }
713 713
714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] 714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity]
715 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 715 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
716 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons) 716 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons)
717 { 717 {
718 NTotalGeoms++; 718 NTotalGeoms++;
719 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons); 719 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons);
720 } 720 }
721 721
722 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] 722 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity]
723 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length); 723 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length);
724 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length) 724 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length)
725 { 725 {
726 NTotalGeoms++; 726 NTotalGeoms++;
727 return CreateiCylinder(space, radius, length); 727 return CreateiCylinder(space, radius, length);
728 } 728 }
729 729
730 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] 730 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity]
731 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable); 731 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable);
732 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable) 732 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable)
733 { 733 {
@@ -745,23 +745,23 @@ namespace OpenSim.Region.PhysicsModule.ODE
745 745
746 746
747 747
748
749 748
750 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] 749
751 public static extern IntPtr CreateiGeom(int classnum); 750 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity]
751 public static extern IntPtr CreateiGeom(int classnum);
752 public static IntPtr CreateGeom(int classnum) 752 public static IntPtr CreateGeom(int classnum)
753 { 753 {
754 NTotalGeoms++; 754 NTotalGeoms++;
755 return CreateiGeom(classnum); 755 return CreateiGeom(classnum);
756 } 756 }
757 757
758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] 758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity]
759 public static extern int CreateGeomClass(ref GeomClass classptr); 759 public static extern int CreateGeomClass(ref GeomClass classptr);
760 760
761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] 761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity]
762 public static extern IntPtr CreateGeomTransform(IntPtr space); 762 public static extern IntPtr CreateGeomTransform(IntPtr space);
763 763
764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] 764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity]
765 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); 765 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d);
766 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d) 766 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d)
767 { 767 {
@@ -769,25 +769,25 @@ namespace OpenSim.Region.PhysicsModule.ODE
769 return CreateiPlane(space, a, b, c, d); 769 return CreateiPlane(space, a, b, c, d);
770 } 770 }
771 771
772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] 772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity]
773 public static extern IntPtr CreateiRay(IntPtr space, dReal length); 773 public static extern IntPtr CreateiRay(IntPtr space, dReal length);
774 public static IntPtr CreateRay(IntPtr space, dReal length) 774 public static IntPtr CreateRay(IntPtr space, dReal length)
775 { 775 {
776 NTotalGeoms++; 776 NTotalGeoms++;
777 return CreateiRay(space, length); 777 return CreateiRay(space, length);
778 } 778 }
779 779
780 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] 780 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity]
781 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius); 781 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius);
782 public static IntPtr CreateSphere(IntPtr space, dReal radius) 782 public static IntPtr CreateSphere(IntPtr space, dReal radius)
783 { 783 {
784 NTotalGeoms++; 784 NTotalGeoms++;
785 return CreateiSphere(space, radius); 785 return CreateiSphere(space, radius);
786 } 786 }
787 787
788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] 788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity]
789 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data, 789 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data,
790 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); 790 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback);
791 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data, 791 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data,
792 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback) 792 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback)
793 { 793 {
@@ -795,79 +795,79 @@ namespace OpenSim.Region.PhysicsModule.ODE
795 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback); 795 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback);
796 } 796 }
797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] 797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity]
798 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n); 798 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n);
799 799
800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] 800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity]
801 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); 801 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q);
802 802
803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] 803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity]
804 public static extern int FactorCholesky(ref dReal A00, int n); 804 public static extern int FactorCholesky(ref dReal A00, int n);
805 805
806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] 806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity]
807 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); 807 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip);
808 808
809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
810 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); 810 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len);
811 811
812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
813 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); 813 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x);
814 814
815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] 815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity]
816 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); 816 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z);
817 817
818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] 818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity]
819 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); 819 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z);
820 820
821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] 821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity]
822 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); 822 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length);
823 823
824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] 824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity]
825 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 825 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
826 826
827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] 827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity]
828 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); 828 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length);
829 829
830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] 830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity]
831 public static extern void GeomClearOffset(IntPtr geom); 831 public static extern void GeomClearOffset(IntPtr geom);
832 832
833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
834 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); 834 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos);
835 835
836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
837 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); 837 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X);
838 838
839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
840 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); 840 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q);
841 841
842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
843 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); 843 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X);
844 844
845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
846 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); 846 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R);
847 847
848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
849 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); 849 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00);
850 850
851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
852 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); 852 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos);
853 853
854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
855 public static extern void GeomCopyPosition(IntPtr geom, out dReal X); 855 public static extern void GeomCopyPosition(IntPtr geom, out dReal X);
856 856
857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
858 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); 858 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R);
859 859
860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
861 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00); 861 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00);
862 862
863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] 863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity]
864 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); 864 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length);
865 865
866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] 866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity]
867 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); 867 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length);
868 868
869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] 869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity]
870 public static extern void GeomiDestroy(IntPtr geom); 870 public static extern void GeomiDestroy(IntPtr geom);
871 public static void GeomDestroy(IntPtr geom) 871 public static void GeomDestroy(IntPtr geom)
872 { 872 {
873 NTotalGeoms--; 873 NTotalGeoms--;
@@ -875,63 +875,63 @@ namespace OpenSim.Region.PhysicsModule.ODE
875 } 875 }
876 876
877 877
878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] 878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity]
879 public static extern void GeomDisable(IntPtr geom); 879 public static extern void GeomDisable(IntPtr geom);
880 880
881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] 881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity]
882 public static extern void GeomEnable(IntPtr geom); 882 public static extern void GeomEnable(IntPtr geom);
883 883
884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
885 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb); 885 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb);
886 886
887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
888 public static extern void GeomGetAABB(IntPtr geom, out dReal minX); 888 public static extern void GeomGetAABB(IntPtr geom, out dReal minX);
889 889
890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] 890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity]
891 public static extern IntPtr GeomGetBody(IntPtr geom); 891 public static extern IntPtr GeomGetBody(IntPtr geom);
892 892
893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] 893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity]
894 public static extern uint GeomGetCategoryBits(IntPtr geom); 894 public static extern uint GeomGetCategoryBits(IntPtr geom);
895 895
896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] 896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity]
897 public static extern IntPtr GeomGetClassData(IntPtr geom); 897 public static extern IntPtr GeomGetClassData(IntPtr geom);
898 898
899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] 899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity]
900 public static extern uint GeomGetCollideBits(IntPtr geom); 900 public static extern uint GeomGetCollideBits(IntPtr geom);
901 901
902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] 902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity]
903 public static extern GeomClassID GeomGetClass(IntPtr geom); 903 public static extern GeomClassID GeomGetClass(IntPtr geom);
904 904
905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] 905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity]
906 public static extern IntPtr GeomGetData(IntPtr geom); 906 public static extern IntPtr GeomGetData(IntPtr geom);
907 907
908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] 908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity]
909 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); 909 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom);
910 public static Vector3 GeomGetOffsetPosition(IntPtr geom) 910 public static Vector3 GeomGetOffsetPosition(IntPtr geom)
911 { 911 {
912 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } 912 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); }
913 } 913 }
914 914
915 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] 915 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity]
916 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); 916 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom);
917 public static Matrix3 GeomGetOffsetRotation(IntPtr geom) 917 public static Matrix3 GeomGetOffsetRotation(IntPtr geom)
918 { 918 {
919 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } 919 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); }
920 } 920 }
921 921
922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] 922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity]
923 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); 923 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom);
924 public static Vector3 GeomGetPosition(IntPtr geom) 924 public static Vector3 GeomGetPosition(IntPtr geom)
925 { 925 {
926 unsafe { return *(GeomGetPositionUnsafe(geom)); } 926 unsafe { return *(GeomGetPositionUnsafe(geom)); }
927 } 927 }
928 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) 928 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom)
929 { 929 {
930 Vector3 vtmp = GeomGetPosition(geom); 930 Vector3 vtmp = GeomGetPosition(geom);
931 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); 931 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z);
932 } 932 }
933 933
934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
935 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); 935 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q);
936 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) 936 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom)
937 { 937 {
@@ -940,85 +940,85 @@ namespace OpenSim.Region.PhysicsModule.ODE
940 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W); 940 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W);
941 } 941 }
942 942
943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
944 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); 944 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X);
945 945
946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] 946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity]
947 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); 947 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom);
948 public static Matrix3 GeomGetRotation(IntPtr geom) 948 public static Matrix3 GeomGetRotation(IntPtr geom)
949 { 949 {
950 unsafe { return *(GeomGetRotationUnsafe(geom)); } 950 unsafe { return *(GeomGetRotationUnsafe(geom)); }
951 } 951 }
952 952
953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] 953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity]
954 public static extern IntPtr GeomGetSpace(IntPtr geom); 954 public static extern IntPtr GeomGetSpace(IntPtr geom);
955 955
956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
957 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, 957 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData,
958 dReal width, dReal depth, int widthSamples, int depthSamples, 958 dReal width, dReal depth, int widthSamples, int depthSamples,
959 dReal scale, dReal offset, dReal thickness, int bWrap); 959 dReal scale, dReal offset, dReal thickness, int bWrap);
960 960
961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
962 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 962 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
963 dReal width, dReal depth, int widthSamples, int depthSamples, 963 dReal width, dReal depth, int widthSamples, int depthSamples,
964 dReal scale, dReal offset, dReal thickness, int bWrap); 964 dReal scale, dReal offset, dReal thickness, int bWrap);
965 965
966 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] 966 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity]
967 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, 967 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback,
968 dReal width, dReal depth, int widthSamples, int depthSamples, 968 dReal width, dReal depth, int widthSamples, int depthSamples,
969 dReal scale, dReal offset, dReal thickness, int bWrap); 969 dReal scale, dReal offset, dReal thickness, int bWrap);
970 970
971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
972 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, 972 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData,
973 dReal width, dReal depth, int widthSamples, int depthSamples, 973 dReal width, dReal depth, int widthSamples, int depthSamples,
974 dReal scale, dReal offset, dReal thickness, int bWrap); 974 dReal scale, dReal offset, dReal thickness, int bWrap);
975 975
976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
977 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, 977 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData,
978 dReal width, dReal depth, int widthSamples, int depthSamples, 978 dReal width, dReal depth, int widthSamples, int depthSamples,
979 dReal scale, dReal offset, dReal thickness, int bWrap); 979 dReal scale, dReal offset, dReal thickness, int bWrap);
980 980
981 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 981 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
982 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 982 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
983 dReal width, dReal depth, int widthSamples, int depthSamples, 983 dReal width, dReal depth, int widthSamples, int depthSamples,
984 dReal scale, dReal offset, dReal thickness, int bWrap); 984 dReal scale, dReal offset, dReal thickness, int bWrap);
985 985
986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
987 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, 987 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData,
988 dReal width, dReal depth, int widthSamples, int depthSamples, 988 dReal width, dReal depth, int widthSamples, int depthSamples,
989 dReal scale, dReal offset, dReal thickness, int bWrap); 989 dReal scale, dReal offset, dReal thickness, int bWrap);
990 990
991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
992 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 992 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
993 dReal width, dReal depth, int widthSamples, int depthSamples, 993 dReal width, dReal depth, int widthSamples, int depthSamples,
994 dReal scale, dReal offset, dReal thickness, int bWrap); 994 dReal scale, dReal offset, dReal thickness, int bWrap);
995 995
996 996
997 997
998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
999 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, 999 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData,
1000 dReal width, dReal depth, int widthSamples, int depthSamples, 1000 dReal width, dReal depth, int widthSamples, int depthSamples,
1001 dReal scale, dReal offset, dReal thickness, int bWrap); 1001 dReal scale, dReal offset, dReal thickness, int bWrap);
1002 1002
1003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1004 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 1004 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
1005 dReal width, dReal depth, int widthSamples, int depthSamples, 1005 dReal width, dReal depth, int widthSamples, int depthSamples,
1006 dReal scale, dReal offset, dReal thickness, int bWrap); 1006 dReal scale, dReal offset, dReal thickness, int bWrap);
1007 1007
1008 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] 1008 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity]
1009 public static extern IntPtr GeomHeightfieldDataCreate(); 1009 public static extern IntPtr GeomHeightfieldDataCreate();
1010 1010
1011 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] 1011 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity]
1012 public static extern void GeomHeightfieldDataDestroy(IntPtr d); 1012 public static extern void GeomHeightfieldDataDestroy(IntPtr d);
1013 1013
1014 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] 1014 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity]
1015 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); 1015 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
1016 1016
1017 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1017 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1018 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); 1018 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g);
1019 1019
1020 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1020 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1021 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); 1021 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d);
1022 1022
1023 1023
1024 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity] 1024 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
@@ -1047,279 +1047,279 @@ namespace OpenSim.Region.PhysicsModule.ODE
1047 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d); 1047 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d);
1048 1048
1049 1049
1050 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] 1050 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity]
1051 public static extern bool GeomIsEnabled(IntPtr geom); 1051 public static extern bool GeomIsEnabled(IntPtr geom);
1052 1052
1053 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] 1053 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity]
1054 public static extern bool GeomIsOffset(IntPtr geom); 1054 public static extern bool GeomIsOffset(IntPtr geom);
1055 1055
1056 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] 1056 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity]
1057 public static extern bool GeomIsSpace(IntPtr geom); 1057 public static extern bool GeomIsSpace(IntPtr geom);
1058 1058
1059 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1059 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1060 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); 1060 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result);
1061 1061
1062 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1062 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1063 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); 1063 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A);
1064 1064
1065 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] 1065 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity]
1066 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1066 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1067 1067
1068 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] 1068 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity]
1069 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); 1069 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d);
1070 1070
1071 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1071 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1072 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); 1072 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir);
1073 1073
1074 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1074 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1075 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); 1075 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX);
1076 1076
1077 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] 1077 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity]
1078 public static extern int GeomRayGetClosestHit(IntPtr ray); 1078 public static extern int GeomRayGetClosestHit(IntPtr ray);
1079 1079
1080 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] 1080 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity]
1081 public static extern dReal GeomRayGetLength(IntPtr ray); 1081 public static extern dReal GeomRayGetLength(IntPtr ray);
1082 1082
1083 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] 1083 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity]
1084 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); 1084 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull);
1085 1085
1086 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] 1086 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity]
1087 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); 1087 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
1088 1088
1089 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] 1089 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity]
1090 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); 1090 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit);
1091 1091
1092 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] 1092 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity]
1093 public static extern void GeomRaySetLength(IntPtr ray, dReal length); 1093 public static extern void GeomRaySetLength(IntPtr ray, dReal length);
1094 1094
1095 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] 1095 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity]
1096 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); 1096 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull);
1097 1097
1098 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] 1098 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity]
1099 public static extern void GeomSetBody(IntPtr geom, IntPtr body); 1099 public static extern void GeomSetBody(IntPtr geom, IntPtr body);
1100 1100
1101 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] 1101 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity]
1102 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits); 1102 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits);
1103 1103
1104 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] 1104 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity]
1105 public static extern void GeomSetCollideBits(IntPtr geom, uint bits); 1105 public static extern void GeomSetCollideBits(IntPtr geom, uint bits);
1106 1106
1107 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] 1107 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity]
1108 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 1108 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
1109 1109
1110 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] 1110 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity]
1111 public static extern void GeomSetData(IntPtr geom, IntPtr data); 1111 public static extern void GeomSetData(IntPtr geom, IntPtr data);
1112 1112
1113 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] 1113 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity]
1114 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1114 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1115
1116 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1117 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1118
1119 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1120 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1121
1122 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1123 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1124
1125 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1126 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1127 1115
1128 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] 1116 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1129 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); 1117 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1130 1118
1131 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1119 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1132 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); 1120 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1133 1121
1134 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1122 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1135 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); 1123 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1136 1124
1137 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1125 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1138 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); 1126 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1139 1127
1140 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1128 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity]
1141 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); 1129 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z);
1142 1130
1143 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] 1131 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1144 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1132 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q);
1145 1133
1146 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1134 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1147 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); 1135 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X);
1148 1136
1149 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1137 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1150 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); 1138 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R);
1151 1139
1152 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1140 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1153 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); 1141 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00);
1154 1142
1155 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1143 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity]
1156 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00); 1144 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1157 1145
1158 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] 1146 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1159 public static extern dReal GeomSphereGetRadius(IntPtr geom); 1147 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat);
1160 1148
1161 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] 1149 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1162 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1150 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w);
1163 1151
1164 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] 1152 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1165 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); 1153 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R);
1166 1154
1167 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] 1155 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1168 public static extern int GeomTransformGetCleanup(IntPtr geom); 1156 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00);
1169 1157
1170 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] 1158 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity]
1171 public static extern IntPtr GeomTransformGetGeom(IntPtr geom); 1159 public static extern dReal GeomSphereGetRadius(IntPtr geom);
1172 1160
1173 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] 1161 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity]
1174 public static extern int GeomTransformGetInfo(IntPtr geom); 1162 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1175 1163
1176 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] 1164 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity]
1177 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode); 1165 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius);
1178 1166
1179 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] 1167 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity]
1180 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); 1168 public static extern int GeomTransformGetCleanup(IntPtr geom);
1181 1169
1182 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] 1170 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity]
1183 public static extern void GeomTransformSetInfo(IntPtr geom, int info); 1171 public static extern IntPtr GeomTransformGetGeom(IntPtr geom);
1184 1172
1185 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1173 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity]
1186 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1174 public static extern int GeomTransformGetInfo(IntPtr geom);
1187 double[] vertices, int vertexStride, int vertexCount,
1188 int[] indices, int indexCount, int triStride);
1189 1175
1190 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1176 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity]
1191 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1177 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode);
1192 IntPtr vertices, int vertexStride, int vertexCount,
1193 IntPtr indices, int indexCount, int triStride);
1194 1178
1195 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1179 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity]
1196 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d, 1180 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj);
1197 double[] vertices, int vertexStride, int vertexCount,
1198 int[] indices, int indexCount, int triStride,
1199 double[] normals);
1200 1181
1201 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1182 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity]
1202 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1183 public static extern void GeomTransformSetInfo(IntPtr geom, int info);
1203 IntPtr vertices, int vertexStride, int vertexCount,
1204 IntPtr indices, int indexCount, int triStride,
1205 IntPtr normals);
1206 1184
1207 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1185 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1208 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1186 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1209 dReal[] vertices, int vertexStride, int vertexCount, 1187 double[] vertices, int vertexStride, int vertexCount,
1210 int[] indices, int indexCount, int triStride); 1188 int[] indices, int indexCount, int triStride);
1211 1189
1212 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1190 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1213 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1191 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1214 IntPtr vertices, int vertexStride, int vertexCount, 1192 IntPtr vertices, int vertexStride, int vertexCount,
1215 IntPtr indices, int indexCount, int triStride); 1193 IntPtr indices, int indexCount, int triStride);
1216 1194
1217 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1195 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1218 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1196 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d,
1219 dReal[] vertices, int vertexStride, int vertexCount, 1197 double[] vertices, int vertexStride, int vertexCount,
1220 int[] indices, int indexCount, int triStride, 1198 int[] indices, int indexCount, int triStride,
1221 dReal[] normals); 1199 double[] normals);
1222 1200
1223 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1201 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1224 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1202 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1225 IntPtr vertices, int vertexStride, int vertexCount, 1203 IntPtr vertices, int vertexStride, int vertexCount,
1226 IntPtr indices, int indexCount, int triStride, 1204 IntPtr indices, int indexCount, int triStride,
1227 IntPtr normals); 1205 IntPtr normals);
1228 1206
1229 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1207 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1230 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1208 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1231 float[] vertices, int vertexStride, int vertexCount, 1209 dReal[] vertices, int vertexStride, int vertexCount,
1232 int[] indices, int indexCount, int triStride); 1210 int[] indices, int indexCount, int triStride);
1233 1211
1234 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1212 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1235 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1213 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1236 IntPtr vertices, int vertexStride, int vertexCount, 1214 IntPtr vertices, int vertexStride, int vertexCount,
1237 IntPtr indices, int indexCount, int triStride); 1215 IntPtr indices, int indexCount, int triStride);
1238 1216
1239 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1217 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1240 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1218 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1241 float[] vertices, int vertexStride, int vertexCount, 1219 dReal[] vertices, int vertexStride, int vertexCount,
1242 int[] indices, int indexCount, int triStride, 1220 int[] indices, int indexCount, int triStride,
1243 float[] normals); 1221 dReal[] normals);
1244 1222
1245 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1223 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1246 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1224 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1247 IntPtr vertices, int vertexStride, int vertexCount, 1225 IntPtr vertices, int vertexStride, int vertexCount,
1248 IntPtr indices, int indexCount, int triStride, 1226 IntPtr indices, int indexCount, int triStride,
1249 IntPtr normals); 1227 IntPtr normals);
1250 1228
1251 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] 1229 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1252 public static extern void GeomTriMeshClearTCCache(IntPtr g); 1230 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1231 float[] vertices, int vertexStride, int vertexCount,
1232 int[] indices, int indexCount, int triStride);
1253 1233
1254 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] 1234 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1255 public static extern IntPtr GeomTriMeshDataCreate(); 1235 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1236 IntPtr vertices, int vertexStride, int vertexCount,
1237 IntPtr indices, int indexCount, int triStride);
1256 1238
1257 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] 1239 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1258 public static extern void GeomTriMeshDataDestroy(IntPtr d); 1240 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1241 float[] vertices, int vertexStride, int vertexCount,
1242 int[] indices, int indexCount, int triStride,
1243 float[] normals);
1259 1244
1260 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] 1245 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1261 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); 1246 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1247 IntPtr vertices, int vertexStride, int vertexCount,
1248 IntPtr indices, int indexCount, int triStride,
1249 IntPtr normals);
1262 1250
1263 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] 1251 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity]
1264 public static extern void GeomTriMeshDataPreprocess(IntPtr d); 1252 public static extern void GeomTriMeshClearTCCache(IntPtr g);
1265 1253
1266 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] 1254 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity]
1267 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); 1255 public static extern IntPtr GeomTriMeshDataCreate();
1268 1256
1269 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] 1257 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity]
1270 public static extern void GeomTriMeshDataUpdate(IntPtr d); 1258 public static extern void GeomTriMeshDataDestroy(IntPtr d);
1271 1259
1272 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] 1260 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity]
1273 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); 1261 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id);
1274 1262
1275 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] 1263 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity]
1276 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); 1264 public static extern void GeomTriMeshDataPreprocess(IntPtr d);
1277 1265
1278 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] 1266 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity]
1279 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g); 1267 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data);
1280 1268
1281 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] 1269 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity]
1282 public static extern IntPtr GeomTriMeshGetData(IntPtr g); 1270 public static extern void GeomTriMeshDataUpdate(IntPtr d);
1283 1271
1284 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] 1272 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity]
1285 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); 1273 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable);
1286 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) 1274
1287 { 1275 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity]
1288 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } 1276 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g);
1289 } 1277
1278 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity]
1279 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g);
1280
1281 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity]
1282 public static extern IntPtr GeomTriMeshGetData(IntPtr g);
1283
1284 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity]
1285 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom);
1286 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom)
1287 {
1288 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); }
1289 }
1290 1290
1291 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] 1291 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity]
1292 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); 1292 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec);
1293 1293
1294 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] 1294 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity]
1295 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); 1295 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g);
1296 1296
1297 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] 1297 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity]
1298 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); 1298 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2);
1299 1299
1300 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] 1300 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity]
1301 public extern static int GeomTriMeshGetTriangleCount(IntPtr g); 1301 public extern static int GeomTriMeshGetTriangleCount(IntPtr g);
1302 1302
1303 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] 1303 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity]
1304 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); 1304 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g);
1305 1305
1306 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] 1306 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity]
1307 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); 1307 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass);
1308 1308
1309 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] 1309 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity]
1310 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); 1310 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback);
1311 1311
1312 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] 1312 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity]
1313 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); 1313 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback);
1314 1314
1315 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] 1315 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity]
1316 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); 1316 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data);
1317 1317
1318 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1318 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1319 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); 1319 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans);
1320 1320
1321 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1321 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1322 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); 1322 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00);
1323 1323
1324 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] 1324 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity]
1325 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); 1325 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback);
@@ -1334,416 +1334,416 @@ namespace OpenSim.Region.PhysicsModule.ODE
1334 return s; 1334 return s;
1335 } 1335 }
1336 1336
1337 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] 1337 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity]
1338 public static extern IntPtr HashSpaceCreate(IntPtr space); 1338 public static extern IntPtr HashSpaceCreate(IntPtr space);
1339 1339
1340 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] 1340 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity]
1341 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); 1341 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel);
1342 1342
1343 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] 1343 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity]
1344 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); 1344 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel);
1345 1345
1346 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] 1346 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity]
1347 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb); 1347 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb);
1348 1348
1349 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] 1349 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity]
1350 public static extern void InitODE(); 1350 public static extern void InitODE();
1351 1351
1352 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] 1352 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity]
1353 public static extern int InitODE2(uint ODEInitFlags); 1353 public static extern int InitODE2(uint ODEInitFlags);
1354 1354
1355 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] 1355 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity]
1356 public static extern int IsPositiveDefinite(ref dReal A, int n); 1356 public static extern int IsPositiveDefinite(ref dReal A, int n);
1357 1357
1358 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] 1358 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity]
1359 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); 1359 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n);
1360 1360
1361 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] 1361 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity]
1362 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); 1362 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3);
1363 1363
1364 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] 1364 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity]
1365 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque); 1365 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque);
1366 1366
1367 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] 1367 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity]
1368 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); 1368 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2);
1369 1369
1370 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] 1370 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity]
1371 public static extern void JointAddPRTorque(IntPtr joint, dReal torque); 1371 public static extern void JointAddPRTorque(IntPtr joint, dReal torque);
1372 1372
1373 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] 1373 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity]
1374 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); 1374 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2);
1375 1375
1376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] 1376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity]
1377 public static extern void JointAddSliderForce(IntPtr joint, dReal force); 1377 public static extern void JointAddSliderForce(IntPtr joint, dReal force);
1378 1378
1379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] 1379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity]
1380 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); 1380 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2);
1381 1381
1382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] 1382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity]
1383 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); 1383 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group);
1384 1384
1385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] 1385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity]
1386 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); 1386 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group);
1387 1387
1388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1389 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); 1389 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact);
1390 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1390 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1391 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact); 1391 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact);
1392 1392
1393 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] 1393 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity]
1394 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); 1394 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group);
1395 1395
1396 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] 1396 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity]
1397 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); 1397 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group);
1398 1398
1399 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] 1399 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity]
1400 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); 1400 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group);
1401 1401
1402 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] 1402 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity]
1403 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); 1403 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group);
1404 1404
1405 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] 1405 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity]
1406 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); 1406 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group);
1407 1407
1408 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] 1408 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity]
1409 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); 1409 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group);
1410 1410
1411 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] 1411 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity]
1412 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); 1412 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group);
1413 1413
1414 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] 1414 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity]
1415 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); 1415 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group);
1416 1416
1417 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] 1417 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity]
1418 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); 1418 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group);
1419 1419
1420 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] 1420 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity]
1421 public static extern void JointDestroy(IntPtr j); 1421 public static extern void JointDestroy(IntPtr j);
1422 1422
1423 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1423 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1424 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum); 1424 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum);
1425 1425
1426 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] 1426 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity]
1427 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); 1427 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum);
1428 1428
1429 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1429 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1430 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); 1430 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result);
1431 1431
1432 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] 1432 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity]
1433 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum); 1433 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum);
1434 1434
1435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] 1435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity]
1436 public static extern int JointGetAMotorMode(IntPtr j); 1436 public static extern int JointGetAMotorMode(IntPtr j);
1437 1437
1438 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1438 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1439 public static extern int JointGetAMotorNumAxes(IntPtr j); 1439 public static extern int JointGetAMotorNumAxes(IntPtr j);
1440 1440
1441 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] 1441 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity]
1442 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter); 1442 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter);
1443 1443
1444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] 1444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity]
1445 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); 1445 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result);
1446 1446
1447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1448 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); 1448 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result);
1449 1449
1450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] 1450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity]
1451 public static extern IntPtr JointGetBody(IntPtr j); 1451 public static extern IntPtr JointGetBody(IntPtr j);
1452 1452
1453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] 1453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity]
1454 public static extern IntPtr JointGetData(IntPtr j); 1454 public static extern IntPtr JointGetData(IntPtr j);
1455 1455
1456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] 1456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity]
1457 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); 1457 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j);
1458 public static JointFeedback JointGetFeedback(IntPtr j) 1458 public static JointFeedback JointGetFeedback(IntPtr j)
1459 { 1459 {
1460 unsafe { return *(JointGetFeedbackUnsafe(j)); } 1460 unsafe { return *(JointGetFeedbackUnsafe(j)); }
1461 } 1461 }
1462 1462
1463 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1463 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1464 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); 1464 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result);
1465 1465
1466 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] 1466 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity]
1467 public static extern dReal JointGetHingeAngle(IntPtr j); 1467 public static extern dReal JointGetHingeAngle(IntPtr j);
1468 1468
1469 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] 1469 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity]
1470 public static extern dReal JointGetHingeAngleRate(IntPtr j); 1470 public static extern dReal JointGetHingeAngleRate(IntPtr j);
1471 1471
1472 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] 1472 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity]
1473 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); 1473 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result);
1474 1474
1475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] 1475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity]
1476 public static extern dReal JointGetHingeParam(IntPtr j, int parameter); 1476 public static extern dReal JointGetHingeParam(IntPtr j, int parameter);
1477 1477
1478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] 1478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity]
1479 public static extern dReal JointGetHinge2Angle1(IntPtr j); 1479 public static extern dReal JointGetHinge2Angle1(IntPtr j);
1480 1480
1481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] 1481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity]
1482 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j); 1482 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j);
1483 1483
1484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] 1484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity]
1485 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j); 1485 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j);
1486 1486
1487 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] 1487 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity]
1488 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); 1488 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result);
1489 1489
1490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1491 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); 1491 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result);
1492 1492
1493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] 1493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity]
1494 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); 1494 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result);
1495 1495
1496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1497 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); 1497 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result);
1498 1498
1499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1500 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); 1500 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result);
1501 1501
1502 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] 1502 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity]
1503 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter); 1503 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter);
1504 1504
1505 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1505 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1506 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); 1506 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result);
1507 1507
1508 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1508 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1509 public static extern int JointGetLMotorNumAxes(IntPtr j); 1509 public static extern int JointGetLMotorNumAxes(IntPtr j);
1510 1510
1511 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] 1511 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity]
1512 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter); 1512 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter);
1513 1513
1514 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] 1514 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity]
1515 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); 1515 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result);
1516 1516
1517 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] 1517 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity]
1518 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); 1518 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result);
1519 1519
1520 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] 1520 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity]
1521 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); 1521 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result);
1522 1522
1523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] 1523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity]
1524 public static extern dReal JointGetPRParam(IntPtr j, int parameter); 1524 public static extern dReal JointGetPRParam(IntPtr j, int parameter);
1525 1525
1526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] 1526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity]
1527 public static extern dReal JointGetPRPosition(IntPtr j); 1527 public static extern dReal JointGetPRPosition(IntPtr j);
1528 1528
1529 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] 1529 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity]
1530 public static extern dReal JointGetPRPositionRate(IntPtr j); 1530 public static extern dReal JointGetPRPositionRate(IntPtr j);
1531 1531
1532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] 1532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity]
1533 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); 1533 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result);
1534 1534
1535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] 1535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity]
1536 public static extern dReal JointGetSliderParam(IntPtr j, int parameter); 1536 public static extern dReal JointGetSliderParam(IntPtr j, int parameter);
1537 1537
1538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] 1538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity]
1539 public static extern dReal JointGetSliderPosition(IntPtr j); 1539 public static extern dReal JointGetSliderPosition(IntPtr j);
1540 1540
1541 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] 1541 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity]
1542 public static extern dReal JointGetSliderPositionRate(IntPtr j); 1542 public static extern dReal JointGetSliderPositionRate(IntPtr j);
1543 1543
1544 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] 1544 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity]
1545 public static extern JointType JointGetType(IntPtr j); 1545 public static extern JointType JointGetType(IntPtr j);
1546 1546
1547 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1547 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1548 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); 1548 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result);
1549 1549
1550 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] 1550 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity]
1551 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); 1551 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result);
1552 1552
1553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] 1553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity]
1554 public static extern dReal JointGetUniversalAngle1(IntPtr j); 1554 public static extern dReal JointGetUniversalAngle1(IntPtr j);
1555 1555
1556 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] 1556 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity]
1557 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j); 1557 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j);
1558 1558
1559 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] 1559 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity]
1560 public static extern dReal JointGetUniversalAngle2(IntPtr j); 1560 public static extern dReal JointGetUniversalAngle2(IntPtr j);
1561 1561
1562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] 1562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity]
1563 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j); 1563 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j);
1564 1564
1565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] 1565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity]
1566 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); 1566 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2);
1567 1567
1568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1569 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); 1569 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result);
1570 1570
1571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1572 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); 1572 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result);
1573 1573
1574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] 1574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity]
1575 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter); 1575 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter);
1576 1576
1577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] 1577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity]
1578 public static extern IntPtr JointGroupCreate(int max_size); 1578 public static extern IntPtr JointGroupCreate(int max_size);
1579 1579
1580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] 1580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity]
1581 public static extern void JointGroupDestroy(IntPtr group); 1581 public static extern void JointGroupDestroy(IntPtr group);
1582 1582
1583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] 1583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity]
1584 public static extern void JointGroupEmpty(IntPtr group); 1584 public static extern void JointGroupEmpty(IntPtr group);
1585 1585
1586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1587 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); 1587 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle);
1588 1588
1589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1590 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1590 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1591 1591
1592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] 1592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity]
1593 public static extern void JointSetAMotorMode(IntPtr j, int mode); 1593 public static extern void JointSetAMotorMode(IntPtr j, int mode);
1594 1594
1595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1596 public static extern void JointSetAMotorNumAxes(IntPtr group, int num); 1596 public static extern void JointSetAMotorNumAxes(IntPtr group, int num);
1597 1597
1598 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] 1598 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity]
1599 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); 1599 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value);
1600 1600
1601 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] 1601 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity]
1602 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); 1602 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z);
1603 1603
1604 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1604 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1605 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); 1605 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z);
1606 1606
1607 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] 1607 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity]
1608 public static extern void JointSetData(IntPtr j, IntPtr data); 1608 public static extern void JointSetData(IntPtr j, IntPtr data);
1609 1609
1610 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] 1610 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity]
1611 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); 1611 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback);
1612 1612
1613 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] 1613 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity]
1614 public static extern void JointSetFixed(IntPtr j); 1614 public static extern void JointSetFixed(IntPtr j);
1615 1615
1616 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1616 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1617 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); 1617 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z);
1618 1618
1619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] 1619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity]
1620 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1620 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1621 1621
1622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] 1622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity]
1623 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); 1623 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z);
1624 1624
1625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] 1625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity]
1626 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); 1626 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value);
1627 1627
1628 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1628 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1629 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); 1629 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z);
1630 1630
1631 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1631 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1632 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); 1632 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z);
1633 1633
1634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1635 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); 1635 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z);
1636 1636
1637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] 1637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity]
1638 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); 1638 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value);
1639 1639
1640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1641 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1641 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1642 1642
1643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1644 public static extern void JointSetLMotorNumAxes(IntPtr j, int num); 1644 public static extern void JointSetLMotorNumAxes(IntPtr j, int num);
1645 1645
1646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] 1646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity]
1647 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); 1647 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value);
1648 1648
1649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] 1649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity]
1650 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); 1650 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value);
1651 1651
1652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] 1652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity]
1653 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); 1653 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value);
1654 1654
1655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] 1655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity]
1656 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); 1656 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value);
1657 1657
1658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] 1658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity]
1659 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); 1659 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z);
1660 1660
1661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] 1661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity]
1662 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); 1662 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z);
1663 1663
1664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] 1664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity]
1665 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); 1665 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z);
1666 1666
1667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] 1667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity]
1668 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); 1668 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value);
1669 1669
1670 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] 1670 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity]
1671 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); 1671 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z);
1672 1672
1673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] 1673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity]
1674 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1674 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1675 1675
1676 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] 1676 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity]
1677 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); 1677 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value);
1678 1678
1679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1680 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); 1680 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z);
1681 1681
1682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1683 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); 1683 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z);
1684 1684
1685 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1685 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1686 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); 1686 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z);
1687 1687
1688 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] 1688 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity]
1689 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); 1689 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value);
1690 1690
1691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] 1691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity]
1692 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); 1692 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip);
1693 1693
1694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] 1694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity]
1695 public static extern void MassAdd(ref Mass a, ref Mass b); 1695 public static extern void MassAdd(ref Mass a, ref Mass b);
1696 1696
1697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] 1697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity]
1698 public static extern void MassAdjust(ref Mass m, dReal newmass); 1698 public static extern void MassAdjust(ref Mass m, dReal newmass);
1699 1699
1700 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] 1700 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity]
1701 public static extern bool MassCheck(ref Mass m); 1701 public static extern bool MassCheck(ref Mass m);
1702 1702
1703 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1703 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1704 public static extern void MassRotate(ref Mass mass, ref Matrix3 R); 1704 public static extern void MassRotate(ref Mass mass, ref Matrix3 R);
1705 1705
1706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1707 public static extern void MassRotate(ref Mass mass, ref dReal M00); 1707 public static extern void MassRotate(ref Mass mass, ref dReal M00);
1708 1708
1709 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] 1709 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity]
1710 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); 1710 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz);
1711 1711
1712 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] 1712 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity]
1713 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); 1713 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz);
1714 1714
1715 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] 1715 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity]
1716 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1716 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1717 1717
1718 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] 1718 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity]
1719 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1719 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1720 1720
1721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] 1721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity]
1722 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1722 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1723 1723
1724 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] 1724 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity]
1725 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1725 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1726 1726
1727 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] 1727 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity]
1728 public static extern void MassSetParameters(out Mass mass, dReal themass, 1728 public static extern void MassSetParameters(out Mass mass, dReal themass,
1729 dReal cgx, dReal cgy, dReal cgz, 1729 dReal cgx, dReal cgy, dReal cgz,
1730 dReal i11, dReal i22, dReal i33, 1730 dReal i11, dReal i22, dReal i33,
1731 dReal i12, dReal i13, dReal i23); 1731 dReal i12, dReal i13, dReal i23);
1732 1732
1733 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] 1733 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity]
1734 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); 1734 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius);
1735 1735
1736 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] 1736 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity]
1737 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); 1737 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius);
1738 1738
1739 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] 1739 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity]
1740 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); 1740 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g);
1741 1741
1742 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] 1742 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity]
1743 public static extern void MassSetZero(out Mass mass); 1743 public static extern void MassSetZero(out Mass mass);
1744 1744
1745 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] 1745 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity]
1746 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z); 1746 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z);
1747 1747
1748 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] 1748 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity]
1749 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1749 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
@@ -1755,119 +1755,119 @@ namespace OpenSim.Region.PhysicsModule.ODE
1755 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1); 1755 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1);
1756 } 1756 }
1757 1757
1758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] 1758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity]
1759 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1759 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1760 1760
1761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] 1761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity]
1762 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1762 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1763 1763
1764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1765 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); 1765 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle);
1766 1766
1767 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] 1767 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity]
1768 public static extern void QfromR(out Quaternion q, ref Matrix3 R); 1768 public static extern void QfromR(out Quaternion q, ref Matrix3 R);
1769 1769
1770 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] 1770 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity]
1771 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1771 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1772 1772
1773 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] 1773 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity]
1774 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1774 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1775 1775
1776 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] 1776 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity]
1777 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1777 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1778 1778
1779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] 1779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity]
1780 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1780 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1781 1781
1782 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] 1782 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity]
1783 public static extern void QSetIdentity(out Quaternion q); 1783 public static extern void QSetIdentity(out Quaternion q);
1784 1784
1785 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1785 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1786 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); 1786 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth);
1787 1787
1788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1789 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); 1789 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth);
1790 1790
1791 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] 1791 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity]
1792 public static extern dReal RandReal(); 1792 public static extern dReal RandReal();
1793 1793
1794 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] 1794 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity]
1795 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); 1795 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz);
1796 1796
1797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1798 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); 1798 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle);
1799 1799
1800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] 1800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity]
1801 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); 1801 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi);
1802 1802
1803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] 1803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity]
1804 public static extern void RfromQ(out Matrix3 R, ref Quaternion q); 1804 public static extern void RfromQ(out Matrix3 R, ref Quaternion q);
1805 1805
1806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] 1806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity]
1807 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); 1807 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az);
1808 1808
1809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] 1809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity]
1810 public static extern void RSetIdentity(out Matrix3 R); 1810 public static extern void RSetIdentity(out Matrix3 R);
1811 1811
1812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] 1812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity]
1813 public static extern void SetValue(out dReal a, int n); 1813 public static extern void SetValue(out dReal a, int n);
1814 1814
1815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] 1815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity]
1816 public static extern void SetZero(out dReal a, int n); 1816 public static extern void SetZero(out dReal a, int n);
1817 1817
1818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] 1818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity]
1819 public static extern IntPtr SimpleSpaceCreate(IntPtr space); 1819 public static extern IntPtr SimpleSpaceCreate(IntPtr space);
1820 1820
1821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] 1821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity]
1822 public static extern void SolveCholesky(ref dReal L, out dReal b, int n); 1822 public static extern void SolveCholesky(ref dReal L, out dReal b, int n);
1823 1823
1824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] 1824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity]
1825 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); 1825 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip);
1826 1826
1827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] 1827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity]
1828 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); 1828 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip);
1829 1829
1830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] 1830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity]
1831 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); 1831 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip);
1832 1832
1833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] 1833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity]
1834 public static extern void SpaceAdd(IntPtr space, IntPtr geom); 1834 public static extern void SpaceAdd(IntPtr space, IntPtr geom);
1835 1835
1836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity] 1836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity]
1837 public static extern bool SpaceLockQuery(IntPtr space); 1837 public static extern bool SpaceLockQuery(IntPtr space);
1838 1838
1839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] 1839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity]
1840 public static extern void SpaceClean(IntPtr space); 1840 public static extern void SpaceClean(IntPtr space);
1841 1841
1842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] 1842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity]
1843 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); 1843 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback);
1844 1844
1845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] 1845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity]
1846 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); 1846 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback);
1847 1847
1848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] 1848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity]
1849 public static extern void SpaceDestroy(IntPtr space); 1849 public static extern void SpaceDestroy(IntPtr space);
1850 1850
1851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] 1851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity]
1852 public static extern bool SpaceGetCleanup(IntPtr space); 1852 public static extern bool SpaceGetCleanup(IntPtr space);
1853 1853
1854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] 1854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity]
1855 public static extern int SpaceGetNumGeoms(IntPtr space); 1855 public static extern int SpaceGetNumGeoms(IntPtr space);
1856 1856
1857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] 1857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity]
1858 public static extern IntPtr SpaceGetGeom(IntPtr space, int i); 1858 public static extern IntPtr SpaceGetGeom(IntPtr space, int i);
1859 1859
1860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] 1860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity]
1861 public static extern int SpaceGetSublevel(IntPtr space); 1861 public static extern int SpaceGetSublevel(IntPtr space);
1862 1862
1863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] 1863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity]
1864 public static extern bool SpaceQuery(IntPtr space, IntPtr geom); 1864 public static extern bool SpaceQuery(IntPtr space, IntPtr geom);
1865 1865
1866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] 1866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity]
1867 public static extern void SpaceRemove(IntPtr space, IntPtr geom); 1867 public static extern void SpaceRemove(IntPtr space, IntPtr geom);
1868 1868
1869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] 1869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity]
1870 public static extern void SpaceSetCleanup(IntPtr space, bool mode); 1870 public static extern void SpaceSetCleanup(IntPtr space, bool mode);
1871 1871
1872 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] 1872 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity]
1873 public static extern void SpaceSetSublevel(IntPtr space, int sublevel); 1873 public static extern void SpaceSetSublevel(IntPtr space, int sublevel);
@@ -1875,53 +1875,53 @@ namespace OpenSim.Region.PhysicsModule.ODE
1875 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] 1875 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity]
1876 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); 1876 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder);
1877 1877
1878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] 1878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity]
1879 public static extern void VectorScale(out dReal a, ref dReal d, int n); 1879 public static extern void VectorScale(out dReal a, ref dReal d, int n);
1880 1880
1881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] 1881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity]
1882 public static extern IntPtr WorldCreate(); 1882 public static extern IntPtr WorldCreate();
1883 1883
1884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] 1884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity]
1885 public static extern void WorldDestroy(IntPtr world); 1885 public static extern void WorldDestroy(IntPtr world);
1886 1886
1887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1888 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); 1888 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world);
1889 1889
1890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1891 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); 1891 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world);
1892 1892
1893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1894 public static extern bool WorldGetAutoDisableFlag(IntPtr world); 1894 public static extern bool WorldGetAutoDisableFlag(IntPtr world);
1895 1895
1896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1897 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); 1897 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world);
1898 1898
1899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1900 public static extern int WorldGetAutoDisableSteps(IntPtr world); 1900 public static extern int WorldGetAutoDisableSteps(IntPtr world);
1901 1901
1902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1903 public static extern dReal WorldGetAutoDisableTime(IntPtr world); 1903 public static extern dReal WorldGetAutoDisableTime(IntPtr world);
1904 1904
1905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1906 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world); 1906 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world);
1907 1907
1908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] 1908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity]
1909 public static extern dReal WorldGetCFM(IntPtr world); 1909 public static extern dReal WorldGetCFM(IntPtr world);
1910 1910
1911 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] 1911 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity]
1912 public static extern dReal WorldGetERP(IntPtr world); 1912 public static extern dReal WorldGetERP(IntPtr world);
1913 1913
1914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1915 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); 1915 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity);
1916 1916
1917 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1917 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1918 public static extern void WorldGetGravity(IntPtr world, out dReal X); 1918 public static extern void WorldGetGravity(IntPtr world, out dReal X);
1919 1919
1920 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1920 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1921 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); 1921 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world);
1922 1922
1923 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1923 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1924 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world); 1924 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world);
1925 1925
1926 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] 1926 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity]
1927 public static extern dReal WorldGetAngularDamping(IntPtr world); 1927 public static extern dReal WorldGetAngularDamping(IntPtr world);
@@ -1935,23 +1935,23 @@ namespace OpenSim.Region.PhysicsModule.ODE
1935 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 1935 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
1936 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world); 1936 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world);
1937 1937
1938 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 1938 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
1939 public static extern int WorldGetQuickStepNumIterations(IntPtr world); 1939 public static extern int WorldGetQuickStepNumIterations(IntPtr world);
1940 1940
1941 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] 1941 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity]
1942 public static extern dReal WorldGetQuickStepW(IntPtr world); 1942 public static extern dReal WorldGetQuickStepW(IntPtr world);
1943 1943
1944 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 1944 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
1945 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world); 1945 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world);
1946 1946
1947 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1947 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1948 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); 1948 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force);
1949 1949
1950 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1950 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1951 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); 1951 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX);
1952 1952
1953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] 1953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity]
1954 public static extern void WorldQuickStep(IntPtr world, dReal stepsize); 1954 public static extern void WorldQuickStep(IntPtr world, dReal stepsize);
1955 1955
1956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] 1956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity]
1957 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale); 1957 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale);
@@ -1959,67 +1959,67 @@ namespace OpenSim.Region.PhysicsModule.ODE
1959 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 1959 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
1960 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); 1960 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold);
1961 1961
1962 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1962 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1963 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); 1963 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold);
1964 1964
1965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1966 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); 1966 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count);
1967 1967
1968 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1968 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1969 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); 1969 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable);
1970 1970
1971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1972 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); 1972 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold);
1973 1973
1974 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1974 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1975 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); 1975 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps);
1976 1976
1977 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1977 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1978 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); 1978 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time);
1979 1979
1980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1981 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); 1981 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth);
1982 1982
1983 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] 1983 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity]
1984 public static extern void WorldSetCFM(IntPtr world, dReal cfm); 1984 public static extern void WorldSetCFM(IntPtr world, dReal cfm);
1985 1985
1986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1987 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); 1987 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel);
1988 1988
1989 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1989 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1990 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); 1990 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth);
1991 1991
1992 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] 1992 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity]
1993 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); 1993 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale);
1994 1994
1995 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] 1995 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity]
1996 public static extern void WorldSetERP(IntPtr world, dReal erp); 1996 public static extern void WorldSetERP(IntPtr world, dReal erp);
1997
1998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1999 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
1997 2000
1998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1999 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
2000
2001 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] 2001 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity]
2002 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale); 2002 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale);
2003 2003
2004 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 2004 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
2005 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); 2005 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold);
2006 2006
2007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 2007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
2008 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); 2008 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num);
2009 2009
2010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] 2010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity]
2011 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); 2011 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation);
2012 2012
2013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 2013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
2014 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); 2014 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed);
2015 2015
2016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] 2016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity]
2017 public static extern void WorldStep(IntPtr world, dReal stepsize); 2017 public static extern void WorldStep(IntPtr world, dReal stepsize);
2018 2018
2019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] 2019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity]
2020 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); 2020 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations);
2021 2021
2022 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity] 2022 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity]
2023 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix); 2023 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix);
2024 } 2024 }
2025} 2025}
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
index aaf90f2..98bfd1c 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
@@ -149,7 +149,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
149 /// Collision geometry 149 /// Collision geometry
150 /// </summary> 150 /// </summary>
151 internal IntPtr Shell { get; private set; } 151 internal IntPtr Shell { get; private set; }
152 152
153 private IntPtr Amotor = IntPtr.Zero; 153 private IntPtr Amotor = IntPtr.Zero;
154 private d.Mass ShellMass; 154 private d.Mass ShellMass;
155 155
@@ -237,7 +237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
237 m_tainted_isPhysical = true; // new tainted status: need to create ODE information 237 m_tainted_isPhysical = true; // new tainted status: need to create ODE information
238 238
239 _parent_scene.AddPhysicsActorTaint(this); 239 _parent_scene.AddPhysicsActorTaint(this);
240 240
241 Name = avName; 241 Name = avName;
242 } 242 }
243 243
@@ -461,7 +461,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
461 value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; 461 value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5;
462 } 462 }
463 463
464 m_taintPosition = value; 464 m_taintPosition = value;
465 _parent_scene.AddPhysicsActorTaint(this); 465 _parent_scene.AddPhysicsActorTaint(this);
466 } 466 }
467 else 467 else
@@ -796,7 +796,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
796 internal void Move(List<OdeCharacter> defects) 796 internal void Move(List<OdeCharacter> defects)
797 { 797 {
798 // no lock; for now it's only called from within Simulate() 798 // no lock; for now it's only called from within Simulate()
799 799
800 // If the PID Controller isn't active then we set our force 800 // If the PID Controller isn't active then we set our force
801 // calculating base velocity to the current position 801 // calculating base velocity to the current position
802 802
@@ -811,7 +811,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
811 811
812 d.Vector3 localpos = d.BodyGetPosition(Body); 812 d.Vector3 localpos = d.BodyGetPosition(Body);
813 Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z); 813 Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z);
814 814
815 if (!localPos.IsFinite()) 815 if (!localPos.IsFinite())
816 { 816 {
817 m_log.WarnFormat( 817 m_log.WarnFormat(
@@ -1248,10 +1248,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1248 } 1248 }
1249 1249
1250 public override Vector3 PIDTarget { set { return; } } 1250 public override Vector3 PIDTarget { set { return; } }
1251 public override bool PIDActive 1251 public override bool PIDActive
1252 { 1252 {
1253 get { return false; } 1253 get { return false; }
1254 set { return; } 1254 set { return; }
1255 } 1255 }
1256 public override float PIDTau { set { return; } } 1256 public override float PIDTau { set { return; } }
1257 1257
@@ -1259,7 +1259,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1259 public override bool PIDHoverActive {get {return false;} set { return; } } 1259 public override bool PIDHoverActive {get {return false;} set { return; } }
1260 public override PIDHoverType PIDHoverType { set { return; } } 1260 public override PIDHoverType PIDHoverType { set { return; } }
1261 public override float PIDHoverTau { set { return; } } 1261 public override float PIDHoverTau { set { return; } }
1262 1262
1263 public override Quaternion APIDTarget{ set { return; } } 1263 public override Quaternion APIDTarget{ set { return; } }
1264 1264
1265 public override bool APIDActive{ set { return; } } 1265 public override bool APIDActive{ set { return; } }
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1369// m_log.DebugFormat( 1369// m_log.DebugFormat(
1370// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}", 1370// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}",
1371// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name); 1371// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name);
1372 1372
1373 m_pidControllerActive = true; 1373 m_pidControllerActive = true;
1374 1374
1375 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate() 1375 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate()
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs
index ff19384..7e95d7f 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs
@@ -914,7 +914,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
914 914
915 // Sum velocities 915 // Sum velocities
916 m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection 916 m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection
917 917
918 if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0) 918 if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0)
919 { 919 {
920 m_lastAngularVelocity.X = 0; 920 m_lastAngularVelocity.X = 0;
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs b/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs
index d61ee61..22fc84d 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs
@@ -9,14 +9,14 @@ using OpenSim.Region.Framework.Interfaces;
9 9
10namespace OpenSim.Region.PhysicsModule.ODE 10namespace OpenSim.Region.PhysicsModule.ODE
11{ 11{
12 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")] 12 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")]
13 public class OdeModule : INonSharedRegionModule 13 public class OdeModule : INonSharedRegionModule
14 { 14 {
15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
16 16
17 private bool m_Enabled = false; 17 private bool m_Enabled = false;
18 private IConfigSource m_config; 18 private IConfigSource m_config;
19 private OdeScene m_scene; 19 private OdeScene m_scene;
20 20
21 #region INonSharedRegionModule 21 #region INonSharedRegionModule
22 22
@@ -84,6 +84,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
84 84
85 m_scene.RegionLoaded(); 85 m_scene.RegionLoaded();
86 } 86 }
87 #endregion 87 #endregion
88 } 88 }
89} 89}
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
index 36546aa..8934330 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
@@ -33,7 +33,7 @@
33 * ODEDynamics.cs contains methods dealing with Prim Physical motion 33 * ODEDynamics.cs contains methods dealing with Prim Physical motion
34 * (dynamics) and the associated settings. Old Linear and angular 34 * (dynamics) and the associated settings. Old Linear and angular
35 * motors for dynamic motion have been replace with MoveLinear() 35 * motors for dynamic motion have been replace with MoveLinear()
36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic 36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic
37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to 37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to
38 * switch between 'VEHICLE' parameter use and general dynamics 38 * switch between 'VEHICLE' parameter use and general dynamics
39 * settings use. 39 * settings use.
@@ -133,7 +133,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
133 private float m_targetHoverHeight; 133 private float m_targetHoverHeight;
134 private float m_groundHeight; 134 private float m_groundHeight;
135 private float m_waterHeight; 135 private float m_waterHeight;
136 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 136 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
137 137
138 // private float m_tensor = 5f; 138 // private float m_tensor = 5f;
139 private int body_autodisable_frames = 20; 139 private int body_autodisable_frames = 20;
@@ -170,7 +170,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
170 170
171 private PrimitiveBaseShape _pbs; 171 private PrimitiveBaseShape _pbs;
172 private OdeScene _parent_scene; 172 private OdeScene _parent_scene;
173 173
174 /// <summary> 174 /// <summary>
175 /// The physics space which contains prim geometries 175 /// The physics space which contains prim geometries
176 /// </summary> 176 /// </summary>
@@ -443,7 +443,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
443 443
444 d.BodySetAutoDisableFlag(Body, true); 444 d.BodySetAutoDisableFlag(Body, true);
445 d.BodySetAutoDisableSteps(Body, body_autodisable_frames); 445 d.BodySetAutoDisableSteps(Body, body_autodisable_frames);
446 446
447 // disconnect from world gravity so we can apply buoyancy 447 // disconnect from world gravity so we can apply buoyancy
448 d.BodySetGravityMode (Body, false); 448 d.BodySetGravityMode (Body, false);
449 449
@@ -474,8 +474,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
474 474
475 float returnMass = 0; 475 float returnMass = 0;
476 float hollowAmount = (float)_pbs.ProfileHollow * 2.0e-5f; 476 float hollowAmount = (float)_pbs.ProfileHollow * 2.0e-5f;
477 float hollowVolume = hollowAmount * hollowAmount; 477 float hollowVolume = hollowAmount * hollowAmount;
478 478
479 switch (_pbs.ProfileShape) 479 switch (_pbs.ProfileShape)
480 { 480 {
481 case ProfileShape.Square: 481 case ProfileShape.Square:
@@ -511,16 +511,16 @@ namespace OpenSim.Region.PhysicsModule.ODE
511 511
512 else if (_pbs.PathCurve == (byte)Extrusion.Curve1) 512 else if (_pbs.PathCurve == (byte)Extrusion.Curve1)
513 { 513 {
514 //a tube 514 //a tube
515 515
516 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX); 516 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX);
517 tmp= 1.0f -2.0e-2f * (float)(200 - _pbs.PathScaleY); 517 tmp= 1.0f -2.0e-2f * (float)(200 - _pbs.PathScaleY);
518 volume -= volume*tmp*tmp; 518 volume -= volume*tmp*tmp;
519 519
520 if (hollowAmount > 0.0) 520 if (hollowAmount > 0.0)
521 { 521 {
522 hollowVolume *= hollowAmount; 522 hollowVolume *= hollowAmount;
523 523
524 switch (_pbs.HollowShape) 524 switch (_pbs.HollowShape)
525 { 525 {
526 case HollowShape.Square: 526 case HollowShape.Square:
@@ -579,7 +579,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
579 volume *= 0.61685027506808491367715568749226e-2f * (float)(200 - _pbs.PathScaleX); 579 volume *= 0.61685027506808491367715568749226e-2f * (float)(200 - _pbs.PathScaleX);
580 tmp = 1.0f - .02f * (float)(200 - _pbs.PathScaleY); 580 tmp = 1.0f - .02f * (float)(200 - _pbs.PathScaleY);
581 volume *= (1.0f - tmp * tmp); 581 volume *= (1.0f - tmp * tmp);
582 582
583 if (hollowAmount > 0.0) 583 if (hollowAmount > 0.0)
584 { 584 {
585 585
@@ -845,7 +845,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
845 else 845 else
846 { 846 {
847 _parent_scene.DeactivatePrim(this); 847 _parent_scene.DeactivatePrim(this);
848 848
849 m_collisionCategories &= ~CollisionCategories.Body; 849 m_collisionCategories &= ~CollisionCategories.Body;
850 m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land); 850 m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land);
851 851
@@ -916,7 +916,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
916 else 916 else
917 { 917 {
918 _triMeshData = d.GeomTriMeshDataCreate(); 918 _triMeshData = d.GeomTriMeshDataCreate();
919 919
920 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride); 920 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride);
921 d.GeomTriMeshDataPreprocess(_triMeshData); 921 d.GeomTriMeshDataPreprocess(_triMeshData);
922 m_MeshToTriMeshMap[mesh] = _triMeshData; 922 m_MeshToTriMeshMap[mesh] = _triMeshData;
@@ -974,7 +974,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
974 rotate(); 974 rotate();
975 } 975 }
976 } 976 }
977 977
978 if (m_taintPhysics != IsPhysical && !(m_taintparent != _parent)) 978 if (m_taintPhysics != IsPhysical && !(m_taintparent != _parent))
979 changePhysicsStatus(); 979 changePhysicsStatus();
980 980
@@ -1074,7 +1074,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1074 else if (_parent != null && m_taintparent == null) 1074 else if (_parent != null && m_taintparent == null)
1075 { 1075 {
1076//Console.WriteLine(" changelink B"); 1076//Console.WriteLine(" changelink B");
1077 1077
1078 if (_parent is OdePrim) 1078 if (_parent is OdePrim)
1079 { 1079 {
1080 OdePrim obj = (OdePrim)_parent; 1080 OdePrim obj = (OdePrim)_parent;
@@ -1082,16 +1082,16 @@ Console.WriteLine("ZProcessTaints for " + Name);
1082 childPrim = false; 1082 childPrim = false;
1083 //_parent = null; 1083 //_parent = null;
1084 } 1084 }
1085 1085
1086 /* 1086 /*
1087 if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0) 1087 if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0)
1088 d.JointGroupDestroy(_linkJointGroup); 1088 d.JointGroupDestroy(_linkJointGroup);
1089 1089
1090 _linkJointGroup = (IntPtr)0; 1090 _linkJointGroup = (IntPtr)0;
1091 m_linkJoint = (IntPtr)0; 1091 m_linkJoint = (IntPtr)0;
1092 */ 1092 */
1093 } 1093 }
1094 1094
1095 _parent = m_taintparent; 1095 _parent = m_taintparent;
1096 m_taintPhysics = IsPhysical; 1096 m_taintPhysics = IsPhysical;
1097 } 1097 }
@@ -1345,7 +1345,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1345 // in between the disabling and the collision properties setting 1345 // in between the disabling and the collision properties setting
1346 // which would wake the physical body up from a soft disabling and potentially cause it to fall 1346 // which would wake the physical body up from a soft disabling and potentially cause it to fall
1347 // through the ground. 1347 // through the ground.
1348 1348
1349 // NOTE FOR JOINTS: this doesn't always work for jointed assemblies because if you select 1349 // NOTE FOR JOINTS: this doesn't always work for jointed assemblies because if you select
1350 // just one part of the assembly, the rest of the assembly is non-selected and still simulating, 1350 // just one part of the assembly, the rest of the assembly is non-selected and still simulating,
1351 // so that causes the selected part to wake up and continue moving. 1351 // so that causes the selected part to wake up and continue moving.
@@ -1359,7 +1359,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1359 // e.g. we select 100 prims that are connected by joints. non-atomically, the first 50 are 1359 // e.g. we select 100 prims that are connected by joints. non-atomically, the first 50 are
1360 // selected and disabled. then, due to a thread switch, the selection processing is 1360 // selected and disabled. then, due to a thread switch, the selection processing is
1361 // interrupted and the physics engine continues to simulate, so the last 50 items, whose 1361 // interrupted and the physics engine continues to simulate, so the last 50 items, whose
1362 // selection was not yet processed, continues to simulate. this wakes up ALL of the 1362 // selection was not yet processed, continues to simulate. this wakes up ALL of the
1363 // first 50 again. then the last 50 are disabled. then the first 50, which were just woken 1363 // first 50 again. then the last 50 are disabled. then the first 50, which were just woken
1364 // up, start simulating again, which in turn wakes up the last 50. 1364 // up, start simulating again, which in turn wakes up the last 50.
1365 1365
@@ -1565,7 +1565,7 @@ Console.WriteLine("CreateGeom:");
1565 private void changeadd() 1565 private void changeadd()
1566 { 1566 {
1567// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name); 1567// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name);
1568 1568
1569 int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); 1569 int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
1570 IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); 1570 IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
1571 1571
@@ -1711,10 +1711,10 @@ Console.WriteLine(" JointCreateFixed");
1711// fz = 0f; 1711// fz = 0f;
1712 //m_log.Info(m_collisionFlags.ToString()); 1712 //m_log.Info(m_collisionFlags.ToString());
1713 1713
1714 1714
1715 //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 1715 //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
1716 // would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ?? 1716 // would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ??
1717 // m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up 1717 // m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up
1718 // gravityz multiplier = 1 - m_buoyancy 1718 // gravityz multiplier = 1 - m_buoyancy
1719 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; 1719 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass;
1720 1720
@@ -1729,7 +1729,7 @@ Console.WriteLine(" JointCreateFixed");
1729 fz = 0f; 1729 fz = 0f;
1730 1730
1731 // no lock; for now it's only called from within Simulate() 1731 // no lock; for now it's only called from within Simulate()
1732 1732
1733 // If the PID Controller isn't active then we set our force 1733 // If the PID Controller isn't active then we set our force
1734 // calculating base velocity to the current position 1734 // calculating base velocity to the current position
1735 1735
@@ -1738,7 +1738,7 @@ Console.WriteLine(" JointCreateFixed");
1738 //PID_G = PID_G / m_PIDTau; 1738 //PID_G = PID_G / m_PIDTau;
1739 m_PIDTau = 1; 1739 m_PIDTau = 1;
1740 } 1740 }
1741 1741
1742 if ((PID_G - m_PIDTau) <= 0) 1742 if ((PID_G - m_PIDTau) <= 0)
1743 { 1743 {
1744 PID_G = m_PIDTau + 1; 1744 PID_G = m_PIDTau + 1;
@@ -1761,7 +1761,7 @@ Console.WriteLine(" JointCreateFixed");
1761 if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f)) 1761 if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f))
1762 { 1762 {
1763 // keep track of where we stopped. No more slippin' & slidin' 1763 // keep track of where we stopped. No more slippin' & slidin'
1764 1764
1765 // We only want to deactivate the PID Controller if we think we want to have our surrogate 1765 // We only want to deactivate the PID Controller if we think we want to have our surrogate
1766 // react to the physics scene by moving it's position. 1766 // react to the physics scene by moving it's position.
1767 // Avatar to Avatar collisions 1767 // Avatar to Avatar collisions
@@ -1782,7 +1782,7 @@ Console.WriteLine(" JointCreateFixed");
1782 // We're flying and colliding with something 1782 // We're flying and colliding with something
1783 fx = ((_target_velocity.X) - vel.X) * (PID_D); 1783 fx = ((_target_velocity.X) - vel.X) * (PID_D);
1784 fy = ((_target_velocity.Y) - vel.Y) * (PID_D); 1784 fy = ((_target_velocity.Y) - vel.Y) * (PID_D);
1785 1785
1786 // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; 1786 // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P;
1787 1787
1788 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); 1788 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass);
@@ -1793,7 +1793,7 @@ Console.WriteLine(" JointCreateFixed");
1793 if (m_useHoverPID && !PIDActive) 1793 if (m_useHoverPID && !PIDActive)
1794 { 1794 {
1795//Console.WriteLine("Hover " + Name); 1795//Console.WriteLine("Hover " + Name);
1796 1796
1797 // If we're using the PID controller, then we have no gravity 1797 // If we're using the PID controller, then we have no gravity
1798 fz = (-1 * _parent_scene.gravityz) * m_mass; 1798 fz = (-1 * _parent_scene.gravityz) * m_mass;
1799 1799
@@ -1850,7 +1850,7 @@ Console.WriteLine(" JointCreateFixed");
1850 if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f)) 1850 if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f))
1851 { 1851 {
1852 // keep track of where we stopped. No more slippin' & slidin' 1852 // keep track of where we stopped. No more slippin' & slidin'
1853 1853
1854 // We only want to deactivate the PID Controller if we think we want to have our surrogate 1854 // We only want to deactivate the PID Controller if we think we want to have our surrogate
1855 // react to the physics scene by moving it's position. 1855 // react to the physics scene by moving it's position.
1856 // Avatar to Avatar collisions 1856 // Avatar to Avatar collisions
@@ -1888,7 +1888,7 @@ Console.WriteLine(" JointCreateFixed");
1888 { 1888 {
1889 // A physical body at rest on a surface will auto-disable after a while, 1889 // A physical body at rest on a surface will auto-disable after a while,
1890 // this appears to re-enable it incase the surface it is upon vanishes, 1890 // this appears to re-enable it incase the surface it is upon vanishes,
1891 // and the body should fall again. 1891 // and the body should fall again.
1892 d.BodySetLinearVel(Body, 0f, 0f, 0f); 1892 d.BodySetLinearVel(Body, 0f, 0f, 0f);
1893 d.BodySetForce(Body, 0, 0, 0); 1893 d.BodySetForce(Body, 0, 0, 0);
1894 enableBodySoft(); 1894 enableBodySoft();
@@ -1897,7 +1897,7 @@ Console.WriteLine(" JointCreateFixed");
1897 // 35x10 = 350n times the mass per second applied maximum. 1897 // 35x10 = 350n times the mass per second applied maximum.
1898 float nmax = 35f * m_mass; 1898 float nmax = 35f * m_mass;
1899 float nmin = -35f * m_mass; 1899 float nmin = -35f * m_mass;
1900 1900
1901 if (fx > nmax) 1901 if (fx > nmax)
1902 fx = nmax; 1902 fx = nmax;
1903 if (fx < nmin) 1903 if (fx < nmin)
@@ -1916,7 +1916,7 @@ Console.WriteLine(" JointCreateFixed");
1916 // _zeroPosition = d.BodyGetPosition(Body); 1916 // _zeroPosition = d.BodyGetPosition(Body);
1917 return; 1917 return;
1918//Console.WriteLine("Nothing " + Name); 1918//Console.WriteLine("Nothing " + Name);
1919 1919
1920 } 1920 }
1921 } 1921 }
1922 1922
@@ -1942,7 +1942,7 @@ Console.WriteLine(" JointCreateFixed");
1942 // daughter prim, do Geom set 1942 // daughter prim, do Geom set
1943 d.GeomSetQuaternion(prim_geom, ref myrot); 1943 d.GeomSetQuaternion(prim_geom, ref myrot);
1944 } 1944 }
1945 1945
1946 resetCollisionAccounting(); 1946 resetCollisionAccounting();
1947 m_taintrot = _orientation; 1947 m_taintrot = _orientation;
1948 } 1948 }
@@ -2080,7 +2080,7 @@ Console.WriteLine(" JointCreateFixed");
2080 else 2080 else
2081 m_assetFailed = false; 2081 m_assetFailed = false;
2082 } 2082 }
2083 2083
2084 } 2084 }
2085 2085
2086 CreateGeom(m_targetSpace, mesh); 2086 CreateGeom(m_targetSpace, mesh);
@@ -2312,7 +2312,7 @@ Console.WriteLine(" JointCreateFixed");
2312 } 2312 }
2313 d.BodyEnable(Body); 2313 d.BodyEnable(Body);
2314 d.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z); 2314 d.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z);
2315 2315
2316 } 2316 }
2317 m_angularforcelist.Clear(); 2317 m_angularforcelist.Clear();
2318 } 2318 }
@@ -2342,7 +2342,7 @@ Console.WriteLine(" JointCreateFixed");
2342 d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); 2342 d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z);
2343 } 2343 }
2344 } 2344 }
2345 2345
2346 //resetCollisionAccounting(); 2346 //resetCollisionAccounting();
2347 } 2347 }
2348 2348
@@ -2686,7 +2686,7 @@ Console.WriteLine(" JointCreateFixed");
2686 2686
2687 if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 2687 if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
2688 m_vehicle.Stop(); // this also updates vehicle last position from the body position 2688 m_vehicle.Stop(); // this also updates vehicle last position from the body position
2689 2689
2690 enableBodySoft(); 2690 enableBodySoft();
2691 2691
2692 outofBounds = false; 2692 outofBounds = false;
@@ -2899,12 +2899,12 @@ Console.WriteLine(" JointCreateFixed");
2899 _acceleration = ((_velocity - m_lastVelocity) / 0.1f); 2899 _acceleration = ((_velocity - m_lastVelocity) / 0.1f);
2900 _acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f); 2900 _acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f);
2901 //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString()); 2901 //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString());
2902 2902
2903 // Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing... 2903 // Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing...
2904 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large. 2904 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
2905 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles 2905 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles
2906 // adding these logical exclusion situations to maintain this where I think it was intended to be. 2906 // adding these logical exclusion situations to maintain this where I think it was intended to be.
2907 if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero)) 2907 if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
2908 { 2908 {
2909 m_minvelocity = 0.5f; 2909 m_minvelocity = 0.5f;
2910 } 2910 }
@@ -2973,8 +2973,8 @@ Console.WriteLine(" JointCreateFixed");
2973 { 2973 {
2974 } 2974 }
2975 2975
2976 public override Vector3 PIDTarget 2976 public override Vector3 PIDTarget
2977 { 2977 {
2978 set 2978 set
2979 { 2979 {
2980 if (value.IsFinite()) 2980 if (value.IsFinite())
@@ -2983,7 +2983,7 @@ Console.WriteLine(" JointCreateFixed");
2983 } 2983 }
2984 else 2984 else
2985 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name); 2985 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name);
2986 } 2986 }
2987 } 2987 }
2988 2988
2989 public override bool PIDActive { get; set; } 2989 public override bool PIDActive { get; set; }
@@ -2993,7 +2993,7 @@ Console.WriteLine(" JointCreateFixed");
2993 public override bool PIDHoverActive { get { return m_useHoverPID;} set { m_useHoverPID = value; } } 2993 public override bool PIDHoverActive { get { return m_useHoverPID;} set { m_useHoverPID = value; } }
2994 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } 2994 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } }
2995 public override float PIDHoverTau { set { m_PIDHoverTau = value; } } 2995 public override float PIDHoverTau { set { m_PIDHoverTau = value; } }
2996 2996
2997 public override Quaternion APIDTarget{ set { return; } } 2997 public override Quaternion APIDTarget{ set { return; } }
2998 2998
2999 public override bool APIDActive{ set { return; } } 2999 public override bool APIDActive{ set { return; } }
@@ -3189,7 +3189,7 @@ Console.WriteLine(" JointCreateFixed");
3189// m_assetFailed = false; 3189// m_assetFailed = false;
3190 3190
3191// m_log.DebugFormat( 3191// m_log.DebugFormat(
3192// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}", 3192// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}",
3193// _pbs.SculptTexture, _pbs.SculptData.Length, Name, _position, _parent_scene.Name); 3193// _pbs.SculptTexture, _pbs.SculptData.Length, Name, _position, _parent_scene.Name);
3194 3194
3195 m_taintshape = true; 3195 m_taintshape = true;
@@ -3201,6 +3201,6 @@ Console.WriteLine(" JointCreateFixed");
3201 "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}", 3201 "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}",
3202 _pbs.SculptTexture, Name, _position, _parent_scene.PhysicsSceneName); 3202 _pbs.SculptTexture, Name, _position, _parent_scene.PhysicsSceneName);
3203 } 3203 }
3204 } 3204 }
3205 } 3205 }
3206} \ No newline at end of file 3206} \ No newline at end of file
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
index a21ec2b..78dd7de 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
75 { 75 {
76 m_scene = pScene; 76 m_scene = pScene;
77 nearCallback = near; 77 nearCallback = near;
78 78
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
@@ -136,7 +136,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
136 ODERayCastRequest[] reqs = m_PendingRequests.ToArray(); 136 ODERayCastRequest[] reqs = m_PendingRequests.ToArray();
137 for (int i = 0; i < reqs.Length; i++) 137 for (int i = 0; i < reqs.Length; i++)
138 { 138 {
139 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast 139 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
140 RayCast(reqs[i]); // if there isn't anyone to send results 140 RayCast(reqs[i]); // if there isn't anyone to send results
141 } 141 }
142 142
@@ -151,7 +151,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
151 ODERayRequest[] reqs = m_PendingRayRequests.ToArray(); 151 ODERayRequest[] reqs = m_PendingRayRequests.ToArray();
152 for (int i = 0; i < reqs.Length; i++) 152 for (int i = 0; i < reqs.Length; i++)
153 { 153 {
154 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast 154 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
155 RayCast(reqs[i]); // if there isn't anyone to send results 155 RayCast(reqs[i]); // if there isn't anyone to send results
156 } 156 }
157 157
@@ -247,7 +247,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
247 req.callbackMethod(m_contactResults); 247 req.callbackMethod(m_contactResults);
248 } 248 }
249 } 249 }
250 250
251 // This is the standard Near. Uses space AABBs to speed up detection. 251 // This is the standard Near. Uses space AABBs to speed up detection.
252 private void near(IntPtr space, IntPtr g1, IntPtr g2) 252 private void near(IntPtr space, IntPtr g1, IntPtr g2)
253 { 253 {
@@ -262,7 +262,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
262 { 262 {
263 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) 263 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero)
264 return; 264 return;
265 265
266 // Separating static prim geometry spaces. 266 // Separating static prim geometry spaces.
267 // We'll be calling near recursivly if one 267 // We'll be calling near recursivly if one
268 // of them is a space to find all of the 268 // of them is a space to find all of the
@@ -290,7 +290,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
290 int count = 0; 290 int count = 0;
291 try 291 try
292 { 292 {
293 293
294 if (g1 == g2) 294 if (g1 == g2)
295 return; // Can't collide with yourself 295 return; // Can't collide with yourself
296 296
@@ -326,7 +326,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
326 if (p1 is OdePrim) 326 if (p1 is OdePrim)
327 { 327 {
328 ContactResult collisionresult = new ContactResult(); 328 ContactResult collisionresult = new ContactResult();
329 329
330 collisionresult.ConsumerID = p1.LocalID; 330 collisionresult.ConsumerID = p1.LocalID;
331 collisionresult.Pos = new Vector3(contacts[i].pos.X, contacts[i].pos.Y, contacts[i].pos.Z); 331 collisionresult.Pos = new Vector3(contacts[i].pos.X, contacts[i].pos.Y, contacts[i].pos.Z);
332 collisionresult.Depth = contacts[i].depth; 332 collisionresult.Depth = contacts[i].depth;
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
index ed2aad4..d15568e 100644
--- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
126 /// </remarks> 126 /// </remarks>
127 internal static Object UniversalColliderSyncObject = new Object(); 127 internal static Object UniversalColliderSyncObject = new Object();
128 internal static Object SimulationLock = new Object(); 128 internal static Object SimulationLock = new Object();
129 129
130 /// <summary> 130 /// <summary>
131 /// Is stats collecting enabled for this ODE scene? 131 /// Is stats collecting enabled for this ODE scene?
132 /// </summary> 132 /// </summary>
@@ -495,14 +495,14 @@ namespace OpenSim.Region.PhysicsModule.ODE
495 int spaceGridMaxY; 495 int spaceGridMaxY;
496 496
497 private ODERayCastRequestManager m_rayCastManager; 497 private ODERayCastRequestManager m_rayCastManager;
498 498
499 public Scene m_frameWorkScene = null; 499 public Scene m_frameWorkScene = null;
500 500
501 public OdeScene(Scene pscene, IConfigSource psourceconfig, string pname, string pversion) 501 public OdeScene(Scene pscene, IConfigSource psourceconfig, string pname, string pversion)
502 { 502 {
503 m_config = psourceconfig; 503 m_config = psourceconfig;
504 m_frameWorkScene = pscene; 504 m_frameWorkScene = pscene;
505 505
506 EngineType = pname; 506 EngineType = pname;
507 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName; 507 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
508 EngineName = pname + " " + pversion; 508 EngineName = pname + " " + pversion;
@@ -513,8 +513,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
513 InitialiseFromConfig(m_config); 513 InitialiseFromConfig(m_config);
514 514
515 // This may not be that good since terrain may not be avaiable at this point 515 // This may not be that good since terrain may not be avaiable at this point
516 base.Initialise(pscene.PhysicsRequestAsset, 516 base.Initialise(pscene.PhysicsRequestAsset,
517 (pscene.Heightmap != null ? pscene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]), 517 (pscene.Heightmap != null ? pscene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]),
518 (float)pscene.RegionInfo.RegionSettings.WaterHeight); 518 (float)pscene.RegionInfo.RegionSettings.WaterHeight);
519 519
520 } 520 }
@@ -524,8 +524,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
524 mesher = m_frameWorkScene.RequestModuleInterface<IMesher>(); 524 mesher = m_frameWorkScene.RequestModuleInterface<IMesher>();
525 if (mesher == null) 525 if (mesher == null)
526 m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName); 526 m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName);
527 527
528 m_frameWorkScene.PhysicsEnabled = true; 528 m_frameWorkScene.PhysicsEnabled = true;
529 } 529 }
530 530
531 /// <summary> 531 /// <summary>
@@ -535,11 +535,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
535 /// </summary> 535 /// </summary>
536 private void Initialise(Vector3 regionExtent) 536 private void Initialise(Vector3 regionExtent)
537 { 537 {
538 WorldExtents.X = regionExtent.X; 538 WorldExtents.X = regionExtent.X;
539 m_regionWidth = (uint)regionExtent.X; 539 m_regionWidth = (uint)regionExtent.X;
540 WorldExtents.Y = regionExtent.Y; 540 WorldExtents.Y = regionExtent.Y;
541 m_regionHeight = (uint)regionExtent.Y; 541 m_regionHeight = (uint)regionExtent.Y;
542 542
543 nearCallback = near; 543 nearCallback = near;
544 m_rayCastManager = new ODERayCastRequestManager(this); 544 m_rayCastManager = new ODERayCastRequestManager(this);
545 545
@@ -671,7 +671,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
671 spacesPerMeterY = spaceGridMaxY / WorldExtents.Y; 671 spacesPerMeterY = spaceGridMaxY / WorldExtents.Y;
672 } 672 }
673 673
674 staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY]; 674 staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY];
675 675
676 // make this index limits 676 // make this index limits
677 spaceGridMaxX--; 677 spaceGridMaxX--;
@@ -948,7 +948,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
948 { 948 {
949 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) 949 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero)
950 return; 950 return;
951 951
952 // Separating static prim geometry spaces. 952 // Separating static prim geometry spaces.
953 // We'll be calling near recursivly if one 953 // We'll be calling near recursivly if one
954 // of them is a space to find all of the 954 // of them is a space to find all of the
@@ -1027,10 +1027,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1027 1027
1028 PhysicsActor p1; 1028 PhysicsActor p1;
1029 PhysicsActor p2; 1029 PhysicsActor p2;
1030 1030
1031 p1ExpectedPoints = 0; 1031 p1ExpectedPoints = 0;
1032 p2ExpectedPoints = 0; 1032 p2ExpectedPoints = 0;
1033 1033
1034 if (!actor_name_map.TryGetValue(g1, out p1)) 1034 if (!actor_name_map.TryGetValue(g1, out p1))
1035 { 1035 {
1036 p1 = PANull; 1036 p1 = PANull;
@@ -1067,7 +1067,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1067 IntPtr joint; 1067 IntPtr joint;
1068 // If we're colliding with terrain, use 'TerrainContact' instead of contact. 1068 // If we're colliding with terrain, use 'TerrainContact' instead of contact.
1069 // allows us to have different settings 1069 // allows us to have different settings
1070 1070
1071 // We only need to test p2 for 'jump crouch purposes' 1071 // We only need to test p2 for 'jump crouch purposes'
1072 if (p2 is OdeCharacter && p1.PhysicsActorType == (int)ActorTypes.Prim) 1072 if (p2 is OdeCharacter && p1.PhysicsActorType == (int)ActorTypes.Prim)
1073 { 1073 {
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1081 { 1081 {
1082 p2.IsColliding = true; 1082 p2.IsColliding = true;
1083 } 1083 }
1084 1084
1085 //if ((framecount % m_returncollisions) == 0) 1085 //if ((framecount % m_returncollisions) == 0)
1086 1086
1087 switch (p1.PhysicsActorType) 1087 switch (p1.PhysicsActorType)
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1160 1160
1161 // Logic for collision handling 1161 // Logic for collision handling
1162 // Note, that if *all* contacts are skipped (VolumeDetect) 1162 // Note, that if *all* contacts are skipped (VolumeDetect)
1163 // The prim still detects (and forwards) collision events but 1163 // The prim still detects (and forwards) collision events but
1164 // appears to be phantom for the world 1164 // appears to be phantom for the world
1165 Boolean skipThisContact = false; 1165 Boolean skipThisContact = false;
1166 1166
@@ -1235,10 +1235,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1235 material = ((OdePrim) p2).m_material; 1235 material = ((OdePrim) p2).m_material;
1236 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts; 1236 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts;
1237 } 1237 }
1238 1238
1239 // Unnessesary because p1 is defined above 1239 // Unnessesary because p1 is defined above
1240 //if (p1 is OdePrim) 1240 //if (p1 is OdePrim)
1241 // { 1241 // {
1242 // p1ExpectedPoints = ((OdePrim)p1).ExpectedCollisionContacts; 1242 // p1ExpectedPoints = ((OdePrim)p1).ExpectedCollisionContacts;
1243 // } 1243 // }
1244 //m_log.DebugFormat("Material: {0}", material); 1244 //m_log.DebugFormat("Material: {0}", material);
@@ -1350,7 +1350,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1350 material = ((OdePrim)p2).m_material; 1350 material = ((OdePrim)p2).m_material;
1351 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts; 1351 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts;
1352 } 1352 }
1353 1353
1354 //m_log.DebugFormat("Material: {0}", material); 1354 //m_log.DebugFormat("Material: {0}", material);
1355 m_materialContacts[material, 0].geom = curContact; 1355 m_materialContacts[material, 0].geom = curContact;
1356 1356
@@ -1370,7 +1370,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1370 } 1370 }
1371 1371
1372 collision_accounting_events(p1, p2, maxDepthContact); 1372 collision_accounting_events(p1, p2, maxDepthContact);
1373 1373
1374 if (count > ((p1ExpectedPoints + p2ExpectedPoints) * 0.25) + (geomContactPointsStartthrottle)) 1374 if (count > ((p1ExpectedPoints + p2ExpectedPoints) * 0.25) + (geomContactPointsStartthrottle))
1375 { 1375 {
1376 // If there are more then 3 contact points, it's likely 1376 // If there are more then 3 contact points, it's likely
@@ -1410,7 +1410,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1410 break; 1410 break;
1411 } 1411 }
1412 } 1412 }
1413 } 1413 }
1414 else if (at == ActorTypes.Prim) 1414 else if (at == ActorTypes.Prim)
1415 { 1415 {
1416 if (((Math.Abs(contactGeom.normal.X - contact.normal.X) < 1.026f) && (Math.Abs(contactGeom.normal.Y - contact.normal.Y) < 0.303f) && (Math.Abs(contactGeom.normal.Z - contact.normal.Z) < 0.065f))) 1416 if (((Math.Abs(contactGeom.normal.X - contact.normal.X) < 1.026f) && (Math.Abs(contactGeom.normal.Y - contact.normal.Y) < 0.303f) && (Math.Abs(contactGeom.normal.Z - contact.normal.Z) < 0.065f)))
@@ -1544,11 +1544,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
1544 // since we don't know if we're colliding yet 1544 // since we don't know if we're colliding yet
1545 if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero) 1545 if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero)
1546 continue; 1546 continue;
1547 1547
1548 chr.IsColliding = false; 1548 chr.IsColliding = false;
1549 chr.CollidingGround = false; 1549 chr.CollidingGround = false;
1550 chr.CollidingObj = false; 1550 chr.CollidingObj = false;
1551 1551
1552 // Test the avatar's geometry for collision with the space 1552 // Test the avatar's geometry for collision with the space
1553 // This will return near and the space that they are the closest to 1553 // This will return near and the space that they are the closest to
1554 // And we'll run this again against the avatar and the space segment 1554 // And we'll run this again against the avatar and the space segment
@@ -1562,7 +1562,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1562 { 1562 {
1563 m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", PhysicsSceneName); 1563 m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", PhysicsSceneName);
1564 } 1564 }
1565 1565
1566 //float terrainheight = GetTerrainHeightAtXY(chr.Position.X, chr.Position.Y); 1566 //float terrainheight = GetTerrainHeightAtXY(chr.Position.X, chr.Position.Y);
1567 //if (chr.Position.Z + (chr.Velocity.Z * timeStep) < terrainheight + 10) 1567 //if (chr.Position.Z + (chr.Velocity.Z * timeStep) < terrainheight + 10)
1568 //{ 1568 //{
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1655 //m_log.DebugFormat("x{0} y{1} = {2}", x, y, (float)TerrainHeightFieldHeights[heightFieldGeom][index]); 1655 //m_log.DebugFormat("x{0} y{1} = {2}", x, y, (float)TerrainHeightFieldHeights[heightFieldGeom][index]);
1656 return (float)TerrainHeightFieldHeights[heightFieldGeom][index]; 1656 return (float)TerrainHeightFieldHeights[heightFieldGeom][index];
1657 } 1657 }
1658 1658
1659 else 1659 else
1660 return 0f; 1660 return 0f;
1661 } 1661 }
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1675 { 1675 {
1676 return 0f; 1676 return 0f;
1677 } 1677 }
1678 } 1678 }
1679// End recovered. Kitto Flora 1679// End recovered. Kitto Flora
1680 1680
1681 /// <summary> 1681 /// <summary>
@@ -1685,7 +1685,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1685 internal void AddCollisionEventReporting(PhysicsActor obj) 1685 internal void AddCollisionEventReporting(PhysicsActor obj)
1686 { 1686 {
1687// m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID); 1687// m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID);
1688 1688
1689 lock (m_collisionEventActorsChanges) 1689 lock (m_collisionEventActorsChanges)
1690 m_collisionEventActorsChanges[obj.LocalID] = obj; 1690 m_collisionEventActorsChanges[obj.LocalID] = obj;
1691 } 1691 }
@@ -2071,7 +2071,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2071 2071
2072 lock (externalJointRequestsLock) 2072 lock (externalJointRequestsLock)
2073 { 2073 {
2074 if (!requestedJointsToBeCreated.Contains(joint)) // forbid same creation request from entering twice 2074 if (!requestedJointsToBeCreated.Contains(joint)) // forbid same creation request from entering twice
2075 { 2075 {
2076 requestedJointsToBeCreated.Add(joint); 2076 requestedJointsToBeCreated.Add(joint);
2077 } 2077 }
@@ -2417,7 +2417,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2417// waitForSpaceUnlock(space); 2417// waitForSpaceUnlock(space);
2418 d.SpaceSetSublevel(space, 1); 2418 d.SpaceSetSublevel(space, 1);
2419 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); 2419 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
2420 2420
2421 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; 2421 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
2422 } 2422 }
2423 2423
@@ -2514,7 +2514,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2514 iPropertiesNotSupportedDefault++; 2514 iPropertiesNotSupportedDefault++;
2515 2515
2516 if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0)) 2516 if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0))
2517 iPropertiesNotSupportedDefault++; 2517 iPropertiesNotSupportedDefault++;
2518 2518
2519 if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0) 2519 if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0)
2520 iPropertiesNotSupportedDefault++; 2520 iPropertiesNotSupportedDefault++;
@@ -2587,7 +2587,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2587#if SPAM 2587#if SPAM
2588 m_log.Debug("Mesh"); 2588 m_log.Debug("Mesh");
2589#endif 2589#endif
2590 return true; 2590 return true;
2591 } 2591 }
2592 2592
2593 /// <summary> 2593 /// <summary>
@@ -2652,7 +2652,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2652 } 2652 }
2653 _taintedPrims.Clear(); 2653 _taintedPrims.Clear();
2654 } 2654 }
2655 2655
2656 int time = Util.EnvironmentTickCountSubtract(tstart); 2656 int time = Util.EnvironmentTickCountSubtract(tstart);
2657 m_log.InfoFormat("[Ode] finished {0} operations in {1}ms", donechanges, time); 2657 m_log.InfoFormat("[Ode] finished {0} operations in {1}ms", donechanges, time);
2658 } 2658 }
@@ -2716,7 +2716,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2716 CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks 2716 CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
2717 } 2717 }
2718 2718
2719 2719
2720 lock (OdeLock) 2720 lock (OdeLock)
2721 { 2721 {
2722 d.AllocateODEDataForThread(~0U); 2722 d.AllocateODEDataForThread(~0U);
@@ -3109,7 +3109,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
3109 // as the axis for the hinge. 3109 // as the axis for the hinge.
3110 3110
3111 // Therefore, we must get the joint's coordinate frame based on the 3111 // Therefore, we must get the joint's coordinate frame based on the
3112 // joint.Rotation field, which originates from the orientation of the 3112 // joint.Rotation field, which originates from the orientation of the
3113 // joint's proxy object in the scene. 3113 // joint's proxy object in the scene.
3114 3114
3115 // The joint's coordinate frame is defined as the transformation matrix 3115 // The joint's coordinate frame is defined as the transformation matrix
@@ -3237,7 +3237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
3237 int startTime = Util.EnvironmentTickCount(); 3237 int startTime = Util.EnvironmentTickCount();
3238 m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset); 3238 m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset);
3239 3239
3240 3240
3241 float[] _heightmap; 3241 float[] _heightmap;
3242 3242
3243 // ok im lasy this are just a aliases 3243 // ok im lasy this are just a aliases
diff --git a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs
index 28d2b53..341530e 100644
--- a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs
@@ -273,10 +273,10 @@ namespace OpenSim.Region.PhysicsModule.POS
273 set { return; } 273 set { return; }
274 } 274 }
275 275
276 public override bool PIDActive 276 public override bool PIDActive
277 { 277 {
278 get { return false; } 278 get { return false; }
279 set { return; } 279 set { return; }
280 } 280 }
281 281
282 public override float PIDTau 282 public override float PIDTau
@@ -304,7 +304,7 @@ namespace OpenSim.Region.PhysicsModule.POS
304 { 304 {
305 set { return; } 305 set { return; }
306 } 306 }
307 307
308 public override Quaternion APIDTarget 308 public override Quaternion APIDTarget
309 { 309 {
310 set { return; } 310 set { return; }
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
index 88169bb..1a8409e 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
48 // Values for level of detail to be passed to the mesher. 48 // Values for level of detail to be passed to the mesher.
49 // Values origionally chosen for the LOD of sculpties (the sqrt(width*heigth) of sculpt texture) 49 // Values origionally chosen for the LOD of sculpties (the sqrt(width*heigth) of sculpt texture)
50 // Lower level of detail reduces the number of vertices used to represent the meshed shape. 50 // Lower level of detail reduces the number of vertices used to represent the meshed shape.
51 public enum LevelOfDetail 51 public enum LevelOfDetail
52 { 52 {
53 High = 32, 53 High = 32,
54 Medium = 16, 54 Medium = 16,
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
index 432708c..8079e79 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
37 class NullPhysicsScene : PhysicsScene 37 class NullPhysicsScene : PhysicsScene
38 { 38 {
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 private static int m_workIndicator; 41 private static int m_workIndicator;
42 42
43 public override PhysicsActor AddAvatar( 43 public override PhysicsActor AddAvatar(
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
index 250b155..33f0337 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
@@ -134,8 +134,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
134 m_objCollisionList.Add(localID, contact); 134 m_objCollisionList.Add(localID, contact);
135 } 135 }
136 else 136 else
137 { 137 {
138 float lastVel = m_objCollisionList[localID].RelativeSpeed; 138 float lastVel = m_objCollisionList[localID].RelativeSpeed;
139 if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth) 139 if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth)
140 { 140 {
141 if(Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed)) 141 if(Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed))
@@ -201,7 +201,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
201 { 201 {
202 get { return new NullPhysicsActor(); } 202 get { return new NullPhysicsActor(); }
203 } 203 }
204 204
205 public virtual bool Building { get; set; } 205 public virtual bool Building { get; set; }
206 206
207 public virtual void getContactData(ref ContactData cdata) 207 public virtual void getContactData(ref ContactData cdata)
@@ -263,7 +263,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
263 public abstract void delink(); 263 public abstract void delink();
264 264
265 public abstract void LockAngularMotion(byte axislocks); 265 public abstract void LockAngularMotion(byte axislocks);
266 266
267 public virtual void RequestPhysicsterseUpdate() 267 public virtual void RequestPhysicsterseUpdate()
268 { 268 {
269 // Make a temporary copy of the event to avoid possibility of 269 // Make a temporary copy of the event to avoid possibility of
@@ -326,7 +326,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
326 public abstract void VehicleFlags(int param, bool remove); 326 public abstract void VehicleFlags(int param, bool remove);
327 327
328 // This is an overridable version of SetVehicle() that works for all physics engines. 328 // This is an overridable version of SetVehicle() that works for all physics engines.
329 // This is VERY inefficient. It behoves any physics engine to override this and 329 // This is VERY inefficient. It behoves any physics engine to override this and
330 // implement a more efficient setting of all the vehicle parameters. 330 // implement a more efficient setting of all the vehicle parameters.
331 public virtual void SetVehicle(object pvdata) 331 public virtual void SetVehicle(object pvdata)
332 { 332 {
@@ -453,7 +453,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
453 public abstract bool APIDActive { set;} 453 public abstract bool APIDActive { set;}
454 public abstract float APIDStrength { set;} 454 public abstract float APIDStrength { set;}
455 public abstract float APIDDamping { set;} 455 public abstract float APIDDamping { set;}
456 456
457 public abstract void AddForce(Vector3 force, bool pushforce); 457 public abstract void AddForce(Vector3 force, bool pushforce);
458 public abstract void AddAngularForce(Vector3 force, bool pushforce); 458 public abstract void AddAngularForce(Vector3 force, bool pushforce);
459 public abstract void SetMomentum(Vector3 momentum); 459 public abstract void SetMomentum(Vector3 momentum);
@@ -465,7 +465,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
465 465
466 // Warning in a parent part it returns itself, not null 466 // Warning in a parent part it returns itself, not null
467 public virtual PhysicsActor ParentActor { get { return this; } } 467 public virtual PhysicsActor ParentActor { get { return this; } }
468 468
469 469
470 // Extendable interface for new, physics engine specific operations 470 // Extendable interface for new, physics engine specific operations
471 public virtual object Extension(string pFunct, params object[] pParams) 471 public virtual object Extension(string pFunct, params object[] pParams)
@@ -629,7 +629,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
629 public override int PhysicsActorType 629 public override int PhysicsActorType
630 { 630 {
631 get { return (int)m_actorType; } 631 get { return (int)m_actorType; }
632 set { 632 set {
633 ActorTypes type = (ActorTypes)value; 633 ActorTypes type = (ActorTypes)value;
634 switch (type) 634 switch (type)
635 { 635 {
@@ -664,10 +664,10 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
664 664
665 public override Vector3 PIDTarget { set { return; } } 665 public override Vector3 PIDTarget { set { return; } }
666 666
667 public override bool PIDActive 667 public override bool PIDActive
668 { 668 {
669 get { return false; } 669 get { return false; }
670 set { return; } 670 set { return; }
671 } 671 }
672 672
673 public override float PIDTau { set { return; } } 673 public override float PIDTau { set { return; } }
@@ -676,12 +676,12 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
676 public override bool PIDHoverActive {get {return false;} set { return; } } 676 public override bool PIDHoverActive {get {return false;} set { return; } }
677 public override PIDHoverType PIDHoverType { set { return; } } 677 public override PIDHoverType PIDHoverType { set { return; } }
678 public override float PIDHoverTau { set { return; } } 678 public override float PIDHoverTau { set { return; } }
679 679
680 public override Quaternion APIDTarget { set { return; } } 680 public override Quaternion APIDTarget { set { return; } }
681 public override bool APIDActive { set { return; } } 681 public override bool APIDActive { set { return; } }
682 public override float APIDStrength { set { return; } } 682 public override float APIDStrength { set { return; } }
683 public override float APIDDamping { set { return; } } 683 public override float APIDDamping { set { return; } }
684 684
685 public override void SetMomentum(Vector3 momentum) { } 685 public override void SetMomentum(Vector3 momentum) { }
686 686
687 public override void SubscribeEvents(int ms) { } 687 public override void SubscribeEvents(int ms) { }
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
index aa51c4e..e8d6334 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
@@ -179,7 +179,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
179 public virtual PhysicsActor AddAvatar( 179 public virtual PhysicsActor AddAvatar(
180 uint localID, string avName, Vector3 position, Vector3 size, bool isFlying) 180 uint localID, string avName, Vector3 position, Vector3 size, bool isFlying)
181 { 181 {
182 PhysicsActor ret = AddAvatar(localID, avName, position, Vector3.Zero, size, isFlying); 182 PhysicsActor ret = AddAvatar(localID, avName, position, Vector3.Zero, size, isFlying);
183 return ret; 183 return ret;
184 } 184 }
185 185
@@ -217,7 +217,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
217 return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); 217 return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid);
218 } 218 }
219 219
220 220
221 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 221 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
222 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid) 222 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid)
223 { 223 {
@@ -335,16 +335,16 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
335 /// <summary> 335 /// <summary>
336 /// Queue a raycast against the physics scene. 336 /// Queue a raycast against the physics scene.
337 /// The provided callback method will be called when the raycast is complete 337 /// The provided callback method will be called when the raycast is complete
338 /// 338 ///
339 /// Many physics engines don't support collision testing at the same time as 339 /// Many physics engines don't support collision testing at the same time as
340 /// manipulating the physics scene, so we queue the request up and callback 340 /// manipulating the physics scene, so we queue the request up and callback
341 /// a custom method when the raycast is complete. 341 /// a custom method when the raycast is complete.
342 /// This allows physics engines that give an immediate result to callback immediately 342 /// This allows physics engines that give an immediate result to callback immediately
343 /// and ones that don't, to callback when it gets a result back. 343 /// and ones that don't, to callback when it gets a result back.
344 /// 344 ///
345 /// ODE for example will not allow you to change the scene while collision testing or 345 /// ODE for example will not allow you to change the scene while collision testing or
346 /// it asserts, 'opteration not valid for locked space'. This includes adding a ray to the scene. 346 /// it asserts, 'opteration not valid for locked space'. This includes adding a ray to the scene.
347 /// 347 ///
348 /// This is named RayCastWorld to not conflict with modrex's Raycast method. 348 /// This is named RayCastWorld to not conflict with modrex's Raycast method.
349 /// </summary> 349 /// </summary>
350 /// <param name="position">Origin of the ray</param> 350 /// <param name="position">Origin of the ray</param>
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs
index 76a82fa..5aae42f 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
49 public Vector3(Vector3 pv) : this(pv.X, pv.Y, pv.Z) 49 public Vector3(Vector3 pv) : this(pv.X, pv.Y, pv.Z)
50 { 50 {
51 } 51 }
52 52
53 public void setValues(float x, float y, float z) 53 public void setValues(float x, float y, float z)
54 { 54 {
55 X = x; 55 X = x;
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
index e850b11..0b4c8c6 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
38 TYPE_NONE = 0, 38 TYPE_NONE = 0,
39 39
40 /// <summary> 40 /// <summary>
41 /// No Angular motor, High Left right friction, No Hover, Linear Deflection 1, no angular deflection 41 /// No Angular motor, High Left right friction, No Hover, Linear Deflection 1, no angular deflection
42 /// no vertical attractor, No banking, Identity rotation frame 42 /// no vertical attractor, No banking, Identity rotation frame
43 /// </summary> 43 /// </summary>
44 TYPE_SLED = 1, 44 TYPE_SLED = 1,
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs
index daf3af1..35adf11 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs
@@ -34,8 +34,8 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 * 37 *
38 * changes by opensim team; 38 * changes by opensim team;
39 * changes by Aurora team http://www.aurora-sim.org/ 39 * changes by Aurora team http://www.aurora-sim.org/
40 * changes by Ubit Umarov 40 * changes by Ubit Umarov
41 */ 41 */
@@ -51,18 +51,18 @@ namespace OdeAPI
51// at least we save same memory and memory access time, FPU performance on intel usually is similar 51// at least we save same memory and memory access time, FPU performance on intel usually is similar
52// using dReal = System.Double; 52// using dReal = System.Double;
53//#else 53//#else
54 using dReal = System.Single; 54 using dReal = System.Single;
55//#endif 55//#endif
56 56
57 public static class d 57 public static class d
58 { 58 {
59 public static dReal Infinity = dReal.MaxValue; 59 public static dReal Infinity = dReal.MaxValue;
60 public static int NTotalBodies = 0; 60 public static int NTotalBodies = 0;
61 public static int NTotalGeoms = 0; 61 public static int NTotalGeoms = 0;
62 62
63 public const uint CONTACTS_UNIMPORTANT = 0x80000000; 63 public const uint CONTACTS_UNIMPORTANT = 0x80000000;
64 64
65 #region Flags and Enumerations 65 #region Flags and Enumerations
66 66
67 [Flags] 67 [Flags]
68 public enum AllocateODEDataFlags : uint 68 public enum AllocateODEDataFlags : uint
@@ -78,101 +78,101 @@ namespace OdeAPI
78 dInitFlagManualThreadCleanup = 0x00000001 78 dInitFlagManualThreadCleanup = 0x00000001
79 } 79 }
80 80
81 [Flags] 81 [Flags]
82 public enum ContactFlags : int 82 public enum ContactFlags : int
83 { 83 {
84 Mu2 = 0x001, 84 Mu2 = 0x001,
85 FDir1 = 0x002, 85 FDir1 = 0x002,
86 Bounce = 0x004, 86 Bounce = 0x004,
87 SoftERP = 0x008, 87 SoftERP = 0x008,
88 SoftCFM = 0x010, 88 SoftCFM = 0x010,
89 Motion1 = 0x020, 89 Motion1 = 0x020,
90 Motion2 = 0x040, 90 Motion2 = 0x040,
91 MotionN = 0x080, 91 MotionN = 0x080,
92 Slip1 = 0x100, 92 Slip1 = 0x100,
93 Slip2 = 0x200, 93 Slip2 = 0x200,
94 Approx0 = 0x0000, 94 Approx0 = 0x0000,
95 Approx1_1 = 0x1000, 95 Approx1_1 = 0x1000,
96 Approx1_2 = 0x2000, 96 Approx1_2 = 0x2000,
97 Approx1 = 0x3000 97 Approx1 = 0x3000
98 } 98 }
99 99
100 public enum GeomClassID : int 100 public enum GeomClassID : int
101 { 101 {
102 SphereClass, 102 SphereClass,
103 BoxClass, 103 BoxClass,
104 CapsuleClass, 104 CapsuleClass,
105 CylinderClass, 105 CylinderClass,
106 PlaneClass, 106 PlaneClass,
107 RayClass, 107 RayClass,
108 ConvexClass, 108 ConvexClass,
109 GeomTransformClass, 109 GeomTransformClass,
110 TriMeshClass, 110 TriMeshClass,
111 HeightfieldClass, 111 HeightfieldClass,
112 FirstSpaceClass, 112 FirstSpaceClass,
113 SimpleSpaceClass = FirstSpaceClass, 113 SimpleSpaceClass = FirstSpaceClass,
114 HashSpaceClass, 114 HashSpaceClass,
115 QuadTreeSpaceClass, 115 QuadTreeSpaceClass,
116 LastSpaceClass = QuadTreeSpaceClass, 116 LastSpaceClass = QuadTreeSpaceClass,
117 ubtTerrainClass, 117 ubtTerrainClass,
118 FirstUserClass, 118 FirstUserClass,
119 LastUserClass = FirstUserClass + MaxUserClasses - 1, 119 LastUserClass = FirstUserClass + MaxUserClasses - 1,
120 NumClasses, 120 NumClasses,
121 MaxUserClasses = 5 121 MaxUserClasses = 5
122 } 122 }
123 123
124 public enum JointType : int 124 public enum JointType : int
125 { 125 {
126 None, 126 None,
127 Ball, 127 Ball,
128 Hinge, 128 Hinge,
129 Slider, 129 Slider,
130 Contact, 130 Contact,
131 Universal, 131 Universal,
132 Hinge2, 132 Hinge2,
133 Fixed, 133 Fixed,
134 Null, 134 Null,
135 AMotor, 135 AMotor,
136 LMotor, 136 LMotor,
137 Plane2D 137 Plane2D
138 } 138 }
139 139
140 public enum JointParam : int 140 public enum JointParam : int
141 { 141 {
142 LoStop, 142 LoStop,
143 HiStop, 143 HiStop,
144 Vel, 144 Vel,
145 FMax, 145 FMax,
146 FudgeFactor, 146 FudgeFactor,
147 Bounce, 147 Bounce,
148 CFM, 148 CFM,
149 StopERP, 149 StopERP,
150 StopCFM, 150 StopCFM,
151 SuspensionERP, 151 SuspensionERP,
152 SuspensionCFM, 152 SuspensionCFM,
153 LoStop2 = 256, 153 LoStop2 = 256,
154 HiStop2, 154 HiStop2,
155 Vel2, 155 Vel2,
156 FMax2, 156 FMax2,
157 FudgeFactor2, 157 FudgeFactor2,
158 Bounce2, 158 Bounce2,
159 CFM2, 159 CFM2,
160 StopERP2, 160 StopERP2,
161 StopCFM2, 161 StopCFM2,
162 SuspensionERP2, 162 SuspensionERP2,
163 SuspensionCFM2, 163 SuspensionCFM2,
164 LoStop3 = 512, 164 LoStop3 = 512,
165 HiStop3, 165 HiStop3,
166 Vel3, 166 Vel3,
167 FMax3, 167 FMax3,
168 FudgeFactor3, 168 FudgeFactor3,
169 Bounce3, 169 Bounce3,
170 CFM3, 170 CFM3,
171 StopERP3, 171 StopERP3,
172 StopCFM3, 172 StopCFM3,
173 SuspensionERP3, 173 SuspensionERP3,
174 SuspensionCFM3 174 SuspensionCFM3
175 } 175 }
176 176
177 public enum dSweepAndPruneAxis : int 177 public enum dSweepAndPruneAxis : int
178 { 178 {
@@ -184,24 +184,24 @@ namespace OdeAPI
184 ZYX = ((2)|(1<<2)|(0<<4)) 184 ZYX = ((2)|(1<<2)|(0<<4))
185 } 185 }
186 186
187 #endregion 187 #endregion
188 188
189 #region Callbacks 189 #region Callbacks
190 190
191 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 191 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
192 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); 192 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb);
193 193
194 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 194 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
195 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); 195 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip);
196 196
197 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 197 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
198 public delegate void GetAABBFn(IntPtr geom, out AABB aabb); 198 public delegate void GetAABBFn(IntPtr geom, out AABB aabb);
199 199
200 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 200 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
201 public delegate ColliderFn GetColliderFnFn(int num); 201 public delegate ColliderFn GetColliderFnFn(int num);
202 202
203 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 203 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
204 public delegate void GeomDtorFn(IntPtr o); 204 public delegate void GeomDtorFn(IntPtr o);
205 205
206 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 206 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
207 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); 207 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z);
@@ -209,230 +209,230 @@ namespace OdeAPI
209 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 209 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
210 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z); 210 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z);
211 211
212 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 212 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
213 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); 213 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2);
214 214
215 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 215 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
216 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); 216 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex);
217 217
218 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 218 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
219 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); 219 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount);
220 220
221 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 221 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
222 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); 222 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v);
223 223
224 #endregion 224 #endregion
225 225
226 #region Structs 226 #region Structs
227 227
228 [StructLayout(LayoutKind.Sequential)] 228 [StructLayout(LayoutKind.Sequential)]
229 public struct AABB 229 public struct AABB
230 { 230 {
231 public dReal MinX, MaxX; 231 public dReal MinX, MaxX;
232 public dReal MinY, MaxY; 232 public dReal MinY, MaxY;
233 public dReal MinZ, MaxZ; 233 public dReal MinZ, MaxZ;
234 } 234 }
235 235
236 236
237 [StructLayout(LayoutKind.Sequential)] 237 [StructLayout(LayoutKind.Sequential)]
238 public struct Contact 238 public struct Contact
239 { 239 {
240 public SurfaceParameters surface; 240 public SurfaceParameters surface;
241 public ContactGeom geom; 241 public ContactGeom geom;
242 public Vector3 fdir1; 242 public Vector3 fdir1;
243 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact)); 243 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact));
244 } 244 }
245 245
246 246
247 [StructLayout(LayoutKind.Sequential)] 247 [StructLayout(LayoutKind.Sequential)]
248 public struct ContactGeom 248 public struct ContactGeom
249 { 249 {
250 250
251 public Vector3 pos; 251 public Vector3 pos;
252 public Vector3 normal; 252 public Vector3 normal;
253 public dReal depth; 253 public dReal depth;
254 public IntPtr g1; 254 public IntPtr g1;
255 public IntPtr g2; 255 public IntPtr g2;
256 public int side1; 256 public int side1;
257 public int side2; 257 public int side2;
258 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom)); 258 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom));
259 } 259 }
260 260
261 [StructLayout(LayoutKind.Sequential)] 261 [StructLayout(LayoutKind.Sequential)]
262 public struct GeomClass 262 public struct GeomClass
263 { 263 {
264 public int bytes; 264 public int bytes;
265 public GetColliderFnFn collider; 265 public GetColliderFnFn collider;
266 public GetAABBFn aabb; 266 public GetAABBFn aabb;
267 public AABBTestFn aabb_test; 267 public AABBTestFn aabb_test;
268 public GeomDtorFn dtor; 268 public GeomDtorFn dtor;
269 } 269 }
270 270
271 271
272 [StructLayout(LayoutKind.Sequential)] 272 [StructLayout(LayoutKind.Sequential)]
273 public struct JointFeedback 273 public struct JointFeedback
274 { 274 {
275 public Vector3 f1; 275 public Vector3 f1;
276 public Vector3 t1; 276 public Vector3 t1;
277 public Vector3 f2; 277 public Vector3 f2;
278 public Vector3 t2; 278 public Vector3 t2;
279 } 279 }
280 280
281 281
282 [StructLayout(LayoutKind.Sequential)] 282 [StructLayout(LayoutKind.Sequential)]
283 public struct Mass 283 public struct Mass
284 { 284 {
285 public dReal mass; 285 public dReal mass;
286 public Vector4 c; 286 public Vector4 c;
287 public Matrix3 I; 287 public Matrix3 I;
288 } 288 }
289 289
290 290
291 [StructLayout(LayoutKind.Sequential)] 291 [StructLayout(LayoutKind.Sequential)]
292 public struct Matrix3 292 public struct Matrix3
293 { 293 {
294 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) 294 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22)
295 { 295 {
296 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; 296 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f;
297 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; 297 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f;
298 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; 298 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f;
299 } 299 }
300 public dReal M00, M10, M20; 300 public dReal M00, M10, M20;
301 private dReal _m30; 301 private dReal _m30;
302 public dReal M01, M11, M21; 302 public dReal M01, M11, M21;
303 private dReal _m31; 303 private dReal _m31;
304 public dReal M02, M12, M22; 304 public dReal M02, M12, M22;
305 private dReal _m32; 305 private dReal _m32;
306 } 306 }
307 307
308 [StructLayout(LayoutKind.Sequential)] 308 [StructLayout(LayoutKind.Sequential)]
309 public struct Matrix4 309 public struct Matrix4
310 { 310 {
311 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, 311 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30,
312 dReal m01, dReal m11, dReal m21, dReal m31, 312 dReal m01, dReal m11, dReal m21, dReal m31,
313 dReal m02, dReal m12, dReal m22, dReal m32, 313 dReal m02, dReal m12, dReal m22, dReal m32,
314 dReal m03, dReal m13, dReal m23, dReal m33) 314 dReal m03, dReal m13, dReal m23, dReal m33)
315 { 315 {
316 M00 = m00; M10 = m10; M20 = m20; M30 = m30; 316 M00 = m00; M10 = m10; M20 = m20; M30 = m30;
317 M01 = m01; M11 = m11; M21 = m21; M31 = m31; 317 M01 = m01; M11 = m11; M21 = m21; M31 = m31;
318 M02 = m02; M12 = m12; M22 = m22; M32 = m32; 318 M02 = m02; M12 = m12; M22 = m22; M32 = m32;
319 M03 = m03; M13 = m13; M23 = m23; M33 = m33; 319 M03 = m03; M13 = m13; M23 = m23; M33 = m33;
320 } 320 }
321 public dReal M00, M10, M20, M30; 321 public dReal M00, M10, M20, M30;
322 public dReal M01, M11, M21, M31; 322 public dReal M01, M11, M21, M31;
323 public dReal M02, M12, M22, M32; 323 public dReal M02, M12, M22, M32;
324 public dReal M03, M13, M23, M33; 324 public dReal M03, M13, M23, M33;
325 } 325 }
326 326
327 [StructLayout(LayoutKind.Sequential)] 327 [StructLayout(LayoutKind.Sequential)]
328 public struct Quaternion 328 public struct Quaternion
329 { 329 {
330 public dReal W, X, Y, Z; 330 public dReal W, X, Y, Z;
331 } 331 }
332 332
333 333
334 [StructLayout(LayoutKind.Sequential)] 334 [StructLayout(LayoutKind.Sequential)]
335 public struct SurfaceParameters 335 public struct SurfaceParameters
336 { 336 {
337 public ContactFlags mode; 337 public ContactFlags mode;
338 public dReal mu; 338 public dReal mu;
339 public dReal mu2; 339 public dReal mu2;
340 public dReal bounce; 340 public dReal bounce;
341 public dReal bounce_vel; 341 public dReal bounce_vel;
342 public dReal soft_erp; 342 public dReal soft_erp;
343 public dReal soft_cfm; 343 public dReal soft_cfm;
344 public dReal motion1; 344 public dReal motion1;
345 public dReal motion2; 345 public dReal motion2;
346 public dReal motionN; 346 public dReal motionN;
347 public dReal slip1; 347 public dReal slip1;
348 public dReal slip2; 348 public dReal slip2;
349 } 349 }
350 350
351 351
352 [StructLayout(LayoutKind.Sequential)] 352 [StructLayout(LayoutKind.Sequential)]
353 public struct Vector3 353 public struct Vector3
354 { 354 {
355 public Vector3(dReal x, dReal y, dReal z) 355 public Vector3(dReal x, dReal y, dReal z)
356 { 356 {
357 X = x; Y = y; Z = z; _w = 0.0f; 357 X = x; Y = y; Z = z; _w = 0.0f;
358 } 358 }
359 public dReal X, Y, Z; 359 public dReal X, Y, Z;
360 private dReal _w; 360 private dReal _w;
361 } 361 }
362 362
363 363
364 [StructLayout(LayoutKind.Sequential)] 364 [StructLayout(LayoutKind.Sequential)]
365 public struct Vector4 365 public struct Vector4
366 { 366 {
367 public Vector4(dReal x, dReal y, dReal z, dReal w) 367 public Vector4(dReal x, dReal y, dReal z, dReal w)
368 { 368 {
369 X = x; Y = y; Z = z; W = w; 369 X = x; Y = y; Z = z; W = w;
370 } 370 }
371 public dReal X, Y, Z, W; 371 public dReal X, Y, Z, W;
372 } 372 }
373 373
374 #endregion 374 #endregion
375 375
376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] 376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity]
377 public static extern int AllocateODEDataForThread(uint ODEInitFlags); 377 public static extern int AllocateODEDataForThread(uint ODEInitFlags);
378 378
379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] 379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity]
380 public static extern bool AreConnected(IntPtr b1, IntPtr b2); 380 public static extern bool AreConnected(IntPtr b1, IntPtr b2);
381 381
382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] 382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity]
383 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); 383 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type);
384 384
385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] 385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity]
386 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); 386 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz);
387 387
388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] 388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity]
389 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 389 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
390 390
391 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] 391 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity]
392 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 392 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
393 393
394 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] 394 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity]
395 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); 395 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz);
396 396
397 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] 397 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity]
398 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 398 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
399 399
400 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] 400 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity]
401 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 401 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
402 402
403 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] 403 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity]
404 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 404 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
405 405
406 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] 406 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity]
407 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 407 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
408 408
409 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 409 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
410 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); 410 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos);
411 411
412 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 412 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
413 public static extern void BodyCopyPosition(IntPtr body, out dReal X); 413 public static extern void BodyCopyPosition(IntPtr body, out dReal X);
414 414
415 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 415 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
416 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); 416 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat);
417 417
418 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 418 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
419 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X); 419 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X);
420 420
421 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 421 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
422 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); 422 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R);
423 423
424 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 424 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
425 public static extern void BodyCopyRotation(IntPtr body, out dReal M00); 425 public static extern void BodyCopyRotation(IntPtr body, out dReal M00);
426 426
427 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] 427 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity]
428 public static extern IntPtr BodyiCreate(IntPtr world); 428 public static extern IntPtr BodyiCreate(IntPtr world);
429 public static IntPtr BodyCreate(IntPtr world) 429 public static IntPtr BodyCreate(IntPtr world)
430 { 430 {
431 NTotalBodies++; 431 NTotalBodies++;
432 return BodyiCreate(world); 432 return BodyiCreate(world);
433 } 433 }
434 434
435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] 435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity]
436 public static extern void BodyiDestroy(IntPtr body); 436 public static extern void BodyiDestroy(IntPtr body);
437 public static void BodyDestroy(IntPtr body) 437 public static void BodyDestroy(IntPtr body)
438 { 438 {
@@ -440,114 +440,114 @@ namespace OdeAPI
440 BodyiDestroy(body); 440 BodyiDestroy(body);
441 } 441 }
442 442
443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] 443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity]
444 public static extern void BodyDisable(IntPtr body); 444 public static extern void BodyDisable(IntPtr body);
445 445
446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] 446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity]
447 public static extern void BodyEnable(IntPtr body); 447 public static extern void BodyEnable(IntPtr body);
448 448
449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
450 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); 450 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body);
451 451
452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
453 public static extern bool BodyGetAutoDisableFlag(IntPtr body); 453 public static extern bool BodyGetAutoDisableFlag(IntPtr body);
454 454
455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
456 public static extern void BodyGetAutoDisableDefaults(IntPtr body); 456 public static extern void BodyGetAutoDisableDefaults(IntPtr body);
457 457
458 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 458 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
459 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); 459 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body);
460 460
461 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 461 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
462 public static extern int BodyGetAutoDisableSteps(IntPtr body); 462 public static extern int BodyGetAutoDisableSteps(IntPtr body);
463 463
464 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 464 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
465 public static extern dReal BodyGetAutoDisableTime(IntPtr body); 465 public static extern dReal BodyGetAutoDisableTime(IntPtr body);
466 466
467 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] 467 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity]
468 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); 468 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body);
469 public static Vector3 BodyGetAngularVel(IntPtr body) 469 public static Vector3 BodyGetAngularVel(IntPtr body)
470 { 470 {
471 unsafe { return *(BodyGetAngularVelUnsafe(body)); } 471 unsafe { return *(BodyGetAngularVelUnsafe(body)); }
472 } 472 }
473 473
474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] 474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity]
475 public static extern IntPtr BodyGetData(IntPtr body); 475 public static extern IntPtr BodyGetData(IntPtr body);
476 476
477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
478 public static extern int BodyGetFiniteRotationMode(IntPtr body); 478 public static extern int BodyGetFiniteRotationMode(IntPtr body);
479 479
480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
481 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); 481 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result);
482 482
483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] 483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity]
484 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); 484 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body);
485 public static Vector3 BodyGetForce(IntPtr body) 485 public static Vector3 BodyGetForce(IntPtr body)
486 { 486 {
487 unsafe { return *(BodyGetForceUnsafe(body)); } 487 unsafe { return *(BodyGetForceUnsafe(body)); }
488 } 488 }
489 489
490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] 490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity]
491 public static extern bool BodyGetGravityMode(IntPtr body); 491 public static extern bool BodyGetGravityMode(IntPtr body);
492 492
493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
494 public static extern int BodyGetGyroscopicMode(IntPtr body); 494 public static extern int BodyGetGyroscopicMode(IntPtr body);
495 495
496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] 496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity]
497 public static extern IntPtr BodyGetJoint(IntPtr body, int index); 497 public static extern IntPtr BodyGetJoint(IntPtr body, int index);
498 498
499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] 499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity]
500 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); 500 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body);
501 public static Vector3 BodyGetLinearVel(IntPtr body) 501 public static Vector3 BodyGetLinearVel(IntPtr body)
502 { 502 {
503 unsafe { return *(BodyGetLinearVelUnsafe(body)); } 503 unsafe { return *(BodyGetLinearVelUnsafe(body)); }
504 } 504 }
505 505
506 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] 506 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity]
507 public static extern void BodyGetMass(IntPtr body, out Mass mass); 507 public static extern void BodyGetMass(IntPtr body, out Mass mass);
508 508
509 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] 509 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity]
510 public static extern int BodyGetNumJoints(IntPtr body); 510 public static extern int BodyGetNumJoints(IntPtr body);
511 511
512 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] 512 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity]
513 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 513 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
514 514
515 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] 515 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity]
516 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); 516 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body);
517 public static Vector3 BodyGetPosition(IntPtr body) 517 public static Vector3 BodyGetPosition(IntPtr body)
518 { 518 {
519 unsafe { return *(BodyGetPositionUnsafe(body)); } 519 unsafe { return *(BodyGetPositionUnsafe(body)); }
520 } 520 }
521 521
522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] 522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity]
523 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 523 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
524 524
525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] 525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity]
526 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); 526 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body);
527 public static Quaternion BodyGetQuaternion(IntPtr body) 527 public static Quaternion BodyGetQuaternion(IntPtr body)
528 { 528 {
529 unsafe { return *(BodyGetQuaternionUnsafe(body)); } 529 unsafe { return *(BodyGetQuaternionUnsafe(body)); }
530 } 530 }
531 531
532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] 532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity]
533 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 533 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
534 534
535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] 535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity]
536 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 536 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
537 537
538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] 538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity]
539 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); 539 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body);
540 public static Matrix3 BodyGetRotation(IntPtr body) 540 public static Matrix3 BodyGetRotation(IntPtr body)
541 { 541 {
542 unsafe { return *(BodyGetRotationUnsafe(body)); } 542 unsafe { return *(BodyGetRotationUnsafe(body)); }
543 } 543 }
544 544
545 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] 545 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity]
546 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); 546 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body);
547 public static Vector3 BodyGetTorque(IntPtr body) 547 public static Vector3 BodyGetTorque(IntPtr body)
548 { 548 {
549 unsafe { return *(BodyGetTorqueUnsafe(body)); } 549 unsafe { return *(BodyGetTorqueUnsafe(body)); }
550 } 550 }
551 551
552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] 552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity]
553 public static extern IntPtr BodyGetWorld(IntPtr body); 553 public static extern IntPtr BodyGetWorld(IntPtr body);
@@ -559,38 +559,38 @@ namespace OdeAPI
559 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom); 559 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom);
560 560
561 561
562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] 562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity]
563 public static extern bool BodyIsEnabled(IntPtr body); 563 public static extern bool BodyIsEnabled(IntPtr body);
564 564
565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] 565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity]
566 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); 566 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z);
567 567
568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
569 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); 569 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold);
570 570
571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
572 public static extern void BodySetAutoDisableDefaults(IntPtr body); 572 public static extern void BodySetAutoDisableDefaults(IntPtr body);
573 573
574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
575 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); 575 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable);
576 576
577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
578 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); 578 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold);
579 579
580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
581 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps); 581 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps);
582 582
583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
584 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time); 584 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time);
585 585
586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] 586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity]
587 public static extern void BodySetData(IntPtr body, IntPtr data); 587 public static extern void BodySetData(IntPtr body, IntPtr data);
588 588
589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
590 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode); 590 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode);
591 591
592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
593 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); 593 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z);
594 594
595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] 595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity]
596 public static extern void BodySetLinearDamping(IntPtr body, dReal scale); 596 public static extern void BodySetLinearDamping(IntPtr body, dReal scale);
@@ -619,11 +619,11 @@ namespace OdeAPI
619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
620 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body); 620 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body);
621 621
622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] 622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity]
623 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); 623 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z);
624 624
625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] 625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity]
626 public static extern void BodySetGravityMode(IntPtr body, bool mode); 626 public static extern void BodySetGravityMode(IntPtr body, bool mode);
627 627
628 /// <summary> 628 /// <summary>
629 /// Sets the Gyroscopic term status on the body specified. 629 /// Sets the Gyroscopic term status on the body specified.
@@ -633,76 +633,76 @@ namespace OdeAPI
633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
634 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); 634 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled);
635 635
636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] 636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity]
637 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); 637 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z);
638 638
639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] 639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity]
640 public static extern void BodySetMass(IntPtr body, ref Mass mass); 640 public static extern void BodySetMass(IntPtr body, ref Mass mass);
641 641
642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] 642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity]
643 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); 643 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z);
644 644
645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
646 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); 646 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q);
647 647
648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
649 public static extern void BodySetQuaternion(IntPtr body, ref dReal w); 649 public static extern void BodySetQuaternion(IntPtr body, ref dReal w);
650 650
651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
652 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R); 652 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R);
653 653
654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
655 public static extern void BodySetRotation(IntPtr body, ref dReal M00); 655 public static extern void BodySetRotation(IntPtr body, ref dReal M00);
656 656
657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] 657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity]
658 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); 658 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z);
659 659
660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] 660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity]
661 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 661 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
662 662
663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] 663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity]
664 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 664 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
665 665
666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] 666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity]
667 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, 667 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1,
668 ref Vector3 side1, ref Vector3 p2, 668 ref Vector3 side1, ref Vector3 p2,
669 ref Matrix3 R2, ref Vector3 side2, 669 ref Matrix3 R2, ref Vector3 side2,
670 ref Vector3 normal, out dReal depth, out int return_code, 670 ref Vector3 normal, out dReal depth, out int return_code,
671 int maxc, out ContactGeom contact, int skip); 671 int maxc, out ContactGeom contact, int skip);
672 672
673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] 673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity]
674 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, 674 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1,
675 ref Vector3 side1, ref Vector3 _p2, 675 ref Vector3 side1, ref Vector3 _p2,
676 ref Matrix3 R2, ref Vector3 side2); 676 ref Matrix3 R2, ref Vector3 side2);
677 677
678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] 678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity]
679 public static extern void CleanupODEAllDataForThread(); 679 public static extern void CleanupODEAllDataForThread();
680 680
681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] 681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity]
682 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, 682 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2,
683 ref Vector3 b1, ref Vector3 b2, 683 ref Vector3 b1, ref Vector3 b2,
684 ref Vector3 cp1, ref Vector3 cp2); 684 ref Vector3 cp1, ref Vector3 cp2);
685 685
686 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] 686 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity]
687 public static extern void CloseODE(); 687 public static extern void CloseODE();
688 688
689 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 689 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
690 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); 690 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip);
691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
692 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip); 692 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip);
693 693
694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] 694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity]
695 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); 695 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2);
696 696
697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] 697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity]
698 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz); 698 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz);
699 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz) 699 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz)
700 { 700 {
701 NTotalGeoms++; 701 NTotalGeoms++;
702 return CreateiBox(space, lx, ly, lz); 702 return CreateiBox(space, lx, ly, lz);
703 } 703 }
704 704
705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] 705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity]
706 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length); 706 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length);
707 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length) 707 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length)
708 { 708 {
@@ -710,23 +710,23 @@ namespace OdeAPI
710 return CreateiCapsule(space, radius, length); 710 return CreateiCapsule(space, radius, length);
711 } 711 }
712 712
713 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] 713 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity]
714 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 714 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
715 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons) 715 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons)
716 { 716 {
717 NTotalGeoms++; 717 NTotalGeoms++;
718 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons); 718 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons);
719 } 719 }
720 720
721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] 721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity]
722 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length); 722 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length);
723 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length) 723 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length)
724 { 724 {
725 NTotalGeoms++; 725 NTotalGeoms++;
726 return CreateiCylinder(space, radius, length); 726 return CreateiCylinder(space, radius, length);
727 } 727 }
728 728
729 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] 729 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity]
730 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable); 730 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable);
731 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable) 731 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable)
732 { 732 {
@@ -744,23 +744,23 @@ namespace OdeAPI
744 744
745 745
746 746
747
748 747
749 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] 748
750 public static extern IntPtr CreateiGeom(int classnum); 749 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity]
750 public static extern IntPtr CreateiGeom(int classnum);
751 public static IntPtr CreateGeom(int classnum) 751 public static IntPtr CreateGeom(int classnum)
752 { 752 {
753 NTotalGeoms++; 753 NTotalGeoms++;
754 return CreateiGeom(classnum); 754 return CreateiGeom(classnum);
755 } 755 }
756 756
757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] 757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity]
758 public static extern int CreateGeomClass(ref GeomClass classptr); 758 public static extern int CreateGeomClass(ref GeomClass classptr);
759 759
760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] 760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity]
761 public static extern IntPtr CreateGeomTransform(IntPtr space); 761 public static extern IntPtr CreateGeomTransform(IntPtr space);
762 762
763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] 763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity]
764 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); 764 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d);
765 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d) 765 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d)
766 { 766 {
@@ -768,25 +768,25 @@ namespace OdeAPI
768 return CreateiPlane(space, a, b, c, d); 768 return CreateiPlane(space, a, b, c, d);
769 } 769 }
770 770
771 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] 771 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity]
772 public static extern IntPtr CreateiRay(IntPtr space, dReal length); 772 public static extern IntPtr CreateiRay(IntPtr space, dReal length);
773 public static IntPtr CreateRay(IntPtr space, dReal length) 773 public static IntPtr CreateRay(IntPtr space, dReal length)
774 { 774 {
775 NTotalGeoms++; 775 NTotalGeoms++;
776 return CreateiRay(space, length); 776 return CreateiRay(space, length);
777 } 777 }
778 778
779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] 779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity]
780 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius); 780 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius);
781 public static IntPtr CreateSphere(IntPtr space, dReal radius) 781 public static IntPtr CreateSphere(IntPtr space, dReal radius)
782 { 782 {
783 NTotalGeoms++; 783 NTotalGeoms++;
784 return CreateiSphere(space, radius); 784 return CreateiSphere(space, radius);
785 } 785 }
786 786
787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] 787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity]
788 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data, 788 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data,
789 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); 789 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback);
790 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data, 790 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data,
791 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback) 791 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback)
792 { 792 {
@@ -794,79 +794,79 @@ namespace OdeAPI
794 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback); 794 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback);
795 } 795 }
796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] 796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity]
797 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n); 797 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n);
798 798
799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] 799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity]
800 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); 800 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q);
801 801
802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] 802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity]
803 public static extern int FactorCholesky(ref dReal A00, int n); 803 public static extern int FactorCholesky(ref dReal A00, int n);
804 804
805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] 805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity]
806 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); 806 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip);
807 807
808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
809 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); 809 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len);
810 810
811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
812 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); 812 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x);
813 813
814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] 814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity]
815 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); 815 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z);
816 816
817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] 817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity]
818 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); 818 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z);
819 819
820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] 820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity]
821 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); 821 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length);
822 822
823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] 823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity]
824 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 824 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
825 825
826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] 826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity]
827 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); 827 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length);
828 828
829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] 829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity]
830 public static extern void GeomClearOffset(IntPtr geom); 830 public static extern void GeomClearOffset(IntPtr geom);
831 831
832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
833 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); 833 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos);
834 834
835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
836 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); 836 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X);
837 837
838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
839 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); 839 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q);
840 840
841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
842 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); 842 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X);
843 843
844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
845 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); 845 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R);
846 846
847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
848 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); 848 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00);
849 849
850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
851 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); 851 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos);
852 852
853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
854 public static extern void GeomCopyPosition(IntPtr geom, out dReal X); 854 public static extern void GeomCopyPosition(IntPtr geom, out dReal X);
855 855
856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
857 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); 857 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R);
858 858
859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
860 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00); 860 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00);
861 861
862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] 862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity]
863 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); 863 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length);
864 864
865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] 865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity]
866 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); 866 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length);
867 867
868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] 868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity]
869 public static extern void GeomiDestroy(IntPtr geom); 869 public static extern void GeomiDestroy(IntPtr geom);
870 public static void GeomDestroy(IntPtr geom) 870 public static void GeomDestroy(IntPtr geom)
871 { 871 {
872 NTotalGeoms--; 872 NTotalGeoms--;
@@ -874,63 +874,63 @@ namespace OdeAPI
874 } 874 }
875 875
876 876
877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] 877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity]
878 public static extern void GeomDisable(IntPtr geom); 878 public static extern void GeomDisable(IntPtr geom);
879 879
880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] 880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity]
881 public static extern void GeomEnable(IntPtr geom); 881 public static extern void GeomEnable(IntPtr geom);
882 882
883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
884 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb); 884 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb);
885 885
886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
887 public static extern void GeomGetAABB(IntPtr geom, out dReal minX); 887 public static extern void GeomGetAABB(IntPtr geom, out dReal minX);
888 888
889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] 889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity]
890 public static extern IntPtr GeomGetBody(IntPtr geom); 890 public static extern IntPtr GeomGetBody(IntPtr geom);
891 891
892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] 892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity]
893 public static extern uint GeomGetCategoryBits(IntPtr geom); 893 public static extern uint GeomGetCategoryBits(IntPtr geom);
894 894
895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] 895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity]
896 public static extern IntPtr GeomGetClassData(IntPtr geom); 896 public static extern IntPtr GeomGetClassData(IntPtr geom);
897 897
898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] 898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity]
899 public static extern uint GeomGetCollideBits(IntPtr geom); 899 public static extern uint GeomGetCollideBits(IntPtr geom);
900 900
901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] 901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity]
902 public static extern GeomClassID GeomGetClass(IntPtr geom); 902 public static extern GeomClassID GeomGetClass(IntPtr geom);
903 903
904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] 904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity]
905 public static extern IntPtr GeomGetData(IntPtr geom); 905 public static extern IntPtr GeomGetData(IntPtr geom);
906 906
907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] 907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity]
908 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); 908 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom);
909 public static Vector3 GeomGetOffsetPosition(IntPtr geom) 909 public static Vector3 GeomGetOffsetPosition(IntPtr geom)
910 { 910 {
911 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } 911 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); }
912 } 912 }
913 913
914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] 914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity]
915 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); 915 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom);
916 public static Matrix3 GeomGetOffsetRotation(IntPtr geom) 916 public static Matrix3 GeomGetOffsetRotation(IntPtr geom)
917 { 917 {
918 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } 918 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); }
919 } 919 }
920 920
921 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] 921 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity]
922 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); 922 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom);
923 public static Vector3 GeomGetPosition(IntPtr geom) 923 public static Vector3 GeomGetPosition(IntPtr geom)
924 { 924 {
925 unsafe { return *(GeomGetPositionUnsafe(geom)); } 925 unsafe { return *(GeomGetPositionUnsafe(geom)); }
926 } 926 }
927 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) 927 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom)
928 { 928 {
929 Vector3 vtmp = GeomGetPosition(geom); 929 Vector3 vtmp = GeomGetPosition(geom);
930 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); 930 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z);
931 } 931 }
932 932
933 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 933 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
934 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); 934 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q);
935 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) 935 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom)
936 { 936 {
@@ -939,85 +939,85 @@ namespace OdeAPI
939 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W); 939 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W);
940 } 940 }
941 941
942 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 942 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
943 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); 943 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X);
944 944
945 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] 945 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity]
946 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); 946 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom);
947 public static Matrix3 GeomGetRotation(IntPtr geom) 947 public static Matrix3 GeomGetRotation(IntPtr geom)
948 { 948 {
949 unsafe { return *(GeomGetRotationUnsafe(geom)); } 949 unsafe { return *(GeomGetRotationUnsafe(geom)); }
950 } 950 }
951 951
952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] 952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity]
953 public static extern IntPtr GeomGetSpace(IntPtr geom); 953 public static extern IntPtr GeomGetSpace(IntPtr geom);
954 954
955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
956 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, 956 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData,
957 dReal width, dReal depth, int widthSamples, int depthSamples, 957 dReal width, dReal depth, int widthSamples, int depthSamples,
958 dReal scale, dReal offset, dReal thickness, int bWrap); 958 dReal scale, dReal offset, dReal thickness, int bWrap);
959 959
960 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 960 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
961 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 961 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
962 dReal width, dReal depth, int widthSamples, int depthSamples, 962 dReal width, dReal depth, int widthSamples, int depthSamples,
963 dReal scale, dReal offset, dReal thickness, int bWrap); 963 dReal scale, dReal offset, dReal thickness, int bWrap);
964 964
965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] 965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity]
966 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, 966 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback,
967 dReal width, dReal depth, int widthSamples, int depthSamples, 967 dReal width, dReal depth, int widthSamples, int depthSamples,
968 dReal scale, dReal offset, dReal thickness, int bWrap); 968 dReal scale, dReal offset, dReal thickness, int bWrap);
969 969
970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
971 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, 971 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData,
972 dReal width, dReal depth, int widthSamples, int depthSamples, 972 dReal width, dReal depth, int widthSamples, int depthSamples,
973 dReal scale, dReal offset, dReal thickness, int bWrap); 973 dReal scale, dReal offset, dReal thickness, int bWrap);
974 974
975 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 975 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
976 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, 976 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData,
977 dReal width, dReal depth, int widthSamples, int depthSamples, 977 dReal width, dReal depth, int widthSamples, int depthSamples,
978 dReal scale, dReal offset, dReal thickness, int bWrap); 978 dReal scale, dReal offset, dReal thickness, int bWrap);
979 979
980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
981 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 981 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
982 dReal width, dReal depth, int widthSamples, int depthSamples, 982 dReal width, dReal depth, int widthSamples, int depthSamples,
983 dReal scale, dReal offset, dReal thickness, int bWrap); 983 dReal scale, dReal offset, dReal thickness, int bWrap);
984 984
985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
986 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, 986 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData,
987 dReal width, dReal depth, int widthSamples, int depthSamples, 987 dReal width, dReal depth, int widthSamples, int depthSamples,
988 dReal scale, dReal offset, dReal thickness, int bWrap); 988 dReal scale, dReal offset, dReal thickness, int bWrap);
989 989
990 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 990 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
991 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 991 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
992 dReal width, dReal depth, int widthSamples, int depthSamples, 992 dReal width, dReal depth, int widthSamples, int depthSamples,
993 dReal scale, dReal offset, dReal thickness, int bWrap); 993 dReal scale, dReal offset, dReal thickness, int bWrap);
994 994
995 995
996 996
997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
998 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, 998 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData,
999 dReal width, dReal depth, int widthSamples, int depthSamples, 999 dReal width, dReal depth, int widthSamples, int depthSamples,
1000 dReal scale, dReal offset, dReal thickness, int bWrap); 1000 dReal scale, dReal offset, dReal thickness, int bWrap);
1001 1001
1002 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1002 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1003 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 1003 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
1004 dReal width, dReal depth, int widthSamples, int depthSamples, 1004 dReal width, dReal depth, int widthSamples, int depthSamples,
1005 dReal scale, dReal offset, dReal thickness, int bWrap); 1005 dReal scale, dReal offset, dReal thickness, int bWrap);
1006 1006
1007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] 1007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity]
1008 public static extern IntPtr GeomHeightfieldDataCreate(); 1008 public static extern IntPtr GeomHeightfieldDataCreate();
1009 1009
1010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] 1010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity]
1011 public static extern void GeomHeightfieldDataDestroy(IntPtr d); 1011 public static extern void GeomHeightfieldDataDestroy(IntPtr d);
1012 1012
1013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] 1013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity]
1014 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); 1014 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
1015 1015
1016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1017 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); 1017 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g);
1018 1018
1019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1020 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); 1020 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d);
1021 1021
1022 1022
1023 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity] 1023 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
@@ -1046,279 +1046,279 @@ namespace OdeAPI
1046 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d); 1046 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d);
1047 1047
1048 1048
1049 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] 1049 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity]
1050 public static extern bool GeomIsEnabled(IntPtr geom); 1050 public static extern bool GeomIsEnabled(IntPtr geom);
1051 1051
1052 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] 1052 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity]
1053 public static extern bool GeomIsOffset(IntPtr geom); 1053 public static extern bool GeomIsOffset(IntPtr geom);
1054 1054
1055 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] 1055 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity]
1056 public static extern bool GeomIsSpace(IntPtr geom); 1056 public static extern bool GeomIsSpace(IntPtr geom);
1057 1057
1058 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1058 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1059 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); 1059 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result);
1060 1060
1061 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1061 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1062 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); 1062 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A);
1063 1063
1064 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] 1064 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity]
1065 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1065 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1066 1066
1067 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] 1067 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity]
1068 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); 1068 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d);
1069 1069
1070 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1070 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1071 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); 1071 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir);
1072 1072
1073 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1073 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1074 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); 1074 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX);
1075 1075
1076 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] 1076 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity]
1077 public static extern int GeomRayGetClosestHit(IntPtr ray); 1077 public static extern int GeomRayGetClosestHit(IntPtr ray);
1078 1078
1079 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] 1079 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity]
1080 public static extern dReal GeomRayGetLength(IntPtr ray); 1080 public static extern dReal GeomRayGetLength(IntPtr ray);
1081 1081
1082 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] 1082 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity]
1083 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); 1083 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull);
1084 1084
1085 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] 1085 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity]
1086 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); 1086 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
1087 1087
1088 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] 1088 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity]
1089 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); 1089 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit);
1090 1090
1091 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] 1091 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity]
1092 public static extern void GeomRaySetLength(IntPtr ray, dReal length); 1092 public static extern void GeomRaySetLength(IntPtr ray, dReal length);
1093 1093
1094 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] 1094 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity]
1095 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); 1095 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull);
1096 1096
1097 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] 1097 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity]
1098 public static extern void GeomSetBody(IntPtr geom, IntPtr body); 1098 public static extern void GeomSetBody(IntPtr geom, IntPtr body);
1099 1099
1100 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] 1100 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity]
1101 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits); 1101 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits);
1102 1102
1103 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] 1103 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity]
1104 public static extern void GeomSetCollideBits(IntPtr geom, uint bits); 1104 public static extern void GeomSetCollideBits(IntPtr geom, uint bits);
1105 1105
1106 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] 1106 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity]
1107 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 1107 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
1108 1108
1109 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] 1109 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity]
1110 public static extern void GeomSetData(IntPtr geom, IntPtr data); 1110 public static extern void GeomSetData(IntPtr geom, IntPtr data);
1111 1111
1112 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] 1112 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity]
1113 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1113 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1114
1115 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1116 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1117
1118 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1119 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1120
1121 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1122 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1123
1124 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1125 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1126 1114
1127 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] 1115 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1128 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); 1116 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1129 1117
1130 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1118 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1131 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); 1119 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1132 1120
1133 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1121 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1134 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); 1122 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1135 1123
1136 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1124 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1137 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); 1125 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1138 1126
1139 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1127 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity]
1140 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); 1128 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z);
1141 1129
1142 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] 1130 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1143 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1131 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q);
1144 1132
1145 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1133 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1146 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); 1134 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X);
1147 1135
1148 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1136 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1149 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); 1137 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R);
1150 1138
1151 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1139 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1152 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); 1140 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00);
1153 1141
1154 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1142 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity]
1155 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00); 1143 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1156 1144
1157 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] 1145 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1158 public static extern dReal GeomSphereGetRadius(IntPtr geom); 1146 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat);
1159 1147
1160 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] 1148 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1161 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1149 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w);
1162 1150
1163 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] 1151 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1164 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); 1152 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R);
1165 1153
1166 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] 1154 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1167 public static extern int GeomTransformGetCleanup(IntPtr geom); 1155 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00);
1168 1156
1169 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] 1157 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity]
1170 public static extern IntPtr GeomTransformGetGeom(IntPtr geom); 1158 public static extern dReal GeomSphereGetRadius(IntPtr geom);
1171 1159
1172 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] 1160 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity]
1173 public static extern int GeomTransformGetInfo(IntPtr geom); 1161 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1174 1162
1175 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] 1163 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity]
1176 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode); 1164 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius);
1177 1165
1178 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] 1166 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity]
1179 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); 1167 public static extern int GeomTransformGetCleanup(IntPtr geom);
1180 1168
1181 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] 1169 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity]
1182 public static extern void GeomTransformSetInfo(IntPtr geom, int info); 1170 public static extern IntPtr GeomTransformGetGeom(IntPtr geom);
1183 1171
1184 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1172 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity]
1185 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1173 public static extern int GeomTransformGetInfo(IntPtr geom);
1186 double[] vertices, int vertexStride, int vertexCount,
1187 int[] indices, int indexCount, int triStride);
1188 1174
1189 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1175 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity]
1190 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1176 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode);
1191 IntPtr vertices, int vertexStride, int vertexCount,
1192 IntPtr indices, int indexCount, int triStride);
1193 1177
1194 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1178 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity]
1195 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d, 1179 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj);
1196 double[] vertices, int vertexStride, int vertexCount,
1197 int[] indices, int indexCount, int triStride,
1198 double[] normals);
1199 1180
1200 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1181 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity]
1201 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1182 public static extern void GeomTransformSetInfo(IntPtr geom, int info);
1202 IntPtr vertices, int vertexStride, int vertexCount,
1203 IntPtr indices, int indexCount, int triStride,
1204 IntPtr normals);
1205 1183
1206 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1184 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1207 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1185 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1208 dReal[] vertices, int vertexStride, int vertexCount, 1186 double[] vertices, int vertexStride, int vertexCount,
1209 int[] indices, int indexCount, int triStride); 1187 int[] indices, int indexCount, int triStride);
1210 1188
1211 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1189 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1212 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1190 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1213 IntPtr vertices, int vertexStride, int vertexCount, 1191 IntPtr vertices, int vertexStride, int vertexCount,
1214 IntPtr indices, int indexCount, int triStride); 1192 IntPtr indices, int indexCount, int triStride);
1215 1193
1216 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1194 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1217 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1195 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d,
1218 dReal[] vertices, int vertexStride, int vertexCount, 1196 double[] vertices, int vertexStride, int vertexCount,
1219 int[] indices, int indexCount, int triStride, 1197 int[] indices, int indexCount, int triStride,
1220 dReal[] normals); 1198 double[] normals);
1221 1199
1222 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1200 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1223 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1201 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1224 IntPtr vertices, int vertexStride, int vertexCount, 1202 IntPtr vertices, int vertexStride, int vertexCount,
1225 IntPtr indices, int indexCount, int triStride, 1203 IntPtr indices, int indexCount, int triStride,
1226 IntPtr normals); 1204 IntPtr normals);
1227 1205
1228 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1206 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1229 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1207 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1230 float[] vertices, int vertexStride, int vertexCount, 1208 dReal[] vertices, int vertexStride, int vertexCount,
1231 int[] indices, int indexCount, int triStride); 1209 int[] indices, int indexCount, int triStride);
1232 1210
1233 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1211 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1234 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1212 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1235 IntPtr vertices, int vertexStride, int vertexCount, 1213 IntPtr vertices, int vertexStride, int vertexCount,
1236 IntPtr indices, int indexCount, int triStride); 1214 IntPtr indices, int indexCount, int triStride);
1237 1215
1238 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1216 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1239 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1217 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1240 float[] vertices, int vertexStride, int vertexCount, 1218 dReal[] vertices, int vertexStride, int vertexCount,
1241 int[] indices, int indexCount, int triStride, 1219 int[] indices, int indexCount, int triStride,
1242 float[] normals); 1220 dReal[] normals);
1243 1221
1244 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1222 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1245 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1223 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1246 IntPtr vertices, int vertexStride, int vertexCount, 1224 IntPtr vertices, int vertexStride, int vertexCount,
1247 IntPtr indices, int indexCount, int triStride, 1225 IntPtr indices, int indexCount, int triStride,
1248 IntPtr normals); 1226 IntPtr normals);
1249 1227
1250 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] 1228 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1251 public static extern void GeomTriMeshClearTCCache(IntPtr g); 1229 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1230 float[] vertices, int vertexStride, int vertexCount,
1231 int[] indices, int indexCount, int triStride);
1252 1232
1253 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] 1233 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1254 public static extern IntPtr GeomTriMeshDataCreate(); 1234 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1235 IntPtr vertices, int vertexStride, int vertexCount,
1236 IntPtr indices, int indexCount, int triStride);
1255 1237
1256 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] 1238 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1257 public static extern void GeomTriMeshDataDestroy(IntPtr d); 1239 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1240 float[] vertices, int vertexStride, int vertexCount,
1241 int[] indices, int indexCount, int triStride,
1242 float[] normals);
1258 1243
1259 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] 1244 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1260 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); 1245 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1246 IntPtr vertices, int vertexStride, int vertexCount,
1247 IntPtr indices, int indexCount, int triStride,
1248 IntPtr normals);
1261 1249
1262 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] 1250 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity]
1263 public static extern void GeomTriMeshDataPreprocess(IntPtr d); 1251 public static extern void GeomTriMeshClearTCCache(IntPtr g);
1264 1252
1265 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] 1253 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity]
1266 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); 1254 public static extern IntPtr GeomTriMeshDataCreate();
1267 1255
1268 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] 1256 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity]
1269 public static extern void GeomTriMeshDataUpdate(IntPtr d); 1257 public static extern void GeomTriMeshDataDestroy(IntPtr d);
1270 1258
1271 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] 1259 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity]
1272 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); 1260 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id);
1273 1261
1274 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] 1262 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity]
1275 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); 1263 public static extern void GeomTriMeshDataPreprocess(IntPtr d);
1276 1264
1277 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] 1265 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity]
1278 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g); 1266 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data);
1279 1267
1280 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] 1268 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity]
1281 public static extern IntPtr GeomTriMeshGetData(IntPtr g); 1269 public static extern void GeomTriMeshDataUpdate(IntPtr d);
1282 1270
1283 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] 1271 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity]
1284 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); 1272 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable);
1285 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) 1273
1286 { 1274 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity]
1287 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } 1275 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g);
1288 } 1276
1277 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity]
1278 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g);
1279
1280 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity]
1281 public static extern IntPtr GeomTriMeshGetData(IntPtr g);
1282
1283 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity]
1284 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom);
1285 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom)
1286 {
1287 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); }
1288 }
1289 1289
1290 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] 1290 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity]
1291 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); 1291 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec);
1292 1292
1293 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] 1293 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity]
1294 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); 1294 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g);
1295 1295
1296 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] 1296 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity]
1297 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); 1297 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2);
1298 1298
1299 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] 1299 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity]
1300 public extern static int GeomTriMeshGetTriangleCount(IntPtr g); 1300 public extern static int GeomTriMeshGetTriangleCount(IntPtr g);
1301 1301
1302 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] 1302 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity]
1303 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); 1303 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g);
1304 1304
1305 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] 1305 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity]
1306 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); 1306 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass);
1307 1307
1308 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] 1308 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity]
1309 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); 1309 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback);
1310 1310
1311 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] 1311 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity]
1312 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); 1312 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback);
1313 1313
1314 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] 1314 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity]
1315 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); 1315 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data);
1316 1316
1317 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1317 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1318 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); 1318 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans);
1319 1319
1320 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1320 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1321 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); 1321 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00);
1322 1322
1323 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] 1323 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity]
1324 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); 1324 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback);
@@ -1333,416 +1333,416 @@ namespace OdeAPI
1333 return s; 1333 return s;
1334 } 1334 }
1335 1335
1336 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] 1336 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity]
1337 public static extern IntPtr HashSpaceCreate(IntPtr space); 1337 public static extern IntPtr HashSpaceCreate(IntPtr space);
1338 1338
1339 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] 1339 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity]
1340 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); 1340 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel);
1341 1341
1342 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] 1342 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity]
1343 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); 1343 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel);
1344 1344
1345 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] 1345 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity]
1346 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb); 1346 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb);
1347 1347
1348 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] 1348 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity]
1349 public static extern void InitODE(); 1349 public static extern void InitODE();
1350 1350
1351 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] 1351 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity]
1352 public static extern int InitODE2(uint ODEInitFlags); 1352 public static extern int InitODE2(uint ODEInitFlags);
1353 1353
1354 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] 1354 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity]
1355 public static extern int IsPositiveDefinite(ref dReal A, int n); 1355 public static extern int IsPositiveDefinite(ref dReal A, int n);
1356 1356
1357 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] 1357 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity]
1358 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); 1358 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n);
1359 1359
1360 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] 1360 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity]
1361 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); 1361 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3);
1362 1362
1363 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] 1363 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity]
1364 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque); 1364 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque);
1365 1365
1366 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] 1366 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity]
1367 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); 1367 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2);
1368 1368
1369 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] 1369 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity]
1370 public static extern void JointAddPRTorque(IntPtr joint, dReal torque); 1370 public static extern void JointAddPRTorque(IntPtr joint, dReal torque);
1371 1371
1372 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] 1372 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity]
1373 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); 1373 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2);
1374 1374
1375 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] 1375 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity]
1376 public static extern void JointAddSliderForce(IntPtr joint, dReal force); 1376 public static extern void JointAddSliderForce(IntPtr joint, dReal force);
1377 1377
1378 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] 1378 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity]
1379 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); 1379 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2);
1380 1380
1381 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] 1381 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity]
1382 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); 1382 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group);
1383 1383
1384 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] 1384 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity]
1385 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); 1385 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group);
1386 1386
1387 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1387 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1388 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); 1388 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact);
1389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1390 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact); 1390 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact);
1391 1391
1392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] 1392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity]
1393 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); 1393 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group);
1394 1394
1395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] 1395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity]
1396 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); 1396 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group);
1397 1397
1398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] 1398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity]
1399 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); 1399 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group);
1400 1400
1401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] 1401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity]
1402 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); 1402 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group);
1403 1403
1404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] 1404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity]
1405 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); 1405 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group);
1406 1406
1407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] 1407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity]
1408 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); 1408 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group);
1409 1409
1410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] 1410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity]
1411 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); 1411 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group);
1412 1412
1413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] 1413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity]
1414 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); 1414 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group);
1415 1415
1416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] 1416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity]
1417 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); 1417 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group);
1418 1418
1419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] 1419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity]
1420 public static extern void JointDestroy(IntPtr j); 1420 public static extern void JointDestroy(IntPtr j);
1421 1421
1422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1423 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum); 1423 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum);
1424 1424
1425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] 1425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity]
1426 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); 1426 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum);
1427 1427
1428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1429 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); 1429 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result);
1430 1430
1431 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] 1431 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity]
1432 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum); 1432 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum);
1433 1433
1434 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] 1434 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity]
1435 public static extern int JointGetAMotorMode(IntPtr j); 1435 public static extern int JointGetAMotorMode(IntPtr j);
1436 1436
1437 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1437 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1438 public static extern int JointGetAMotorNumAxes(IntPtr j); 1438 public static extern int JointGetAMotorNumAxes(IntPtr j);
1439 1439
1440 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] 1440 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity]
1441 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter); 1441 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter);
1442 1442
1443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] 1443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity]
1444 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); 1444 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result);
1445 1445
1446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1447 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); 1447 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result);
1448 1448
1449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] 1449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity]
1450 public static extern IntPtr JointGetBody(IntPtr j); 1450 public static extern IntPtr JointGetBody(IntPtr j);
1451 1451
1452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] 1452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity]
1453 public static extern IntPtr JointGetData(IntPtr j); 1453 public static extern IntPtr JointGetData(IntPtr j);
1454 1454
1455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] 1455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity]
1456 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); 1456 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j);
1457 public static JointFeedback JointGetFeedback(IntPtr j) 1457 public static JointFeedback JointGetFeedback(IntPtr j)
1458 { 1458 {
1459 unsafe { return *(JointGetFeedbackUnsafe(j)); } 1459 unsafe { return *(JointGetFeedbackUnsafe(j)); }
1460 } 1460 }
1461 1461
1462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1463 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); 1463 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result);
1464 1464
1465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] 1465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity]
1466 public static extern dReal JointGetHingeAngle(IntPtr j); 1466 public static extern dReal JointGetHingeAngle(IntPtr j);
1467 1467
1468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] 1468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity]
1469 public static extern dReal JointGetHingeAngleRate(IntPtr j); 1469 public static extern dReal JointGetHingeAngleRate(IntPtr j);
1470 1470
1471 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] 1471 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity]
1472 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); 1472 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result);
1473 1473
1474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] 1474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity]
1475 public static extern dReal JointGetHingeParam(IntPtr j, int parameter); 1475 public static extern dReal JointGetHingeParam(IntPtr j, int parameter);
1476 1476
1477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] 1477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity]
1478 public static extern dReal JointGetHinge2Angle1(IntPtr j); 1478 public static extern dReal JointGetHinge2Angle1(IntPtr j);
1479 1479
1480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] 1480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity]
1481 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j); 1481 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j);
1482 1482
1483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] 1483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity]
1484 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j); 1484 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j);
1485 1485
1486 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] 1486 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity]
1487 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); 1487 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result);
1488 1488
1489 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1489 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1490 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); 1490 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result);
1491 1491
1492 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] 1492 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity]
1493 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); 1493 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result);
1494 1494
1495 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1495 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1496 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); 1496 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result);
1497 1497
1498 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1498 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1499 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); 1499 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result);
1500 1500
1501 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] 1501 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity]
1502 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter); 1502 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter);
1503 1503
1504 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1504 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1505 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); 1505 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result);
1506 1506
1507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1508 public static extern int JointGetLMotorNumAxes(IntPtr j); 1508 public static extern int JointGetLMotorNumAxes(IntPtr j);
1509 1509
1510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] 1510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity]
1511 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter); 1511 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter);
1512 1512
1513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] 1513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity]
1514 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); 1514 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result);
1515 1515
1516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] 1516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity]
1517 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); 1517 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result);
1518 1518
1519 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] 1519 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity]
1520 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); 1520 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result);
1521 1521
1522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] 1522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity]
1523 public static extern dReal JointGetPRParam(IntPtr j, int parameter); 1523 public static extern dReal JointGetPRParam(IntPtr j, int parameter);
1524 1524
1525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] 1525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity]
1526 public static extern dReal JointGetPRPosition(IntPtr j); 1526 public static extern dReal JointGetPRPosition(IntPtr j);
1527 1527
1528 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] 1528 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity]
1529 public static extern dReal JointGetPRPositionRate(IntPtr j); 1529 public static extern dReal JointGetPRPositionRate(IntPtr j);
1530 1530
1531 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] 1531 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity]
1532 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); 1532 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result);
1533 1533
1534 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] 1534 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity]
1535 public static extern dReal JointGetSliderParam(IntPtr j, int parameter); 1535 public static extern dReal JointGetSliderParam(IntPtr j, int parameter);
1536 1536
1537 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] 1537 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity]
1538 public static extern dReal JointGetSliderPosition(IntPtr j); 1538 public static extern dReal JointGetSliderPosition(IntPtr j);
1539 1539
1540 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] 1540 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity]
1541 public static extern dReal JointGetSliderPositionRate(IntPtr j); 1541 public static extern dReal JointGetSliderPositionRate(IntPtr j);
1542 1542
1543 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] 1543 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity]
1544 public static extern JointType JointGetType(IntPtr j); 1544 public static extern JointType JointGetType(IntPtr j);
1545 1545
1546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1547 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); 1547 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result);
1548 1548
1549 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] 1549 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity]
1550 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); 1550 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result);
1551 1551
1552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] 1552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity]
1553 public static extern dReal JointGetUniversalAngle1(IntPtr j); 1553 public static extern dReal JointGetUniversalAngle1(IntPtr j);
1554 1554
1555 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] 1555 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity]
1556 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j); 1556 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j);
1557 1557
1558 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] 1558 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity]
1559 public static extern dReal JointGetUniversalAngle2(IntPtr j); 1559 public static extern dReal JointGetUniversalAngle2(IntPtr j);
1560 1560
1561 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] 1561 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity]
1562 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j); 1562 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j);
1563 1563
1564 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] 1564 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity]
1565 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); 1565 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2);
1566 1566
1567 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1567 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1568 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); 1568 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result);
1569 1569
1570 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1570 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1571 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); 1571 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result);
1572 1572
1573 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] 1573 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity]
1574 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter); 1574 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter);
1575 1575
1576 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] 1576 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity]
1577 public static extern IntPtr JointGroupCreate(int max_size); 1577 public static extern IntPtr JointGroupCreate(int max_size);
1578 1578
1579 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] 1579 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity]
1580 public static extern void JointGroupDestroy(IntPtr group); 1580 public static extern void JointGroupDestroy(IntPtr group);
1581 1581
1582 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] 1582 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity]
1583 public static extern void JointGroupEmpty(IntPtr group); 1583 public static extern void JointGroupEmpty(IntPtr group);
1584 1584
1585 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1585 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1586 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); 1586 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle);
1587 1587
1588 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1588 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1589 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1589 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1590 1590
1591 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] 1591 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity]
1592 public static extern void JointSetAMotorMode(IntPtr j, int mode); 1592 public static extern void JointSetAMotorMode(IntPtr j, int mode);
1593 1593
1594 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1594 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1595 public static extern void JointSetAMotorNumAxes(IntPtr group, int num); 1595 public static extern void JointSetAMotorNumAxes(IntPtr group, int num);
1596 1596
1597 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] 1597 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity]
1598 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); 1598 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value);
1599 1599
1600 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] 1600 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity]
1601 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); 1601 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z);
1602 1602
1603 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1603 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1604 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); 1604 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z);
1605 1605
1606 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] 1606 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity]
1607 public static extern void JointSetData(IntPtr j, IntPtr data); 1607 public static extern void JointSetData(IntPtr j, IntPtr data);
1608 1608
1609 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] 1609 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity]
1610 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); 1610 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback);
1611 1611
1612 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] 1612 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity]
1613 public static extern void JointSetFixed(IntPtr j); 1613 public static extern void JointSetFixed(IntPtr j);
1614 1614
1615 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1615 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1616 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); 1616 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z);
1617 1617
1618 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] 1618 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity]
1619 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1619 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1620 1620
1621 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] 1621 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity]
1622 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); 1622 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z);
1623 1623
1624 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] 1624 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity]
1625 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); 1625 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value);
1626 1626
1627 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1627 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1628 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); 1628 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z);
1629 1629
1630 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1630 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1631 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); 1631 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z);
1632 1632
1633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1634 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); 1634 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z);
1635 1635
1636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] 1636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity]
1637 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); 1637 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value);
1638 1638
1639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1640 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1640 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1641 1641
1642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1643 public static extern void JointSetLMotorNumAxes(IntPtr j, int num); 1643 public static extern void JointSetLMotorNumAxes(IntPtr j, int num);
1644 1644
1645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] 1645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity]
1646 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); 1646 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value);
1647 1647
1648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] 1648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity]
1649 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); 1649 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value);
1650 1650
1651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] 1651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity]
1652 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); 1652 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value);
1653 1653
1654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] 1654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity]
1655 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); 1655 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value);
1656 1656
1657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] 1657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity]
1658 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); 1658 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z);
1659 1659
1660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] 1660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity]
1661 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); 1661 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z);
1662 1662
1663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] 1663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity]
1664 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); 1664 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z);
1665 1665
1666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] 1666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity]
1667 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); 1667 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value);
1668 1668
1669 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] 1669 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity]
1670 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); 1670 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z);
1671 1671
1672 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] 1672 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity]
1673 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1673 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1674 1674
1675 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] 1675 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity]
1676 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); 1676 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value);
1677 1677
1678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1679 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); 1679 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z);
1680 1680
1681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1682 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); 1682 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z);
1683 1683
1684 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1684 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1685 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); 1685 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z);
1686 1686
1687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] 1687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity]
1688 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); 1688 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value);
1689 1689
1690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] 1690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity]
1691 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); 1691 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip);
1692 1692
1693 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] 1693 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity]
1694 public static extern void MassAdd(ref Mass a, ref Mass b); 1694 public static extern void MassAdd(ref Mass a, ref Mass b);
1695 1695
1696 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] 1696 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity]
1697 public static extern void MassAdjust(ref Mass m, dReal newmass); 1697 public static extern void MassAdjust(ref Mass m, dReal newmass);
1698 1698
1699 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] 1699 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity]
1700 public static extern bool MassCheck(ref Mass m); 1700 public static extern bool MassCheck(ref Mass m);
1701 1701
1702 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1702 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1703 public static extern void MassRotate(ref Mass mass, ref Matrix3 R); 1703 public static extern void MassRotate(ref Mass mass, ref Matrix3 R);
1704 1704
1705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1706 public static extern void MassRotate(ref Mass mass, ref dReal M00); 1706 public static extern void MassRotate(ref Mass mass, ref dReal M00);
1707 1707
1708 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] 1708 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity]
1709 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); 1709 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz);
1710 1710
1711 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] 1711 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity]
1712 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); 1712 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz);
1713 1713
1714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] 1714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity]
1715 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1715 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1716 1716
1717 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] 1717 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity]
1718 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1718 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1719 1719
1720 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] 1720 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity]
1721 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1721 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1722 1722
1723 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] 1723 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity]
1724 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1724 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1725 1725
1726 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] 1726 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity]
1727 public static extern void MassSetParameters(out Mass mass, dReal themass, 1727 public static extern void MassSetParameters(out Mass mass, dReal themass,
1728 dReal cgx, dReal cgy, dReal cgz, 1728 dReal cgx, dReal cgy, dReal cgz,
1729 dReal i11, dReal i22, dReal i33, 1729 dReal i11, dReal i22, dReal i33,
1730 dReal i12, dReal i13, dReal i23); 1730 dReal i12, dReal i13, dReal i23);
1731 1731
1732 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] 1732 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity]
1733 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); 1733 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius);
1734 1734
1735 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] 1735 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity]
1736 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); 1736 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius);
1737 1737
1738 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] 1738 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity]
1739 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); 1739 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g);
1740 1740
1741 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] 1741 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity]
1742 public static extern void MassSetZero(out Mass mass); 1742 public static extern void MassSetZero(out Mass mass);
1743 1743
1744 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] 1744 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity]
1745 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z); 1745 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z);
1746 1746
1747 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] 1747 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity]
1748 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1748 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
@@ -1754,119 +1754,119 @@ namespace OdeAPI
1754 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1); 1754 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1);
1755 } 1755 }
1756 1756
1757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] 1757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity]
1758 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1758 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1759 1759
1760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] 1760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity]
1761 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1761 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1762 1762
1763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1764 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); 1764 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle);
1765 1765
1766 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] 1766 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity]
1767 public static extern void QfromR(out Quaternion q, ref Matrix3 R); 1767 public static extern void QfromR(out Quaternion q, ref Matrix3 R);
1768 1768
1769 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] 1769 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity]
1770 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1770 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1771 1771
1772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] 1772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity]
1773 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1773 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1774 1774
1775 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] 1775 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity]
1776 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1776 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1777 1777
1778 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] 1778 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity]
1779 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1779 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1780 1780
1781 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] 1781 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity]
1782 public static extern void QSetIdentity(out Quaternion q); 1782 public static extern void QSetIdentity(out Quaternion q);
1783 1783
1784 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1784 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1785 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); 1785 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth);
1786 1786
1787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1788 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); 1788 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth);
1789 1789
1790 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] 1790 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity]
1791 public static extern dReal RandReal(); 1791 public static extern dReal RandReal();
1792 1792
1793 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] 1793 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity]
1794 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); 1794 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz);
1795 1795
1796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1797 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); 1797 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle);
1798 1798
1799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] 1799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity]
1800 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); 1800 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi);
1801 1801
1802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] 1802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity]
1803 public static extern void RfromQ(out Matrix3 R, ref Quaternion q); 1803 public static extern void RfromQ(out Matrix3 R, ref Quaternion q);
1804 1804
1805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] 1805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity]
1806 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); 1806 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az);
1807 1807
1808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] 1808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity]
1809 public static extern void RSetIdentity(out Matrix3 R); 1809 public static extern void RSetIdentity(out Matrix3 R);
1810 1810
1811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] 1811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity]
1812 public static extern void SetValue(out dReal a, int n); 1812 public static extern void SetValue(out dReal a, int n);
1813 1813
1814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] 1814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity]
1815 public static extern void SetZero(out dReal a, int n); 1815 public static extern void SetZero(out dReal a, int n);
1816 1816
1817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] 1817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity]
1818 public static extern IntPtr SimpleSpaceCreate(IntPtr space); 1818 public static extern IntPtr SimpleSpaceCreate(IntPtr space);
1819 1819
1820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] 1820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity]
1821 public static extern void SolveCholesky(ref dReal L, out dReal b, int n); 1821 public static extern void SolveCholesky(ref dReal L, out dReal b, int n);
1822 1822
1823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] 1823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity]
1824 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); 1824 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip);
1825 1825
1826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] 1826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity]
1827 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); 1827 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip);
1828 1828
1829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] 1829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity]
1830 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); 1830 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip);
1831 1831
1832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] 1832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity]
1833 public static extern void SpaceAdd(IntPtr space, IntPtr geom); 1833 public static extern void SpaceAdd(IntPtr space, IntPtr geom);
1834 1834
1835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity] 1835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity]
1836 public static extern bool SpaceLockQuery(IntPtr space); 1836 public static extern bool SpaceLockQuery(IntPtr space);
1837 1837
1838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] 1838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity]
1839 public static extern void SpaceClean(IntPtr space); 1839 public static extern void SpaceClean(IntPtr space);
1840 1840
1841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] 1841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity]
1842 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); 1842 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback);
1843 1843
1844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] 1844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity]
1845 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); 1845 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback);
1846 1846
1847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] 1847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity]
1848 public static extern void SpaceDestroy(IntPtr space); 1848 public static extern void SpaceDestroy(IntPtr space);
1849 1849
1850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] 1850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity]
1851 public static extern bool SpaceGetCleanup(IntPtr space); 1851 public static extern bool SpaceGetCleanup(IntPtr space);
1852 1852
1853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] 1853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity]
1854 public static extern int SpaceGetNumGeoms(IntPtr space); 1854 public static extern int SpaceGetNumGeoms(IntPtr space);
1855 1855
1856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] 1856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity]
1857 public static extern IntPtr SpaceGetGeom(IntPtr space, int i); 1857 public static extern IntPtr SpaceGetGeom(IntPtr space, int i);
1858 1858
1859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] 1859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity]
1860 public static extern int SpaceGetSublevel(IntPtr space); 1860 public static extern int SpaceGetSublevel(IntPtr space);
1861 1861
1862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] 1862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity]
1863 public static extern bool SpaceQuery(IntPtr space, IntPtr geom); 1863 public static extern bool SpaceQuery(IntPtr space, IntPtr geom);
1864 1864
1865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] 1865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity]
1866 public static extern void SpaceRemove(IntPtr space, IntPtr geom); 1866 public static extern void SpaceRemove(IntPtr space, IntPtr geom);
1867 1867
1868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] 1868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity]
1869 public static extern void SpaceSetCleanup(IntPtr space, bool mode); 1869 public static extern void SpaceSetCleanup(IntPtr space, bool mode);
1870 1870
1871 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] 1871 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity]
1872 public static extern void SpaceSetSublevel(IntPtr space, int sublevel); 1872 public static extern void SpaceSetSublevel(IntPtr space, int sublevel);
@@ -1874,53 +1874,53 @@ namespace OdeAPI
1874 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] 1874 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity]
1875 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); 1875 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder);
1876 1876
1877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] 1877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity]
1878 public static extern void VectorScale(out dReal a, ref dReal d, int n); 1878 public static extern void VectorScale(out dReal a, ref dReal d, int n);
1879 1879
1880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] 1880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity]
1881 public static extern IntPtr WorldCreate(); 1881 public static extern IntPtr WorldCreate();
1882 1882
1883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] 1883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity]
1884 public static extern void WorldDestroy(IntPtr world); 1884 public static extern void WorldDestroy(IntPtr world);
1885 1885
1886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1887 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); 1887 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world);
1888 1888
1889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1890 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); 1890 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world);
1891 1891
1892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1893 public static extern bool WorldGetAutoDisableFlag(IntPtr world); 1893 public static extern bool WorldGetAutoDisableFlag(IntPtr world);
1894 1894
1895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1896 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); 1896 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world);
1897 1897
1898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1899 public static extern int WorldGetAutoDisableSteps(IntPtr world); 1899 public static extern int WorldGetAutoDisableSteps(IntPtr world);
1900 1900
1901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1902 public static extern dReal WorldGetAutoDisableTime(IntPtr world); 1902 public static extern dReal WorldGetAutoDisableTime(IntPtr world);
1903 1903
1904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1905 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world); 1905 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world);
1906 1906
1907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] 1907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity]
1908 public static extern dReal WorldGetCFM(IntPtr world); 1908 public static extern dReal WorldGetCFM(IntPtr world);
1909 1909
1910 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] 1910 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity]
1911 public static extern dReal WorldGetERP(IntPtr world); 1911 public static extern dReal WorldGetERP(IntPtr world);
1912 1912
1913 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1913 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1914 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); 1914 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity);
1915 1915
1916 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1916 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1917 public static extern void WorldGetGravity(IntPtr world, out dReal X); 1917 public static extern void WorldGetGravity(IntPtr world, out dReal X);
1918 1918
1919 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1919 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1920 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); 1920 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world);
1921 1921
1922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1923 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world); 1923 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world);
1924 1924
1925 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] 1925 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity]
1926 public static extern dReal WorldGetAngularDamping(IntPtr world); 1926 public static extern dReal WorldGetAngularDamping(IntPtr world);
@@ -1934,23 +1934,23 @@ namespace OdeAPI
1934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 1934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
1935 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world); 1935 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world);
1936 1936
1937 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 1937 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
1938 public static extern int WorldGetQuickStepNumIterations(IntPtr world); 1938 public static extern int WorldGetQuickStepNumIterations(IntPtr world);
1939 1939
1940 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] 1940 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity]
1941 public static extern dReal WorldGetQuickStepW(IntPtr world); 1941 public static extern dReal WorldGetQuickStepW(IntPtr world);
1942 1942
1943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 1943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
1944 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world); 1944 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world);
1945 1945
1946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1947 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); 1947 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force);
1948 1948
1949 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1949 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1950 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); 1950 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX);
1951 1951
1952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] 1952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity]
1953 public static extern void WorldQuickStep(IntPtr world, dReal stepsize); 1953 public static extern void WorldQuickStep(IntPtr world, dReal stepsize);
1954 1954
1955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] 1955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity]
1956 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale); 1956 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale);
@@ -1958,67 +1958,67 @@ namespace OdeAPI
1958 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 1958 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
1959 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); 1959 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold);
1960 1960
1961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1962 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); 1962 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold);
1963 1963
1964 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1964 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1965 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); 1965 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count);
1966 1966
1967 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1967 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1968 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); 1968 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable);
1969 1969
1970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1971 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); 1971 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold);
1972 1972
1973 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1973 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1974 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); 1974 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps);
1975 1975
1976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1977 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); 1977 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time);
1978 1978
1979 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1979 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1980 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); 1980 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth);
1981 1981
1982 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] 1982 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity]
1983 public static extern void WorldSetCFM(IntPtr world, dReal cfm); 1983 public static extern void WorldSetCFM(IntPtr world, dReal cfm);
1984 1984
1985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1986 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); 1986 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel);
1987 1987
1988 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1988 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1989 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); 1989 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth);
1990 1990
1991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] 1991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity]
1992 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); 1992 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale);
1993 1993
1994 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] 1994 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity]
1995 public static extern void WorldSetERP(IntPtr world, dReal erp); 1995 public static extern void WorldSetERP(IntPtr world, dReal erp);
1996
1997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1998 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
1996 1999
1997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1998 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
1999
2000 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] 2000 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity]
2001 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale); 2001 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale);
2002 2002
2003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 2003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
2004 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); 2004 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold);
2005 2005
2006 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 2006 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
2007 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); 2007 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num);
2008 2008
2009 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] 2009 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity]
2010 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); 2010 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation);
2011 2011
2012 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 2012 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
2013 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); 2013 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed);
2014 2014
2015 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] 2015 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity]
2016 public static extern void WorldStep(IntPtr world, dReal stepsize); 2016 public static extern void WorldStep(IntPtr world, dReal stepsize);
2017 2017
2018 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] 2018 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity]
2019 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); 2019 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations);
2020 2020
2021 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity] 2021 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity]
2022 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix); 2022 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix);
2023 } 2023 }
2024} 2024}
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
index f7e1044..9cef3d5 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
67 StopERP3 = 7 + 512, 67 StopERP3 = 7 + 512,
68 StopCFM3 = 8 + 512 68 StopCFM3 = 8 + 512
69 } 69 }
70 70
71 public class OdeCharacter : PhysicsActor 71 public class OdeCharacter : PhysicsActor
72 { 72 {
73 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 73 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -121,7 +121,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
121 private float m_buoyancy = 0f; 121 private float m_buoyancy = 0f;
122 122
123 private bool m_freemove = false; 123 private bool m_freemove = false;
124 124
125// private string m_name = String.Empty; 125// private string m_name = String.Empty;
126 // other filter control 126 // other filter control
127 int m_colliderfilter = 0; 127 int m_colliderfilter = 0;
@@ -155,7 +155,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
155 public UUID m_uuid; 155 public UUID m_uuid;
156 public bool bad = false; 156 public bool bad = false;
157 157
158 float mu; 158 float mu;
159 159
160 // HoverHeight control 160 // HoverHeight control
161 private float m_PIDHoverHeight; 161 private float m_PIDHoverHeight;
@@ -218,7 +218,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
218 walkDivisor = walk_divisor; 218 walkDivisor = walk_divisor;
219 runDivisor = rundivisor; 219 runDivisor = rundivisor;
220 220
221 m_mass = m_density * m_size.X * m_size.Y * m_size.Z; ; // sure we have a default 221 m_mass = m_density * m_size.X * m_size.Y * m_size.Z; ; // sure we have a default
222 222
223 PID_D = basePID_D * m_mass * invtimeStep; 223 PID_D = basePID_D * m_mass * invtimeStep;
224 PID_P = basePID_P * m_mass * invtimeStep; 224 PID_P = basePID_P * m_mass * invtimeStep;
@@ -256,7 +256,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
256 256
257 public override uint LocalID 257 public override uint LocalID
258 { 258 {
259 get { return m_localID; } 259 get { return m_localID; }
260 set { m_localID = value; } 260 set { m_localID = value; }
261 } 261 }
262 262
@@ -508,7 +508,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
508 { 508 {
509 m_log.Warn("[PHYSICS]: Got a NaN AvatarSize from Scene on a Character"); 509 m_log.Warn("[PHYSICS]: Got a NaN AvatarSize from Scene on a Character");
510 } 510 }
511 511
512 } 512 }
513 /// <summary> 513 /// <summary>
514 /// This creates the Avatar's physical Surrogate at the position supplied 514 /// This creates the Avatar's physical Surrogate at the position supplied
@@ -636,7 +636,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
636 { 636 {
637 get 637 get
638 { 638 {
639 return m_targetVelocity; 639 return m_targetVelocity;
640 } 640 }
641 set 641 set
642 { 642 {
@@ -774,7 +774,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
774 774
775 PID_D = basePID_D * m_mass / _parent_scene.ODE_STEPSIZE; 775 PID_D = basePID_D * m_mass / _parent_scene.ODE_STEPSIZE;
776 PID_P = basePID_P * m_mass / _parent_scene.ODE_STEPSIZE; 776 PID_P = basePID_P * m_mass / _parent_scene.ODE_STEPSIZE;
777 777
778 Body = d.BodyCreate(_parent_scene.world); 778 Body = d.BodyCreate(_parent_scene.world);
779 779
780 _zeroFlag = false; 780 _zeroFlag = false;
@@ -900,7 +900,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
900 x = tx * cos - y * sin; 900 x = tx * cos - y * sin;
901 y = tx * sin + y * cos; 901 y = tx * sin + y * cos;
902 } 902 }
903 903
904 public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact, 904 public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact,
905 ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision) 905 ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision)
906 { 906 {
@@ -944,7 +944,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
944 } 944 }
945 } 945 }
946 return true; 946 return true;
947 } 947 }
948/* 948/*
949 d.AABB aabb; 949 d.AABB aabb;
950 d.GeomGetAABB(other,out aabb); 950 d.GeomGetAABB(other,out aabb);
@@ -1141,7 +1141,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1141 n.Y = 0f; 1141 n.Y = 0f;
1142 n.Z = 1.0f; 1142 n.Z = 1.0f;
1143 } 1143 }
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 if (depth < 0.2f) 1147 if (depth < 0.2f)
@@ -1223,7 +1223,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1223 break; 1223 break;
1224 } // end switch (m_PIDHoverType) 1224 } // end switch (m_PIDHoverType)
1225 1225
1226 // don't go underground 1226 // don't go underground
1227 if (m_targetHoverHeight > terrainheight + 0.5f * (aabb.MaxZ - aabb.MinZ)) 1227 if (m_targetHoverHeight > terrainheight + 0.5f * (aabb.MaxZ - aabb.MinZ))
1228 { 1228 {
1229 float fz = (m_targetHoverHeight - localpos.Z); 1229 float fz = (m_targetHoverHeight - localpos.Z);
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1248 } 1248 }
1249 } 1249 }
1250 } 1250 }
1251 1251
1252 //****************************************** 1252 //******************************************
1253 if (!m_iscolliding) 1253 if (!m_iscolliding)
1254 m_collideNormal.Z = 0; 1254 m_collideNormal.Z = 0;
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1495 /// Used to copy variables from unmanaged space at heartbeat rate and also trigger scene updates acording 1495 /// Used to copy variables from unmanaged space at heartbeat rate and also trigger scene updates acording
1496 /// also outbounds checking 1496 /// also outbounds checking
1497 /// copy and outbounds now done in move(..) at ode rate 1497 /// copy and outbounds now done in move(..) at ode rate
1498 /// 1498 ///
1499 /// </summary> 1499 /// </summary>
1500 public void UpdatePositionAndVelocity() 1500 public void UpdatePositionAndVelocity()
1501 { 1501 {
@@ -1625,7 +1625,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1625 CollisionEventsThisFrame.Clear(); 1625 CollisionEventsThisFrame.Clear();
1626 } 1626 }
1627 } 1627 }
1628 } 1628 }
1629 } 1629 }
1630 1630
1631 public override bool SubscribedEvents() 1631 public override bool SubscribedEvents()
@@ -1697,7 +1697,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1697 _position.Z + (m_size.Z - oldsz) * 0.5f); 1697 _position.Z + (m_size.Z - oldsz) * 0.5f);
1698 1698
1699// Velocity = Vector3.Zero; 1699// Velocity = Vector3.Zero;
1700 m_targetVelocity = Vector3.Zero; 1700 m_targetVelocity = Vector3.Zero;
1701 1701
1702 _parent_scene.actor_name_map[collider] = (PhysicsActor)this; 1702 _parent_scene.actor_name_map[collider] = (PhysicsActor)this;
1703 _parent_scene.actor_name_map[capsule] = (PhysicsActor)this; 1703 _parent_scene.actor_name_map[capsule] = (PhysicsActor)this;
@@ -1717,7 +1717,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1717 d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z); 1717 d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z);
1718 _position = newPos; 1718 _position = newPos;
1719 m_freemove = false; 1719 m_freemove = false;
1720 m_pidControllerActive = true; 1720 m_pidControllerActive = true;
1721 } 1721 }
1722 1722
1723 private void changeOrientation(Quaternion newOri) 1723 private void changeOrientation(Quaternion newOri)
@@ -1772,35 +1772,35 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1772 1772
1773 private void changeSetTorque(Vector3 newTorque) 1773 private void changeSetTorque(Vector3 newTorque)
1774 { 1774 {
1775 } 1775 }
1776 1776
1777 private void changeAddForce(Vector3 newForce) 1777 private void changeAddForce(Vector3 newForce)
1778 { 1778 {
1779 } 1779 }
1780 1780
1781 private void changeAddAngularForce(Vector3 arg) 1781 private void changeAddAngularForce(Vector3 arg)
1782 { 1782 {
1783 } 1783 }
1784 1784
1785 private void changeAngularLock(byte arg) 1785 private void changeAngularLock(byte arg)
1786 { 1786 {
1787 } 1787 }
1788 1788
1789 private void changeFloatOnWater(bool arg) 1789 private void changeFloatOnWater(bool arg)
1790 { 1790 {
1791 } 1791 }
1792 1792
1793 private void changeVolumedetetion(bool arg) 1793 private void changeVolumedetetion(bool arg)
1794 { 1794 {
1795 } 1795 }
1796 1796
1797 private void changeSelectedStatus(bool arg) 1797 private void changeSelectedStatus(bool arg)
1798 { 1798 {
1799 } 1799 }
1800 1800
1801 private void changeDisable(bool arg) 1801 private void changeDisable(bool arg)
1802 { 1802 {
1803 } 1803 }
1804 1804
1805 private void changeBuilding(bool arg) 1805 private void changeBuilding(bool arg)
1806 { 1806 {
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs
index fa32441..63bef7c 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs
@@ -170,7 +170,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
170 m_type = vd.m_type; 170 m_type = vd.m_type;
171 m_flags = vd.m_flags; 171 m_flags = vd.m_flags;
172 172
173 173
174 // Linear properties 174 // Linear properties
175 m_linearMotorDirection = vd.m_linearMotorDirection; 175 m_linearMotorDirection = vd.m_linearMotorDirection;
176 176
@@ -761,8 +761,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde
761 roll = (float)Math.Atan2(minuszY, zZ); 761 roll = (float)Math.Atan2(minuszY, zZ);
762 } 762 }
763 return ; 763 return ;
764 } 764 }
765 765
766 internal void Step() 766 internal void Step()
767 { 767 {
768 IntPtr Body = rootPrim.Body; 768 IntPtr Body = rootPrim.Body;
@@ -797,7 +797,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
797 Vector3 curLocalAngVel = curAngVel * irotq; // current angular velocity in local 797 Vector3 curLocalAngVel = curAngVel * irotq; // current angular velocity in local
798 798
799 float ldampZ = 0; 799 float ldampZ = 0;
800 800
801 bool mousemode = false; 801 bool mousemode = false;
802 bool mousemodebank = false; 802 bool mousemodebank = false;
803 803
@@ -852,7 +852,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
852 m_lmEfect = 0; 852 m_lmEfect = 0;
853 m_ffactor = 1f; 853 m_ffactor = 1f;
854 } 854 }
855 855
856 // hover 856 // hover
857 if (m_VhoverTimescale < 300 && rootPrim.prim_geom != IntPtr.Zero) 857 if (m_VhoverTimescale < 300 && rootPrim.prim_geom != IntPtr.Zero)
858 { 858 {
@@ -1001,7 +1001,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1001 if (broll > halfpi) 1001 if (broll > halfpi)
1002 broll = pi - broll; 1002 broll = pi - broll;
1003 else if (broll < -halfpi) 1003 else if (broll < -halfpi)
1004 broll = -pi - broll; 1004 broll = -pi - broll;
1005 */ 1005 */
1006 broll *= m_bankingEfficiency; 1006 broll *= m_bankingEfficiency;
1007 if (m_bankingMix != 0) 1007 if (m_bankingMix != 0)
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1054 float invamts = 1.0f/m_angularMotorTimescale; 1054 float invamts = 1.0f/m_angularMotorTimescale;
1055 float tmp; 1055 float tmp;
1056 1056
1057 // get out of x == 0 plane 1057 // get out of x == 0 plane
1058 if(Math.Abs(dirv.X) < 0.001f) 1058 if(Math.Abs(dirv.X) < 0.001f)
1059 dirv.X = 0.001f; 1059 dirv.X = 0.001f;
1060 1060
@@ -1068,7 +1068,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1068 torque.Y += (tmp - curLocalAngVel.Y) * invamts; 1068 torque.Y += (tmp - curLocalAngVel.Y) * invamts;
1069 torque.Y -= curLocalAngVel.Y * m_amdampY; 1069 torque.Y -= curLocalAngVel.Y * m_amdampY;
1070 } 1070 }
1071 else 1071 else
1072 torque.Y -= curLocalAngVel.Y * m_invtimestep; 1072 torque.Y -= curLocalAngVel.Y * m_invtimestep;
1073 1073
1074 if (Math.Abs(dirv.Y) > 0.01) 1074 if (Math.Abs(dirv.Y) > 0.01)
@@ -1099,7 +1099,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1099 { 1099 {
1100 if(mousemodebank) 1100 if(mousemodebank)
1101 torque.X -= curLocalAngVel.X * m_invtimestep; 1101 torque.X -= curLocalAngVel.X * m_invtimestep;
1102 else 1102 else
1103 torque.Z -= curLocalAngVel.Z * m_invtimestep; 1103 torque.Z -= curLocalAngVel.Z * m_invtimestep;
1104 } 1104 }
1105 } 1105 }
@@ -1133,11 +1133,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1133 if (m_angularDeflectionEfficiency > 0) 1133 if (m_angularDeflectionEfficiency > 0)
1134 { 1134 {
1135 Vector3 dirv; 1135 Vector3 dirv;
1136 1136
1137 if (curLocalVel.X > 0.01f) 1137 if (curLocalVel.X > 0.01f)
1138 dirv = curLocalVel; 1138 dirv = curLocalVel;
1139 else if (curLocalVel.X < -0.01f) 1139 else if (curLocalVel.X < -0.01f)
1140 // use oposite 1140 // use oposite
1141 dirv = -curLocalVel; 1141 dirv = -curLocalVel;
1142 else 1142 else
1143 { 1143 {
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1167 torque.Z -= curLocalAngVel.Z * m_amdampZ; 1167 torque.Z -= curLocalAngVel.Z * m_amdampZ;
1168 } 1168 }
1169 } 1169 }
1170 1170
1171 force *= dmass.mass; 1171 force *= dmass.mass;
1172 1172
1173 force += rootPrim.m_force; 1173 force += rootPrim.m_force;
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
index bb661e5..923e2ff 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
@@ -27,7 +27,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
27 AssetOK = 0x0f, // 00001111 27 AssetOK = 0x0f, // 00001111
28 28
29 NeedMask = 0x30, // 00110000 29 NeedMask = 0x30, // 00110000
30 needMesh = 0x10, // 00010000 30 needMesh = 0x10, // 00010000
31 needAsset = 0x20, // 00100000 31 needAsset = 0x20, // 00100000
32 32
33 FailMask = 0xC0, // 11000000 33 FailMask = 0xC0, // 11000000
@@ -287,7 +287,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
287 public bool needsMeshing(ODEPhysRepData repData) 287 public bool needsMeshing(ODEPhysRepData repData)
288 { 288 {
289 PrimitiveBaseShape pbs = repData.pbs; 289 PrimitiveBaseShape pbs = repData.pbs;
290 // check sculpts or meshs 290 // check sculpts or meshs
291 if (pbs.SculptEntry) 291 if (pbs.SculptEntry)
292 { 292 {
293 if (meshSculptedPrim) 293 if (meshSculptedPrim)
@@ -462,7 +462,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
462 repData.meshState = MeshState.MeshFailed; 462 repData.meshState = MeshState.MeshFailed;
463 return; 463 return;
464 } 464 }
465 } 465 }
466 } 466 }
467 467
468 repData.meshState = MeshState.AssetOK; 468 repData.meshState = MeshState.AssetOK;
@@ -525,7 +525,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
525 } 525 }
526 526
527 mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex, true); 527 mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex, true);
528 528
529 if (mesh == null) 529 if (mesh == null)
530 { 530 {
531 if (pbs.SculptEntry) 531 if (pbs.SculptEntry)
@@ -607,7 +607,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
607 607
608 else if (_pbs.PathCurve == (byte)Extrusion.Curve1) 608 else if (_pbs.PathCurve == (byte)Extrusion.Curve1)
609 { 609 {
610 //a tube 610 //a tube
611 611
612 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX); 612 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX);
613 tmp = 1.0f - 2.0e-2f * (float)(200 - _pbs.PathScaleY); 613 tmp = 1.0f - 2.0e-2f * (float)(200 - _pbs.PathScaleY);
@@ -857,7 +857,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
857 // this is crude aproximation 857 // this is crude aproximation
858 profileBegin = (float)_pbs.ProfileBegin * 2.0e-5f; 858 profileBegin = (float)_pbs.ProfileBegin * 2.0e-5f;
859 profileEnd = 1.0f - (float)_pbs.ProfileEnd * 2.0e-5f; 859 profileEnd = 1.0f - (float)_pbs.ProfileEnd * 2.0e-5f;
860 volume *= (profileEnd - profileBegin); 860 volume *= (profileEnd - profileBegin);
861 861
862 repData.volume = volume; 862 repData.volume = volume;
863 } 863 }
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
index 51b8e4e..4cb1736 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
@@ -11,16 +11,16 @@ using OpenSim.Region.Framework.Interfaces;
11 11
12namespace OpenSim.Region.PhysicsModule.ubOde 12namespace OpenSim.Region.PhysicsModule.ubOde
13{ 13{
14 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ubODEPhysicsScene")] 14 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ubODEPhysicsScene")]
15 class ubOdeModule : INonSharedRegionModule 15 class ubOdeModule : INonSharedRegionModule
16 { 16 {
17 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 17 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
18 18
19 private static Dictionary<Scene, ODEScene> m_scenes = new Dictionary<Scene, ODEScene>(); 19 private static Dictionary<Scene, ODEScene> m_scenes = new Dictionary<Scene, ODEScene>();
20 private bool m_Enabled = false; 20 private bool m_Enabled = false;
21 private IConfigSource m_config; 21 private IConfigSource m_config;
22 private bool OSOdeLib; 22 private bool OSOdeLib;
23 23
24 24
25 #region INonSharedRegionModule 25 #region INonSharedRegionModule
26 26
@@ -80,7 +80,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
80 80
81 if(m_scenes.ContainsKey(scene)) // ??? 81 if(m_scenes.ContainsKey(scene)) // ???
82 return; 82 return;
83 ODEScene newodescene = new ODEScene(scene, m_config, Name, Version, OSOdeLib); 83 ODEScene newodescene = new ODEScene(scene, m_config, Name, Version, OSOdeLib);
84 m_scenes[scene] = newodescene; 84 m_scenes[scene] = newodescene;
85 } 85 }
86 86
@@ -100,13 +100,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde
100 { 100 {
101 if (!m_Enabled) 101 if (!m_Enabled)
102 return; 102 return;
103 103
104 if(m_scenes.ContainsKey(scene)) 104 if(m_scenes.ContainsKey(scene))
105 { 105 {
106 m_scenes[scene].RegionLoaded(); 106 m_scenes[scene].RegionLoaded();
107 } 107 }
108 108
109 } 109 }
110 #endregion 110 #endregion
111 } 111 }
112} 112}
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index a50905b..a2fbf41 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -33,7 +33,7 @@
33 * ODEDynamics.cs contains methods dealing with Prim Physical motion 33 * ODEDynamics.cs contains methods dealing with Prim Physical motion
34 * (dynamics) and the associated settings. Old Linear and angular 34 * (dynamics) and the associated settings. Old Linear and angular
35 * motors for dynamic motion have been replace with MoveLinear() 35 * motors for dynamic motion have been replace with MoveLinear()
36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic 36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic
37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to 37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to
38 * switch between 'VEHICLE' parameter use and general dynamics 38 * switch between 'VEHICLE' parameter use and general dynamics
39 * settings use. 39 * settings use.
@@ -107,7 +107,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
107 private float m_targetHoverHeight; 107 private float m_targetHoverHeight;
108 private float m_groundHeight; 108 private float m_groundHeight;
109 private float m_waterHeight; 109 private float m_waterHeight;
110 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 110 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
111 111
112 private int body_autodisable_frames; 112 private int body_autodisable_frames;
113 public int bodydisablecontrol = 0; 113 public int bodydisablecontrol = 0;
@@ -143,7 +143,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
143 143
144 private UUID? m_assetID; 144 private UUID? m_assetID;
145 private MeshState m_meshState; 145 private MeshState m_meshState;
146 146
147 public ODEScene _parent_scene; 147 public ODEScene _parent_scene;
148 148
149 /// <summary> 149 /// <summary>
@@ -888,7 +888,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
888 888
889 m_lastVelocity = _velocity; 889 m_lastVelocity = _velocity;
890 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 890 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
891 m_vehicle.Stop(); 891 m_vehicle.Stop();
892 892
893 if(Body != IntPtr.Zero) 893 if(Body != IntPtr.Zero)
894 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 894 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
@@ -980,7 +980,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
980 { 980 {
981// m_log.DebugFormat("[axislock]: <{0},{1},{2}>", axis.X, axis.Y, axis.Z); 981// m_log.DebugFormat("[axislock]: <{0},{1},{2}>", axis.X, axis.Y, axis.Z);
982 AddChange(changes.AngLock, axislock); 982 AddChange(changes.AngLock, axislock);
983 983
984 } 984 }
985 985
986 public override void SubscribeEvents(int ms) 986 public override void SubscribeEvents(int ms)
@@ -1464,7 +1464,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1464 IntPtr vertices, indices; 1464 IntPtr vertices, indices;
1465 int vertexCount, indexCount; 1465 int vertexCount, indexCount;
1466 int vertexStride, triStride; 1466 int vertexStride, triStride;
1467 1467
1468 IMesh mesh = m_mesh; 1468 IMesh mesh = m_mesh;
1469 1469
1470 if (mesh == null) 1470 if (mesh == null)
@@ -1529,7 +1529,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1529 m_OBB = _size * 0.5f; 1529 m_OBB = _size * 0.5f;
1530 m_physCost = 0.1f; 1530 m_physCost = 0.1f;
1531 m_streamCost = 1.0f; 1531 m_streamCost = 1.0f;
1532 1532
1533 _parent_scene.mesher.ReleaseMesh(mesh); 1533 _parent_scene.mesher.ReleaseMesh(mesh);
1534 m_meshState = MeshState.MeshFailed; 1534 m_meshState = MeshState.MeshFailed;
1535 m_mesh = null; 1535 m_mesh = null;
@@ -1830,7 +1830,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1830 if (childrenPrim.Count == 0) 1830 if (childrenPrim.Count == 0)
1831 { 1831 {
1832 collide_geom = prim_geom; 1832 collide_geom = prim_geom;
1833 m_targetSpace = _parent_scene.ActiveSpace; 1833 m_targetSpace = _parent_scene.ActiveSpace;
1834 } 1834 }
1835 else 1835 else
1836 { 1836 {
@@ -1911,7 +1911,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1911 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z); 1911 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
1912 _zeroFlag = false; 1912 _zeroFlag = false;
1913 bodydisablecontrol = 0; 1913 bodydisablecontrol = 0;
1914 } 1914 }
1915 _parent_scene.addActiveGroups(this); 1915 _parent_scene.addActiveGroups(this);
1916 } 1916 }
1917 1917
@@ -2011,7 +2011,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2011 d.Matrix3 mat = new d.Matrix3(); 2011 d.Matrix3 mat = new d.Matrix3();
2012 d.Quaternion quat = new d.Quaternion(); 2012 d.Quaternion quat = new d.Quaternion();
2013 2013
2014 d.Mass tmpdmass = new d.Mass { }; 2014 d.Mass tmpdmass = new d.Mass { };
2015 d.Mass objdmass = new d.Mass { }; 2015 d.Mass objdmass = new d.Mass { };
2016 2016
2017 d.BodyGetMass(Body, out tmpdmass); 2017 d.BodyGetMass(Body, out tmpdmass);
@@ -2039,7 +2039,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2039 // subtract current prim inertia from object 2039 // subtract current prim inertia from object
2040 DMassSubPartFromObj(ref tmpdmass, ref objdmass); 2040 DMassSubPartFromObj(ref tmpdmass, ref objdmass);
2041 2041
2042 // back prim own inertia 2042 // back prim own inertia
2043 tmpdmass = primdMass; 2043 tmpdmass = primdMass;
2044 2044
2045 // update to new position and orientation 2045 // update to new position and orientation
@@ -2444,7 +2444,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2444 MakeBody(); 2444 MakeBody();
2445 } 2445 }
2446 2446
2447 2447
2448 #region changes 2448 #region changes
2449 2449
2450 private void changeadd() 2450 private void changeadd()
@@ -3011,7 +3011,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3011 3011
3012 primVolume = repData.volume; 3012 primVolume = repData.volume;
3013 3013
3014 CreateGeom(); 3014 CreateGeom();
3015 3015
3016 if (prim_geom != IntPtr.Zero) 3016 if (prim_geom != IntPtr.Zero)
3017 { 3017 {
@@ -3145,7 +3145,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3145 3145
3146 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); 3146 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z);
3147 } 3147 }
3148 //resetCollisionAccounting(); 3148 //resetCollisionAccounting();
3149 } 3149 }
3150 _velocity = newVel; 3150 _velocity = newVel;
3151 } 3151 }
@@ -3171,7 +3171,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3171 3171
3172 d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z); 3172 d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z);
3173 } 3173 }
3174 //resetCollisionAccounting(); 3174 //resetCollisionAccounting();
3175 } 3175 }
3176 m_rotationalVelocity = newAngVel; 3176 m_rotationalVelocity = newAngVel;
3177 } 3177 }
@@ -3316,7 +3316,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3316 // let vehicles sleep 3316 // let vehicles sleep
3317 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 3317 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
3318 return; 3318 return;
3319 3319
3320 if (++bodydisablecontrol < 50) 3320 if (++bodydisablecontrol < 50)
3321 return; 3321 return;
3322 3322
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3414 break; 3414 break;
3415 } // end switch (m_PIDHoverType) 3415 } // end switch (m_PIDHoverType)
3416 3416
3417 // don't go underground unless volumedetector 3417 // don't go underground unless volumedetector
3418 3418
3419 if (m_targetHoverHeight > m_groundHeight || m_isVolumeDetect) 3419 if (m_targetHoverHeight > m_groundHeight || m_isVolumeDetect)
3420 { 3420 {
@@ -3526,7 +3526,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3526 3526
3527 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 3527 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
3528 d.BodySetAngularVel(Body, 0, 0, 0); // stop it 3528 d.BodySetAngularVel(Body, 0, 0, 0); // stop it
3529 d.BodySetPosition(Body, lpos.X, lpos.Y, lpos.Z); // put it somewhere 3529 d.BodySetPosition(Body, lpos.X, lpos.Y, lpos.Z); // put it somewhere
3530 m_lastposition = _position; 3530 m_lastposition = _position;
3531 m_lastorientation = _orientation; 3531 m_lastorientation = _orientation;
3532 3532
@@ -3635,7 +3635,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3635 _orientation.X = ori.X; 3635 _orientation.X = ori.X;
3636 _orientation.Y = ori.Y; 3636 _orientation.Y = ori.Y;
3637 _orientation.Z = ori.Z; 3637 _orientation.Z = ori.Z;
3638 _orientation.W = ori.W; 3638 _orientation.W = ori.W;
3639 } 3639 }
3640 3640
3641 // update velocities and aceleration 3641 // update velocities and aceleration
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
index adefd5e..f671722 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
139 continue; 139 continue;
140 } 140 }
141 } 141 }
142 142
143 CurrentRayFilter = req.filter; 143 CurrentRayFilter = req.filter;
144 CurrentMaxCount = req.Count; 144 CurrentMaxCount = req.Count;
145 145
@@ -279,7 +279,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
279 /// Method that actually initiates the raycast with spaces 279 /// Method that actually initiates the raycast with spaces
280 /// </summary> 280 /// </summary>
281 /// <param name="req"></param> 281 /// <param name="req"></param>
282 /// 282 ///
283 283
284 private void NoContacts(ODERayRequest req) 284 private void NoContacts(ODERayRequest req)
285 { 285 {
@@ -488,7 +488,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
488 newcontactgeom = (d.ContactGeom)Marshal.PtrToStructure(contactptr, typeof(d.ContactGeom)); 488 newcontactgeom = (d.ContactGeom)Marshal.PtrToStructure(contactptr, typeof(d.ContactGeom));
489 return true; 489 return true;
490 } 490 }
491 491
492 // This is the standard Near. g1 is the ray 492 // This is the standard Near. g1 is the ray
493 private void near(IntPtr space, IntPtr g1, IntPtr g2) 493 private void near(IntPtr space, IntPtr g1, IntPtr g2)
494 { 494 {
@@ -530,7 +530,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
530 uint col1 = d.GeomGetCollideBits(g1); 530 uint col1 = d.GeomGetCollideBits(g1);
531 uint col2 = d.GeomGetCollideBits(g2); 531 uint col2 = d.GeomGetCollideBits(g2);
532*/ 532*/
533 533
534 uint ID = 0; 534 uint ID = 0;
535 PhysicsActor p2 = null; 535 PhysicsActor p2 = null;
536 536
@@ -671,7 +671,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
671 { 671 {
672 d.GeomDestroy(Plane); 672 d.GeomDestroy(Plane);
673 Plane = IntPtr.Zero; 673 Plane = IntPtr.Zero;
674 } 674 }
675 } 675 }
676 } 676 }
677 677
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index 410463c..bed66cc 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
97 97
98 light = 7 // compatibility with old viewers 98 light = 7 // compatibility with old viewers
99 } 99 }
100 100
101 public enum changes : int 101 public enum changes : int
102 { 102 {
103 Add = 0, // arg null. finishs the prim creation. should be used internally only ( to remove later ?) 103 Add = 0, // arg null. finishs the prim creation. should be used internally only ( to remove later ?)
@@ -182,7 +182,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
182 const float comumContactERP = 0.75f; 182 const float comumContactERP = 0.75f;
183 const float comumContactCFM = 0.0001f; 183 const float comumContactCFM = 0.0001f;
184 const float comumContactSLIP = 0f; 184 const float comumContactSLIP = 0f;
185 185
186 float frictionMovementMult = 0.8f; 186 float frictionMovementMult = 0.8f;
187 187
188 float TerrainBounce = 0.1f; 188 float TerrainBounce = 0.1f;
@@ -241,7 +241,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
241 /// </summary> 241 /// </summary>
242 private List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>(); 242 private List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>();
243 private List<PhysicsActor> _collisionEventPrimRemove = new List<PhysicsActor>(); 243 private List<PhysicsActor> _collisionEventPrimRemove = new List<PhysicsActor>();
244 244
245 private HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>(); 245 private HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>();
246 public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>(); 246 public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>();
247 247
@@ -262,7 +262,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
262 private IntPtr TerrainGeom; 262 private IntPtr TerrainGeom;
263 private float[] TerrainHeightFieldHeight; 263 private float[] TerrainHeightFieldHeight;
264 private GCHandle TerrainHeightFieldHeightsHandler = new GCHandle(); 264 private GCHandle TerrainHeightFieldHeightsHandler = new GCHandle();
265 265
266 private int m_physicsiterations = 15; 266 private int m_physicsiterations = 15;
267 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag 267 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag
268// private PhysicsActor PANull = new NullPhysicsActor(); 268// private PhysicsActor PANull = new NullPhysicsActor();
@@ -330,7 +330,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
330 EngineType = pname; 330 EngineType = pname;
331 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName; 331 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
332 EngineName = pname + " " + pversion; 332 EngineName = pname + " " + pversion;
333 m_config = psourceconfig; 333 m_config = psourceconfig;
334 m_OSOdeLib = pOSOdeLib; 334 m_OSOdeLib = pOSOdeLib;
335 335
336// m_OSOdeLib = false; //debug 336// m_OSOdeLib = false; //debug
@@ -343,7 +343,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
343 343
344 base.Initialise(m_frameWorkScene.PhysicsRequestAsset, 344 base.Initialise(m_frameWorkScene.PhysicsRequestAsset,
345 (m_frameWorkScene.Heightmap != null ? m_frameWorkScene.Heightmap.GetFloatsSerialised() : new float[m_frameWorkScene.RegionInfo.RegionSizeX * m_frameWorkScene.RegionInfo.RegionSizeY]), 345 (m_frameWorkScene.Heightmap != null ? m_frameWorkScene.Heightmap.GetFloatsSerialised() : new float[m_frameWorkScene.RegionInfo.RegionSizeX * m_frameWorkScene.RegionInfo.RegionSizeY]),
346 (float)m_frameWorkScene.RegionInfo.RegionSettings.WaterHeight); 346 (float)m_frameWorkScene.RegionInfo.RegionSettings.WaterHeight);
347 } 347 }
348 348
349 public void RegionLoaded() 349 public void RegionLoaded()
@@ -354,7 +354,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
354 m_log.ErrorFormat("[ubOde] No mesher. module disabled"); 354 m_log.ErrorFormat("[ubOde] No mesher. module disabled");
355 return; 355 return;
356 } 356 }
357 357
358 m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig); 358 m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig);
359 m_frameWorkScene.PhysicsEnabled = true; 359 m_frameWorkScene.PhysicsEnabled = true;
360 } 360 }
@@ -394,7 +394,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
394 } 394 }
395 catch 395 catch
396 { 396 {
397 // i must RtC#FM 397 // i must RtC#FM
398 // i did! 398 // i did!
399 } 399 }
400 400
@@ -674,7 +674,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
674 /// <param name="space">The space that contains the geoms. Remember, spaces are also geoms</param> 674 /// <param name="space">The space that contains the geoms. Remember, spaces are also geoms</param>
675 /// <param name="g1">a geometry or space</param> 675 /// <param name="g1">a geometry or space</param>
676 /// <param name="g2">another geometry or space</param> 676 /// <param name="g2">another geometry or space</param>
677 /// 677 ///
678 678
679 private void near(IntPtr space, IntPtr g1, IntPtr g2) 679 private void near(IntPtr space, IntPtr g1, IntPtr g2)
680 { 680 {
@@ -784,7 +784,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
784 if (count == 0) 784 if (count == 0)
785 return; 785 return;
786 786
787 // try get physical actors 787 // try get physical actors
788 PhysicsActor p1; 788 PhysicsActor p1;
789 PhysicsActor p2; 789 PhysicsActor p2;
790 790
@@ -1135,10 +1135,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1135 chr.IsColliding = false; 1135 chr.IsColliding = false;
1136 // chr.CollidingGround = false; not done here 1136 // chr.CollidingGround = false; not done here
1137 chr.CollidingObj = false; 1137 chr.CollidingObj = false;
1138 1138
1139 if(chr.Body == IntPtr.Zero || chr.collider == IntPtr.Zero ) 1139 if(chr.Body == IntPtr.Zero || chr.collider == IntPtr.Zero )
1140 continue; 1140 continue;
1141 1141
1142 // do colisions with static space 1142 // do colisions with static space
1143 d.SpaceCollide2(chr.collider, StaticSpace, IntPtr.Zero, nearCallback); 1143 d.SpaceCollide2(chr.collider, StaticSpace, IntPtr.Zero, nearCallback);
1144 1144
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1160 foreach (OdePrim aprim in _activeprims) 1160 foreach (OdePrim aprim in _activeprims)
1161 { 1161 {
1162 aprim.CollisionScore = 0; 1162 aprim.CollisionScore = 0;
1163 aprim.IsColliding = false; 1163 aprim.IsColliding = false;
1164 } 1164 }
1165 } 1165 }
1166 lock (_activegroups) 1166 lock (_activegroups)
@@ -1170,7 +1170,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1170 foreach (OdePrim aprim in _activegroups) 1170 foreach (OdePrim aprim in _activegroups)
1171 { 1171 {
1172 if(!aprim.m_outbounds && d.BodyIsEnabled(aprim.Body) && 1172 if(!aprim.m_outbounds && d.BodyIsEnabled(aprim.Body) &&
1173 aprim.collide_geom != IntPtr.Zero) 1173 aprim.collide_geom != IntPtr.Zero)
1174 { 1174 {
1175 d.SpaceCollide2(StaticSpace, aprim.collide_geom, IntPtr.Zero, nearCallback); 1175 d.SpaceCollide2(StaticSpace, aprim.collide_geom, IntPtr.Zero, nearCallback);
1176 d.SpaceCollide2(GroundSpace, aprim.collide_geom, IntPtr.Zero, nearCallback); 1176 d.SpaceCollide2(GroundSpace, aprim.collide_geom, IntPtr.Zero, nearCallback);
@@ -1251,7 +1251,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1251 size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun); 1251 size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
1252 newAv.Flying = isFlying; 1252 newAv.Flying = isFlying;
1253 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; 1253 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;
1254 1254
1255 return newAv; 1255 return newAv;
1256 } 1256 }
1257 1257
@@ -1301,7 +1301,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1301 1301
1302 public void addActivePrim(OdePrim activatePrim) 1302 public void addActivePrim(OdePrim activatePrim)
1303 { 1303 {
1304 // adds active prim.. 1304 // adds active prim..
1305 lock (_activeprims) 1305 lock (_activeprims)
1306 { 1306 {
1307 if (!_activeprims.Contains(activatePrim)) 1307 if (!_activeprims.Contains(activatePrim))
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1324 OdePrim newPrim; 1324 OdePrim newPrim;
1325 lock (OdeLock) 1325 lock (OdeLock)
1326 { 1326 {
1327 1327
1328 newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID); 1328 newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID);
1329 } 1329 }
1330 return newPrim; 1330 return newPrim;
@@ -1372,7 +1372,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1372 { 1372 {
1373// lock (OdeLock) 1373// lock (OdeLock)
1374 { 1374 {
1375 1375
1376 OdePrim p = (OdePrim)prim; 1376 OdePrim p = (OdePrim)prim;
1377 p.setPrimForRemoval(); 1377 p.setPrimForRemoval();
1378 } 1378 }
@@ -1423,7 +1423,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1423 _prims[prim.LocalID] = prim; 1423 _prims[prim.LocalID] = prim;
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 public bool haveActor(PhysicsActor actor) 1427 public bool haveActor(PhysicsActor actor)
1428 { 1428 {
1429 if (actor is OdePrim) 1429 if (actor is OdePrim)
@@ -1531,14 +1531,14 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1531 x = (int)(pos.X * spacesPerMeterX); 1531 x = (int)(pos.X * spacesPerMeterX);
1532 if (x > spaceGridMaxX) 1532 if (x > spaceGridMaxX)
1533 return staticPrimspaceOffRegion[1]; 1533 return staticPrimspaceOffRegion[1];
1534 1534
1535 y = (int)(pos.Y * spacesPerMeterY); 1535 y = (int)(pos.Y * spacesPerMeterY);
1536 if (y > spaceGridMaxY) 1536 if (y > spaceGridMaxY)
1537 return staticPrimspaceOffRegion[3]; 1537 return staticPrimspaceOffRegion[3];
1538 1538
1539 return staticPrimspace[x, y]; 1539 return staticPrimspace[x, y];
1540 } 1540 }
1541 1541
1542 #endregion 1542 #endregion
1543 1543
1544 1544
@@ -1628,7 +1628,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1628 TimeSpan timedif = now - m_lastframe; 1628 TimeSpan timedif = now - m_lastframe;
1629 float timeStep = (float)timedif.TotalSeconds; 1629 float timeStep = (float)timedif.TotalSeconds;
1630 m_lastframe = now; 1630 m_lastframe = now;
1631 1631
1632 // acumulate time so we can reduce error 1632 // acumulate time so we can reduce error
1633 step_time += timeStep; 1633 step_time += timeStep;
1634 1634
@@ -1654,7 +1654,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1654 } 1654 }
1655 1655
1656 ODEchangeitem item; 1656 ODEchangeitem item;
1657 1657
1658// d.WorldSetQuickStepNumIterations(world, curphysiteractions); 1658// d.WorldSetQuickStepNumIterations(world, curphysiteractions);
1659 1659
1660 int loopstartMS = Util.EnvironmentTickCount(); 1660 int loopstartMS = Util.EnvironmentTickCount();
@@ -1662,9 +1662,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1662 int changestimeMS = 0; 1662 int changestimeMS = 0;
1663 int maxChangestime = (int)(reqTimeStep * 500f); // half the time 1663 int maxChangestime = (int)(reqTimeStep * 500f); // half the time
1664 int maxLoopTime = (int)(reqTimeStep * 1200f); // 1.2 the time 1664 int maxLoopTime = (int)(reqTimeStep * 1200f); // 1.2 the time
1665 1665
1666 d.AllocateODEDataForThread(~0U); 1666 d.AllocateODEDataForThread(~0U);
1667 1667
1668 if (ChangesQueue.Count > 0) 1668 if (ChangesQueue.Count > 0)
1669 { 1669 {
1670 while (ChangesQueue.Dequeue(out item)) 1670 while (ChangesQueue.Dequeue(out item))
@@ -1726,7 +1726,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1726 aprim.Move(); 1726 aprim.Move();
1727 } 1727 }
1728 } 1728 }
1729 1729
1730 m_rayCastManager.ProcessQueuedRequests(); 1730 m_rayCastManager.ProcessQueuedRequests();
1731 1731
1732 collision_optimized(); 1732 collision_optimized();
@@ -1750,7 +1750,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1750 { 1750 {
1751 pobj.SendCollisions((int)(odetimestepMS)); 1751 pobj.SendCollisions((int)(odetimestepMS));
1752 if(pobj.Body != IntPtr.Zero && !pobj.m_isSelected && 1752 if(pobj.Body != IntPtr.Zero && !pobj.m_isSelected &&
1753 !pobj.m_disabled && !pobj.m_building && 1753 !pobj.m_disabled && !pobj.m_building &&
1754 !d.BodyIsEnabled(pobj.Body)) 1754 !d.BodyIsEnabled(pobj.Body))
1755 sleepers.Add(pobj); 1755 sleepers.Add(pobj);
1756 } 1756 }
@@ -1900,7 +1900,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1900 1900
1901 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); 1901 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix);
1902 } 1902 }
1903 1903
1904 fps = (float)nodeframes * ODE_STEPSIZE / reqTimeStep; 1904 fps = (float)nodeframes * ODE_STEPSIZE / reqTimeStep;
1905 1905
1906 if(step_time < HalfOdeStep) 1906 if(step_time < HalfOdeStep)
@@ -2166,7 +2166,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2166 h0 = (float)heights[iy]; // 0,1 2166 h0 = (float)heights[iy]; // 0,1
2167 h2 = (float)heights[iy+xstep]; // 1,1 vertice 2167 h2 = (float)heights[iy+xstep]; // 1,1 vertice
2168 norm.X = h0 - h2; 2168 norm.X = h0 - h2;
2169 norm.Y = h1 - h0; 2169 norm.Y = h1 - h0;
2170 } 2170 }
2171 else 2171 else
2172 { 2172 {
@@ -2214,7 +2214,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2214 const float thickness = 10f; 2214 const float thickness = 10f;
2215 const int wrap = 0; 2215 const int wrap = 0;
2216 2216
2217 2217
2218 float hfmin = float.MaxValue; 2218 float hfmin = float.MaxValue;
2219 float hfmax = float.MinValue; 2219 float hfmax = float.MinValue;
2220 float val; 2220 float val;
@@ -2503,7 +2503,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2503 2503
2504 orderedPrims.Sort(compareByCollisionsDesc); 2504 orderedPrims.Sort(compareByCollisionsDesc);
2505 topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore); 2505 topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore);
2506 2506
2507 return topColliders; 2507 return topColliders;
2508 } 2508 }
2509 2509
@@ -2546,7 +2546,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2546 } 2546 }
2547 } 2547 }
2548 2548
2549 2549
2550 public override List<ContactResult> RaycastWorld(Vector3 position, Vector3 direction, float length, int Count) 2550 public override List<ContactResult> RaycastWorld(Vector3 position, Vector3 direction, float length, int Count)
2551 { 2551 {
2552 List<ContactResult> ourresults = new List<ContactResult>(); 2552 List<ContactResult> ourresults = new List<ContactResult>();
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs
index 0cdaa60..5d2b1f7 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs
@@ -243,8 +243,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
243 triangle.v3.Z) 243 triangle.v3.Z)
244 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == 244 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z ==
245 triangle.v3.Z) 245 triangle.v3.Z)
246 ) 246 )
247 { 247 {
248 return; 248 return;
249 } 249 }
250 250
@@ -444,7 +444,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
444 { 444 {
445 if (m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero) 445 if (m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
446 throw new NotSupportedException("Attempt to Append to a pinned Mesh"); 446 throw new NotSupportedException("Attempt to Append to a pinned Mesh");
447 447
448 if (!(newMesh is Mesh)) 448 if (!(newMesh is Mesh))
449 return; 449 return;
450 450
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 7f0713a..163f439 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -58,8 +58,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
58 // Setting baseDir to a path will enable the dumping of raw files 58 // Setting baseDir to a path will enable the dumping of raw files
59 // raw files can be imported by blender so a visual inspection of the results can be done 59 // raw files can be imported by blender so a visual inspection of the results can be done
60 60
61 private bool m_Enabled = false; 61 private bool m_Enabled = false;
62 62
63 public static object diskLock = new object(); 63 public static object diskLock = new object();
64 64
65 public bool doMeshFileCache = true; 65 public bool doMeshFileCache = true;
@@ -120,7 +120,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
120 } 120 }
121 121
122 CacheExpire = TimeSpan.FromHours(fcache); 122 CacheExpire = TimeSpan.FromHours(fcache);
123 123
124 lock (diskLock) 124 lock (diskLock)
125 { 125 {
126 if(doMeshFileCache && cachePath != "") 126 if(doMeshFileCache && cachePath != "")
@@ -165,9 +165,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
165 if (!m_Enabled) 165 if (!m_Enabled)
166 return; 166 return;
167 } 167 }
168 168
169 #endregion 169 #endregion
170 170
171 /// <summary> 171 /// <summary>
172 /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may 172 /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may
173 /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail 173 /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail
@@ -266,7 +266,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
266 private void AddSubMesh(OSDMap subMeshData, List<Coord> coords, List<Face> faces) 266 private void AddSubMesh(OSDMap subMeshData, List<Coord> coords, List<Face> faces)
267 { 267 {
268 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap)); 268 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap));
269 269
270 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level 270 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level
271 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no 271 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no
272 // geometry for this submesh. 272 // geometry for this submesh.
@@ -294,15 +294,15 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
294 ushort uX = Utils.BytesToUInt16(posBytes, i); 294 ushort uX = Utils.BytesToUInt16(posBytes, i);
295 ushort uY = Utils.BytesToUInt16(posBytes, i + 2); 295 ushort uY = Utils.BytesToUInt16(posBytes, i + 2);
296 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4); 296 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4);
297 297
298 Coord c = new Coord( 298 Coord c = new Coord(
299 Utils.UInt16ToFloat(uX, posMin.X, posMax.X), 299 Utils.UInt16ToFloat(uX, posMin.X, posMax.X),
300 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y), 300 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y),
301 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z)); 301 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z));
302 302
303 coords.Add(c); 303 coords.Add(c);
304 } 304 }
305 305
306 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary(); 306 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary();
307 for (int i = 0; i < triangleBytes.Length; i += 6) 307 for (int i = 0; i < triangleBytes.Length; i += 6)
308 { 308 {
@@ -448,7 +448,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
448 if (physicsParms != null) 448 if (physicsParms != null)
449 usemesh = true; 449 usemesh = true;
450 } 450 }
451 451
452 if(!usemesh && (map.ContainsKey("physics_convex"))) 452 if(!usemesh && (map.ContainsKey("physics_convex")))
453 physicsParms = (OSDMap)map["physics_convex"]; 453 physicsParms = (OSDMap)map["physics_convex"];
454 454
@@ -488,9 +488,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
488 488
489 byte[] decompressedBuf = outMs.GetBuffer(); 489 byte[] decompressedBuf = outMs.GetBuffer();
490 490
491 decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); 491 decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf);
492 } 492 }
493 } 493 }
494 } 494 }
495 } 495 }
496 catch (Exception e) 496 catch (Exception e)
@@ -622,7 +622,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
622 faces.Add(f); 622 faces.Add(f);
623 } 623 }
624 vertsoffset += vs.Count; 624 vertsoffset += vs.Count;
625 vs.Clear(); 625 vs.Clear();
626 continue; 626 continue;
627 } 627 }
628 /* 628 /*
@@ -648,7 +648,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
648 c.Z = hullr.Vertices[i].z; 648 c.Z = hullr.Vertices[i].z;
649 coords.Add(c); 649 coords.Add(c);
650 } 650 }
651 651
652 for (i = 0; i < nindexs; i += 3) 652 for (i = 0; i < nindexs; i += 3)
653 { 653 {
654 t1 = hullr.Indices[i]; 654 t1 = hullr.Indices[i];
@@ -687,7 +687,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
687 c.Z = vs[i].z; 687 c.Z = vs[i].z;
688 coords.Add(c); 688 coords.Add(c);
689 } 689 }
690 690
691 for (i = 0; i < nindexs; i += 3) 691 for (i = 0; i < nindexs; i += 3)
692 { 692 {
693 t1 = indices[i]; 693 t1 = indices[i];
@@ -707,12 +707,12 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
707 } 707 }
708 } 708 }
709 if (coords.Count > 0 && faces.Count > 0) 709 if (coords.Count > 0 && faces.Count > 0)
710 return true; 710 return true;
711 } 711 }
712 else 712 else
713 { 713 {
714 // if neither mesh or decomposition present, warn and use convex 714 // if neither mesh or decomposition present, warn and use convex
715 m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName); 715 m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName);
716 } 716 }
717 } 717 }
718 vs.Clear(); 718 vs.Clear();
@@ -947,7 +947,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
947 { 947 {
948 PrimMesh primMesh; 948 PrimMesh primMesh;
949 coords = new List<Coord>(); 949 coords = new List<Coord>();
950 faces = new List<Face>(); 950 faces = new List<Face>();
951 951
952 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; 952 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;
953 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; 953 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
@@ -975,7 +975,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
975 profileHollow = 0.0f; 975 profileHollow = 0.0f;
976 else if (profileHollow > 0.95f) 976 else if (profileHollow > 0.95f)
977 profileHollow = 0.95f; 977 profileHollow = 0.95f;
978 978
979 int sides = 4; 979 int sides = 4;
980 LevelOfDetail iLOD = (LevelOfDetail)lod; 980 LevelOfDetail iLOD = (LevelOfDetail)lod;
981 byte profshape = (byte)(primShape.ProfileCurve & 0x07); 981 byte profshape = (byte)(primShape.ProfileCurve & 0x07);
@@ -1033,7 +1033,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1033 } 1033 }
1034 1034
1035 primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides); 1035 primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
1036 1036
1037 if (primMesh.errorMessage != null) 1037 if (primMesh.errorMessage != null)
1038 if (primMesh.errorMessage.Length > 0) 1038 if (primMesh.errorMessage.Length > 0)
1039 m_log.Error("[ERROR] " + primMesh.errorMessage); 1039 m_log.Error("[ERROR] " + primMesh.errorMessage);
@@ -1162,7 +1162,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1162 for (int i = 0; i < someBytes.Length; i++) 1162 for (int i = 0; i < someBytes.Length; i++)
1163 hash = mdjb2(hash, someBytes[i]); 1163 hash = mdjb2(hash, someBytes[i]);
1164 hash = hash << 8; 1164 hash = hash << 8;
1165 } 1165 }
1166 1166
1167 if (convex) 1167 if (convex)
1168 hash |= 4; 1168 hash |= 4;
@@ -1204,7 +1204,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1204 { 1204 {
1205 return CreateMesh(primName, primShape, size, lod, false, false, false); 1205 return CreateMesh(primName, primShape, size, lod, false, false, false);
1206 } 1206 }
1207 1207
1208 public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) 1208 public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
1209 { 1209 {
1210 Mesh mesh = null; 1210 Mesh mesh = null;
@@ -1245,7 +1245,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1245 } 1245 }
1246 1246
1247 private static Vector3 m_MeshUnitSize = new Vector3(1.0f, 1.0f, 1.0f); 1247 private static Vector3 m_MeshUnitSize = new Vector3(1.0f, 1.0f, 1.0f);
1248 1248
1249 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde) 1249 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde)
1250 { 1250 {
1251#if SPAM 1251#if SPAM
@@ -1348,7 +1348,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1348 m_uniqueMeshes.Add(key, mesh); 1348 m_uniqueMeshes.Add(key, mesh);
1349 } 1349 }
1350 catch { } 1350 catch { }
1351 } 1351 }
1352 1352
1353 return mesh; 1353 return mesh;
1354 } 1354 }
@@ -1380,7 +1380,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1380 m_uniqueReleasedMeshes.Add(mesh.Key, mesh); 1380 m_uniqueReleasedMeshes.Add(mesh.Key, mesh);
1381 } 1381 }
1382 catch { } 1382 catch { }
1383 } 1383 }
1384 } 1384 }
1385 } 1385 }
1386 1386
@@ -1447,7 +1447,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1447// BinaryFormatter bformatter = new BinaryFormatter(); 1447// BinaryFormatter bformatter = new BinaryFormatter();
1448 mesh = Mesh.FromStream(stream,key); 1448 mesh = Mesh.FromStream(stream,key);
1449 } 1449 }
1450 1450
1451 } 1451 }
1452 catch (Exception e) 1452 catch (Exception e)
1453 { 1453 {
@@ -1524,7 +1524,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1524 } 1524 }
1525 } 1525 }
1526 } 1526 }
1527 1527
1528 public void ExpireFileCache() 1528 public void ExpireFileCache()
1529 { 1529 {
1530 if (!doCacheExpire) 1530 if (!doCacheExpire)
@@ -1543,8 +1543,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1543 int ndirs = 0; 1543 int ndirs = 0;
1544 DateTime OlderTime = File.GetLastAccessTimeUtc(controlfile) - CacheExpire; 1544 DateTime OlderTime = File.GetLastAccessTimeUtc(controlfile) - CacheExpire;
1545 File.SetLastAccessTimeUtc(controlfile, DateTime.UtcNow); 1545 File.SetLastAccessTimeUtc(controlfile, DateTime.UtcNow);
1546 1546
1547 foreach (string dir in Directory.GetDirectories(cachePath)) 1547 foreach (string dir in Directory.GetDirectories(cachePath))
1548 { 1548 {
1549 try 1549 try
1550 { 1550 {
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs
index 51d067a..10facf2 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs
@@ -522,7 +522,7 @@ namespace PrimMesher
522 public Profile(int sides, float profileStart, float profileEnd, float hollow, int hollowSides, bool hasProfileCut, bool createFaces) 522 public Profile(int sides, float profileStart, float profileEnd, float hollow, int hollowSides, bool hasProfileCut, bool createFaces)
523 { 523 {
524 const float halfSqr2 = 0.7071067811866f; 524 const float halfSqr2 = 0.7071067811866f;
525 525
526 coords = new List<Coord>(); 526 coords = new List<Coord>();
527 faces = new List<Face>(); 527 faces = new List<Face>();
528 528
@@ -769,7 +769,7 @@ namespace PrimMesher
769 } 769 }
770 } 770 }
771 } 771 }
772 772
773 } 773 }
774 774
775 else if (createFaces) 775 else if (createFaces)
@@ -865,7 +865,7 @@ namespace PrimMesher
865 int i; 865 int i;
866 int numVerts = coords.Count; 866 int numVerts = coords.Count;
867 Coord vert; 867 Coord vert;
868 868
869 for (i = 0; i < numVerts; i++) 869 for (i = 0; i < numVerts; i++)
870 { 870 {
871 vert = coords[i]; 871 vert = coords[i];
@@ -1226,7 +1226,7 @@ namespace PrimMesher
1226 s += "\nrevolutions..........: " + this.revolutions.ToString(); 1226 s += "\nrevolutions..........: " + this.revolutions.ToString();
1227 s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString(); 1227 s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString();
1228 s += "\nhasProfileCut........: " + this.hasProfileCut.ToString(); 1228 s += "\nhasProfileCut........: " + this.hasProfileCut.ToString();
1229 s += "\nhasHollow............: " + this.hasHollow.ToString(); 1229 s += "\nhasHollow............: " + this.hasHollow.ToString();
1230 1230
1231 return s; 1231 return s;
1232 } 1232 }
@@ -1324,7 +1324,7 @@ namespace PrimMesher
1324 needEndFaces = true; 1324 needEndFaces = true;
1325 } 1325 }
1326 else needEndFaces = true; 1326 else needEndFaces = true;
1327 1327
1328 if (pathType == PathType.Circular) 1328 if (pathType == PathType.Circular)
1329 { 1329 {
1330 if (sides == 3) 1330 if (sides == 3)
@@ -1377,7 +1377,7 @@ namespace PrimMesher
1377 hollow *= 1.414f; 1377 hollow *= 1.414f;
1378 } 1378 }
1379 1379
1380 Profile profile = new Profile(sides, profileStart, profileEnd, hollow, hollowSides, 1380 Profile profile = new Profile(sides, profileStart, profileEnd, hollow, hollowSides,
1381 HasProfileCut,true); 1381 HasProfileCut,true);
1382 errorMessage = profile.errorMessage; 1382 errorMessage = profile.errorMessage;
1383 1383
@@ -1407,7 +1407,7 @@ namespace PrimMesher
1407 path.stepsPerRevolution = stepsPerRevolution; 1407 path.stepsPerRevolution = stepsPerRevolution;
1408 1408
1409 path.Create(pathType, steps); 1409 path.Create(pathType, steps);
1410 1410
1411 int lastNode = path.pathNodes.Count - 1; 1411 int lastNode = path.pathNodes.Count - 1;
1412 1412
1413 for (int nodeIndex = 0; nodeIndex < path.pathNodes.Count; nodeIndex++) 1413 for (int nodeIndex = 0; nodeIndex < path.pathNodes.Count; nodeIndex++)
@@ -1537,7 +1537,7 @@ namespace PrimMesher
1537 /// DEPRICATED - use Extrude(PathType.Linear) instead 1537 /// DEPRICATED - use Extrude(PathType.Linear) instead
1538 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism. 1538 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism.
1539 /// </summary> 1539 /// </summary>
1540 /// 1540 ///
1541 public void ExtrudeLinear() 1541 public void ExtrudeLinear()
1542 { 1542 {
1543 Extrude(PathType.Linear); 1543 Extrude(PathType.Linear);
@@ -1548,7 +1548,7 @@ namespace PrimMesher
1548 /// DEPRICATED - use Extrude(PathType.Circular) instead 1548 /// DEPRICATED - use Extrude(PathType.Circular) instead
1549 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring. 1549 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring.
1550 /// </summary> 1550 /// </summary>
1551 /// 1551 ///
1552 public void ExtrudeCircular() 1552 public void ExtrudeCircular()
1553 { 1553 {
1554 Extrude(PathType.Circular); 1554 Extrude(PathType.Circular);
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs
index adb1f2e..6503e35 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.ubODEMeshing")] 9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.ubODEMeshing")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs
index 2ca2af7..ebe2523 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs
@@ -57,7 +57,7 @@ namespace PrimMesher
57 int numLodPixels = lod * lod; // (32 * 2)^2 = 64^2 pixels for default sculpt map image 57 int numLodPixels = lod * lod; // (32 * 2)^2 = 64^2 pixels for default sculpt map image
58 58
59 bool needsScaling = false; 59 bool needsScaling = false;
60 bool smallMap = false; 60 bool smallMap = false;
61 61
62 width = bmW; 62 width = bmW;
63 height = bmH; 63 height = bmH;
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs b/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs
index a7fa502..b71932e 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
46 /// <param name="assembly"></param> 46 /// <param name="assembly"></param>
47 /// <param name="linemap"></param> 47 /// <param name="linemap"></param>
48 void PerformScriptCompile( 48 void PerformScriptCompile(
49 string source, string asset, UUID ownerID, 49 string source, string asset, UUID ownerID,
50 out string assembly, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> linemap); 50 out string assembly, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> linemap);
51 51
52 /// <summary> 52 /// <summary>
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
index 361a0b9..2e1dbbe 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
58 /// Post an event to a single script 58 /// Post an event to a single script
59 /// </summary> 59 /// </summary>
60 bool PostScriptEvent(UUID itemID, EventParams parms); 60 bool PostScriptEvent(UUID itemID, EventParams parms);
61 61
62 /// <summary> 62 /// <summary>
63 /// Post event to an entire prim 63 /// Post event to an entire prim
64 /// </summary> 64 /// </summary>
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
95 /// Assemblies that need to be referenced when compiling scripts. 95 /// Assemblies that need to be referenced when compiling scripts.
96 /// </summary> 96 /// </summary>
97 /// <remarks> 97 /// <remarks>
98 /// These are currently additional to those always referenced by the compiler, BUT THIS MAY CHANGE IN THE 98 /// These are currently additional to those always referenced by the compiler, BUT THIS MAY CHANGE IN THE
99 /// FUTURE. 99 /// FUTURE.
100 /// This can be null if there are no additional assemblies. 100 /// This can be null if there are no additional assemblies.
101 /// </remarks> 101 /// </remarks>
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index e4297c4..40c2fd2 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
104 string State { get; set; } 104 string State { get; set; }
105 105
106 /// <summary> 106 /// <summary>
107 /// If true then the engine is responsible for persisted state. If false then some other component may 107 /// If true then the engine is responsible for persisted state. If false then some other component may
108 /// persist state (e.g. attachments persisting in assets). 108 /// persist state (e.g. attachments persisting in assets).
109 /// </summary> 109 /// </summary>
110 bool StatePersistedHere { get; } 110 bool StatePersistedHere { get; }
@@ -193,7 +193,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
193 /// </summary> 193 /// </summary>
194 /// <param name="data"></param> 194 /// <param name="data"></param>
195 void PostEvent(EventParams data); 195 void PostEvent(EventParams data);
196 196
197 void Suspend(); 197 void Suspend();
198 void Resume(); 198 void Resume();
199 199
@@ -223,7 +223,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
223 /// Reset the script. 223 /// Reset the script.
224 /// </summary> 224 /// </summary>
225 /// <remarks> 225 /// <remarks>
226 /// This must not be called by any thread other than the one executing the scripts current event. This is 226 /// This must not be called by any thread other than the one executing the scripts current event. This is
227 /// because there is no wait or abort logic if another thread is in the middle of processing a script event. 227 /// because there is no wait or abort logic if another thread is in the middle of processing a script event.
228 /// Such an external thread should use ResetScript() instead. 228 /// Such an external thread should use ResetScript() instead.
229 /// </remarks> 229 /// </remarks>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 84d44a1..6a39bb9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -81,64 +81,64 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
81 81
82 public Dataserver DataserverPlugin 82 public Dataserver DataserverPlugin
83 { 83 {
84 get 84 get
85 { 85 {
86 lock (staticLock) 86 lock (staticLock)
87 return m_Dataserver[m_ScriptEngine]; 87 return m_Dataserver[m_ScriptEngine];
88 } 88 }
89 } 89 }
90 90
91 public Timer TimerPlugin 91 public Timer TimerPlugin
92 { 92 {
93 get 93 get
94 { 94 {
95 lock (staticLock) 95 lock (staticLock)
96 return m_Timer[m_ScriptEngine]; 96 return m_Timer[m_ScriptEngine];
97 } 97 }
98 } 98 }
99 99
100 public HttpRequest HttpRequestPlugin 100 public HttpRequest HttpRequestPlugin
101 { 101 {
102 get 102 get
103 { 103 {
104 lock (staticLock) 104 lock (staticLock)
105 return m_HttpRequest[m_ScriptEngine]; 105 return m_HttpRequest[m_ScriptEngine];
106 } 106 }
107 } 107 }
108 108
109 public Listener ListenerPlugin 109 public Listener ListenerPlugin
110 { 110 {
111 get 111 get
112 { 112 {
113 lock (staticLock) 113 lock (staticLock)
114 return m_Listener[m_ScriptEngine]; 114 return m_Listener[m_ScriptEngine];
115 } 115 }
116 } 116 }
117 117
118 public SensorRepeat SensorRepeatPlugin 118 public SensorRepeat SensorRepeatPlugin
119 { 119 {
120 get 120 get
121 { 121 {
122 lock (staticLock) 122 lock (staticLock)
123 return m_SensorRepeat[m_ScriptEngine]; 123 return m_SensorRepeat[m_ScriptEngine];
124 } 124 }
125 } 125 }
126 126
127 public XmlRequest XmlRequestPlugin 127 public XmlRequest XmlRequestPlugin
128 { 128 {
129 get 129 get
130 { 130 {
131 lock (staticLock) 131 lock (staticLock)
132 return m_XmlRequest[m_ScriptEngine]; 132 return m_XmlRequest[m_ScriptEngine];
133 } 133 }
134 } 134 }
135 135
136 public IScriptEngine[] ScriptEngines 136 public IScriptEngine[] ScriptEngines
137 { 137 {
138 get 138 get
139 { 139 {
140 lock (staticLock) 140 lock (staticLock)
141 return m_ScriptEngines.ToArray(); 141 return m_ScriptEngines.ToArray();
142 } 142 }
143 } 143 }
144 144
@@ -387,7 +387,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
387 } 387 }
388 } 388 }
389 389
390 390
391 391
392 public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) 392 public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID)
393 { 393 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5269bf9..8f9ff03 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
100 100
101 protected IScriptEngine m_ScriptEngine; 101 protected IScriptEngine m_ScriptEngine;
102 protected SceneObjectPart m_host; 102 protected SceneObjectPart m_host;
103 103
104 /// <summary> 104 /// <summary>
105 /// The item that hosts this script 105 /// The item that hosts this script
106 /// </summary> 106 /// </summary>
@@ -298,7 +298,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
298 m_host = host; 298 m_host = host;
299 m_item = item; 299 m_item = item;
300 m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false); 300 m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
301 301
302 LoadConfig(); 302 LoadConfig();
303 303
304 m_TransferModule = 304 m_TransferModule =
@@ -400,7 +400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
400 } 400 }
401 401
402 IConfig smtpConfig = seConfigSource.Configs["SMTP"]; 402 IConfig smtpConfig = seConfigSource.Configs["SMTP"];
403 if (smtpConfig != null) 403 if (smtpConfig != null)
404 { 404 {
405 // there's an smtp config, so load in the snooze time. 405 // there's an smtp config, so load in the snooze time.
406 EMAIL_PAUSE_TIME = smtpConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME); 406 EMAIL_PAUSE_TIME = smtpConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME);
@@ -666,7 +666,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
666 case ScriptBaseClass.LINK_SET: 666 case ScriptBaseClass.LINK_SET:
667 return new List<SceneObjectPart>(part.ParentGroup.Parts); 667 return new List<SceneObjectPart>(part.ParentGroup.Parts);
668 668
669 case ScriptBaseClass.LINK_ROOT: 669 case ScriptBaseClass.LINK_ROOT:
670 ret.Add(part.ParentGroup.RootPart); 670 ret.Add(part.ParentGroup.RootPart);
671 return ret; 671 return ret;
672 672
@@ -807,8 +807,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
807 m_host.AddScriptLPS(1); 807 m_host.AddScriptLPS(1);
808 lock (Util.RandomClass) 808 lock (Util.RandomClass)
809 { 809 {
810 return Util.RandomClass.NextDouble() * mag; 810 return Util.RandomClass.NextDouble() * mag;
811 } 811 }
812 } 812 }
813 813
814 public LSL_Integer llFloor(double f) 814 public LSL_Integer llFloor(double f)
@@ -1097,7 +1097,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1097 m_host.AddScriptLPS(1); 1097 m_host.AddScriptLPS(1);
1098 /* This method is more accurate than the SL one, and thus causes problems 1098 /* This method is more accurate than the SL one, and thus causes problems
1099 for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. 1099 for scripts that deal with the SL inaccuracy around 180-degrees -.- .._.
1100 1100
1101 double dotProduct = LSL_Vector.Dot(a, b); 1101 double dotProduct = LSL_Vector.Dot(a, b);
1102 LSL_Vector crossProduct = LSL_Vector.Cross(a, b); 1102 LSL_Vector crossProduct = LSL_Vector.Cross(a, b);
1103 double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b); 1103 double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b);
@@ -1115,12 +1115,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1115 1115
1116 return new LSL_Rotation((float)x, (float)y, (float)z, (float)w); 1116 return new LSL_Rotation((float)x, (float)y, (float)z, (float)w);
1117 */ 1117 */
1118 1118
1119 // This method mimics the 180 errors found in SL 1119 // This method mimics the 180 errors found in SL
1120 // See www.euclideanspace.com... angleBetween 1120 // See www.euclideanspace.com... angleBetween
1121 LSL_Vector vec_a = a; 1121 LSL_Vector vec_a = a;
1122 LSL_Vector vec_b = b; 1122 LSL_Vector vec_b = b;
1123 1123
1124 // Eliminate zero length 1124 // Eliminate zero length
1125 LSL_Float vec_a_mag = LSL_Vector.Mag(vec_a); 1125 LSL_Float vec_a_mag = LSL_Vector.Mag(vec_a);
1126 LSL_Float vec_b_mag = LSL_Vector.Mag(vec_b); 1126 LSL_Float vec_b_mag = LSL_Vector.Mag(vec_b);
@@ -1129,7 +1129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1129 { 1129 {
1130 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); 1130 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f);
1131 } 1131 }
1132 1132
1133 // Normalize 1133 // Normalize
1134 vec_a = llVecNorm(vec_a); 1134 vec_a = llVecNorm(vec_a);
1135 vec_b = llVecNorm(vec_b); 1135 vec_b = llVecNorm(vec_b);
@@ -1137,13 +1137,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1137 // Calculate axis and rotation angle 1137 // Calculate axis and rotation angle
1138 LSL_Vector axis = vec_a % vec_b; 1138 LSL_Vector axis = vec_a % vec_b;
1139 LSL_Float cos_theta = vec_a * vec_b; 1139 LSL_Float cos_theta = vec_a * vec_b;
1140 1140
1141 // Check if parallel 1141 // Check if parallel
1142 if (cos_theta > 0.99999) 1142 if (cos_theta > 0.99999)
1143 { 1143 {
1144 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); 1144 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f);
1145 } 1145 }
1146 1146
1147 // Check if anti-parallel 1147 // Check if anti-parallel
1148 else if (cos_theta < -0.99999) 1148 else if (cos_theta < -0.99999)
1149 { 1149 {
@@ -1164,7 +1164,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1164 return new LSL_Rotation(x,y,z,s); 1164 return new LSL_Rotation(x,y,z,s);
1165 } 1165 }
1166 } 1166 }
1167 1167
1168 public void llWhisper(int channelID, string text) 1168 public void llWhisper(int channelID, string text)
1169 { 1169 {
1170 m_host.AddScriptLPS(1); 1170 m_host.AddScriptLPS(1);
@@ -1261,7 +1261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1261 { 1261 {
1262 World.SimChat(Utils.StringToBytes(text), 1262 World.SimChat(Utils.StringToBytes(text),
1263 ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); 1263 ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
1264 1264
1265 } 1265 }
1266 1266
1267 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 1267 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -1830,7 +1830,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1830 { 1830 {
1831 m_host.AddScriptLPS(1); 1831 m_host.AddScriptLPS(1);
1832 SceneObjectGroup group = m_host.ParentGroup; 1832 SceneObjectGroup group = m_host.ParentGroup;
1833 1833
1834 if (group == null || group.IsDeleted || group.inTransit) 1834 if (group == null || group.IsDeleted || group.inTransit)
1835 return 1.0f; 1835 return 1.0f;
1836 1836
@@ -1841,7 +1841,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1841 { 1841 {
1842 m_host.AddScriptLPS(1); 1842 m_host.AddScriptLPS(1);
1843 SceneObjectGroup group = m_host.ParentGroup; 1843 SceneObjectGroup group = m_host.ParentGroup;
1844 1844
1845 if (group == null || group.IsDeleted || group.inTransit) 1845 if (group == null || group.IsDeleted || group.inTransit)
1846 return 1.0f; 1846 return 1.0f;
1847 1847
@@ -1970,7 +1970,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1970 string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent"); 1970 string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent");
1971 if (userAgent.IndexOf("SecondLife") < 0) 1971 if (userAgent.IndexOf("SecondLife") < 0)
1972 return; // Not the embedded browser. Is this check good enough? 1972 return; // Not the embedded browser. Is this check good enough?
1973 1973
1974 // Use the IP address of the client and check against the request 1974 // Use the IP address of the client and check against the request
1975 // seperate logins from the same IP will allow all of them to get non-text/plain as long 1975 // seperate logins from the same IP will allow all of them to get non-text/plain as long
1976 // as the owner is in the region. Same as SL! 1976 // as the owner is in the region. Same as SL!
@@ -2030,7 +2030,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2030 m_UrlModule.HttpContentType(new UUID(id),type); 2030 m_UrlModule.HttpContentType(new UUID(id),type);
2031 } 2031 }
2032 } 2032 }
2033*/ 2033*/
2034 public void SetTexGen(SceneObjectPart part, int face,int style) 2034 public void SetTexGen(SceneObjectPart part, int face,int style)
2035 { 2035 {
2036 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 2036 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
@@ -2774,7 +2774,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2774 public void llSetRot(LSL_Rotation rot) 2774 public void llSetRot(LSL_Rotation rot)
2775 { 2775 {
2776 m_host.AddScriptLPS(1); 2776 m_host.AddScriptLPS(1);
2777 2777
2778 // try to let this work as in SL... 2778 // try to let this work as in SL...
2779 if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) 2779 if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart))
2780 { 2780 {
@@ -2960,7 +2960,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2960 m_host.AddScriptLPS(1); 2960 m_host.AddScriptLPS(1);
2961 m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); 2961 m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0);
2962 } 2962 }
2963 2963
2964 public void llSetAngularVelocity(LSL_Vector avel, int local) 2964 public void llSetAngularVelocity(LSL_Vector avel, int local)
2965 { 2965 {
2966 m_host.AddScriptLPS(1); 2966 m_host.AddScriptLPS(1);
@@ -3129,7 +3129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3129 { 3129 {
3130 m_SoundModule.SendSound( 3130 m_SoundModule.SendSound(
3131 m_host.UUID, 3131 m_host.UUID,
3132 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), 3132 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound),
3133 volume, false, 0, 3133 volume, false, 0,
3134 0, false, false); 3134 0, false, false);
3135 } 3135 }
@@ -3602,7 +3602,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3602// LSL_Vector up = new LSL_Vector(0.0, 0.0, 1.0); 3602// LSL_Vector up = new LSL_Vector(0.0, 0.0, 1.0);
3603 // find normalized left axis parallel to horizon 3603 // find normalized left axis parallel to horizon
3604// LSL_Vector left = llVecNorm(LSL_Vector.Cross(up, dir)); 3604// LSL_Vector left = llVecNorm(LSL_Vector.Cross(up, dir));
3605 3605
3606 LSL_Vector left = new LSL_Vector(-dir.y, dir.x, 0.0f); 3606 LSL_Vector left = new LSL_Vector(-dir.y, dir.x, 0.0f);
3607 left = llVecNorm(left); 3607 left = llVecNorm(left);
3608 // make up orthogonal to left and dir 3608 // make up orthogonal to left and dir
@@ -3851,7 +3851,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3851 ScriptSleep(2000); 3851 ScriptSleep(2000);
3852 return; 3852 return;
3853 } 3853 }
3854 3854
3855 // We may be able to use ClientView.SendInstantMessage here, but we need a client instance. 3855 // We may be able to use ClientView.SendInstantMessage here, but we need a client instance.
3856 // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent, 3856 // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent,
3857 // but I don't think we have a list of scenes available from here. 3857 // but I don't think we have a list of scenes available from here.
@@ -3864,7 +3864,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3864 UUID friendTransactionID = UUID.Random(); 3864 UUID friendTransactionID = UUID.Random();
3865 3865
3866 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 3866 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
3867 3867
3868 GridInstantMessage msg = new GridInstantMessage(); 3868 GridInstantMessage msg = new GridInstantMessage();
3869 msg.fromAgentID = new Guid(m_host.OwnerID.ToString()); // fromAgentID.Guid; 3869 msg.fromAgentID = new Guid(m_host.OwnerID.ToString()); // fromAgentID.Guid;
3870 msg.toAgentID = new Guid(user); // toAgentID.Guid; 3870 msg.toAgentID = new Guid(user); // toAgentID.Guid;
@@ -4217,7 +4217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4217 } 4217 }
4218 4218
4219 ScenePresence presence = World.GetScenePresence(agentID); 4219 ScenePresence presence = World.GetScenePresence(agentID);
4220 4220
4221 if (presence != null) 4221 if (presence != null)
4222 { 4222 {
4223 // If permissions are being requested from an NPC and were not implicitly granted above then 4223 // If permissions are being requested from an NPC and were not implicitly granted above then
@@ -4285,7 +4285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4285 m_host.TaskInventory.LockItemsForWrite(true); 4285 m_host.TaskInventory.LockItemsForWrite(true);
4286 m_host.TaskInventory[m_item.ItemID].PermsMask = answer; 4286 m_host.TaskInventory[m_item.ItemID].PermsMask = answer;
4287 m_host.TaskInventory.LockItemsForWrite(false); 4287 m_host.TaskInventory.LockItemsForWrite(false);
4288 4288
4289 m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams( 4289 m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams(
4290 "run_time_permissions", new Object[] { 4290 "run_time_permissions", new Object[] {
4291 new LSL_Integer(answer) }, 4291 new LSL_Integer(answer) },
@@ -4363,7 +4363,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4363 UUID targetID; 4363 UUID targetID;
4364 4364
4365 if (!UUID.TryParse(target, out targetID)) 4365 if (!UUID.TryParse(target, out targetID))
4366 return; 4366 return;
4367 4367
4368 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID); 4368 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID);
4369 if (targetPart == null) 4369 if (targetPart == null)
@@ -4493,7 +4493,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4493 } 4493 }
4494 } 4494 }
4495 finally { } 4495 finally { }
4496 4496
4497 newRoot.ParentGroup.HasGroupChanged = true; 4497 newRoot.ParentGroup.HasGroupChanged = true;
4498 newRoot.ParentGroup.ScheduleGroupForFullUpdate(); 4498 newRoot.ParentGroup.ScheduleGroupForFullUpdate();
4499 } 4499 }
@@ -4515,7 +4515,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4515 m_host.AddScriptLPS(1); 4515 m_host.AddScriptLPS(1);
4516 4516
4517 TaskInventoryItem item = m_item; 4517 TaskInventoryItem item = m_item;
4518 4518
4519 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 4519 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
4520 && !m_automaticLinkPermission) 4520 && !m_automaticLinkPermission)
4521 { 4521 {
@@ -4634,7 +4634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4634 count = count + 1; 4634 count = count + 1;
4635 } 4635 }
4636 } 4636 }
4637 4637
4638 m_host.TaskInventory.LockItemsForRead(false); 4638 m_host.TaskInventory.LockItemsForRead(false);
4639 return count; 4639 return count;
4640 } 4640 }
@@ -4729,7 +4729,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4729 4729
4730 if (agentItem == null) 4730 if (agentItem == null)
4731 { 4731 {
4732 llSay(0, message); 4732 llSay(0, message);
4733 return; 4733 return;
4734 } 4734 }
4735 4735
@@ -4758,7 +4758,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4758 if (m_TransferModule != null) 4758 if (m_TransferModule != null)
4759 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); 4759 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
4760 } 4760 }
4761 4761
4762 //This delay should only occur when giving inventory to avatars. 4762 //This delay should only occur when giving inventory to avatars.
4763 ScriptSleep(m_sleepMsOnGiveInventory); 4763 ScriptSleep(m_sleepMsOnGiveInventory);
4764 } 4764 }
@@ -5064,7 +5064,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5064 // Can't TP sitting avatars 5064 // Can't TP sitting avatars
5065 if (presence.ParentID != 0) // Sitting 5065 if (presence.ParentID != 0) // Sitting
5066 return; 5066 return;
5067 5067
5068 if (m_item.PermsGranter == agentId) 5068 if (m_item.PermsGranter == agentId)
5069 { 5069 {
5070 // If attached using llAttachToAvatarTemp, cowardly refuse 5070 // If attached using llAttachToAvatarTemp, cowardly refuse
@@ -5190,7 +5190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5190 5190
5191 string movementAnimation = presence.Animator.CurrentMovementAnimation; 5191 string movementAnimation = presence.Animator.CurrentMovementAnimation;
5192 string lslMovementAnimation; 5192 string lslMovementAnimation;
5193 5193
5194 if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation)) 5194 if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation))
5195 return lslMovementAnimation; 5195 return lslMovementAnimation;
5196 } 5196 }
@@ -5531,7 +5531,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5531 rot.Normalize(); 5531 rot.Normalize();
5532 5532
5533 double angle = 2 * Math.Acos(rot.s); 5533 double angle = 2 * Math.Acos(rot.s);
5534 if (angle > Math.PI) 5534 if (angle > Math.PI)
5535 angle = 2 * Math.PI - angle; 5535 angle = 2 * Math.PI - angle;
5536 5536
5537 return angle; 5537 return angle;
@@ -6916,10 +6916,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6916 SceneObjectPart part = World.GetSceneObjectPart(uuid); 6916 SceneObjectPart part = World.GetSceneObjectPart(uuid);
6917 if (part != null) 6917 if (part != null)
6918 { 6918 {
6919 6919
6920 if(part.ParentGroup.IsAttachment) 6920 if(part.ParentGroup.IsAttachment)
6921 { 6921 {
6922 uuid = part.ParentGroup.AttachedAvatar; 6922 uuid = part.ParentGroup.AttachedAvatar;
6923 } 6923 }
6924 else 6924 else
6925 { 6925 {
@@ -10266,7 +10266,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10266 } 10266 }
10267 break; 10267 break;
10268 10268
10269 case ScriptBaseClass.PRIM_ROTATION: 10269 case ScriptBaseClass.PRIM_ROTATION:
10270 if (remain < 1) 10270 if (remain < 1)
10271 return new LSL_List(); 10271 return new LSL_List();
10272 10272
@@ -10329,7 +10329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10329 catch (InvalidCastException e) 10329 catch (InvalidCastException e)
10330 { 10330 {
10331 Error( 10331 Error(
10332 originFunc, 10332 originFunc,
10333 string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message); 10333 string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message);
10334 } 10334 }
10335 10335
@@ -10433,7 +10433,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10433 } 10433 }
10434 while (str2.EndsWith("=")) 10434 while (str2.EndsWith("="))
10435 str2 = str2.Substring(0, str2.Length - 1); 10435 str2 = str2.Substring(0, str2.Length - 1);
10436 10436
10437 byte[] d1 = new byte[str1.Length]; 10437 byte[] d1 = new byte[str1.Length];
10438 byte[] d2 = new byte[str2.Length]; 10438 byte[] d2 = new byte[str2.Length];
10439 10439
@@ -10638,7 +10638,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10638 10638
10639 Vector3 box = presence.Appearance.AvatarBoxSize * 0.5f; 10639 Vector3 box = presence.Appearance.AvatarBoxSize * 0.5f;
10640 10640
10641 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID 10641 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID
10642 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 10642 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
10643/* 10643/*
10644 { 10644 {
@@ -10803,7 +10803,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10803 10803
10804 List<SceneObjectPart> parts; 10804 List<SceneObjectPart> parts;
10805 List<ScenePresence> avatars; 10805 List<ScenePresence> avatars;
10806 10806
10807 LSL_List res = new LSL_List(); 10807 LSL_List res = new LSL_List();
10808 LSL_List remaining = new LSL_List(); 10808 LSL_List remaining = new LSL_List();
10809 10809
@@ -12887,7 +12887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12887 return; 12887 return;
12888 } 12888 }
12889 } 12889 }
12890 12890
12891 ScenePresence avatar = World.GetScenePresence(detectedParams.Key); 12891 ScenePresence avatar = World.GetScenePresence(detectedParams.Key);
12892 if (avatar != null) 12892 if (avatar != null)
12893 { 12893 {
@@ -13239,7 +13239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13239 13239
13240 byte[] d2 = new Byte[data1.Length]; 13240 byte[] d2 = new Byte[data1.Length];
13241 int pos = 0; 13241 int pos = 0;
13242 13242
13243 if (data1.Length <= data2.Length) 13243 if (data1.Length <= data2.Length)
13244 { 13244 {
13245 Array.Copy(data2, 0, d2, 0, data1.Length); 13245 Array.Copy(data2, 0, d2, 0, data1.Length);
@@ -13636,7 +13636,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13636 13636
13637 LSL_List ret = new LSL_List(); 13637 LSL_List ret = new LSL_List();
13638 UUID key = new UUID(); 13638 UUID key = new UUID();
13639 13639
13640 13640
13641 if (UUID.TryParse(id, out key)) 13641 if (UUID.TryParse(id, out key))
13642 { 13642 {
@@ -13824,7 +13824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13824 case ScriptBaseClass.OBJECT_NAME: 13824 case ScriptBaseClass.OBJECT_NAME:
13825 ret.Add(new LSL_String(obj.Name)); 13825 ret.Add(new LSL_String(obj.Name));
13826 break; 13826 break;
13827 case ScriptBaseClass.OBJECT_DESC: 13827 case ScriptBaseClass.OBJECT_DESC:
13828 ret.Add(new LSL_String(obj.Description)); 13828 ret.Add(new LSL_String(obj.Description));
13829 break; 13829 break;
13830 case ScriptBaseClass.OBJECT_POS: 13830 case ScriptBaseClass.OBJECT_POS:
@@ -13865,7 +13865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13865 } 13865 }
13866 else 13866 else
13867 { 13867 {
13868 vel = obj.Velocity; 13868 vel = obj.Velocity;
13869 } 13869 }
13870 13870
13871 ret.Add(vel); 13871 ret.Add(vel);
@@ -14263,8 +14263,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14263 ossl.CheckThreatLevel(ThreatLevel.High, "print"); 14263 ossl.CheckThreatLevel(ThreatLevel.High, "print");
14264 m_log.Info("LSL print():" + str); 14264 m_log.Info("LSL print():" + str);
14265 } 14265 }
14266 } 14266 }
14267 14267
14268 public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link) 14268 public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link)
14269 { 14269 {
14270 List<SceneObjectPart> parts = GetLinkParts(link); 14270 List<SceneObjectPart> parts = GetLinkParts(link);
@@ -14488,7 +14488,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14488 { 14488 {
14489 // get work copies 14489 // get work copies
14490 float sx = rayStart.X; 14490 float sx = rayStart.X;
14491 float ex = rayEnd.X; 14491 float ex = rayEnd.X;
14492 float sy = rayStart.Y; 14492 float sy = rayStart.Y;
14493 float ey = rayEnd.Y; 14493 float ey = rayEnd.Y;
14494 14494
@@ -14497,7 +14497,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14497 14497
14498 // region size info 14498 // region size info
14499 float rsx = World.RegionInfo.RegionSizeX; 14499 float rsx = World.RegionInfo.RegionSizeX;
14500 14500
14501 float tmp; 14501 float tmp;
14502 14502
14503 // region bounds 14503 // region bounds
@@ -14513,7 +14513,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14513 sy += dy * dx; 14513 sy += dy * dx;
14514 sx = 0; 14514 sx = 0;
14515 } 14515 }
14516 else if(sx >= rsx) 14516 else if(sx >= rsx)
14517 { 14517 {
14518 if(ex >= rsx) // totally outside 14518 if(ex >= rsx) // totally outside
14519 return null; 14519 return null;
@@ -14537,7 +14537,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14537 sx += dy * dx; 14537 sx += dy * dx;
14538 sy = 0; 14538 sy = 0;
14539 } 14539 }
14540 else if(sy >= rsy) 14540 else if(sy >= rsy)
14541 { 14541 {
14542 if(dy >= 0) // out and going away 14542 if(dy >= 0) // out and going away
14543 return null; 14543 return null;
@@ -14875,7 +14875,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14875 { 14875 {
14876 return a.Depth.CompareTo(b.Depth); 14876 return a.Depth.CompareTo(b.Depth);
14877 }); 14877 });
14878 14878
14879 int values = 0; 14879 int values = 0;
14880 SceneObjectGroup thisgrp = m_host.ParentGroup; 14880 SceneObjectGroup thisgrp = m_host.ParentGroup;
14881 14881
@@ -14931,7 +14931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14931 list.Add(new LSL_Integer(values)); 14931 list.Add(new LSL_Integer(values));
14932 return list; 14932 return list;
14933 } 14933 }
14934 14934
14935 14935
14936 /// <summary> 14936 /// <summary>
14937 /// Implementation of llCastRay similar to SL 2015-04-21. 14937 /// Implementation of llCastRay similar to SL 2015-04-21.
@@ -15076,7 +15076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15076 isNonphysical = !isPhysical; 15076 isNonphysical = !isPhysical;
15077 isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) || 15077 isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) ||
15078 (part.VolumeDetectActive); 15078 (part.VolumeDetectActive);
15079 15079
15080 if (isPhysical && rejectPhysical) 15080 if (isPhysical && rejectPhysical)
15081 continue; 15081 continue;
15082 if (isNonphysical && rejectNonphysical) 15082 if (isNonphysical && rejectNonphysical)
@@ -16291,7 +16291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16291 pos = sitroot.AbsolutePosition + pos * sitroot.GetWorldRotation(); 16291 pos = sitroot.AbsolutePosition + pos * sitroot.GetWorldRotation();
16292 } 16292 }
16293 else 16293 else
16294 pos = avatar.AbsolutePosition; 16294 pos = avatar.AbsolutePosition;
16295 16295
16296 res.Add(new LSL_Vector(pos.X,pos.Y,pos.Z)); 16296 res.Add(new LSL_Vector(pos.X,pos.Y,pos.Z));
16297 break; 16297 break;
@@ -16471,7 +16471,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16471 res.Add(new LSL_String("")); 16471 res.Add(new LSL_String(""));
16472 break; 16472 break;
16473 16473
16474 case (int)ScriptBaseClass.PRIM_ROT_LOCAL: 16474 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
16475 Quaternion lrot = avatar.Rotation; 16475 Quaternion lrot = avatar.Rotation;
16476 res.Add(new LSL_Rotation(lrot.X, lrot.Y, lrot.Z, lrot.W)); 16476 res.Add(new LSL_Rotation(lrot.X, lrot.Y, lrot.Z, lrot.W));
16477 break; 16477 break;
@@ -16577,7 +16577,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16577 presence.SetAnimationOverride("ALL", UUID.Zero); 16577 presence.SetAnimationOverride("ALL", UUID.Zero);
16578 return; 16578 return;
16579 } 16579 }
16580 16580
16581 string state = String.Empty; 16581 string state = String.Empty;
16582 16582
16583 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL) 16583 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
index 8cd065b..cec595d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
@@ -831,6 +831,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
831 } 831 }
832 832
833 return success; 833 return success;
834 } 834 }
835 } 835 }
836} 836}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 1e26036..692bec0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -107,14 +107,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
107 /// Dumps an error message on the debug console. 107 /// Dumps an error message on the debug console.
108 /// </summary> 108 /// </summary>
109 /// <param name='message'></param> 109 /// <param name='message'></param>
110 internal void MODShoutError(string message) 110 internal void MODShoutError(string message)
111 { 111 {
112 if (message.Length > 1023) 112 if (message.Length > 1023)
113 message = message.Substring(0, 1023); 113 message = message.Substring(0, 1023);
114 114
115 World.SimChat( 115 World.SimChat(
116 Utils.StringToBytes(message), 116 Utils.StringToBytes(message),
117 ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, 117 ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL,
118 m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); 118 m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
119 119
120 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 120 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// 125 ///
126 /// </summary> 126 /// </summary>
127 /// <param name="fname">The name of the function to invoke</param> 127 /// <param name="fname">The name of the function to invoke</param>
128 /// <param name="parms">List of parameters</param> 128 /// <param name="parms">List of parameters</param>
@@ -130,9 +130,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
130 public void modInvokeN(string fname, params object[] parms) 130 public void modInvokeN(string fname, params object[] parms)
131 { 131 {
132// m_log.DebugFormat( 132// m_log.DebugFormat(
133// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 133// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
134// fname, 134// fname,
135// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 135// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
136// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 136// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
137 137
138 Type returntype = m_comms.LookupReturnType(fname); 138 Type returntype = m_comms.LookupReturnType(fname);
@@ -145,9 +145,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
145 public LSL_String modInvokeS(string fname, params object[] parms) 145 public LSL_String modInvokeS(string fname, params object[] parms)
146 { 146 {
147// m_log.DebugFormat( 147// m_log.DebugFormat(
148// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 148// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
149// fname, 149// fname,
150// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 150// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
151// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 151// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
152 152
153 Type returntype = m_comms.LookupReturnType(fname); 153 Type returntype = m_comms.LookupReturnType(fname);
@@ -161,9 +161,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
161 public LSL_Integer modInvokeI(string fname, params object[] parms) 161 public LSL_Integer modInvokeI(string fname, params object[] parms)
162 { 162 {
163// m_log.DebugFormat( 163// m_log.DebugFormat(
164// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 164// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
165// fname, 165// fname,
166// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 166// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
167// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 167// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
168 168
169 Type returntype = m_comms.LookupReturnType(fname); 169 Type returntype = m_comms.LookupReturnType(fname);
@@ -173,13 +173,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
173 int result = (int)modInvoke(fname,parms); 173 int result = (int)modInvoke(fname,parms);
174 return new LSL_Integer(result); 174 return new LSL_Integer(result);
175 } 175 }
176 176
177 public LSL_Float modInvokeF(string fname, params object[] parms) 177 public LSL_Float modInvokeF(string fname, params object[] parms)
178 { 178 {
179// m_log.DebugFormat( 179// m_log.DebugFormat(
180// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 180// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
181// fname, 181// fname,
182// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 182// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
183// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 183// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
184 184
185 Type returntype = m_comms.LookupReturnType(fname); 185 Type returntype = m_comms.LookupReturnType(fname);
@@ -193,9 +193,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
193 public LSL_Key modInvokeK(string fname, params object[] parms) 193 public LSL_Key modInvokeK(string fname, params object[] parms)
194 { 194 {
195// m_log.DebugFormat( 195// m_log.DebugFormat(
196// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 196// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
197// fname, 197// fname,
198// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 198// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
199// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 199// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
200 200
201 Type returntype = m_comms.LookupReturnType(fname); 201 Type returntype = m_comms.LookupReturnType(fname);
@@ -209,9 +209,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
209 public LSL_Vector modInvokeV(string fname, params object[] parms) 209 public LSL_Vector modInvokeV(string fname, params object[] parms)
210 { 210 {
211// m_log.DebugFormat( 211// m_log.DebugFormat(
212// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 212// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
213// fname, 213// fname,
214// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 214// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
215// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 215// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
216 216
217 Type returntype = m_comms.LookupReturnType(fname); 217 Type returntype = m_comms.LookupReturnType(fname);
@@ -225,9 +225,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
225 public LSL_Rotation modInvokeR(string fname, params object[] parms) 225 public LSL_Rotation modInvokeR(string fname, params object[] parms)
226 { 226 {
227// m_log.DebugFormat( 227// m_log.DebugFormat(
228// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 228// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
229// fname, 229// fname,
230// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 230// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
231// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 231// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
232 232
233 Type returntype = m_comms.LookupReturnType(fname); 233 Type returntype = m_comms.LookupReturnType(fname);
@@ -241,9 +241,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
241 public LSL_List modInvokeL(string fname, params object[] parms) 241 public LSL_List modInvokeL(string fname, params object[] parms)
242 { 242 {
243// m_log.DebugFormat( 243// m_log.DebugFormat(
244// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 244// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
245// fname, 245// fname,
246// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 246// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
247// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 247// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
248 248
249 Type returntype = m_comms.LookupReturnType(fname); 249 Type returntype = m_comms.LookupReturnType(fname);
@@ -308,22 +308,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
308 } 308 }
309 309
310// m_log.DebugFormat( 310// m_log.DebugFormat(
311// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 311// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
312// fname, 312// fname,
313// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 313// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
314// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 314// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
315 315
316 Type[] signature = m_comms.LookupTypeSignature(fname); 316 Type[] signature = m_comms.LookupTypeSignature(fname);
317 if (signature.Length != parms.Length) 317 if (signature.Length != parms.Length)
318 MODError(String.Format("wrong number of parameters to function {0}",fname)); 318 MODError(String.Format("wrong number of parameters to function {0}",fname));
319 319
320 object[] convertedParms = new object[parms.Length]; 320 object[] convertedParms = new object[parms.Length];
321 for (int i = 0; i < parms.Length; i++) 321 for (int i = 0; i < parms.Length; i++)
322 convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname); 322 convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname);
323 323
324 // now call the function, the contract with the function is that it will always return 324 // now call the function, the contract with the function is that it will always return
325 // non-null but don't trust it completely 325 // non-null but don't trust it completely
326 try 326 try
327 { 327 {
328 object result = m_comms.InvokeOperation(m_host.UUID, m_item.ItemID, fname, convertedParms); 328 object result = m_comms.InvokeOperation(m_host.UUID, m_item.ItemID, fname, convertedParms);
329 if (result != null) 329 if (result != null)
@@ -342,7 +342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
342 342
343 return null; 343 return null;
344 } 344 }
345 345
346 /// <summary> 346 /// <summary>
347 /// Send a command to functions registered on an event 347 /// Send a command to functions registered on an event
348 /// </summary> 348 /// </summary>
@@ -365,7 +365,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
365 /// </summary> 365 /// </summary>
366 protected object ConvertFromLSL(object lslparm, Type type, string fname) 366 protected object ConvertFromLSL(object lslparm, Type type, string fname)
367 { 367 {
368 368
369 if(lslparm.GetType() == type) 369 if(lslparm.GetType() == type)
370 return lslparm; 370 return lslparm;
371 371
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
429 for (int i = 0; i < plist.Length; i++) 429 for (int i = 0; i < plist.Length; i++)
430 { 430 {
431 if (plist[i] is LSL_String) 431 if (plist[i] is LSL_String)
432 result[i] = (string)(LSL_String)plist[i]; 432 result[i] = (string)(LSL_String)plist[i];
433 else if (plist[i] is LSL_Integer) 433 else if (plist[i] is LSL_Integer)
434 result[i] = (int)(LSL_Integer)plist[i]; 434 result[i] = (int)(LSL_Integer)plist[i];
435 // The int check exists because of the many plain old int script constants in ScriptBase which 435 // The int check exists because of the many plain old int script constants in ScriptBase which
@@ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
451 return result; 451 return result;
452 } 452 }
453 } 453 }
454 454
455 MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType())); 455 MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType()));
456 return null; 456 return null;
457 } 457 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index ba5a46d..066f6a4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
142 internal float m_ScriptDelayFactor = 1.0f; 142 internal float m_ScriptDelayFactor = 1.0f;
143 internal float m_ScriptDistanceFactor = 1.0f; 143 internal float m_ScriptDistanceFactor = 1.0f;
144 internal bool m_debuggerSafe = false; 144 internal bool m_debuggerSafe = false;
145 internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); 145 internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
146 protected IUrlModule m_UrlModule = null; 146 protected IUrlModule m_UrlModule = null;
147 147
148 public void Initialize( 148 public void Initialize(
@@ -418,7 +418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
418 //Only gods may use the function 418 //Only gods may use the function
419 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) 419 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD"))
420 { 420 {
421 if (World.Permissions.IsGod(ownerID)) 421 if (World.Permissions.IsGod(ownerID))
422 { 422 {
423 return String.Empty; 423 return String.Empty;
424 } 424 }
@@ -427,7 +427,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
427 //Only grid gods may use the function 427 //Only grid gods may use the function
428 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) 428 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD"))
429 { 429 {
430 if (World.Permissions.IsGridGod(ownerID)) 430 if (World.Permissions.IsGridGod(ownerID))
431 { 431 {
432 return String.Empty; 432 return String.Empty;
433 } 433 }
@@ -856,11 +856,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
856 // { 856 // {
857 857
858 // We will launch the teleport on a new thread so that when the script threads are terminated 858 // We will launch the teleport on a new thread so that when the script threads are terminated
859 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. 859 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
860 Util.FireAndForget( 860 Util.FireAndForget(
861 o => World.RequestTeleportLocation( 861 o => World.RequestTeleportLocation(
862 presence.ControllingClient, regionName, position, 862 presence.ControllingClient, regionName, position,
863 lookat, (uint)TPFlags.ViaLocation), 863 lookat, (uint)TPFlags.ViaLocation),
864 null, "OSSL_Api.TeleportAgentByRegionCoords"); 864 null, "OSSL_Api.TeleportAgentByRegionCoords");
865 865
866 ScriptSleep(5000); 866 ScriptSleep(5000);
@@ -906,8 +906,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
906 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. 906 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
907 Util.FireAndForget( 907 Util.FireAndForget(
908 o => World.RequestTeleportLocation( 908 o => World.RequestTeleportLocation(
909 presence.ControllingClient, regionHandle, 909 presence.ControllingClient, regionHandle,
910 position, lookat, (uint)TPFlags.ViaLocation), 910 position, lookat, (uint)TPFlags.ViaLocation),
911 null, "OSSL_Api.TeleportAgentByRegionName"); 911 null, "OSSL_Api.TeleportAgentByRegionName");
912 912
913 ScriptSleep(5000); 913 ScriptSleep(5000);
@@ -972,13 +972,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
972 m_host.AddScriptLPS(1); 972 m_host.AddScriptLPS(1);
973 973
974 UUID targetID = new UUID(target); 974 UUID targetID = new UUID(target);
975 975
976 ForceSit(avatar, targetID); 976 ForceSit(avatar, targetID);
977 } 977 }
978 978
979 public void ForceSit(string avatar, UUID targetID) 979 public void ForceSit(string avatar, UUID targetID)
980 { 980 {
981 UUID agentID; 981 UUID agentID;
982 982
983 if (!UUID.TryParse(avatar, out agentID)) 983 if (!UUID.TryParse(avatar, out agentID))
984 return; 984 return;
@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1015 ScenePresence target = (ScenePresence)World.Entities[avatarID]; 1015 ScenePresence target = (ScenePresence)World.Entities[avatarID];
1016 return target.ControllingClient.RemoteEndPoint.Address.ToString(); 1016 return target.ControllingClient.RemoteEndPoint.Address.ToString();
1017 } 1017 }
1018 1018
1019 // fall through case, just return nothing 1019 // fall through case, just return nothing
1020 return ""; 1020 return "";
1021 } 1021 }
@@ -1058,7 +1058,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1058 ScenePresence target = null; 1058 ScenePresence target = null;
1059 if ((World.Entities[avatarID] is ScenePresence)) 1059 if ((World.Entities[avatarID] is ScenePresence))
1060 target = (ScenePresence)World.Entities[avatarID]; 1060 target = (ScenePresence)World.Entities[avatarID];
1061 1061
1062 if (target == null) 1062 if (target == null)
1063 return; 1063 return;
1064 1064
@@ -1115,8 +1115,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1115 else 1115 else
1116 animID = UUID.Zero; 1116 animID = UUID.Zero;
1117 } 1117 }
1118 1118
1119 1119
1120 if (animID == UUID.Zero) 1120 if (animID == UUID.Zero)
1121 target.Animator.RemoveAnimation(animation); 1121 target.Animator.RemoveAnimation(animation);
1122 else 1122 else
@@ -1257,7 +1257,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1257 public string osSetPenColor(string drawList, string color) 1257 public string osSetPenColor(string drawList, string color)
1258 { 1258 {
1259 CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); 1259 CheckThreatLevel(ThreatLevel.None, "osSetPenColor");
1260 1260
1261 m_host.AddScriptLPS(1); 1261 m_host.AddScriptLPS(1);
1262 drawList += "PenColor " + color + "; "; 1262 drawList += "PenColor " + color + "; ";
1263 return drawList; 1263 return drawList;
@@ -1780,7 +1780,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1780 } 1780 }
1781 return result; 1781 return result;
1782 } 1782 }
1783 1783
1784 private ArrayList osdToArray(OSDArray list) 1784 private ArrayList osdToArray(OSDArray list)
1785 { 1785 {
1786 ArrayList result = new ArrayList(); 1786 ArrayList result = new ArrayList();
@@ -1834,7 +1834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1834 m_host.AddScriptLPS(1); 1834 m_host.AddScriptLPS(1);
1835 1835
1836 Object decoded = osParseJSONNew(JSON); 1836 Object decoded = osParseJSONNew(JSON);
1837 1837
1838 if ( decoded is Hashtable ) { 1838 if ( decoded is Hashtable ) {
1839 return (Hashtable) decoded; 1839 return (Hashtable) decoded;
1840 } else if ( decoded is ArrayList ) { 1840 } else if ( decoded is ArrayList ) {
@@ -1902,7 +1902,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1902 { 1902 {
1903// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); 1903// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie");
1904 // if this is restricted to objects rezzed by this host level can be reduced 1904 // if this is restricted to objects rezzed by this host level can be reduced
1905 1905
1906 CheckThreatLevel(ThreatLevel.Low, "osDie"); 1906 CheckThreatLevel(ThreatLevel.Low, "osDie");
1907 m_host.AddScriptLPS(1); 1907 m_host.AddScriptLPS(1);
1908 1908
@@ -1931,7 +1931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1931 1931
1932 if (sceneOG.OwnerID != m_host.OwnerID) 1932 if (sceneOG.OwnerID != m_host.OwnerID)
1933 return; 1933 return;
1934 1934
1935 // harakiri check 1935 // harakiri check
1936 if(sceneOG.UUID == m_host.ParentGroup.UUID) 1936 if(sceneOG.UUID == m_host.ParentGroup.UUID)
1937 throw new SelfDeleteException(); 1937 throw new SelfDeleteException();
@@ -2042,16 +2042,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2042 if (assetID != UUID.Zero) 2042 if (assetID != UUID.Zero)
2043 { 2043 {
2044 StringBuilder notecardData = new StringBuilder(); 2044 StringBuilder notecardData = new StringBuilder();
2045 2045
2046 for (int count = 0; count < NotecardCache.GetLines(assetID); count++) 2046 for (int count = 0; count < NotecardCache.GetLines(assetID); count++)
2047 { 2047 {
2048 string line = NotecardCache.GetLine(assetID, count) + "\n"; 2048 string line = NotecardCache.GetLine(assetID, count) + "\n";
2049 2049
2050 // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line); 2050 // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line);
2051 2051
2052 notecardData.Append(line); 2052 notecardData.Append(line);
2053 } 2053 }
2054 2054
2055 return notecardData.ToString(); 2055 return notecardData.ToString();
2056 } 2056 }
2057 2057
@@ -2086,7 +2086,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2086 2086
2087 if (a == null) 2087 if (a == null)
2088 { 2088 {
2089 // Whoops, it's still possible here that the notecard name was properly 2089 // Whoops, it's still possible here that the notecard name was properly
2090 // formatted like a UUID but isn't an asset UUID so lets look it up by name after all 2090 // formatted like a UUID but isn't an asset UUID so lets look it up by name after all
2091 assetID = SearchTaskInventoryForAssetId(notecardNameOrUuid); 2091 assetID = SearchTaskInventoryForAssetId(notecardNameOrUuid);
2092 if (assetID == UUID.Zero) 2092 if (assetID == UUID.Zero)
@@ -2291,7 +2291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2291 } 2291 }
2292 } 2292 }
2293 } 2293 }
2294 2294
2295 return ""; 2295 return "";
2296 } 2296 }
2297 2297
@@ -2429,7 +2429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2429 m_host.AddScriptLPS(1); 2429 m_host.AddScriptLPS(1);
2430 2430
2431 IConfigSource config = m_ScriptEngine.ConfigSource; 2431 IConfigSource config = m_ScriptEngine.ConfigSource;
2432 string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", 2432 string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI",
2433 new string[] { "Startup", "Hypergrid" }, String.Empty); 2433 new string[] { "Startup", "Hypergrid" }, String.Empty);
2434 2434
2435 if (!string.IsNullOrEmpty(HomeURI)) 2435 if (!string.IsNullOrEmpty(HomeURI))
@@ -2705,12 +2705,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2705 { 2705 {
2706 CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); 2706 CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
2707 m_host.AddScriptLPS(1); 2707 m_host.AddScriptLPS(1);
2708 2708
2709 // have to get the npc module also here to set the default Not Owned 2709 // have to get the npc module also here to set the default Not Owned
2710 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2710 INPCModule module = World.RequestModuleInterface<INPCModule>();
2711 if(module == null) 2711 if(module == null)
2712 return new LSL_Key(UUID.Zero.ToString()); 2712 return new LSL_Key(UUID.Zero.ToString());
2713 2713
2714 bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0; 2714 bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0;
2715 2715
2716 return NpcCreate(firstname, lastname, position, notecard, owned, false, false); 2716 return NpcCreate(firstname, lastname, position, notecard, owned, false, false);
@@ -2795,7 +2795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2795 groupTitle = "- NPC -"; 2795 groupTitle = "- NPC -";
2796 } 2796 }
2797 } 2797 }
2798 2798
2799 if((createFlags & NPCOptionsFlags.AllowCloneOtherAvatars) != 0) 2799 if((createFlags & NPCOptionsFlags.AllowCloneOtherAvatars) != 0)
2800 { 2800 {
2801 UUID id; 2801 UUID id;
@@ -2973,7 +2973,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2973 2973
2974 if (!module.CheckPermissions(npcId, m_host.OwnerID)) 2974 if (!module.CheckPermissions(npcId, m_host.OwnerID))
2975 return; 2975 return;
2976 2976
2977 module.MoveToTarget(npcId, World, pos, false, true, false); 2977 module.MoveToTarget(npcId, World, pos, false, true, false);
2978 } 2978 }
2979 } 2979 }
@@ -3202,7 +3202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3202 if (!module.CheckPermissions(npcId, m_host.OwnerID)) 3202 if (!module.CheckPermissions(npcId, m_host.OwnerID))
3203 return; 3203 return;
3204 3204
3205 module.DeleteNPC(npcId, World); 3205 module.DeleteNPC(npcId, World);
3206 } 3206 }
3207 } 3207 }
3208 catch { } 3208 catch { }
@@ -3259,7 +3259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3259 { 3259 {
3260 CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); 3260 CheckThreatLevel(ThreatLevel.High, "osNpcTouch");
3261 m_host.AddScriptLPS(1); 3261 m_host.AddScriptLPS(1);
3262 3262
3263 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3263 INPCModule module = World.RequestModuleInterface<INPCModule>();
3264 int linkNum = link_num.value; 3264 int linkNum = link_num.value;
3265 if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS)) 3265 if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS))
@@ -3400,7 +3400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3400 bool isMale = vpShapeMale > 0.5f; 3400 bool isMale = vpShapeMale > 0.5f;
3401 return new LSL_String(isMale ? "male" : "female"); 3401 return new LSL_String(isMale ? "male" : "female");
3402 } 3402 }
3403 3403
3404 /// <summary> 3404 /// <summary>
3405 /// Get current region's map texture UUID 3405 /// Get current region's map texture UUID
3406 /// </summary> 3406 /// </summary>
@@ -3441,7 +3441,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3441 3441
3442 return key.ToString(); 3442 return key.ToString();
3443 } 3443 }
3444 3444
3445 /// <summary> 3445 /// <summary>
3446 /// Return information regarding various simulator statistics (sim fps, physics fps, time 3446 /// Return information regarding various simulator statistics (sim fps, physics fps, time
3447 /// dilation, total number of prims, total number of active scripts, script lps, various 3447 /// dilation, total number of prims, total number of active scripts, script lps, various
@@ -3455,7 +3455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3455 m_host.AddScriptLPS(1); 3455 m_host.AddScriptLPS(1);
3456 LSL_List ret = new LSL_List(); 3456 LSL_List ret = new LSL_List();
3457 float[] stats = World.StatsReporter.LastReportedSimStats; 3457 float[] stats = World.StatsReporter.LastReportedSimStats;
3458 3458
3459 for (int i = 0; i < 21; i++) 3459 for (int i = 0; i < 21; i++)
3460 { 3460 {
3461 ret.Add(new LSL_Float(stats[i])); 3461 ret.Add(new LSL_Float(stats[i]));
@@ -3488,7 +3488,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3488 3488
3489 return (int)pws; 3489 return (int)pws;
3490 } 3490 }
3491 3491
3492 public void osSetSpeed(string UUID, LSL_Float SpeedModifier) 3492 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
3493 { 3493 {
3494 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 3494 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
@@ -3498,7 +3498,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3498 if (avatar != null) 3498 if (avatar != null)
3499 avatar.SpeedModifier = (float)SpeedModifier; 3499 avatar.SpeedModifier = (float)SpeedModifier;
3500 } 3500 }
3501 3501
3502 public void osKickAvatar(string FirstName, string SurName, string alert) 3502 public void osKickAvatar(string FirstName, string SurName, string alert)
3503 { 3503 {
3504 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 3504 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
@@ -3528,7 +3528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3528 if (presence != null) health = presence.Health; 3528 if (presence != null) health = presence.Health;
3529 return health; 3529 return health;
3530 } 3530 }
3531 3531
3532 public void osCauseDamage(string avatar, double damage) 3532 public void osCauseDamage(string avatar, double damage)
3533 { 3533 {
3534 CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); 3534 CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
@@ -3537,7 +3537,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3537 UUID avatarId = new UUID(avatar); 3537 UUID avatarId = new UUID(avatar);
3538 Vector3 pos = m_host.GetWorldPosition(); 3538 Vector3 pos = m_host.GetWorldPosition();
3539 3539
3540 ScenePresence presence = World.GetScenePresence(avatarId); 3540 ScenePresence presence = World.GetScenePresence(avatarId);
3541 if (presence != null) 3541 if (presence != null)
3542 { 3542 {
3543 LandData land = World.GetLandData(pos); 3543 LandData land = World.GetLandData(pos);
@@ -3556,7 +3556,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3556 } 3556 }
3557 } 3557 }
3558 } 3558 }
3559 3559
3560 public void osCauseHealing(string avatar, double healing) 3560 public void osCauseHealing(string avatar, double healing)
3561 { 3561 {
3562 CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); 3562 CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
@@ -3625,7 +3625,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3625 CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); 3625 CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
3626 m_host.AddScriptLPS(1); 3626 m_host.AddScriptLPS(1);
3627 InitLSL(); 3627 InitLSL();
3628 3628
3629 return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); 3629 return m_LSL_Api.GetPrimitiveParamsEx(prim, rules);
3630 } 3630 }
3631 3631
@@ -3634,12 +3634,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3634 CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams"); 3634 CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams");
3635 m_host.AddScriptLPS(1); 3635 m_host.AddScriptLPS(1);
3636 InitLSL(); 3636 InitLSL();
3637 3637
3638 m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); 3638 m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams");
3639 } 3639 }
3640 3640
3641 /// <summary> 3641 /// <summary>
3642 /// Set parameters for light projection in host prim 3642 /// Set parameters for light projection in host prim
3643 /// </summary> 3643 /// </summary>
3644 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) 3644 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
3645 { 3645 {
@@ -3723,7 +3723,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3723 /// Get the description from an inventory item 3723 /// Get the description from an inventory item
3724 /// </summary> 3724 /// </summary>
3725 /// <param name="inventoryName"></param> 3725 /// <param name="inventoryName"></param>
3726 /// <returns>Item description</returns> 3726 /// <returns>Item description</returns>
3727 public LSL_String osGetInventoryDesc(string item) 3727 public LSL_String osGetInventoryDesc(string item)
3728 { 3728 {
3729 m_host.AddScriptLPS(1); 3729 m_host.AddScriptLPS(1);
@@ -3921,7 +3921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3921 if (item.InvType != (int)InventoryType.Object) 3921 if (item.InvType != (int)InventoryType.Object)
3922 { 3922 {
3923 // FIXME: Temporary null check for regression tests since they dont' have the infrastructure to set 3923 // FIXME: Temporary null check for regression tests since they dont' have the infrastructure to set
3924 // up the api reference. 3924 // up the api reference.
3925 if (m_LSL_Api != null) 3925 if (m_LSL_Api != null)
3926 ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName)); 3926 ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName));
3927 3927
@@ -4002,10 +4002,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4002 UUID targetUUID; 4002 UUID targetUUID;
4003 if(!UUID.TryParse(avatar.ToString(), out targetUUID)) 4003 if(!UUID.TryParse(avatar.ToString(), out targetUUID))
4004 return; 4004 return;
4005 4005
4006 if(targetUUID == UUID.Zero) 4006 if(targetUUID == UUID.Zero)
4007 return; 4007 return;
4008 4008
4009 ScenePresence target; 4009 ScenePresence target;
4010 if(!World.TryGetScenePresence(targetUUID, out target)) 4010 if(!World.TryGetScenePresence(targetUUID, out target))
4011 return; 4011 return;
@@ -4068,7 +4068,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4068 return; 4068 return;
4069 } 4069 }
4070 4070
4071 bool optionObjCreator = (options & 4071 bool optionObjCreator = (options &
4072 ScriptBaseClass.OS_ATTACH_MSG_OBJECT_CREATOR) != 0; 4072 ScriptBaseClass.OS_ATTACH_MSG_OBJECT_CREATOR) != 0;
4073 bool optionScriptCreator = (options & 4073 bool optionScriptCreator = (options &
4074 ScriptBaseClass.OS_ATTACH_MSG_SCRIPT_CREATOR) != 0; 4074 ScriptBaseClass.OS_ATTACH_MSG_SCRIPT_CREATOR) != 0;
@@ -4316,7 +4316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4316 { 4316 {
4317 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); 4317 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL");
4318 m_host.AddScriptLPS(1); 4318 m_host.AddScriptLPS(1);
4319 4319
4320 Hashtable opts = new Hashtable(); 4320 Hashtable opts = new Hashtable();
4321 for (int i = 0 ; i < options.Length ; i++) 4321 for (int i = 0 ; i < options.Length ; i++)
4322 { 4322 {
@@ -4334,7 +4334,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4334 { 4334 {
4335 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); 4335 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL");
4336 m_host.AddScriptLPS(1); 4336 m_host.AddScriptLPS(1);
4337 4337
4338 Hashtable opts = new Hashtable(); 4338 Hashtable opts = new Hashtable();
4339 for (int i = 0 ; i < options.Length ; i++) 4339 for (int i = 0 ; i < options.Length ; i++)
4340 { 4340 {
@@ -4362,7 +4362,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4362 m_host.CollisionSoundType = 0; // full return to default sounds 4362 m_host.CollisionSoundType = 0; // full return to default sounds
4363 else 4363 else
4364 m_host.CollisionSoundType = 2; // default sounds with volume 4364 m_host.CollisionSoundType = 2; // default sounds with volume
4365 m_host.aggregateScriptEvents(); 4365 m_host.aggregateScriptEvents();
4366 return; 4366 return;
4367 } 4367 }
4368 // TODO: Parameter check logic required. 4368 // TODO: Parameter check logic required.
@@ -4376,7 +4376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4376 else 4376 else
4377 m_host.CollisionSoundType = -1; 4377 m_host.CollisionSoundType = -1;
4378 4378
4379 m_host.aggregateScriptEvents(); 4379 m_host.aggregateScriptEvents();
4380 } 4380 }
4381 4381
4382 // still not very usefull, detector is lost on rez, restarts, etc 4382 // still not very usefull, detector is lost on rez, restarts, etc
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 7bfe27b..d401ed8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
351 // your head but the sensor will stay with your (global) 351 // your head but the sensor will stay with your (global)
352 // avatar rotation and position. 352 // avatar rotation and position.
353 // Position of a sensor in a child prim attached to an avatar 353 // Position of a sensor in a child prim attached to an avatar
354 // will be still wrong. 354 // will be still wrong.
355 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); 355 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
356 356
357 // Don't proceed if the avatar for this attachment has since been removed from the scene. 357 // Don't proceed if the avatar for this attachment has since been removed from the scene.
@@ -473,7 +473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
473 473
474 SceneObjectPart SensePoint = ts.host; 474 SceneObjectPart SensePoint = ts.host;
475 Vector3 fromRegionPos = SensePoint.GetWorldPosition(); 475 Vector3 fromRegionPos = SensePoint.GetWorldPosition();
476 476
477 Quaternion q = SensePoint.GetWorldRotation(); 477 Quaternion q = SensePoint.GetWorldRotation();
478 if (SensePoint.ParentGroup.IsAttachment) 478 if (SensePoint.ParentGroup.IsAttachment)
479 { 479 {
@@ -486,7 +486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
486 // your head but the sensor will stay with your (global) 486 // your head but the sensor will stay with your (global)
487 // avatar rotation and position. 487 // avatar rotation and position.
488 // Position of a sensor in a child prim attached to an avatar 488 // Position of a sensor in a child prim attached to an avatar
489 // will be still wrong. 489 // will be still wrong.
490 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); 490 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
491 491
492 // Don't proceed if the avatar for this attachment has since been removed from the scene. 492 // Don't proceed if the avatar for this attachment has since been removed from the scene.
@@ -502,7 +502,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
502 bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); 502 bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0);
503 Vector3 toRegionPos; 503 Vector3 toRegionPos;
504 double dis; 504 double dis;
505 505
506 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => 506 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence =>
507 { 507 {
508// m_log.DebugFormat( 508// m_log.DebugFormat(
@@ -542,7 +542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
542 542
543 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) 543 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0)
544 return; 544 return;
545 545
546 // if the object the script is in is attached and the avatar is the owner 546 // if the object the script is in is attached and the avatar is the owner
547 // then this one is not wanted 547 // then this one is not wanted
548 if (attached && presence.UUID == SensePoint.OwnerID) 548 if (attached && presence.UUID == SensePoint.OwnerID)
@@ -700,7 +700,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
700 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); 700 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
701 701
702 AddSenseRepeater(ts); 702 AddSenseRepeater(ts);
703 703
704 idx += 6; 704 idx += 6;
705 } 705 }
706 } 706 }
@@ -716,6 +716,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
716 } 716 }
717 717
718 return retList; 718 return retList;
719 } 719 }
720 } 720 }
721} 721}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
index 5b1fdc0..cae1c14 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
@@ -200,6 +200,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
200 } 200 }
201 201
202 return retList; 202 return retList;
203 } 203 }
204 } 204 }
205} 205}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
index 16805e4..e6676b4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Api")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Api")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
index aa78aaa..7c518f3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
49 LSL_Vector modInvokeV(string fname, params object[] parms); 49 LSL_Vector modInvokeV(string fname, params object[] parms);
50 LSL_Rotation modInvokeR(string fname, params object[] parms); 50 LSL_Rotation modInvokeR(string fname, params object[] parms);
51 LSL_List modInvokeL(string fname, params object[] parms); 51 LSL_List modInvokeL(string fname, params object[] parms);
52 52
53 //Module functions 53 //Module functions
54 string modSendCommand(string modules, string command, string k); 54 string modSendCommand(string modules, string command, string k);
55 } 55 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 7415fea..bee060a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
54 NoAccess = -1, 54 NoAccess = -1,
55 55
56 /// <summary> 56 /// <summary>
57 /// Function is no threat at all. It doesn't constitute a threat to 57 /// Function is no threat at all. It doesn't constitute a threat to
58 /// either users or the system and has no known side effects. 58 /// either users or the system and has no known side effects.
59 /// </summary> 59 /// </summary>
60 None = 0, 60 None = 0,
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
66 Nuisance = 1, 66 Nuisance = 1,
67 67
68 /// <summary> 68 /// <summary>
69 /// Extreme levels of abuse of this function can cause impaired 69 /// Extreme levels of abuse of this function can cause impaired
70 /// functioning of the region, or very gullible users can be tricked 70 /// functioning of the region, or very gullible users can be tricked
71 /// into experiencing harmless effects. 71 /// into experiencing harmless effects.
72 /// </summary> 72 /// </summary>
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
81 81
82 /// <summary> 82 /// <summary>
83 /// Intentional abuse can cause denial of service and crashes with 83 /// Intentional abuse can cause denial of service and crashes with
84 /// potential of data or state loss; or trusting users can be tricked 84 /// potential of data or state loss; or trusting users can be tricked
85 /// into embarrassing or uncomfortable situations. 85 /// into embarrassing or uncomfortable situations.
86 /// </summary> 86 /// </summary>
87 Moderate = 4, 87 Moderate = 4,
@@ -145,7 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
145 // Avatar Info Commands 145 // Avatar Info Commands
146 string osGetAgentIP(string agent); 146 string osGetAgentIP(string agent);
147 LSL_List osGetAgents(); 147 LSL_List osGetAgents();
148 148
149 // Teleport commands 149 // Teleport commands
150 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 150 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
151 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 151 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 903b362..3a90c77 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -746,7 +746,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
746 public const int FRICTION = 2; 746 public const int FRICTION = 2;
747 public const int RESTITUTION = 4; 747 public const int RESTITUTION = 4;
748 public const int GRAVITY_MULTIPLIER = 8; 748 public const int GRAVITY_MULTIPLIER = 8;
749 749
750 // extra constants for llSetPrimMediaParams 750 // extra constants for llSetPrimMediaParams
751 public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); 751 public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0);
752 public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); 752 public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 9d36341..1a42c3a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1580,7 +1580,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1580 m_LSL_Functions.llSetVelocity(force, local); 1580 m_LSL_Functions.llSetVelocity(force, local);
1581 } 1581 }
1582 1582
1583 1583
1584 public void llSetAngularVelocity(LSL_Vector force, int local) 1584 public void llSetAngularVelocity(LSL_Vector force, int local)
1585 { 1585 {
1586 m_LSL_Functions.llSetAngularVelocity(force, local); 1586 m_LSL_Functions.llSetAngularVelocity(force, local);
@@ -1995,7 +1995,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1995 { 1995 {
1996 return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2); 1996 return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2);
1997 } 1997 }
1998 1998
1999 public LSL_List llGetPrimMediaParams(int face, LSL_List rules) 1999 public LSL_List llGetPrimMediaParams(int face, LSL_List rules)
2000 { 2000 {
2001 return m_LSL_Functions.llGetPrimMediaParams(face, rules); 2001 return m_LSL_Functions.llGetPrimMediaParams(face, rules);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index c34ccd0..6164734 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -539,7 +539,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
539 { 539 {
540 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start); 540 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
541 } 541 }
542 542
543 543
544 // Information about data loaded into the region 544 // Information about data loaded into the region
545 public string osLoadedCreationDate() 545 public string osLoadedCreationDate()
@@ -914,7 +914,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
914 { 914 {
915 return m_OSSL_Functions.osGetRegionMapTexture(regionName); 915 return m_OSSL_Functions.osGetRegionMapTexture(regionName);
916 } 916 }
917 917
918 public LSL_List osGetRegionStats() 918 public LSL_List osGetRegionStats()
919 { 919 {
920 return m_OSSL_Functions.osGetRegionStats(); 920 return m_OSSL_Functions.osGetRegionStats();
@@ -934,12 +934,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
934 { 934 {
935 return m_OSSL_Functions.osGetSimulatorMemory(); 935 return m_OSSL_Functions.osGetSimulatorMemory();
936 } 936 }
937 937
938 public void osKickAvatar(string FirstName,string SurName,string alert) 938 public void osKickAvatar(string FirstName,string SurName,string alert)
939 { 939 {
940 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); 940 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
941 } 941 }
942 942
943 public void osSetSpeed(string UUID, LSL_Float SpeedModifier) 943 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
944 { 944 {
945 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); 945 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
@@ -954,7 +954,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
954 { 954 {
955 m_OSSL_Functions.osCauseDamage(avatar, damage); 955 m_OSSL_Functions.osCauseDamage(avatar, damage);
956 } 956 }
957 957
958 public void osCauseHealing(string avatar, double healing) 958 public void osCauseHealing(string avatar, double healing)
959 { 959 {
960 m_OSSL_Functions.osCauseHealing(avatar, healing); 960 m_OSSL_Functions.osCauseHealing(avatar, healing);
@@ -984,12 +984,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
984 { 984 {
985 m_OSSL_Functions.osForceOtherSit(avatar, target); 985 m_OSSL_Functions.osForceOtherSit(avatar, target);
986 } 986 }
987 987
988 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) 988 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
989 { 989 {
990 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules); 990 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
991 } 991 }
992 992
993 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) 993 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
994 { 994 {
995 m_OSSL_Functions.osSetPrimitiveParams(prim, rules); 995 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
index b1825ac..81020f1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Api.Runtime")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Api.Runtime")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index bc6ce4f..031f00a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -433,9 +433,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
433 if (m_insertCoopTerminationChecks) 433 if (m_insertCoopTerminationChecks)
434 { 434 {
435 // We have to check in event functions as well because the user can manually call these. 435 // We have to check in event functions as well because the user can manually call these.
436 if (previousSymbol is GlobalFunctionDefinition 436 if (previousSymbol is GlobalFunctionDefinition
437 || previousSymbol is WhileStatement 437 || previousSymbol is WhileStatement
438 || previousSymbol is DoWhileStatement 438 || previousSymbol is DoWhileStatement
439 || previousSymbol is ForLoop 439 || previousSymbol is ForLoop
440 || previousSymbol is StateEvent) 440 || previousSymbol is StateEvent)
441 GenerateIndentedLine(m_coopTerminationCheck, sb); 441 GenerateIndentedLine(m_coopTerminationCheck, sb);
@@ -474,8 +474,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
474 { 474 {
475 // A non-braced single line do while structure cannot contain multiple statements. 475 // A non-braced single line do while structure cannot contain multiple statements.
476 // So to insert the termination check we change this to a braced control structure instead. 476 // So to insert the termination check we change this to a braced control structure instead.
477 if (previousSymbol is WhileStatement 477 if (previousSymbol is WhileStatement
478 || previousSymbol is DoWhileStatement 478 || previousSymbol is DoWhileStatement
479 || previousSymbol is ForLoop) 479 || previousSymbol is ForLoop)
480 { 480 {
481 transformToBlock = true; 481 transformToBlock = true;
@@ -530,7 +530,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
530 // This code checks for LSL of the following forms, and generates a 530 // This code checks for LSL of the following forms, and generates a
531 // warning if it finds them. 531 // warning if it finds them.
532 // 532 //
533 // list l = [ "foo" ]; 533 // list l = [ "foo" ];
534 // l = (l=[]) + l + ["bar"]; 534 // l = (l=[]) + l + ["bar"];
535 // (produces l=["foo","bar"] in SL but l=["bar"] in OS) 535 // (produces l=["foo","bar"] in SL but l=["bar"] in OS)
536 // 536 //
@@ -758,7 +758,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
758 for (int i = 0; i < fls.kids.Count; i++) 758 for (int i = 0; i < fls.kids.Count; i++)
759 { 759 {
760 SYMBOL s = (SYMBOL)fls.kids[i]; 760 SYMBOL s = (SYMBOL)fls.kids[i];
761 761
762 // Statements surrounded by parentheses in for loops 762 // Statements surrounded by parentheses in for loops
763 // 763 //
764 // e.g. for ((i = 0), (j = 7); (i < 10); (++i)) 764 // e.g. for ((i = 0), (j = 7); (i < 10); (++i))
@@ -774,7 +774,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
774 // like it would be considerably more complicated to handle). 774 // like it would be considerably more complicated to handle).
775 while (s is ParenthesisExpression) 775 while (s is ParenthesisExpression)
776 s = (SYMBOL)s.kids.Pop(); 776 s = (SYMBOL)s.kids.Pop();
777 777
778 GenerateNodeToSB(fls, s, sb); 778 GenerateNodeToSB(fls, s, sb);
779 if (0 < comma--) 779 if (0 < comma--)
780 Generate(", ", sb); 780 Generate(", ", sb);
@@ -891,9 +891,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
891 else if (value is OpenMetaverse.Quaternion) 891 else if (value is OpenMetaverse.Quaternion)
892 retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString()); 892 retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString());
893 else retval = id; 893 else retval = id;
894 894
895 Generate(retval, s, sb); 895 Generate(retval, s, sb);
896 return; 896 return;
897 } 897 }
898 } 898 }
899 899
@@ -911,7 +911,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
911 string modinvoke = null; 911 string modinvoke = null;
912 if (m_comms != null) 912 if (m_comms != null)
913 modinvoke = m_comms.LookupModInvocation(fc.Id); 913 modinvoke = m_comms.LookupModInvocation(fc.Id);
914 914
915 if (modinvoke != null) 915 if (modinvoke != null)
916 { 916 {
917 if (fc.kids[0] is ArgumentList) 917 if (fc.kids[0] is ArgumentList)
@@ -926,7 +926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
926 { 926 {
927 Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb); 927 Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb);
928 } 928 }
929 929
930 foreach (SYMBOL kid in fc.kids) 930 foreach (SYMBOL kid in fc.kids)
931 GenerateNodeToSB(fc, kid, sb); 931 GenerateNodeToSB(fc, kid, sb);
932 932
@@ -1124,7 +1124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
1124 { 1124 {
1125 Indent(sb); 1125 Indent(sb);
1126 sb.Append(s); 1126 sb.Append(s);
1127 1127
1128 if (null != sym) 1128 if (null != sym)
1129 m_positionMap.Add(new KeyValuePair<int, int>(m_CSharpLine, m_CSharpCol), new KeyValuePair<int, int>(sym.Line, sym.Position)); 1129 m_positionMap.Add(new KeyValuePair<int, int>(m_CSharpLine, m_CSharpCol), new KeyValuePair<int, int>(sym.Line, sym.Position));
1130 1130
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs
index 7a2a4a0..19a248f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
84 if (word.StartsWith("ll")) return false; 84 if (word.StartsWith("ll")) return false;
85 char first = word.ToCharArray(0,1)[0]; 85 char first = word.ToCharArray(0,1)[0];
86 if (first >= 'A' && first <= 'Z') return false; 86 if (first >= 'A' && first <= 'Z') return false;
87 87
88 return (reservedWords.BinarySearch(word) >= 0); 88 return (reservedWords.BinarySearch(word) >= 0);
89 } 89 }
90 } 90 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index f632cb0..f3b8e1d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
119 { 119 {
120 in_startup = false; 120 in_startup = false;
121 CheckOrCreateScriptsDirectory(); 121 CheckOrCreateScriptsDirectory();
122 122
123 // First time we start? Delete old files 123 // First time we start? Delete old files
124 if (DeleteScriptsOnStartup) 124 if (DeleteScriptsOnStartup)
125 DeleteOldFiles(); 125 DeleteOldFiles();
@@ -310,9 +310,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
310 { 310 {
311// m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); 311// m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name);
312 312
313 // If we have already read this linemap file, then it will be in our dictionary. 313 // If we have already read this linemap file, then it will be in our dictionary.
314 // Don't build another copy of the dictionary (saves memory) and certainly 314 // Don't build another copy of the dictionary (saves memory) and certainly
315 // don't keep reading the same file from disk multiple times. 315 // don't keep reading the same file from disk multiple times.
316 if (!m_lineMaps.ContainsKey(assembly)) 316 if (!m_lineMaps.ContainsKey(assembly))
317 m_lineMaps[assembly] = ReadMapFile(assembly + ".map"); 317 m_lineMaps[assembly] = ReadMapFile(assembly + ".map");
318 linemap = m_lineMaps[assembly]; 318 linemap = m_lineMaps[assembly];
@@ -366,8 +366,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
366 366
367 LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls); 367 LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls);
368 AddCSScriptHeader( 368 AddCSScriptHeader(
369 m_scriptEngine.ScriptClassName, 369 m_scriptEngine.ScriptClassName,
370 m_scriptEngine.ScriptBaseClassName, 370 m_scriptEngine.ScriptBaseClassName,
371 m_scriptEngine.ScriptBaseClassParameters, 371 m_scriptEngine.ScriptBaseClassParameters,
372 sb); 372 sb);
373 373
@@ -381,20 +381,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
381 } 381 }
382 382
383 linemap = ((CSCodeGenerator)LSL_Converter).PositionMap; 383 linemap = ((CSCodeGenerator)LSL_Converter).PositionMap;
384 // Write the linemap to a file and save it in our dictionary for next time. 384 // Write the linemap to a file and save it in our dictionary for next time.
385 m_lineMaps[assembly] = linemap; 385 m_lineMaps[assembly] = linemap;
386 WriteMapFile(assembly + ".map", linemap); 386 WriteMapFile(assembly + ".map", linemap);
387 LSL_Converter.Clear(); 387 LSL_Converter.Clear();
388 } 388 }
389 else 389 else
390 { 390 {
391 switch (language) 391 switch (language)
392 { 392 {
393 case enumCompileType.cs: 393 case enumCompileType.cs:
394 compileScript = CreateCSCompilerScript( 394 compileScript = CreateCSCompilerScript(
395 compileScript, 395 compileScript,
396 m_scriptEngine.ScriptClassName, 396 m_scriptEngine.ScriptClassName,
397 m_scriptEngine.ScriptBaseClassName, 397 m_scriptEngine.ScriptBaseClassName,
398 m_scriptEngine.ScriptBaseClassParameters); 398 m_scriptEngine.ScriptBaseClassParameters);
399 break; 399 break;
400 case enumCompileType.vb: 400 case enumCompileType.vb:
@@ -434,22 +434,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
434 public static void AddCSScriptHeader(string className, string baseClassName, ParameterInfo[] constructorParameters, StringBuilder sb) 434 public static void AddCSScriptHeader(string className, string baseClassName, ParameterInfo[] constructorParameters, StringBuilder sb)
435 { 435 {
436 sb.Append(string.Format( 436 sb.Append(string.Format(
437@"using OpenSim.Region.ScriptEngine.Shared; 437@"using OpenSim.Region.ScriptEngine.Shared;
438using System.Collections.Generic; 438using System.Collections.Generic;
439 439
440namespace SecondLife 440namespace SecondLife
441{{ 441{{
442 public class {0} : {1} 442 public class {0} : {1}
443 {{ 443 {{
444 public {0}({2}) : base({3}) {{}} 444 public {0}({2}) : base({3}) {{}}
445", 445",
446 className, 446 className,
447 baseClassName, 447 baseClassName,
448 constructorParameters != null 448 constructorParameters != null
449 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString())) 449 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString()))
450 : "", 450 : "",
451 constructorParameters != null 451 constructorParameters != null
452 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name)) 452 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name))
453 : "" 453 : ""
454 )); 454 ));
455 } 455 }
@@ -462,26 +462,26 @@ namespace SecondLife
462 public static string CreateCSCompilerScript( 462 public static string CreateCSCompilerScript(
463 string compileScript, string className, string baseClassName, ParameterInfo[] constructorParameters) 463 string compileScript, string className, string baseClassName, ParameterInfo[] constructorParameters)
464 { 464 {
465 compileScript = string.Format( 465 compileScript = string.Format(
466@"using OpenSim.Region.ScriptEngine.Shared; 466@"using OpenSim.Region.ScriptEngine.Shared;
467using System.Collections.Generic; 467using System.Collections.Generic;
468 468
469namespace SecondLife 469namespace SecondLife
470{{ 470{{
471 public class {0} : {1} 471 public class {0} : {1}
472 {{ 472 {{
473 public {0}({2}) : base({3}) {{}} 473 public {0}({2}) : base({3}) {{}}
474{4} 474{4}
475 }} 475 }}
476}}", 476}}",
477 className, 477 className,
478 baseClassName, 478 baseClassName,
479 constructorParameters != null 479 constructorParameters != null
480 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString())) 480 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString()))
481 : "", 481 : "",
482 constructorParameters != null 482 constructorParameters != null
483 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name)) 483 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name))
484 : "", 484 : "",
485 compileScript); 485 compileScript);
486 486
487 return compileScript; 487 return compileScript;
@@ -508,7 +508,7 @@ namespace SecondLife
508 internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly) 508 internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly)
509 { 509 {
510// m_log.DebugFormat("[Compiler]: Compiling to assembly\n{0}", Script); 510// m_log.DebugFormat("[Compiler]: Compiling to assembly\n{0}", Script);
511 511
512 string ext = "." + lang.ToString(); 512 string ext = "." + lang.ToString();
513 513
514 // Output assembly name 514 // Output assembly name
@@ -562,7 +562,7 @@ namespace SecondLife
562 562
563 if (m_scriptEngine.ScriptReferencedAssemblies != null) 563 if (m_scriptEngine.ScriptReferencedAssemblies != null)
564 Array.ForEach<string>( 564 Array.ForEach<string>(
565 m_scriptEngine.ScriptReferencedAssemblies, 565 m_scriptEngine.ScriptReferencedAssemblies,
566 a => parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, a))); 566 a => parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, a)));
567 567
568 parameters.GenerateExecutable = false; 568 parameters.GenerateExecutable = false;
@@ -571,7 +571,7 @@ namespace SecondLife
571 //parameters.WarningLevel = 1; // Should be 4? 571 //parameters.WarningLevel = 1; // Should be 4?
572 parameters.TreatWarningsAsErrors = false; 572 parameters.TreatWarningsAsErrors = false;
573 parameters.GenerateInMemory = false; 573 parameters.GenerateInMemory = false;
574 574
575 CompilerResults results; 575 CompilerResults results;
576 576
577 CodeDomProvider provider; 577 CodeDomProvider provider;
@@ -605,7 +605,7 @@ namespace SecondLife
605// results = CScodeProvider.CompileAssemblyFromSource( 605// results = CScodeProvider.CompileAssemblyFromSource(
606// parameters, Script); 606// parameters, Script);
607// } 607// }
608 608
609 results = provider.CompileAssemblyFromSource( 609 results = provider.CompileAssemblyFromSource(
610 parameters, Script); 610 parameters, Script);
611 // Deal with an occasional segv in the compiler. 611 // Deal with an occasional segv in the compiler.
@@ -685,14 +685,14 @@ namespace SecondLife
685 } 685 }
686 686
687 provider.Dispose(); 687 provider.Dispose();
688 688
689 if (hadErrors) 689 if (hadErrors)
690 { 690 {
691 throw new Exception(errtext); 691 throw new Exception(errtext);
692 } 692 }
693 693
694 // On today's highly asynchronous systems, the result of 694 // On today's highly asynchronous systems, the result of
695 // the compile may not be immediately apparent. Wait a 695 // the compile may not be immediately apparent. Wait a
696 // reasonable amount of time before giving up on it. 696 // reasonable amount of time before giving up on it.
697 697
698 if (!File.Exists(assembly)) 698 if (!File.Exists(assembly))
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
index 7966f59..304cd81 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.CodeTools")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.CodeTools")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
index ad4ccf0..12ba4de 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
81 m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); 81 m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve);
82 82
83 System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; 83 System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler;
84 84
85 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); 85 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll"));
86 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); 86 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll"));
87 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); 87 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll"));
@@ -112,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
112 CSCodeGenerator cg = new CSCodeGenerator(); 112 CSCodeGenerator cg = new CSCodeGenerator();
113 string output = cg.Convert(input); 113 string output = cg.Convert(input);
114 114
115 output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); 115 output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null);
116 // System.Console.WriteLine(output); 116 // System.Console.WriteLine(output);
117 117
118 positionMap = cg.PositionMap; 118 positionMap = cg.PositionMap;
@@ -154,7 +154,7 @@ erros position is better tested on viewers
154 @l; 154 @l;
155 i = 1; 155 i = 1;
156 } 156 }
157}", out positionMap); 157}", out positionMap);
158 158
159 Assert.AreEqual( 159 Assert.AreEqual(
160 new KeyValuePair<int, int>(7, 9), 160 new KeyValuePair<int, int>(7, 9),
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs
index 67ce10a..220ec72 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
150// TestHelpers.EnableLogging(); 150// TestHelpers.EnableLogging();
151 151
152 TestIntArgEvent("changed"); 152 TestIntArgEvent("changed");
153 } 153 }
154 154
155 [Test] 155 [Test]
156 public void TestCollisionEvent() 156 public void TestCollisionEvent()
@@ -159,7 +159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
159// TestHelpers.EnableLogging(); 159// TestHelpers.EnableLogging();
160 160
161 TestIntArgEvent("collision"); 161 TestIntArgEvent("collision");
162 } 162 }
163 163
164 [Test] 164 [Test]
165 public void TestCollisionStartEvent() 165 public void TestCollisionStartEvent()
@@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
168// TestHelpers.EnableLogging(); 168// TestHelpers.EnableLogging();
169 169
170 TestIntArgEvent("collision_start"); 170 TestIntArgEvent("collision_start");
171 } 171 }
172 172
173 [Test] 173 [Test]
174 public void TestCollisionEndEvent() 174 public void TestCollisionEndEvent()
@@ -177,7 +177,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
177// TestHelpers.EnableLogging(); 177// TestHelpers.EnableLogging();
178 178
179 TestIntArgEvent("collision_end"); 179 TestIntArgEvent("collision_end");
180 } 180 }
181 181
182 [Test] 182 [Test]
183 public void TestOnRezEvent() 183 public void TestOnRezEvent()
@@ -186,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
186// TestHelpers.EnableLogging(); 186// TestHelpers.EnableLogging();
187 187
188 TestIntArgEvent("on_rez"); 188 TestIntArgEvent("on_rez");
189 } 189 }
190 190
191 [Test] 191 [Test]
192 public void TestRunTimePermissionsEvent() 192 public void TestRunTimePermissionsEvent()
@@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
195// TestHelpers.EnableLogging(); 195// TestHelpers.EnableLogging();
196 196
197 TestIntArgEvent("run_time_permissions"); 197 TestIntArgEvent("run_time_permissions");
198 } 198 }
199 199
200 [Test] 200 [Test]
201 public void TestSensorEvent() 201 public void TestSensorEvent()
@@ -204,7 +204,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
204// TestHelpers.EnableLogging(); 204// TestHelpers.EnableLogging();
205 205
206 TestIntArgEvent("sensor"); 206 TestIntArgEvent("sensor");
207 } 207 }
208 208
209 [Test] 209 [Test]
210 public void TestTouchEvent() 210 public void TestTouchEvent()
@@ -213,7 +213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
213// TestHelpers.EnableLogging(); 213// TestHelpers.EnableLogging();
214 214
215 TestIntArgEvent("touch"); 215 TestIntArgEvent("touch");
216 } 216 }
217 217
218 [Test] 218 [Test]
219 public void TestTouchStartEvent() 219 public void TestTouchStartEvent()
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
222// TestHelpers.EnableLogging(); 222// TestHelpers.EnableLogging();
223 223
224 TestIntArgEvent("touch_start"); 224 TestIntArgEvent("touch_start");
225 } 225 }
226 226
227 [Test] 227 [Test]
228 public void TestTouchEndEvent() 228 public void TestTouchEndEvent()
@@ -231,7 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
231// TestHelpers.EnableLogging(); 231// TestHelpers.EnableLogging();
232 232
233 TestIntArgEvent("touch_end"); 233 TestIntArgEvent("touch_end");
234 } 234 }
235 235
236 [Test] 236 [Test]
237 public void TestLandCollisionEvent() 237 public void TestLandCollisionEvent()
@@ -351,8 +351,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
351 } 351 }
352 352
353 Assert.That( 353 Assert.That(
354 gotException, 354 gotException,
355 Is.EqualTo(expectException), 355 Is.EqualTo(expectException),
356 "Failed on {0}, exception {1}", script, ge != null ? ge.ToString() : "n/a"); 356 "Failed on {0}, exception {1}", script, ge != null ? ge.ToString() : "n/a");
357 } 357 }
358 } 358 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs
index f87f446..66210b7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs
@@ -379,7 +379,7 @@ public override int yynum { get { return 96; }}
379 public FLOAT_CONSTANT(Lexer yyl):base(yyl) {}} 379 public FLOAT_CONSTANT(Lexer yyl):base(yyl) {}}
380//%|LSLTokens 380//%|LSLTokens
381public class yyLSLTokens : YyLexer { 381public class yyLSLTokens : YyLexer {
382 public yyLSLTokens(ErrorHandler eh):base(eh) { arr = new int[] { 382 public yyLSLTokens(ErrorHandler eh):base(eh) { arr = new int[] {
383101,4,6,52,0, 383101,4,6,52,0,
38446,0,53,0,6, 38446,0,53,0,6,
385102,4,16,117,0, 385102,4,16,117,0,
@@ -19717,13 +19717,13 @@ public override TOKEN OldAction(Lexer yym,ref string yytext,int action, ref bool
19717 break; 19717 break;
19718 case 1063: ; 19718 case 1063: ;
19719 break; 19719 break;
19720 case 1076: ; 19720 case 1076: ;
19721 break; 19721 break;
19722 case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); } 19722 case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); }
19723 break; 19723 break;
19724 case 1067: ; 19724 case 1067: ;
19725 break; 19725 break;
19726 case 1072: ; 19726 case 1072: ;
19727 break; 19727 break;
19728 case 1003: { ((LSLTokens)yym).str += "\\\""; } 19728 case 1003: { ((LSLTokens)yym).str += "\\\""; }
19729 break; 19729 break;
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs
index 5fef83c..e4b5891 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs
@@ -886,1493 +886,1493 @@ public IncrementDecrementExpression(Parser yyp):base(yyp){}}
886 886
887public class LSLProgramRoot_1 : LSLProgramRoot { 887public class LSLProgramRoot_1 : LSLProgramRoot {
888 public LSLProgramRoot_1(Parser yyq):base(yyq, 888 public LSLProgramRoot_1(Parser yyq):base(yyq,
889 ((GlobalDefinitions)(yyq.StackAt(1).m_value)) 889 ((GlobalDefinitions)(yyq.StackAt(1).m_value))
890 , 890 ,
891 ((States)(yyq.StackAt(0).m_value)) 891 ((States)(yyq.StackAt(0).m_value))
892 ){}} 892 ){}}
893 893
894public class LSLProgramRoot_2 : LSLProgramRoot { 894public class LSLProgramRoot_2 : LSLProgramRoot {
895 public LSLProgramRoot_2(Parser yyq):base(yyq, 895 public LSLProgramRoot_2(Parser yyq):base(yyq,
896 ((States)(yyq.StackAt(0).m_value)) 896 ((States)(yyq.StackAt(0).m_value))
897 ){}} 897 ){}}
898 898
899public class GlobalDefinitions_1 : GlobalDefinitions { 899public class GlobalDefinitions_1 : GlobalDefinitions {
900 public GlobalDefinitions_1(Parser yyq):base(yyq, 900 public GlobalDefinitions_1(Parser yyq):base(yyq,
901 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) 901 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value))
902 ){}} 902 ){}}
903 903
904public class GlobalDefinitions_2 : GlobalDefinitions { 904public class GlobalDefinitions_2 : GlobalDefinitions {
905 public GlobalDefinitions_2(Parser yyq):base(yyq, 905 public GlobalDefinitions_2(Parser yyq):base(yyq,
906 ((GlobalDefinitions)(yyq.StackAt(1).m_value)) 906 ((GlobalDefinitions)(yyq.StackAt(1).m_value))
907 , 907 ,
908 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) 908 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value))
909 ){}} 909 ){}}
910 910
911public class GlobalDefinitions_3 : GlobalDefinitions { 911public class GlobalDefinitions_3 : GlobalDefinitions {
912 public GlobalDefinitions_3(Parser yyq):base(yyq, 912 public GlobalDefinitions_3(Parser yyq):base(yyq,
913 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) 913 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value))
914 ){}} 914 ){}}
915 915
916public class GlobalDefinitions_4 : GlobalDefinitions { 916public class GlobalDefinitions_4 : GlobalDefinitions {
917 public GlobalDefinitions_4(Parser yyq):base(yyq, 917 public GlobalDefinitions_4(Parser yyq):base(yyq,
918 ((GlobalDefinitions)(yyq.StackAt(1).m_value)) 918 ((GlobalDefinitions)(yyq.StackAt(1).m_value))
919 , 919 ,
920 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) 920 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value))
921 ){}} 921 ){}}
922 922
923public class GlobalVariableDeclaration_1 : GlobalVariableDeclaration { 923public class GlobalVariableDeclaration_1 : GlobalVariableDeclaration {
924 public GlobalVariableDeclaration_1(Parser yyq):base(yyq, 924 public GlobalVariableDeclaration_1(Parser yyq):base(yyq,
925 ((Declaration)(yyq.StackAt(1).m_value)) 925 ((Declaration)(yyq.StackAt(1).m_value))
926 ){}} 926 ){}}
927 927
928public class GlobalVariableDeclaration_2 : GlobalVariableDeclaration { 928public class GlobalVariableDeclaration_2 : GlobalVariableDeclaration {
929 public GlobalVariableDeclaration_2(Parser yyq):base(yyq,new Assignment(((LSLSyntax 929 public GlobalVariableDeclaration_2(Parser yyq):base(yyq,new Assignment(((LSLSyntax
930)yyq), 930)yyq),
931 ((Declaration)(yyq.StackAt(3).m_value)) 931 ((Declaration)(yyq.StackAt(3).m_value))
932 , 932 ,
933 ((Expression)(yyq.StackAt(1).m_value)) 933 ((Expression)(yyq.StackAt(1).m_value))
934 , 934 ,
935 ((EQUALS)(yyq.StackAt(2).m_value)) 935 ((EQUALS)(yyq.StackAt(2).m_value))
936 .yytext)){}} 936 .yytext)){}}
937 937
938public class GlobalFunctionDefinition_1 : GlobalFunctionDefinition { 938public class GlobalFunctionDefinition_1 : GlobalFunctionDefinition {
939 public GlobalFunctionDefinition_1(Parser yyq):base(yyq,"void", 939 public GlobalFunctionDefinition_1(Parser yyq):base(yyq,"void",
940 ((IDENT)(yyq.StackAt(4).m_value)) 940 ((IDENT)(yyq.StackAt(4).m_value))
941 .yytext, 941 .yytext,
942 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 942 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
943 , 943 ,
944 ((CompoundStatement)(yyq.StackAt(0).m_value)) 944 ((CompoundStatement)(yyq.StackAt(0).m_value))
945 ){}} 945 ){}}
946 946
947public class GlobalFunctionDefinition_2 : GlobalFunctionDefinition { 947public class GlobalFunctionDefinition_2 : GlobalFunctionDefinition {
948 public GlobalFunctionDefinition_2(Parser yyq):base(yyq, 948 public GlobalFunctionDefinition_2(Parser yyq):base(yyq,
949 ((Typename)(yyq.StackAt(5).m_value)) 949 ((Typename)(yyq.StackAt(5).m_value))
950 .yytext, 950 .yytext,
951 ((IDENT)(yyq.StackAt(4).m_value)) 951 ((IDENT)(yyq.StackAt(4).m_value))
952 .yytext, 952 .yytext,
953 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 953 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
954 , 954 ,
955 ((CompoundStatement)(yyq.StackAt(0).m_value)) 955 ((CompoundStatement)(yyq.StackAt(0).m_value))
956 ){}} 956 ){}}
957 957
958public class States_1 : States { 958public class States_1 : States {
959 public States_1(Parser yyq):base(yyq, 959 public States_1(Parser yyq):base(yyq,
960 ((State)(yyq.StackAt(0).m_value)) 960 ((State)(yyq.StackAt(0).m_value))
961 ){}} 961 ){}}
962 962
963public class States_2 : States { 963public class States_2 : States {
964 public States_2(Parser yyq):base(yyq, 964 public States_2(Parser yyq):base(yyq,
965 ((States)(yyq.StackAt(1).m_value)) 965 ((States)(yyq.StackAt(1).m_value))
966 , 966 ,
967 ((State)(yyq.StackAt(0).m_value)) 967 ((State)(yyq.StackAt(0).m_value))
968 ){}} 968 ){}}
969 969
970public class State_1 : State { 970public class State_1 : State {
971 public State_1(Parser yyq):base(yyq, 971 public State_1(Parser yyq):base(yyq,
972 ((DEFAULT_STATE)(yyq.StackAt(3).m_value)) 972 ((DEFAULT_STATE)(yyq.StackAt(3).m_value))
973 .yytext, 973 .yytext,
974 ((StateBody)(yyq.StackAt(1).m_value)) 974 ((StateBody)(yyq.StackAt(1).m_value))
975 ){}} 975 ){}}
976 976
977public class State_2 : State { 977public class State_2 : State {
978 public State_2(Parser yyq):base(yyq, 978 public State_2(Parser yyq):base(yyq,
979 ((IDENT)(yyq.StackAt(3).m_value)) 979 ((IDENT)(yyq.StackAt(3).m_value))
980 .yytext, 980 .yytext,
981 ((StateBody)(yyq.StackAt(1).m_value)) 981 ((StateBody)(yyq.StackAt(1).m_value))
982 ){}} 982 ){}}
983 983
984public class StateBody_1 : StateBody { 984public class StateBody_1 : StateBody {
985 public StateBody_1(Parser yyq):base(yyq, 985 public StateBody_1(Parser yyq):base(yyq,
986 ((StateEvent)(yyq.StackAt(0).m_value)) 986 ((StateEvent)(yyq.StackAt(0).m_value))
987 ){}} 987 ){}}
988 988
989public class StateBody_2 : StateBody { 989public class StateBody_2 : StateBody {
990 public StateBody_2(Parser yyq):base(yyq, 990 public StateBody_2(Parser yyq):base(yyq,
991 ((StateBody)(yyq.StackAt(1).m_value)) 991 ((StateBody)(yyq.StackAt(1).m_value))
992 , 992 ,
993 ((StateEvent)(yyq.StackAt(0).m_value)) 993 ((StateEvent)(yyq.StackAt(0).m_value))
994 ){}} 994 ){}}
995 995
996public class StateBody_3 : StateBody { 996public class StateBody_3 : StateBody {
997 public StateBody_3(Parser yyq):base(yyq, 997 public StateBody_3(Parser yyq):base(yyq,
998 ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) 998 ((VoidArgStateEvent)(yyq.StackAt(0).m_value))
999 ){}} 999 ){}}
1000 1000
1001public class StateBody_4 : StateBody { 1001public class StateBody_4 : StateBody {
1002 public StateBody_4(Parser yyq):base(yyq, 1002 public StateBody_4(Parser yyq):base(yyq,
1003 ((StateBody)(yyq.StackAt(1).m_value)) 1003 ((StateBody)(yyq.StackAt(1).m_value))
1004 , 1004 ,
1005 ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) 1005 ((VoidArgStateEvent)(yyq.StackAt(0).m_value))
1006 ){}} 1006 ){}}
1007 1007
1008public class StateBody_5 : StateBody { 1008public class StateBody_5 : StateBody {
1009 public StateBody_5(Parser yyq):base(yyq, 1009 public StateBody_5(Parser yyq):base(yyq,
1010 ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) 1010 ((KeyArgStateEvent)(yyq.StackAt(0).m_value))
1011 ){}} 1011 ){}}
1012 1012
1013public class StateBody_6 : StateBody { 1013public class StateBody_6 : StateBody {
1014 public StateBody_6(Parser yyq):base(yyq, 1014 public StateBody_6(Parser yyq):base(yyq,
1015 ((StateBody)(yyq.StackAt(1).m_value)) 1015 ((StateBody)(yyq.StackAt(1).m_value))
1016 , 1016 ,
1017 ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) 1017 ((KeyArgStateEvent)(yyq.StackAt(0).m_value))
1018 ){}} 1018 ){}}
1019 1019
1020public class StateBody_7 : StateBody { 1020public class StateBody_7 : StateBody {
1021 public StateBody_7(Parser yyq):base(yyq, 1021 public StateBody_7(Parser yyq):base(yyq,
1022 ((IntArgStateEvent)(yyq.StackAt(0).m_value)) 1022 ((IntArgStateEvent)(yyq.StackAt(0).m_value))
1023 ){}} 1023 ){}}
1024 1024
1025public class StateBody_8 : StateBody { 1025public class StateBody_8 : StateBody {
1026 public StateBody_8(Parser yyq):base(yyq, 1026 public StateBody_8(Parser yyq):base(yyq,
1027 ((StateBody)(yyq.StackAt(1).m_value)) 1027 ((StateBody)(yyq.StackAt(1).m_value))
1028 , 1028 ,
1029 ((IntArgStateEvent)(yyq.StackAt(0).m_value)) 1029 ((IntArgStateEvent)(yyq.StackAt(0).m_value))
1030 ){}} 1030 ){}}
1031 1031
1032public class StateBody_9 : StateBody { 1032public class StateBody_9 : StateBody {
1033 public StateBody_9(Parser yyq):base(yyq, 1033 public StateBody_9(Parser yyq):base(yyq,
1034 ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) 1034 ((VectorArgStateEvent)(yyq.StackAt(0).m_value))
1035 ){}} 1035 ){}}
1036 1036
1037public class StateBody_10 : StateBody { 1037public class StateBody_10 : StateBody {
1038 public StateBody_10(Parser yyq):base(yyq, 1038 public StateBody_10(Parser yyq):base(yyq,
1039 ((StateBody)(yyq.StackAt(1).m_value)) 1039 ((StateBody)(yyq.StackAt(1).m_value))
1040 , 1040 ,
1041 ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) 1041 ((VectorArgStateEvent)(yyq.StackAt(0).m_value))
1042 ){}} 1042 ){}}
1043 1043
1044public class StateBody_11 : StateBody { 1044public class StateBody_11 : StateBody {
1045 public StateBody_11(Parser yyq):base(yyq, 1045 public StateBody_11(Parser yyq):base(yyq,
1046 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) 1046 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value))
1047 ){}} 1047 ){}}
1048 1048
1049public class StateBody_12 : StateBody { 1049public class StateBody_12 : StateBody {
1050 public StateBody_12(Parser yyq):base(yyq, 1050 public StateBody_12(Parser yyq):base(yyq,
1051 ((StateBody)(yyq.StackAt(1).m_value)) 1051 ((StateBody)(yyq.StackAt(1).m_value))
1052 , 1052 ,
1053 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) 1053 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value))
1054 ){}} 1054 ){}}
1055 1055
1056public class StateBody_13 : StateBody { 1056public class StateBody_13 : StateBody {
1057 public StateBody_13(Parser yyq):base(yyq, 1057 public StateBody_13(Parser yyq):base(yyq,
1058 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) 1058 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value))
1059 ){}} 1059 ){}}
1060 1060
1061public class StateBody_14 : StateBody { 1061public class StateBody_14 : StateBody {
1062 public StateBody_14(Parser yyq):base(yyq, 1062 public StateBody_14(Parser yyq):base(yyq,
1063 ((StateBody)(yyq.StackAt(1).m_value)) 1063 ((StateBody)(yyq.StackAt(1).m_value))
1064 , 1064 ,
1065 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) 1065 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value))
1066 ){}} 1066 ){}}
1067 1067
1068public class StateBody_15 : StateBody { 1068public class StateBody_15 : StateBody {
1069 public StateBody_15(Parser yyq):base(yyq, 1069 public StateBody_15(Parser yyq):base(yyq,
1070 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) 1070 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value))
1071 ){}} 1071 ){}}
1072 1072
1073public class StateBody_16 : StateBody { 1073public class StateBody_16 : StateBody {
1074 public StateBody_16(Parser yyq):base(yyq, 1074 public StateBody_16(Parser yyq):base(yyq,
1075 ((StateBody)(yyq.StackAt(1).m_value)) 1075 ((StateBody)(yyq.StackAt(1).m_value))
1076 , 1076 ,
1077 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) 1077 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value))
1078 ){}} 1078 ){}}
1079 1079
1080public class StateEvent_1 : StateEvent { 1080public class StateEvent_1 : StateEvent {
1081 public StateEvent_1(Parser yyq):base(yyq, 1081 public StateEvent_1(Parser yyq):base(yyq,
1082 ((Event)(yyq.StackAt(4).m_value)) 1082 ((Event)(yyq.StackAt(4).m_value))
1083 .yytext, 1083 .yytext,
1084 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1084 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
1085 , 1085 ,
1086 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1086 ((CompoundStatement)(yyq.StackAt(0).m_value))
1087 ){}} 1087 ){}}
1088 1088
1089public class VoidArgStateEvent_1 : VoidArgStateEvent { 1089public class VoidArgStateEvent_1 : VoidArgStateEvent {
1090 public VoidArgStateEvent_1(Parser yyq):base(yyq, 1090 public VoidArgStateEvent_1(Parser yyq):base(yyq,
1091 ((VoidArgEvent)(yyq.StackAt(3).m_value)) 1091 ((VoidArgEvent)(yyq.StackAt(3).m_value))
1092 .yytext, 1092 .yytext,
1093 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1093 ((CompoundStatement)(yyq.StackAt(0).m_value))
1094 ){}} 1094 ){}}
1095 1095
1096public class KeyArgStateEvent_1 : KeyArgStateEvent { 1096public class KeyArgStateEvent_1 : KeyArgStateEvent {
1097 public KeyArgStateEvent_1(Parser yyq):base(yyq, 1097 public KeyArgStateEvent_1(Parser yyq):base(yyq,
1098 ((KeyArgEvent)(yyq.StackAt(4).m_value)) 1098 ((KeyArgEvent)(yyq.StackAt(4).m_value))
1099 .yytext, 1099 .yytext,
1100 ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1100 ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value))
1101 , 1101 ,
1102 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1102 ((CompoundStatement)(yyq.StackAt(0).m_value))
1103 ){}} 1103 ){}}
1104 1104
1105public class IntArgStateEvent_1 : IntArgStateEvent { 1105public class IntArgStateEvent_1 : IntArgStateEvent {
1106 public IntArgStateEvent_1(Parser yyq):base(yyq, 1106 public IntArgStateEvent_1(Parser yyq):base(yyq,
1107 ((IntArgEvent)(yyq.StackAt(4).m_value)) 1107 ((IntArgEvent)(yyq.StackAt(4).m_value))
1108 .yytext, 1108 .yytext,
1109 ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1109 ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value))
1110 , 1110 ,
1111 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1111 ((CompoundStatement)(yyq.StackAt(0).m_value))
1112 ){}} 1112 ){}}
1113 1113
1114public class VectorArgStateEvent_1 : VectorArgStateEvent { 1114public class VectorArgStateEvent_1 : VectorArgStateEvent {
1115 public VectorArgStateEvent_1(Parser yyq):base(yyq, 1115 public VectorArgStateEvent_1(Parser yyq):base(yyq,
1116 ((VectorArgEvent)(yyq.StackAt(4).m_value)) 1116 ((VectorArgEvent)(yyq.StackAt(4).m_value))
1117 .yytext, 1117 .yytext,
1118 ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1118 ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value))
1119 , 1119 ,
1120 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1120 ((CompoundStatement)(yyq.StackAt(0).m_value))
1121 ){}} 1121 ){}}
1122 1122
1123public class IntRotRotArgStateEvent_1 : IntRotRotArgStateEvent { 1123public class IntRotRotArgStateEvent_1 : IntRotRotArgStateEvent {
1124 public IntRotRotArgStateEvent_1(Parser yyq):base(yyq, 1124 public IntRotRotArgStateEvent_1(Parser yyq):base(yyq,
1125 ((IntRotRotArgEvent)(yyq.StackAt(4).m_value)) 1125 ((IntRotRotArgEvent)(yyq.StackAt(4).m_value))
1126 .yytext, 1126 .yytext,
1127 ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1127 ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value))
1128 , 1128 ,
1129 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1129 ((CompoundStatement)(yyq.StackAt(0).m_value))
1130 ){}} 1130 ){}}
1131 1131
1132public class IntVecVecArgStateEvent_1 : IntVecVecArgStateEvent { 1132public class IntVecVecArgStateEvent_1 : IntVecVecArgStateEvent {
1133 public IntVecVecArgStateEvent_1(Parser yyq):base(yyq, 1133 public IntVecVecArgStateEvent_1(Parser yyq):base(yyq,
1134 ((IntVecVecArgEvent)(yyq.StackAt(4).m_value)) 1134 ((IntVecVecArgEvent)(yyq.StackAt(4).m_value))
1135 .yytext, 1135 .yytext,
1136 ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1136 ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value))
1137 , 1137 ,
1138 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1138 ((CompoundStatement)(yyq.StackAt(0).m_value))
1139 ){}} 1139 ){}}
1140 1140
1141public class KeyIntIntArgStateEvent_1 : KeyIntIntArgStateEvent { 1141public class KeyIntIntArgStateEvent_1 : KeyIntIntArgStateEvent {
1142 public KeyIntIntArgStateEvent_1(Parser yyq):base(yyq, 1142 public KeyIntIntArgStateEvent_1(Parser yyq):base(yyq,
1143 ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value)) 1143 ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value))
1144 .yytext, 1144 .yytext,
1145 ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1145 ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value))
1146 , 1146 ,
1147 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1147 ((CompoundStatement)(yyq.StackAt(0).m_value))
1148 ){}} 1148 ){}}
1149 1149
1150public class ArgumentDeclarationList_1 : ArgumentDeclarationList { 1150public class ArgumentDeclarationList_1 : ArgumentDeclarationList {
1151 public ArgumentDeclarationList_1(Parser yyq):base(yyq, 1151 public ArgumentDeclarationList_1(Parser yyq):base(yyq,
1152 ((Declaration)(yyq.StackAt(0).m_value)) 1152 ((Declaration)(yyq.StackAt(0).m_value))
1153 ){}} 1153 ){}}
1154 1154
1155public class ArgumentDeclarationList_2 : ArgumentDeclarationList { 1155public class ArgumentDeclarationList_2 : ArgumentDeclarationList {
1156 public ArgumentDeclarationList_2(Parser yyq):base(yyq, 1156 public ArgumentDeclarationList_2(Parser yyq):base(yyq,
1157 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1157 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
1158 , 1158 ,
1159 ((Declaration)(yyq.StackAt(0).m_value)) 1159 ((Declaration)(yyq.StackAt(0).m_value))
1160 ){}} 1160 ){}}
1161 1161
1162public class KeyArgumentDeclarationList_1 : KeyArgumentDeclarationList { 1162public class KeyArgumentDeclarationList_1 : KeyArgumentDeclarationList {
1163 public KeyArgumentDeclarationList_1(Parser yyq):base(yyq, 1163 public KeyArgumentDeclarationList_1(Parser yyq):base(yyq,
1164 ((KeyDeclaration)(yyq.StackAt(0).m_value)) 1164 ((KeyDeclaration)(yyq.StackAt(0).m_value))
1165 ){}} 1165 ){}}
1166 1166
1167public class IntArgumentDeclarationList_1 : IntArgumentDeclarationList { 1167public class IntArgumentDeclarationList_1 : IntArgumentDeclarationList {
1168 public IntArgumentDeclarationList_1(Parser yyq):base(yyq, 1168 public IntArgumentDeclarationList_1(Parser yyq):base(yyq,
1169 ((IntDeclaration)(yyq.StackAt(0).m_value)) 1169 ((IntDeclaration)(yyq.StackAt(0).m_value))
1170 ){}} 1170 ){}}
1171 1171
1172public class VectorArgumentDeclarationList_1 : VectorArgumentDeclarationList { 1172public class VectorArgumentDeclarationList_1 : VectorArgumentDeclarationList {
1173 public VectorArgumentDeclarationList_1(Parser yyq):base(yyq, 1173 public VectorArgumentDeclarationList_1(Parser yyq):base(yyq,
1174 ((VecDeclaration)(yyq.StackAt(0).m_value)) 1174 ((VecDeclaration)(yyq.StackAt(0).m_value))
1175 ){}} 1175 ){}}
1176 1176
1177public class IntRotRotArgumentDeclarationList_1 : IntRotRotArgumentDeclarationList { 1177public class IntRotRotArgumentDeclarationList_1 : IntRotRotArgumentDeclarationList {
1178 public IntRotRotArgumentDeclarationList_1(Parser yyq):base(yyq, 1178 public IntRotRotArgumentDeclarationList_1(Parser yyq):base(yyq,
1179 ((IntDeclaration)(yyq.StackAt(4).m_value)) 1179 ((IntDeclaration)(yyq.StackAt(4).m_value))
1180 , 1180 ,
1181 ((RotDeclaration)(yyq.StackAt(2).m_value)) 1181 ((RotDeclaration)(yyq.StackAt(2).m_value))
1182 , 1182 ,
1183 ((RotDeclaration)(yyq.StackAt(0).m_value)) 1183 ((RotDeclaration)(yyq.StackAt(0).m_value))
1184 ){}} 1184 ){}}
1185 1185
1186public class IntVecVecArgumentDeclarationList_1 : IntVecVecArgumentDeclarationList { 1186public class IntVecVecArgumentDeclarationList_1 : IntVecVecArgumentDeclarationList {
1187 public IntVecVecArgumentDeclarationList_1(Parser yyq):base(yyq, 1187 public IntVecVecArgumentDeclarationList_1(Parser yyq):base(yyq,
1188 ((IntDeclaration)(yyq.StackAt(4).m_value)) 1188 ((IntDeclaration)(yyq.StackAt(4).m_value))
1189 , 1189 ,
1190 ((VecDeclaration)(yyq.StackAt(2).m_value)) 1190 ((VecDeclaration)(yyq.StackAt(2).m_value))
1191 , 1191 ,
1192 ((VecDeclaration)(yyq.StackAt(0).m_value)) 1192 ((VecDeclaration)(yyq.StackAt(0).m_value))
1193 ){}} 1193 ){}}
1194 1194
1195public class KeyIntIntArgumentDeclarationList_1 : KeyIntIntArgumentDeclarationList { 1195public class KeyIntIntArgumentDeclarationList_1 : KeyIntIntArgumentDeclarationList {
1196 public KeyIntIntArgumentDeclarationList_1(Parser yyq):base(yyq, 1196 public KeyIntIntArgumentDeclarationList_1(Parser yyq):base(yyq,
1197 ((KeyDeclaration)(yyq.StackAt(4).m_value)) 1197 ((KeyDeclaration)(yyq.StackAt(4).m_value))
1198 , 1198 ,
1199 ((IntDeclaration)(yyq.StackAt(2).m_value)) 1199 ((IntDeclaration)(yyq.StackAt(2).m_value))
1200 , 1200 ,
1201 ((IntDeclaration)(yyq.StackAt(0).m_value)) 1201 ((IntDeclaration)(yyq.StackAt(0).m_value))
1202 ){}} 1202 ){}}
1203 1203
1204public class Declaration_1 : Declaration { 1204public class Declaration_1 : Declaration {
1205 public Declaration_1(Parser yyq):base(yyq, 1205 public Declaration_1(Parser yyq):base(yyq,
1206 ((Typename)(yyq.StackAt(1).m_value)) 1206 ((Typename)(yyq.StackAt(1).m_value))
1207 .yytext, 1207 .yytext,
1208 ((IDENT)(yyq.StackAt(0).m_value)) 1208 ((IDENT)(yyq.StackAt(0).m_value))
1209 .yytext){}} 1209 .yytext){}}
1210 1210
1211public class KeyDeclaration_1 : KeyDeclaration { 1211public class KeyDeclaration_1 : KeyDeclaration {
1212 public KeyDeclaration_1(Parser yyq):base(yyq, 1212 public KeyDeclaration_1(Parser yyq):base(yyq,
1213 ((KEY_TYPE)(yyq.StackAt(1).m_value)) 1213 ((KEY_TYPE)(yyq.StackAt(1).m_value))
1214 .yytext, 1214 .yytext,
1215 ((IDENT)(yyq.StackAt(0).m_value)) 1215 ((IDENT)(yyq.StackAt(0).m_value))
1216 .yytext){}} 1216 .yytext){}}
1217 1217
1218public class IntDeclaration_1 : IntDeclaration { 1218public class IntDeclaration_1 : IntDeclaration {
1219 public IntDeclaration_1(Parser yyq):base(yyq, 1219 public IntDeclaration_1(Parser yyq):base(yyq,
1220 ((INTEGER_TYPE)(yyq.StackAt(1).m_value)) 1220 ((INTEGER_TYPE)(yyq.StackAt(1).m_value))
1221 .yytext, 1221 .yytext,
1222 ((IDENT)(yyq.StackAt(0).m_value)) 1222 ((IDENT)(yyq.StackAt(0).m_value))
1223 .yytext){}} 1223 .yytext){}}
1224 1224
1225public class VecDeclaration_1 : VecDeclaration { 1225public class VecDeclaration_1 : VecDeclaration {
1226 public VecDeclaration_1(Parser yyq):base(yyq, 1226 public VecDeclaration_1(Parser yyq):base(yyq,
1227 ((VECTOR_TYPE)(yyq.StackAt(1).m_value)) 1227 ((VECTOR_TYPE)(yyq.StackAt(1).m_value))
1228 .yytext, 1228 .yytext,
1229 ((IDENT)(yyq.StackAt(0).m_value)) 1229 ((IDENT)(yyq.StackAt(0).m_value))
1230 .yytext){}} 1230 .yytext){}}
1231 1231
1232public class RotDeclaration_1 : RotDeclaration { 1232public class RotDeclaration_1 : RotDeclaration {
1233 public RotDeclaration_1(Parser yyq):base(yyq, 1233 public RotDeclaration_1(Parser yyq):base(yyq,
1234 ((ROTATION_TYPE)(yyq.StackAt(1).m_value)) 1234 ((ROTATION_TYPE)(yyq.StackAt(1).m_value))
1235 .yytext, 1235 .yytext,
1236 ((IDENT)(yyq.StackAt(0).m_value)) 1236 ((IDENT)(yyq.StackAt(0).m_value))
1237 .yytext){}} 1237 .yytext){}}
1238 1238
1239public class CompoundStatement_1 : CompoundStatement { 1239public class CompoundStatement_1 : CompoundStatement {
1240 public CompoundStatement_1(Parser yyq):base(yyq){}} 1240 public CompoundStatement_1(Parser yyq):base(yyq){}}
1241 1241
1242public class CompoundStatement_2 : CompoundStatement { 1242public class CompoundStatement_2 : CompoundStatement {
1243 public CompoundStatement_2(Parser yyq):base(yyq, 1243 public CompoundStatement_2(Parser yyq):base(yyq,
1244 ((StatementList)(yyq.StackAt(1).m_value)) 1244 ((StatementList)(yyq.StackAt(1).m_value))
1245 ){}} 1245 ){}}
1246 1246
1247public class StatementList_1 : StatementList { 1247public class StatementList_1 : StatementList {
1248 public StatementList_1(Parser yyq):base(yyq, 1248 public StatementList_1(Parser yyq):base(yyq,
1249 ((Statement)(yyq.StackAt(0).m_value)) 1249 ((Statement)(yyq.StackAt(0).m_value))
1250 ){}} 1250 ){}}
1251 1251
1252public class StatementList_2 : StatementList { 1252public class StatementList_2 : StatementList {
1253 public StatementList_2(Parser yyq):base(yyq, 1253 public StatementList_2(Parser yyq):base(yyq,
1254 ((StatementList)(yyq.StackAt(1).m_value)) 1254 ((StatementList)(yyq.StackAt(1).m_value))
1255 , 1255 ,
1256 ((Statement)(yyq.StackAt(0).m_value)) 1256 ((Statement)(yyq.StackAt(0).m_value))
1257 ){}} 1257 ){}}
1258 1258
1259public class EmptyStatement_1 : EmptyStatement { 1259public class EmptyStatement_1 : EmptyStatement {
1260 public EmptyStatement_1(Parser yyq):base(yyq){}} 1260 public EmptyStatement_1(Parser yyq):base(yyq){}}
1261 1261
1262public class Statement_1 : Statement { 1262public class Statement_1 : Statement {
1263 public Statement_1(Parser yyq):base(yyq, 1263 public Statement_1(Parser yyq):base(yyq,
1264 ((EmptyStatement)(yyq.StackAt(1).m_value)) 1264 ((EmptyStatement)(yyq.StackAt(1).m_value))
1265 ){}} 1265 ){}}
1266 1266
1267public class Statement_2 : Statement { 1267public class Statement_2 : Statement {
1268 public Statement_2(Parser yyq):base(yyq, 1268 public Statement_2(Parser yyq):base(yyq,
1269 ((Declaration)(yyq.StackAt(1).m_value)) 1269 ((Declaration)(yyq.StackAt(1).m_value))
1270 ){}} 1270 ){}}
1271 1271
1272public class Statement_3 : Statement { 1272public class Statement_3 : Statement {
1273 public Statement_3(Parser yyq):base(yyq, 1273 public Statement_3(Parser yyq):base(yyq,
1274 ((Assignment)(yyq.StackAt(1).m_value)) 1274 ((Assignment)(yyq.StackAt(1).m_value))
1275 ){}} 1275 ){}}
1276 1276
1277public class Statement_4 : Statement { 1277public class Statement_4 : Statement {
1278 public Statement_4(Parser yyq):base(yyq, 1278 public Statement_4(Parser yyq):base(yyq,
1279 ((Expression)(yyq.StackAt(1).m_value)) 1279 ((Expression)(yyq.StackAt(1).m_value))
1280 ){}} 1280 ){}}
1281 1281
1282public class Statement_5 : Statement { 1282public class Statement_5 : Statement {
1283 public Statement_5(Parser yyq):base(yyq, 1283 public Statement_5(Parser yyq):base(yyq,
1284 ((ReturnStatement)(yyq.StackAt(1).m_value)) 1284 ((ReturnStatement)(yyq.StackAt(1).m_value))
1285 ){}} 1285 ){}}
1286 1286
1287public class Statement_6 : Statement { 1287public class Statement_6 : Statement {
1288 public Statement_6(Parser yyq):base(yyq, 1288 public Statement_6(Parser yyq):base(yyq,
1289 ((JumpLabel)(yyq.StackAt(1).m_value)) 1289 ((JumpLabel)(yyq.StackAt(1).m_value))
1290 ){}} 1290 ){}}
1291 1291
1292public class Statement_7 : Statement { 1292public class Statement_7 : Statement {
1293 public Statement_7(Parser yyq):base(yyq, 1293 public Statement_7(Parser yyq):base(yyq,
1294 ((JumpStatement)(yyq.StackAt(1).m_value)) 1294 ((JumpStatement)(yyq.StackAt(1).m_value))
1295 ){}} 1295 ){}}
1296 1296
1297public class Statement_8 : Statement { 1297public class Statement_8 : Statement {
1298 public Statement_8(Parser yyq):base(yyq, 1298 public Statement_8(Parser yyq):base(yyq,
1299 ((StateChange)(yyq.StackAt(1).m_value)) 1299 ((StateChange)(yyq.StackAt(1).m_value))
1300 ){}} 1300 ){}}
1301 1301
1302public class Statement_9 : Statement { 1302public class Statement_9 : Statement {
1303 public Statement_9(Parser yyq):base(yyq, 1303 public Statement_9(Parser yyq):base(yyq,
1304 ((IfStatement)(yyq.StackAt(0).m_value)) 1304 ((IfStatement)(yyq.StackAt(0).m_value))
1305 ){}} 1305 ){}}
1306 1306
1307public class Statement_10 : Statement { 1307public class Statement_10 : Statement {
1308 public Statement_10(Parser yyq):base(yyq, 1308 public Statement_10(Parser yyq):base(yyq,
1309 ((WhileStatement)(yyq.StackAt(0).m_value)) 1309 ((WhileStatement)(yyq.StackAt(0).m_value))
1310 ){}} 1310 ){}}
1311 1311
1312public class Statement_11 : Statement { 1312public class Statement_11 : Statement {
1313 public Statement_11(Parser yyq):base(yyq, 1313 public Statement_11(Parser yyq):base(yyq,
1314 ((DoWhileStatement)(yyq.StackAt(0).m_value)) 1314 ((DoWhileStatement)(yyq.StackAt(0).m_value))
1315 ){}} 1315 ){}}
1316 1316
1317public class Statement_12 : Statement { 1317public class Statement_12 : Statement {
1318 public Statement_12(Parser yyq):base(yyq, 1318 public Statement_12(Parser yyq):base(yyq,
1319 ((ForLoop)(yyq.StackAt(0).m_value)) 1319 ((ForLoop)(yyq.StackAt(0).m_value))
1320 ){}} 1320 ){}}
1321 1321
1322public class Statement_13 : Statement { 1322public class Statement_13 : Statement {
1323 public Statement_13(Parser yyq):base(yyq, 1323 public Statement_13(Parser yyq):base(yyq,
1324 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1324 ((CompoundStatement)(yyq.StackAt(0).m_value))
1325 ){}} 1325 ){}}
1326 1326
1327public class JumpLabel_1 : JumpLabel { 1327public class JumpLabel_1 : JumpLabel {
1328 public JumpLabel_1(Parser yyq):base(yyq, 1328 public JumpLabel_1(Parser yyq):base(yyq,
1329 ((IDENT)(yyq.StackAt(0).m_value)) 1329 ((IDENT)(yyq.StackAt(0).m_value))
1330 .yytext){}} 1330 .yytext){}}
1331 1331
1332public class JumpStatement_1 : JumpStatement { 1332public class JumpStatement_1 : JumpStatement {
1333 public JumpStatement_1(Parser yyq):base(yyq, 1333 public JumpStatement_1(Parser yyq):base(yyq,
1334 ((IDENT)(yyq.StackAt(0).m_value)) 1334 ((IDENT)(yyq.StackAt(0).m_value))
1335 .yytext){}} 1335 .yytext){}}
1336 1336
1337public class StateChange_1 : StateChange { 1337public class StateChange_1 : StateChange {
1338 public StateChange_1(Parser yyq):base(yyq, 1338 public StateChange_1(Parser yyq):base(yyq,
1339 ((IDENT)(yyq.StackAt(0).m_value)) 1339 ((IDENT)(yyq.StackAt(0).m_value))
1340 .yytext){}} 1340 .yytext){}}
1341 1341
1342public class StateChange_2 : StateChange { 1342public class StateChange_2 : StateChange {
1343 public StateChange_2(Parser yyq):base(yyq, 1343 public StateChange_2(Parser yyq):base(yyq,
1344 ((DEFAULT_STATE)(yyq.StackAt(0).m_value)) 1344 ((DEFAULT_STATE)(yyq.StackAt(0).m_value))
1345 .yytext){}} 1345 .yytext){}}
1346 1346
1347public class IfStatement_1 : IfStatement { 1347public class IfStatement_1 : IfStatement {
1348 public IfStatement_1(Parser yyq):base(yyq, 1348 public IfStatement_1(Parser yyq):base(yyq,
1349 ((Expression)(yyq.StackAt(2).m_value)) 1349 ((Expression)(yyq.StackAt(2).m_value))
1350 , 1350 ,
1351 ((Statement)(yyq.StackAt(0).m_value)) 1351 ((Statement)(yyq.StackAt(0).m_value))
1352 ){}} 1352 ){}}
1353 1353
1354public class IfStatement_2 : IfStatement { 1354public class IfStatement_2 : IfStatement {
1355 public IfStatement_2(Parser yyq):base(yyq, 1355 public IfStatement_2(Parser yyq):base(yyq,
1356 ((Expression)(yyq.StackAt(4).m_value)) 1356 ((Expression)(yyq.StackAt(4).m_value))
1357 , 1357 ,
1358 ((Statement)(yyq.StackAt(2).m_value)) 1358 ((Statement)(yyq.StackAt(2).m_value))
1359 , 1359 ,
1360 ((Statement)(yyq.StackAt(0).m_value)) 1360 ((Statement)(yyq.StackAt(0).m_value))
1361 ){}} 1361 ){}}
1362 1362
1363public class IfStatement_3 : IfStatement { 1363public class IfStatement_3 : IfStatement {
1364 public IfStatement_3(Parser yyq):base(yyq, 1364 public IfStatement_3(Parser yyq):base(yyq,
1365 ((SimpleAssignment)(yyq.StackAt(2).m_value)) 1365 ((SimpleAssignment)(yyq.StackAt(2).m_value))
1366 , 1366 ,
1367 ((Statement)(yyq.StackAt(0).m_value)) 1367 ((Statement)(yyq.StackAt(0).m_value))
1368 ){}} 1368 ){}}
1369 1369
1370public class IfStatement_4 : IfStatement { 1370public class IfStatement_4 : IfStatement {
1371 public IfStatement_4(Parser yyq):base(yyq, 1371 public IfStatement_4(Parser yyq):base(yyq,
1372 ((SimpleAssignment)(yyq.StackAt(4).m_value)) 1372 ((SimpleAssignment)(yyq.StackAt(4).m_value))
1373 , 1373 ,
1374 ((Statement)(yyq.StackAt(2).m_value)) 1374 ((Statement)(yyq.StackAt(2).m_value))
1375 , 1375 ,
1376 ((Statement)(yyq.StackAt(0).m_value)) 1376 ((Statement)(yyq.StackAt(0).m_value))
1377 ){}} 1377 ){}}
1378 1378
1379public class WhileStatement_1 : WhileStatement { 1379public class WhileStatement_1 : WhileStatement {
1380 public WhileStatement_1(Parser yyq):base(yyq, 1380 public WhileStatement_1(Parser yyq):base(yyq,
1381 ((Expression)(yyq.StackAt(2).m_value)) 1381 ((Expression)(yyq.StackAt(2).m_value))
1382 , 1382 ,
1383 ((Statement)(yyq.StackAt(0).m_value)) 1383 ((Statement)(yyq.StackAt(0).m_value))
1384 ){}} 1384 ){}}
1385 1385
1386public class WhileStatement_2 : WhileStatement { 1386public class WhileStatement_2 : WhileStatement {
1387 public WhileStatement_2(Parser yyq):base(yyq, 1387 public WhileStatement_2(Parser yyq):base(yyq,
1388 ((SimpleAssignment)(yyq.StackAt(2).m_value)) 1388 ((SimpleAssignment)(yyq.StackAt(2).m_value))
1389 , 1389 ,
1390 ((Statement)(yyq.StackAt(0).m_value)) 1390 ((Statement)(yyq.StackAt(0).m_value))
1391 ){}} 1391 ){}}
1392 1392
1393public class DoWhileStatement_1 : DoWhileStatement { 1393public class DoWhileStatement_1 : DoWhileStatement {
1394 public DoWhileStatement_1(Parser yyq):base(yyq, 1394 public DoWhileStatement_1(Parser yyq):base(yyq,
1395 ((Expression)(yyq.StackAt(2).m_value)) 1395 ((Expression)(yyq.StackAt(2).m_value))
1396 , 1396 ,
1397 ((Statement)(yyq.StackAt(5).m_value)) 1397 ((Statement)(yyq.StackAt(5).m_value))
1398 ){}} 1398 ){}}
1399 1399
1400public class DoWhileStatement_2 : DoWhileStatement { 1400public class DoWhileStatement_2 : DoWhileStatement {
1401 public DoWhileStatement_2(Parser yyq):base(yyq, 1401 public DoWhileStatement_2(Parser yyq):base(yyq,
1402 ((SimpleAssignment)(yyq.StackAt(2).m_value)) 1402 ((SimpleAssignment)(yyq.StackAt(2).m_value))
1403 , 1403 ,
1404 ((Statement)(yyq.StackAt(5).m_value)) 1404 ((Statement)(yyq.StackAt(5).m_value))
1405 ){}} 1405 ){}}
1406 1406
1407public class ForLoop_1 : ForLoop { 1407public class ForLoop_1 : ForLoop {
1408 public ForLoop_1(Parser yyq):base(yyq, 1408 public ForLoop_1(Parser yyq):base(yyq,
1409 ((ForLoopStatement)(yyq.StackAt(6).m_value)) 1409 ((ForLoopStatement)(yyq.StackAt(6).m_value))
1410 , 1410 ,
1411 ((Expression)(yyq.StackAt(4).m_value)) 1411 ((Expression)(yyq.StackAt(4).m_value))
1412 , 1412 ,
1413 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1413 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1414 , 1414 ,
1415 ((Statement)(yyq.StackAt(0).m_value)) 1415 ((Statement)(yyq.StackAt(0).m_value))
1416 ){}} 1416 ){}}
1417 1417
1418public class ForLoop_2 : ForLoop { 1418public class ForLoop_2 : ForLoop {
1419 public ForLoop_2(Parser yyq):base(yyq,null, 1419 public ForLoop_2(Parser yyq):base(yyq,null,
1420 ((Expression)(yyq.StackAt(4).m_value)) 1420 ((Expression)(yyq.StackAt(4).m_value))
1421 , 1421 ,
1422 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1422 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1423 , 1423 ,
1424 ((Statement)(yyq.StackAt(0).m_value)) 1424 ((Statement)(yyq.StackAt(0).m_value))
1425 ){}} 1425 ){}}
1426 1426
1427public class ForLoopStatement_1 : ForLoopStatement { 1427public class ForLoopStatement_1 : ForLoopStatement {
1428 public ForLoopStatement_1(Parser yyq):base(yyq, 1428 public ForLoopStatement_1(Parser yyq):base(yyq,
1429 ((Expression)(yyq.StackAt(0).m_value)) 1429 ((Expression)(yyq.StackAt(0).m_value))
1430 ){}} 1430 ){}}
1431 1431
1432public class ForLoopStatement_2 : ForLoopStatement { 1432public class ForLoopStatement_2 : ForLoopStatement {
1433 public ForLoopStatement_2(Parser yyq):base(yyq, 1433 public ForLoopStatement_2(Parser yyq):base(yyq,
1434 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1434 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1435 ){}} 1435 ){}}
1436 1436
1437public class ForLoopStatement_3 : ForLoopStatement { 1437public class ForLoopStatement_3 : ForLoopStatement {
1438 public ForLoopStatement_3(Parser yyq):base(yyq, 1438 public ForLoopStatement_3(Parser yyq):base(yyq,
1439 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1439 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1440 , 1440 ,
1441 ((Expression)(yyq.StackAt(0).m_value)) 1441 ((Expression)(yyq.StackAt(0).m_value))
1442 ){}} 1442 ){}}
1443 1443
1444public class ForLoopStatement_4 : ForLoopStatement { 1444public class ForLoopStatement_4 : ForLoopStatement {
1445 public ForLoopStatement_4(Parser yyq):base(yyq, 1445 public ForLoopStatement_4(Parser yyq):base(yyq,
1446 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1446 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1447 , 1447 ,
1448 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1448 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1449 ){}} 1449 ){}}
1450 1450
1451public class Assignment_1 : Assignment { 1451public class Assignment_1 : Assignment {
1452 public Assignment_1(Parser yyq):base(yyq, 1452 public Assignment_1(Parser yyq):base(yyq,
1453 ((Declaration)(yyq.StackAt(2).m_value)) 1453 ((Declaration)(yyq.StackAt(2).m_value))
1454 , 1454 ,
1455 ((Expression)(yyq.StackAt(0).m_value)) 1455 ((Expression)(yyq.StackAt(0).m_value))
1456 , 1456 ,
1457 ((EQUALS)(yyq.StackAt(1).m_value)) 1457 ((EQUALS)(yyq.StackAt(1).m_value))
1458 .yytext){}} 1458 .yytext){}}
1459 1459
1460public class Assignment_2 : Assignment { 1460public class Assignment_2 : Assignment {
1461 public Assignment_2(Parser yyq):base(yyq, 1461 public Assignment_2(Parser yyq):base(yyq,
1462 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1462 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1463 ){}} 1463 ){}}
1464 1464
1465public class SimpleAssignment_1 : SimpleAssignment { 1465public class SimpleAssignment_1 : SimpleAssignment {
1466 public SimpleAssignment_1(Parser yyq):base(yyq, 1466 public SimpleAssignment_1(Parser yyq):base(yyq,
1467 ((IDENT)(yyq.StackAt(2).m_value)) 1467 ((IDENT)(yyq.StackAt(2).m_value))
1468 , 1468 ,
1469 ((Expression)(yyq.StackAt(0).m_value)) 1469 ((Expression)(yyq.StackAt(0).m_value))
1470 , 1470 ,
1471 ((EQUALS)(yyq.StackAt(1).m_value)) 1471 ((EQUALS)(yyq.StackAt(1).m_value))
1472 .yytext){}} 1472 .yytext){}}
1473 1473
1474public class SimpleAssignment_2 : SimpleAssignment { 1474public class SimpleAssignment_2 : SimpleAssignment {
1475 public SimpleAssignment_2(Parser yyq):base(yyq, 1475 public SimpleAssignment_2(Parser yyq):base(yyq,
1476 ((IDENT)(yyq.StackAt(2).m_value)) 1476 ((IDENT)(yyq.StackAt(2).m_value))
1477 , 1477 ,
1478 ((Expression)(yyq.StackAt(0).m_value)) 1478 ((Expression)(yyq.StackAt(0).m_value))
1479 , 1479 ,
1480 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1480 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1481 .yytext){}} 1481 .yytext){}}
1482 1482
1483public class SimpleAssignment_3 : SimpleAssignment { 1483public class SimpleAssignment_3 : SimpleAssignment {
1484 public SimpleAssignment_3(Parser yyq):base(yyq, 1484 public SimpleAssignment_3(Parser yyq):base(yyq,
1485 ((IDENT)(yyq.StackAt(2).m_value)) 1485 ((IDENT)(yyq.StackAt(2).m_value))
1486 , 1486 ,
1487 ((Expression)(yyq.StackAt(0).m_value)) 1487 ((Expression)(yyq.StackAt(0).m_value))
1488 , 1488 ,
1489 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1489 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1490 .yytext){}} 1490 .yytext){}}
1491 1491
1492public class SimpleAssignment_4 : SimpleAssignment { 1492public class SimpleAssignment_4 : SimpleAssignment {
1493 public SimpleAssignment_4(Parser yyq):base(yyq, 1493 public SimpleAssignment_4(Parser yyq):base(yyq,
1494 ((IDENT)(yyq.StackAt(2).m_value)) 1494 ((IDENT)(yyq.StackAt(2).m_value))
1495 , 1495 ,
1496 ((Expression)(yyq.StackAt(0).m_value)) 1496 ((Expression)(yyq.StackAt(0).m_value))
1497 , 1497 ,
1498 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1498 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1499 .yytext){}} 1499 .yytext){}}
1500 1500
1501public class SimpleAssignment_5 : SimpleAssignment { 1501public class SimpleAssignment_5 : SimpleAssignment {
1502 public SimpleAssignment_5(Parser yyq):base(yyq, 1502 public SimpleAssignment_5(Parser yyq):base(yyq,
1503 ((IDENT)(yyq.StackAt(2).m_value)) 1503 ((IDENT)(yyq.StackAt(2).m_value))
1504 , 1504 ,
1505 ((Expression)(yyq.StackAt(0).m_value)) 1505 ((Expression)(yyq.StackAt(0).m_value))
1506 , 1506 ,
1507 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1507 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1508 .yytext){}} 1508 .yytext){}}
1509 1509
1510public class SimpleAssignment_6 : SimpleAssignment { 1510public class SimpleAssignment_6 : SimpleAssignment {
1511 public SimpleAssignment_6(Parser yyq):base(yyq, 1511 public SimpleAssignment_6(Parser yyq):base(yyq,
1512 ((IDENT)(yyq.StackAt(2).m_value)) 1512 ((IDENT)(yyq.StackAt(2).m_value))
1513 , 1513 ,
1514 ((Expression)(yyq.StackAt(0).m_value)) 1514 ((Expression)(yyq.StackAt(0).m_value))
1515 , 1515 ,
1516 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1516 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1517 .yytext){}} 1517 .yytext){}}
1518 1518
1519public class SimpleAssignment_7 : SimpleAssignment { 1519public class SimpleAssignment_7 : SimpleAssignment {
1520 public SimpleAssignment_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1520 public SimpleAssignment_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1521)yyq), 1521)yyq),
1522 ((IDENT)(yyq.StackAt(4).m_value)) 1522 ((IDENT)(yyq.StackAt(4).m_value))
1523 .yytext, 1523 .yytext,
1524 ((IDENT)(yyq.StackAt(2).m_value)) 1524 ((IDENT)(yyq.StackAt(2).m_value))
1525 .yytext), 1525 .yytext),
1526 ((Expression)(yyq.StackAt(0).m_value)) 1526 ((Expression)(yyq.StackAt(0).m_value))
1527 , 1527 ,
1528 ((EQUALS)(yyq.StackAt(1).m_value)) 1528 ((EQUALS)(yyq.StackAt(1).m_value))
1529 .yytext){}} 1529 .yytext){}}
1530 1530
1531public class SimpleAssignment_8 : SimpleAssignment { 1531public class SimpleAssignment_8 : SimpleAssignment {
1532 public SimpleAssignment_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1532 public SimpleAssignment_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1533)yyq), 1533)yyq),
1534 ((IDENT)(yyq.StackAt(4).m_value)) 1534 ((IDENT)(yyq.StackAt(4).m_value))
1535 .yytext, 1535 .yytext,
1536 ((IDENT)(yyq.StackAt(2).m_value)) 1536 ((IDENT)(yyq.StackAt(2).m_value))
1537 .yytext), 1537 .yytext),
1538 ((Expression)(yyq.StackAt(0).m_value)) 1538 ((Expression)(yyq.StackAt(0).m_value))
1539 , 1539 ,
1540 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1540 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1541 .yytext){}} 1541 .yytext){}}
1542 1542
1543public class SimpleAssignment_9 : SimpleAssignment { 1543public class SimpleAssignment_9 : SimpleAssignment {
1544 public SimpleAssignment_9(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1544 public SimpleAssignment_9(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1545)yyq), 1545)yyq),
1546 ((IDENT)(yyq.StackAt(4).m_value)) 1546 ((IDENT)(yyq.StackAt(4).m_value))
1547 .yytext, 1547 .yytext,
1548 ((IDENT)(yyq.StackAt(2).m_value)) 1548 ((IDENT)(yyq.StackAt(2).m_value))
1549 .yytext), 1549 .yytext),
1550 ((Expression)(yyq.StackAt(0).m_value)) 1550 ((Expression)(yyq.StackAt(0).m_value))
1551 , 1551 ,
1552 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1552 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1553 .yytext){}} 1553 .yytext){}}
1554 1554
1555public class SimpleAssignment_10 : SimpleAssignment { 1555public class SimpleAssignment_10 : SimpleAssignment {
1556 public SimpleAssignment_10(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1556 public SimpleAssignment_10(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1557)yyq), 1557)yyq),
1558 ((IDENT)(yyq.StackAt(4).m_value)) 1558 ((IDENT)(yyq.StackAt(4).m_value))
1559 .yytext, 1559 .yytext,
1560 ((IDENT)(yyq.StackAt(2).m_value)) 1560 ((IDENT)(yyq.StackAt(2).m_value))
1561 .yytext), 1561 .yytext),
1562 ((Expression)(yyq.StackAt(0).m_value)) 1562 ((Expression)(yyq.StackAt(0).m_value))
1563 , 1563 ,
1564 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1564 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1565 .yytext){}} 1565 .yytext){}}
1566 1566
1567public class SimpleAssignment_11 : SimpleAssignment { 1567public class SimpleAssignment_11 : SimpleAssignment {
1568 public SimpleAssignment_11(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1568 public SimpleAssignment_11(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1569)yyq), 1569)yyq),
1570 ((IDENT)(yyq.StackAt(4).m_value)) 1570 ((IDENT)(yyq.StackAt(4).m_value))
1571 .yytext, 1571 .yytext,
1572 ((IDENT)(yyq.StackAt(2).m_value)) 1572 ((IDENT)(yyq.StackAt(2).m_value))
1573 .yytext), 1573 .yytext),
1574 ((Expression)(yyq.StackAt(0).m_value)) 1574 ((Expression)(yyq.StackAt(0).m_value))
1575 , 1575 ,
1576 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1576 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1577 .yytext){}} 1577 .yytext){}}
1578 1578
1579public class SimpleAssignment_12 : SimpleAssignment { 1579public class SimpleAssignment_12 : SimpleAssignment {
1580 public SimpleAssignment_12(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1580 public SimpleAssignment_12(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1581)yyq), 1581)yyq),
1582 ((IDENT)(yyq.StackAt(4).m_value)) 1582 ((IDENT)(yyq.StackAt(4).m_value))
1583 .yytext, 1583 .yytext,
1584 ((IDENT)(yyq.StackAt(2).m_value)) 1584 ((IDENT)(yyq.StackAt(2).m_value))
1585 .yytext), 1585 .yytext),
1586 ((Expression)(yyq.StackAt(0).m_value)) 1586 ((Expression)(yyq.StackAt(0).m_value))
1587 , 1587 ,
1588 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1588 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1589 .yytext){}} 1589 .yytext){}}
1590 1590
1591public class SimpleAssignment_13 : SimpleAssignment { 1591public class SimpleAssignment_13 : SimpleAssignment {
1592 public SimpleAssignment_13(Parser yyq):base(yyq, 1592 public SimpleAssignment_13(Parser yyq):base(yyq,
1593 ((IDENT)(yyq.StackAt(2).m_value)) 1593 ((IDENT)(yyq.StackAt(2).m_value))
1594 , 1594 ,
1595 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1595 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1596 , 1596 ,
1597 ((EQUALS)(yyq.StackAt(1).m_value)) 1597 ((EQUALS)(yyq.StackAt(1).m_value))
1598 .yytext){}} 1598 .yytext){}}
1599 1599
1600public class SimpleAssignment_14 : SimpleAssignment { 1600public class SimpleAssignment_14 : SimpleAssignment {
1601 public SimpleAssignment_14(Parser yyq):base(yyq, 1601 public SimpleAssignment_14(Parser yyq):base(yyq,
1602 ((IDENT)(yyq.StackAt(2).m_value)) 1602 ((IDENT)(yyq.StackAt(2).m_value))
1603 , 1603 ,
1604 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1604 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1605 , 1605 ,
1606 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1606 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1607 .yytext){}} 1607 .yytext){}}
1608 1608
1609public class SimpleAssignment_15 : SimpleAssignment { 1609public class SimpleAssignment_15 : SimpleAssignment {
1610 public SimpleAssignment_15(Parser yyq):base(yyq, 1610 public SimpleAssignment_15(Parser yyq):base(yyq,
1611 ((IDENT)(yyq.StackAt(2).m_value)) 1611 ((IDENT)(yyq.StackAt(2).m_value))
1612 , 1612 ,
1613 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1613 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1614 , 1614 ,
1615 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1615 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1616 .yytext){}} 1616 .yytext){}}
1617 1617
1618public class SimpleAssignment_16 : SimpleAssignment { 1618public class SimpleAssignment_16 : SimpleAssignment {
1619 public SimpleAssignment_16(Parser yyq):base(yyq, 1619 public SimpleAssignment_16(Parser yyq):base(yyq,
1620 ((IDENT)(yyq.StackAt(2).m_value)) 1620 ((IDENT)(yyq.StackAt(2).m_value))
1621 , 1621 ,
1622 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1622 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1623 , 1623 ,
1624 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1624 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1625 .yytext){}} 1625 .yytext){}}
1626 1626
1627public class SimpleAssignment_17 : SimpleAssignment { 1627public class SimpleAssignment_17 : SimpleAssignment {
1628 public SimpleAssignment_17(Parser yyq):base(yyq, 1628 public SimpleAssignment_17(Parser yyq):base(yyq,
1629 ((IDENT)(yyq.StackAt(2).m_value)) 1629 ((IDENT)(yyq.StackAt(2).m_value))
1630 , 1630 ,
1631 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1631 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1632 , 1632 ,
1633 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1633 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1634 .yytext){}} 1634 .yytext){}}
1635 1635
1636public class SimpleAssignment_18 : SimpleAssignment { 1636public class SimpleAssignment_18 : SimpleAssignment {
1637 public SimpleAssignment_18(Parser yyq):base(yyq, 1637 public SimpleAssignment_18(Parser yyq):base(yyq,
1638 ((IDENT)(yyq.StackAt(2).m_value)) 1638 ((IDENT)(yyq.StackAt(2).m_value))
1639 , 1639 ,
1640 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1640 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1641 , 1641 ,
1642 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1642 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1643 .yytext){}} 1643 .yytext){}}
1644 1644
1645public class SimpleAssignment_19 : SimpleAssignment { 1645public class SimpleAssignment_19 : SimpleAssignment {
1646 public SimpleAssignment_19(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1646 public SimpleAssignment_19(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1647)yyq), 1647)yyq),
1648 ((IDENT)(yyq.StackAt(4).m_value)) 1648 ((IDENT)(yyq.StackAt(4).m_value))
1649 .yytext, 1649 .yytext,
1650 ((IDENT)(yyq.StackAt(2).m_value)) 1650 ((IDENT)(yyq.StackAt(2).m_value))
1651 .yytext), 1651 .yytext),
1652 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1652 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1653 , 1653 ,
1654 ((EQUALS)(yyq.StackAt(1).m_value)) 1654 ((EQUALS)(yyq.StackAt(1).m_value))
1655 .yytext){}} 1655 .yytext){}}
1656 1656
1657public class SimpleAssignment_20 : SimpleAssignment { 1657public class SimpleAssignment_20 : SimpleAssignment {
1658 public SimpleAssignment_20(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1658 public SimpleAssignment_20(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1659)yyq), 1659)yyq),
1660 ((IDENT)(yyq.StackAt(4).m_value)) 1660 ((IDENT)(yyq.StackAt(4).m_value))
1661 .yytext, 1661 .yytext,
1662 ((IDENT)(yyq.StackAt(2).m_value)) 1662 ((IDENT)(yyq.StackAt(2).m_value))
1663 .yytext), 1663 .yytext),
1664 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1664 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1665 , 1665 ,
1666 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1666 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1667 .yytext){}} 1667 .yytext){}}
1668 1668
1669public class SimpleAssignment_21 : SimpleAssignment { 1669public class SimpleAssignment_21 : SimpleAssignment {
1670 public SimpleAssignment_21(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1670 public SimpleAssignment_21(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1671)yyq), 1671)yyq),
1672 ((IDENT)(yyq.StackAt(4).m_value)) 1672 ((IDENT)(yyq.StackAt(4).m_value))
1673 .yytext, 1673 .yytext,
1674 ((IDENT)(yyq.StackAt(2).m_value)) 1674 ((IDENT)(yyq.StackAt(2).m_value))
1675 .yytext), 1675 .yytext),
1676 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1676 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1677 , 1677 ,
1678 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1678 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1679 .yytext){}} 1679 .yytext){}}
1680 1680
1681public class SimpleAssignment_22 : SimpleAssignment { 1681public class SimpleAssignment_22 : SimpleAssignment {
1682 public SimpleAssignment_22(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1682 public SimpleAssignment_22(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1683)yyq), 1683)yyq),
1684 ((IDENT)(yyq.StackAt(4).m_value)) 1684 ((IDENT)(yyq.StackAt(4).m_value))
1685 .yytext, 1685 .yytext,
1686 ((IDENT)(yyq.StackAt(2).m_value)) 1686 ((IDENT)(yyq.StackAt(2).m_value))
1687 .yytext), 1687 .yytext),
1688 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1688 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1689 , 1689 ,
1690 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1690 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1691 .yytext){}} 1691 .yytext){}}
1692 1692
1693public class SimpleAssignment_23 : SimpleAssignment { 1693public class SimpleAssignment_23 : SimpleAssignment {
1694 public SimpleAssignment_23(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1694 public SimpleAssignment_23(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1695)yyq), 1695)yyq),
1696 ((IDENT)(yyq.StackAt(4).m_value)) 1696 ((IDENT)(yyq.StackAt(4).m_value))
1697 .yytext, 1697 .yytext,
1698 ((IDENT)(yyq.StackAt(2).m_value)) 1698 ((IDENT)(yyq.StackAt(2).m_value))
1699 .yytext), 1699 .yytext),
1700 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1700 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1701 , 1701 ,
1702 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1702 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1703 .yytext){}} 1703 .yytext){}}
1704 1704
1705public class SimpleAssignment_24 : SimpleAssignment { 1705public class SimpleAssignment_24 : SimpleAssignment {
1706 public SimpleAssignment_24(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1706 public SimpleAssignment_24(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1707)yyq), 1707)yyq),
1708 ((IDENT)(yyq.StackAt(4).m_value)) 1708 ((IDENT)(yyq.StackAt(4).m_value))
1709 .yytext, 1709 .yytext,
1710 ((IDENT)(yyq.StackAt(2).m_value)) 1710 ((IDENT)(yyq.StackAt(2).m_value))
1711 .yytext), 1711 .yytext),
1712 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1712 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1713 , 1713 ,
1714 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1714 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1715 .yytext){}} 1715 .yytext){}}
1716 1716
1717public class ReturnStatement_1 : ReturnStatement { 1717public class ReturnStatement_1 : ReturnStatement {
1718 public ReturnStatement_1(Parser yyq):base(yyq, 1718 public ReturnStatement_1(Parser yyq):base(yyq,
1719 ((Expression)(yyq.StackAt(0).m_value)) 1719 ((Expression)(yyq.StackAt(0).m_value))
1720 ){}} 1720 ){}}
1721 1721
1722public class ReturnStatement_2 : ReturnStatement { 1722public class ReturnStatement_2 : ReturnStatement {
1723 public ReturnStatement_2(Parser yyq):base(yyq){}} 1723 public ReturnStatement_2(Parser yyq):base(yyq){}}
1724 1724
1725public class Constant_1 : Constant { 1725public class Constant_1 : Constant {
1726 public Constant_1(Parser yyq):base(yyq,"integer", 1726 public Constant_1(Parser yyq):base(yyq,"integer",
1727 ((INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) 1727 ((INTEGER_CONSTANT)(yyq.StackAt(0).m_value))
1728 .yytext){}} 1728 .yytext){}}
1729 1729
1730public class Constant_2 : Constant { 1730public class Constant_2 : Constant {
1731 public Constant_2(Parser yyq):base(yyq,"integer", 1731 public Constant_2(Parser yyq):base(yyq,"integer",
1732 ((HEX_INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) 1732 ((HEX_INTEGER_CONSTANT)(yyq.StackAt(0).m_value))
1733 .yytext){}} 1733 .yytext){}}
1734 1734
1735public class Constant_3 : Constant { 1735public class Constant_3 : Constant {
1736 public Constant_3(Parser yyq):base(yyq,"float", 1736 public Constant_3(Parser yyq):base(yyq,"float",
1737 ((FLOAT_CONSTANT)(yyq.StackAt(0).m_value)) 1737 ((FLOAT_CONSTANT)(yyq.StackAt(0).m_value))
1738 .yytext){}} 1738 .yytext){}}
1739 1739
1740public class Constant_4 : Constant { 1740public class Constant_4 : Constant {
1741 public Constant_4(Parser yyq):base(yyq,"string", 1741 public Constant_4(Parser yyq):base(yyq,"string",
1742 ((STRING_CONSTANT)(yyq.StackAt(0).m_value)) 1742 ((STRING_CONSTANT)(yyq.StackAt(0).m_value))
1743 .yytext){}} 1743 .yytext){}}
1744 1744
1745public class ListConstant_1 : ListConstant { 1745public class ListConstant_1 : ListConstant {
1746 public ListConstant_1(Parser yyq):base(yyq, 1746 public ListConstant_1(Parser yyq):base(yyq,
1747 ((ArgumentList)(yyq.StackAt(1).m_value)) 1747 ((ArgumentList)(yyq.StackAt(1).m_value))
1748 ){}} 1748 ){}}
1749 1749
1750public class VectorConstant_1 : VectorConstant { 1750public class VectorConstant_1 : VectorConstant {
1751 public VectorConstant_1(Parser yyq):base(yyq, 1751 public VectorConstant_1(Parser yyq):base(yyq,
1752 ((Expression)(yyq.StackAt(5).m_value)) 1752 ((Expression)(yyq.StackAt(5).m_value))
1753 , 1753 ,
1754 ((Expression)(yyq.StackAt(3).m_value)) 1754 ((Expression)(yyq.StackAt(3).m_value))
1755 , 1755 ,
1756 ((Expression)(yyq.StackAt(1).m_value)) 1756 ((Expression)(yyq.StackAt(1).m_value))
1757 ){}} 1757 ){}}
1758 1758
1759public class RotationConstant_1 : RotationConstant { 1759public class RotationConstant_1 : RotationConstant {
1760 public RotationConstant_1(Parser yyq):base(yyq, 1760 public RotationConstant_1(Parser yyq):base(yyq,
1761 ((Expression)(yyq.StackAt(7).m_value)) 1761 ((Expression)(yyq.StackAt(7).m_value))
1762 , 1762 ,
1763 ((Expression)(yyq.StackAt(5).m_value)) 1763 ((Expression)(yyq.StackAt(5).m_value))
1764 , 1764 ,
1765 ((Expression)(yyq.StackAt(3).m_value)) 1765 ((Expression)(yyq.StackAt(3).m_value))
1766 , 1766 ,
1767 ((Expression)(yyq.StackAt(1).m_value)) 1767 ((Expression)(yyq.StackAt(1).m_value))
1768 ){}} 1768 ){}}
1769 1769
1770public class ConstantExpression_1 : ConstantExpression { 1770public class ConstantExpression_1 : ConstantExpression {
1771 public ConstantExpression_1(Parser yyq):base(yyq, 1771 public ConstantExpression_1(Parser yyq):base(yyq,
1772 ((Constant)(yyq.StackAt(0).m_value)) 1772 ((Constant)(yyq.StackAt(0).m_value))
1773 ){}} 1773 ){}}
1774 1774
1775public class IdentExpression_1 : IdentExpression { 1775public class IdentExpression_1 : IdentExpression {
1776 public IdentExpression_1(Parser yyq):base(yyq, 1776 public IdentExpression_1(Parser yyq):base(yyq,
1777 ((IDENT)(yyq.StackAt(0).m_value)) 1777 ((IDENT)(yyq.StackAt(0).m_value))
1778 .yytext){}} 1778 .yytext){}}
1779 1779
1780public class IdentDotExpression_1 : IdentDotExpression { 1780public class IdentDotExpression_1 : IdentDotExpression {
1781 public IdentDotExpression_1(Parser yyq):base(yyq, 1781 public IdentDotExpression_1(Parser yyq):base(yyq,
1782 ((IDENT)(yyq.StackAt(2).m_value)) 1782 ((IDENT)(yyq.StackAt(2).m_value))
1783 .yytext, 1783 .yytext,
1784 ((IDENT)(yyq.StackAt(0).m_value)) 1784 ((IDENT)(yyq.StackAt(0).m_value))
1785 .yytext){}} 1785 .yytext){}}
1786 1786
1787public class IncrementDecrementExpression_1 : IncrementDecrementExpression { 1787public class IncrementDecrementExpression_1 : IncrementDecrementExpression {
1788 public IncrementDecrementExpression_1(Parser yyq):base(yyq, 1788 public IncrementDecrementExpression_1(Parser yyq):base(yyq,
1789 ((IDENT)(yyq.StackAt(1).m_value)) 1789 ((IDENT)(yyq.StackAt(1).m_value))
1790 .yytext, 1790 .yytext,
1791 ((INCREMENT)(yyq.StackAt(0).m_value)) 1791 ((INCREMENT)(yyq.StackAt(0).m_value))
1792 .yytext, true){}} 1792 .yytext, true){}}
1793 1793
1794public class IncrementDecrementExpression_2 : IncrementDecrementExpression { 1794public class IncrementDecrementExpression_2 : IncrementDecrementExpression {
1795 public IncrementDecrementExpression_2(Parser yyq):base(yyq, 1795 public IncrementDecrementExpression_2(Parser yyq):base(yyq,
1796 ((IDENT)(yyq.StackAt(1).m_value)) 1796 ((IDENT)(yyq.StackAt(1).m_value))
1797 .yytext, 1797 .yytext,
1798 ((DECREMENT)(yyq.StackAt(0).m_value)) 1798 ((DECREMENT)(yyq.StackAt(0).m_value))
1799 .yytext, true){}} 1799 .yytext, true){}}
1800 1800
1801public class IncrementDecrementExpression_3 : IncrementDecrementExpression { 1801public class IncrementDecrementExpression_3 : IncrementDecrementExpression {
1802 public IncrementDecrementExpression_3(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1802 public IncrementDecrementExpression_3(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1803)yyq), 1803)yyq),
1804 ((IDENT)(yyq.StackAt(3).m_value)) 1804 ((IDENT)(yyq.StackAt(3).m_value))
1805 .yytext, 1805 .yytext,
1806 ((IDENT)(yyq.StackAt(1).m_value)) 1806 ((IDENT)(yyq.StackAt(1).m_value))
1807 .yytext), 1807 .yytext),
1808 ((INCREMENT)(yyq.StackAt(0).m_value)) 1808 ((INCREMENT)(yyq.StackAt(0).m_value))
1809 .yytext, true){}} 1809 .yytext, true){}}
1810 1810
1811public class IncrementDecrementExpression_4 : IncrementDecrementExpression { 1811public class IncrementDecrementExpression_4 : IncrementDecrementExpression {
1812 public IncrementDecrementExpression_4(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1812 public IncrementDecrementExpression_4(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1813)yyq), 1813)yyq),
1814 ((IDENT)(yyq.StackAt(3).m_value)) 1814 ((IDENT)(yyq.StackAt(3).m_value))
1815 .yytext, 1815 .yytext,
1816 ((IDENT)(yyq.StackAt(1).m_value)) 1816 ((IDENT)(yyq.StackAt(1).m_value))
1817 .yytext), 1817 .yytext),
1818 ((DECREMENT)(yyq.StackAt(0).m_value)) 1818 ((DECREMENT)(yyq.StackAt(0).m_value))
1819 .yytext, true){}} 1819 .yytext, true){}}
1820 1820
1821public class IncrementDecrementExpression_5 : IncrementDecrementExpression { 1821public class IncrementDecrementExpression_5 : IncrementDecrementExpression {
1822 public IncrementDecrementExpression_5(Parser yyq):base(yyq, 1822 public IncrementDecrementExpression_5(Parser yyq):base(yyq,
1823 ((IDENT)(yyq.StackAt(0).m_value)) 1823 ((IDENT)(yyq.StackAt(0).m_value))
1824 .yytext, 1824 .yytext,
1825 ((INCREMENT)(yyq.StackAt(1).m_value)) 1825 ((INCREMENT)(yyq.StackAt(1).m_value))
1826 .yytext, false){}} 1826 .yytext, false){}}
1827 1827
1828public class IncrementDecrementExpression_6 : IncrementDecrementExpression { 1828public class IncrementDecrementExpression_6 : IncrementDecrementExpression {
1829 public IncrementDecrementExpression_6(Parser yyq):base(yyq, 1829 public IncrementDecrementExpression_6(Parser yyq):base(yyq,
1830 ((IDENT)(yyq.StackAt(0).m_value)) 1830 ((IDENT)(yyq.StackAt(0).m_value))
1831 .yytext, 1831 .yytext,
1832 ((DECREMENT)(yyq.StackAt(1).m_value)) 1832 ((DECREMENT)(yyq.StackAt(1).m_value))
1833 .yytext, false){}} 1833 .yytext, false){}}
1834 1834
1835public class IncrementDecrementExpression_7 : IncrementDecrementExpression { 1835public class IncrementDecrementExpression_7 : IncrementDecrementExpression {
1836 public IncrementDecrementExpression_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1836 public IncrementDecrementExpression_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1837)yyq), 1837)yyq),
1838 ((IDENT)(yyq.StackAt(2).m_value)) 1838 ((IDENT)(yyq.StackAt(2).m_value))
1839 .yytext, 1839 .yytext,
1840 ((IDENT)(yyq.StackAt(0).m_value)) 1840 ((IDENT)(yyq.StackAt(0).m_value))
1841 .yytext), 1841 .yytext),
1842 ((INCREMENT)(yyq.StackAt(3).m_value)) 1842 ((INCREMENT)(yyq.StackAt(3).m_value))
1843 .yytext, false){}} 1843 .yytext, false){}}
1844 1844
1845public class IncrementDecrementExpression_8 : IncrementDecrementExpression { 1845public class IncrementDecrementExpression_8 : IncrementDecrementExpression {
1846 public IncrementDecrementExpression_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1846 public IncrementDecrementExpression_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1847)yyq), 1847)yyq),
1848 ((IDENT)(yyq.StackAt(2).m_value)) 1848 ((IDENT)(yyq.StackAt(2).m_value))
1849 .yytext, 1849 .yytext,
1850 ((IDENT)(yyq.StackAt(0).m_value)) 1850 ((IDENT)(yyq.StackAt(0).m_value))
1851 .yytext), 1851 .yytext),
1852 ((DECREMENT)(yyq.StackAt(3).m_value)) 1852 ((DECREMENT)(yyq.StackAt(3).m_value))
1853 .yytext, false){}} 1853 .yytext, false){}}
1854 1854
1855public class FunctionCallExpression_1 : FunctionCallExpression { 1855public class FunctionCallExpression_1 : FunctionCallExpression {
1856 public FunctionCallExpression_1(Parser yyq):base(yyq, 1856 public FunctionCallExpression_1(Parser yyq):base(yyq,
1857 ((FunctionCall)(yyq.StackAt(0).m_value)) 1857 ((FunctionCall)(yyq.StackAt(0).m_value))
1858 ){}} 1858 ){}}
1859 1859
1860public class BinaryExpression_1 : BinaryExpression { 1860public class BinaryExpression_1 : BinaryExpression {
1861 public BinaryExpression_1(Parser yyq):base(yyq, 1861 public BinaryExpression_1(Parser yyq):base(yyq,
1862 ((Expression)(yyq.StackAt(2).m_value)) 1862 ((Expression)(yyq.StackAt(2).m_value))
1863 , 1863 ,
1864 ((Expression)(yyq.StackAt(0).m_value)) 1864 ((Expression)(yyq.StackAt(0).m_value))
1865 , 1865 ,
1866 ((PLUS)(yyq.StackAt(1).m_value)) 1866 ((PLUS)(yyq.StackAt(1).m_value))
1867 .yytext){}} 1867 .yytext){}}
1868 1868
1869public class BinaryExpression_2 : BinaryExpression { 1869public class BinaryExpression_2 : BinaryExpression {
1870 public BinaryExpression_2(Parser yyq):base(yyq, 1870 public BinaryExpression_2(Parser yyq):base(yyq,
1871 ((Expression)(yyq.StackAt(2).m_value)) 1871 ((Expression)(yyq.StackAt(2).m_value))
1872 , 1872 ,
1873 ((Expression)(yyq.StackAt(0).m_value)) 1873 ((Expression)(yyq.StackAt(0).m_value))
1874 , 1874 ,
1875 ((MINUS)(yyq.StackAt(1).m_value)) 1875 ((MINUS)(yyq.StackAt(1).m_value))
1876 .yytext){}} 1876 .yytext){}}
1877 1877
1878public class BinaryExpression_3 : BinaryExpression { 1878public class BinaryExpression_3 : BinaryExpression {
1879 public BinaryExpression_3(Parser yyq):base(yyq, 1879 public BinaryExpression_3(Parser yyq):base(yyq,
1880 ((Expression)(yyq.StackAt(2).m_value)) 1880 ((Expression)(yyq.StackAt(2).m_value))
1881 , 1881 ,
1882 ((Expression)(yyq.StackAt(0).m_value)) 1882 ((Expression)(yyq.StackAt(0).m_value))
1883 , 1883 ,
1884 ((STAR)(yyq.StackAt(1).m_value)) 1884 ((STAR)(yyq.StackAt(1).m_value))
1885 .yytext){}} 1885 .yytext){}}
1886 1886
1887public class BinaryExpression_4 : BinaryExpression { 1887public class BinaryExpression_4 : BinaryExpression {
1888 public BinaryExpression_4(Parser yyq):base(yyq, 1888 public BinaryExpression_4(Parser yyq):base(yyq,
1889 ((Expression)(yyq.StackAt(2).m_value)) 1889 ((Expression)(yyq.StackAt(2).m_value))
1890 , 1890 ,
1891 ((Expression)(yyq.StackAt(0).m_value)) 1891 ((Expression)(yyq.StackAt(0).m_value))
1892 , 1892 ,
1893 ((SLASH)(yyq.StackAt(1).m_value)) 1893 ((SLASH)(yyq.StackAt(1).m_value))
1894 .yytext){}} 1894 .yytext){}}
1895 1895
1896public class BinaryExpression_5 : BinaryExpression { 1896public class BinaryExpression_5 : BinaryExpression {
1897 public BinaryExpression_5(Parser yyq):base(yyq, 1897 public BinaryExpression_5(Parser yyq):base(yyq,
1898 ((Expression)(yyq.StackAt(2).m_value)) 1898 ((Expression)(yyq.StackAt(2).m_value))
1899 , 1899 ,
1900 ((Expression)(yyq.StackAt(0).m_value)) 1900 ((Expression)(yyq.StackAt(0).m_value))
1901 , 1901 ,
1902 ((PERCENT)(yyq.StackAt(1).m_value)) 1902 ((PERCENT)(yyq.StackAt(1).m_value))
1903 .yytext){}} 1903 .yytext){}}
1904 1904
1905public class BinaryExpression_6 : BinaryExpression { 1905public class BinaryExpression_6 : BinaryExpression {
1906 public BinaryExpression_6(Parser yyq):base(yyq, 1906 public BinaryExpression_6(Parser yyq):base(yyq,
1907 ((Expression)(yyq.StackAt(2).m_value)) 1907 ((Expression)(yyq.StackAt(2).m_value))
1908 , 1908 ,
1909 ((Expression)(yyq.StackAt(0).m_value)) 1909 ((Expression)(yyq.StackAt(0).m_value))
1910 , 1910 ,
1911 ((AMP)(yyq.StackAt(1).m_value)) 1911 ((AMP)(yyq.StackAt(1).m_value))
1912 .yytext){}} 1912 .yytext){}}
1913 1913
1914public class BinaryExpression_7 : BinaryExpression { 1914public class BinaryExpression_7 : BinaryExpression {
1915 public BinaryExpression_7(Parser yyq):base(yyq, 1915 public BinaryExpression_7(Parser yyq):base(yyq,
1916 ((Expression)(yyq.StackAt(2).m_value)) 1916 ((Expression)(yyq.StackAt(2).m_value))
1917 , 1917 ,
1918 ((Expression)(yyq.StackAt(0).m_value)) 1918 ((Expression)(yyq.StackAt(0).m_value))
1919 , 1919 ,
1920 ((STROKE)(yyq.StackAt(1).m_value)) 1920 ((STROKE)(yyq.StackAt(1).m_value))
1921 .yytext){}} 1921 .yytext){}}
1922 1922
1923public class BinaryExpression_8 : BinaryExpression { 1923public class BinaryExpression_8 : BinaryExpression {
1924 public BinaryExpression_8(Parser yyq):base(yyq, 1924 public BinaryExpression_8(Parser yyq):base(yyq,
1925 ((Expression)(yyq.StackAt(2).m_value)) 1925 ((Expression)(yyq.StackAt(2).m_value))
1926 , 1926 ,
1927 ((Expression)(yyq.StackAt(0).m_value)) 1927 ((Expression)(yyq.StackAt(0).m_value))
1928 , 1928 ,
1929 ((CARET)(yyq.StackAt(1).m_value)) 1929 ((CARET)(yyq.StackAt(1).m_value))
1930 .yytext){}} 1930 .yytext){}}
1931 1931
1932public class BinaryExpression_9 : BinaryExpression { 1932public class BinaryExpression_9 : BinaryExpression {
1933 public BinaryExpression_9(Parser yyq):base(yyq, 1933 public BinaryExpression_9(Parser yyq):base(yyq,
1934 ((Expression)(yyq.StackAt(2).m_value)) 1934 ((Expression)(yyq.StackAt(2).m_value))
1935 , 1935 ,
1936 ((Expression)(yyq.StackAt(0).m_value)) 1936 ((Expression)(yyq.StackAt(0).m_value))
1937 , 1937 ,
1938 ((RIGHT_ANGLE)(yyq.StackAt(1).m_value)) 1938 ((RIGHT_ANGLE)(yyq.StackAt(1).m_value))
1939 .yytext){}} 1939 .yytext){}}
1940 1940
1941public class BinaryExpression_10 : BinaryExpression { 1941public class BinaryExpression_10 : BinaryExpression {
1942 public BinaryExpression_10(Parser yyq):base(yyq, 1942 public BinaryExpression_10(Parser yyq):base(yyq,
1943 ((Expression)(yyq.StackAt(2).m_value)) 1943 ((Expression)(yyq.StackAt(2).m_value))
1944 , 1944 ,
1945 ((Expression)(yyq.StackAt(0).m_value)) 1945 ((Expression)(yyq.StackAt(0).m_value))
1946 , 1946 ,
1947 ((LEFT_ANGLE)(yyq.StackAt(1).m_value)) 1947 ((LEFT_ANGLE)(yyq.StackAt(1).m_value))
1948 .yytext){}} 1948 .yytext){}}
1949 1949
1950public class BinaryExpression_11 : BinaryExpression { 1950public class BinaryExpression_11 : BinaryExpression {
1951 public BinaryExpression_11(Parser yyq):base(yyq, 1951 public BinaryExpression_11(Parser yyq):base(yyq,
1952 ((Expression)(yyq.StackAt(2).m_value)) 1952 ((Expression)(yyq.StackAt(2).m_value))
1953 , 1953 ,
1954 ((Expression)(yyq.StackAt(0).m_value)) 1954 ((Expression)(yyq.StackAt(0).m_value))
1955 , 1955 ,
1956 ((EQUALS_EQUALS)(yyq.StackAt(1).m_value)) 1956 ((EQUALS_EQUALS)(yyq.StackAt(1).m_value))
1957 .yytext){}} 1957 .yytext){}}
1958 1958
1959public class BinaryExpression_12 : BinaryExpression { 1959public class BinaryExpression_12 : BinaryExpression {
1960 public BinaryExpression_12(Parser yyq):base(yyq, 1960 public BinaryExpression_12(Parser yyq):base(yyq,
1961 ((Expression)(yyq.StackAt(2).m_value)) 1961 ((Expression)(yyq.StackAt(2).m_value))
1962 , 1962 ,
1963 ((Expression)(yyq.StackAt(0).m_value)) 1963 ((Expression)(yyq.StackAt(0).m_value))
1964 , 1964 ,
1965 ((EXCLAMATION_EQUALS)(yyq.StackAt(1).m_value)) 1965 ((EXCLAMATION_EQUALS)(yyq.StackAt(1).m_value))
1966 .yytext){}} 1966 .yytext){}}
1967 1967
1968public class BinaryExpression_13 : BinaryExpression { 1968public class BinaryExpression_13 : BinaryExpression {
1969 public BinaryExpression_13(Parser yyq):base(yyq, 1969 public BinaryExpression_13(Parser yyq):base(yyq,
1970 ((Expression)(yyq.StackAt(2).m_value)) 1970 ((Expression)(yyq.StackAt(2).m_value))
1971 , 1971 ,
1972 ((Expression)(yyq.StackAt(0).m_value)) 1972 ((Expression)(yyq.StackAt(0).m_value))
1973 , 1973 ,
1974 ((LESS_EQUALS)(yyq.StackAt(1).m_value)) 1974 ((LESS_EQUALS)(yyq.StackAt(1).m_value))
1975 .yytext){}} 1975 .yytext){}}
1976 1976
1977public class BinaryExpression_14 : BinaryExpression { 1977public class BinaryExpression_14 : BinaryExpression {
1978 public BinaryExpression_14(Parser yyq):base(yyq, 1978 public BinaryExpression_14(Parser yyq):base(yyq,
1979 ((Expression)(yyq.StackAt(2).m_value)) 1979 ((Expression)(yyq.StackAt(2).m_value))
1980 , 1980 ,
1981 ((Expression)(yyq.StackAt(0).m_value)) 1981 ((Expression)(yyq.StackAt(0).m_value))
1982 , 1982 ,
1983 ((GREATER_EQUALS)(yyq.StackAt(1).m_value)) 1983 ((GREATER_EQUALS)(yyq.StackAt(1).m_value))
1984 .yytext){}} 1984 .yytext){}}
1985 1985
1986public class BinaryExpression_15 : BinaryExpression { 1986public class BinaryExpression_15 : BinaryExpression {
1987 public BinaryExpression_15(Parser yyq):base(yyq, 1987 public BinaryExpression_15(Parser yyq):base(yyq,
1988 ((Expression)(yyq.StackAt(2).m_value)) 1988 ((Expression)(yyq.StackAt(2).m_value))
1989 , 1989 ,
1990 ((Expression)(yyq.StackAt(0).m_value)) 1990 ((Expression)(yyq.StackAt(0).m_value))
1991 , 1991 ,
1992 ((AMP_AMP)(yyq.StackAt(1).m_value)) 1992 ((AMP_AMP)(yyq.StackAt(1).m_value))
1993 .yytext){}} 1993 .yytext){}}
1994 1994
1995public class BinaryExpression_16 : BinaryExpression { 1995public class BinaryExpression_16 : BinaryExpression {
1996 public BinaryExpression_16(Parser yyq):base(yyq, 1996 public BinaryExpression_16(Parser yyq):base(yyq,
1997 ((Expression)(yyq.StackAt(2).m_value)) 1997 ((Expression)(yyq.StackAt(2).m_value))
1998 , 1998 ,
1999 ((Expression)(yyq.StackAt(0).m_value)) 1999 ((Expression)(yyq.StackAt(0).m_value))
2000 , 2000 ,
2001 ((STROKE_STROKE)(yyq.StackAt(1).m_value)) 2001 ((STROKE_STROKE)(yyq.StackAt(1).m_value))
2002 .yytext){}} 2002 .yytext){}}
2003 2003
2004public class BinaryExpression_17 : BinaryExpression { 2004public class BinaryExpression_17 : BinaryExpression {
2005 public BinaryExpression_17(Parser yyq):base(yyq, 2005 public BinaryExpression_17(Parser yyq):base(yyq,
2006 ((Expression)(yyq.StackAt(2).m_value)) 2006 ((Expression)(yyq.StackAt(2).m_value))
2007 , 2007 ,
2008 ((Expression)(yyq.StackAt(0).m_value)) 2008 ((Expression)(yyq.StackAt(0).m_value))
2009 , 2009 ,
2010 ((LEFT_SHIFT)(yyq.StackAt(1).m_value)) 2010 ((LEFT_SHIFT)(yyq.StackAt(1).m_value))
2011 .yytext){}} 2011 .yytext){}}
2012 2012
2013public class BinaryExpression_18 : BinaryExpression { 2013public class BinaryExpression_18 : BinaryExpression {
2014 public BinaryExpression_18(Parser yyq):base(yyq, 2014 public BinaryExpression_18(Parser yyq):base(yyq,
2015 ((Expression)(yyq.StackAt(2).m_value)) 2015 ((Expression)(yyq.StackAt(2).m_value))
2016 , 2016 ,
2017 ((Expression)(yyq.StackAt(0).m_value)) 2017 ((Expression)(yyq.StackAt(0).m_value))
2018 , 2018 ,
2019 ((RIGHT_SHIFT)(yyq.StackAt(1).m_value)) 2019 ((RIGHT_SHIFT)(yyq.StackAt(1).m_value))
2020 .yytext){}} 2020 .yytext){}}
2021 2021
2022public class UnaryExpression_1 : UnaryExpression { 2022public class UnaryExpression_1 : UnaryExpression {
2023 public UnaryExpression_1(Parser yyq):base(yyq, 2023 public UnaryExpression_1(Parser yyq):base(yyq,
2024 ((EXCLAMATION)(yyq.StackAt(1).m_value)) 2024 ((EXCLAMATION)(yyq.StackAt(1).m_value))
2025 .yytext, 2025 .yytext,
2026 ((Expression)(yyq.StackAt(0).m_value)) 2026 ((Expression)(yyq.StackAt(0).m_value))
2027 ){}} 2027 ){}}
2028 2028
2029public class UnaryExpression_2 : UnaryExpression { 2029public class UnaryExpression_2 : UnaryExpression {
2030 public UnaryExpression_2(Parser yyq):base(yyq, 2030 public UnaryExpression_2(Parser yyq):base(yyq,
2031 ((MINUS)(yyq.StackAt(1).m_value)) 2031 ((MINUS)(yyq.StackAt(1).m_value))
2032 .yytext, 2032 .yytext,
2033 ((Expression)(yyq.StackAt(0).m_value)) 2033 ((Expression)(yyq.StackAt(0).m_value))
2034 ){}} 2034 ){}}
2035 2035
2036public class UnaryExpression_3 : UnaryExpression { 2036public class UnaryExpression_3 : UnaryExpression {
2037 public UnaryExpression_3(Parser yyq):base(yyq, 2037 public UnaryExpression_3(Parser yyq):base(yyq,
2038 ((TILDE)(yyq.StackAt(1).m_value)) 2038 ((TILDE)(yyq.StackAt(1).m_value))
2039 .yytext, 2039 .yytext,
2040 ((Expression)(yyq.StackAt(0).m_value)) 2040 ((Expression)(yyq.StackAt(0).m_value))
2041 ){}} 2041 ){}}
2042 2042
2043public class ParenthesisExpression_1 : ParenthesisExpression { 2043public class ParenthesisExpression_1 : ParenthesisExpression {
2044 public ParenthesisExpression_1(Parser yyq):base(yyq, 2044 public ParenthesisExpression_1(Parser yyq):base(yyq,
2045 ((Expression)(yyq.StackAt(1).m_value)) 2045 ((Expression)(yyq.StackAt(1).m_value))
2046 ){}} 2046 ){}}
2047 2047
2048public class ParenthesisExpression_2 : ParenthesisExpression { 2048public class ParenthesisExpression_2 : ParenthesisExpression {
2049 public ParenthesisExpression_2(Parser yyq):base(yyq, 2049 public ParenthesisExpression_2(Parser yyq):base(yyq,
2050 ((SimpleAssignment)(yyq.StackAt(1).m_value)) 2050 ((SimpleAssignment)(yyq.StackAt(1).m_value))
2051 ){}} 2051 ){}}
2052 2052
2053public class TypecastExpression_1 : TypecastExpression { 2053public class TypecastExpression_1 : TypecastExpression {
2054 public TypecastExpression_1(Parser yyq):base(yyq, 2054 public TypecastExpression_1(Parser yyq):base(yyq,
2055 ((Typename)(yyq.StackAt(2).m_value)) 2055 ((Typename)(yyq.StackAt(2).m_value))
2056 .yytext, 2056 .yytext,
2057 ((Constant)(yyq.StackAt(0).m_value)) 2057 ((Constant)(yyq.StackAt(0).m_value))
2058 ){}} 2058 ){}}
2059 2059
2060public class TypecastExpression_2 : TypecastExpression { 2060public class TypecastExpression_2 : TypecastExpression {
2061 public TypecastExpression_2(Parser yyq):base(yyq, 2061 public TypecastExpression_2(Parser yyq):base(yyq,
2062 ((Typename)(yyq.StackAt(2).m_value)) 2062 ((Typename)(yyq.StackAt(2).m_value))
2063 .yytext, new IdentExpression(((LSLSyntax 2063 .yytext, new IdentExpression(((LSLSyntax
2064)yyq), 2064)yyq),
2065 ((IDENT)(yyq.StackAt(0).m_value)) 2065 ((IDENT)(yyq.StackAt(0).m_value))
2066 .yytext)){}} 2066 .yytext)){}}
2067 2067
2068public class TypecastExpression_3 : TypecastExpression { 2068public class TypecastExpression_3 : TypecastExpression {
2069 public TypecastExpression_3(Parser yyq):base(yyq, 2069 public TypecastExpression_3(Parser yyq):base(yyq,
2070 ((Typename)(yyq.StackAt(4).m_value)) 2070 ((Typename)(yyq.StackAt(4).m_value))
2071 .yytext, new IdentDotExpression(((LSLSyntax 2071 .yytext, new IdentDotExpression(((LSLSyntax
2072)yyq), 2072)yyq),
2073 ((IDENT)(yyq.StackAt(2).m_value)) 2073 ((IDENT)(yyq.StackAt(2).m_value))
2074 .yytext, 2074 .yytext,
2075 ((IDENT)(yyq.StackAt(0).m_value)) 2075 ((IDENT)(yyq.StackAt(0).m_value))
2076 .yytext)){}} 2076 .yytext)){}}
2077 2077
2078public class TypecastExpression_4 : TypecastExpression { 2078public class TypecastExpression_4 : TypecastExpression {
2079 public TypecastExpression_4(Parser yyq):base(yyq, 2079 public TypecastExpression_4(Parser yyq):base(yyq,
2080 ((Typename)(yyq.StackAt(3).m_value)) 2080 ((Typename)(yyq.StackAt(3).m_value))
2081 .yytext, new IncrementDecrementExpression(((LSLSyntax 2081 .yytext, new IncrementDecrementExpression(((LSLSyntax
2082)yyq), 2082)yyq),
2083 ((IDENT)(yyq.StackAt(1).m_value)) 2083 ((IDENT)(yyq.StackAt(1).m_value))
2084 .yytext, 2084 .yytext,
2085 ((INCREMENT)(yyq.StackAt(0).m_value)) 2085 ((INCREMENT)(yyq.StackAt(0).m_value))
2086 .yytext, true)){}} 2086 .yytext, true)){}}
2087 2087
2088public class TypecastExpression_5 : TypecastExpression { 2088public class TypecastExpression_5 : TypecastExpression {
2089 public TypecastExpression_5(Parser yyq):base(yyq, 2089 public TypecastExpression_5(Parser yyq):base(yyq,
2090 ((Typename)(yyq.StackAt(5).m_value)) 2090 ((Typename)(yyq.StackAt(5).m_value))
2091 .yytext, new IncrementDecrementExpression(((LSLSyntax 2091 .yytext, new IncrementDecrementExpression(((LSLSyntax
2092)yyq), new IdentDotExpression(((LSLSyntax 2092)yyq), new IdentDotExpression(((LSLSyntax
2093)yyq), 2093)yyq),
2094 ((IDENT)(yyq.StackAt(3).m_value)) 2094 ((IDENT)(yyq.StackAt(3).m_value))
2095 .yytext, 2095 .yytext,
2096 ((IDENT)(yyq.StackAt(1).m_value)) 2096 ((IDENT)(yyq.StackAt(1).m_value))
2097 .yytext), 2097 .yytext),
2098 ((INCREMENT)(yyq.StackAt(0).m_value)) 2098 ((INCREMENT)(yyq.StackAt(0).m_value))
2099 .yytext, true)){}} 2099 .yytext, true)){}}
2100 2100
2101public class TypecastExpression_6 : TypecastExpression { 2101public class TypecastExpression_6 : TypecastExpression {
2102 public TypecastExpression_6(Parser yyq):base(yyq, 2102 public TypecastExpression_6(Parser yyq):base(yyq,
2103 ((Typename)(yyq.StackAt(3).m_value)) 2103 ((Typename)(yyq.StackAt(3).m_value))
2104 .yytext, new IncrementDecrementExpression(((LSLSyntax 2104 .yytext, new IncrementDecrementExpression(((LSLSyntax
2105)yyq), 2105)yyq),
2106 ((IDENT)(yyq.StackAt(1).m_value)) 2106 ((IDENT)(yyq.StackAt(1).m_value))
2107 .yytext, 2107 .yytext,
2108 ((DECREMENT)(yyq.StackAt(0).m_value)) 2108 ((DECREMENT)(yyq.StackAt(0).m_value))
2109 .yytext, true)){}} 2109 .yytext, true)){}}
2110 2110
2111public class TypecastExpression_7 : TypecastExpression { 2111public class TypecastExpression_7 : TypecastExpression {
2112 public TypecastExpression_7(Parser yyq):base(yyq, 2112 public TypecastExpression_7(Parser yyq):base(yyq,
2113 ((Typename)(yyq.StackAt(5).m_value)) 2113 ((Typename)(yyq.StackAt(5).m_value))
2114 .yytext, new IncrementDecrementExpression(((LSLSyntax 2114 .yytext, new IncrementDecrementExpression(((LSLSyntax
2115)yyq), new IdentDotExpression(((LSLSyntax 2115)yyq), new IdentDotExpression(((LSLSyntax
2116)yyq), 2116)yyq),
2117 ((IDENT)(yyq.StackAt(3).m_value)) 2117 ((IDENT)(yyq.StackAt(3).m_value))
2118 .yytext, 2118 .yytext,
2119 ((IDENT)(yyq.StackAt(1).m_value)) 2119 ((IDENT)(yyq.StackAt(1).m_value))
2120 .yytext), 2120 .yytext),
2121 ((DECREMENT)(yyq.StackAt(0).m_value)) 2121 ((DECREMENT)(yyq.StackAt(0).m_value))
2122 .yytext, true)){}} 2122 .yytext, true)){}}
2123 2123
2124public class TypecastExpression_8 : TypecastExpression { 2124public class TypecastExpression_8 : TypecastExpression {
2125 public TypecastExpression_8(Parser yyq):base(yyq, 2125 public TypecastExpression_8(Parser yyq):base(yyq,
2126 ((Typename)(yyq.StackAt(2).m_value)) 2126 ((Typename)(yyq.StackAt(2).m_value))
2127 .yytext, 2127 .yytext,
2128 ((FunctionCall)(yyq.StackAt(0).m_value)) 2128 ((FunctionCall)(yyq.StackAt(0).m_value))
2129 ){}} 2129 ){}}
2130 2130
2131public class TypecastExpression_9 : TypecastExpression { 2131public class TypecastExpression_9 : TypecastExpression {
2132 public TypecastExpression_9(Parser yyq):base(yyq, 2132 public TypecastExpression_9(Parser yyq):base(yyq,
2133 ((Typename)(yyq.StackAt(4).m_value)) 2133 ((Typename)(yyq.StackAt(4).m_value))
2134 .yytext, 2134 .yytext,
2135 ((Expression)(yyq.StackAt(1).m_value)) 2135 ((Expression)(yyq.StackAt(1).m_value))
2136 ){}} 2136 ){}}
2137 2137
2138public class FunctionCall_1 : FunctionCall { 2138public class FunctionCall_1 : FunctionCall {
2139 public FunctionCall_1(Parser yyq):base(yyq, 2139 public FunctionCall_1(Parser yyq):base(yyq,
2140 ((IDENT)(yyq.StackAt(3).m_value)) 2140 ((IDENT)(yyq.StackAt(3).m_value))
2141 .yytext, 2141 .yytext,
2142 ((ArgumentList)(yyq.StackAt(1).m_value)) 2142 ((ArgumentList)(yyq.StackAt(1).m_value))
2143 ){}} 2143 ){}}
2144 2144
2145public class ArgumentList_1 : ArgumentList { 2145public class ArgumentList_1 : ArgumentList {
2146 public ArgumentList_1(Parser yyq):base(yyq, 2146 public ArgumentList_1(Parser yyq):base(yyq,
2147 ((Argument)(yyq.StackAt(0).m_value)) 2147 ((Argument)(yyq.StackAt(0).m_value))
2148 ){}} 2148 ){}}
2149 2149
2150public class ArgumentList_2 : ArgumentList { 2150public class ArgumentList_2 : ArgumentList {
2151 public ArgumentList_2(Parser yyq):base(yyq, 2151 public ArgumentList_2(Parser yyq):base(yyq,
2152 ((ArgumentList)(yyq.StackAt(2).m_value)) 2152 ((ArgumentList)(yyq.StackAt(2).m_value))
2153 , 2153 ,
2154 ((Argument)(yyq.StackAt(0).m_value)) 2154 ((Argument)(yyq.StackAt(0).m_value))
2155 ){}} 2155 ){}}
2156 2156
2157public class ExpressionArgument_1 : ExpressionArgument { 2157public class ExpressionArgument_1 : ExpressionArgument {
2158 public ExpressionArgument_1(Parser yyq):base(yyq, 2158 public ExpressionArgument_1(Parser yyq):base(yyq,
2159 ((Expression)(yyq.StackAt(0).m_value)) 2159 ((Expression)(yyq.StackAt(0).m_value))
2160 ){}} 2160 ){}}
2161 2161
2162public class Typename_1 : Typename { 2162public class Typename_1 : Typename {
2163 public Typename_1(Parser yyq):base(yyq, 2163 public Typename_1(Parser yyq):base(yyq,
2164 ((INTEGER_TYPE)(yyq.StackAt(0).m_value)) 2164 ((INTEGER_TYPE)(yyq.StackAt(0).m_value))
2165 .yytext){}} 2165 .yytext){}}
2166 2166
2167public class Typename_2 : Typename { 2167public class Typename_2 : Typename {
2168 public Typename_2(Parser yyq):base(yyq, 2168 public Typename_2(Parser yyq):base(yyq,
2169 ((FLOAT_TYPE)(yyq.StackAt(0).m_value)) 2169 ((FLOAT_TYPE)(yyq.StackAt(0).m_value))
2170 .yytext){}} 2170 .yytext){}}
2171 2171
2172public class Typename_3 : Typename { 2172public class Typename_3 : Typename {
2173 public Typename_3(Parser yyq):base(yyq, 2173 public Typename_3(Parser yyq):base(yyq,
2174 ((STRING_TYPE)(yyq.StackAt(0).m_value)) 2174 ((STRING_TYPE)(yyq.StackAt(0).m_value))
2175 .yytext){}} 2175 .yytext){}}
2176 2176
2177public class Typename_4 : Typename { 2177public class Typename_4 : Typename {
2178 public Typename_4(Parser yyq):base(yyq, 2178 public Typename_4(Parser yyq):base(yyq,
2179 ((KEY_TYPE)(yyq.StackAt(0).m_value)) 2179 ((KEY_TYPE)(yyq.StackAt(0).m_value))
2180 .yytext){}} 2180 .yytext){}}
2181 2181
2182public class Typename_5 : Typename { 2182public class Typename_5 : Typename {
2183 public Typename_5(Parser yyq):base(yyq, 2183 public Typename_5(Parser yyq):base(yyq,
2184 ((VECTOR_TYPE)(yyq.StackAt(0).m_value)) 2184 ((VECTOR_TYPE)(yyq.StackAt(0).m_value))
2185 .yytext){}} 2185 .yytext){}}
2186 2186
2187public class Typename_6 : Typename { 2187public class Typename_6 : Typename {
2188 public Typename_6(Parser yyq):base(yyq, 2188 public Typename_6(Parser yyq):base(yyq,
2189 ((ROTATION_TYPE)(yyq.StackAt(0).m_value)) 2189 ((ROTATION_TYPE)(yyq.StackAt(0).m_value))
2190 .yytext){}} 2190 .yytext){}}
2191 2191
2192public class Typename_7 : Typename { 2192public class Typename_7 : Typename {
2193 public Typename_7(Parser yyq):base(yyq, 2193 public Typename_7(Parser yyq):base(yyq,
2194 ((LIST_TYPE)(yyq.StackAt(0).m_value)) 2194 ((LIST_TYPE)(yyq.StackAt(0).m_value))
2195 .yytext){}} 2195 .yytext){}}
2196 2196
2197public class Event_1 : Event { 2197public class Event_1 : Event {
2198 public Event_1(Parser yyq):base(yyq, 2198 public Event_1(Parser yyq):base(yyq,
2199 ((DATASERVER_EVENT)(yyq.StackAt(0).m_value)) 2199 ((DATASERVER_EVENT)(yyq.StackAt(0).m_value))
2200 .yytext){}} 2200 .yytext){}}
2201 2201
2202public class Event_2 : Event { 2202public class Event_2 : Event {
2203 public Event_2(Parser yyq):base(yyq, 2203 public Event_2(Parser yyq):base(yyq,
2204 ((EMAIL_EVENT)(yyq.StackAt(0).m_value)) 2204 ((EMAIL_EVENT)(yyq.StackAt(0).m_value))
2205 .yytext){}} 2205 .yytext){}}
2206 2206
2207public class Event_3 : Event { 2207public class Event_3 : Event {
2208 public Event_3(Parser yyq):base(yyq, 2208 public Event_3(Parser yyq):base(yyq,
2209 ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value)) 2209 ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value))
2210 .yytext){}} 2210 .yytext){}}
2211 2211
2212public class Event_4 : Event { 2212public class Event_4 : Event {
2213 public Event_4(Parser yyq):base(yyq, 2213 public Event_4(Parser yyq):base(yyq,
2214 ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value)) 2214 ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value))
2215 .yytext){}} 2215 .yytext){}}
2216 2216
2217public class Event_5 : Event { 2217public class Event_5 : Event {
2218 public Event_5(Parser yyq):base(yyq, 2218 public Event_5(Parser yyq):base(yyq,
2219 ((LISTEN_EVENT)(yyq.StackAt(0).m_value)) 2219 ((LISTEN_EVENT)(yyq.StackAt(0).m_value))
2220 .yytext){}} 2220 .yytext){}}
2221 2221
2222public class Event_6 : Event { 2222public class Event_6 : Event {
2223 public Event_6(Parser yyq):base(yyq, 2223 public Event_6(Parser yyq):base(yyq,
2224 ((MONEY_EVENT)(yyq.StackAt(0).m_value)) 2224 ((MONEY_EVENT)(yyq.StackAt(0).m_value))
2225 .yytext){}} 2225 .yytext){}}
2226 2226
2227public class Event_7 : Event { 2227public class Event_7 : Event {
2228 public Event_7(Parser yyq):base(yyq, 2228 public Event_7(Parser yyq):base(yyq,
2229 ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value)) 2229 ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value))
2230 .yytext){}} 2230 .yytext){}}
2231 2231
2232public class Event_8 : Event { 2232public class Event_8 : Event {
2233 public Event_8(Parser yyq):base(yyq, 2233 public Event_8(Parser yyq):base(yyq,
2234 ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value)) 2234 ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value))
2235 .yytext){}} 2235 .yytext){}}
2236 2236
2237public class Event_9 : Event { 2237public class Event_9 : Event {
2238 public Event_9(Parser yyq):base(yyq, 2238 public Event_9(Parser yyq):base(yyq,
2239 ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value)) 2239 ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value))
2240 .yytext){}} 2240 .yytext){}}
2241 2241
2242public class VoidArgEvent_1 : VoidArgEvent { 2242public class VoidArgEvent_1 : VoidArgEvent {
2243 public VoidArgEvent_1(Parser yyq):base(yyq, 2243 public VoidArgEvent_1(Parser yyq):base(yyq,
2244 ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value)) 2244 ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value))
2245 .yytext){}} 2245 .yytext){}}
2246 2246
2247public class VoidArgEvent_2 : VoidArgEvent { 2247public class VoidArgEvent_2 : VoidArgEvent {
2248 public VoidArgEvent_2(Parser yyq):base(yyq, 2248 public VoidArgEvent_2(Parser yyq):base(yyq,
2249 ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value)) 2249 ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value))
2250 .yytext){}} 2250 .yytext){}}
2251 2251
2252public class VoidArgEvent_3 : VoidArgEvent { 2252public class VoidArgEvent_3 : VoidArgEvent {
2253 public VoidArgEvent_3(Parser yyq):base(yyq, 2253 public VoidArgEvent_3(Parser yyq):base(yyq,
2254 ((MOVING_END_EVENT)(yyq.StackAt(0).m_value)) 2254 ((MOVING_END_EVENT)(yyq.StackAt(0).m_value))
2255 .yytext){}} 2255 .yytext){}}
2256 2256
2257public class VoidArgEvent_4 : VoidArgEvent { 2257public class VoidArgEvent_4 : VoidArgEvent {
2258 public VoidArgEvent_4(Parser yyq):base(yyq, 2258 public VoidArgEvent_4(Parser yyq):base(yyq,
2259 ((MOVING_START_EVENT)(yyq.StackAt(0).m_value)) 2259 ((MOVING_START_EVENT)(yyq.StackAt(0).m_value))
2260 .yytext){}} 2260 .yytext){}}
2261 2261
2262public class VoidArgEvent_5 : VoidArgEvent { 2262public class VoidArgEvent_5 : VoidArgEvent {
2263 public VoidArgEvent_5(Parser yyq):base(yyq, 2263 public VoidArgEvent_5(Parser yyq):base(yyq,
2264 ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value)) 2264 ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value))
2265 .yytext){}} 2265 .yytext){}}
2266 2266
2267public class VoidArgEvent_6 : VoidArgEvent { 2267public class VoidArgEvent_6 : VoidArgEvent {
2268 public VoidArgEvent_6(Parser yyq):base(yyq, 2268 public VoidArgEvent_6(Parser yyq):base(yyq,
2269 ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2269 ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2270 .yytext){}} 2270 .yytext){}}
2271 2271
2272public class VoidArgEvent_7 : VoidArgEvent { 2272public class VoidArgEvent_7 : VoidArgEvent {
2273 public VoidArgEvent_7(Parser yyq):base(yyq, 2273 public VoidArgEvent_7(Parser yyq):base(yyq,
2274 ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2274 ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2275 .yytext){}} 2275 .yytext){}}
2276 2276
2277public class VoidArgEvent_8 : VoidArgEvent { 2277public class VoidArgEvent_8 : VoidArgEvent {
2278 public VoidArgEvent_8(Parser yyq):base(yyq, 2278 public VoidArgEvent_8(Parser yyq):base(yyq,
2279 ((TIMER_EVENT)(yyq.StackAt(0).m_value)) 2279 ((TIMER_EVENT)(yyq.StackAt(0).m_value))
2280 .yytext){}} 2280 .yytext){}}
2281 2281
2282public class KeyArgEvent_1 : KeyArgEvent { 2282public class KeyArgEvent_1 : KeyArgEvent {
2283 public KeyArgEvent_1(Parser yyq):base(yyq, 2283 public KeyArgEvent_1(Parser yyq):base(yyq,
2284 ((ATTACH_EVENT)(yyq.StackAt(0).m_value)) 2284 ((ATTACH_EVENT)(yyq.StackAt(0).m_value))
2285 .yytext){}} 2285 .yytext){}}
2286 2286
2287public class KeyArgEvent_2 : KeyArgEvent { 2287public class KeyArgEvent_2 : KeyArgEvent {
2288 public KeyArgEvent_2(Parser yyq):base(yyq, 2288 public KeyArgEvent_2(Parser yyq):base(yyq,
2289 ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value)) 2289 ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value))
2290 .yytext){}} 2290 .yytext){}}
2291 2291
2292public class IntArgEvent_1 : IntArgEvent { 2292public class IntArgEvent_1 : IntArgEvent {
2293 public IntArgEvent_1(Parser yyq):base(yyq, 2293 public IntArgEvent_1(Parser yyq):base(yyq,
2294 ((CHANGED_EVENT)(yyq.StackAt(0).m_value)) 2294 ((CHANGED_EVENT)(yyq.StackAt(0).m_value))
2295 .yytext){}} 2295 .yytext){}}
2296 2296
2297public class IntArgEvent_2 : IntArgEvent { 2297public class IntArgEvent_2 : IntArgEvent {
2298 public IntArgEvent_2(Parser yyq):base(yyq, 2298 public IntArgEvent_2(Parser yyq):base(yyq,
2299 ((COLLISION_EVENT)(yyq.StackAt(0).m_value)) 2299 ((COLLISION_EVENT)(yyq.StackAt(0).m_value))
2300 .yytext){}} 2300 .yytext){}}
2301 2301
2302public class IntArgEvent_3 : IntArgEvent { 2302public class IntArgEvent_3 : IntArgEvent {
2303 public IntArgEvent_3(Parser yyq):base(yyq, 2303 public IntArgEvent_3(Parser yyq):base(yyq,
2304 ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) 2304 ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value))
2305 .yytext){}} 2305 .yytext){}}
2306 2306
2307public class IntArgEvent_4 : IntArgEvent { 2307public class IntArgEvent_4 : IntArgEvent {
2308 public IntArgEvent_4(Parser yyq):base(yyq, 2308 public IntArgEvent_4(Parser yyq):base(yyq,
2309 ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) 2309 ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value))
2310 .yytext){}} 2310 .yytext){}}
2311 2311
2312public class IntArgEvent_5 : IntArgEvent { 2312public class IntArgEvent_5 : IntArgEvent {
2313 public IntArgEvent_5(Parser yyq):base(yyq, 2313 public IntArgEvent_5(Parser yyq):base(yyq,
2314 ((ON_REZ_EVENT)(yyq.StackAt(0).m_value)) 2314 ((ON_REZ_EVENT)(yyq.StackAt(0).m_value))
2315 .yytext){}} 2315 .yytext){}}
2316 2316
2317public class IntArgEvent_6 : IntArgEvent { 2317public class IntArgEvent_6 : IntArgEvent {
2318 public IntArgEvent_6(Parser yyq):base(yyq, 2318 public IntArgEvent_6(Parser yyq):base(yyq,
2319 ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value)) 2319 ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value))
2320 .yytext){}} 2320 .yytext){}}
2321 2321
2322public class IntArgEvent_7 : IntArgEvent { 2322public class IntArgEvent_7 : IntArgEvent {
2323 public IntArgEvent_7(Parser yyq):base(yyq, 2323 public IntArgEvent_7(Parser yyq):base(yyq,
2324 ((SENSOR_EVENT)(yyq.StackAt(0).m_value)) 2324 ((SENSOR_EVENT)(yyq.StackAt(0).m_value))
2325 .yytext){}} 2325 .yytext){}}
2326 2326
2327public class IntArgEvent_8 : IntArgEvent { 2327public class IntArgEvent_8 : IntArgEvent {
2328 public IntArgEvent_8(Parser yyq):base(yyq, 2328 public IntArgEvent_8(Parser yyq):base(yyq,
2329 ((TOUCH_EVENT)(yyq.StackAt(0).m_value)) 2329 ((TOUCH_EVENT)(yyq.StackAt(0).m_value))
2330 .yytext){}} 2330 .yytext){}}
2331 2331
2332public class IntArgEvent_9 : IntArgEvent { 2332public class IntArgEvent_9 : IntArgEvent {
2333 public IntArgEvent_9(Parser yyq):base(yyq, 2333 public IntArgEvent_9(Parser yyq):base(yyq,
2334 ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value)) 2334 ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value))
2335 .yytext){}} 2335 .yytext){}}
2336 2336
2337public class IntArgEvent_10 : IntArgEvent { 2337public class IntArgEvent_10 : IntArgEvent {
2338 public IntArgEvent_10(Parser yyq):base(yyq, 2338 public IntArgEvent_10(Parser yyq):base(yyq,
2339 ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value)) 2339 ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value))
2340 .yytext){}} 2340 .yytext){}}
2341 2341
2342public class VectorArgEvent_1 : VectorArgEvent { 2342public class VectorArgEvent_1 : VectorArgEvent {
2343 public VectorArgEvent_1(Parser yyq):base(yyq, 2343 public VectorArgEvent_1(Parser yyq):base(yyq,
2344 ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value)) 2344 ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value))
2345 .yytext){}} 2345 .yytext){}}
2346 2346
2347public class VectorArgEvent_2 : VectorArgEvent { 2347public class VectorArgEvent_2 : VectorArgEvent {
2348 public VectorArgEvent_2(Parser yyq):base(yyq, 2348 public VectorArgEvent_2(Parser yyq):base(yyq,
2349 ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) 2349 ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value))
2350 .yytext){}} 2350 .yytext){}}
2351 2351
2352public class VectorArgEvent_3 : VectorArgEvent { 2352public class VectorArgEvent_3 : VectorArgEvent {
2353 public VectorArgEvent_3(Parser yyq):base(yyq, 2353 public VectorArgEvent_3(Parser yyq):base(yyq,
2354 ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) 2354 ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value))
2355 .yytext){}} 2355 .yytext){}}
2356 2356
2357public class IntRotRotArgEvent_1 : IntRotRotArgEvent { 2357public class IntRotRotArgEvent_1 : IntRotRotArgEvent {
2358 public IntRotRotArgEvent_1(Parser yyq):base(yyq, 2358 public IntRotRotArgEvent_1(Parser yyq):base(yyq,
2359 ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2359 ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2360 .yytext){}} 2360 .yytext){}}
2361 2361
2362public class IntVecVecArgEvent_1 : IntVecVecArgEvent { 2362public class IntVecVecArgEvent_1 : IntVecVecArgEvent {
2363 public IntVecVecArgEvent_1(Parser yyq):base(yyq, 2363 public IntVecVecArgEvent_1(Parser yyq):base(yyq,
2364 ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2364 ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2365 .yytext){}} 2365 .yytext){}}
2366 2366
2367public class KeyIntIntArgEvent_1 : KeyIntIntArgEvent { 2367public class KeyIntIntArgEvent_1 : KeyIntIntArgEvent {
2368 public KeyIntIntArgEvent_1(Parser yyq):base(yyq, 2368 public KeyIntIntArgEvent_1(Parser yyq):base(yyq,
2369 ((CONTROL_EVENT)(yyq.StackAt(0).m_value)) 2369 ((CONTROL_EVENT)(yyq.StackAt(0).m_value))
2370 .yytext){}} 2370 .yytext){}}
2371public class yyLSLSyntax 2371public class yyLSLSyntax
2372: YyParser { 2372: YyParser {
2373 public override object Action(Parser yyq,SYMBOL yysym, int yyact) { 2373 public override object Action(Parser yyq,SYMBOL yysym, int yyact) {
2374 switch(yyact) { 2374 switch(yyact) {
2375 case -1: break; //// keep compiler happy 2375 case -1: break; //// keep compiler happy
2376} return null; } 2376} return null; }
2377 2377
2378public class ArgumentDeclarationList_3 : ArgumentDeclarationList { 2378public class ArgumentDeclarationList_3 : ArgumentDeclarationList {
@@ -2390,7 +2390,7 @@ public class ArgumentDeclarationList_4 : ArgumentDeclarationList {
2390public class ArgumentDeclarationList_5 : ArgumentDeclarationList { 2390public class ArgumentDeclarationList_5 : ArgumentDeclarationList {
2391 public ArgumentDeclarationList_5(Parser yyq):base(yyq){}} 2391 public ArgumentDeclarationList_5(Parser yyq):base(yyq){}}
2392public yyLSLSyntax 2392public yyLSLSyntax
2393():base() { arr = new int[] { 2393():base() { arr = new int[] {
2394101,4,6,52,0, 2394101,4,6,52,0,
239546,0,53,0,102, 239546,0,53,0,102,
239620,103,4,28,76, 239620,103,4,28,76,
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 110fce6..7db6b6d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
48 } 48 }
49 49
50 protected EventAbortException( 50 protected EventAbortException(
51 SerializationInfo info, 51 SerializationInfo info,
52 StreamingContext context) 52 StreamingContext context)
53 { 53 {
54 } 54 }
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
62 } 62 }
63 63
64 protected SelfDeleteException( 64 protected SelfDeleteException(
65 SerializationInfo info, 65 SerializationInfo info,
66 StreamingContext context) 66 StreamingContext context)
67 { 67 {
68 } 68 }
@@ -76,14 +76,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
76 } 76 }
77 77
78 protected ScriptDeleteException( 78 protected ScriptDeleteException(
79 SerializationInfo info, 79 SerializationInfo info,
80 StreamingContext context) 80 StreamingContext context)
81 { 81 {
82 } 82 }
83 } 83 }
84 84
85 /// <summary> 85 /// <summary>
86 /// Used to signal when the script is stopping in co-operation with the script engine 86 /// Used to signal when the script is stopping in co-operation with the script engine
87 /// (instead of through Thread.Abort()). 87 /// (instead of through Thread.Abort()).
88 /// </summary> 88 /// </summary>
89 [Serializable] 89 [Serializable]
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
94 } 94 }
95 95
96 protected ScriptCoopStopException( 96 protected ScriptCoopStopException(
97 SerializationInfo info, 97 SerializationInfo info,
98 StreamingContext context) 98 StreamingContext context)
99 { 99 {
100 } 100 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
index fdbdd8c..411d49c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Instance")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Instance")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 7129c8a..9d72b1c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
88 88
89 // The following is for setting a minimum delay between events 89 // The following is for setting a minimum delay between events
90 private double m_minEventDelay; 90 private double m_minEventDelay;
91 91
92 private long m_eventDelayTicks; 92 private long m_eventDelayTicks;
93 private long m_nextEventTimeTicks; 93 private long m_nextEventTimeTicks;
94 private bool m_startOnInit = true; 94 private bool m_startOnInit = true;
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
122 { 122 {
123 if (value > 0.001) 123 if (value > 0.001)
124 m_minEventDelay = value; 124 m_minEventDelay = value;
125 else 125 else
126 m_minEventDelay = 0.0; 126 m_minEventDelay = 0.0;
127 127
128 m_eventDelayTicks = (long)(m_minEventDelay * 10000000L); 128 m_eventDelayTicks = (long)(m_minEventDelay * 10000000L);
@@ -154,7 +154,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
154 { 154 {
155 bool wasSuspended = m_Suspended; 155 bool wasSuspended = m_Suspended;
156 m_Suspended = value; 156 m_Suspended = value;
157 157
158 if (wasSuspended && !m_Suspended) 158 if (wasSuspended && !m_Suspended)
159 { 159 {
160 lock (EventQueue) 160 lock (EventQueue)
@@ -201,11 +201,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
201 201
202 public long EventsQueued 202 public long EventsQueued
203 { 203 {
204 get 204 get
205 { 205 {
206 lock (EventQueue) 206 lock (EventQueue)
207 return EventQueue.Count; 207 return EventQueue.Count;
208 } 208 }
209 } 209 }
210 210
211 public long EventsProcessed { get; private set; } 211 public long EventsProcessed { get; private set; }
@@ -221,7 +221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
221 private static readonly int MeasurementWindow = 30 * 1000; // show the *recent* time used by the script, to find currently active scripts 221 private static readonly int MeasurementWindow = 30 * 1000; // show the *recent* time used by the script, to find currently active scripts
222 222
223 private bool m_coopTermination; 223 private bool m_coopTermination;
224 224
225 private EventWaitHandle m_coopSleepHandle; 225 private EventWaitHandle m_coopSleepHandle;
226 226
227 public void ClearQueue() 227 public void ClearQueue()
@@ -281,7 +281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
281 /// <param name='stateSource'></param> 281 /// <param name='stateSource'></param>
282 /// <returns>false if load failed, true if suceeded</returns> 282 /// <returns>false if load failed, true if suceeded</returns>
283 public bool Load( 283 public bool Load(
284 IScript script, EventWaitHandle coopSleepHandle, string assemblyPath, 284 IScript script, EventWaitHandle coopSleepHandle, string assemblyPath,
285 string dataPath, StateSource stateSource, bool coopTermination) 285 string dataPath, StateSource stateSource, bool coopTermination)
286 { 286 {
287 m_Script = script; 287 m_Script = script;
@@ -324,13 +324,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
324 return false; 324 return false;
325 } 325 }
326 326
327 // For attachments, XEngine saves the state into a .state file when XEngine.SetXMLState() is called. 327 // For attachments, XEngine saves the state into a .state file when XEngine.SetXMLState() is called.
328 string savedState = Path.Combine(m_dataPath, ItemID.ToString() + ".state"); 328 string savedState = Path.Combine(m_dataPath, ItemID.ToString() + ".state");
329 329
330 if (File.Exists(savedState)) 330 if (File.Exists(savedState))
331 { 331 {
332 // m_log.DebugFormat( 332 // m_log.DebugFormat(
333 // "[SCRIPT INSTANCE]: Found state for script {0} for {1} ({2}) at {3} in {4}", 333 // "[SCRIPT INSTANCE]: Found state for script {0} for {1} ({2}) at {3} in {4}",
334 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name); 334 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name);
335 335
336 string xml = String.Empty; 336 string xml = String.Empty;
@@ -395,7 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
395 // else 395 // else
396 // { 396 // {
397 // m_log.DebugFormat( 397 // m_log.DebugFormat(
398 // "[SCRIPT INSTANCE]: Did not find state for script {0} for {1} ({2}) at {3} in {4}", 398 // "[SCRIPT INSTANCE]: Did not find state for script {0} for {1} ({2}) at {3} in {4}",
399 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name); 399 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name);
400 // } 400 // }
401 401
@@ -407,11 +407,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
407 if (ShuttingDown) 407 if (ShuttingDown)
408 return; 408 return;
409 409
410 if (m_startedFromSavedState) 410 if (m_startedFromSavedState)
411 { 411 {
412 if (m_startOnInit) 412 if (m_startOnInit)
413 Start(); 413 Start();
414 if (m_postOnRez) 414 if (m_postOnRez)
415 { 415 {
416 PostEvent(new EventParams("on_rez", 416 PostEvent(new EventParams("on_rez",
417 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0])); 417 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0]));
@@ -439,13 +439,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
439 new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0])); 439 new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0]));
440 } 440 }
441 } 441 }
442 else 442 else
443 { 443 {
444 if (m_startOnInit) 444 if (m_startOnInit)
445 Start(); 445 Start();
446 PostEvent(new EventParams("state_entry", 446 PostEvent(new EventParams("state_entry",
447 new Object[0], new DetectParams[0])); 447 new Object[0], new DetectParams[0]));
448 if (m_postOnRez) 448 if (m_postOnRez)
449 { 449 {
450 PostEvent(new EventParams("on_rez", 450 PostEvent(new EventParams("on_rez",
451 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0])); 451 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0]));
@@ -462,7 +462,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
462 private void ReleaseControls() 462 private void ReleaseControls()
463 { 463 {
464 SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); 464 SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
465 465
466 if (part != null) 466 if (part != null)
467 { 467 {
468 int permsMask; 468 int permsMask;
@@ -508,8 +508,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
508 { 508 {
509 m_log.Warn( 509 m_log.Warn(
510 string.Format( 510 string.Format(
511 "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ", 511 "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ",
512 savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name), 512 savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name),
513 e); 513 e);
514 } 514 }
515 } 515 }
@@ -631,7 +631,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
631 if (!m_InSelfDelete) 631 if (!m_InSelfDelete)
632 { 632 {
633 m_log.DebugFormat( 633 m_log.DebugFormat(
634 "[SCRIPT INSTANCE]: Aborting unstopped script {0} {1} in prim {2}, localID {3}, timeout was {4} ms", 634 "[SCRIPT INSTANCE]: Aborting unstopped script {0} {1} in prim {2}, localID {3}, timeout was {4} ms",
635 ScriptName, ItemID, PrimName, LocalID, timeout); 635 ScriptName, ItemID, PrimName, LocalID, timeout);
636 636
637 workItem.Abort(); 637 workItem.Abort();
@@ -709,7 +709,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
709 lock (EventQueue) 709 lock (EventQueue)
710 { 710 {
711 // The only events that persist across state changes are timers 711 // The only events that persist across state changes are timers
712 if (m_StateChangeInProgress && data.EventName != "timer") 712 if (m_StateChangeInProgress && data.EventName != "timer")
713 return; 713 return;
714 714
715 if (EventQueue.Count >= m_MaxScriptQueue) 715 if (EventQueue.Count >= m_MaxScriptQueue)
@@ -784,7 +784,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
784 return 0; 784 return 0;
785 785
786 ExecutionTimer.Restart(); 786 ExecutionTimer.Restart();
787 787
788 try 788 try
789 { 789 {
790 return EventProcessorInt(); 790 return EventProcessorInt();
@@ -927,7 +927,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
927 927
928 if(e.InnerException != null && e.InnerException is ScriptException) 928 if(e.InnerException != null && e.InnerException is ScriptException)
929 { 929 {
930 string text = e.InnerException.Message + 930 string text = e.InnerException.Message +
931 "(script: " + ScriptName + 931 "(script: " + ScriptName +
932 " event: " + data.EventName + 932 " event: " + data.EventName +
933 " at " + Part.AbsolutePosition + ")"; 933 " at " + Part.AbsolutePosition + ")";
@@ -945,10 +945,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
945 Part.UUID, 945 Part.UUID,
946 Part.AbsolutePosition, 946 Part.AbsolutePosition,
947 Part.ParentGroup.Scene.Name)); 947 Part.ParentGroup.Scene.Name));
948 948
949 } 949 }
950 else 950 else
951 { 951 {
952 952
953 // DISPLAY ERROR INWORLD 953 // DISPLAY ERROR INWORLD
954 string text = FormatException(e); 954 string text = FormatException(e);
@@ -1217,7 +1217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1217 1217
1218 return null; 1218 return null;
1219 } 1219 }
1220 1220
1221 public override string ToString() 1221 public override string ToString()
1222 { 1222 {
1223 return String.Format("{0} {1} on {2}", ScriptName, ItemID, PrimName); 1223 return String.Format("{0} {1} on {2}", ScriptName, ItemID, PrimName);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
index 5b9794b..8138117 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
79 m_xEngine.DebugLevel = 1; 79 m_xEngine.DebugLevel = 1;
80 80
81 IniConfigSource configSource = new IniConfigSource(); 81 IniConfigSource configSource = new IniConfigSource();
82 82
83 IConfig startupConfig = configSource.AddConfig("Startup"); 83 IConfig startupConfig = configSource.AddConfig("Startup");
84 startupConfig.Set("DefaultScriptEngine", "XEngine"); 84 startupConfig.Set("DefaultScriptEngine", "XEngine");
85 85
@@ -124,9 +124,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
124 TestHelpers.InMethod(); 124 TestHelpers.InMethod();
125// TestHelpers.EnableLogging(); 125// TestHelpers.EnableLogging();
126 126
127 string script = 127 string script =
128@"default 128@"default
129{ 129{
130 state_entry() 130 state_entry()
131 { 131 {
132 llSay(0, ""Thin Lizzy""); 132 llSay(0, ""Thin Lizzy"");
@@ -143,12 +143,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
143 TestHelpers.InMethod(); 143 TestHelpers.InMethod();
144// TestHelpers.EnableLogging(); 144// TestHelpers.EnableLogging();
145 145
146 string script = 146 string script =
147@"default 147@"default
148{ 148{
149 state_entry() 149 state_entry()
150 { 150 {
151 integer i = 0; 151 integer i = 0;
152 for (i = 0; i <= 1; i++) llSay(0, ""Iter "" + (string)i); 152 for (i = 0; i <= 1; i++) llSay(0, ""Iter "" + (string)i);
153 } 153 }
154}"; 154}";
@@ -162,14 +162,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
162 TestHelpers.InMethod(); 162 TestHelpers.InMethod();
163// TestHelpers.EnableLogging(); 163// TestHelpers.EnableLogging();
164 164
165 string script = 165 string script =
166@"default 166@"default
167{ 167{
168 state_entry() 168 state_entry()
169 { 169 {
170 integer i = 0; 170 integer i = 0;
171 llSay(0, ""Thin Lizzy""); 171 llSay(0, ""Thin Lizzy"");
172 172
173 for (i = 0; i < 2147483647; i++) llSay(0, ""Iter "" + (string)i); 173 for (i = 0; i < 2147483647; i++) llSay(0, ""Iter "" + (string)i);
174 } 174 }
175}"; 175}";
@@ -183,15 +183,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
183 TestHelpers.InMethod(); 183 TestHelpers.InMethod();
184// TestHelpers.EnableLogging(); 184// TestHelpers.EnableLogging();
185 185
186 string script = 186 string script =
187@"default 187@"default
188{ 188{
189 state_entry() 189 state_entry()
190 { 190 {
191 integer i = 0; 191 integer i = 0;
192 llSay(0, ""Thin Lizzy""); 192 llSay(0, ""Thin Lizzy"");
193 193
194 for (i = 0; i < 2147483647; i++) 194 for (i = 0; i < 2147483647; i++)
195 { 195 {
196 llSay(0, ""Iter "" + (string)i); 196 llSay(0, ""Iter "" + (string)i);
197 } 197 }
@@ -207,12 +207,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
207 TestHelpers.InMethod(); 207 TestHelpers.InMethod();
208// TestHelpers.EnableLogging(); 208// TestHelpers.EnableLogging();
209 209
210 string script = 210 string script =
211@"default 211@"default
212{ 212{
213 state_entry() 213 state_entry()
214 { 214 {
215 integer i = 0; 215 integer i = 0;
216 while (i < 2) llSay(0, ""Iter "" + (string)i++); 216 while (i < 2) llSay(0, ""Iter "" + (string)i++);
217 } 217 }
218}"; 218}";
@@ -226,15 +226,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
226 TestHelpers.InMethod(); 226 TestHelpers.InMethod();
227// TestHelpers.EnableLogging(); 227// TestHelpers.EnableLogging();
228 228
229 string script = 229 string script =
230@"default 230@"default
231{ 231{
232 state_entry() 232 state_entry()
233 { 233 {
234 integer i = 0; 234 integer i = 0;
235 llSay(0, ""Thin Lizzy""); 235 llSay(0, ""Thin Lizzy"");
236 236
237 while (1 == 1) 237 while (1 == 1)
238 llSay(0, ""Iter "" + (string)i++); 238 llSay(0, ""Iter "" + (string)i++);
239 } 239 }
240}"; 240}";
@@ -248,15 +248,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
248 TestHelpers.InMethod(); 248 TestHelpers.InMethod();
249// TestHelpers.EnableLogging(); 249// TestHelpers.EnableLogging();
250 250
251 string script = 251 string script =
252@"default 252@"default
253{ 253{
254 state_entry() 254 state_entry()
255 { 255 {
256 integer i = 0; 256 integer i = 0;
257 llSay(0, ""Thin Lizzy""); 257 llSay(0, ""Thin Lizzy"");
258 258
259 while (1 == 1) 259 while (1 == 1)
260 { 260 {
261 llSay(0, ""Iter "" + (string)i++); 261 llSay(0, ""Iter "" + (string)i++);
262 } 262 }
@@ -272,9 +272,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
272 TestHelpers.InMethod(); 272 TestHelpers.InMethod();
273// TestHelpers.EnableLogging(); 273// TestHelpers.EnableLogging();
274 274
275 string script = 275 string script =
276@"default 276@"default
277{ 277{
278 state_entry() 278 state_entry()
279 { 279 {
280 integer i = 0; 280 integer i = 0;
@@ -293,9 +293,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
293 TestHelpers.InMethod(); 293 TestHelpers.InMethod();
294// TestHelpers.EnableLogging(); 294// TestHelpers.EnableLogging();
295 295
296 string script = 296 string script =
297@"default 297@"default
298{ 298{
299 state_entry() 299 state_entry()
300 { 300 {
301 integer i = 0; 301 integer i = 0;
@@ -315,15 +315,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
315 TestHelpers.InMethod(); 315 TestHelpers.InMethod();
316// TestHelpers.EnableLogging(); 316// TestHelpers.EnableLogging();
317 317
318 string script = 318 string script =
319@"default 319@"default
320{ 320{
321 state_entry() 321 state_entry()
322 { 322 {
323 integer i = 0; 323 integer i = 0;
324 llSay(0, ""Thin Lizzy""); 324 llSay(0, ""Thin Lizzy"");
325 325
326 do 326 do
327 { 327 {
328 llSay(0, ""Iter "" + (string)i++); 328 llSay(0, ""Iter "" + (string)i++);
329 } while (1 == 1); 329 } while (1 == 1);
@@ -339,15 +339,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
339 TestHelpers.InMethod(); 339 TestHelpers.InMethod();
340 TestHelpers.EnableLogging(); 340 TestHelpers.EnableLogging();
341 341
342 string script = 342 string script =
343@"default 343@"default
344{ 344{
345 state_entry() 345 state_entry()
346 { 346 {
347 integer i = 0; 347 integer i = 0;
348 llSay(0, ""Thin Lizzy""); 348 llSay(0, ""Thin Lizzy"");
349 349
350 @p1; 350 @p1;
351 llSay(0, ""Iter "" + (string)i++); 351 llSay(0, ""Iter "" + (string)i++);
352 jump p1; 352 jump p1;
353 } 353 }
@@ -364,7 +364,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
364 TestHelpers.InMethod(); 364 TestHelpers.InMethod();
365// TestHelpers.EnableLogging(); 365// TestHelpers.EnableLogging();
366 366
367 string script = 367 string script =
368@" 368@"
369integer i = 0; 369integer i = 0;
370 370
@@ -375,7 +375,7 @@ ufn1()
375} 375}
376 376
377default 377default
378{ 378{
379 state_entry() 379 state_entry()
380 { 380 {
381 integer i = 0; 381 integer i = 0;
@@ -396,9 +396,9 @@ default
396 TestHelpers.InMethod(); 396 TestHelpers.InMethod();
397// TestHelpers.EnableLogging(); 397// TestHelpers.EnableLogging();
398 398
399 string script = 399 string script =
400@"default 400@"default
401{ 401{
402 state_entry() 402 state_entry()
403 { 403 {
404 integer i = 0; 404 integer i = 0;
@@ -417,7 +417,7 @@ default
417// UUID objectId = TestHelpers.ParseTail(0x100); 417// UUID objectId = TestHelpers.ParseTail(0x100);
418// UUID itemId = TestHelpers.ParseTail(0x3); 418// UUID itemId = TestHelpers.ParseTail(0x3);
419 419
420 SceneObjectGroup so 420 SceneObjectGroup so
421 = SceneHelpers.CreateSceneObject(1, userId, string.Format("Object for {0}", itemName), 0x100); 421 = SceneHelpers.CreateSceneObject(1, userId, string.Format("Object for {0}", itemName), 0x100);
422 m_scene.AddNewSceneObject(so, true); 422 m_scene.AddNewSceneObject(so, true);
423 423
@@ -505,7 +505,7 @@ default
505 505
506 if (++m_chatMessagesReceived >= m_chatMessagesThreshold) 506 if (++m_chatMessagesReceived >= m_chatMessagesThreshold)
507 { 507 {
508 m_scene.EventManager.OnChatFromWorld -= OnChatFromWorld; 508 m_scene.EventManager.OnChatFromWorld -= OnChatFromWorld;
509 m_chatEvent.Set(); 509 m_chatEvent.Set();
510 } 510 }
511 } 511 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 738a814..f16fd01 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1495 return false; 1495 return false;
1496 } 1496 }
1497 } 1497 }
1498 1498
1499 public static bool operator true(key k) 1499 public static bool operator true(key k)
1500 { 1500 {
1501 return (Boolean)k; 1501 return (Boolean)k;
@@ -1575,7 +1575,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1575 string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value); 1575 string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value);
1576 m_string = s; 1576 m_string = s;
1577 } 1577 }
1578 1578
1579 public LSLString(int i) 1579 public LSLString(int i)
1580 { 1580 {
1581 string s = String.Format("{0}", i); 1581 string s = String.Format("{0}", i);
@@ -1583,7 +1583,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1583 } 1583 }
1584 1584
1585 public LSLString(LSLInteger i) : this(i.value) {} 1585 public LSLString(LSLInteger i) : this(i.value) {}
1586 1586
1587 #endregion 1587 #endregion
1588 1588
1589 #region Operators 1589 #region Operators
@@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1648 { 1648 {
1649 return new LSLString(d); 1649 return new LSLString(d);
1650 } 1650 }
1651 1651
1652 static public explicit operator LSLString(int i) 1652 static public explicit operator LSLString(int i)
1653 { 1653 {
1654 return new LSLString(i); 1654 return new LSLString(i);
@@ -1936,7 +1936,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1936 return false; 1936 return false;
1937 } 1937 }
1938 } 1938 }
1939 1939
1940 return value == ((LSLInteger)o).value; 1940 return value == ((LSLInteger)o).value;
1941 } 1941 }
1942 1942
diff --git a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
index d08b0a6..a5362a4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
index 30dc4cd..4dc8fc6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
112 public void TearDown() 112 public void TearDown()
113 { 113 {
114 MainServer.Instance.Stop(); 114 MainServer.Instance.Stop();
115 } 115 }
116 116
117 [Test] 117 [Test]
118 public void TestLlReleaseUrl() 118 public void TestLlReleaseUrl()
@@ -204,8 +204,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
204 // Check that request to URL works. 204 // Check that request to URL works.
205 string testResponse = "Hello World"; 205 string testResponse = "Hello World";
206 206
207 m_engine.ClearPostedEvents(); 207 m_engine.ClearPostedEvents();
208 m_engine.PostEventHook 208 m_engine.PostEventHook
209 += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); 209 += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse);
210 210
211// Console.WriteLine("Trying {0}", returnedUri); 211// Console.WriteLine("Trying {0}", returnedUri);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
index 9b7cab2..d652b0d1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
@@ -160,7 +160,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
160 // Item has copy permissions so original should stay intact. 160 // Item has copy permissions so original should stay intact.
161 List<TaskInventoryItem> originalItems = so1.RootPart.Inventory.GetInventoryItems(); 161 List<TaskInventoryItem> originalItems = so1.RootPart.Inventory.GetInventoryItems();
162 Assert.That(originalItems.Count, Is.EqualTo(1)); 162 Assert.That(originalItems.Count, Is.EqualTo(1));
163 163
164 // Should now have copied. 164 // Should now have copied.
165 List<TaskInventoryItem> copiedItems = so2.RootPart.Inventory.GetInventoryItems(inventoryItemName); 165 List<TaskInventoryItem> copiedItems = so2.RootPart.Inventory.GetInventoryItems(inventoryItemName);
166 Assert.That(copiedItems.Count, Is.EqualTo(1)); 166 Assert.That(copiedItems.Count, Is.EqualTo(1));
@@ -194,7 +194,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
194 194
195 api.llGiveInventory(user2Id.ToString(), inventoryItemName); 195 api.llGiveInventory(user2Id.ToString(), inventoryItemName);
196 196
197 InventoryItemBase receivedItem 197 InventoryItemBase receivedItem
198 = UserInventoryHelpers.GetInventoryItem( 198 = UserInventoryHelpers.GetInventoryItem(
199 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); 199 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName));
200 200
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
222 222
223 // Create an object embedded inside the first 223 // Create an object embedded inside the first
224 UUID itemId = TestHelpers.ParseTail(0x20); 224 UUID itemId = TestHelpers.ParseTail(0x20);
225 TaskInventoryItem tii 225 TaskInventoryItem tii
226 = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); 226 = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id);
227 tii.NextPermissions &= ~((uint)PermissionMask.Modify); 227 tii.NextPermissions &= ~((uint)PermissionMask.Modify);
228 228
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
230 230
231 api.llGiveInventory(user2Id.ToString(), inventoryItemName); 231 api.llGiveInventory(user2Id.ToString(), inventoryItemName);
232 232
233 InventoryItemBase receivedItem 233 InventoryItemBase receivedItem
234 = UserInventoryHelpers.GetInventoryItem( 234 = UserInventoryHelpers.GetInventoryItem(
235 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); 235 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName));
236 236
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
index 14b1890..435a95f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
127 TaskInventoryItem grp1Item 127 TaskInventoryItem grp1Item
128 = TaskInventoryHelpers.AddNotecard( 128 = TaskInventoryHelpers.AddNotecard(
129 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 129 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
130 130
131 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; 131 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
132 132
133 LSL_Api apiGrp1 = new LSL_Api(); 133 LSL_Api apiGrp1 = new LSL_Api();
@@ -156,7 +156,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
156 TaskInventoryItem grp1Item 156 TaskInventoryItem grp1Item
157 = TaskInventoryHelpers.AddNotecard( 157 = TaskInventoryHelpers.AddNotecard(
158 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 158 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
159 159
160 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; 160 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
161 161
162 LSL_Api apiGrp1 = new LSL_Api(); 162 LSL_Api apiGrp1 = new LSL_Api();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
index 34a29e6..f978138 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
@@ -37,7 +37,7 @@ using OpenSim.Region.ScriptEngine.Shared.Api;
37using OpenSim.Region.ScriptEngine.Shared.Instance; 37using OpenSim.Region.ScriptEngine.Shared.Instance;
38using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 38using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
39using OpenMetaverse; 39using OpenMetaverse;
40 40
41using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 41using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
42using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; 42using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
43using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; 43using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
69 m_lslApi = new LSL_Api(); 69 m_lslApi = new LSL_Api();
70 m_lslApi.Initialize(engine, part, null); 70 m_lslApi.Initialize(engine, part, null);
71 } 71 }
72 72
73 [Test] 73 [Test]
74 public void TestllListFindList() 74 public void TestllListFindList()
75 { 75 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs
index 9ab3115..a341311 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
76 76
77 string[] ncLines = { "One", "Twoè", "Three" }; 77 string[] ncLines = { "One", "Twoè", "Three" };
78 78
79 TaskInventoryItem ncItem 79 TaskInventoryItem ncItem
80 = TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines)); 80 = TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines));
81 81
82 AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]); 82 AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]);
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
111 { 111 {
112 string key = m_lslApi.llGetNotecardLine(ncName, lineNumber); 112 string key = m_lslApi.llGetNotecardLine(ncName, lineNumber);
113 Assert.That(key, Is.Not.EqualTo(UUID.Zero.ToString())); 113 Assert.That(key, Is.Not.EqualTo(UUID.Zero.ToString()));
114 114
115 Assert.That(m_engine.PostedEvents.Count, Is.EqualTo(1)); 115 Assert.That(m_engine.PostedEvents.Count, Is.EqualTo(1));
116 Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); 116 Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID));
117 117
@@ -223,8 +223,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
223// // Check that request to URL works. 223// // Check that request to URL works.
224// string testResponse = "Hello World"; 224// string testResponse = "Hello World";
225// 225//
226// m_engine.ClearPostedEvents(); 226// m_engine.ClearPostedEvents();
227// m_engine.PostEventHook 227// m_engine.PostEventHook
228// += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); 228// += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse);
229// 229//
230//// Console.WriteLine("Trying {0}", returnedUri); 230//// Console.WriteLine("Trying {0}", returnedUri);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs
index d957bf2..b994901 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
93 93
94 // Check simple 1 prim case 94 // Check simple 1 prim case
95 { 95 {
96 LSL_List resList 96 LSL_List resList
97 = apiGrp1.llGetLinkPrimitiveParams(1, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 97 = apiGrp1.llGetLinkPrimitiveParams(1, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
98 98
99 Assert.That(resList.Length, Is.EqualTo(1)); 99 Assert.That(resList.Length, Is.EqualTo(1));
@@ -101,11 +101,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
101 101
102 // Check 2 prim case 102 // Check 2 prim case
103 { 103 {
104 LSL_List resList 104 LSL_List resList
105 = apiGrp1.llGetLinkPrimitiveParams( 105 = apiGrp1.llGetLinkPrimitiveParams(
106 1, 106 1,
107 new LSL_List( 107 new LSL_List(
108 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), 108 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION),
109 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), 109 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET),
110 new LSL_Integer(2), 110 new LSL_Integer(2),
111 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 111 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
@@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
115 115
116 // Check invalid parameters are ignored 116 // Check invalid parameters are ignored
117 { 117 {
118 LSL_List resList 118 LSL_List resList
119 = apiGrp1.llGetLinkPrimitiveParams(3, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 119 = apiGrp1.llGetLinkPrimitiveParams(3, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
120 120
121 Assert.That(resList.Length, Is.EqualTo(0)); 121 Assert.That(resList.Length, Is.EqualTo(0));
@@ -123,11 +123,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
123 123
124 // Check all parameters are ignored if an initial bad link is given 124 // Check all parameters are ignored if an initial bad link is given
125 { 125 {
126 LSL_List resList 126 LSL_List resList
127 = apiGrp1.llGetLinkPrimitiveParams( 127 = apiGrp1.llGetLinkPrimitiveParams(
128 3, 128 3,
129 new LSL_List( 129 new LSL_List(
130 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), 130 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION),
131 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), 131 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET),
132 new LSL_Integer(1), 132 new LSL_Integer(1),
133 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 133 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
@@ -137,11 +137,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
137 137
138 // Check only subsequent parameters are ignored when we hit the first bad link number 138 // Check only subsequent parameters are ignored when we hit the first bad link number
139 { 139 {
140 LSL_List resList 140 LSL_List resList
141 = apiGrp1.llGetLinkPrimitiveParams( 141 = apiGrp1.llGetLinkPrimitiveParams(
142 1, 142 1,
143 new LSL_List( 143 new LSL_List(
144 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), 144 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION),
145 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), 145 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET),
146 new LSL_Integer(3), 146 new LSL_Integer(3),
147 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 147 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
@@ -197,7 +197,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
197 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut 197 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut
198 0.90f, // Prim hollow 198 0.90f, // Prim hollow
199 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist 199 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist
200 new LSL_Types.Vector3(2.0d, 1.0d, 0.0d), // Prim taper 200 new LSL_Types.Vector3(2.0d, 1.0d, 0.0d), // Prim taper
201 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear 201 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear
202 0.90f); // Prim hollow check 202 0.90f); // Prim hollow check
203 203
@@ -211,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
211 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut 211 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut
212 0.99f, // Prim hollow 212 0.99f, // Prim hollow
213 new LSL_Types.Vector3(1.0d, 0.0d, 0.0d), // Prim twist 213 new LSL_Types.Vector3(1.0d, 0.0d, 0.0d), // Prim twist
214 new LSL_Types.Vector3(1.0d, 1.0d, 0.0d), // Prim taper 214 new LSL_Types.Vector3(1.0d, 1.0d, 0.0d), // Prim taper
215 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear 215 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear
216 0.99f); // Prim hollow check 216 0.99f); // Prim hollow check
217 217
@@ -252,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
252 new LSL_Types.Vector3(0.7d + 0.2d, 0.0d, 0.0d), // Prim twist 252 new LSL_Types.Vector3(0.7d + 0.2d, 0.0d, 0.0d), // Prim twist
253 // Expression for y selected to test precision problems during sbyte 253 // Expression for y selected to test precision problems during sbyte
254 // cast in SetPrimitiveShapeParams. 254 // cast in SetPrimitiveShapeParams.
255 new LSL_Types.Vector3(2.0d, (1.3d + 0.1d), 0.0d), // Prim taper 255 new LSL_Types.Vector3(2.0d, (1.3d + 0.1d), 0.0d), // Prim taper
256 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear 256 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear
257 0.70f); // Prim hollow check 257 0.70f); // Prim hollow check
258 258
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
index d929da8..98800d0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
@@ -88,19 +88,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
88 CheckllAngleBetween(new Vector3(1, 1, 1), 0, 1, 1); 88 CheckllAngleBetween(new Vector3(1, 1, 1), 0, 1, 1);
89 CheckllAngleBetween(new Vector3(1, 1, 1), 90, 1, 1); 89 CheckllAngleBetween(new Vector3(1, 1, 1), 90, 1, 1);
90 CheckllAngleBetween(new Vector3(1, 1, 1), 180, 1, 1); 90 CheckllAngleBetween(new Vector3(1, 1, 1), 180, 1, 1);
91 91
92 CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1.6f, 1.8f); 92 CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1.6f, 1.8f);
93 CheckllAngleBetween(new Vector3(1, 0, 0), 90, 0.3f, 3.9f); 93 CheckllAngleBetween(new Vector3(1, 0, 0), 90, 0.3f, 3.9f);
94 CheckllAngleBetween(new Vector3(1, 0, 0), 180, 8.8f, 7.4f); 94 CheckllAngleBetween(new Vector3(1, 0, 0), 180, 8.8f, 7.4f);
95 95
96 CheckllAngleBetween(new Vector3(0, 1, 0), 0, 9.8f, -9.4f); 96 CheckllAngleBetween(new Vector3(0, 1, 0), 0, 9.8f, -9.4f);
97 CheckllAngleBetween(new Vector3(0, 1, 0), 90, 8.4f, -8.2f); 97 CheckllAngleBetween(new Vector3(0, 1, 0), 90, 8.4f, -8.2f);
98 CheckllAngleBetween(new Vector3(0, 1, 0), 180, 0.4f, -5.8f); 98 CheckllAngleBetween(new Vector3(0, 1, 0), 180, 0.4f, -5.8f);
99 99
100 CheckllAngleBetween(new Vector3(0, 0, 1), 0, -6.8f, 3.4f); 100 CheckllAngleBetween(new Vector3(0, 0, 1), 0, -6.8f, 3.4f);
101 CheckllAngleBetween(new Vector3(0, 0, 1), 90, -3.6f, 5.6f); 101 CheckllAngleBetween(new Vector3(0, 0, 1), 90, -3.6f, 5.6f);
102 CheckllAngleBetween(new Vector3(0, 0, 1), 180, -3.8f, 1.1f); 102 CheckllAngleBetween(new Vector3(0, 0, 1), 180, -3.8f, 1.1f);
103 103
104 CheckllAngleBetween(new Vector3(1, 1, 1), 0, -7.7f, -2.0f); 104 CheckllAngleBetween(new Vector3(1, 1, 1), 0, -7.7f, -2.0f);
105 CheckllAngleBetween(new Vector3(1, 1, 1), 90, -3.0f, -9.1f); 105 CheckllAngleBetween(new Vector3(1, 1, 1), 90, -3.0f, -9.1f);
106 CheckllAngleBetween(new Vector3(1, 1, 1), 180, -7.9f, -8.0f); 106 CheckllAngleBetween(new Vector3(1, 1, 1), 180, -7.9f, -8.0f);
@@ -246,7 +246,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
246 LSL_Types.Quaternion newRot = m_lslApi.llEuler2Rot(eulerCalc); 246 LSL_Types.Quaternion newRot = m_lslApi.llEuler2Rot(eulerCalc);
247 // Multiple original quaternion by conjugate of quaternion calculated with angles. 247 // Multiple original quaternion by conjugate of quaternion calculated with angles.
248 LSL_Types.Quaternion check = rot * new LSL_Types.Quaternion(-newRot.x, -newRot.y, -newRot.z, newRot.s); 248 LSL_Types.Quaternion check = rot * new LSL_Types.Quaternion(-newRot.x, -newRot.y, -newRot.z, newRot.s);
249 249
250 Assert.AreEqual(0.0, check.x, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler X bounds check fail"); 250 Assert.AreEqual(0.0, check.x, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler X bounds check fail");
251 Assert.AreEqual(0.0, check.y, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Y bounds check fail"); 251 Assert.AreEqual(0.0, check.y, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Y bounds check fail");
252 Assert.AreEqual(0.0, check.z, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Z bounds check fail"); 252 Assert.AreEqual(0.0, check.z, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Z bounds check fail");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
index c8c7f82..b2396fa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
155 m_stringDoubleSet.Add("1ef", 1.0); 155 m_stringDoubleSet.Add("1ef", 1.0);
156 m_stringDoubleSet.Add("e10", 0.0); 156 m_stringDoubleSet.Add("e10", 0.0);
157 m_stringDoubleSet.Add("1.e0.0", 1.0); 157 m_stringDoubleSet.Add("1.e0.0", 1.0);
158 158
159 m_doubleStringSet = new Dictionary<double, string>(); 159 m_doubleStringSet = new Dictionary<double, string>();
160 m_doubleStringSet.Add(2.0, "2.000000"); 160 m_doubleStringSet.Add(2.0, "2.000000");
161 m_doubleStringSet.Add(-2.0, "-2.000000"); 161 m_doubleStringSet.Add(-2.0, "-2.000000");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
index c664108..2bd684f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
131 public void TestImplicitCastBooleanToLSLInteger() 131 public void TestImplicitCastBooleanToLSLInteger()
132 { 132 {
133 TestHelpers.InMethod(); 133 TestHelpers.InMethod();
134 134
135 LSL_Types.LSLInteger testInteger; 135 LSL_Types.LSLInteger testInteger;
136 136
137 testInteger = (1 == 0); 137 testInteger = (1 == 0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
index 8550f2d..0159b9e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
125 public void TestImplicitCastBooleanToLSLFloat() 125 public void TestImplicitCastBooleanToLSLFloat()
126 { 126 {
127 TestHelpers.InMethod(); 127 TestHelpers.InMethod();
128 128
129 LSL_Types.LSLString testString; 129 LSL_Types.LSLString testString;
130 130
131 testString = (LSL_Types.LSLString) (1 == 0); 131 testString = (LSL_Types.LSLString) (1 == 0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
index 99bff83..6936191 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
@@ -296,7 +296,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
296 string npcRaw 296 string npcRaw
297 = osslApi.osNpcCreate( 297 = osslApi.osNpcCreate(
298 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_CREATOR_OWNED); 298 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_CREATOR_OWNED);
299 299
300 otherOsslApi.osNpcRemove(npcRaw); 300 otherOsslApi.osNpcRemove(npcRaw);
301 301
302 // Should still be around 302 // Should still be around
@@ -340,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
340 string npcRaw 340 string npcRaw
341 = osslApi.osNpcCreate( 341 = osslApi.osNpcCreate(
342 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_NOT_OWNED); 342 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_NOT_OWNED);
343 343
344 osslApi.osNpcRemove(npcRaw); 344 osslApi.osNpcRemove(npcRaw);
345 345
346 UUID npcId = new UUID(npcRaw); 346 UUID npcId = new UUID(npcRaw);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs b/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs
index f4211c8..80d9e2a 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.ScriptBase
44 /// <summary> 44 /// <summary>
45 /// Used for script sleeps when we are using co-operative script termination. 45 /// Used for script sleeps when we are using co-operative script termination.
46 /// </summary> 46 /// </summary>
47 /// <remarks>null if co-operative script termination is not active</remarks> 47 /// <remarks>null if co-operative script termination is not active</remarks>
48 WaitHandle m_coopSleepHandle; 48 WaitHandle m_coopSleepHandle;
49 49
50 public XEngineScriptBase(WaitHandle coopSleepHandle) : base() 50 public XEngineScriptBase(WaitHandle coopSleepHandle) : base()
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index 301eada..55a77bc 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// When an object gets paid by an avatar and generates the paid event, 82 /// When an object gets paid by an avatar and generates the paid event,
83 /// this will pipe it to the script engine 83 /// this will pipe it to the script engine
84 /// </summary> 84 /// </summary>
85 /// <param name="objectID">Object ID that got paid</param> 85 /// <param name="objectID">Object ID that got paid</param>
@@ -413,7 +413,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
413 return; 413 return;
414 414
415 foreach(SceneObjectPart part in grp.Parts) 415 foreach(SceneObjectPart part in grp.Parts)
416 { 416 {
417 myScriptEngine.PostObjectEvent(part.LocalId, new EventParams( 417 myScriptEngine.PostObjectEvent(part.LocalId, new EventParams(
418 "attach",new object[] { 418 "attach",new object[] {
419 new LSL_Types.LSLString(avatar.ToString()) }, 419 new LSL_Types.LSLString(avatar.ToString()) },
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
index a2b030d..b3fedcb 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.XEngine")] 9[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.XEngine")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs
index 878e571..71ef0ac 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
58 m_xEngine = new XEngine(); 58 m_xEngine = new XEngine();
59 59
60 IniConfigSource configSource = new IniConfigSource(); 60 IniConfigSource configSource = new IniConfigSource();
61 61
62 IConfig startupConfig = configSource.AddConfig("Startup"); 62 IConfig startupConfig = configSource.AddConfig("Startup");
63 startupConfig.Set("DefaultScriptEngine", "XEngine"); 63 startupConfig.Set("DefaultScriptEngine", "XEngine");
64 64
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
index c977285..477059f 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
@@ -126,11 +126,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
126 OSChatMessage messageReceived = null; 126 OSChatMessage messageReceived = null;
127 sceneA.EventManager.OnChatFromWorld += (s, m) => { messageReceived = m; chatEvent.Set(); }; 127 sceneA.EventManager.OnChatFromWorld += (s, m) => { messageReceived = m; chatEvent.Set(); };
128 128
129 sceneA.RezNewScript(userId, scriptItemSceneA, 129 sceneA.RezNewScript(userId, scriptItemSceneA,
130@"integer c = 0; 130@"integer c = 0;
131 131
132default 132default
133{ 133{
134 state_entry() 134 state_entry()
135 { 135 {
136 llSay(0, ""Script running""); 136 llSay(0, ""Script running"");
@@ -143,7 +143,7 @@ default
143 143
144 touch_start(integer n) 144 touch_start(integer n)
145 { 145 {
146 c = c + 1; 146 c = c + 1;
147 llSay(0, (string)c); 147 llSay(0, (string)c);
148 } 148 }
149}"); 149}");
@@ -151,7 +151,7 @@ default
151 chatEvent.WaitOne(60000); 151 chatEvent.WaitOne(60000);
152 152
153 Assert.That(messageReceived, Is.Not.Null, "No chat message received."); 153 Assert.That(messageReceived, Is.Not.Null, "No chat message received.");
154 Assert.That(messageReceived.Message, Is.EqualTo("Script running")); 154 Assert.That(messageReceived.Message, Is.EqualTo("Script running"));
155 155
156 { 156 {
157 // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead. 157 // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead.
@@ -167,7 +167,7 @@ default
167 xEngineA.PostObjectEvent(soSceneA.LocalId, ep); 167 xEngineA.PostObjectEvent(soSceneA.LocalId, ep);
168 chatEvent.WaitOne(60000); 168 chatEvent.WaitOne(60000);
169 169
170 Assert.That(messageReceived.Message, Is.EqualTo("1")); 170 Assert.That(messageReceived.Message, Is.EqualTo("1"));
171 } 171 }
172 172
173 AutoResetEvent chatEventB = new AutoResetEvent(false); 173 AutoResetEvent chatEventB = new AutoResetEvent(false);
@@ -181,7 +181,7 @@ default
181 chatEventB.WaitOne(60000); 181 chatEventB.WaitOne(60000);
182 Assert.That(messageReceived, Is.Not.Null, "No Changed message received."); 182 Assert.That(messageReceived, Is.Not.Null, "No Changed message received.");
183 Assert.That(messageReceived.Message, Is.Not.Null, "Changed message without content"); 183 Assert.That(messageReceived.Message, Is.Not.Null, "Changed message without content");
184 Assert.That(messageReceived.Message, Is.EqualTo("Changed")); 184 Assert.That(messageReceived.Message, Is.EqualTo("Changed"));
185 185
186 // TEST sending event to moved prim and output 186 // TEST sending event to moved prim and output
187 { 187 {
@@ -202,7 +202,7 @@ default
202 xEngineB.PostObjectEvent(soSceneB.LocalId, ep); 202 xEngineB.PostObjectEvent(soSceneB.LocalId, ep);
203 chatEventB.WaitOne(60000); 203 chatEventB.WaitOne(60000);
204 204
205 Assert.That(messageReceived.Message, Is.EqualTo("2")); 205 Assert.That(messageReceived.Message, Is.EqualTo("2"));
206 } 206 }
207 } 207 }
208 } 208 }
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 7822df9..cd5308d 100755
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -131,9 +131,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
131 /// It appears that if a script thread is aborted whilst it is holding ReaderWriterLockSlim (possibly the write 131 /// It appears that if a script thread is aborted whilst it is holding ReaderWriterLockSlim (possibly the write
132 /// lock) then the lock is not properly released. This causes mono 2.6, 2.10 and possibly 132 /// lock) then the lock is not properly released. This causes mono 2.6, 2.10 and possibly
133 /// later to crash, sometimes with symptoms such as a leap to 100% script usage and a vm thead dump showing 133 /// later to crash, sometimes with symptoms such as a leap to 100% script usage and a vm thead dump showing
134 /// all threads waiting on release of ReaderWriterLockSlim write thread which none of the threads listed 134 /// all threads waiting on release of ReaderWriterLockSlim write thread which none of the threads listed
135 /// actually hold. 135 /// actually hold.
136 /// 136 ///
137 /// Pausing for event completion reduces the risk of this happening. However, it may be that aborting threads 137 /// Pausing for event completion reduces the risk of this happening. However, it may be that aborting threads
138 /// is not a mono issue per se but rather a risky activity in itself in an AppDomain that is not immediately 138 /// is not a mono issue per se but rather a risky activity in itself in an AppDomain that is not immediately
139 /// shutting down. 139 /// shutting down.
@@ -307,7 +307,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
307 m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); 307 m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30);
308 m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); 308 m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false);
309 m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; 309 m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000;
310 m_WaitForEventCompletionOnScriptStop 310 m_WaitForEventCompletionOnScriptStop
311 = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop); 311 = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop);
312 312
313 m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines"); 313 m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines");
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
507 { 507 {
508 string rawItemId; 508 string rawItemId;
509 UUID itemId = UUID.Zero; 509 UUID itemId = UUID.Zero;
510 510
511 if (cmdparams.Length == 2) 511 if (cmdparams.Length == 2)
512 { 512 {
513 IEnumerable<IScriptInstance> scripts = m_Scripts.Values; 513 IEnumerable<IScriptInstance> scripts = m_Scripts.Values;
@@ -520,17 +520,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine
520 520
521 return; 521 return;
522 } 522 }
523 523
524 for (int i = 2; i < cmdparams.Length; i++) 524 for (int i = 2; i < cmdparams.Length; i++)
525 { 525 {
526 rawItemId = cmdparams[i]; 526 rawItemId = cmdparams[i];
527 527
528 if (!UUID.TryParse(rawItemId, out itemId)) 528 if (!UUID.TryParse(rawItemId, out itemId))
529 { 529 {
530 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid UUID", rawItemId); 530 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid UUID", rawItemId);
531 continue; 531 continue;
532 } 532 }
533 533
534 if (itemId != UUID.Zero) 534 if (itemId != UUID.Zero)
535 { 535 {
536 IScriptInstance instance = GetInstance(itemId); 536 IScriptInstance instance = GetInstance(itemId);
@@ -816,7 +816,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
816 { 816 {
817 if (!m_Enabled) 817 if (!m_Enabled)
818 return; 818 return;
819 819
820 lock (m_ScriptEngines) 820 lock (m_ScriptEngines)
821 { 821 {
822 if (m_ScriptEngines.Contains(this)) 822 if (m_ScriptEngines.Contains(this))
@@ -978,14 +978,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
978 SceneObjectPart part = 978 SceneObjectPart part =
979 m_Scene.GetSceneObjectPart( 979 m_Scene.GetSceneObjectPart(
980 localID); 980 localID);
981 981
982 TaskInventoryItem item = 982 TaskInventoryItem item =
983 part.Inventory.GetInventoryItem(itemID); 983 part.Inventory.GetInventoryItem(itemID);
984 984
985 ScenePresence presence = 985 ScenePresence presence =
986 m_Scene.GetScenePresence( 986 m_Scene.GetScenePresence(
987 item.OwnerID); 987 item.OwnerID);
988 988
989 if (presence != null) 989 if (presence != null)
990 { 990 {
991 presence.ControllingClient.SendAgentAlertMessage( 991 presence.ControllingClient.SendAgentAlertMessage(
@@ -1073,8 +1073,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1073 { 1073 {
1074 m_log.Error( 1074 m_log.Error(
1075 string.Format( 1075 string.Format(
1076 "[XEngine]: Failure in DoOnRezScriptQueue() for item {0} in {1}. Continuing. Exception ", 1076 "[XEngine]: Failure in DoOnRezScriptQueue() for item {0} in {1}. Continuing. Exception ",
1077 o[1], m_Scene.Name), 1077 o[1], m_Scene.Name),
1078 e); 1078 e);
1079 } 1079 }
1080 } 1080 }
@@ -1091,7 +1091,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1091 } 1091 }
1092 finally 1092 finally
1093 { 1093 {
1094 // FIXME: On failure we must trigger this even if the compile queue is not actually empty so that the 1094 // FIXME: On failure we must trigger this even if the compile queue is not actually empty so that the
1095 // RegionReadyModule is not forever waiting. This event really needs a different name. 1095 // RegionReadyModule is not forever waiting. This event really needs a different name.
1096 m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, 1096 m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount,
1097 m_ScriptErrorMessage); 1097 m_ScriptErrorMessage);
@@ -1108,8 +1108,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1108 { 1108 {
1109 m_CurrentCompile = null; 1109 m_CurrentCompile = null;
1110 1110
1111 // This is to avoid a situation where the m_CompileQueue while loop above could complete but 1111 // This is to avoid a situation where the m_CompileQueue while loop above could complete but
1112 // OnRezScript() place a new script on the queue and check m_CurrentCompile = null before we hit 1112 // OnRezScript() place a new script on the queue and check m_CurrentCompile = null before we hit
1113 // this section. 1113 // this section.
1114 if (m_CompileQueue.Count > 0) 1114 if (m_CompileQueue.Count > 0)
1115 m_CurrentCompile = m_ThreadPool.QueueWorkItem(DoOnRezScriptQueue, null); 1115 m_CurrentCompile = m_ThreadPool.QueueWorkItem(DoOnRezScriptQueue, null);
@@ -1186,7 +1186,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1186 m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assemblyPath, out linemap); 1186 m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assemblyPath, out linemap);
1187 1187
1188// m_log.DebugFormat( 1188// m_log.DebugFormat(
1189// "[XENGINE]: Found assembly path {0} onrez {1} in {2}", 1189// "[XENGINE]: Found assembly path {0} onrez {1} in {2}",
1190// assemblyPath, item.ItemID, World.Name); 1190// assemblyPath, item.ItemID, World.Name);
1191 1191
1192 if (!m_AddingAssemblies.ContainsKey(assemblyPath)) { 1192 if (!m_AddingAssemblies.ContainsKey(assemblyPath)) {
@@ -1239,7 +1239,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1239 catch (Exception e) 1239 catch (Exception e)
1240 { 1240 {
1241// m_log.ErrorFormat( 1241// m_log.ErrorFormat(
1242// "[XEngine]: Exception when rezzing script with item ID {0}, {1}{2}", 1242// "[XEngine]: Exception when rezzing script with item ID {0}, {1}{2}",
1243// itemID, e.Message, e.StackTrace); 1243// itemID, e.Message, e.StackTrace);
1244 1244
1245 // try 1245 // try
@@ -1280,7 +1280,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1280 } 1280 }
1281 1281
1282 // optionaly do not load a assembly on top of a lot of to release memory 1282 // optionaly do not load a assembly on top of a lot of to release memory
1283 // only if logins disable since causes a lot of rubber banding 1283 // only if logins disable since causes a lot of rubber banding
1284 if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled) 1284 if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled)
1285 GC.Collect(2); 1285 GC.Collect(2);
1286 1286
@@ -1323,7 +1323,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1323 { 1323 {
1324 sandbox = AppDomain.CurrentDomain; 1324 sandbox = AppDomain.CurrentDomain;
1325 } 1325 }
1326 1326
1327 //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); 1327 //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
1328 //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); 1328 //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
1329 //PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); 1329 //PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
@@ -1331,7 +1331,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1331 //CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement); 1331 //CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
1332 //sandboxPolicy.RootCodeGroup = sandboxCodeGroup; 1332 //sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
1333 //sandbox.SetAppDomainPolicy(sandboxPolicy); 1333 //sandbox.SetAppDomainPolicy(sandboxPolicy);
1334 1334
1335 m_AppDomains[appDomain] = sandbox; 1335 m_AppDomains[appDomain] = sandbox;
1336 1336
1337 m_DomainScripts[appDomain] = new List<UUID>(); 1337 m_DomainScripts[appDomain] = new List<UUID>();
@@ -1341,7 +1341,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1341 m_log.ErrorFormat("[XEngine] Exception creating app domain:\n {0}", e.ToString()); 1341 m_log.ErrorFormat("[XEngine] Exception creating app domain:\n {0}", e.ToString());
1342 m_ScriptErrorMessage += "Exception creating app domain:\n"; 1342 m_ScriptErrorMessage += "Exception creating app domain:\n";
1343 m_ScriptFailCount++; 1343 m_ScriptFailCount++;
1344 lock (m_AddingAssemblies) 1344 lock (m_AddingAssemblies)
1345 { 1345 {
1346 m_AddingAssemblies[assemblyPath]--; 1346 m_AddingAssemblies[assemblyPath]--;
1347 } 1347 }
@@ -1364,14 +1364,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1364 { 1364 {
1365 coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset); 1365 coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset);
1366 1366
1367 scriptObj 1367 scriptObj
1368 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1368 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1369 assemblyName.FullName, 1369 assemblyName.FullName,
1370 "SecondLife.XEngineScript", 1370 "SecondLife.XEngineScript",
1371 false, 1371 false,
1372 BindingFlags.Default, 1372 BindingFlags.Default,
1373 null, 1373 null,
1374 new object[] { coopSleepHandle }, 1374 new object[] { coopSleepHandle },
1375 null, 1375 null,
1376 null); 1376 null);
1377 1377
@@ -1383,7 +1383,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1383 1383
1384 try 1384 try
1385 { 1385 {
1386 scriptObj 1386 scriptObj
1387 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1387 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1388 assemblyName.FullName, 1388 assemblyName.FullName,
1389 "SecondLife.Script", 1389 "SecondLife.Script",
@@ -1398,7 +1398,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1398 { 1398 {
1399 m_log.Error( 1399 m_log.Error(
1400 string.Format( 1400 string.Format(
1401 "[XENGINE]: Could not load previous SecondLife.Script from assembly {0} in {1}. Not starting. Exception ", 1401 "[XENGINE]: Could not load previous SecondLife.Script from assembly {0} in {1}. Not starting. Exception ",
1402 assemblyName.FullName, World.Name), 1402 assemblyName.FullName, World.Name),
1403 e2); 1403 e2);
1404 1404
@@ -1412,7 +1412,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1412 { 1412 {
1413 try 1413 try
1414 { 1414 {
1415 scriptObj 1415 scriptObj
1416 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1416 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1417 assemblyName.FullName, 1417 assemblyName.FullName,
1418 "SecondLife.Script", 1418 "SecondLife.Script",
@@ -1432,7 +1432,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1432 1432
1433 try 1433 try
1434 { 1434 {
1435 scriptObj 1435 scriptObj
1436 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1436 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1437 assemblyName.FullName, 1437 assemblyName.FullName,
1438 "SecondLife.XEngineScript", 1438 "SecondLife.XEngineScript",
@@ -1447,7 +1447,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1447 { 1447 {
1448 m_log.Error( 1448 m_log.Error(
1449 string.Format( 1449 string.Format(
1450 "[XENGINE]: Could not load previous SecondLife.XEngineScript from assembly {0} in {1}. Not starting. Exception ", 1450 "[XENGINE]: Could not load previous SecondLife.XEngineScript from assembly {0} in {1}. Not starting. Exception ",
1451 assemblyName.FullName, World.Name), 1451 assemblyName.FullName, World.Name),
1452 e2); 1452 e2);
1453 1453
@@ -1509,7 +1509,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1509 } 1509 }
1510 1510
1511 1511
1512 lock (m_AddingAssemblies) 1512 lock (m_AddingAssemblies)
1513 { 1513 {
1514 if (!m_Assemblies.ContainsKey(assetID)) 1514 if (!m_Assemblies.ContainsKey(assetID))
1515 m_Assemblies[assetID] = assemblyPath; 1515 m_Assemblies[assetID] = assemblyPath;
@@ -1517,7 +1517,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1517 m_AddingAssemblies[assemblyPath]--; 1517 m_AddingAssemblies[assemblyPath]--;
1518 } 1518 }
1519 1519
1520 if (instance != null) 1520 if (instance != null)
1521 instance.Init(); 1521 instance.Init();
1522 1522
1523 bool runIt; 1523 bool runIt;
@@ -1570,7 +1570,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1570 } 1570 }
1571 1571
1572 if (instance.StatePersistedHere) 1572 if (instance.StatePersistedHere)
1573 instance.RemoveState(); 1573 instance.RemoveState();
1574 1574
1575 instance.DestroyScriptInstance(); 1575 instance.DestroyScriptInstance();
1576 1576
@@ -1622,20 +1622,20 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1622 // Do not remove assembly files if another instance of the script 1622 // Do not remove assembly files if another instance of the script
1623 // is currently initialising 1623 // is currently initialising
1624 if (!m_AddingAssemblies.ContainsKey(m_Assemblies[assetID]) 1624 if (!m_AddingAssemblies.ContainsKey(m_Assemblies[assetID])
1625 || m_AddingAssemblies[m_Assemblies[assetID]] == 0) 1625 || m_AddingAssemblies[m_Assemblies[assetID]] == 0)
1626 { 1626 {
1627// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]); 1627// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]);
1628 try 1628 try
1629 { 1629 {
1630 if (File.Exists(m_Assemblies[assetID])) 1630 if (File.Exists(m_Assemblies[assetID]))
1631 File.Delete(m_Assemblies[assetID]); 1631 File.Delete(m_Assemblies[assetID]);
1632 1632
1633 if (File.Exists(m_Assemblies[assetID]+".text")) 1633 if (File.Exists(m_Assemblies[assetID]+".text"))
1634 File.Delete(m_Assemblies[assetID]+".text"); 1634 File.Delete(m_Assemblies[assetID]+".text");
1635 1635
1636 if (File.Exists(m_Assemblies[assetID]+".mdb")) 1636 if (File.Exists(m_Assemblies[assetID]+".mdb"))
1637 File.Delete(m_Assemblies[assetID]+".mdb"); 1637 File.Delete(m_Assemblies[assetID]+".mdb");
1638 1638
1639 if (File.Exists(m_Assemblies[assetID]+".map")) 1639 if (File.Exists(m_Assemblies[assetID]+".map"))
1640 File.Delete(m_Assemblies[assetID]+".map"); 1640 File.Delete(m_Assemblies[assetID]+".map");
1641 } 1641 }
@@ -1692,7 +1692,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1692 new WorkItemCallback(this.ProcessEventHandler), 1692 new WorkItemCallback(this.ProcessEventHandler),
1693 parms)); 1693 parms));
1694 } 1694 }
1695 1695
1696 /// <summary> 1696 /// <summary>
1697 /// Process a previously posted script event. 1697 /// Process a previously posted script event.
1698 /// </summary> 1698 /// </summary>
@@ -1703,7 +1703,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1703 Culture.SetCurrentCulture(); 1703 Culture.SetCurrentCulture();
1704 1704
1705 IScriptInstance instance = (ScriptInstance) parms; 1705 IScriptInstance instance = (ScriptInstance) parms;
1706 1706
1707// m_log.DebugFormat("[XEngine]: Processing event for {0}", instance); 1707// m_log.DebugFormat("[XEngine]: Processing event for {0}", instance);
1708 1708
1709 return instance.EventProcessor(); 1709 return instance.EventProcessor();
@@ -1736,7 +1736,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1736 instance = m_Scripts[itemID]; 1736 instance = m_Scripts[itemID];
1737 } 1737 }
1738 catch { /* ignore race conditions */ } 1738 catch { /* ignore race conditions */ }
1739 1739
1740 if (instance != null) 1740 if (instance != null)
1741 { 1741 {
1742 instance.PostEvent(p); 1742 instance.PostEvent(p);
@@ -1744,7 +1744,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1744 } 1744 }
1745 } 1745 }
1746 } 1746 }
1747 1747
1748 return result; 1748 return result;
1749 } 1749 }
1750 1750
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs
index 9d9dee1..ede8ef3 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
60 public bool Wait(int t) 60 public bool Wait(int t)
61 { 61 {
62 // We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the 62 // We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the
63 // TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an 63 // TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an
64 // int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8 64 // int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8
65 // (or very likely other versions of Mono at least up until 3.0.3). 65 // (or very likely other versions of Mono at least up until 3.0.3).
66 return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false); 66 return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false);
diff --git a/OpenSim/Server/Base/CommandManager.cs b/OpenSim/Server/Base/CommandManager.cs
index bd18485..b6e2903 100644
--- a/OpenSim/Server/Base/CommandManager.cs
+++ b/OpenSim/Server/Base/CommandManager.cs
@@ -41,117 +41,117 @@ namespace OpenSim.Server.Base
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// Command manager - 43 /// Command manager -
44 /// Wrapper for OpenSim.Framework.PluginManager to allow 44 /// Wrapper for OpenSim.Framework.PluginManager to allow
45 /// us to add commands to the console to perform operations 45 /// us to add commands to the console to perform operations
46 /// on our repos and plugins 46 /// on our repos and plugins
47 /// </summary> 47 /// </summary>
48 public class CommandManager 48 public class CommandManager
49 { 49 {
50 public AddinRegistry PluginRegistry; 50 public AddinRegistry PluginRegistry;
51 protected PluginManager PluginManager; 51 protected PluginManager PluginManager;
52 52
53 public CommandManager(AddinRegistry registry) 53 public CommandManager(AddinRegistry registry)
54 { 54 {
55 PluginRegistry = registry; 55 PluginRegistry = registry;
56 PluginManager = new PluginManager(PluginRegistry); 56 PluginManager = new PluginManager(PluginRegistry);
57 AddManagementCommands(); 57 AddManagementCommands();
58 } 58 }
59 59
60 private void AddManagementCommands() 60 private void AddManagementCommands()
61 { 61 {
62 // add plugin 62 // add plugin
63 MainConsole.Instance.Commands.AddCommand("Plugin", true, 63 MainConsole.Instance.Commands.AddCommand("Plugin", true,
64 "plugin add", "plugin add \"plugin index\"", 64 "plugin add", "plugin add \"plugin index\"",
65 "Install plugin from repository.", 65 "Install plugin from repository.",
66 HandleConsoleInstallPlugin); 66 HandleConsoleInstallPlugin);
67 67
68 // remove plugin 68 // remove plugin
69 MainConsole.Instance.Commands.AddCommand("Plugin", true, 69 MainConsole.Instance.Commands.AddCommand("Plugin", true,
70 "plugin remove", "plugin remove \"plugin index\"", 70 "plugin remove", "plugin remove \"plugin index\"",
71 "Remove plugin from repository", 71 "Remove plugin from repository",
72 HandleConsoleUnInstallPlugin); 72 HandleConsoleUnInstallPlugin);
73 73
74 // list installed plugins 74 // list installed plugins
75 MainConsole.Instance.Commands.AddCommand("Plugin", true, 75 MainConsole.Instance.Commands.AddCommand("Plugin", true,
76 "plugin list installed", 76 "plugin list installed",
77 "plugin list installed","List install plugins", 77 "plugin list installed","List install plugins",
78 HandleConsoleListInstalledPlugin); 78 HandleConsoleListInstalledPlugin);
79 79
80 // list plugins available from registered repositories 80 // list plugins available from registered repositories
81 MainConsole.Instance.Commands.AddCommand("Plugin", true, 81 MainConsole.Instance.Commands.AddCommand("Plugin", true,
82 "plugin list available", 82 "plugin list available",
83 "plugin list available","List available plugins", 83 "plugin list available","List available plugins",
84 HandleConsoleListAvailablePlugin); 84 HandleConsoleListAvailablePlugin);
85 // List available updates 85 // List available updates
86 MainConsole.Instance.Commands.AddCommand("Plugin", true, 86 MainConsole.Instance.Commands.AddCommand("Plugin", true,
87 "plugin updates", "plugin updates","List availble updates", 87 "plugin updates", "plugin updates","List availble updates",
88 HandleConsoleListUpdates); 88 HandleConsoleListUpdates);
89 89
90 // Update plugin 90 // Update plugin
91 MainConsole.Instance.Commands.AddCommand("Plugin", true, 91 MainConsole.Instance.Commands.AddCommand("Plugin", true,
92 "plugin update", "plugin update \"plugin index\"","Update the plugin", 92 "plugin update", "plugin update \"plugin index\"","Update the plugin",
93 HandleConsoleUpdatePlugin); 93 HandleConsoleUpdatePlugin);
94 94
95 // Add repository 95 // Add repository
96 MainConsole.Instance.Commands.AddCommand("Repository", true, 96 MainConsole.Instance.Commands.AddCommand("Repository", true,
97 "repo add", "repo add \"url\"","Add repository", 97 "repo add", "repo add \"url\"","Add repository",
98 HandleConsoleAddRepo); 98 HandleConsoleAddRepo);
99 99
100 // Refresh repo 100 // Refresh repo
101 MainConsole.Instance.Commands.AddCommand("Repository", true, 101 MainConsole.Instance.Commands.AddCommand("Repository", true,
102 "repo refresh", "repo refresh \"url\"", "Sync with a registered repository", 102 "repo refresh", "repo refresh \"url\"", "Sync with a registered repository",
103 HandleConsoleGetRepo); 103 HandleConsoleGetRepo);
104 104
105 // Remove repository from registry 105 // Remove repository from registry
106 MainConsole.Instance.Commands.AddCommand("Repository", true, 106 MainConsole.Instance.Commands.AddCommand("Repository", true,
107 "repo remove", 107 "repo remove",
108 "repo remove \"[url | index]\"", 108 "repo remove \"[url | index]\"",
109 "Remove repository from registry", 109 "Remove repository from registry",
110 HandleConsoleRemoveRepo); 110 HandleConsoleRemoveRepo);
111 111
112 // Enable repo 112 // Enable repo
113 MainConsole.Instance.Commands.AddCommand("Repository", true, 113 MainConsole.Instance.Commands.AddCommand("Repository", true,
114 "repo enable", "repo enable \"[url | index]\"", 114 "repo enable", "repo enable \"[url | index]\"",
115 "Enable registered repository", 115 "Enable registered repository",
116 HandleConsoleEnableRepo); 116 HandleConsoleEnableRepo);
117 117
118 // Disable repo 118 // Disable repo
119 MainConsole.Instance.Commands.AddCommand("Repository", true, 119 MainConsole.Instance.Commands.AddCommand("Repository", true,
120 "repo disable", "repo disable\"[url | index]\"", 120 "repo disable", "repo disable\"[url | index]\"",
121 "Disable registered repository", 121 "Disable registered repository",
122 HandleConsoleDisableRepo); 122 HandleConsoleDisableRepo);
123 123
124 // List registered repositories 124 // List registered repositories
125 MainConsole.Instance.Commands.AddCommand("Repository", true, 125 MainConsole.Instance.Commands.AddCommand("Repository", true,
126 "repo list", "repo list", 126 "repo list", "repo list",
127 "List registered repositories", 127 "List registered repositories",
128 HandleConsoleListRepos); 128 HandleConsoleListRepos);
129 129
130 // * 130 // *
131 MainConsole.Instance.Commands.AddCommand("Plugin", true, 131 MainConsole.Instance.Commands.AddCommand("Plugin", true,
132 "plugin info", "plugin info \"plugin index\"","Show detailed information for plugin", 132 "plugin info", "plugin info \"plugin index\"","Show detailed information for plugin",
133 HandleConsoleShowAddinInfo); 133 HandleConsoleShowAddinInfo);
134 134
135 // Plugin disable 135 // Plugin disable
136 MainConsole.Instance.Commands.AddCommand("Plugin", true, 136 MainConsole.Instance.Commands.AddCommand("Plugin", true,
137 "plugin disable", "plugin disable \"plugin index\"", 137 "plugin disable", "plugin disable \"plugin index\"",
138 "Disable a plugin", 138 "Disable a plugin",
139 HandleConsoleDisablePlugin); 139 HandleConsoleDisablePlugin);
140 140
141 // Enable plugin 141 // Enable plugin
142 MainConsole.Instance.Commands.AddCommand("Plugin", true, 142 MainConsole.Instance.Commands.AddCommand("Plugin", true,
143 "plugin enable", "plugin enable \"plugin index\"", 143 "plugin enable", "plugin enable \"plugin index\"",
144 "Enable the selected plugin plugin", 144 "Enable the selected plugin plugin",
145 HandleConsoleEnablePlugin); 145 HandleConsoleEnablePlugin);
146 } 146 }
147 147
148 #region console handlers 148 #region console handlers
149 // Handle our console commands 149 // Handle our console commands
150 // 150 //
151 // Install plugin from registered repository 151 // Install plugin from registered repository
152 /// <summary> 152 /// <summary>
153 /// Handles the console install plugin command. Attempts to install the selected plugin 153 /// Handles the console install plugin command. Attempts to install the selected plugin
154 /// and 154 /// and
155 /// </summary> 155 /// </summary>
156 /// <param name='module'> 156 /// <param name='module'>
157 /// Module. 157 /// Module.
@@ -323,7 +323,7 @@ namespace OpenSim.Server.Base
323 { 323 {
324 if (cmd.Length >= 3) 324 if (cmd.Length >= 3)
325 { 325 {
326 326
327 Dictionary<string, object> result = new Dictionary<string, object>(); 327 Dictionary<string, object> result = new Dictionary<string, object>();
328 328
329 int ndx = Convert.ToInt16(cmd[2]); 329 int ndx = Convert.ToInt16(cmd[2]);
@@ -355,5 +355,5 @@ namespace OpenSim.Server.Base
355 return; 355 return;
356 } 356 }
357 #endregion 357 #endregion
358 } 358 }
359} \ No newline at end of file 359} \ No newline at end of file
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index 42a8c57..3357250 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Server.Base
112 MainServer.Instance = httpServer; 112 MainServer.Instance = httpServer;
113 113
114 // If https_listener = true, then add an ssl listener on the https_port... 114 // If https_listener = true, then add an ssl listener on the https_port...
115 if (ssl_listener == true) 115 if (ssl_listener == true)
116 { 116 {
117 uint https_port = (uint)networkConfig.GetInt("https_port", 0); 117 uint https_port = (uint)networkConfig.GetInt("https_port", 0);
118 118
diff --git a/OpenSim/Server/Base/Properties/AssemblyInfo.cs b/OpenSim/Server/Base/Properties/AssemblyInfo.cs
index 02931e7..4be0f25 100644
--- a/OpenSim/Server/Base/Properties/AssemblyInfo.cs
+++ b/OpenSim/Server/Base/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Server.Base")] 8[assembly: AssemblyTitle("OpenSim.Server.Base")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Server/Base/ProtocolVersions.cs b/OpenSim/Server/Base/ProtocolVersions.cs
index 5c2278c..27eed4c 100644
--- a/OpenSim/Server/Base/ProtocolVersions.cs
+++ b/OpenSim/Server/Base/ProtocolVersions.cs
@@ -31,20 +31,20 @@ namespace OpenSim.Server.Base
31 { 31 {
32 /// <value> 32 /// <value>
33 /// This is the external protocol versions. It is separate from the OpenSimulator project version. 33 /// This is the external protocol versions. It is separate from the OpenSimulator project version.
34 /// 34 ///
35 /// These version numbers should be increased by 1 every time a code 35 /// These version numbers should be increased by 1 every time a code
36 /// change in the Service.Connectors and Server.Handlers, espectively, 36 /// change in the Service.Connectors and Server.Handlers, espectively,
37 /// makes the previous OpenSimulator revision incompatible 37 /// makes the previous OpenSimulator revision incompatible
38 /// with the new revision. 38 /// with the new revision.
39 /// 39 ///
40 /// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality 40 /// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality
41 /// but not outright failure) do not need a version number increment. 41 /// but not outright failure) do not need a version number increment.
42 /// 42 ///
43 /// Having this version number allows the grid service to reject connections from regions running a version 43 /// Having this version number allows the grid service to reject connections from regions running a version
44 /// of the code that is too old. 44 /// of the code that is too old.
45 /// 45 ///
46 /// </value> 46 /// </value>
47 47
48 // The range of acceptable servers for client-side connectors 48 // The range of acceptable servers for client-side connectors
49 public readonly static int ClientProtocolVersionMin = 1; 49 public readonly static int ClientProtocolVersionMin = 1;
50 public readonly static int ClientProtocolVersionMax = 1; 50 public readonly static int ClientProtocolVersionMax = 1;
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 57d0a8d..b17d7ba 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Server.Base
104 // libomv, which has a hard-coded path to "." for pinvoke 104 // libomv, which has a hard-coded path to "." for pinvoke
105 // to load the openjpeg dll 105 // to load the openjpeg dll
106 // 106 //
107 // Will look for a way to fix, but for now this keeps the 107 // Will look for a way to fix, but for now this keeps the
108 // confusion to a minimum. this was copied from our region 108 // confusion to a minimum. this was copied from our region
109 // plugin loader, we have been doing this in there for a long time. 109 // plugin loader, we have been doing this in there for a long time.
110 // 110 //
@@ -183,7 +183,7 @@ namespace OpenSim.Server.Base
183 183
184 if(port != 0) 184 if(port != 0)
185 server = MainServer.GetHttpServer(port); 185 server = MainServer.GetHttpServer(port);
186 else 186 else
187 server = MainServer.Instance; 187 server = MainServer.Instance;
188 188
189 return server; 189 return server;
@@ -222,19 +222,19 @@ namespace OpenSim.Server.Base
222 // This is good to debug configuration problems 222 // This is good to debug configuration problems
223 //if (dllName == string.Empty) 223 //if (dllName == string.Empty)
224 // Util.PrintCallStack(); 224 // Util.PrintCallStack();
225 225
226 string className = String.Empty; 226 string className = String.Empty;
227 227
228 // The path for a dynamic plugin will contain ":" on Windows 228 // The path for a dynamic plugin will contain ":" on Windows
229 string[] parts = dllName.Split (new char[] {':'}); 229 string[] parts = dllName.Split (new char[] {':'});
230 230
231 if (parts [0].Length > 1) 231 if (parts [0].Length > 1)
232 { 232 {
233 dllName = parts [0]; 233 dllName = parts [0];
234 if (parts.Length > 1) 234 if (parts.Length > 1)
235 className = parts[1]; 235 className = parts[1];
236 } 236 }
237 else 237 else
238 { 238 {
239 // This is Windows - we must replace the ":" in the path 239 // This is Windows - we must replace the ":" in the path
240 dllName = String.Format ("{0}:{1}", parts [0], parts [1]); 240 dllName = String.Format ("{0}:{1}", parts [0], parts [1]);
@@ -242,17 +242,17 @@ namespace OpenSim.Server.Base
242 className = parts[2]; 242 className = parts[2];
243 } 243 }
244 244
245 // Handle extra string arguments in a more generic way 245 // Handle extra string arguments in a more generic way
246 if (dllName.Contains("@")) 246 if (dllName.Contains("@"))
247 { 247 {
248 string[] dllNameParts = dllName.Split(new char[] {'@'}); 248 string[] dllNameParts = dllName.Split(new char[] {'@'});
249 dllName = dllNameParts[dllNameParts.Length - 1]; 249 dllName = dllNameParts[dllNameParts.Length - 1];
250 List<Object> argList = new List<Object>(args); 250 List<Object> argList = new List<Object>(args);
251 for (int i = 0 ; i < dllNameParts.Length - 1 ; ++i) 251 for (int i = 0 ; i < dllNameParts.Length - 1 ; ++i)
252 argList.Add(dllNameParts[i]); 252 argList.Add(dllNameParts[i]);
253 253
254 args = argList.ToArray(); 254 args = argList.ToArray();
255 } 255 }
256 256
257 return LoadPlugin<T>(dllName, className, args); 257 return LoadPlugin<T>(dllName, className, args);
258 } 258 }
@@ -276,10 +276,10 @@ namespace OpenSim.Server.Base
276 { 276 {
277 if (pluginType.IsPublic) 277 if (pluginType.IsPublic)
278 { 278 {
279 if (className != String.Empty 279 if (className != String.Empty
280 && pluginType.ToString() != pluginType.Namespace + "." + className) 280 && pluginType.ToString() != pluginType.Namespace + "." + className)
281 continue; 281 continue;
282 282
283 Type typeInterface = pluginType.GetInterface(interfaceName); 283 Type typeInterface = pluginType.GetInterface(interfaceName);
284 284
285 if (typeInterface != null) 285 if (typeInterface != null)
@@ -295,8 +295,8 @@ namespace OpenSim.Server.Base
295 if (!(e is System.MissingMethodException)) 295 if (!(e is System.MissingMethodException))
296 { 296 {
297 m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}", 297 m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
298 interfaceName, 298 interfaceName,
299 dllName, 299 dllName,
300 e.InnerException == null ? e.Message : e.InnerException.Message), 300 e.InnerException == null ? e.Message : e.InnerException.Message),
301 e); 301 e);
302 } 302 }
@@ -479,7 +479,7 @@ namespace OpenSim.Server.Base
479 XmlDocument doc = new XmlDocument(); 479 XmlDocument doc = new XmlDocument();
480 480
481 doc.LoadXml(data); 481 doc.LoadXml(data);
482 482
483 XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse"); 483 XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse");
484 484
485 if (rootL.Count != 1) 485 if (rootL.Count != 1)
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index e18594f..f60b5fb 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Server.Base
92 92
93 // Check if a prompt was given on the command line 93 // Check if a prompt was given on the command line
94 prompt = startupConfig.GetString("prompt", prompt); 94 prompt = startupConfig.GetString("prompt", prompt);
95 95
96 // Check for a Log4Net config file on the command line 96 // Check for a Log4Net config file on the command line
97 logConfig =startupConfig.GetString("logconfig", logConfig); 97 logConfig =startupConfig.GetString("logconfig", logConfig);
98 } 98 }
@@ -116,7 +116,7 @@ namespace OpenSim.Server.Base
116 // Merge OpSys env vars 116 // Merge OpSys env vars
117 Console.WriteLine("[CONFIG]: Loading environment variables for Config"); 117 Console.WriteLine("[CONFIG]: Loading environment variables for Config");
118 Util.MergeEnvironmentToConfig(Config); 118 Util.MergeEnvironmentToConfig(Config);
119 119
120 // Merge the configuration from the command line into the loaded file 120 // Merge the configuration from the command line into the loaded file
121 Config.Merge(argvConfig); 121 Config.Merge(argvConfig);
122 122
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
index ab81dd6..bad3ea2 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
@@ -151,27 +151,27 @@ namespace OpenSim.Server.Handlers.Asset
151 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); 151 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
152 return; 152 return;
153 } 153 }
154 154
155 AssetBase asset = m_AssetService.Get(assetId.ToString()); 155 AssetBase asset = m_AssetService.Get(assetId.ToString());
156 if (asset == null) 156 if (asset == null)
157 { 157 {
158 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); 158 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
159 return; 159 return;
160 } 160 }
161 161
162 string fileName = rawAssetId; 162 string fileName = rawAssetId;
163 163
164 if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) 164 if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName))
165 return; 165 return;
166 166
167 using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) 167 using (FileStream fs = new FileStream(fileName, FileMode.CreateNew))
168 { 168 {
169 using (BinaryWriter bw = new BinaryWriter(fs)) 169 using (BinaryWriter bw = new BinaryWriter(fs))
170 { 170 {
171 bw.Write(asset.Data); 171 bw.Write(asset.Data);
172 } 172 }
173 } 173 }
174 174
175 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); 175 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName);
176 } 176 }
177 177
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
index 91c5c54..8bfc690 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Server.Handlers.Asset
53 public AssetServerGetHandler(IAssetService service) : 53 public AssetServerGetHandler(IAssetService service) :
54 base("GET", "/assets") 54 base("GET", "/assets")
55 { 55 {
56 m_AssetService = service; 56 m_AssetService = service;
57 } 57 }
58 58
59 public AssetServerGetHandler(IAssetService service, IServiceAuth auth, string redirectURL) : 59 public AssetServerGetHandler(IAssetService service, IServiceAuth auth, string redirectURL) :
@@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset
155 httpResponse.ContentType = "text/plain"; 155 httpResponse.ContentType = "text/plain";
156 result = new byte[0]; 156 result = new byte[0];
157 } 157 }
158 158
159 if (httpResponse.StatusCode == (int)HttpStatusCode.NotFound && !string.IsNullOrEmpty(m_RedirectURL) && !string.IsNullOrEmpty(id)) 159 if (httpResponse.StatusCode == (int)HttpStatusCode.NotFound && !string.IsNullOrEmpty(m_RedirectURL) && !string.IsNullOrEmpty(id))
160 { 160 {
161 httpResponse.StatusCode = (int)HttpStatusCode.Redirect; 161 httpResponse.StatusCode = (int)HttpStatusCode.Redirect;
diff --git a/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs b/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs
index faa6fb7..4d2228a 100644
--- a/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs
+++ b/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs
@@ -52,8 +52,8 @@ namespace OpenSim.Server.Handlers.Asset.Test
52 52
53 UUID assetId = TestHelpers.ParseTail(0x1); 53 UUID assetId = TestHelpers.ParseTail(0x1);
54 54
55 IConfigSource config = new IniConfigSource(); 55 IConfigSource config = new IniConfigSource();
56 config.AddConfig("AssetService"); 56 config.AddConfig("AssetService");
57 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 57 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
58 58
59 AssetService assetService = new AssetService(config); 59 AssetService assetService = new AssetService(config);
@@ -72,7 +72,7 @@ namespace OpenSim.Server.Handlers.Asset.Test
72 XmlSerializer serializer = new XmlSerializer(typeof(AssetBase)); 72 XmlSerializer serializer = new XmlSerializer(typeof(AssetBase));
73 serializer.Serialize(writer, asset); 73 serializer.Serialize(writer, asset);
74 writer.Flush(); 74 writer.Flush();
75 } 75 }
76 76
77 buffer.Position = 0; 77 buffer.Position = 0;
78 asph.Handle(null, buffer, null, null); 78 asph.Handle(null, buffer, null, null);
@@ -87,13 +87,13 @@ namespace OpenSim.Server.Handlers.Asset.Test
87 { 87 {
88 TestHelpers.InMethod(); 88 TestHelpers.InMethod();
89 89
90 IConfigSource config = new IniConfigSource(); 90 IConfigSource config = new IniConfigSource();
91 config.AddConfig("AssetService"); 91 config.AddConfig("AssetService");
92 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 92 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
93 93
94 AssetService assetService = new AssetService(config); 94 AssetService assetService = new AssetService(config);
95 95
96 AssetServerPostHandler asph = new AssetServerPostHandler(assetService); 96 AssetServerPostHandler asph = new AssetServerPostHandler(assetService);
97 97
98 MemoryStream buffer = new MemoryStream(); 98 MemoryStream buffer = new MemoryStream();
99 byte[] badData = new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f }; 99 byte[] badData = new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f };
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
index 6ee98b3..d3ea7e2 100644
--- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
@@ -132,41 +132,41 @@ namespace OpenSim.Server.Handlers.Authentication
132 case "authenticate": 132 case "authenticate":
133 if (!request.ContainsKey("PASSWORD")) 133 if (!request.ContainsKey("PASSWORD"))
134 return FailureResult(); 134 return FailureResult();
135 135
136 token = m_AuthenticationService.Authenticate(principalID, request["PASSWORD"].ToString(), lifetime); 136 token = m_AuthenticationService.Authenticate(principalID, request["PASSWORD"].ToString(), lifetime);
137 137
138 if (token != String.Empty) 138 if (token != String.Empty)
139 return SuccessResult(token); 139 return SuccessResult(token);
140 return FailureResult(); 140 return FailureResult();
141 141
142 case "setpassword": 142 case "setpassword":
143 if (!m_AllowSetPassword) 143 if (!m_AllowSetPassword)
144 return FailureResult(); 144 return FailureResult();
145 145
146 if (!request.ContainsKey("PASSWORD")) 146 if (!request.ContainsKey("PASSWORD"))
147 return FailureResult(); 147 return FailureResult();
148 148
149 if (m_AuthenticationService.SetPassword(principalID, request["PASSWORD"].ToString())) 149 if (m_AuthenticationService.SetPassword(principalID, request["PASSWORD"].ToString()))
150 return SuccessResult(); 150 return SuccessResult();
151 else 151 else
152 return FailureResult(); 152 return FailureResult();
153 153
154 case "verify": 154 case "verify":
155 if (!request.ContainsKey("TOKEN")) 155 if (!request.ContainsKey("TOKEN"))
156 return FailureResult(); 156 return FailureResult();
157 157
158 if (m_AuthenticationService.Verify(principalID, request["TOKEN"].ToString(), lifetime)) 158 if (m_AuthenticationService.Verify(principalID, request["TOKEN"].ToString(), lifetime))
159 return SuccessResult(); 159 return SuccessResult();
160 160
161 return FailureResult(); 161 return FailureResult();
162 162
163 case "release": 163 case "release":
164 if (!request.ContainsKey("TOKEN")) 164 if (!request.ContainsKey("TOKEN"))
165 return FailureResult(); 165 return FailureResult();
166 166
167 if (m_AuthenticationService.Release(principalID, request["TOKEN"].ToString())) 167 if (m_AuthenticationService.Release(principalID, request["TOKEN"].ToString()))
168 return SuccessResult(); 168 return SuccessResult();
169 169
170 return FailureResult(); 170 return FailureResult();
171 171
172 case "getauthinfo": 172 case "getauthinfo":
diff --git a/OpenSim/Server/Handlers/Authentication/OpenIdServerConnector.cs b/OpenSim/Server/Handlers/Authentication/OpenIdServerConnector.cs
index 6464399..ac8ff52 100644
--- a/OpenSim/Server/Handlers/Authentication/OpenIdServerConnector.cs
+++ b/OpenSim/Server/Handlers/Authentication/OpenIdServerConnector.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Server.Handlers.Authentication
41 private static readonly ILog m_log = 41 private static readonly ILog m_log =
42 LogManager.GetLogger( 42 LogManager.GetLogger(
43 MethodBase.GetCurrentMethod().DeclaringType); 43 MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 private IAuthenticationService m_AuthenticationService; 45 private IAuthenticationService m_AuthenticationService;
46 private IUserAccountService m_UserAccountService; 46 private IUserAccountService m_UserAccountService;
47 private string m_ConfigName = "OpenIdService"; 47 private string m_ConfigName = "OpenIdService";
diff --git a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs
index b201dc7..a6605a1 100644
--- a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs
+++ b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs
@@ -178,14 +178,14 @@ namespace OpenSim.Server.Handlers.Authentication
178"; 178";
179 179
180 /// <summary>Page shown for an invalid OpenID identity</summary> 180 /// <summary>Page shown for an invalid OpenID identity</summary>
181 const string INVALID_OPENID_PAGE = 181 const string INVALID_OPENID_PAGE =
182@"<html><head><title>Identity not found</title></head> 182@"<html><head><title>Identity not found</title></head>
183<body>Invalid OpenID identity</body></html>"; 183<body>Invalid OpenID identity</body></html>";
184 184
185 /// <summary>Page shown if the OpenID endpoint is requested directly</summary> 185 /// <summary>Page shown if the OpenID endpoint is requested directly</summary>
186 const string ENDPOINT_PAGE = 186 const string ENDPOINT_PAGE =
187@"<html><head><title>OpenID Endpoint</title></head><body> 187@"<html><head><title>OpenID Endpoint</title></head><body>
188This is an OpenID server endpoint, not a human-readable resource. 188This is an OpenID server endpoint, not a human-readable resource.
189For more information, see <a href='http://openid.net/'>http://openid.net/</a>. 189For more information, see <a href='http://openid.net/'>http://openid.net/</a>.
190</body></html>"; 190</body></html>";
191 191
@@ -241,7 +241,7 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>.
241 // Check for form POST data 241 // Check for form POST data
242 if (passwordValues != null && passwordValues.Length == 1) 242 if (passwordValues != null && passwordValues.Length == 1)
243 { 243 {
244 if (account != null && 244 if (account != null &&
245 (m_authenticationService.Authenticate(account.PrincipalID,Util.Md5Hash(passwordValues[0]), 30) != string.Empty)) 245 (m_authenticationService.Authenticate(account.PrincipalID,Util.Md5Hash(passwordValues[0]), 30) != string.Empty))
246 authRequest.IsAuthenticated = true; 246 authRequest.IsAuthenticated = true;
247 else 247 else
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
index c9b4e9b..310a542 100644
--- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Server.Handlers.Authorization
67 67
68 xs = new XmlSerializer(typeof(AuthorizationResponse)); 68 xs = new XmlSerializer(typeof(AuthorizationResponse));
69 return ServerUtils.SerializeResult(xs, result); 69 return ServerUtils.SerializeResult(xs, result);
70 70
71 } 71 }
72 } 72 }
73} 73}
diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
index ff8699f..69c1a89 100644
--- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
@@ -175,7 +175,7 @@ namespace OpenSim.Server.Handlers.Avatar
175 request.Remove("METHOD"); 175 request.Remove("METHOD");
176 request.Remove("UserID"); 176 request.Remove("UserID");
177 } 177 }
178 178
179 byte[] SetItems(Dictionary<string, object> request) 179 byte[] SetItems(Dictionary<string, object> request)
180 { 180 {
181 UUID user = UUID.Zero; 181 UUID user = UUID.Zero;
@@ -196,7 +196,7 @@ namespace OpenSim.Server.Handlers.Avatar
196 names = _names.ToArray(); 196 names = _names.ToArray();
197 List<string> _values = (List<string>)request["Values"]; 197 List<string> _values = (List<string>)request["Values"];
198 values = _values.ToArray(); 198 values = _values.ToArray();
199 199
200 if (m_AvatarService.SetItems(user, names, values)) 200 if (m_AvatarService.SetItems(user, names, values))
201 return SuccessResult(); 201 return SuccessResult();
202 202
@@ -227,7 +227,7 @@ namespace OpenSim.Server.Handlers.Avatar
227 } 227 }
228 228
229 229
230 230
231 private byte[] SuccessResult() 231 private byte[] SuccessResult()
232 { 232 {
233 XmlDocument doc = new XmlDocument(); 233 XmlDocument doc = new XmlDocument();
diff --git a/OpenSim/Server/Handlers/BakedTextures/XBakesHandler.cs b/OpenSim/Server/Handlers/BakedTextures/XBakesHandler.cs
index 4c12967..4386a2d 100644
--- a/OpenSim/Server/Handlers/BakedTextures/XBakesHandler.cs
+++ b/OpenSim/Server/Handlers/BakedTextures/XBakesHandler.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.BakedTextures
61 ServerUtils.LoadPlugin<IBakedTextureService>(assetService, args); 61 ServerUtils.LoadPlugin<IBakedTextureService>(assetService, args);
62 62
63 IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); 63 IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);
64 64
65 server.AddStreamHandler(new BakesServerGetHandler(m_BakesService, auth)); 65 server.AddStreamHandler(new BakesServerGetHandler(m_BakesService, auth));
66 server.AddStreamHandler(new BakesServerPostHandler(m_BakesService, auth)); 66 server.AddStreamHandler(new BakesServerPostHandler(m_BakesService, auth));
67 } 67 }
diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs
index 72014db..0a4df54 100644
--- a/OpenSim/Server/Handlers/Base/ServerConnector.cs
+++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Server.Handlers.Base
72 72
73 // We call this from our plugin module to get our configuration 73 // We call this from our plugin module to get our configuration
74 public IConfig GetConfig() 74 public IConfig GetConfig()
75 { 75 {
76 IConfig config = null; 76 IConfig config = null;
77 config = ServerUtils.GetConfig(ConfigFile, ConfigName); 77 config = ServerUtils.GetConfig(ConfigFile, ConfigName);
78 78
@@ -96,12 +96,12 @@ namespace OpenSim.Server.Handlers.Base
96 96
97 // We get our remote initial configuration for bootstrapping in case 97 // We get our remote initial configuration for bootstrapping in case
98 // we have no configuration in our main file or in an existing 98 // we have no configuration in our main file or in an existing
99 // modular config file. This is the last resort to bootstrap the 99 // modular config file. This is the last resort to bootstrap the
100 // configuration, likely a new plugin loading for the first time. 100 // configuration, likely a new plugin loading for the first time.
101 private IConfigSource GetConfigSource() 101 private IConfigSource GetConfigSource()
102 { 102 {
103 IConfigSource source = null; 103 IConfigSource source = null;
104 104
105 source = ServerUtils.LoadInitialConfig(ConfigURL); 105 source = ServerUtils.LoadInitialConfig(ConfigURL);
106 106
107 if (source == null) 107 if (source == null)
diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
index 346af32..2aec045 100644
--- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
+++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
@@ -83,10 +83,10 @@ namespace OpenSim.Server.Handlers.Grid
83 { 83 {
84 _info["login"] 84 _info["login"]
85 = String.Format( 85 = String.Format(
86 "http://127.0.0.1:{0}/", 86 "http://127.0.0.1:{0}/",
87 netCfg.GetString( 87 netCfg.GetString(
88 "http_listener_port", ConfigSettings.DefaultRegionHttpPort.ToString())); 88 "http_listener_port", ConfigSettings.DefaultRegionHttpPort.ToString()));
89 89
90 IssueWarning(); 90 IssueWarning();
91 } 91 }
92 else 92 else
@@ -99,7 +99,7 @@ namespace OpenSim.Server.Handlers.Grid
99 { 99 {
100 _log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults"); 100 _log.Warn("[GRID INFO SERVICE]: Cannot get grid info from config source, using minimal defaults");
101 } 101 }
102 102
103 _log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count); 103 _log.DebugFormat("[GRID INFO SERVICE]: Grid info service initialized with {0} keys", _info.Count);
104 } 104 }
105 105
@@ -107,7 +107,7 @@ namespace OpenSim.Server.Handlers.Grid
107 { 107 {
108 _log.Warn("[GRID INFO SERVICE]: found no [GridInfo] section in your configuration files"); 108 _log.Warn("[GRID INFO SERVICE]: found no [GridInfo] section in your configuration files");
109 _log.Warn("[GRID INFO SERVICE]: trying to guess sensible defaults, you might want to provide better ones:"); 109 _log.Warn("[GRID INFO SERVICE]: trying to guess sensible defaults, you might want to provide better ones:");
110 110
111 foreach (string k in _info.Keys) 111 foreach (string k in _info.Keys)
112 { 112 {
113 _log.WarnFormat("[GRID INFO SERVICE]: {0}: {1}", k, _info[k]); 113 _log.WarnFormat("[GRID INFO SERVICE]: {0}: {1}", k, _info[k]);
@@ -181,7 +181,7 @@ namespace OpenSim.Server.Handlers.Grid
181 new string[] { "Startup", "Hypergrid" }, String.Empty); 181 new string[] { "Startup", "Hypergrid" }, String.Empty);
182 182
183 if (!String.IsNullOrEmpty(HomeURI)) 183 if (!String.IsNullOrEmpty(HomeURI))
184 map["home"] = OSD.FromString(HomeURI); 184 map["home"] = OSD.FromString(HomeURI);
185 else // Legacy. Remove soon! 185 else // Legacy. Remove soon!
186 { 186 {
187 IConfig cfg = m_Config.Configs["LoginService"]; 187 IConfig cfg = m_Config.Configs["LoginService"];
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
index 38629b2..f51c4ee 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Server.Handlers.Grid
126 case "get_grid_extra_features": 126 case "get_grid_extra_features":
127 return GetGridExtraFeatures(request); 127 return GetGridExtraFeatures(request);
128 } 128 }
129 129
130 m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method); 130 m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method);
131 } 131 }
132 catch (Exception e) 132 catch (Exception e)
@@ -590,22 +590,22 @@ namespace OpenSim.Server.Handlers.Grid
590 int flags = m_GridService.GetRegionFlags(scopeID, regionID); 590 int flags = m_GridService.GetRegionFlags(scopeID, regionID);
591 // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags); 591 // m_log.DebugFormat("[GRID HANDLER]: flags for region {0}: {1}", regionID, flags);
592 592
593 Dictionary<string, object> result = new Dictionary<string, object>(); 593 Dictionary<string, object> result = new Dictionary<string, object>();
594 result["result"] = flags.ToString(); 594 result["result"] = flags.ToString();
595 595
596 string xmlString = ServerUtils.BuildXmlResponse(result); 596 string xmlString = ServerUtils.BuildXmlResponse(result);
597 597
598 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); 598 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
599 return Util.UTF8NoBomEncoding.GetBytes(xmlString); 599 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
600 } 600 }
601 601
602 byte[] GetGridExtraFeatures(Dictionary<string, object> request) 602 byte[] GetGridExtraFeatures(Dictionary<string, object> request)
603 { 603 {
604 604
605 Dictionary<string, object> result = new Dictionary<string, object> (); 605 Dictionary<string, object> result = new Dictionary<string, object> ();
606 Dictionary<string, object> extraFeatures = m_GridService.GetExtraFeatures (); 606 Dictionary<string, object> extraFeatures = m_GridService.GetExtraFeatures ();
607 607
608 foreach (string key in extraFeatures.Keys) 608 foreach (string key in extraFeatures.Keys)
609 { 609 {
610 result [key] = extraFeatures [key]; 610 result [key] = extraFeatures [key];
611 } 611 }
diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
index f3d678f..684d1a8 100644
--- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
52 public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentPostHandler 52 public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentPostHandler
53 { 53 {
54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
56 private IGatekeeperService m_GatekeeperService; 56 private IGatekeeperService m_GatekeeperService;
57 57
58 public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) : base("/foreignagent") 58 public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) : base("/foreignagent")
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs
index 6c79c60..870a5ef 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
48 } 48 }
49 49
50 // Called from standalone configurations 50 // Called from standalone configurations
51 public HGFriendsServerConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn) 51 public HGFriendsServerConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn)
52 : base(config, server, configName) 52 : base(config, server, configName)
53 { 53 {
54 if (configName != string.Empty) 54 if (configName != string.Empty)
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
index 37b47ed..8116050 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
61 m_UserAgentService = uas; 61 m_UserAgentService = uas;
62 m_FriendsLocalSimConnector = friendsConn; 62 m_FriendsLocalSimConnector = friendsConn;
63 63
64 m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})", 64 m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})",
65 (m_FriendsLocalSimConnector == null ? "robust" : "standalone")); 65 (m_FriendsLocalSimConnector == null ? "robust" : "standalone"));
66 66
67 if (m_TheService == null) 67 if (m_TheService == null)
@@ -105,24 +105,24 @@ namespace OpenSim.Server.Handlers.Hypergrid
105 105
106 case "validate_friendship_offered": 106 case "validate_friendship_offered":
107 return ValidateFriendshipOffered(request); 107 return ValidateFriendshipOffered(request);
108 108
109 case "statusnotification": 109 case "statusnotification":
110 return StatusNotification(request); 110 return StatusNotification(request);
111 /* 111 /*
112 case "friendship_approved": 112 case "friendship_approved":
113 return FriendshipApproved(request); 113 return FriendshipApproved(request);
114 114
115 case "friendship_denied": 115 case "friendship_denied":
116 return FriendshipDenied(request); 116 return FriendshipDenied(request);
117 117
118 case "friendship_terminated": 118 case "friendship_terminated":
119 return FriendshipTerminated(request); 119 return FriendshipTerminated(request);
120 120
121 case "grant_rights": 121 case "grant_rights":
122 return GrantRights(request); 122 return GrantRights(request);
123 */ 123 */
124 } 124 }
125 125
126 m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method); 126 m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method);
127 } 127 }
128 catch (Exception e) 128 catch (Exception e)
diff --git a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs
index 8145a21..63f376d 100644
--- a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
55 55
56 public InstantMessageServerConnector(IConfigSource config, IHttpServer server) : 56 public InstantMessageServerConnector(IConfigSource config, IHttpServer server) :
57 this(config, server, (IInstantMessageSimConnector)null) 57 this(config, server, (IInstantMessageSimConnector)null)
58 { 58 {
59 } 59 }
60 60
61 public InstantMessageServerConnector(IConfigSource config, IHttpServer server, string configName) : 61 public InstantMessageServerConnector(IConfigSource config, IHttpServer server, string configName) :
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 37feabe..394b133 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -63,14 +63,14 @@ namespace OpenSim.Server.Handlers.Hypergrid
63 63
64 public UserAgentServerConnector(IConfigSource config, IHttpServer server) : 64 public UserAgentServerConnector(IConfigSource config, IHttpServer server) :
65 this(config, server, (IFriendsSimConnector)null) 65 this(config, server, (IFriendsSimConnector)null)
66 { 66 {
67 } 67 }
68 68
69 public UserAgentServerConnector(IConfigSource config, IHttpServer server, string configName) : 69 public UserAgentServerConnector(IConfigSource config, IHttpServer server, string configName) :
70 this(config, server) 70 this(config, server)
71 { 71 {
72 } 72 }
73 73
74 public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) : 74 public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) :
75 base(config, server, String.Empty) 75 base(config, server, String.Empty)
76 { 76 {
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
index 0bab5aa..e90b869 100644
--- a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Inventory
61 { 61 {
62 if (configName != string.Empty) 62 if (configName != string.Empty)
63 m_ConfigName = configName; 63 m_ConfigName = configName;
64 64
65 IConfig serverConfig = config.Configs[m_ConfigName]; 65 IConfig serverConfig = config.Configs[m_ConfigName];
66 if (serverConfig == null) 66 if (serverConfig == null)
67 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); 67 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
@@ -92,7 +92,7 @@ namespace OpenSim.Server.Handlers.Inventory
92 m_httpServer.AddStreamHandler( 92 m_httpServer.AddStreamHandler(
93 new RestDeserialiseSecureHandler<Guid, InventoryCollection>( 93 new RestDeserialiseSecureHandler<Guid, InventoryCollection>(
94 "POST", "/GetFolderContent/", GetFolderContent, CheckAuthSession)); 94 "POST", "/GetFolderContent/", GetFolderContent, CheckAuthSession));
95 95
96 m_httpServer.AddStreamHandler( 96 m_httpServer.AddStreamHandler(
97 new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( 97 new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
98 "POST", "/UpdateFolder/", m_InventoryService.UpdateFolder, CheckAuthSession)); 98 "POST", "/UpdateFolder/", m_InventoryService.UpdateFolder, CheckAuthSession));
@@ -151,7 +151,7 @@ namespace OpenSim.Server.Handlers.Inventory
151 151
152 m_httpServer.AddStreamHandler(new InventoryServerMoveItemsHandler(m_InventoryService)); 152 m_httpServer.AddStreamHandler(new InventoryServerMoveItemsHandler(m_InventoryService));
153 153
154 154
155 // for persistent active gestures 155 // for persistent active gestures
156 m_httpServer.AddStreamHandler( 156 m_httpServer.AddStreamHandler(
157 new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>> 157 new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 96d6451..4400395 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -293,7 +293,7 @@ namespace OpenSim.Server.Handlers.Inventory
293 result["FID"] = icoll.FolderID.ToString(); 293 result["FID"] = icoll.FolderID.ToString();
294 result["VERSION"] = icoll.Version.ToString(); 294 result["VERSION"] = icoll.Version.ToString();
295 Dictionary<string, object> folders = new Dictionary<string, object>(); 295 Dictionary<string, object> folders = new Dictionary<string, object>();
296 int i = 0; 296 int i = 0;
297 if (icoll.Folders != null) 297 if (icoll.Folders != null)
298 { 298 {
299 foreach (InventoryFolderBase f in icoll.Folders) 299 foreach (InventoryFolderBase f in icoll.Folders)
@@ -407,7 +407,7 @@ namespace OpenSim.Server.Handlers.Inventory
407 } 407 }
408 } 408 }
409 result["ITEMS"] = sitems; 409 result["ITEMS"] = sitems;
410 410
411 string xmlString = ServerUtils.BuildXmlResponse(result); 411 string xmlString = ServerUtils.BuildXmlResponse(result);
412 412
413 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 413 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
diff --git a/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs b/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs
index d368bd3..c4b339f 100644
--- a/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Server.Handlers.Land
54 m_log.Error("[LAND IN CONNECTOR]: Land service was not provided"); 54 m_log.Error("[LAND IN CONNECTOR]: Land service was not provided");
55 return; 55 return;
56 } 56 }
57 57
58 //bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false); 58 //bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false);
59 //if (authentication) 59 //if (authentication)
60 // m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>(); 60 // m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();
diff --git a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs
index 5d672c3..072429a 100644
--- a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs
+++ b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Server.Handlers.Login
53 53
54 private ILoginService m_LocalService; 54 private ILoginService m_LocalService;
55 private bool m_Proxy; 55 private bool m_Proxy;
56 56
57 57
58 public LLLoginHandlers(ILoginService service, bool hasProxy) 58 public LLLoginHandlers(ILoginService service, bool hasProxy)
59 { 59 {
@@ -136,7 +136,7 @@ namespace OpenSim.Server.Handlers.Login
136 bool LibOMVclient = false; 136 bool LibOMVclient = false;
137 if (request.Params.Count > 4 && (string)request.Params[4] == "gridproxy") 137 if (request.Params.Count > 4 && (string)request.Params[4] == "gridproxy")
138 LibOMVclient = true; 138 LibOMVclient = true;
139 139
140 LoginResponse reply = null; 140 LoginResponse reply = null;
141 reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient, LibOMVclient); 141 reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient, LibOMVclient);
142 142
@@ -279,11 +279,11 @@ namespace OpenSim.Server.Handlers.Login
279 sock.Close("success"); 279 sock.Close("success");
280 } 280 }
281 }; 281 };
282 282
283 sock.HandshakeAndUpgrade(); 283 sock.HandshakeAndUpgrade();
284 284
285 } 285 }
286 286
287 287
288 private XmlRpcResponse FailedXMLRPCResponse() 288 private XmlRpcResponse FailedXMLRPCResponse()
289 { 289 {
diff --git a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
index f60e892..56ac3c2 100644
--- a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Server.Handlers.Login
98 m_DosProtectionOptions.ForgetTimeSpan = 98 m_DosProtectionOptions.ForgetTimeSpan =
99 TimeSpan.FromMilliseconds(serverConfig.GetInt("DOSForgiveClientAfterMS", 120000)); 99 TimeSpan.FromMilliseconds(serverConfig.GetInt("DOSForgiveClientAfterMS", 120000));
100 m_DosProtectionOptions.ReportingName = "LOGINDOSPROTECTION"; 100 m_DosProtectionOptions.ReportingName = "LOGINDOSPROTECTION";
101 101
102 102
103 return loginService; 103 return loginService;
104 } 104 }
@@ -106,7 +106,7 @@ namespace OpenSim.Server.Handlers.Login
106 private void InitializeHandlers(IHttpServer server) 106 private void InitializeHandlers(IHttpServer server)
107 { 107 {
108 LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService, m_Proxy); 108 LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService, m_Proxy);
109 server.AddXmlRPCHandler("login_to_simulator", 109 server.AddXmlRPCHandler("login_to_simulator",
110 new XmlRpcBasicDOSProtector(loginHandlers.HandleXMLRPCLogin,loginHandlers.HandleXMLRPCLoginBlocked, 110 new XmlRpcBasicDOSProtector(loginHandlers.HandleXMLRPCLogin,loginHandlers.HandleXMLRPCLoginBlocked,
111 m_DosProtectionOptions).Process, false); 111 m_DosProtectionOptions).Process, false);
112 server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false); 112 server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false);
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
index 38dfffc..7611f53 100644
--- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
@@ -148,7 +148,7 @@ namespace OpenSim.Server.Handlers.MapImage
148 } 148 }
149 else 149 else
150 { 150 {
151 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}", 151 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
152 ipAddr, x, y); 152 ipAddr, x, y);
153 return FailureResult("Region not found at given coordinates"); 153 return FailureResult("Region not found at given coordinates");
154 } 154 }
diff --git a/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs b/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs
index 4f8f7e1..f292b95 100644
--- a/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs
@@ -141,7 +141,7 @@ namespace OpenSim.Server.Handlers.MapImage
141 } 141 }
142 else 142 else
143 { 143 {
144 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}", 144 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
145 ipAddr, x, y); 145 ipAddr, x, y);
146 return FailureResult("Region not found at given coordinates"); 146 return FailureResult("Region not found at given coordinates");
147 } 147 }
diff --git a/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs b/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs
index 3525a01..e3ee467 100644
--- a/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs
+++ b/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Server.Handlers.Neighbour
150 150
151 // Finally! 151 // Finally!
152 GridRegion thisRegion = m_NeighbourService.HelloNeighbour(regionhandle, aRegion); 152 GridRegion thisRegion = m_NeighbourService.HelloNeighbour(regionhandle, aRegion);
153 153
154 OSDMap resp = new OSDMap(1); 154 OSDMap resp = new OSDMap(1);
155 155
156 if (thisRegion != null) 156 if (thisRegion != null)
diff --git a/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs b/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs
index ac2e75f..65ac4e6 100644
--- a/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Neighbour
55 m_log.Error("[NEIGHBOUR IN CONNECTOR]: neighbour service was not provided"); 55 m_log.Error("[NEIGHBOUR IN CONNECTOR]: neighbour service was not provided");
56 return; 56 return;
57 } 57 }
58 58
59 //bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false); 59 //bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false);
60 //if (authentication) 60 //if (authentication)
61 // m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>(); 61 // m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
index 49dbcb5..be16e17 100644
--- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Server.Handlers.Presence
158 158
159 return FailureResult(); 159 return FailureResult();
160 } 160 }
161 161
162 byte[] Report(Dictionary<string, object> request) 162 byte[] Report(Dictionary<string, object> request)
163 { 163 {
164 UUID session = UUID.Zero; 164 UUID session = UUID.Zero;
@@ -241,7 +241,7 @@ namespace OpenSim.Server.Handlers.Presence
241 } 241 }
242 242
243 string xmlString = ServerUtils.BuildXmlResponse(result); 243 string xmlString = ServerUtils.BuildXmlResponse(result);
244 244
245 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); 245 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
246 return Util.UTF8NoBomEncoding.GetBytes(xmlString); 246 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
247 } 247 }
diff --git a/OpenSim/Server/Handlers/Profiles/UserProfilesConnector.cs b/OpenSim/Server/Handlers/Profiles/UserProfilesConnector.cs
index 2dfb862..eecb370 100644
--- a/OpenSim/Server/Handlers/Profiles/UserProfilesConnector.cs
+++ b/OpenSim/Server/Handlers/Profiles/UserProfilesConnector.cs
@@ -39,8 +39,8 @@ namespace OpenSim.Server.Handlers.Profiles
39{ 39{
40 public class UserProfilesConnector: ServiceConnector 40 public class UserProfilesConnector: ServiceConnector
41 { 41 {
42// static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42// static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 // Our Local Module 44 // Our Local Module
45 public IUserProfilesService ServiceModule 45 public IUserProfilesService ServiceModule
46 { 46 {
@@ -83,7 +83,7 @@ namespace OpenSim.Server.Handlers.Profiles
83 83
84 Object[] args = new Object[] { config, ConfigName }; 84 Object[] args = new Object[] { config, ConfigName };
85 ServiceModule = ServerUtils.LoadPlugin<IUserProfilesService>(service, args); 85 ServiceModule = ServerUtils.LoadPlugin<IUserProfilesService>(service, args);
86 86
87 JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule); 87 JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule);
88 88
89 Server.AddJsonRPCHandler("avatarclassifiedsrequest", handler.AvatarClassifiedsRequest); 89 Server.AddJsonRPCHandler("avatarclassifiedsrequest", handler.AvatarClassifiedsRequest);
diff --git a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
index cac38f5..f23a981 100644
--- a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
+++ b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
@@ -48,17 +48,17 @@ namespace OpenSim.Server.Handlers
48 static readonly ILog m_log = 48 static readonly ILog m_log =
49 LogManager.GetLogger( 49 LogManager.GetLogger(
50 MethodBase.GetCurrentMethod().DeclaringType); 50 MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 public IUserProfilesService Service 52 public IUserProfilesService Service
53 { 53 {
54 get; private set; 54 get; private set;
55 } 55 }
56 56
57 public JsonRpcProfileHandlers(IUserProfilesService service) 57 public JsonRpcProfileHandlers(IUserProfilesService service)
58 { 58 {
59 Service = service; 59 Service = service;
60 } 60 }
61 61
62 #region Classifieds 62 #region Classifieds
63 /// <summary> 63 /// <summary>
64 /// Request avatar's classified ads. 64 /// Request avatar's classified ads.
@@ -80,17 +80,17 @@ namespace OpenSim.Server.Handlers
80 m_log.DebugFormat ("Classified Request"); 80 m_log.DebugFormat ("Classified Request");
81 return false; 81 return false;
82 } 82 }
83 83
84 OSDMap request = (OSDMap)json["params"]; 84 OSDMap request = (OSDMap)json["params"];
85 UUID creatorId = new UUID(request["creatorId"].AsString()); 85 UUID creatorId = new UUID(request["creatorId"].AsString());
86 86
87 87
88 OSDArray data = (OSDArray) Service.AvatarClassifiedsRequest(creatorId); 88 OSDArray data = (OSDArray) Service.AvatarClassifiedsRequest(creatorId);
89 response.Result = data; 89 response.Result = data;
90 90
91 return true; 91 return true;
92 } 92 }
93 93
94 public bool ClassifiedUpdate(OSDMap json, ref JsonRpcResponse response) 94 public bool ClassifiedUpdate(OSDMap json, ref JsonRpcResponse response)
95 { 95 {
96 if(!json.ContainsKey("params")) 96 if(!json.ContainsKey("params"))
@@ -100,7 +100,7 @@ namespace OpenSim.Server.Handlers
100 m_log.DebugFormat ("Classified Update Request"); 100 m_log.DebugFormat ("Classified Update Request");
101 return false; 101 return false;
102 } 102 }
103 103
104 string result = string.Empty; 104 string result = string.Empty;
105 UserClassifiedAdd ad = new UserClassifiedAdd(); 105 UserClassifiedAdd ad = new UserClassifiedAdd();
106 object Ad = (object)ad; 106 object Ad = (object)ad;
@@ -110,12 +110,12 @@ namespace OpenSim.Server.Handlers
110 response.Result = OSD.SerializeMembers(ad); 110 response.Result = OSD.SerializeMembers(ad);
111 return true; 111 return true;
112 } 112 }
113 113
114 response.Error.Code = ErrorCode.InternalError; 114 response.Error.Code = ErrorCode.InternalError;
115 response.Error.Message = string.Format("{0}", result); 115 response.Error.Message = string.Format("{0}", result);
116 return false; 116 return false;
117 } 117 }
118 118
119 public bool ClassifiedDelete(OSDMap json, ref JsonRpcResponse response) 119 public bool ClassifiedDelete(OSDMap json, ref JsonRpcResponse response)
120 { 120 {
121 if(!json.ContainsKey("params")) 121 if(!json.ContainsKey("params"))
@@ -124,10 +124,10 @@ namespace OpenSim.Server.Handlers
124 m_log.DebugFormat ("Classified Delete Request"); 124 m_log.DebugFormat ("Classified Delete Request");
125 return false; 125 return false;
126 } 126 }
127 127
128 OSDMap request = (OSDMap)json["params"]; 128 OSDMap request = (OSDMap)json["params"];
129 UUID classifiedId = new UUID(request["classifiedId"].AsString()); 129 UUID classifiedId = new UUID(request["classifiedId"].AsString());
130 130
131 if (Service.ClassifiedDelete(classifiedId)) 131 if (Service.ClassifiedDelete(classifiedId))
132 return true; 132 return true;
133 133
@@ -135,7 +135,7 @@ namespace OpenSim.Server.Handlers
135 response.Error.Message = "data error removing record"; 135 response.Error.Message = "data error removing record";
136 return false; 136 return false;
137 } 137 }
138 138
139 public bool ClassifiedInfoRequest(OSDMap json, ref JsonRpcResponse response) 139 public bool ClassifiedInfoRequest(OSDMap json, ref JsonRpcResponse response)
140 { 140 {
141 if(!json.ContainsKey("params")) 141 if(!json.ContainsKey("params"))
@@ -145,7 +145,7 @@ namespace OpenSim.Server.Handlers
145 m_log.DebugFormat ("Classified Info Request"); 145 m_log.DebugFormat ("Classified Info Request");
146 return false; 146 return false;
147 } 147 }
148 148
149 string result = string.Empty; 149 string result = string.Empty;
150 UserClassifiedAdd ad = new UserClassifiedAdd(); 150 UserClassifiedAdd ad = new UserClassifiedAdd();
151 object Ad = (object)ad; 151 object Ad = (object)ad;
@@ -155,13 +155,13 @@ namespace OpenSim.Server.Handlers
155 response.Result = OSD.SerializeMembers(ad); 155 response.Result = OSD.SerializeMembers(ad);
156 return true; 156 return true;
157 } 157 }
158 158
159 response.Error.Code = ErrorCode.InternalError; 159 response.Error.Code = ErrorCode.InternalError;
160 response.Error.Message = string.Format("{0}", result); 160 response.Error.Message = string.Format("{0}", result);
161 return false; 161 return false;
162 } 162 }
163 #endregion Classifieds 163 #endregion Classifieds
164 164
165 #region Picks 165 #region Picks
166 public bool AvatarPicksRequest(OSDMap json, ref JsonRpcResponse response) 166 public bool AvatarPicksRequest(OSDMap json, ref JsonRpcResponse response)
167 { 167 {
@@ -171,17 +171,17 @@ namespace OpenSim.Server.Handlers
171 m_log.DebugFormat ("Avatar Picks Request"); 171 m_log.DebugFormat ("Avatar Picks Request");
172 return false; 172 return false;
173 } 173 }
174 174
175 OSDMap request = (OSDMap)json["params"]; 175 OSDMap request = (OSDMap)json["params"];
176 UUID creatorId = new UUID(request["creatorId"].AsString()); 176 UUID creatorId = new UUID(request["creatorId"].AsString());
177 177
178 178
179 OSDArray data = (OSDArray) Service.AvatarPicksRequest(creatorId); 179 OSDArray data = (OSDArray) Service.AvatarPicksRequest(creatorId);
180 response.Result = data; 180 response.Result = data;
181 181
182 return true; 182 return true;
183 } 183 }
184 184
185 public bool PickInfoRequest(OSDMap json, ref JsonRpcResponse response) 185 public bool PickInfoRequest(OSDMap json, ref JsonRpcResponse response)
186 { 186 {
187 if(!json.ContainsKey("params")) 187 if(!json.ContainsKey("params"))
@@ -191,7 +191,7 @@ namespace OpenSim.Server.Handlers
191 m_log.DebugFormat ("Avatar Picks Info Request"); 191 m_log.DebugFormat ("Avatar Picks Info Request");
192 return false; 192 return false;
193 } 193 }
194 194
195 string result = string.Empty; 195 string result = string.Empty;
196 UserProfilePick pick = new UserProfilePick(); 196 UserProfilePick pick = new UserProfilePick();
197 object Pick = (object)pick; 197 object Pick = (object)pick;
@@ -201,12 +201,12 @@ namespace OpenSim.Server.Handlers
201 response.Result = OSD.SerializeMembers(pick); 201 response.Result = OSD.SerializeMembers(pick);
202 return true; 202 return true;
203 } 203 }
204 204
205 response.Error.Code = ErrorCode.InternalError; 205 response.Error.Code = ErrorCode.InternalError;
206 response.Error.Message = string.Format("{0}", result); 206 response.Error.Message = string.Format("{0}", result);
207 return false; 207 return false;
208 } 208 }
209 209
210 public bool PicksUpdate(OSDMap json, ref JsonRpcResponse response) 210 public bool PicksUpdate(OSDMap json, ref JsonRpcResponse response)
211 { 211 {
212 if(!json.ContainsKey("params")) 212 if(!json.ContainsKey("params"))
@@ -216,7 +216,7 @@ namespace OpenSim.Server.Handlers
216 m_log.DebugFormat ("Avatar Picks Update Request"); 216 m_log.DebugFormat ("Avatar Picks Update Request");
217 return false; 217 return false;
218 } 218 }
219 219
220 string result = string.Empty; 220 string result = string.Empty;
221 UserProfilePick pick = new UserProfilePick(); 221 UserProfilePick pick = new UserProfilePick();
222 object Pick = (object)pick; 222 object Pick = (object)pick;
@@ -226,13 +226,13 @@ namespace OpenSim.Server.Handlers
226 response.Result = OSD.SerializeMembers(pick); 226 response.Result = OSD.SerializeMembers(pick);
227 return true; 227 return true;
228 } 228 }
229 229
230 response.Error.Code = ErrorCode.InternalError; 230 response.Error.Code = ErrorCode.InternalError;
231 response.Error.Message = "unable to update pick"; 231 response.Error.Message = "unable to update pick";
232 232
233 return false; 233 return false;
234 } 234 }
235 235
236 public bool PicksDelete(OSDMap json, ref JsonRpcResponse response) 236 public bool PicksDelete(OSDMap json, ref JsonRpcResponse response)
237 { 237 {
238 if(!json.ContainsKey("params")) 238 if(!json.ContainsKey("params"))
@@ -241,18 +241,18 @@ namespace OpenSim.Server.Handlers
241 m_log.DebugFormat ("Avatar Picks Delete Request"); 241 m_log.DebugFormat ("Avatar Picks Delete Request");
242 return false; 242 return false;
243 } 243 }
244 244
245 OSDMap request = (OSDMap)json["params"]; 245 OSDMap request = (OSDMap)json["params"];
246 UUID pickId = new UUID(request["pickId"].AsString()); 246 UUID pickId = new UUID(request["pickId"].AsString());
247 if(Service.PicksDelete(pickId)) 247 if(Service.PicksDelete(pickId))
248 return true; 248 return true;
249 249
250 response.Error.Code = ErrorCode.InternalError; 250 response.Error.Code = ErrorCode.InternalError;
251 response.Error.Message = "data error removing record"; 251 response.Error.Message = "data error removing record";
252 return false; 252 return false;
253 } 253 }
254 #endregion Picks 254 #endregion Picks
255 255
256 #region Notes 256 #region Notes
257 public bool AvatarNotesRequest(OSDMap json, ref JsonRpcResponse response) 257 public bool AvatarNotesRequest(OSDMap json, ref JsonRpcResponse response)
258 { 258 {
@@ -277,7 +277,7 @@ namespace OpenSim.Server.Handlers
277 response.Error.Message = "Error reading notes"; 277 response.Error.Message = "Error reading notes";
278 return false; 278 return false;
279 } 279 }
280 280
281 public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response) 281 public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response)
282 { 282 {
283 if(!json.ContainsKey("params")) 283 if(!json.ContainsKey("params"))
@@ -287,7 +287,7 @@ namespace OpenSim.Server.Handlers
287 m_log.DebugFormat ("Avatar Notes Update Request"); 287 m_log.DebugFormat ("Avatar Notes Update Request");
288 return false; 288 return false;
289 } 289 }
290 290
291 string result = string.Empty; 291 string result = string.Empty;
292 UserProfileNotes note = new UserProfileNotes(); 292 UserProfileNotes note = new UserProfileNotes();
293 object Notes = (object) note; 293 object Notes = (object) note;
@@ -300,7 +300,7 @@ namespace OpenSim.Server.Handlers
300 return true; 300 return true;
301 } 301 }
302 #endregion Notes 302 #endregion Notes
303 303
304 #region Profile Properties 304 #region Profile Properties
305 public bool AvatarPropertiesRequest(OSDMap json, ref JsonRpcResponse response) 305 public bool AvatarPropertiesRequest(OSDMap json, ref JsonRpcResponse response)
306 { 306 {
@@ -311,7 +311,7 @@ namespace OpenSim.Server.Handlers
311 m_log.DebugFormat ("Avatar Properties Request"); 311 m_log.DebugFormat ("Avatar Properties Request");
312 return false; 312 return false;
313 } 313 }
314 314
315 string result = string.Empty; 315 string result = string.Empty;
316 UserProfileProperties props = new UserProfileProperties(); 316 UserProfileProperties props = new UserProfileProperties();
317 object Props = (object)props; 317 object Props = (object)props;
@@ -321,12 +321,12 @@ namespace OpenSim.Server.Handlers
321 response.Result = OSD.SerializeMembers(props); 321 response.Result = OSD.SerializeMembers(props);
322 return true; 322 return true;
323 } 323 }
324 324
325 response.Error.Code = ErrorCode.InternalError; 325 response.Error.Code = ErrorCode.InternalError;
326 response.Error.Message = string.Format("{0}", result); 326 response.Error.Message = string.Format("{0}", result);
327 return false; 327 return false;
328 } 328 }
329 329
330 public bool AvatarPropertiesUpdate(OSDMap json, ref JsonRpcResponse response) 330 public bool AvatarPropertiesUpdate(OSDMap json, ref JsonRpcResponse response)
331 { 331 {
332 if(!json.ContainsKey("params")) 332 if(!json.ContainsKey("params"))
@@ -336,7 +336,7 @@ namespace OpenSim.Server.Handlers
336 m_log.DebugFormat ("Avatar Properties Update Request"); 336 m_log.DebugFormat ("Avatar Properties Update Request");
337 return false; 337 return false;
338 } 338 }
339 339
340 string result = string.Empty; 340 string result = string.Empty;
341 UserProfileProperties props = new UserProfileProperties(); 341 UserProfileProperties props = new UserProfileProperties();
342 object Props = (object)props; 342 object Props = (object)props;
@@ -346,13 +346,13 @@ namespace OpenSim.Server.Handlers
346 response.Result = OSD.SerializeMembers(props); 346 response.Result = OSD.SerializeMembers(props);
347 return true; 347 return true;
348 } 348 }
349 349
350 response.Error.Code = ErrorCode.InternalError; 350 response.Error.Code = ErrorCode.InternalError;
351 response.Error.Message = string.Format("{0}", result); 351 response.Error.Message = string.Format("{0}", result);
352 return false; 352 return false;
353 } 353 }
354 #endregion Profile Properties 354 #endregion Profile Properties
355 355
356 #region Interests 356 #region Interests
357 public bool AvatarInterestsUpdate(OSDMap json, ref JsonRpcResponse response) 357 public bool AvatarInterestsUpdate(OSDMap json, ref JsonRpcResponse response)
358 { 358 {
@@ -363,7 +363,7 @@ namespace OpenSim.Server.Handlers
363 m_log.DebugFormat ("Avatar Interests Update Request"); 363 m_log.DebugFormat ("Avatar Interests Update Request");
364 return false; 364 return false;
365 } 365 }
366 366
367 string result = string.Empty; 367 string result = string.Empty;
368 UserProfileProperties props = new UserProfileProperties(); 368 UserProfileProperties props = new UserProfileProperties();
369 object Props = (object)props; 369 object Props = (object)props;
@@ -373,7 +373,7 @@ namespace OpenSim.Server.Handlers
373 response.Result = OSD.SerializeMembers(props); 373 response.Result = OSD.SerializeMembers(props);
374 return true; 374 return true;
375 } 375 }
376 376
377 response.Error.Code = ErrorCode.InternalError; 377 response.Error.Code = ErrorCode.InternalError;
378 response.Error.Message = string.Format("{0}", result); 378 response.Error.Message = string.Format("{0}", result);
379 return false; 379 return false;
@@ -399,7 +399,7 @@ namespace OpenSim.Server.Handlers
399 response.Result = OSD.SerializeMembers(prefs); 399 response.Result = OSD.SerializeMembers(prefs);
400 return true; 400 return true;
401 } 401 }
402 402
403 response.Error.Code = ErrorCode.InternalError; 403 response.Error.Code = ErrorCode.InternalError;
404 response.Error.Message = string.Format("{0}", result); 404 response.Error.Message = string.Format("{0}", result);
405// m_log.InfoFormat("[PROFILES]: User preferences request error - {0}", response.Error.Message); 405// m_log.InfoFormat("[PROFILES]: User preferences request error - {0}", response.Error.Message);
@@ -415,7 +415,7 @@ namespace OpenSim.Server.Handlers
415 m_log.DebugFormat ("User Preferences Update Request"); 415 m_log.DebugFormat ("User Preferences Update Request");
416 return false; 416 return false;
417 } 417 }
418 418
419 string result = string.Empty; 419 string result = string.Empty;
420 UserPreferences prefs = new UserPreferences(); 420 UserPreferences prefs = new UserPreferences();
421 object Prefs = (object)prefs; 421 object Prefs = (object)prefs;
@@ -425,7 +425,7 @@ namespace OpenSim.Server.Handlers
425 response.Result = OSD.SerializeMembers(prefs); 425 response.Result = OSD.SerializeMembers(prefs);
426 return true; 426 return true;
427 } 427 }
428 428
429 response.Error.Code = ErrorCode.InternalError; 429 response.Error.Code = ErrorCode.InternalError;
430 response.Error.Message = string.Format("{0}", result); 430 response.Error.Message = string.Format("{0}", result);
431 m_log.InfoFormat("[PROFILES]: User preferences update error - {0}", response.Error.Message); 431 m_log.InfoFormat("[PROFILES]: User preferences update error - {0}", response.Error.Message);
@@ -443,13 +443,13 @@ namespace OpenSim.Server.Handlers
443 m_log.DebugFormat ("Avatar Image Assets Request"); 443 m_log.DebugFormat ("Avatar Image Assets Request");
444 return false; 444 return false;
445 } 445 }
446 446
447 OSDMap request = (OSDMap)json["params"]; 447 OSDMap request = (OSDMap)json["params"];
448 UUID avatarId = new UUID(request["avatarId"].AsString()); 448 UUID avatarId = new UUID(request["avatarId"].AsString());
449 449
450 OSDArray data = (OSDArray) Service.AvatarImageAssetsRequest(avatarId); 450 OSDArray data = (OSDArray) Service.AvatarImageAssetsRequest(avatarId);
451 response.Result = data; 451 response.Result = data;
452 452
453 return true; 453 return true;
454 } 454 }
455 #endregion Utiltiy 455 #endregion Utiltiy
@@ -464,7 +464,7 @@ namespace OpenSim.Server.Handlers
464 m_log.DebugFormat ("User Application Service URL Request: No Parameters!"); 464 m_log.DebugFormat ("User Application Service URL Request: No Parameters!");
465 return false; 465 return false;
466 } 466 }
467 467
468 string result = string.Empty; 468 string result = string.Empty;
469 UserAppData props = new UserAppData(); 469 UserAppData props = new UserAppData();
470 object Props = (object)props; 470 object Props = (object)props;
@@ -475,15 +475,15 @@ namespace OpenSim.Server.Handlers
475 res["result"] = OSD.FromString("success"); 475 res["result"] = OSD.FromString("success");
476 res["token"] = OSD.FromString (result); 476 res["token"] = OSD.FromString (result);
477 response.Result = res; 477 response.Result = res;
478 478
479 return true; 479 return true;
480 } 480 }
481 481
482 response.Error.Code = ErrorCode.InternalError; 482 response.Error.Code = ErrorCode.InternalError;
483 response.Error.Message = string.Format("{0}", result); 483 response.Error.Message = string.Format("{0}", result);
484 return false; 484 return false;
485 } 485 }
486 486
487 public bool UpdateUserAppData(OSDMap json, ref JsonRpcResponse response) 487 public bool UpdateUserAppData(OSDMap json, ref JsonRpcResponse response)
488 { 488 {
489 if(!json.ContainsKey("params")) 489 if(!json.ContainsKey("params"))
@@ -493,7 +493,7 @@ namespace OpenSim.Server.Handlers
493 m_log.DebugFormat ("User App Data Update Request"); 493 m_log.DebugFormat ("User App Data Update Request");
494 return false; 494 return false;
495 } 495 }
496 496
497 string result = string.Empty; 497 string result = string.Empty;
498 UserAppData props = new UserAppData(); 498 UserAppData props = new UserAppData();
499 object Props = (object)props; 499 object Props = (object)props;
@@ -503,7 +503,7 @@ namespace OpenSim.Server.Handlers
503 response.Result = OSD.SerializeMembers(props); 503 response.Result = OSD.SerializeMembers(props);
504 return true; 504 return true;
505 } 505 }
506 506
507 response.Error.Code = ErrorCode.InternalError; 507 response.Error.Code = ErrorCode.InternalError;
508 response.Error.Message = string.Format("{0}", result); 508 response.Error.Message = string.Format("{0}", result);
509 return false; 509 return false;
diff --git a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs
index 7d3665b..4d6402f 100644
--- a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs
+++ b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Server.Handlers")] 8[assembly: AssemblyTitle("OpenSim.Server.Handlers")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 364f1fd..4e1f72e 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -190,7 +190,7 @@ namespace OpenSim.Server.Handlers.Simulation
190 { 190 {
191 // If there is no version in the packet at all we're looking at 0.6 or 191 // If there is no version in the packet at all we're looking at 0.6 or
192 // even more ancient. Refuse it. 192 // even more ancient. Refuse it.
193 if(theirVersion == 0f) 193 if(theirVersion == 0f)
194 { 194 {
195 resp["success"] = OSD.FromBoolean(false); 195 resp["success"] = OSD.FromBoolean(false);
196 resp["reason"] = OSD.FromString("Your region is running a old version of opensim no longer supported. Consider updating it"); 196 resp["reason"] = OSD.FromString("Your region is running a old version of opensim no longer supported. Consider updating it");
@@ -199,8 +199,8 @@ namespace OpenSim.Server.Handlers.Simulation
199 } 199 }
200 200
201 version = theirVersion; 201 version = theirVersion;
202 202
203 if (version < VersionInfo.SimulationServiceVersionAcceptedMin || 203 if (version < VersionInfo.SimulationServiceVersionAcceptedMin ||
204 version > VersionInfo.SimulationServiceVersionAcceptedMax ) 204 version > VersionInfo.SimulationServiceVersionAcceptedMax )
205 { 205 {
206 resp["success"] = OSD.FromBoolean(false); 206 resp["success"] = OSD.FromBoolean(false);
@@ -274,7 +274,7 @@ namespace OpenSim.Server.Handlers.Simulation
274 OSDArray featuresWanted = new OSDArray(); 274 OSDArray featuresWanted = new OSDArray();
275 foreach (UUID feature in features) 275 foreach (UUID feature in features)
276 featuresWanted.Add(OSD.FromString(feature.ToString())); 276 featuresWanted.Add(OSD.FromString(feature.ToString()));
277 277
278 resp["features"] = featuresWanted; 278 resp["features"] = featuresWanted;
279 279
280 // We must preserve defaults here, otherwise a false "success" will not be put into the JSON map! 280 // We must preserve defaults here, otherwise a false "success" will not be put into the JSON map!
@@ -460,7 +460,7 @@ namespace OpenSim.Server.Handlers.Simulation
460 source.RegionLocY = Int32.Parse(args["source_y"].AsString()); 460 source.RegionLocY = Int32.Parse(args["source_y"].AsString());
461 source.RegionName = args["source_name"].AsString(); 461 source.RegionName = args["source_name"].AsString();
462 source.RegionID = UUID.Parse(args["source_uuid"].AsString()); 462 source.RegionID = UUID.Parse(args["source_uuid"].AsString());
463 463
464 if (args.ContainsKey("source_server_uri")) 464 if (args.ContainsKey("source_server_uri"))
465 source.RawServerURI = args["source_server_uri"].AsString(); 465 source.RawServerURI = args["source_server_uri"].AsString();
466 else 466 else
diff --git a/OpenSim/Server/Properties/AssemblyInfo.cs b/OpenSim/Server/Properties/AssemblyInfo.cs
index ee45e10..6d15078 100644
--- a/OpenSim/Server/Properties/AssemblyInfo.cs
+++ b/OpenSim/Server/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("Robust")] 8[assembly: AssemblyTitle("Robust")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index ed5a481..c343044 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Server
59 ServicePointManager.UseNagleAlgorithm = false; 59 ServicePointManager.UseNagleAlgorithm = false;
60 60
61 m_Server = new HttpServerBase("R.O.B.U.S.T.", args); 61 m_Server = new HttpServerBase("R.O.B.U.S.T.", args);
62 62
63 string registryLocation; 63 string registryLocation;
64 64
65 IConfig serverConfig = m_Server.Config.Configs["Startup"]; 65 IConfig serverConfig = m_Server.Config.Configs["Startup"];
@@ -70,7 +70,7 @@ namespace OpenSim.Server
70 } 70 }
71 71
72 string connList = serverConfig.GetString("ServiceConnectors", String.Empty); 72 string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
73 73
74 registryLocation = serverConfig.GetString("RegistryLocation","."); 74 registryLocation = serverConfig.GetString("RegistryLocation",".");
75 75
76 IConfig servicesConfig = m_Server.Config.Configs["ServiceList"]; 76 IConfig servicesConfig = m_Server.Config.Configs["ServiceList"];
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index c57db48..5c37c33 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Services.AssetService
95 public virtual AssetBase Get(string id) 95 public virtual AssetBase Get(string id)
96 { 96 {
97// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); 97// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id);
98 98
99 UUID assetID; 99 UUID assetID;
100 100
101 if (!UUID.TryParse(id, out assetID)) 101 if (!UUID.TryParse(id, out assetID))
@@ -166,7 +166,7 @@ namespace OpenSim.Services.AssetService
166 return new bool[ids.Length]; 166 return new bool[ids.Length];
167 } 167 }
168 } 168 }
169 169
170 public virtual string Store(AssetBase asset) 170 public virtual string Store(AssetBase asset)
171 { 171 {
172 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; 172 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
@@ -175,14 +175,14 @@ namespace OpenSim.Services.AssetService
175// m_log.DebugFormat( 175// m_log.DebugFormat(
176// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); 176// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length);
177 if (!m_Database.StoreAsset(asset)) 177 if (!m_Database.StoreAsset(asset))
178 { 178 {
179 return UUID.Zero.ToString(); 179 return UUID.Zero.ToString();
180 } 180 }
181 } 181 }
182// else 182// else
183// { 183// {
184// m_log.DebugFormat( 184// m_log.DebugFormat(
185// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); 185// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length);
186// } 186// }
187 187
188 return asset.ID; 188 return asset.ID;
diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
index ddcb997..8da7100 100644
--- a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.AssetService")] 8[assembly: AssemblyTitle("OpenSim.Services.AssetService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs
index b1e5184..9490d55 100644
--- a/OpenSim/Services/AssetService/XAssetService.cs
+++ b/OpenSim/Services/AssetService/XAssetService.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Services.AssetService
94 public virtual AssetBase Get(string id) 94 public virtual AssetBase Get(string id)
95 { 95 {
96// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); 96// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id);
97 97
98 UUID assetID; 98 UUID assetID;
99 99
100 if (!UUID.TryParse(id, out assetID)) 100 if (!UUID.TryParse(id, out assetID))
@@ -162,7 +162,7 @@ namespace OpenSim.Services.AssetService
162 public virtual bool Get(string id, Object sender, AssetRetrieved handler) 162 public virtual bool Get(string id, Object sender, AssetRetrieved handler)
163 { 163 {
164 //m_log.DebugFormat("[XASSET SERVICE]: Get asset async {0}", id); 164 //m_log.DebugFormat("[XASSET SERVICE]: Get asset async {0}", id);
165 165
166 UUID assetID; 166 UUID assetID;
167 167
168 if (!UUID.TryParse(id, out assetID)) 168 if (!UUID.TryParse(id, out assetID))
@@ -171,7 +171,7 @@ namespace OpenSim.Services.AssetService
171 AssetBase asset = Get(id); 171 AssetBase asset = Get(id);
172 172
173 //m_log.DebugFormat("[XASSET SERVICE]: Got asset {0}", asset); 173 //m_log.DebugFormat("[XASSET SERVICE]: Got asset {0}", asset);
174 174
175 handler(id, sender, asset); 175 handler(id, sender, asset);
176 176
177 return true; 177 return true;
@@ -182,7 +182,7 @@ namespace OpenSim.Services.AssetService
182 UUID[] uuid = Array.ConvertAll(ids, id => UUID.Parse(id)); 182 UUID[] uuid = Array.ConvertAll(ids, id => UUID.Parse(id));
183 return m_Database.AssetsExist(uuid); 183 return m_Database.AssetsExist(uuid);
184 } 184 }
185 185
186 public virtual string Store(AssetBase asset) 186 public virtual string Store(AssetBase asset)
187 { 187 {
188 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; 188 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
@@ -222,7 +222,7 @@ namespace OpenSim.Services.AssetService
222 222
223 private void MigrateFromChainedService(AssetBase asset) 223 private void MigrateFromChainedService(AssetBase asset)
224 { 224 {
225 Store(asset); 225 Store(asset);
226 m_ChainedAssetService.Delete(asset.ID); 226 m_ChainedAssetService.Delete(asset.ID);
227 } 227 }
228 } 228 }
diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
index e42f9a0..f66b4e2 100644
--- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
+++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Services.AuthenticationService
41 // Generic Authentication service used for identifying 41 // Generic Authentication service used for identifying
42 // and authenticating principals. 42 // and authenticating principals.
43 // Principals may be clients acting on users' behalf, 43 // Principals may be clients acting on users' behalf,
44 // or any other components that need 44 // or any other components that need
45 // verifiable identification. 45 // verifiable identification.
46 // 46 //
47 public class AuthenticationServiceBase : ServiceBase 47 public class AuthenticationServiceBase : ServiceBase
@@ -49,7 +49,7 @@ namespace OpenSim.Services.AuthenticationService
49 private static readonly ILog m_log = 49 private static readonly ILog m_log =
50 LogManager.GetLogger( 50 LogManager.GetLogger(
51 MethodBase.GetCurrentMethod().DeclaringType); 51 MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 protected IAuthenticationData m_Database; 53 protected IAuthenticationData m_Database;
54 protected IUserAccountService m_UserAccountService = null; 54 protected IUserAccountService m_UserAccountService = null;
55 55
@@ -178,7 +178,7 @@ namespace OpenSim.Services.AuthenticationService
178 m_log.DebugFormat("[AUTHENTICATION DB]: Set authentication info for principalID {0}", info.PrincipalID); 178 m_log.DebugFormat("[AUTHENTICATION DB]: Set authentication info for principalID {0}", info.PrincipalID);
179 return true; 179 return true;
180 } 180 }
181 181
182 protected string GetToken(UUID principalID, int lifetime) 182 protected string GetToken(UUID principalID, int lifetime)
183 { 183 {
184 UUID token = UUID.Random(); 184 UUID token = UUID.Random();
diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
index a9359f3..0204699 100644
--- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Services.AuthenticationService
41 // Generic Authentication service used for identifying 41 // Generic Authentication service used for identifying
42 // and authenticating principals. 42 // and authenticating principals.
43 // Principals may be clients acting on users' behalf, 43 // Principals may be clients acting on users' behalf,
44 // or any other components that need 44 // or any other components that need
45 // verifiable identification. 45 // verifiable identification.
46 // 46 //
47 public class PasswordAuthenticationService : 47 public class PasswordAuthenticationService :
@@ -50,7 +50,7 @@ namespace OpenSim.Services.AuthenticationService
50 private static readonly ILog m_log = 50 private static readonly ILog m_log =
51 LogManager.GetLogger( 51 LogManager.GetLogger(
52 MethodBase.GetCurrentMethod().DeclaringType); 52 MethodBase.GetCurrentMethod().DeclaringType);
53 53
54 public PasswordAuthenticationService(IConfigSource config, IUserAccountService userService) : 54 public PasswordAuthenticationService(IConfigSource config, IUserAccountService userService) :
55 base(config, userService) 55 base(config, userService)
56 { 56 {
diff --git a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
index ef4e234..c946b04 100644
--- a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.AuthenticationService")] 8[assembly: AssemblyTitle("OpenSim.Services.AuthenticationService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
index 1510168..0bd5b1f 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Services.AuthenticationService
40 // Generic Authentication service used for identifying 40 // Generic Authentication service used for identifying
41 // and authenticating principals. 41 // and authenticating principals.
42 // Principals may be clients acting on users' behalf, 42 // Principals may be clients acting on users' behalf,
43 // or any other components that need 43 // or any other components that need
44 // verifiable identification. 44 // verifiable identification.
45 // 45 //
46 public class WebkeyAuthenticationService : 46 public class WebkeyAuthenticationService :
@@ -49,7 +49,7 @@ namespace OpenSim.Services.AuthenticationService
49 private static readonly ILog m_log = 49 private static readonly ILog m_log =
50 LogManager.GetLogger( 50 LogManager.GetLogger(
51 MethodBase.GetCurrentMethod().DeclaringType); 51 MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 public WebkeyAuthenticationService(IConfigSource config, IUserAccountService userService) : 53 public WebkeyAuthenticationService(IConfigSource config, IUserAccountService userService) :
54 base(config, userService) 54 base(config, userService)
55 { 55 {
@@ -79,7 +79,7 @@ namespace OpenSim.Services.AuthenticationService
79 { 79 {
80 if (data.Data.ContainsKey("webLoginKey")) 80 if (data.Data.ContainsKey("webLoginKey"))
81 { 81 {
82 string key = data.Data["webLoginKey"].ToString(); 82 string key = data.Data["webLoginKey"].ToString();
83 if (key == password) 83 if (key == password)
84 { 84 {
85 data.Data["webLoginKey"] = UUID.Zero.ToString(); 85 data.Data["webLoginKey"] = UUID.Zero.ToString();
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index bbc8470..4203c7b 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -43,9 +43,9 @@ namespace OpenSim.Services.AuthenticationService
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private Dictionary<string, IAuthenticationService> m_svcChecks 46 private Dictionary<string, IAuthenticationService> m_svcChecks
47 = new Dictionary<string, IAuthenticationService>(); 47 = new Dictionary<string, IAuthenticationService>();
48 48
49 public WebkeyOrPasswordAuthenticationService(IConfigSource config) 49 public WebkeyOrPasswordAuthenticationService(IConfigSource config)
50 : base(config) 50 : base(config)
51 { 51 {
@@ -86,7 +86,7 @@ namespace OpenSim.Services.AuthenticationService
86 } 86 }
87 } 87 }
88 88
89 89
90 90
91 if (result == string.Empty) 91 if (result == string.Empty)
92 { 92 {
@@ -97,8 +97,8 @@ namespace OpenSim.Services.AuthenticationService
97 { 97 {
98 m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); 98 m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
99 } 99 }
100 100
101 101
102 return result; 102 return result;
103 } 103 }
104 } 104 }
diff --git a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
index 75b1284..f87095a 100644
--- a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.AuthorizationService")] 8[assembly: AssemblyTitle("OpenSim.Services.AuthorizationService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs
index 423c781..222944c 100644
--- a/OpenSim/Services/AvatarService/AvatarService.cs
+++ b/OpenSim/Services/AvatarService/AvatarService.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Services.AvatarService
56 AvatarData avatar = GetAvatar(principalID); 56 AvatarData avatar = GetAvatar(principalID);
57 return avatar.ToAvatarAppearance(); 57 return avatar.ToAvatarAppearance();
58 } 58 }
59 59
60 public bool SetAppearance(UUID principalID, AvatarAppearance appearance) 60 public bool SetAppearance(UUID principalID, AvatarAppearance appearance)
61 { 61 {
62 AvatarData avatar = new AvatarData(appearance); 62 AvatarData avatar = new AvatarData(appearance);
@@ -136,7 +136,7 @@ namespace OpenSim.Services.AvatarService
136 { 136 {
137 av.Data["Value"] = kvp.Value; 137 av.Data["Value"] = kvp.Value;
138 } 138 }
139 139
140 if (!m_Database.Store(av)) 140 if (!m_Database.Store(av))
141 { 141 {
142 m_Database.Delete("PrincipalID", principalID.ToString()); 142 m_Database.Delete("PrincipalID", principalID.ToString());
diff --git a/OpenSim/Services/AvatarService/AvatarServiceBase.cs b/OpenSim/Services/AvatarService/AvatarServiceBase.cs
index ab9d7cd..c1c4fb7 100644
--- a/OpenSim/Services/AvatarService/AvatarServiceBase.cs
+++ b/OpenSim/Services/AvatarService/AvatarServiceBase.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.AvatarService
68 connString = presenceConfig.GetString("ConnectionString", connString); 68 connString = presenceConfig.GetString("ConnectionString", connString);
69 realm = presenceConfig.GetString("Realm", realm); 69 realm = presenceConfig.GetString("Realm", realm);
70 } 70 }
71 71
72 // 72 //
73 // We tried, but this doesn't exist. We can't proceed. 73 // We tried, but this doesn't exist. We can't proceed.
74 // 74 //
diff --git a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
index d64e53f..816ab0b 100644
--- a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.AvatarService")] 8[assembly: AssemblyTitle("OpenSim.Services.AvatarService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/Base/Properties/AssemblyInfo.cs b/OpenSim/Services/Base/Properties/AssemblyInfo.cs
index 4090ef9..90c14d7 100644
--- a/OpenSim/Services/Base/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/Base/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.Base")] 8[assembly: AssemblyTitle("OpenSim.Services.Base")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/Base/ServiceBase.cs b/OpenSim/Services/Base/ServiceBase.cs
index 209a57a..2017f50 100644
--- a/OpenSim/Services/Base/ServiceBase.cs
+++ b/OpenSim/Services/Base/ServiceBase.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Services.Base
38 public class ServiceBase 38 public class ServiceBase
39 { 39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 public T LoadPlugin<T>(string dllName) where T:class 42 public T LoadPlugin<T>(string dllName) where T:class
43 { 43 {
44 return LoadPlugin<T>(dllName, new Object[0]); 44 return LoadPlugin<T>(dllName, new Object[0]);
@@ -105,12 +105,12 @@ namespace OpenSim.Services.Base
105 List<string> strArgs = new List<string>(); 105 List<string> strArgs = new List<string>();
106 foreach (Object arg in args) 106 foreach (Object arg in args)
107 strArgs.Add(arg.ToString()); 107 strArgs.Add(arg.ToString());
108 108
109 m_log.Error( 109 m_log.Error(
110 string.Format( 110 string.Format(
111 "[SERVICE BASE]: Failed to load plugin {0} from {1} with args {2}", 111 "[SERVICE BASE]: Failed to load plugin {0} from {1} with args {2}",
112 interfaceName, dllName, string.Join(", ", strArgs.ToArray())), e); 112 interfaceName, dllName, string.Join(", ", strArgs.ToArray())), e);
113 113
114 return null; 114 return null;
115 } 115 }
116 } 116 }
diff --git a/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs b/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs
index 0e72c8b..bd342fa 100644
--- a/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs
+++ b/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Services.Connectors
110 { 110 {
111 m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: Exception when contacting agent preferences server at {0}: {1}", uri, e.Message); 111 m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: Exception when contacting agent preferences server at {0}: {1}", uri, e.Message);
112 } 112 }
113 113
114 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 114 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
115 if (replyData != null) 115 if (replyData != null)
116 { 116 {
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index bdc3bef..3fa8b54 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Services.Connectors
55 private List<AssetBase>[] m_sendRetries = new List<AssetBase>[MAXSENDRETRIESLEN]; 55 private List<AssetBase>[] m_sendRetries = new List<AssetBase>[MAXSENDRETRIESLEN];
56 private System.Timers.Timer m_retryTimer; 56 private System.Timers.Timer m_retryTimer;
57 private int m_maxAssetRequestConcurrency = 30; 57 private int m_maxAssetRequestConcurrency = 30;
58 58
59 private delegate void AssetRetrievedEx(AssetBase asset); 59 private delegate void AssetRetrievedEx(AssetBase asset);
60 60
61 // Keeps track of concurrent requests for the same asset, so that it's only loaded once. 61 // Keeps track of concurrent requests for the same asset, so that it's only loaded once.
@@ -150,7 +150,7 @@ namespace OpenSim.Services.Connectors
150 string prefix = id.Substring(0, 2).ToLower(); 150 string prefix = id.Substring(0, 2).ToLower();
151 151
152 string host; 152 string host;
153 153
154 // HG URLs will not be valid UUIDS 154 // HG URLs will not be valid UUIDS
155 if (m_UriMap.ContainsKey(prefix)) 155 if (m_UriMap.ContainsKey(prefix))
156 host = m_UriMap[prefix]; 156 host = m_UriMap[prefix];
@@ -180,11 +180,11 @@ namespace OpenSim.Services.Connectors
180 if(m_retryCounter >= 61 ) // avoid overflow 60 is max in use below 180 if(m_retryCounter >= 61 ) // avoid overflow 60 is max in use below
181 m_retryCounter = 1; 181 m_retryCounter = 1;
182 182
183 int inUse = 0; 183 int inUse = 0;
184 int nextlevel; 184 int nextlevel;
185 int timefactor; 185 int timefactor;
186 List<AssetBase> retrylist; 186 List<AssetBase> retrylist;
187 // we need to go down 187 // we need to go down
188 for(int i = MAXSENDRETRIESLEN - 1; i >= 0; i--) 188 for(int i = MAXSENDRETRIESLEN - 1; i >= 0; i--)
189 { 189 {
190 lock(m_sendRetries) 190 lock(m_sendRetries)
@@ -219,13 +219,13 @@ namespace OpenSim.Services.Connectors
219 lock(m_sendRetries) 219 lock(m_sendRetries)
220 m_sendRetries[i] = null; 220 m_sendRetries[i] = null;
221 221
222 // we are the only ones with a copy of this retrylist now 222 // we are the only ones with a copy of this retrylist now
223 foreach(AssetBase ass in retrylist) 223 foreach(AssetBase ass in retrylist)
224 retryStore(ass, nextlevel); 224 retryStore(ass, nextlevel);
225 } 225 }
226 226
227 lock(m_sendRetries) 227 lock(m_sendRetries)
228 { 228 {
229 if(inUse == 0 ) 229 if(inUse == 0 )
230 m_retryTimer.Stop(); 230 m_retryTimer.Stop();
231 231
@@ -245,7 +245,7 @@ namespace OpenSim.Services.Connectors
245 AssetBase asset = null; 245 AssetBase asset = null;
246 if (m_Cache != null) 246 if (m_Cache != null)
247 asset = m_Cache.Get(id); 247 asset = m_Cache.Get(id);
248 248
249 if (asset == null || asset.Data == null || asset.Data.Length == 0) 249 if (asset == null || asset.Data == null || asset.Data.Length == 0)
250 { 250 {
251 // XXX: Commented out for now since this has either never been properly operational or not for some time 251 // XXX: Commented out for now since this has either never been properly operational or not for some time
@@ -259,7 +259,7 @@ namespace OpenSim.Services.Connectors
259 259
260 asset = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, m_Auth); 260 asset = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, m_Auth);
261 261
262 262
263 if (m_Cache != null) 263 if (m_Cache != null)
264 { 264 {
265 if (asset != null) 265 if (asset != null)
@@ -438,7 +438,7 @@ namespace OpenSim.Services.Connectors
438 // This is most likely to happen because the server doesn't support this function, 438 // This is most likely to happen because the server doesn't support this function,
439 // so just silently return "doesn't exist" for all the assets. 439 // so just silently return "doesn't exist" for all the assets.
440 } 440 }
441 441
442 if (exist == null) 442 if (exist == null)
443 exist = new bool[ids.Length]; 443 exist = new bool[ids.Length];
444 444
@@ -557,7 +557,7 @@ namespace OpenSim.Services.Connectors
557 if(nextRetryLevel >= MAXSENDRETRIESLEN) 557 if(nextRetryLevel >= MAXSENDRETRIESLEN)
558 m_log.WarnFormat("[Assets] Upload giveup after several retries id: {0} type {1}", 558 m_log.WarnFormat("[Assets] Upload giveup after several retries id: {0} type {1}",
559 asset.ID.ToString(), asset.Type.ToString()); 559 asset.ID.ToString(), asset.Type.ToString());
560 else 560 else
561 { 561 {
562 lock(m_sendRetries) 562 lock(m_sendRetries)
563 { 563 {
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
index d2da85f..a130f71 100644
--- a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
@@ -37,7 +37,7 @@ using OpenMetaverse;
37 37
38namespace OpenSim.Services.Connectors 38namespace OpenSim.Services.Connectors
39{ 39{
40 public class AuthorizationServicesConnector 40 public class AuthorizationServicesConnector
41 { 41 {
42 private static readonly ILog m_log = 42 private static readonly ILog m_log =
43 LogManager.GetLogger( 43 LogManager.GetLogger(
@@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors
45 45
46 private string m_ServerURI = String.Empty; 46 private string m_ServerURI = String.Empty;
47 private bool m_ResponseOnFailure = true; 47 private bool m_ResponseOnFailure = true;
48 48
49 public AuthorizationServicesConnector() 49 public AuthorizationServicesConnector()
50 { 50 {
51 } 51 }
@@ -78,11 +78,11 @@ namespace OpenSim.Services.Connectors
78 throw new Exception("Authorization connector init error"); 78 throw new Exception("Authorization connector init error");
79 } 79 }
80 m_ServerURI = serviceURI; 80 m_ServerURI = serviceURI;
81 81
82 // this dictates what happens if the remote service fails, if the service fails and the value is true 82 // this dictates what happens if the remote service fails, if the service fails and the value is true
83 // the user is authorized for the region. 83 // the user is authorized for the region.
84 bool responseOnFailure = authorizationConfig.GetBoolean("ResponseOnFailure",true); 84 bool responseOnFailure = authorizationConfig.GetBoolean("ResponseOnFailure",true);
85 85
86 m_ResponseOnFailure = responseOnFailure; 86 m_ResponseOnFailure = responseOnFailure;
87 m_log.Info("[AUTHORIZATION CONNECTOR]: AuthorizationService initialized"); 87 m_log.Info("[AUTHORIZATION CONNECTOR]: AuthorizationService initialized");
88 } 88 }
@@ -91,11 +91,11 @@ namespace OpenSim.Services.Connectors
91 { 91 {
92 // do a remote call to the authorization server specified in the AuthorizationServerURI 92 // do a remote call to the authorization server specified in the AuthorizationServerURI
93 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI); 93 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI);
94 94
95 string uri = m_ServerURI; 95 string uri = m_ServerURI;
96 96
97 AuthorizationRequest req = new AuthorizationRequest(userID, firstname, surname, email, regionName, regionID); 97 AuthorizationRequest req = new AuthorizationRequest(userID, firstname, surname, email, regionName, regionID);
98 98
99 AuthorizationResponse response; 99 AuthorizationResponse response;
100 try 100 try
101 { 101 {
@@ -114,7 +114,7 @@ namespace OpenSim.Services.Connectors
114 } 114 }
115 m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message); 115 m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message);
116 message = response.Message; 116 message = response.Message;
117 117
118 return response.IsAuthorized; 118 return response.IsAuthorized;
119 } 119 }
120 120
diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs
index 3f44efa..424e95a 100644
--- a/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs
@@ -94,13 +94,13 @@ namespace OpenSim.Services.Connectors
94 AvatarData avatar = GetAvatar(userID); 94 AvatarData avatar = GetAvatar(userID);
95 return avatar.ToAvatarAppearance(); 95 return avatar.ToAvatarAppearance();
96 } 96 }
97 97
98 public bool SetAppearance(UUID userID, AvatarAppearance appearance) 98 public bool SetAppearance(UUID userID, AvatarAppearance appearance)
99 { 99 {
100 AvatarData avatar = new AvatarData(appearance); 100 AvatarData avatar = new AvatarData(appearance);
101 return SetAvatar(userID,avatar); 101 return SetAvatar(userID,avatar);
102 } 102 }
103 103
104 public AvatarData GetAvatar(UUID userID) 104 public AvatarData GetAvatar(UUID userID)
105 { 105 {
106 Dictionary<string, object> sendData = new Dictionary<string, object>(); 106 Dictionary<string, object> sendData = new Dictionary<string, object>();
diff --git a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs
index b7702a8..873b554 100644
--- a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Friends
86 86
87 87
88 #region IFriendsService 88 #region IFriendsService
89 89
90 public FriendInfo[] GetFriends(UUID PrincipalID) 90 public FriendInfo[] GetFriends(UUID PrincipalID)
91 { 91 {
92 Dictionary<string, object> sendData = new Dictionary<string, object>(); 92 Dictionary<string, object> sendData = new Dictionary<string, object>();
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
index ceb2146..ded7806 100644
--- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
@@ -683,7 +683,7 @@ namespace OpenSim.Services.Connectors
683 683
684 return rinfos; 684 return rinfos;
685 } 685 }
686 686
687 public int GetRegionFlags(UUID scopeID, UUID regionID) 687 public int GetRegionFlags(UUID scopeID, UUID regionID)
688 { 688 {
689 Dictionary<string, object> sendData = new Dictionary<string, object>(); 689 Dictionary<string, object> sendData = new Dictionary<string, object>();
@@ -755,7 +755,7 @@ namespace OpenSim.Services.Connectors
755 if (reply != string.Empty) 755 if (reply != string.Empty)
756 { 756 {
757 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 757 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
758 758
759 if ((replyData != null) && replyData.Count > 0) 759 if ((replyData != null) && replyData.Count > 0)
760 { 760 {
761 foreach (string key in replyData.Keys) 761 foreach (string key in replyData.Keys)
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index eef492d..e814c45 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -168,7 +168,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
168 string filename = string.Empty; 168 string filename = string.Empty;
169 169
170 try 170 try
171 { 171 {
172 //m_log.Debug("JPEG: " + imageURL); 172 //m_log.Debug("JPEG: " + imageURL);
173 string name = regionID.ToString(); 173 string name = regionID.ToString();
174 filename = Path.Combine(storagePath, name + ".jpg"); 174 filename = Path.Combine(storagePath, name + ".jpg");
diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
index b5e6d69..91e1740 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
@@ -33,7 +33,7 @@ using Nini.Config;
33 33
34namespace OpenSim.Services.Connectors 34namespace OpenSim.Services.Connectors
35{ 35{
36 public class HeloServicesConnector 36 public class HeloServicesConnector
37 { 37 {
38 private static readonly ILog m_log = 38 private static readonly ILog m_log =
39 LogManager.GetLogger( 39 LogManager.GetLogger(
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 1b45bcf..b261675 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
113 return "homeagent/"; 113 return "homeagent/";
114 } 114 }
115 115
116 // The Login service calls this interface with fromLogin=true 116 // The Login service calls this interface with fromLogin=true
117 // Sims call it with fromLogin=false 117 // Sims call it with fromLogin=false
118 // Either way, this is verified by the handler 118 // Either way, this is verified by the handler
119 public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason) 119 public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason)
@@ -159,7 +159,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
159 } 159 }
160 160
161 public void SetClientToken(UUID sessionID, string token) 161 public void SetClientToken(UUID sessionID, string token)
162 { 162 {
163 // no-op 163 // no-op
164 } 164 }
165 165
@@ -416,7 +416,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
416 416
417 XmlRpcRequest request = new XmlRpcRequest("get_online_friends", paramList); 417 XmlRpcRequest request = new XmlRpcRequest("get_online_friends", paramList);
418// string reason = string.Empty; 418// string reason = string.Empty;
419 419
420 // Send and get reply 420 // Send and get reply
421 List<UUID> online = new List<UUID>(); 421 List<UUID> online = new List<UUID>();
422 XmlRpcResponse response = null; 422 XmlRpcResponse response = null;
@@ -497,7 +497,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
497 hash["userID"] = userID.ToString(); 497 hash["userID"] = userID.ToString();
498 498
499 hash = CallServer("get_server_urls", hash); 499 hash = CallServer("get_server_urls", hash);
500 500
501 Dictionary<string, object> serverURLs = new Dictionary<string, object>(); 501 Dictionary<string, object> serverURLs = new Dictionary<string, object>();
502 foreach (object key in hash.Keys) 502 foreach (object key in hash.Keys)
503 { 503 {
@@ -516,7 +516,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
516 Hashtable hash = new Hashtable(); 516 Hashtable hash = new Hashtable();
517 hash["userID"] = userID.ToString(); 517 hash["userID"] = userID.ToString();
518 518
519 hash = CallServer("locate_user", hash); 519 hash = CallServer("locate_user", hash);
520 520
521 string url = string.Empty; 521 string url = string.Empty;
522 522
@@ -574,7 +574,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
574 { 574 {
575 // We can not use m_ServerURL here anymore because it causes 575 // We can not use m_ServerURL here anymore because it causes
576 // the HTTP request to be built without a host name. This messes 576 // the HTTP request to be built without a host name. This messes
577 // with OSGrid's NGINX and can make OSGrid avatars unable to TP 577 // with OSGrid's NGINX and can make OSGrid avatars unable to TP
578 // to other grids running recent mono. 578 // to other grids running recent mono.
579 response = request.Send(m_ServerURLHost, 10000); 579 response = request.Send(m_ServerURLHost, 10000);
580 } 580 }
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index bd5841b..dcf25ad 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Services.Connectors
63 /// In this case, -1 is default timeout (100 seconds), not infinite. 63 /// In this case, -1 is default timeout (100 seconds), not infinite.
64 /// </remarks> 64 /// </remarks>
65 private int m_requestTimeoutSecs = -1; 65 private int m_requestTimeoutSecs = -1;
66 private string m_configName = "InventoryService"; 66 private string m_configName = "InventoryService";
67 67
68 private const double CACHE_EXPIRATION_SECONDS = 20.0; 68 private const double CACHE_EXPIRATION_SECONDS = 20.0;
69 private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>(); 69 private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>();
@@ -80,7 +80,7 @@ namespace OpenSim.Services.Connectors
80 public XInventoryServicesConnector(IConfigSource source, string configName) 80 public XInventoryServicesConnector(IConfigSource source, string configName)
81 : base(source, configName) 81 : base(source, configName)
82 { 82 {
83 m_configName = configName; 83 m_configName = configName;
84 Initialise(source); 84 Initialise(source);
85 } 85 }
86 86
@@ -114,13 +114,13 @@ namespace OpenSim.Services.Connectors
114 114
115 StatsManager.RegisterStat( 115 StatsManager.RegisterStat(
116 new Stat( 116 new Stat(
117 "RequestsMade", 117 "RequestsMade",
118 "Requests made", 118 "Requests made",
119 "Number of requests made to the remove inventory service", 119 "Number of requests made to the remove inventory service",
120 "requests", 120 "requests",
121 "inventory", 121 "inventory",
122 serviceURI, 122 serviceURI,
123 StatType.Pull, 123 StatType.Pull,
124 MeasuresOfInterest.AverageChangeOverTime, 124 MeasuresOfInterest.AverageChangeOverTime,
125 s => s.Value = RequestsMade, 125 s => s.Value = RequestsMade,
126 StatVerbosity.Debug)); 126 StatVerbosity.Debug));
@@ -251,7 +251,7 @@ namespace OpenSim.Services.Connectors
251 251
252 return inventory; 252 return inventory;
253 } 253 }
254 254
255 public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs) 255 public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
256 { 256 {
257 InventoryCollection[] inventoryArr = new InventoryCollection[folderIDs.Length]; 257 InventoryCollection[] inventoryArr = new InventoryCollection[folderIDs.Length];
@@ -674,7 +674,7 @@ namespace OpenSim.Services.Connectors
674 { "ASSET", assetID.ToString() } 674 { "ASSET", assetID.ToString() }
675 }); 675 });
676 676
677 // We cannot use CheckReturn() here because valid values for RESULT are "false" (in the case of request failure) or an int 677 // We cannot use CheckReturn() here because valid values for RESULT are "false" (in the case of request failure) or an int
678 if (ret == null) 678 if (ret == null)
679 return 0; 679 return 0;
680 680
@@ -719,7 +719,7 @@ namespace OpenSim.Services.Connectors
719 reply = SynchronousRestFormsRequester.MakeRequest( 719 reply = SynchronousRestFormsRequester.MakeRequest(
720 "POST", m_ServerURI + "/xinventory", 720 "POST", m_ServerURI + "/xinventory",
721 ServerUtils.BuildQueryString(sendData), m_requestTimeoutSecs, m_Auth); 721 ServerUtils.BuildQueryString(sendData), m_requestTimeoutSecs, m_Auth);
722 722
723 if (reply != String.Empty) 723 if (reply != String.Empty)
724 break; 724 break;
725 725
diff --git a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
index 5e9331e..047880a 100644
--- a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
@@ -122,12 +122,12 @@ namespace OpenSim.Services.Connectors
122 catch (Exception e) 122 catch (Exception e)
123 { 123 {
124 m_log.ErrorFormat( 124 m_log.ErrorFormat(
125 "[LAND CONNECTOR]: Got exception while parsing land-data: {0} {1}", 125 "[LAND CONNECTOR]: Got exception while parsing land-data: {0} {1}",
126 e.Message, e.StackTrace); 126 e.Message, e.StackTrace);
127 } 127 }
128 } 128 }
129 } 129 }
130 else 130 else
131 m_log.WarnFormat("[LAND CONNECTOR]: Couldn't find region with handle {0}", regionHandle); 131 m_log.WarnFormat("[LAND CONNECTOR]: Couldn't find region with handle {0}", regionHandle);
132 } 132 }
133 catch (Exception e) 133 catch (Exception e)
@@ -135,7 +135,7 @@ namespace OpenSim.Services.Connectors
135 m_log.ErrorFormat( 135 m_log.ErrorFormat(
136 "[LAND CONNECTOR]: Couldn't contact region {0}: {1} {2}", regionHandle, e.Message, e.StackTrace); 136 "[LAND CONNECTOR]: Couldn't contact region {0}: {1} {2}", regionHandle, e.Message, e.StackTrace);
137 } 137 }
138 138
139 return landData; 139 return landData;
140 } 140 }
141 } 141 }
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs
index 1f14b32..89d64ca 100644
--- a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Services.Connectors
107 { 107 {
108 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 108 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
109 uri, 109 uri,
110 reqString, 110 reqString,
111 m_Auth); 111 m_Auth);
112 if (reply != string.Empty) 112 if (reply != string.Empty)
113 { 113 {
@@ -315,8 +315,8 @@ namespace OpenSim.Services.Connectors
315 } 315 }
316 else 316 else
317 { 317 {
318 if (replyData["result"].ToString() == "null") 318 if (replyData["result"].ToString() == "null")
319 return null; 319 return null;
320 320
321 m_log.DebugFormat("[PRESENCE CONNECTOR]: Invalid reply (result not dictionary) received from presence server when querying for sessionID {0}", sessionID.ToString()); 321 m_log.DebugFormat("[PRESENCE CONNECTOR]: Invalid reply (result not dictionary) received from presence server when querying for sessionID {0}", sessionID.ToString());
322 } 322 }
@@ -366,7 +366,7 @@ namespace OpenSim.Services.Connectors
366 366
367 if (replyData != null) 367 if (replyData != null)
368 { 368 {
369 if (replyData.ContainsKey("result") && 369 if (replyData.ContainsKey("result") &&
370 (replyData["result"].ToString() == "null" || replyData["result"].ToString() == "Failure")) 370 (replyData["result"].ToString() == "null" || replyData["result"].ToString() == "Failure"))
371 { 371 {
372 return new PresenceInfo[0]; 372 return new PresenceInfo[0];
diff --git a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
index 3c5ca7d..76d26d6 100644
--- a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.Connectors")] 8[assembly: AssemblyTitle("OpenSim.Services.Connectors")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 531939f..121e863 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
77 public string Name { get { return "SimianAssetServiceConnector"; } } 77 public string Name { get { return "SimianAssetServiceConnector"; } }
78 public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } } 78 public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } }
79 public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } } 79 public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } }
80 80
81 #endregion ISharedRegionModule 81 #endregion ISharedRegionModule
82 82
83 public SimianAssetServiceConnector(IConfigSource source) 83 public SimianAssetServiceConnector(IConfigSource source)
@@ -143,7 +143,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
143 143
144 return SimianGetOperation(id); 144 return SimianGetOperation(id);
145 } 145 }
146 146
147 147
148 public AssetBase GetCached(string id) 148 public AssetBase GetCached(string id)
149 { 149 {
@@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
177 // return GetRemoteMetadata(id); 177 // return GetRemoteMetadata(id);
178 return SimianGetMetadataOperation(id); 178 return SimianGetMetadataOperation(id);
179 } 179 }
180 180
181 public byte[] GetData(string id) 181 public byte[] GetData(string id)
182 { 182 {
183 if (String.IsNullOrEmpty(m_serverUrl)) 183 if (String.IsNullOrEmpty(m_serverUrl))
@@ -296,7 +296,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
296 296
297 return SimianStoreOperation(asset); 297 return SimianStoreOperation(asset);
298 } 298 }
299 299
300 /// <summary> 300 /// <summary>
301 /// Update an asset's content 301 /// Update an asset's content
302 /// </summary> 302 /// </summary>
@@ -344,7 +344,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
344 344
345 return SimianDeleteOperation(id); 345 return SimianDeleteOperation(id);
346 } 346 }
347 347
348#endregion IAssetService 348#endregion IAssetService
349 349
350#region SimianOperations 350#region SimianOperations
@@ -369,9 +369,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
369 m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: failed to delete asset; {0}",response["Message"].AsString()); 369 m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: failed to delete asset; {0}",response["Message"].AsString());
370 return false; 370 return false;
371 } 371 }
372 372
373 return true; 373 return true;
374 374
375 } 375 }
376 catch (Exception ex) 376 catch (Exception ex)
377 { 377 {
@@ -400,7 +400,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
400 { "Temporary", asset.Temporary ? "1" : "0" }, 400 { "Temporary", asset.Temporary ? "1" : "0" },
401 { "Name", asset.Name } 401 { "Name", asset.Name }
402 }; 402 };
403 403
404 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); 404 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs);
405 if (! response["Success"].AsBoolean()) 405 if (! response["Success"].AsBoolean())
406 { 406 {
@@ -410,13 +410,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
410 410
411 // asset.ID is always set before calling this function 411 // asset.ID is always set before calling this function
412 return asset.ID; 412 return asset.ID;
413 413
414 } 414 }
415 catch (Exception ex) 415 catch (Exception ex)
416 { 416 {
417 m_log.ErrorFormat("[SIMIAN ASSET CONNECTOR] failed to store asset; {0}",ex.Message); 417 m_log.ErrorFormat("[SIMIAN ASSET CONNECTOR] failed to store asset; {0}",ex.Message);
418 } 418 }
419 419
420 return null; 420 return null;
421 } 421 }
422 422
@@ -427,12 +427,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
427 /// <returns></returns> 427 /// <returns></returns>
428 private AssetBase SimianGetOperation(string id) 428 private AssetBase SimianGetOperation(string id)
429 { 429 {
430 try 430 try
431 { 431 {
432 NameValueCollection requestArgs = new NameValueCollection 432 NameValueCollection requestArgs = new NameValueCollection
433 { 433 {
434 { "RequestMethod", "xGetAsset" }, 434 { "RequestMethod", "xGetAsset" },
435 { "ID", id } 435 { "ID", id }
436 }; 436 };
437 437
438 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); 438 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs);
@@ -441,7 +441,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
441 m_log.WarnFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset; {0}",response["Message"].AsString()); 441 m_log.WarnFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset; {0}",response["Message"].AsString());
442 return null; 442 return null;
443 } 443 }
444 444
445 AssetBase asset = new AssetBase(); 445 AssetBase asset = new AssetBase();
446 446
447 asset.ID = id; 447 asset.ID = id;
@@ -475,7 +475,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
475 NameValueCollection requestArgs = new NameValueCollection 475 NameValueCollection requestArgs = new NameValueCollection
476 { 476 {
477 { "RequestMethod", "xGetAssetMetadata" }, 477 { "RequestMethod", "xGetAssetMetadata" },
478 { "ID", id } 478 { "ID", id }
479 }; 479 };
480 480
481 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); 481 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs);
@@ -485,7 +485,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
485 // m_log.DebugFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset metadata; {0}",response["Message"].AsString()); 485 // m_log.DebugFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset metadata; {0}",response["Message"].AsString());
486 return null; 486 return null;
487 } 487 }
488 488
489 AssetMetadata metadata = new AssetMetadata(); 489 AssetMetadata metadata = new AssetMetadata();
490 metadata.ID = id; 490 metadata.ID = id;
491 metadata.ContentType = response["ContentType"].AsString(); 491 metadata.ContentType = response["ContentType"].AsString();
@@ -620,7 +620,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
620 // } 620 // }
621 621
622 // string errorMessage = null; 622 // string errorMessage = null;
623 623
624 // // Build the remote storage request 624 // // Build the remote storage request
625 // List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>() 625 // List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>()
626 // { 626 // {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
index a52dd6c..34bb274 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
146 userID,response["Message"].AsString()); 146 userID,response["Message"].AsString());
147 return null; 147 return null;
148 } 148 }
149 149
150 // <summary> 150 // <summary>
151 // </summary> 151 // </summary>
152 // <param name=""></param> 152 // <param name=""></param>
@@ -178,7 +178,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
178 178
179 return success; 179 return success;
180 } 180 }
181 181
182 // <summary> 182 // <summary>
183 // </summary> 183 // </summary>
184 // <param name=""></param> 184 // <param name=""></param>
@@ -219,7 +219,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
219 appearance.AvatarHeight = (float)map["Height"].AsReal(); 219 appearance.AvatarHeight = (float)map["Height"].AsReal();
220 220
221 AvatarData avatar = new AvatarData(appearance); 221 AvatarData avatar = new AvatarData(appearance);
222 222
223 // Get attachments 223 // Get attachments
224 map = null; 224 map = null;
225 try { map = OSDParser.DeserializeJson(response["LLAttachments"].AsString()) as OSDMap; } 225 try { map = OSDParser.DeserializeJson(response["LLAttachments"].AsString()) as OSDMap; }
@@ -230,7 +230,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
230 foreach (KeyValuePair<string, OSD> kvp in map) 230 foreach (KeyValuePair<string, OSD> kvp in map)
231 avatar.Data[kvp.Key] = kvp.Value.AsString(); 231 avatar.Data[kvp.Key] = kvp.Value.AsString();
232 } 232 }
233 233
234 return avatar; 234 return avatar;
235 } 235 }
236 else 236 else
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs
index 764e71f..49bd9a4 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
55 private bool m_enabled = true; 55 private bool m_enabled = true;
56 private Scene m_scene; 56 private Scene m_scene;
57 private String m_simianURL; 57 private String m_simianURL;
58 58
59#region IRegionModule Members 59#region IRegionModule Members
60 60
61 public string Name 61 public string Name
@@ -65,10 +65,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
65 65
66 public void Initialise(IConfigSource config) 66 public void Initialise(IConfigSource config)
67 { 67 {
68 try 68 try
69 { 69 {
70 IConfig m_config; 70 IConfig m_config;
71 71
72 if ((m_config = config.Configs["SimianExternalCaps"]) != null) 72 if ((m_config = config.Configs["SimianExternalCaps"]) != null)
73 { 73 {
74 m_enabled = m_config.GetBoolean("Enabled", m_enabled); 74 m_enabled = m_config.GetBoolean("Enabled", m_enabled);
@@ -97,10 +97,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
97 public void Close() { } 97 public void Close() { }
98 98
99 public void AddRegion(Scene scene) 99 public void AddRegion(Scene scene)
100 { 100 {
101 if (! m_enabled) 101 if (! m_enabled)
102 return; 102 return;
103 103
104 m_scene = scene; 104 m_scene = scene;
105 m_scene.RegisterModuleInterface<IExternalCapsModule>(this); 105 m_scene.RegisterModuleInterface<IExternalCapsModule>(this);
106 } 106 }
@@ -153,7 +153,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
153 subs["%USR%"] = agentID.ToString(); 153 subs["%USR%"] = agentID.ToString();
154 subs["%CAP%"] = cap.ToString(); 154 subs["%CAP%"] = cap.ToString();
155 subs["%SIM%"] = m_scene.RegionInfo.RegionID.ToString(); 155 subs["%SIM%"] = m_scene.RegionInfo.RegionID.ToString();
156 156
157 caps.RegisterHandler(capName,ExpandSkeletonURL(urlSkel,subs)); 157 caps.RegisterHandler(capName,ExpandSkeletonURL(urlSkel,subs));
158 return true; 158 return true;
159 } 159 }
@@ -168,12 +168,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
168 private String ExpandSkeletonURL(String urlSkel, Dictionary<String,String> subs) 168 private String ExpandSkeletonURL(String urlSkel, Dictionary<String,String> subs)
169 { 169 {
170 String result = urlSkel; 170 String result = urlSkel;
171 171
172 foreach (KeyValuePair<String,String> kvp in subs) 172 foreach (KeyValuePair<String,String> kvp in subs)
173 { 173 {
174 result = result.Replace(kvp.Key,kvp.Value); 174 result = result.Replace(kvp.Key,kvp.Value);
175 } 175 }
176 176
177 return result; 177 return result;
178 } 178 }
179 } 179 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs
index a35d749..b29adb3 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs
@@ -52,20 +52,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
52 private IConfig m_config = null; 52 private IConfig m_config = null;
53 53
54 private String m_simianURL; 54 private String m_simianURL;
55 55
56#region IRegionModule Members 56#region IRegionModule Members
57 57
58 public string Name 58 public string Name
59 { 59 {
60 get { return this.GetType().Name; } 60 get { return this.GetType().Name; }
61 } 61 }
62 62
63 public void Initialise(IConfigSource config) 63 public void Initialise(IConfigSource config)
64 { 64 {
65 try 65 try
66 { 66 {
67 m_config = config.Configs["SimianGrid"]; 67 m_config = config.Configs["SimianGrid"];
68 68
69 if (m_config != null) 69 if (m_config != null)
70 { 70 {
71 m_simianURL = m_config.GetString("SimianServiceURL"); 71 m_simianURL = m_config.GetString("SimianServiceURL");
@@ -74,7 +74,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
74 // m_log.DebugFormat("[SimianGrid] service URL is not defined"); 74 // m_log.DebugFormat("[SimianGrid] service URL is not defined");
75 return; 75 return;
76 } 76 }
77 77
78 InitialiseSimCap(); 78 InitialiseSimCap();
79 SimulatorCapability = SimulatorCapability.Trim(); 79 SimulatorCapability = SimulatorCapability.Trim();
80 m_log.InfoFormat("[SimianExternalCaps] using {0} as simulator capability",SimulatorCapability); 80 m_log.InfoFormat("[SimianExternalCaps] using {0} as simulator capability",SimulatorCapability);
@@ -100,7 +100,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
100 100
101 ///<summary> 101 ///<summary>
102 /// Try a variety of methods for finding the simian simulator capability; first check the 102 /// Try a variety of methods for finding the simian simulator capability; first check the
103 /// configuration itself, then look for a file that contains the cap, then finally look 103 /// configuration itself, then look for a file that contains the cap, then finally look
104 /// for an environment variable that contains it. 104 /// for an environment variable that contains it.
105 ///</summary> 105 ///</summary>
106 private void InitialiseSimCap() 106 private void InitialiseSimCap()
@@ -110,7 +110,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
110 SimulatorCapability = m_config.GetString("SimulatorCapability"); 110 SimulatorCapability = m_config.GetString("SimulatorCapability");
111 return; 111 return;
112 } 112 }
113 113
114 if (m_config.Contains("SimulatorCapabilityFile")) 114 if (m_config.Contains("SimulatorCapabilityFile"))
115 { 115 {
116 String filename = m_config.GetString("SimulatorCapabilityFile"); 116 String filename = m_config.GetString("SimulatorCapabilityFile");
@@ -120,7 +120,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
120 return; 120 return;
121 } 121 }
122 } 122 }
123 123
124 if (m_config.Contains("SimulatorCapabilityVariable")) 124 if (m_config.Contains("SimulatorCapabilityVariable"))
125 { 125 {
126 String envname = m_config.GetString("SimulatorCapabilityVariable"); 126 String envname = m_config.GetString("SimulatorCapabilityVariable");
@@ -134,7 +134,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
134 134
135 m_log.WarnFormat("[SimianExternalCaps] no method specified for simulator capability"); 135 m_log.WarnFormat("[SimianExternalCaps] no method specified for simulator capability");
136 } 136 }
137 137
138#endregion 138#endregion
139 139
140 public static String SimulatorCapability = UUID.Zero.ToString(); 140 public static String SimulatorCapability = UUID.Zero.ToString();
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
index 8375c95..4896d09 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
@@ -65,14 +65,14 @@ namespace OpenSim.Services.Connectors.SimianGrid
65 private int m_refreshtime = 0; 65 private int m_refreshtime = 0;
66 private int m_lastrefresh = 0; 66 private int m_lastrefresh = 0;
67 private System.Timers.Timer m_refreshTimer = new System.Timers.Timer(); 67 private System.Timers.Timer m_refreshTimer = new System.Timers.Timer();
68 68
69 #region ISharedRegionModule 69 #region ISharedRegionModule
70 70
71 public Type ReplaceableInterface { get { return null; } } 71 public Type ReplaceableInterface { get { return null; } }
72 public string Name { get { return "SimianGridMaptile"; } } 72 public string Name { get { return "SimianGridMaptile"; } }
73 public void RegionLoaded(Scene scene) { } 73 public void RegionLoaded(Scene scene) { }
74 public void Close() { } 74 public void Close() { }
75 75
76 ///<summary> 76 ///<summary>
77 /// 77 ///
78 ///</summary> 78 ///</summary>
@@ -81,7 +81,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
81 IConfig config = source.Configs["SimianGridMaptiles"]; 81 IConfig config = source.Configs["SimianGridMaptiles"];
82 if (config == null) 82 if (config == null)
83 return; 83 return;
84 84
85 if (! config.GetBoolean("Enabled", false)) 85 if (! config.GetBoolean("Enabled", false))
86 return; 86 return;
87 87
@@ -218,7 +218,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
218 { 218 {
219 uint locX = scene.RegionInfo.RegionLocX + (xx / Constants.RegionSize); 219 uint locX = scene.RegionInfo.RegionLocX + (xx / Constants.RegionSize);
220 uint locY = scene.RegionInfo.RegionLocY + (yy / Constants.RegionSize); 220 uint locY = scene.RegionInfo.RegionLocY + (yy / Constants.RegionSize);
221 221
222 ConvertAndUploadMaptile(subMapTile, locX, locY); 222 ConvertAndUploadMaptile(subMapTile, locX, locY);
223 } 223 }
224 } 224 }
@@ -232,7 +232,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
232 } 232 }
233 233
234 } 234 }
235 235
236 ///<summary> 236 ///<summary>
237 /// 237 ///
238 ///</summary> 238 ///</summary>
@@ -255,7 +255,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
255 { "ContentType", "image/png" }, 255 { "ContentType", "image/png" },
256 { "EncodedData", System.Convert.ToBase64String(pngData) } 256 { "EncodedData", System.Convert.ToBase64String(pngData) }
257 }; 257 };
258 258
259 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); 259 OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs);
260 if (! response["Success"].AsBoolean()) 260 if (! response["Success"].AsBoolean())
261 { 261 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index bd35c6f..f8eebbe 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
91 m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService"); 91 m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService");
92 throw new Exception("Grid connector init error"); 92 throw new Exception("Grid connector init error");
93 } 93 }
94 94
95 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) 95 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
96 serviceUrl = serviceUrl + '/'; 96 serviceUrl = serviceUrl + '/';
97 m_ServerURI = serviceUrl; 97 m_ServerURI = serviceUrl;
@@ -230,7 +230,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
230 }; 230 };
231 231
232 // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString()); 232 // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString());
233 233
234 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs); 234 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs);
235 if (response["Success"].AsBoolean()) 235 if (response["Success"].AsBoolean())
236 { 236 {
@@ -308,7 +308,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
308 }; 308 };
309 309
310 //m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString()); 310 //m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString());
311 311
312 312
313 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs); 313 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs);
314 if (response["Success"].AsBoolean()) 314 if (response["Success"].AsBoolean())
@@ -413,7 +413,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
413 return -1; 413 return -1;
414 } 414 }
415 } 415 }
416 416
417 public Dictionary<string, object> GetExtraFeatures() 417 public Dictionary<string, object> GetExtraFeatures()
418 { 418 {
419 /// See SimulatorFeaturesModule - Need to get map, search and destination guide 419 /// See SimulatorFeaturesModule - Need to get map, search and destination guide
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 3d35834..9eefd16 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -535,7 +535,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
535 allSuccess = false; 535 allSuccess = false;
536 } 536 }
537 } 537 }
538 538
539 return allSuccess; 539 return allSuccess;
540 } 540 }
541 541
@@ -727,11 +727,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
727 727
728 /// <summary> 728 /// <summary>
729 /// Get the union of permissions of all inventory items 729 /// Get the union of permissions of all inventory items
730 /// that hold the given assetID. 730 /// that hold the given assetID.
731 /// </summary> 731 /// </summary>
732 /// <param name="userID"></param> 732 /// <param name="userID"></param>
733 /// <param name="assetID"></param> 733 /// <param name="assetID"></param>
734 /// <returns>The permissions or 0 if no such asset is found in 734 /// <returns>The permissions or 0 if no such asset is found in
735 /// the user's inventory</returns> 735 /// the user's inventory</returns>
736 public int GetAssetPermissions(UUID userID, UUID assetID) 736 public int GetAssetPermissions(UUID userID, UUID assetID)
737 { 737 {
@@ -787,7 +787,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
787 if (item != null && item["Type"].AsString() == "Item") 787 if (item != null && item["Type"].AsString() == "Item")
788 { 788 {
789 InventoryItemBase invItem = new InventoryItemBase(); 789 InventoryItemBase invItem = new InventoryItemBase();
790 790
791 invItem.AssetID = item["AssetID"].AsUUID(); 791 invItem.AssetID = item["AssetID"].AsUUID();
792 invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString()); 792 invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString());
793 invItem.CreationDate = item["CreationDate"].AsInteger(); 793 invItem.CreationDate = item["CreationDate"].AsInteger();
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index 211b775..08efefb 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
121 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) 121 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
122 serviceUrl = serviceUrl + '/'; 122 serviceUrl = serviceUrl + '/';
123 m_serverUrl = serviceUrl; 123 m_serverUrl = serviceUrl;
124 m_activityDetector = new SimianActivityDetector(this); 124 m_activityDetector = new SimianActivityDetector(this);
125 m_Enabled = true; 125 m_Enabled = true;
126 } 126 }
127 } 127 }
@@ -210,7 +210,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
210 m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session {0}: {1}",sessionID.ToString(),sessionResponse["Message"].AsString()); 210 m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session {0}: {1}",sessionID.ToString(),sessionResponse["Message"].AsString());
211 return null; 211 return null;
212 } 212 }
213 213
214 UUID userID = sessionResponse["UserID"].AsUUID(); 214 UUID userID = sessionResponse["UserID"].AsUUID();
215 OSDMap userResponse = GetUserData(userID); 215 OSDMap userResponse = GetUserData(userID);
216 if (userResponse == null) 216 if (userResponse == null)
@@ -238,7 +238,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
238 m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve sessions: {0}",sessionListResponse["Message"].AsString()); 238 m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve sessions: {0}",sessionListResponse["Message"].AsString());
239 return null; 239 return null;
240 } 240 }
241 241
242 OSDArray sessionList = sessionListResponse["Sessions"] as OSDArray; 242 OSDArray sessionList = sessionListResponse["Sessions"] as OSDArray;
243 for (int i = 0; i < sessionList.Count; i++) 243 for (int i = 0; i < sessionList.Count; i++)
244 { 244 {
@@ -311,7 +311,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
311 311
312 public GridUserInfo GetGridUserInfo(string user) 312 public GridUserInfo GetGridUserInfo(string user)
313 { 313 {
314 // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); 314 // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user);
315 315
316 UUID userID = new UUID(user); 316 UUID userID = new UUID(user);
317 OSDMap userResponse = GetUserData(userID); 317 OSDMap userResponse = GetUserData(userID);
@@ -421,7 +421,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
421 421
422 return null; 422 return null;
423 } 423 }
424 424
425 private string SerializeLocation(UUID regionID, Vector3 position, Vector3 lookAt) 425 private string SerializeLocation(UUID regionID, Vector3 position, Vector3 lookAt)
426 { 426 {
427 return "{" + String.Format("\"SceneID\":\"{0}\",\"Position\":\"{1}\",\"LookAt\":\"{2}\"", regionID, position, lookAt) + "}"; 427 return "{" + String.Format("\"SceneID\":\"{0}\",\"Position\":\"{1}\",\"LookAt\":\"{2}\"", regionID, position, lookAt) + "}";
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
index 17f4fc6..a388bcc 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
70 private bool m_Enabled = false; 70 private bool m_Enabled = false;
71 71
72 #region INonSharedRegionModule 72 #region INonSharedRegionModule
73 73
74 public Type ReplaceableInterface { get { return null; } } 74 public Type ReplaceableInterface { get { return null; } }
75 public void RegionLoaded(Scene scene) { } 75 public void RegionLoaded(Scene scene) { }
76 public void Close() { } 76 public void Close() { }
@@ -284,7 +284,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
284 private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID) 284 private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID)
285 { 285 {
286 m_log.DebugFormat("[SIMIAN PROFILES]: Request avatar properties for {0}",avatarID); 286 m_log.DebugFormat("[SIMIAN PROFILES]: Request avatar properties for {0}",avatarID);
287 287
288 OSDMap user = FetchUserData(avatarID); 288 OSDMap user = FetchUserData(avatarID);
289 289
290 ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish; 290 ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish;
@@ -455,7 +455,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
455 private OSDMap FetchUserData(UUID userID) 455 private OSDMap FetchUserData(UUID userID)
456 { 456 {
457 m_log.DebugFormat("[SIMIAN PROFILES]: Fetch information about {0}",userID); 457 m_log.DebugFormat("[SIMIAN PROFILES]: Fetch information about {0}",userID);
458 458
459 NameValueCollection requestArgs = new NameValueCollection 459 NameValueCollection requestArgs = new NameValueCollection
460 { 460 {
461 { "RequestMethod", "GetUser" }, 461 { "RequestMethod", "GetUser" },
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index 6f613c1..115ae36 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -42,7 +42,7 @@ using OpenMetaverse.StructuredData;
42namespace OpenSim.Services.Connectors.SimianGrid 42namespace OpenSim.Services.Connectors.SimianGrid
43{ 43{
44 /// <summary> 44 /// <summary>
45 /// Connects user account data (creating new users, looking up existing 45 /// Connects user account data (creating new users, looking up existing
46 /// users) to the SimianGrid backend 46 /// users) to the SimianGrid backend
47 /// </summary> 47 /// </summary>
48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianUserAccountServiceConnector")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianUserAccountServiceConnector")]
@@ -220,7 +220,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
220 }; 220 };
221 221
222 OSDMap response = SimianGrid.PostToService(m_serverUrl, requestArgs); 222 OSDMap response = SimianGrid.PostToService(m_serverUrl, requestArgs);
223 223
224 if (response["Success"].AsBoolean()) 224 if (response["Success"].AsBoolean())
225 { 225 {
226 m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account data for " + data.Name); 226 m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account data for " + data.Name);
@@ -305,7 +305,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
305 account.LocalToGrid = true; 305 account.LocalToGrid = true;
306 if (response.ContainsKey("LocalToGrid")) 306 if (response.ContainsKey("LocalToGrid"))
307 account.LocalToGrid = (response["LocalToGrid"].AsString() == "true" ? true : false); 307 account.LocalToGrid = (response["LocalToGrid"].AsString() == "true" ? true : false);
308 308
309 GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); 309 GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
310 310
311 // Cache the user account info 311 // Cache the user account info
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 8e1bf37..9f4d89a 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Services.Connectors.Simulation
50 50
51 // we use this dictionary to track the pending updateagent requests, maps URI --> position update 51 // we use this dictionary to track the pending updateagent requests, maps URI --> position update
52 private Dictionary<string,AgentPosition> m_updateAgentQueue = new Dictionary<string,AgentPosition>(); 52 private Dictionary<string,AgentPosition> m_updateAgentQueue = new Dictionary<string,AgentPosition>();
53 53
54 //private GridRegion m_Region; 54 //private GridRegion m_Region;
55 55
56 public SimulationServiceConnector() 56 public SimulationServiceConnector()
@@ -119,7 +119,7 @@ namespace OpenSim.Services.Connectors.Simulation
119 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); 119 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI);
120 120
121 string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; 121 string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
122 122
123 try 123 try
124 { 124 {
125 OSDMap args = aCircuit.PackAgentCircuitData(ctx); 125 OSDMap args = aCircuit.PackAgentCircuitData(ctx);
@@ -137,7 +137,7 @@ namespace OpenSim.Services.Connectors.Simulation
137 myipaddress = data["your_ip"].AsString(); 137 myipaddress = data["your_ip"].AsString();
138 return success; 138 return success;
139 } 139 }
140 140
141 // Try the old version, uncompressed 141 // Try the old version, uncompressed
142 result = WebUtil.PostToService(uri, args, 30000, false); 142 result = WebUtil.PostToService(uri, args, 30000, false);
143 143
@@ -155,10 +155,10 @@ namespace OpenSim.Services.Connectors.Simulation
155 return success; 155 return success;
156 } 156 }
157 } 157 }
158 158
159 m_log.WarnFormat( 159 m_log.WarnFormat(
160 "[REMOTE SIMULATION CONNECTOR]: Failed to create agent {0} {1} at remote simulator {2}", 160 "[REMOTE SIMULATION CONNECTOR]: Failed to create agent {0} {1} at remote simulator {2}",
161 aCircuit.firstname, aCircuit.lastname, destination.RegionName); 161 aCircuit.firstname, aCircuit.lastname, destination.RegionName);
162 reason = result["Message"] != null ? result["Message"].AsString() : "error"; 162 reason = result["Message"] != null ? result["Message"].AsString() : "error";
163 return false; 163 return false;
164 } 164 }
@@ -202,8 +202,8 @@ namespace OpenSim.Services.Connectors.Simulation
202 { 202 {
203 if (m_updateAgentQueue.ContainsKey(uri)) 203 if (m_updateAgentQueue.ContainsKey(uri))
204 { 204 {
205 // Another thread is already handling 205 // Another thread is already handling
206 // updates for this simulator, just update 206 // updates for this simulator, just update
207 // the position and return, overwrites are 207 // the position and return, overwrites are
208 // not a problem since we only care about the 208 // not a problem since we only care about the
209 // last update anyway 209 // last update anyway
@@ -304,7 +304,7 @@ namespace OpenSim.Services.Connectors.Simulation
304 OSDMap request = new OSDMap(); 304 OSDMap request = new OSDMap();
305 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); 305 request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
306 request.Add("position", OSD.FromString(position.ToString())); 306 request.Add("position", OSD.FromString(position.ToString()));
307 // To those who still understad this field, we're telling them 307 // To those who still understad this field, we're telling them
308 // the lowest version just to be safe 308 // the lowest version just to be safe
309 request.Add("my_version", OSD.FromString(String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersionSupportedMin))); 309 request.Add("my_version", OSD.FromString(String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersionSupportedMin)));
310 // New simulation service negotiation 310 // New simulation service negotiation
@@ -374,7 +374,7 @@ namespace OpenSim.Services.Connectors.Simulation
374 m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored"); 374 m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored");
375 return true; 375 return true;
376 } 376 }
377 377
378 reason = result["Message"]; 378 reason = result["Message"];
379 } 379 }
380 else 380 else
@@ -410,7 +410,7 @@ namespace OpenSim.Services.Connectors.Simulation
410 { 410 {
411 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] QueryAcesss failed with exception; {0}",e.ToString()); 411 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] QueryAcesss failed with exception; {0}",e.ToString());
412 } 412 }
413 413
414 return false; 414 return false;
415 } 415 }
416 416
@@ -428,7 +428,7 @@ namespace OpenSim.Services.Connectors.Simulation
428 { 428 {
429 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] ReleaseAgent failed with exception; {0}",e.ToString()); 429 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] ReleaseAgent failed with exception; {0}",e.ToString());
430 } 430 }
431 431
432 return true; 432 return true;
433 } 433 }
434 434
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs
index 5bc7a1c..68ae7bb 100644
--- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs
+++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs
@@ -198,7 +198,7 @@ namespace OpenSim.Services.Connectors
198 accs = doGetMultiUserAccounts(scopeID, IDs, out multisuported); 198 accs = doGetMultiUserAccounts(scopeID, IDs, out multisuported);
199 if(multisuported) 199 if(multisuported)
200 return accs; 200 return accs;
201 201
202 // service does not do multi accounts so need to do it one by one 202 // service does not do multi accounts so need to do it one by one
203 203
204 UUID uuid = UUID.Zero; 204 UUID uuid = UUID.Zero;
@@ -344,7 +344,7 @@ namespace OpenSim.Services.Connectors
344 344
345 return SendAndGetReply(sendData); 345 return SendAndGetReply(sendData);
346 } 346 }
347 347
348 private UserAccount SendAndGetReply(Dictionary<string, object> sendData) 348 private UserAccount SendAndGetReply(Dictionary<string, object> sendData)
349 { 349 {
350 string reply = string.Empty; 350 string reply = string.Empty;
diff --git a/OpenSim/Services/EstateService/EstateDataService.cs b/OpenSim/Services/EstateService/EstateDataService.cs
index f6a8654..f051ffb 100644
--- a/OpenSim/Services/EstateService/EstateDataService.cs
+++ b/OpenSim/Services/EstateService/EstateDataService.cs
@@ -92,11 +92,11 @@ namespace OpenSim.Services.EstateService
92 { 92 {
93 return m_database.CreateNewEstate(); 93 return m_database.CreateNewEstate();
94 } 94 }
95 95
96 public List<EstateSettings> LoadEstateSettingsAll() 96 public List<EstateSettings> LoadEstateSettingsAll()
97 { 97 {
98 return m_database.LoadEstateSettingsAll(); 98 return m_database.LoadEstateSettingsAll();
99 } 99 }
100 100
101 public void StoreEstateSettings(EstateSettings es) 101 public void StoreEstateSettings(EstateSettings es)
102 { 102 {
@@ -107,7 +107,7 @@ namespace OpenSim.Services.EstateService
107 { 107 {
108 return m_database.GetEstates(search); 108 return m_database.GetEstates(search);
109 } 109 }
110 110
111 public List<int> GetEstatesAll() 111 public List<int> GetEstatesAll()
112 { 112 {
113 return m_database.GetEstatesAll(); 113 return m_database.GetEstatesAll();
diff --git a/OpenSim/Services/FSAssetService/FSAssetService.cs b/OpenSim/Services/FSAssetService/FSAssetService.cs
index cddd288..ca2f459 100644
--- a/OpenSim/Services/FSAssetService/FSAssetService.cs
+++ b/OpenSim/Services/FSAssetService/FSAssetService.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Services.FSAssetService
115 } 115 }
116 116
117 IConfig assetConfig = config.Configs[configName]; 117 IConfig assetConfig = config.Configs[configName];
118 118
119 if (assetConfig == null) 119 if (assetConfig == null)
120 throw new Exception("No AssetService configuration"); 120 throw new Exception("No AssetService configuration");
121 121
@@ -128,12 +128,12 @@ namespace OpenSim.Services.FSAssetService
128 128
129 // If not found above, fallback to Database defaults 129 // If not found above, fallback to Database defaults
130 IConfig dbConfig = config.Configs["DatabaseService"]; 130 IConfig dbConfig = config.Configs["DatabaseService"];
131 131
132 if (dbConfig != null) 132 if (dbConfig != null)
133 { 133 {
134 if (dllName == String.Empty) 134 if (dllName == String.Empty)
135 dllName = dbConfig.GetString("StorageProvider", String.Empty); 135 dllName = dbConfig.GetString("StorageProvider", String.Empty);
136 136
137 if (connectionString == String.Empty) 137 if (connectionString == String.Empty)
138 connectionString = dbConfig.GetString("ConnectionString", String.Empty); 138 connectionString = dbConfig.GetString("ConnectionString", String.Empty);
139 } 139 }
@@ -156,7 +156,7 @@ namespace OpenSim.Services.FSAssetService
156 156
157 // Setup Fallback Service 157 // Setup Fallback Service
158 string str = assetConfig.GetString("FallbackService", string.Empty); 158 string str = assetConfig.GetString("FallbackService", string.Empty);
159 159
160 if (str != string.Empty) 160 if (str != string.Empty)
161 { 161 {
162 object[] args = new object[] { config }; 162 object[] args = new object[] { config };
@@ -204,7 +204,7 @@ namespace OpenSim.Services.FSAssetService
204 Store(a, false); 204 Store(a, false);
205 }); 205 });
206 } 206 }
207 207
208 m_WriterThread = new Thread(Writer); 208 m_WriterThread = new Thread(Writer);
209 m_WriterThread.Start(); 209 m_WriterThread.Start();
210 210
@@ -214,7 +214,7 @@ namespace OpenSim.Services.FSAssetService
214 m_StatsThread.Start(); 214 m_StatsThread.Start();
215 } 215 }
216 } 216 }
217 217
218 m_log.Info("[FSASSETS]: FS asset service enabled"); 218 m_log.Info("[FSASSETS]: FS asset service enabled");
219 } 219 }
220 220
@@ -223,7 +223,7 @@ namespace OpenSim.Services.FSAssetService
223 while (true) 223 while (true)
224 { 224 {
225 Thread.Sleep(60000); 225 Thread.Sleep(60000);
226 226
227 lock (m_statsLock) 227 lock (m_statsLock)
228 { 228 {
229 if (m_readCount > 0) 229 if (m_readCount > 0)
@@ -723,7 +723,7 @@ namespace OpenSim.Services.FSAssetService
723 AssetBase asset = Get(args[2], out hash); 723 AssetBase asset = Get(args[2], out hash);
724 724
725 if (asset == null || asset.Data.Length == 0) 725 if (asset == null || asset.Data.Length == 0)
726 { 726 {
727 MainConsole.Instance.Output("Asset not found"); 727 MainConsole.Instance.Output("Asset not found");
728 return; 728 return;
729 } 729 }
@@ -765,7 +765,7 @@ namespace OpenSim.Services.FSAssetService
765 AssetBase asset = Get(args[2]); 765 AssetBase asset = Get(args[2]);
766 766
767 if (asset == null || asset.Data.Length == 0) 767 if (asset == null || asset.Data.Length == 0)
768 { 768 {
769 MainConsole.Instance.Output("Asset not found"); 769 MainConsole.Instance.Output("Asset not found");
770 return; 770 return;
771 } 771 }
diff --git a/OpenSim/Services/FreeswitchService/FreeswitchService.cs b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
index 201e72f..970d682 100644
--- a/OpenSim/Services/FreeswitchService/FreeswitchService.cs
+++ b/OpenSim/Services/FreeswitchService/FreeswitchService.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Services.FreeswitchService
74 response["str_response_string"] = String.Format(@"<?xml version=""1.0"" encoding=""utf-8""?> 74 response["str_response_string"] = String.Format(@"<?xml version=""1.0"" encoding=""utf-8""?>
75 <document type=""freeswitch/xml""> 75 <document type=""freeswitch/xml"">
76 <section name=""dialplan""> 76 <section name=""dialplan"">
77 <context name=""{0}"">" + 77 <context name=""{0}"">" +
78 78
79/* <!-- dial via SIP uri --> 79/* <!-- dial via SIP uri -->
80 <extension name=""sip_uri""> 80 <extension name=""sip_uri"">
@@ -116,21 +116,21 @@ namespace OpenSim.Services.FreeswitchService
116 { 116 {
117 Hashtable response = new Hashtable(); 117 Hashtable response = new Hashtable();
118 string domain = (string) request["domain"]; 118 string domain = (string) request["domain"];
119 if (domain != m_freeSwitchRealm) 119 if (domain != m_freeSwitchRealm)
120 { 120 {
121 response["content_type"] = "text/xml"; 121 response["content_type"] = "text/xml";
122 response["keepalive"] = false; 122 response["keepalive"] = false;
123 response["int_response_code"] = 200; 123 response["int_response_code"] = 200;
124 response["str_response_string"] = ""; 124 response["str_response_string"] = "";
125 } 125 }
126 else 126 else
127 { 127 {
128// m_log.DebugFormat("[FreeSwitchDirectory]: HandleDirectoryRequest called with {0}",request.ToString()); 128// m_log.DebugFormat("[FreeSwitchDirectory]: HandleDirectoryRequest called with {0}",request.ToString());
129 129
130 // information in the request we might be interested in 130 // information in the request we might be interested in
131 131
132 // Request 1 sip_auth for users account 132 // Request 1 sip_auth for users account
133 133
134 //Event-Calling-Function=sofia_reg_parse_auth 134 //Event-Calling-Function=sofia_reg_parse_auth
135 //Event-Calling-Line-Number=1494 135 //Event-Calling-Line-Number=1494
136 //action=sip_auth 136 //action=sip_auth
@@ -145,10 +145,10 @@ namespace OpenSim.Services.FreeswitchService
145 //user=xhZuXKmRpECyr2AARJYyGgg%3D%3D 145 //user=xhZuXKmRpECyr2AARJYyGgg%3D%3D
146 //domain=9.20.151.43 146 //domain=9.20.151.43
147 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup 147 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup
148 148
149// foreach (DictionaryEntry item in request) 149// foreach (DictionaryEntry item in request)
150// m_log.DebugFormat("[FreeSwitchDirectory]: requestBody item {0} {1}", item.Key, item.Value); 150// m_log.DebugFormat("[FreeSwitchDirectory]: requestBody item {0} {1}", item.Key, item.Value);
151 151
152 string eventCallingFunction = (string) request["Event-Calling-Function"]; 152 string eventCallingFunction = (string) request["Event-Calling-Function"];
153 if (eventCallingFunction == null) 153 if (eventCallingFunction == null)
154 { 154 {
@@ -159,15 +159,15 @@ namespace OpenSim.Services.FreeswitchService
159 { 159 {
160 eventCallingFunction = "sofia_reg_parse_auth"; 160 eventCallingFunction = "sofia_reg_parse_auth";
161 } 161 }
162 162
163 if (eventCallingFunction == "sofia_reg_parse_auth") 163 if (eventCallingFunction == "sofia_reg_parse_auth")
164 { 164 {
165 string sipAuthMethod = (string)request["sip_auth_method"]; 165 string sipAuthMethod = (string)request["sip_auth_method"];
166 166
167 if (sipAuthMethod == "REGISTER") 167 if (sipAuthMethod == "REGISTER")
168 { 168 {
169 response = HandleRegister(m_freeSwitchContext, m_freeSwitchRealm, request); 169 response = HandleRegister(m_freeSwitchContext, m_freeSwitchRealm, request);
170 } 170 }
171 else if (sipAuthMethod == "INVITE") 171 else if (sipAuthMethod == "INVITE")
172 { 172 {
173 response = HandleInvite(m_freeSwitchContext, m_freeSwitchRealm, request); 173 response = HandleInvite(m_freeSwitchContext, m_freeSwitchRealm, request);
@@ -215,16 +215,16 @@ namespace OpenSim.Services.FreeswitchService
215 } 215 }
216 return response; 216 return response;
217 } 217 }
218 218
219 private Hashtable HandleRegister(string Context, string Realm, Hashtable request) 219 private Hashtable HandleRegister(string Context, string Realm, Hashtable request)
220 { 220 {
221 m_log.Info("[FreeSwitchDirectory]: HandleRegister called"); 221 m_log.Info("[FreeSwitchDirectory]: HandleRegister called");
222 222
223 // TODO the password we return needs to match that sent in the request, this is hard coded for now 223 // TODO the password we return needs to match that sent in the request, this is hard coded for now
224 string password = "1234"; 224 string password = "1234";
225 string domain = (string) request["domain"]; 225 string domain = (string) request["domain"];
226 string user = (string) request["user"]; 226 string user = (string) request["user"];
227 227
228 Hashtable response = new Hashtable(); 228 Hashtable response = new Hashtable();
229 response["content_type"] = "text/xml"; 229 response["content_type"] = "text/xml";
230 response["keepalive"] = false; 230 response["keepalive"] = false;
@@ -249,20 +249,20 @@ namespace OpenSim.Services.FreeswitchService
249 "</section>\r\n" + 249 "</section>\r\n" +
250 "</document>\r\n", 250 "</document>\r\n",
251 domain , user, password, Context); 251 domain , user, password, Context);
252 252
253 return response; 253 return response;
254 } 254 }
255 255
256 private Hashtable HandleInvite(string Context, string Realm, Hashtable request) 256 private Hashtable HandleInvite(string Context, string Realm, Hashtable request)
257 { 257 {
258 m_log.Info("[FreeSwitchDirectory]: HandleInvite called"); 258 m_log.Info("[FreeSwitchDirectory]: HandleInvite called");
259 259
260 // TODO the password we return needs to match that sent in the request, this is hard coded for now 260 // TODO the password we return needs to match that sent in the request, this is hard coded for now
261 string password = "1234"; 261 string password = "1234";
262 string domain = (string) request["domain"]; 262 string domain = (string) request["domain"];
263 string user = (string) request["user"]; 263 string user = (string) request["user"];
264 string sipRequestUser = (string) request["sip_request_user"]; 264 string sipRequestUser = (string) request["sip_request_user"];
265 265
266 Hashtable response = new Hashtable(); 266 Hashtable response = new Hashtable();
267 response["content_type"] = "text/xml"; 267 response["content_type"] = "text/xml";
268 response["keepalive"] = false; 268 response["keepalive"] = false;
@@ -296,18 +296,18 @@ namespace OpenSim.Services.FreeswitchService
296 "</section>\r\n" + 296 "</section>\r\n" +
297 "</document>\r\n", 297 "</document>\r\n",
298 domain , user, password,sipRequestUser, Context); 298 domain , user, password,sipRequestUser, Context);
299 299
300 return response; 300 return response;
301 } 301 }
302 302
303 private Hashtable HandleLocateUser(String Realm, Hashtable request) 303 private Hashtable HandleLocateUser(String Realm, Hashtable request)
304 { 304 {
305 m_log.Info("[FreeSwitchDirectory]: HandleLocateUser called"); 305 m_log.Info("[FreeSwitchDirectory]: HandleLocateUser called");
306 306
307 // TODO the password we return needs to match that sent in the request, this is hard coded for now 307 // TODO the password we return needs to match that sent in the request, this is hard coded for now
308 string domain = (string) request["domain"]; 308 string domain = (string) request["domain"];
309 string user = (string) request["user"]; 309 string user = (string) request["user"];
310 310
311 Hashtable response = new Hashtable(); 311 Hashtable response = new Hashtable();
312 response["content_type"] = "text/xml"; 312 response["content_type"] = "text/xml";
313 response["keepalive"] = false; 313 response["keepalive"] = false;
@@ -330,17 +330,17 @@ namespace OpenSim.Services.FreeswitchService
330 "</section>\r\n" + 330 "</section>\r\n" +
331 "</document>\r\n", 331 "</document>\r\n",
332 domain , user); 332 domain , user);
333 333
334 return response; 334 return response;
335 } 335 }
336 336
337 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request) 337 private Hashtable HandleConfigSofia(string Context, string Realm, Hashtable request)
338 { 338 {
339 m_log.Info("[FreeSwitchDirectory]: HandleConfigSofia called."); 339 m_log.Info("[FreeSwitchDirectory]: HandleConfigSofia called.");
340 340
341 // TODO the password we return needs to match that sent in the request, this is hard coded for now 341 // TODO the password we return needs to match that sent in the request, this is hard coded for now
342 string domain = (string) request["domain"]; 342 string domain = (string) request["domain"];
343 343
344 Hashtable response = new Hashtable(); 344 Hashtable response = new Hashtable();
345 response["content_type"] = "text/xml"; 345 response["content_type"] = "text/xml";
346 response["keepalive"] = false; 346 response["keepalive"] = false;
@@ -381,9 +381,9 @@ namespace OpenSim.Services.FreeswitchService
381 "</variables>\r\n"+ 381 "</variables>\r\n"+
382 "</domain>\r\n" + 382 "</domain>\r\n" +
383 "</section>\r\n" + 383 "</section>\r\n" +
384 "</document>\r\n", 384 "</document>\r\n",
385 domain, Context); 385 domain, Context);
386 386
387 return response; 387 return response;
388 } 388 }
389 389
diff --git a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
index d8ee971..bfeb388d 100644
--- a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.FreeswitchService")] 8[assembly: AssemblyTitle("OpenSim.Services.FreeswitchService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs
index 5b97ac0..3e6447a 100644
--- a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.FriendsService")] 8[assembly: AssemblyTitle("OpenSim.Services.FriendsService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index aa13a67..6153f5e 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Services.GridService
72 if (gridConfig != null) 72 if (gridConfig != null)
73 { 73 {
74 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true); 74 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true);
75 75
76 string authService = gridConfig.GetString("AuthenticationService", String.Empty); 76 string authService = gridConfig.GetString("AuthenticationService", String.Empty);
77 77
78 if (authService != String.Empty) 78 if (authService != String.Empty)
@@ -200,7 +200,7 @@ namespace OpenSim.Services.GridService
200 if (regionInfos.RegionLocY <= Constants.MaximumRegionSize) 200 if (regionInfos.RegionLocY <= Constants.MaximumRegionSize)
201 return "Region location reserved for HG links coord Y must be higher than " + (Constants.MaximumRegionSize/256).ToString(); 201 return "Region location reserved for HG links coord Y must be higher than " + (Constants.MaximumRegionSize/256).ToString();
202 202
203 String reason = "Region overlaps another region"; 203 String reason = "Region overlaps another region";
204 204
205 List<RegionData> rdatas = m_Database.Get( 205 List<RegionData> rdatas = m_Database.Get(
206 regionInfos.RegionLocX, 206 regionInfos.RegionLocX,
@@ -272,7 +272,7 @@ namespace OpenSim.Services.GridService
272 { 272 {
273 if (d.RegionID != regionInfos.RegionID) 273 if (d.RegionID != regionInfos.RegionID)
274 { 274 {
275 m_log.WarnFormat("[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).", 275 m_log.WarnFormat("[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).",
276 regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID); 276 regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID);
277 return "Duplicate region name"; 277 return "Duplicate region name";
278 } 278 }
@@ -282,7 +282,7 @@ namespace OpenSim.Services.GridService
282 282
283 // If there is an old record for us, delete it if it is elsewhere. 283 // If there is an old record for us, delete it if it is elsewhere.
284 region = m_Database.Get(regionInfos.RegionID, scopeID); 284 region = m_Database.Get(regionInfos.RegionID, scopeID);
285 if ((region != null) && (region.RegionID == regionInfos.RegionID) && 285 if ((region != null) && (region.RegionID == regionInfos.RegionID) &&
286 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY))) 286 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
287 { 287 {
288 if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.NoMove) != 0) 288 if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.NoMove) != 0)
@@ -308,7 +308,7 @@ namespace OpenSim.Services.GridService
308 // Everything is ok, let's register 308 // Everything is ok, let's register
309 RegionData rdata = RegionInfo2RegionData(regionInfos); 309 RegionData rdata = RegionInfo2RegionData(regionInfos);
310 rdata.ScopeID = scopeID; 310 rdata.ScopeID = scopeID;
311 311
312 if (region != null) 312 if (region != null)
313 { 313 {
314 int oldFlags = Convert.ToInt32(region.Data["flags"]); 314 int oldFlags = Convert.ToInt32(region.Data["flags"]);
@@ -346,9 +346,9 @@ namespace OpenSim.Services.GridService
346 } 346 }
347 347
348 m_log.DebugFormat 348 m_log.DebugFormat
349 ("[GRID SERVICE]: Region {0} ({1}, {2}x{3}) registered at {4},{5} with flags {6}", 349 ("[GRID SERVICE]: Region {0} ({1}, {2}x{3}) registered at {4},{5} with flags {6}",
350 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionSizeX, regionInfos.RegionSizeY, 350 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionSizeX, regionInfos.RegionSizeY,
351 regionInfos.RegionCoordX, regionInfos.RegionCoordY, 351 regionInfos.RegionCoordX, regionInfos.RegionCoordY,
352 (OpenSim.Framework.RegionFlags)flags); 352 (OpenSim.Framework.RegionFlags)flags);
353 353
354 return String.Empty; 354 return String.Empty;
@@ -404,7 +404,7 @@ namespace OpenSim.Services.GridService
404 { 404 {
405 List<GridRegion> rinfos = new List<GridRegion>(); 405 List<GridRegion> rinfos = new List<GridRegion>();
406 RegionData region = m_Database.Get(regionID, scopeID); 406 RegionData region = m_Database.Get(regionID, scopeID);
407 407
408 if (region != null) 408 if (region != null)
409 { 409 {
410 List<RegionData> rdatas = m_Database.Get( 410 List<RegionData> rdatas = m_Database.Get(
@@ -430,10 +430,10 @@ namespace OpenSim.Services.GridService
430 else 430 else
431 { 431 {
432 m_log.WarnFormat( 432 m_log.WarnFormat(
433 "[GRID SERVICE]: GetNeighbours() called for scope {0}, region {1} but no such region found", 433 "[GRID SERVICE]: GetNeighbours() called for scope {0}, region {1} but no such region found",
434 scopeID, regionID); 434 scopeID, regionID);
435 } 435 }
436 436
437 return rinfos; 437 return rinfos;
438 } 438 }
439 439
@@ -451,7 +451,7 @@ namespace OpenSim.Services.GridService
451 // be the base coordinate of the region. 451 // be the base coordinate of the region.
452 // The snapping is technically unnecessary but is harmless because regions are always 452 // The snapping is technically unnecessary but is harmless because regions are always
453 // multiples of the legacy region size (256). 453 // multiples of the legacy region size (256).
454 454
455 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 455 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
456 { 456 {
457 uint regionX = Util.WorldToRegionLoc((uint)x); 457 uint regionX = Util.WorldToRegionLoc((uint)x);
@@ -505,7 +505,7 @@ namespace OpenSim.Services.GridService
505 string regionName = ""; 505 string regionName = "";
506 if(!Util.buildHGRegionURI(name, out regionURI, out regionName)) 506 if(!Util.buildHGRegionURI(name, out regionURI, out regionName))
507 return null; 507 return null;
508 508
509 string mapname; 509 string mapname;
510 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI); 510 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI);
511 if(localGrid) 511 if(localGrid)
@@ -531,11 +531,11 @@ namespace OpenSim.Services.GridService
531 rinfos.Add(RegionData2RegionInfo(rdata)); 531 rinfos.Add(RegionData2RegionInfo(rdata));
532 } 532 }
533 } 533 }
534 } 534 }
535 if(haveMatch) 535 if(haveMatch)
536 return rinfos; 536 return rinfos;
537 } 537 }
538 538
539 rdatas = m_Database.Get(Util.EscapeForLike(mapname)+ "%", scopeID); 539 rdatas = m_Database.Get(Util.EscapeForLike(mapname)+ "%", scopeID);
540 if (rdatas != null && (rdatas.Count > 0)) 540 if (rdatas != null && (rdatas.Count > 0))
541 { 541 {
@@ -554,7 +554,7 @@ namespace OpenSim.Services.GridService
554 break; 554 break;
555 } 555 }
556 } 556 }
557 } 557 }
558 if(haveMatch) 558 if(haveMatch)
559 return rinfos; 559 return rinfos;
560 } 560 }
@@ -597,7 +597,7 @@ namespace OpenSim.Services.GridService
597 string regionName = ""; 597 string regionName = "";
598 if(!Util.buildHGRegionURI(name, out regionURI, out regionName)) 598 if(!Util.buildHGRegionURI(name, out regionURI, out regionName))
599 return null; 599 return null;
600 600
601 string mapname; 601 string mapname;
602 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI); 602 bool localGrid = m_HypergridLinker.IsLocalGrid(regionURI);
603 if(localGrid) 603 if(localGrid)
@@ -666,7 +666,7 @@ namespace OpenSim.Services.GridService
666 return rinfo; 666 return rinfo;
667 } 667 }
668 668
669 #endregion 669 #endregion
670 670
671 public List<GridRegion> GetDefaultRegions(UUID scopeID) 671 public List<GridRegion> GetDefaultRegions(UUID scopeID)
672 { 672 {
@@ -705,7 +705,7 @@ namespace OpenSim.Services.GridService
705 int normalDefaultRegionsFoundOnline = ret.Count - hgDefaultRegionsFoundOnline; 705 int normalDefaultRegionsFoundOnline = ret.Count - hgDefaultRegionsFoundOnline;
706 706
707 m_log.DebugFormat( 707 m_log.DebugFormat(
708 "[GRID SERVICE]: GetDefaultHypergridRegions returning {0} hypergrid default and {1} normal default regions", 708 "[GRID SERVICE]: GetDefaultHypergridRegions returning {0} hypergrid default and {1} normal default regions",
709 hgDefaultRegionsFoundOnline, normalDefaultRegionsFoundOnline); 709 hgDefaultRegionsFoundOnline, normalDefaultRegionsFoundOnline);
710 710
711 return ret; 711 return ret;
@@ -742,7 +742,7 @@ namespace OpenSim.Services.GridService
742 m_log.DebugFormat("[GRID SERVICE]: Hyperlinks returned {0} regions", ret.Count); 742 m_log.DebugFormat("[GRID SERVICE]: Hyperlinks returned {0} regions", ret.Count);
743 return ret; 743 return ret;
744 } 744 }
745 745
746 public int GetRegionFlags(UUID scopeID, UUID regionID) 746 public int GetRegionFlags(UUID scopeID, UUID regionID)
747 { 747 {
748 RegionData region = m_Database.Get(regionID, scopeID); 748 RegionData region = m_Database.Get(regionID, scopeID);
@@ -994,7 +994,7 @@ namespace OpenSim.Services.GridService
994 } 994 }
995 995
996 /// <summary> 996 /// <summary>
997 /// Gets the grid extra service URls we wish for the region to send in OpenSimExtras to dynamically refresh 997 /// Gets the grid extra service URls we wish for the region to send in OpenSimExtras to dynamically refresh
998 /// parameters in the viewer used to access services like map, search and destination guides. 998 /// parameters in the viewer used to access services like map, search and destination guides.
999 /// <para>see "SimulatorFeaturesModule" </para> 999 /// <para>see "SimulatorFeaturesModule" </para>
1000 /// </summary> 1000 /// </summary>
diff --git a/OpenSim/Services/GridService/GridServiceBase.cs b/OpenSim/Services/GridService/GridServiceBase.cs
index 444f79b..7522e64 100644
--- a/OpenSim/Services/GridService/GridServiceBase.cs
+++ b/OpenSim/Services/GridService/GridServiceBase.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.GridService
68 connString = gridConfig.GetString("ConnectionString", connString); 68 connString = gridConfig.GetString("ConnectionString", connString);
69 realm = gridConfig.GetString("Realm", realm); 69 realm = gridConfig.GetString("Realm", realm);
70 } 70 }
71 71
72 // 72 //
73 // We tried, but this doesn't exist. We can't proceed. 73 // We tried, but this doesn't exist. We can't proceed.
74 // 74 //
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index aa394ce..dabfd3b 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -196,7 +196,7 @@ namespace OpenSim.Services.GridService
196 { 196 {
197 return TryLinkRegionToCoords(scopeID, mapName, xloc, yloc, UUID.Zero, out reason); 197 return TryLinkRegionToCoords(scopeID, mapName, xloc, yloc, UUID.Zero, out reason);
198 } 198 }
199 199
200 public bool IsLocalGrid(string serverURI) 200 public bool IsLocalGrid(string serverURI)
201 { 201 {
202 return serverURI == m_ThisGatekeeper; 202 return serverURI == m_ThisGatekeeper;
@@ -240,7 +240,7 @@ namespace OpenSim.Services.GridService
240 240
241 private bool TryCreateLinkImpl(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason) 241 private bool TryCreateLinkImpl(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason)
242 { 242 {
243 m_log.InfoFormat("[HYPERGRID LINKER]: Link to {0} {1}, in <{2},{3}>", 243 m_log.InfoFormat("[HYPERGRID LINKER]: Link to {0} {1}, in <{2},{3}>",
244 ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI), 244 ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI),
245 remoteRegionName, Util.WorldToRegionLoc((uint)xloc), Util.WorldToRegionLoc((uint)yloc)); 245 remoteRegionName, Util.WorldToRegionLoc((uint)xloc), Util.WorldToRegionLoc((uint)yloc));
246 246
@@ -270,7 +270,7 @@ namespace OpenSim.Services.GridService
270 270
271 if (remoteRegionName != string.Empty) 271 if (remoteRegionName != string.Empty)
272 regInfo.RegionName = remoteRegionName; 272 regInfo.RegionName = remoteRegionName;
273 273
274 regInfo.RegionLocX = xloc; 274 regInfo.RegionLocX = xloc;
275 regInfo.RegionLocY = yloc; 275 regInfo.RegionLocY = yloc;
276 regInfo.ScopeID = scopeID; 276 regInfo.ScopeID = scopeID;
@@ -359,7 +359,7 @@ namespace OpenSim.Services.GridService
359 regInfo.RegionName = externalName; 359 regInfo.RegionName = externalName;
360 360
361 m_log.DebugFormat("[HYPERGRID LINKER]: naming linked region {0}, handle {1}", regInfo.RegionName, handle.ToString()); 361 m_log.DebugFormat("[HYPERGRID LINKER]: naming linked region {0}, handle {1}", regInfo.RegionName, handle.ToString());
362 362
363 // Get the map image 363 // Get the map image
364 regInfo.TerrainImage = GetMapImage(regionID, imageURL); 364 regInfo.TerrainImage = GetMapImage(regionID, imageURL);
365 365
@@ -383,7 +383,7 @@ namespace OpenSim.Services.GridService
383 OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]); 383 OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]);
384 if ((rflags & OpenSim.Framework.RegionFlags.Hyperlink) != 0) 384 if ((rflags & OpenSim.Framework.RegionFlags.Hyperlink) != 0)
385 { 385 {
386 regInfo = new GridRegion(); 386 regInfo = new GridRegion();
387 regInfo.RegionID = regions[0].RegionID; 387 regInfo.RegionID = regions[0].RegionID;
388 regInfo.ScopeID = m_ScopeID; 388 regInfo.ScopeID = m_ScopeID;
389 } 389 }
@@ -491,7 +491,7 @@ namespace OpenSim.Services.GridService
491 { 491 {
492 MainConsole.Instance.Output( 492 MainConsole.Instance.Output(
493 String.Format("{0}\n{2,-32} {1}\n", 493 String.Format("{0}\n{2,-32} {1}\n",
494 r.RegionName, r.RegionID, 494 r.RegionName, r.RegionID,
495 String.Format("{0},{1} ({2},{3})", r.posX, r.posY, 495 String.Format("{0},{1} ({2},{3})", r.posX, r.posY,
496 Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY) 496 Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY)
497 ) 497 )
@@ -515,7 +515,7 @@ namespace OpenSim.Services.GridService
515 RunHGCommand(command, cmdparams); 515 RunHGCommand(command, cmdparams);
516 516
517 } 517 }
518 518
519 private void RunLinkRegionCommand(string[] cmdparams) 519 private void RunLinkRegionCommand(string[] cmdparams)
520 { 520 {
521 int xloc, yloc; 521 int xloc, yloc;
@@ -573,7 +573,7 @@ namespace OpenSim.Services.GridService
573 if (cmdparams[2].StartsWith("http")) 573 if (cmdparams[2].StartsWith("http"))
574 { 574 {
575 RunLinkRegionCommand(cmdparams); 575 RunLinkRegionCommand(cmdparams);
576 } 576 }
577 else if (cmdparams[2].Contains(":")) 577 else if (cmdparams[2].Contains(":"))
578 { 578 {
579 // New format 579 // New format
diff --git a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
index 40a29b3..69a3c44 100644
--- a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.GridService")] 8[assembly: AssemblyTitle("OpenSim.Services.GridService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 41e2b40..b80700f 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Services.HypergridService
93 // These are mandatory, the others aren't 93 // These are mandatory, the others aren't
94 if (gridService == string.Empty || presenceService == string.Empty) 94 if (gridService == string.Empty || presenceService == string.Empty)
95 throw new Exception("Incomplete specifications, Gatekeeper Service cannot function."); 95 throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
96 96
97 string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString()); 97 string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
98 UUID.TryParse(scope, out m_ScopeID); 98 UUID.TryParse(scope, out m_ScopeID);
99 //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); 99 //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
@@ -135,7 +135,7 @@ namespace OpenSim.Services.HypergridService
135 m_AllowedClients = Util.GetConfigVarFromSections<string>( 135 m_AllowedClients = Util.GetConfigVarFromSections<string>(
136 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); 136 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
137 m_DeniedClients = Util.GetConfigVarFromSections<string>( 137 m_DeniedClients = Util.GetConfigVarFromSections<string>(
138 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); 138 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
139 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); 139 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
140 140
141 LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions); 141 LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions);
@@ -219,11 +219,11 @@ namespace OpenSim.Services.HypergridService
219 { 219 {
220 // Don't even check the given regionID 220 // Don't even check the given regionID
221 m_log.DebugFormat( 221 m_log.DebugFormat(
222 "[GATEKEEPER SERVICE]: Returning gateway region {0} {1} @ {2} to user {3}{4} as teleporting to arbitrary regions is not allowed.", 222 "[GATEKEEPER SERVICE]: Returning gateway region {0} {1} @ {2} to user {3}{4} as teleporting to arbitrary regions is not allowed.",
223 m_DefaultGatewayRegion.RegionName, 223 m_DefaultGatewayRegion.RegionName,
224 m_DefaultGatewayRegion.RegionID, 224 m_DefaultGatewayRegion.RegionID,
225 m_DefaultGatewayRegion.ServerURI, 225 m_DefaultGatewayRegion.ServerURI,
226 agentID, 226 agentID,
227 agentHomeURI == null ? "" : " @ " + agentHomeURI); 227 agentHomeURI == null ? "" : " @ " + agentHomeURI);
228 228
229 message = "Teleporting to the default region."; 229 message = "Teleporting to the default region.";
@@ -244,10 +244,10 @@ namespace OpenSim.Services.HypergridService
244 244
245 m_log.DebugFormat( 245 m_log.DebugFormat(
246 "[GATEKEEPER SERVICE]: Returning region {0} {1} @ {2} to user {3}{4}.", 246 "[GATEKEEPER SERVICE]: Returning region {0} {1} @ {2} to user {3}{4}.",
247 region.RegionName, 247 region.RegionName,
248 region.RegionID, 248 region.RegionID,
249 region.ServerURI, 249 region.ServerURI,
250 agentID, 250 agentID,
251 agentHomeURI == null ? "" : " @ " + agentHomeURI); 251 agentHomeURI == null ? "" : " @ " + agentHomeURI);
252 252
253 return region; 253 return region;
@@ -308,7 +308,7 @@ namespace OpenSim.Services.HypergridService
308 return false; 308 return false;
309 } 309 }
310 m_log.DebugFormat("[GATEKEEPER SERVICE]: Identity verified for {0} {1} @ {2}", aCircuit.firstname, aCircuit.lastname, authURL); 310 m_log.DebugFormat("[GATEKEEPER SERVICE]: Identity verified for {0} {1} @ {2}", aCircuit.firstname, aCircuit.lastname, authURL);
311 311
312 // 312 //
313 // Check for impersonations 313 // Check for impersonations
314 // 314 //
@@ -461,7 +461,7 @@ namespace OpenSim.Services.HypergridService
461 EntityTransferContext ctx = new EntityTransferContext(); 461 EntityTransferContext ctx = new EntityTransferContext();
462 462
463 if (!m_SimulationService.QueryAccess( 463 if (!m_SimulationService.QueryAccess(
464 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), 464 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(),
465 true, aCircuit.startpos, new List<UUID>(), ctx, out reason)) 465 true, aCircuit.startpos, new List<UUID>(), ctx, out reason))
466 return false; 466 return false;
467 467
@@ -495,7 +495,7 @@ namespace OpenSim.Services.HypergridService
495 } 495 }
496 else 496 else
497 { 497 {
498 IUserAgentService userAgentService = new UserAgentServiceConnector(userURL); 498 IUserAgentService userAgentService = new UserAgentServiceConnector(userURL);
499 499
500 try 500 try
501 { 501 {
diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index b83fb1e..a66478e 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -164,7 +164,7 @@ namespace OpenSim.Services.HypergridService
164 return false; 164 return false;
165 } 165 }
166 166
167 #endregion 167 #endregion
168 168
169 protected void AdjustIdentifiers(AssetMetadata meta) 169 protected void AdjustIdentifiers(AssetMetadata meta)
170 { 170 {
diff --git a/OpenSim/Services/HypergridService/HGFSAssetService.cs b/OpenSim/Services/HypergridService/HGFSAssetService.cs
index 54e8ccb..2b30b3a 100644
--- a/OpenSim/Services/HypergridService/HGFSAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGFSAssetService.cs
@@ -160,7 +160,7 @@ namespace OpenSim.Services.HypergridService
160 return false; 160 return false;
161 } 161 }
162 162
163 #endregion 163 #endregion
164 164
165 protected void AdjustIdentifiers(AssetMetadata meta) 165 protected void AdjustIdentifiers(AssetMetadata meta)
166 { 166 {
diff --git a/OpenSim/Services/HypergridService/HGFriendsService.cs b/OpenSim/Services/HypergridService/HGFriendsService.cs
index 6e35a88..d3b4f18 100644
--- a/OpenSim/Services/HypergridService/HGFriendsService.cs
+++ b/OpenSim/Services/HypergridService/HGFriendsService.cs
@@ -227,7 +227,7 @@ namespace OpenSim.Services.HypergridService
227 227
228 List<UUID> localFriendsOnline = new List<UUID>(); 228 List<UUID> localFriendsOnline = new List<UUID>();
229 229
230 m_log.DebugFormat("[HGFRIENDS SERVICE]: Status notification: foreign user {0} wants to notify {1} local friends of {2} status", 230 m_log.DebugFormat("[HGFRIENDS SERVICE]: Status notification: foreign user {0} wants to notify {1} local friends of {2} status",
231 foreignUserID, friends.Count, (online ? "online" : "offline")); 231 foreignUserID, friends.Count, (online ? "online" : "offline"));
232 232
233 // First, let's double check that the reported friends are, indeed, friends of that user 233 // First, let's double check that the reported friends are, indeed, friends of that user
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
index 32ca09a..d1739cf 100644
--- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs
+++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
@@ -184,7 +184,7 @@ namespace OpenSim.Services.HypergridService
184 else if (o is string) 184 else if (o is string)
185 url = (string)o; 185 url = (string)o;
186 186
187 // We need to compare the current location with the previous 187 // We need to compare the current location with the previous
188 // or the recursive loop will never end because it will never try to lookup the agent again 188 // or the recursive loop will never end because it will never try to lookup the agent again
189 if (!firstTime) 189 if (!firstTime)
190 { 190 {
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs
index a0d25e3..f14593e 100644
--- a/OpenSim/Services/HypergridService/HGInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGInventoryService.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Services.HypergridService
70 // 70 //
71 IConfig invConfig = config.Configs[m_ConfigName]; 71 IConfig invConfig = config.Configs[m_ConfigName];
72 if (invConfig != null) 72 if (invConfig != null)
73 { 73 {
74 // realm = authConfig.GetString("Realm", realm); 74 // realm = authConfig.GetString("Realm", realm);
75 string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); 75 string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty);
76 if (userAccountsDll == string.Empty) 76 if (userAccountsDll == string.Empty)
@@ -82,7 +82,7 @@ namespace OpenSim.Services.HypergridService
82 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); 82 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
83 83
84 m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", 84 m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
85 new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); 85 new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty);
86 86
87 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); 87 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
88 } 88 }
@@ -113,7 +113,7 @@ namespace OpenSim.Services.HypergridService
113 113
114 if (folders.Length > 0) 114 if (folders.Length > 0)
115 return ConvertToOpenSim(folders[0]); 115 return ConvertToOpenSim(folders[0]);
116 116
117 // make one 117 // make one
118 XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)FolderType.Suitcase, "My Suitcase"); 118 XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)FolderType.Suitcase, "My Suitcase");
119 return ConvertToOpenSim(suitcase); 119 return ConvertToOpenSim(suitcase);
@@ -160,7 +160,7 @@ namespace OpenSim.Services.HypergridService
160 { 160 {
161 return new InventoryCollection[0]; 161 return new InventoryCollection[0];
162 } 162 }
163 163
164 //public List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID) 164 //public List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID)
165 //{ 165 //{
166 //} 166 //}
diff --git a/OpenSim/Services/HypergridService/HGRemoteAssetService.cs b/OpenSim/Services/HypergridService/HGRemoteAssetService.cs
index a53435b..5e98af9 100644
--- a/OpenSim/Services/HypergridService/HGRemoteAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGRemoteAssetService.cs
@@ -196,7 +196,7 @@ namespace OpenSim.Services.HypergridService
196 return false; 196 return false;
197 } 197 }
198 198
199 #endregion 199 #endregion
200 200
201 protected void AdjustIdentifiers(AssetMetadata meta) 201 protected void AdjustIdentifiers(AssetMetadata meta)
202 { 202 {
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 7f14e8e..d1f2e70 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Services.HypergridService
97 throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll)); 97 throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll));
98 98
99// m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI", 99// m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
100// new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty); 100// new string[] { "Startup", "Hypergrid", m_ConfigName }, String.Empty);
101 101
102// m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); 102// m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
103 } 103 }
@@ -318,7 +318,7 @@ namespace OpenSim.Services.HypergridService
318 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ID, folder.Owner); 318 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ID, folder.Owner);
319 return false; 319 return false;
320 } 320 }
321 321
322 if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID)) 322 if (!IsWithinSuitcaseTree(folder.Owner, folder.ParentID))
323 { 323 {
324 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ParentID, folder.Owner); 324 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: MoveFolder: folder {0} (user {1}) is not within Suitcase tree", folder.ParentID, folder.Owner);
@@ -505,11 +505,11 @@ namespace OpenSim.Services.HypergridService
505 // Warp! Root folder for travelers 505 // Warp! Root folder for travelers
506 XInventoryFolder[] folders = m_Database.GetFolders( 506 XInventoryFolder[] folders = m_Database.GetFolders(
507 new string[] { "agentID", "type" }, 507 new string[] { "agentID", "type" },
508 new string[] { principalID.ToString(), ((int)FolderType.Suitcase).ToString() }); 508 new string[] { principalID.ToString(), ((int)FolderType.Suitcase).ToString() });
509 509
510 if (folders != null && folders.Length > 0) 510 if (folders != null && folders.Length > 0)
511 return folders[0]; 511 return folders[0];
512 512
513 // check to see if we have the old Suitcase folder 513 // check to see if we have the old Suitcase folder
514 folders = m_Database.GetFolders( 514 folders = m_Database.GetFolders(
515 new string[] { "agentID", "folderName", "parentFolderID" }, 515 new string[] { "agentID", "folderName", "parentFolderID" },
@@ -629,7 +629,7 @@ namespace OpenSim.Services.HypergridService
629 { 629 {
630 if (a.Wearables[i][j].ItemID == itemID) 630 if (a.Wearables[i][j].ItemID == itemID)
631 { 631 {
632 //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID); 632 //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID);
633 return true; 633 return true;
634 } 634 }
635 } 635 }
@@ -638,7 +638,7 @@ namespace OpenSim.Services.HypergridService
638 // Check attachments 638 // Check attachments
639 if (a.GetAttachmentForItem(itemID) != null) 639 if (a.GetAttachmentForItem(itemID) != null)
640 { 640 {
641 //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID); 641 //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID);
642 return true; 642 return true;
643 } 643 }
644 644
diff --git a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
index df4751e..31b9f4e 100644
--- a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.HypergridService")] 8[assembly: AssemblyTitle("OpenSim.Services.HypergridService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/HypergridService/UserAccountCache.cs b/OpenSim/Services/HypergridService/UserAccountCache.cs
index 25ffb63..ae0f7ce 100644
--- a/OpenSim/Services/HypergridService/UserAccountCache.cs
+++ b/OpenSim/Services/HypergridService/UserAccountCache.cs
@@ -16,7 +16,7 @@ namespace OpenSim.Services.HypergridService
16// private static readonly ILog m_log = 16// private static readonly ILog m_log =
17// LogManager.GetLogger( 17// LogManager.GetLogger(
18// MethodBase.GetCurrentMethod().DeclaringType); 18// MethodBase.GetCurrentMethod().DeclaringType);
19 19
20 private ExpiringCache<UUID, UserAccount> m_UUIDCache; 20 private ExpiringCache<UUID, UserAccount> m_UUIDCache;
21 21
22 private IUserAccountService m_UserAccountService; 22 private IUserAccountService m_UserAccountService;
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index e701ec6..ba3cb2f 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -219,7 +219,7 @@ namespace OpenSim.Services.HypergridService
219 219
220 public bool LoginAgentToGrid(GridRegion source, AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason) 220 public bool LoginAgentToGrid(GridRegion source, AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason)
221 { 221 {
222 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", 222 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
223 agentCircuit.firstname, agentCircuit.lastname, (fromLogin ? agentCircuit.IPAddress : "stored IP"), gatekeeper.ServerURI); 223 agentCircuit.firstname, agentCircuit.lastname, (fromLogin ? agentCircuit.IPAddress : "stored IP"), gatekeeper.ServerURI);
224 224
225 string gridName = gatekeeper.ServerURI; 225 string gridName = gatekeeper.ServerURI;
@@ -269,7 +269,7 @@ namespace OpenSim.Services.HypergridService
269 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random(); 269 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
270 TravelingAgentInfo old = null; 270 TravelingAgentInfo old = null;
271 TravelingAgentInfo travel = CreateTravelInfo(agentCircuit, region, fromLogin, out old); 271 TravelingAgentInfo travel = CreateTravelInfo(agentCircuit, region, fromLogin, out old);
272 272
273 bool success = false; 273 bool success = false;
274 string myExternalIP = string.Empty; 274 string myExternalIP = string.Empty;
275 275
@@ -288,7 +288,7 @@ namespace OpenSim.Services.HypergridService
288 288
289 if (!success) 289 if (!success)
290 { 290 {
291 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}", 291 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}",
292 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); 292 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
293 293
294 if (old != null) 294 if (old != null)
@@ -301,11 +301,11 @@ namespace OpenSim.Services.HypergridService
301 301
302 // Everything is ok 302 // Everything is ok
303 303
304 if (!fromLogin) 304 if (!fromLogin)
305 { 305 {
306 // Update the perceived IP Address of our grid 306 // Update the perceived IP Address of our grid
307 m_log.DebugFormat("[USER AGENT SERVICE]: Gatekeeper sees me as {0}", myExternalIP); 307 m_log.DebugFormat("[USER AGENT SERVICE]: Gatekeeper sees me as {0}", myExternalIP);
308 } 308 }
309 309
310 travel.MyIpAddress = myExternalIP; 310 travel.MyIpAddress = myExternalIP;
311 311
@@ -376,7 +376,7 @@ namespace OpenSim.Services.HypergridService
376 if (m_BypassClientVerification) 376 if (m_BypassClientVerification)
377 return true; 377 return true;
378 378
379 m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with reported IP {1}.", 379 m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with reported IP {1}.",
380 sessionID, reportedIP); 380 sessionID, reportedIP);
381 381
382 HGTravelingData hgt = m_Database.Get(sessionID); 382 HGTravelingData hgt = m_Database.Get(sessionID);
@@ -535,7 +535,7 @@ namespace OpenSim.Services.HypergridService
535 FriendInfo[] friendInfos = m_FriendsService.GetFriends(localUserID); 535 FriendInfo[] friendInfos = m_FriendsService.GetFriends(localUserID);
536 foreach (FriendInfo finfo in friendInfos) 536 foreach (FriendInfo finfo in friendInfos)
537 { 537 {
538 if (finfo.Friend.StartsWith(foreignUserID.ToString()) && finfo.Friend.EndsWith(secret) && 538 if (finfo.Friend.StartsWith(foreignUserID.ToString()) && finfo.Friend.EndsWith(secret) &&
539 (finfo.TheirFlags & (int)FriendRights.CanSeeOnline) != 0 && (finfo.TheirFlags != -1)) 539 (finfo.TheirFlags & (int)FriendRights.CanSeeOnline) != 0 && (finfo.TheirFlags != -1))
540 { 540 {
541 // great! 541 // great!
@@ -641,7 +641,7 @@ namespace OpenSim.Services.HypergridService
641 foreach (FriendInfo f in friends) 641 foreach (FriendInfo f in friends)
642 if (f.Friend.StartsWith(targetUserID.ToString())) 642 if (f.Friend.StartsWith(targetUserID.ToString()))
643 { 643 {
644 // Let's remove the secret 644 // Let's remove the secret
645 UUID id; string tmp = string.Empty, secret = string.Empty; 645 UUID id; string tmp = string.Empty, secret = string.Empty;
646 if (Util.ParseUniversalUserIdentifier(f.Friend, out id, out tmp, out tmp, out tmp, out secret)) 646 if (Util.ParseUniversalUserIdentifier(f.Friend, out id, out tmp, out tmp, out tmp, out secret))
647 return f.Friend.Replace(secret, "0"); 647 return f.Friend.Replace(secret, "0");
diff --git a/OpenSim/Services/Interfaces/IAgentPreferencesService.cs b/OpenSim/Services/Interfaces/IAgentPreferencesService.cs
index ae2c5ac..af92326 100644
--- a/OpenSim/Services/Interfaces/IAgentPreferencesService.cs
+++ b/OpenSim/Services/Interfaces/IAgentPreferencesService.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Services.Interfaces
33{ 33{
34 public class AgentPrefs 34 public class AgentPrefs
35 { 35 {
36 public AgentPrefs(UUID principalID) 36 public AgentPrefs(UUID principalID)
37 { 37 {
38 PrincipalID = principalID; 38 PrincipalID = principalID;
39 } 39 }
diff --git a/OpenSim/Services/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs
index 28c3315..170dc97 100644
--- a/OpenSim/Services/Interfaces/IAssetService.cs
+++ b/OpenSim/Services/Interfaces/IAssetService.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Services.Interfaces
47 /// <param name="id"></param> 47 /// <param name="id"></param>
48 /// <returns></returns> 48 /// <returns></returns>
49 AssetMetadata GetMetadata(string id); 49 AssetMetadata GetMetadata(string id);
50 50
51 /// <summary> 51 /// <summary>
52 /// Get an asset's data, ignoring the metadata. 52 /// Get an asset's data, ignoring the metadata.
53 /// </summary> 53 /// </summary>
@@ -63,7 +63,7 @@ namespace OpenSim.Services.Interfaces
63 AssetBase GetCached(string id); 63 AssetBase GetCached(string id);
64 64
65 /// <summary> 65 /// <summary>
66 /// Get an asset synchronously or asynchronously (depending on whether 66 /// Get an asset synchronously or asynchronously (depending on whether
67 /// it is locally cached) and fire a callback with the fetched asset 67 /// it is locally cached) and fire a callback with the fetched asset
68 /// </summary> 68 /// </summary>
69 /// <param name="id">The asset id</param> 69 /// <param name="id">The asset id</param>
@@ -75,7 +75,7 @@ namespace OpenSim.Services.Interfaces
75 /// </param> 75 /// </param>
76 /// <returns>True if the id was parseable, false otherwise</returns> 76 /// <returns>True if the id was parseable, false otherwise</returns>
77 bool Get(string id, Object sender, AssetRetrieved handler); 77 bool Get(string id, Object sender, AssetRetrieved handler);
78 78
79 /// <summary> 79 /// <summary>
80 /// Check if assets exist in the database. 80 /// Check if assets exist in the database.
81 /// </summary> 81 /// </summary>
diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs
index cdcfad9..1ff092f 100644
--- a/OpenSim/Services/Interfaces/IAuthenticationService.cs
+++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Services.Interfaces
55 // Generic Authentication service used for identifying 55 // Generic Authentication service used for identifying
56 // and authenticating principals. 56 // and authenticating principals.
57 // Principals may be clients acting on users' behalf, 57 // Principals may be clients acting on users' behalf,
58 // or any other components that need 58 // or any other components that need
59 // verifiable identification. 59 // verifiable identification.
60 // 60 //
61 public interface IAuthenticationService 61 public interface IAuthenticationService
diff --git a/OpenSim/Services/Interfaces/IAuthorizationService.cs b/OpenSim/Services/Interfaces/IAuthorizationService.cs
index e5c68f6..d4c697a 100644
--- a/OpenSim/Services/Interfaces/IAuthorizationService.cs
+++ b/OpenSim/Services/Interfaces/IAuthorizationService.cs
@@ -31,7 +31,7 @@ using OpenSim.Framework;
31namespace OpenSim.Services.Interfaces 31namespace OpenSim.Services.Interfaces
32{ 32{
33 // Generic Authorization service used for authorizing principals in a particular region 33 // Generic Authorization service used for authorizing principals in a particular region
34 34
35 public interface IAuthorizationService 35 public interface IAuthorizationService
36 { 36 {
37 /// <summary> 37 /// <summary>
@@ -50,7 +50,7 @@ namespace OpenSim.Services.Interfaces
50 bool IsAuthorizedForRegion( 50 bool IsAuthorizedForRegion(
51 string userID, string firstName, string lastName, string regionID, out string message); 51 string userID, string firstName, string lastName, string regionID, out string message);
52 } 52 }
53 53
54 public class AuthorizationRequest 54 public class AuthorizationRequest
55 { 55 {
56 private string m_userID; 56 private string m_userID;
@@ -69,7 +69,7 @@ namespace OpenSim.Services.Interfaces
69 m_userID = ID; 69 m_userID = ID;
70 m_regionID = RegionID; 70 m_regionID = RegionID;
71 } 71 }
72 72
73 public AuthorizationRequest( 73 public AuthorizationRequest(
74 string ID, string FirstName, string SurName, string Email, string RegionName, string RegionID) 74 string ID, string FirstName, string SurName, string Email, string RegionName, string RegionID)
75 { 75 {
@@ -80,44 +80,44 @@ namespace OpenSim.Services.Interfaces
80 m_regionName = RegionName; 80 m_regionName = RegionName;
81 m_regionID = RegionID; 81 m_regionID = RegionID;
82 } 82 }
83 83
84 public string ID 84 public string ID
85 { 85 {
86 get { return m_userID; } 86 get { return m_userID; }
87 set { m_userID = value; } 87 set { m_userID = value; }
88 } 88 }
89 89
90 public string FirstName 90 public string FirstName
91 { 91 {
92 get { return m_firstname; } 92 get { return m_firstname; }
93 set { m_firstname = value; } 93 set { m_firstname = value; }
94 } 94 }
95 95
96 public string SurName 96 public string SurName
97 { 97 {
98 get { return m_surname; } 98 get { return m_surname; }
99 set { m_surname = value; } 99 set { m_surname = value; }
100 } 100 }
101 101
102 public string Email 102 public string Email
103 { 103 {
104 get { return m_email; } 104 get { return m_email; }
105 set { m_email = value; } 105 set { m_email = value; }
106 } 106 }
107 107
108 public string RegionName 108 public string RegionName
109 { 109 {
110 get { return m_regionName; } 110 get { return m_regionName; }
111 set { m_regionName = value; } 111 set { m_regionName = value; }
112 } 112 }
113 113
114 public string RegionID 114 public string RegionID
115 { 115 {
116 get { return m_regionID; } 116 get { return m_regionID; }
117 set { m_regionID = value; } 117 set { m_regionID = value; }
118 } 118 }
119 } 119 }
120 120
121 public class AuthorizationResponse 121 public class AuthorizationResponse
122 { 122 {
123 private bool m_isAuthorized; 123 private bool m_isAuthorized;
@@ -132,13 +132,13 @@ namespace OpenSim.Services.Interfaces
132 m_isAuthorized = isAuthorized; 132 m_isAuthorized = isAuthorized;
133 m_message = message; 133 m_message = message;
134 } 134 }
135 135
136 public bool IsAuthorized 136 public bool IsAuthorized
137 { 137 {
138 get { return m_isAuthorized; } 138 get { return m_isAuthorized; }
139 set { m_isAuthorized = value; } 139 set { m_isAuthorized = value; }
140 } 140 }
141 141
142 public string Message 142 public string Message
143 { 143 {
144 get { return m_message; } 144 get { return m_message; }
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index 99b71b9..b4dc511 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Services.Interfaces
51 /// <param name="appearance"></param> 51 /// <param name="appearance"></param>
52 /// <returns></returns> 52 /// <returns></returns>
53 bool SetAppearance(UUID userID, AvatarAppearance appearance); 53 bool SetAppearance(UUID userID, AvatarAppearance appearance);
54 54
55 /// <summary> 55 /// <summary>
56 /// Called by the login service 56 /// Called by the login service
57 /// </summary> 57 /// </summary>
@@ -75,7 +75,7 @@ namespace OpenSim.Services.Interfaces
75 bool ResetAvatar(UUID userID); 75 bool ResetAvatar(UUID userID);
76 76
77 /// <summary> 77 /// <summary>
78 /// These methods raison d'etre: 78 /// These methods raison d'etre:
79 /// No need to send the entire avatar data (SetAvatar) for changing attachments 79 /// No need to send the entire avatar data (SetAvatar) for changing attachments
80 /// </summary> 80 /// </summary>
81 /// <param name="userID"></param> 81 /// <param name="userID"></param>
@@ -291,8 +291,8 @@ namespace OpenSim.Services.Interfaces
291 byte[] binary = new byte[vps.Length]; 291 byte[] binary = new byte[vps.Length];
292 292
293 for (int i = 0; i < vps.Length; i++) 293 for (int i = 0; i < vps.Length; i++)
294 binary[i] = (byte)Convert.ToInt32(vps[i]); 294 binary[i] = (byte)Convert.ToInt32(vps[i]);
295 295
296 appearance.VisualParams = binary; 296 appearance.VisualParams = binary;
297 } 297 }
298 298
diff --git a/OpenSim/Services/Interfaces/IEstateDataService.cs b/OpenSim/Services/Interfaces/IEstateDataService.cs
index 719563d..9b64a39 100644
--- a/OpenSim/Services/Interfaces/IEstateDataService.cs
+++ b/OpenSim/Services/Interfaces/IEstateDataService.cs
@@ -39,14 +39,14 @@ namespace OpenSim.Services.Interfaces
39 /// </summary> 39 /// </summary>
40 /// <param name="regionID"></param> 40 /// <param name="regionID"></param>
41 /// <param name="create">If true, then an estate is created if one is not found.</param> 41 /// <param name="create">If true, then an estate is created if one is not found.</param>
42 /// <returns></returns> 42 /// <returns></returns>
43 EstateSettings LoadEstateSettings(UUID regionID, bool create); 43 EstateSettings LoadEstateSettings(UUID regionID, bool create);
44 44
45 /// <summary> 45 /// <summary>
46 /// Load estate settings for an estate ID. 46 /// Load estate settings for an estate ID.
47 /// </summary> 47 /// </summary>
48 /// <param name="estateID"></param> 48 /// <param name="estateID"></param>
49 /// <returns></returns> 49 /// <returns></returns>
50 EstateSettings LoadEstateSettings(int estateID); 50 EstateSettings LoadEstateSettings(int estateID);
51 51
52 /// <summary> 52 /// <summary>
@@ -56,60 +56,60 @@ namespace OpenSim.Services.Interfaces
56 /// A <see cref="EstateSettings"/> 56 /// A <see cref="EstateSettings"/>
57 /// </returns> 57 /// </returns>
58 EstateSettings CreateNewEstate(); 58 EstateSettings CreateNewEstate();
59 59
60 /// <summary> 60 /// <summary>
61 /// Load/Get all estate settings. 61 /// Load/Get all estate settings.
62 /// </summary> 62 /// </summary>
63 /// <returns>An empty list if no estates were found.</returns> 63 /// <returns>An empty list if no estates were found.</returns>
64 List<EstateSettings> LoadEstateSettingsAll(); 64 List<EstateSettings> LoadEstateSettingsAll();
65 65
66 /// <summary> 66 /// <summary>
67 /// Store estate settings. 67 /// Store estate settings.
68 /// </summary> 68 /// </summary>
69 /// <remarks> 69 /// <remarks>
70 /// This is also called by EstateSettings.Save()</remarks> 70 /// This is also called by EstateSettings.Save()</remarks>
71 /// <param name="es"></param> 71 /// <param name="es"></param>
72 void StoreEstateSettings(EstateSettings es); 72 void StoreEstateSettings(EstateSettings es);
73 73
74 /// <summary> 74 /// <summary>
75 /// Get estate IDs. 75 /// Get estate IDs.
76 /// </summary> 76 /// </summary>
77 /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param> 77 /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param>
78 /// <returns></returns> 78 /// <returns></returns>
79 List<int> GetEstates(string search); 79 List<int> GetEstates(string search);
80 80
81 /// <summary> 81 /// <summary>
82 /// Get the IDs of all estates owned by the given user. 82 /// Get the IDs of all estates owned by the given user.
83 /// </summary> 83 /// </summary>
84 /// <returns>An empty list if no estates were found.</returns> 84 /// <returns>An empty list if no estates were found.</returns>
85 List<int> GetEstatesByOwner(UUID ownerID); 85 List<int> GetEstatesByOwner(UUID ownerID);
86 86
87 /// <summary> 87 /// <summary>
88 /// Get the IDs of all estates. 88 /// Get the IDs of all estates.
89 /// </summary> 89 /// </summary>
90 /// <returns>An empty list if no estates were found.</returns> 90 /// <returns>An empty list if no estates were found.</returns>
91 List<int> GetEstatesAll(); 91 List<int> GetEstatesAll();
92 92
93 /// <summary> 93 /// <summary>
94 /// Link a region to an estate. 94 /// Link a region to an estate.
95 /// </summary> 95 /// </summary>
96 /// <param name="regionID"></param> 96 /// <param name="regionID"></param>
97 /// <param name="estateID"></param> 97 /// <param name="estateID"></param>
98 /// <returns>true if the link succeeded, false otherwise</returns> 98 /// <returns>true if the link succeeded, false otherwise</returns>
99 bool LinkRegion(UUID regionID, int estateID); 99 bool LinkRegion(UUID regionID, int estateID);
100 100
101 /// <summary> 101 /// <summary>
102 /// Get the UUIDs of all the regions in an estate. 102 /// Get the UUIDs of all the regions in an estate.
103 /// </summary> 103 /// </summary>
104 /// <param name="estateID"></param> 104 /// <param name="estateID"></param>
105 /// <returns></returns> 105 /// <returns></returns>
106 List<UUID> GetRegions(int estateID); 106 List<UUID> GetRegions(int estateID);
107 107
108 /// <summary> 108 /// <summary>
109 /// Delete an estate 109 /// Delete an estate
110 /// </summary> 110 /// </summary>
111 /// <param name="estateID"></param> 111 /// <param name="estateID"></param>
112 /// <returns>true if the delete succeeded, false otherwise</returns> 112 /// <returns>true if the delete succeeded, false otherwise</returns>
113 bool DeleteEstate(int estateID); 113 bool DeleteEstate(int estateID);
114 } 114 }
115} \ No newline at end of file 115} \ No newline at end of file
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 63c6e5f..66e5870 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Services.Interfaces
85 GridRegion GetRegionByName(UUID scopeID, string regionName); 85 GridRegion GetRegionByName(UUID scopeID, string regionName);
86 86
87 /// <summary> 87 /// <summary>
88 /// Get information about regions starting with the provided name. 88 /// Get information about regions starting with the provided name.
89 /// </summary> 89 /// </summary>
90 /// <param name="name"> 90 /// <param name="name">
91 /// The name to match against. 91 /// The name to match against.
@@ -95,7 +95,7 @@ namespace OpenSim.Services.Interfaces
95 /// </param> 95 /// </param>
96 /// <returns> 96 /// <returns>
97 /// A list of <see cref="RegionInfo"/>s of regions with matching name. If the 97 /// A list of <see cref="RegionInfo"/>s of regions with matching name. If the
98 /// grid-server couldn't be contacted or returned an error, return null. 98 /// grid-server couldn't be contacted or returned an error, return null.
99 /// </returns> 99 /// </returns>
100 List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber); 100 List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber);
101 101
@@ -139,7 +139,7 @@ namespace OpenSim.Services.Interfaces
139#pragma warning restore 414 139#pragma warning restore 414
140 140
141 /// <summary> 141 /// <summary>
142 /// The port by which http communication occurs with the region 142 /// The port by which http communication occurs with the region
143 /// </summary> 143 /// </summary>
144 public uint HttpPort { get; set; } 144 public uint HttpPort { get; set; }
145 145
@@ -148,7 +148,7 @@ namespace OpenSim.Services.Interfaces
148 /// </summary> 148 /// </summary>
149 public string ServerURI 149 public string ServerURI
150 { 150 {
151 get { 151 get {
152 if (!String.IsNullOrEmpty(m_serverURI)) { 152 if (!String.IsNullOrEmpty(m_serverURI)) {
153 return m_serverURI; 153 return m_serverURI;
154 } else { 154 } else {
@@ -158,7 +158,7 @@ namespace OpenSim.Services.Interfaces
158 return "http://" + m_externalHostName + ":" + HttpPort + "/"; 158 return "http://" + m_externalHostName + ":" + HttpPort + "/";
159 } 159 }
160 } 160 }
161 set { 161 set {
162 if ( value == null) 162 if ( value == null)
163 { 163 {
164 m_serverURI = String.Empty; 164 m_serverURI = String.Empty;
@@ -344,7 +344,7 @@ namespace OpenSim.Services.Interfaces
344 RegionSecret = ConvertFrom.RegionSecret; 344 RegionSecret = ConvertFrom.RegionSecret;
345 EstateOwner = ConvertFrom.EstateOwner; 345 EstateOwner = ConvertFrom.EstateOwner;
346 } 346 }
347 347
348 public GridRegion(Dictionary<string, object> kvp) 348 public GridRegion(Dictionary<string, object> kvp)
349 { 349 {
350 if (kvp.ContainsKey("uuid")) 350 if (kvp.ContainsKey("uuid"))
@@ -424,7 +424,7 @@ namespace OpenSim.Services.Interfaces
424 // m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>", 424 // m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>",
425 // LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY); 425 // LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY);
426 } 426 }
427 427
428 public Dictionary<string, object> ToKeyValuePairs() 428 public Dictionary<string, object> ToKeyValuePairs()
429 { 429 {
430 Dictionary<string, object> kvp = new Dictionary<string, object>(); 430 Dictionary<string, object> kvp = new Dictionary<string, object>();
diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index 2e7237e..6ad0f42 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Services.Interfaces
37 public class GridUserInfo 37 public class GridUserInfo
38 { 38 {
39 public string UserID; 39 public string UserID;
40 40
41 public UUID HomeRegionID; 41 public UUID HomeRegionID;
42 public Vector3 HomePosition; 42 public Vector3 HomePosition;
43 public Vector3 HomeLookAt; 43 public Vector3 HomeLookAt;
@@ -45,13 +45,13 @@ namespace OpenSim.Services.Interfaces
45 public UUID LastRegionID; 45 public UUID LastRegionID;
46 public Vector3 LastPosition; 46 public Vector3 LastPosition;
47 public Vector3 LastLookAt; 47 public Vector3 LastLookAt;
48 48
49 public bool Online; 49 public bool Online;
50 public DateTime Login; 50 public DateTime Login;
51 public DateTime Logout; 51 public DateTime Logout;
52 52
53 public GridUserInfo() {} 53 public GridUserInfo() {}
54 54
55 public GridUserInfo(Dictionary<string, object> kvp) 55 public GridUserInfo(Dictionary<string, object> kvp)
56 { 56 {
57 if (kvp.ContainsKey("UserID")) 57 if (kvp.ContainsKey("UserID"))
@@ -96,11 +96,11 @@ namespace OpenSim.Services.Interfaces
96 result["Online"] = Online.ToString(); 96 result["Online"] = Online.ToString();
97 result["Login"] = Login.ToString(); 97 result["Login"] = Login.ToString();
98 result["Logout"] = Logout.ToString(); 98 result["Logout"] = Logout.ToString();
99 99
100 return result; 100 return result;
101 } 101 }
102 } 102 }
103 103
104 public interface IGridUserService 104 public interface IGridUserService
105 { 105 {
106 GridUserInfo LoggedIn(string userID); 106 GridUserInfo LoggedIn(string userID);
@@ -115,7 +115,7 @@ namespace OpenSim.Services.Interfaces
115 /// <param name="lastLookAt">Last normalized look direction for the user</param> 115 /// <param name="lastLookAt">Last normalized look direction for the user</param>
116 /// <returns>True if the logout request was successfully processed, otherwise false</returns> 116 /// <returns>True if the logout request was successfully processed, otherwise false</returns>
117 bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); 117 bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
118 118
119 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt); 119 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt);
120 120
121 /// <summary> 121 /// <summary>
@@ -128,7 +128,7 @@ namespace OpenSim.Services.Interfaces
128 /// <param name="lastLookAt">Normalized look direction</param> 128 /// <param name="lastLookAt">Normalized look direction</param>
129 /// <returns>True if the user's last position was successfully updated, otherwise false</returns> 129 /// <returns>True if the user's last position was successfully updated, otherwise false</returns>
130 bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); 130 bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
131 131
132 GridUserInfo GetGridUserInfo(string userID); 132 GridUserInfo GetGridUserInfo(string userID);
133 GridUserInfo[] GetGridUserInfo(string[] userID); 133 GridUserInfo[] GetGridUserInfo(string[] userID);
134 } 134 }
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index 1815e6c..e0a63ca 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Services.Interfaces
37 public interface IGatekeeperService 37 public interface IGatekeeperService
38 { 38 {
39 bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY); 39 bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY);
40 40
41 /// <summary> 41 /// <summary>
42 /// Returns the region a Hypergrid visitor should enter. 42 /// Returns the region a Hypergrid visitor should enter.
43 /// </summary> 43 /// </summary>
@@ -59,7 +59,7 @@ namespace OpenSim.Services.Interfaces
59 public interface IUserAgentService 59 public interface IUserAgentService
60 { 60 {
61 bool LoginAgentToGrid(GridRegion source, AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason); 61 bool LoginAgentToGrid(GridRegion source, AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason);
62 62
63 void LogoutAgent(UUID userID, UUID sessionID); 63 void LogoutAgent(UUID userID, UUID sessionID);
64 64
65 /// <summary> 65 /// <summary>
@@ -89,7 +89,7 @@ namespace OpenSim.Services.Interfaces
89 /// <returns>On success: the user's Server URLs. If the user doesn't exist: "".</returns> 89 /// <returns>On success: the user's Server URLs. If the user doesn't exist: "".</returns>
90 /// <remarks>Throws an exception if an error occurs (e.g., can't contact the server).</remarks> 90 /// <remarks>Throws an exception if an error occurs (e.g., can't contact the server).</remarks>
91 string LocateUser(UUID userID); 91 string LocateUser(UUID userID);
92 92
93 /// <summary> 93 /// <summary>
94 /// Returns the Universal User Identifier for 'targetUserID' on behalf of 'userID'. 94 /// Returns the Universal User Identifier for 'targetUserID' on behalf of 'userID'.
95 /// </summary> 95 /// </summary>
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs
index c0c9ba8..582ea90 100644
--- a/OpenSim/Services/Interfaces/IInventoryService.cs
+++ b/OpenSim/Services/Interfaces/IInventoryService.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Services.Interfaces
84 /// <param name="folderIDs"></param> 84 /// <param name="folderIDs"></param>
85 /// <returns>Inventory content.</returns> 85 /// <returns>Inventory content.</returns>
86 InventoryCollection[] GetMultipleFoldersContent(UUID userID, UUID[] folderIDs); 86 InventoryCollection[] GetMultipleFoldersContent(UUID userID, UUID[] folderIDs);
87 87
88 /// <summary> 88 /// <summary>
89 /// Gets the items inside a folder 89 /// Gets the items inside a folder
90 /// </summary> 90 /// </summary>
@@ -193,11 +193,11 @@ namespace OpenSim.Services.Interfaces
193 193
194 /// <summary> 194 /// <summary>
195 /// Get the union of permissions of all inventory items 195 /// Get the union of permissions of all inventory items
196 /// that hold the given assetID. 196 /// that hold the given assetID.
197 /// </summary> 197 /// </summary>
198 /// <param name="userID"></param> 198 /// <param name="userID"></param>
199 /// <param name="assetID"></param> 199 /// <param name="assetID"></param>
200 /// <returns>The permissions or 0 if no such asset is found in 200 /// <returns>The permissions or 0 if no such asset is found in
201 /// the user's inventory</returns> 201 /// the user's inventory</returns>
202 int GetAssetPermissions(UUID userID, UUID assetID); 202 int GetAssetPermissions(UUID userID, UUID assetID);
203 } 203 }
diff --git a/OpenSim/Services/Interfaces/IOfflineIMService.cs b/OpenSim/Services/Interfaces/IOfflineIMService.cs
index 588aaaf..db501fd 100644
--- a/OpenSim/Services/Interfaces/IOfflineIMService.cs
+++ b/OpenSim/Services/Interfaces/IOfflineIMService.cs
@@ -35,9 +35,9 @@ namespace OpenSim.Services.Interfaces
35 public interface IOfflineIMService 35 public interface IOfflineIMService
36 { 36 {
37 List<GridInstantMessage> GetMessages(UUID principalID); 37 List<GridInstantMessage> GetMessages(UUID principalID);
38 38
39 bool StoreMessage(GridInstantMessage im, out string reason); 39 bool StoreMessage(GridInstantMessage im, out string reason);
40 40
41 /// <summary> 41 /// <summary>
42 /// Delete messages to or from this user (or group). 42 /// Delete messages to or from this user (or group).
43 /// </summary> 43 /// </summary>
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index d89f6ff..a01897a 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Services.Interfaces
59 /// <param name="destination"></param> 59 /// <param name="destination"></param>
60 /// <param name="aCircuit"></param> 60 /// <param name="aCircuit"></param>
61 /// <param name="flags"></param> 61 /// <param name="flags"></param>
62 /// <param name="reason">Reason message in the event of a failure.</param> 62 /// <param name="reason">Reason message in the event of a failure.</param>
63 bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, EntityTransferContext ctx, out string reason); 63 bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, EntityTransferContext ctx, out string reason);
64 64
65 /// <summary> 65 /// <summary>
diff --git a/OpenSim/Services/Interfaces/IUserProfilesService.cs b/OpenSim/Services/Interfaces/IUserProfilesService.cs
index 121baa8..867c623 100644
--- a/OpenSim/Services/Interfaces/IUserProfilesService.cs
+++ b/OpenSim/Services/Interfaces/IUserProfilesService.cs
@@ -40,19 +40,19 @@ namespace OpenSim.Services.Interfaces
40 bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result); 40 bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result);
41 bool ClassifiedDelete(UUID recordId); 41 bool ClassifiedDelete(UUID recordId);
42 #endregion Classifieds 42 #endregion Classifieds
43 43
44 #region Picks 44 #region Picks
45 OSD AvatarPicksRequest(UUID creatorId); 45 OSD AvatarPicksRequest(UUID creatorId);
46 bool PickInfoRequest(ref UserProfilePick pick, ref string result); 46 bool PickInfoRequest(ref UserProfilePick pick, ref string result);
47 bool PicksUpdate(ref UserProfilePick pick, ref string result); 47 bool PicksUpdate(ref UserProfilePick pick, ref string result);
48 bool PicksDelete(UUID pickId); 48 bool PicksDelete(UUID pickId);
49 #endregion Picks 49 #endregion Picks
50 50
51 #region Notes 51 #region Notes
52 bool AvatarNotesRequest(ref UserProfileNotes note); 52 bool AvatarNotesRequest(ref UserProfileNotes note);
53 bool NotesUpdate(ref UserProfileNotes note, ref string result); 53 bool NotesUpdate(ref UserProfileNotes note, ref string result);
54 #endregion Notes 54 #endregion Notes
55 55
56 #region Profile Properties 56 #region Profile Properties
57 bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result); 57 bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result);
58 bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result); 58 bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result);
@@ -62,7 +62,7 @@ namespace OpenSim.Services.Interfaces
62 bool UserPreferencesRequest(ref UserPreferences pref, ref string result); 62 bool UserPreferencesRequest(ref UserPreferences pref, ref string result);
63 bool UserPreferencesUpdate(ref UserPreferences pref, ref string result); 63 bool UserPreferencesUpdate(ref UserPreferences pref, ref string result);
64 #endregion User Preferences 64 #endregion User Preferences
65 65
66 #region Interests 66 #region Interests
67 bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result); 67 bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result);
68 #endregion Interests 68 #endregion Interests
diff --git a/OpenSim/Services/Interfaces/OpenProfileClient.cs b/OpenSim/Services/Interfaces/OpenProfileClient.cs
index bda8151..8c4d14b 100644
--- a/OpenSim/Services/Interfaces/OpenProfileClient.cs
+++ b/OpenSim/Services/Interfaces/OpenProfileClient.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Services.UserProfilesService
49 public class OpenProfileClient 49 public class OpenProfileClient
50 { 50 {
51// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private string m_serverURI; 53 private string m_serverURI;
54 54
55 /// <summary> 55 /// <summary>
@@ -60,7 +60,7 @@ namespace OpenSim.Services.UserProfilesService
60 { 60 {
61 m_serverURI = serverURI; 61 m_serverURI = serverURI;
62 } 62 }
63 63
64 /// <summary> 64 /// <summary>
65 /// Gets an avatar's profile using the OpenProfile protocol. 65 /// Gets an avatar's profile using the OpenProfile protocol.
66 /// </summary> 66 /// </summary>
diff --git a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
index 115afa2..6c683b4 100644
--- a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.Interfaces")] 8[assembly: AssemblyTitle("OpenSim.Services.Interfaces")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
index 7295103..2e3fb3e 100644
--- a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.InventoryService")] 8[assembly: AssemblyTitle("OpenSim.Services.InventoryService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
index 3cfd125..2e4637c 100644
--- a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
+++ b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Services.InventoryService.Tests
47 { 47 {
48 private IInventoryService CreateXInventoryService() 48 private IInventoryService CreateXInventoryService()
49 { 49 {
50 IConfigSource config = new IniConfigSource(); 50 IConfigSource config = new IniConfigSource();
51 config.AddConfig("InventoryService"); 51 config.AddConfig("InventoryService");
52 config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 52 config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
53 53
@@ -73,19 +73,19 @@ namespace OpenSim.Services.InventoryService.Tests
73 UUID folderId = TestHelpers.ParseTail(0x30); 73 UUID folderId = TestHelpers.ParseTail(0x30);
74 int invType = (int)InventoryType.Animation; 74 int invType = (int)InventoryType.Animation;
75 int assetType = (int)AssetType.Animation; 75 int assetType = (int)AssetType.Animation;
76 string itemName = "item1"; 76 string itemName = "item1";
77 77
78 IInventoryService xis = CreateXInventoryService(); 78 IInventoryService xis = CreateXInventoryService();
79 79
80 InventoryItemBase itemToStore 80 InventoryItemBase itemToStore
81 = new InventoryItemBase(itemId, ownerId) 81 = new InventoryItemBase(itemId, ownerId)
82 { 82 {
83 CreatorIdentification = creatorId.ToString(), 83 CreatorIdentification = creatorId.ToString(),
84 AssetID = assetId, 84 AssetID = assetId,
85 Name = itemName, 85 Name = itemName,
86 Folder = folderId, 86 Folder = folderId,
87 InvType = invType, 87 InvType = invType,
88 AssetType = assetType 88 AssetType = assetType
89 }; 89 };
90 90
91 Assert.That(xis.AddItem(itemToStore), Is.True); 91 Assert.That(xis.AddItem(itemToStore), Is.True);
@@ -115,20 +115,20 @@ namespace OpenSim.Services.InventoryService.Tests
115 UUID folderId = TestHelpers.ParseTail(0x30); 115 UUID folderId = TestHelpers.ParseTail(0x30);
116 int invType = (int)InventoryType.Animation; 116 int invType = (int)InventoryType.Animation;
117 int assetType = (int)AssetType.Animation; 117 int assetType = (int)AssetType.Animation;
118 string itemName = "item1"; 118 string itemName = "item1";
119 string itemName2 = "item2"; 119 string itemName2 = "item2";
120 120
121 IInventoryService xis = CreateXInventoryService(); 121 IInventoryService xis = CreateXInventoryService();
122 122
123 InventoryItemBase itemToStore 123 InventoryItemBase itemToStore
124 = new InventoryItemBase(itemId, ownerId) 124 = new InventoryItemBase(itemId, ownerId)
125 { 125 {
126 CreatorIdentification = creatorId.ToString(), 126 CreatorIdentification = creatorId.ToString(),
127 AssetID = assetId, 127 AssetID = assetId,
128 Name = itemName, 128 Name = itemName,
129 Folder = folderId, 129 Folder = folderId,
130 InvType = invType, 130 InvType = invType,
131 AssetType = assetType 131 AssetType = assetType
132 }; 132 };
133 133
134 Assert.That(xis.AddItem(itemToStore), Is.True); 134 Assert.That(xis.AddItem(itemToStore), Is.True);
@@ -149,7 +149,7 @@ namespace OpenSim.Services.InventoryService.Tests
149 UUID folderId2 = TestHelpers.ParseTail(0x70); 149 UUID folderId2 = TestHelpers.ParseTail(0x70);
150 int invType2 = (int)InventoryType.CallingCard; 150 int invType2 = (int)InventoryType.CallingCard;
151 int assetType2 = (int)AssetType.CallingCard; 151 int assetType2 = (int)AssetType.CallingCard;
152 string itemName3 = "item3"; 152 string itemName3 = "item3";
153 153
154 itemToStore.CreatorIdentification = creatorId2.ToString(); 154 itemToStore.CreatorIdentification = creatorId2.ToString();
155 itemToStore.Owner = ownerId2; 155 itemToStore.Owner = ownerId2;
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 004c4bf..b8ed46c 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -176,7 +176,7 @@ namespace OpenSim.Services.InventoryService
176 protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID, UUID rootID) 176 protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID, UUID rootID)
177 { 177 {
178// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting system folders for {0}", principalID); 178// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting system folders for {0}", principalID);
179 179
180 XInventoryFolder[] allFolders = m_Database.GetFolders( 180 XInventoryFolder[] allFolders = m_Database.GetFolders(
181 new string[] { "agentID", "parentFolderID" }, 181 new string[] { "agentID", "parentFolderID" },
182 new string[] { principalID.ToString(), rootID.ToString() }); 182 new string[] { principalID.ToString(), rootID.ToString() });
@@ -192,7 +192,7 @@ namespace OpenSim.Services.InventoryService
192 192
193// m_log.DebugFormat( 193// m_log.DebugFormat(
194// "[XINVENTORY SERVICE]: Found {0} system folders for {1}", sysFolders.Length, principalID); 194// "[XINVENTORY SERVICE]: Found {0} system folders for {1}", sysFolders.Length, principalID);
195 195
196 return sysFolders; 196 return sysFolders;
197 } 197 }
198 198
@@ -234,7 +234,7 @@ namespace OpenSim.Services.InventoryService
234 break; 234 break;
235 } 235 }
236 } 236 }
237 237
238 if (root == null) // oops 238 if (root == null) // oops
239 root = folders[0]; 239 root = folders[0];
240 240
@@ -255,7 +255,7 @@ namespace OpenSim.Services.InventoryService
255 255
256 return null; 256 return null;
257 } 257 }
258 258
259 return GetSystemFolderForType(rootFolder, type); 259 return GetSystemFolderForType(rootFolder, type);
260 } 260 }
261 261
@@ -335,11 +335,11 @@ namespace OpenSim.Services.InventoryService
335 335
336 return multiple; 336 return multiple;
337 } 337 }
338 338
339 public virtual List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID) 339 public virtual List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID)
340 { 340 {
341// m_log.DebugFormat("[XINVENTORY]: Fetch items for folder {0}", folderID); 341// m_log.DebugFormat("[XINVENTORY]: Fetch items for folder {0}", folderID);
342 342
343 // Since we probably don't get a valid principal here, either ... 343 // Since we probably don't get a valid principal here, either ...
344 // 344 //
345 List<InventoryItemBase> invItems = new List<InventoryItemBase>(); 345 List<InventoryItemBase> invItems = new List<InventoryItemBase>();
@@ -386,7 +386,7 @@ namespace OpenSim.Services.InventoryService
386 m_log.WarnFormat( 386 m_log.WarnFormat(
387 "[XINVENTORY]: System folder of type {0} already exists when tried to add {1} to {2} for {3}", 387 "[XINVENTORY]: System folder of type {0} already exists when tried to add {1} to {2} for {3}",
388 folder.Type, folder.Name, folder.ParentID, folder.Owner); 388 folder.Type, folder.Name, folder.ParentID, folder.Owner);
389 389
390 return false; 390 return false;
391 } 391 }
392 } 392 }
@@ -498,7 +498,7 @@ namespace OpenSim.Services.InventoryService
498 { 498 {
499// m_log.DebugFormat( 499// m_log.DebugFormat(
500// "[XINVENTORY SERVICE]: Adding item {0} {1} to folder {2} for {3}", item.Name, item.ID, item.Folder, item.Owner); 500// "[XINVENTORY SERVICE]: Adding item {0} {1} to folder {2} for {3}", item.Name, item.ID, item.Folder, item.Owner);
501 501
502 return m_Database.StoreItem(ConvertFromOpenSim(item)); 502 return m_Database.StoreItem(ConvertFromOpenSim(item));
503 } 503 }
504 504
@@ -516,27 +516,27 @@ namespace OpenSim.Services.InventoryService
516 if (retrievedItem == null) 516 if (retrievedItem == null)
517 { 517 {
518 m_log.WarnFormat( 518 m_log.WarnFormat(
519 "[XINVENTORY SERVICE]: Tried to update item {0} {1}, owner {2} but no existing item found.", 519 "[XINVENTORY SERVICE]: Tried to update item {0} {1}, owner {2} but no existing item found.",
520 item.Name, item.ID, item.Owner); 520 item.Name, item.ID, item.Owner);
521 521
522 return false; 522 return false;
523 } 523 }
524 524
525 // Do not allow invariants to change. Changes to folder ID occur in MoveItems() 525 // Do not allow invariants to change. Changes to folder ID occur in MoveItems()
526 if (retrievedItem.InvType != item.InvType 526 if (retrievedItem.InvType != item.InvType
527 || retrievedItem.AssetType != item.AssetType 527 || retrievedItem.AssetType != item.AssetType
528 || retrievedItem.Folder != item.Folder 528 || retrievedItem.Folder != item.Folder
529 || retrievedItem.CreatorIdentification != item.CreatorIdentification 529 || retrievedItem.CreatorIdentification != item.CreatorIdentification
530 || retrievedItem.Owner != item.Owner) 530 || retrievedItem.Owner != item.Owner)
531 { 531 {
532 m_log.WarnFormat( 532 m_log.WarnFormat(
533 "[XINVENTORY SERVICE]: Caller to UpdateItem() for {0} {1} tried to alter property(s) that should be invariant, (InvType, AssetType, Folder, CreatorIdentification, Owner), existing ({2}, {3}, {4}, {5}, {6}), update ({7}, {8}, {9}, {10}, {11})", 533 "[XINVENTORY SERVICE]: Caller to UpdateItem() for {0} {1} tried to alter property(s) that should be invariant, (InvType, AssetType, Folder, CreatorIdentification, Owner), existing ({2}, {3}, {4}, {5}, {6}), update ({7}, {8}, {9}, {10}, {11})",
534 retrievedItem.Name, 534 retrievedItem.Name,
535 retrievedItem.ID, 535 retrievedItem.ID,
536 retrievedItem.InvType, 536 retrievedItem.InvType,
537 retrievedItem.AssetType, 537 retrievedItem.AssetType,
538 retrievedItem.Folder, 538 retrievedItem.Folder,
539 retrievedItem.CreatorIdentification, 539 retrievedItem.CreatorIdentification,
540 retrievedItem.Owner, 540 retrievedItem.Owner,
541 item.InvType, 541 item.InvType,
542 item.AssetType, 542 item.AssetType,
@@ -639,7 +639,7 @@ namespace OpenSim.Services.InventoryService
639 return new List<InventoryItemBase>(); 639 return new List<InventoryItemBase>();
640 640
641 List<InventoryItemBase> ret = new List<InventoryItemBase>(); 641 List<InventoryItemBase> ret = new List<InventoryItemBase>();
642 642
643 foreach (XInventoryItem x in items) 643 foreach (XInventoryItem x in items)
644 ret.Add(ConvertToOpenSim(x)); 644 ret.Add(ConvertToOpenSim(x));
645 645
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 0f57c2e..32e14a1 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Services.LLLoginService
61 61
62 static LLFailedLoginResponse() 62 static LLFailedLoginResponse()
63 { 63 {
64 UserProblem = new LLFailedLoginResponse("key", 64 UserProblem = new LLFailedLoginResponse("key",
65 "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", 65 "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.",
66 "false"); 66 "false");
67 GridProblem = new LLFailedLoginResponse("key", 67 GridProblem = new LLFailedLoginResponse("key",
@@ -307,7 +307,7 @@ namespace OpenSim.Services.LLLoginService
307 { 307 {
308 DST = dstTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N"; 308 DST = dstTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
309 } 309 }
310 310
311 break; 311 break;
312 } 312 }
313 } 313 }
@@ -417,7 +417,7 @@ namespace OpenSim.Services.LLLoginService
417// try 417// try
418// { 418// {
419// // First try to fetch DST from Pacific Standard Time, because this is 419// // First try to fetch DST from Pacific Standard Time, because this is
420// // the one expected by the viewer. "US/Pacific" is the string to search 420// // the one expected by the viewer. "US/Pacific" is the string to search
421// // on linux and mac, and should work also on Windows (to confirm) 421// // on linux and mac, and should work also on Windows (to confirm)
422// gridTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific"); 422// gridTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific");
423// } 423// }
@@ -447,7 +447,7 @@ namespace OpenSim.Services.LLLoginService
447 ErrorReason = "key"; 447 ErrorReason = "key";
448 welcomeMessage = "Welcome to OpenSim!"; 448 welcomeMessage = "Welcome to OpenSim!";
449 seedCapability = String.Empty; 449 seedCapability = String.Empty;
450 home = "{'region_handle':[" 450 home = "{'region_handle':["
451 + "r" + Util.RegionToWorldLoc(1000).ToString() 451 + "r" + Util.RegionToWorldLoc(1000).ToString()
452 + "," 452 + ","
453 + "r" + Util.RegionToWorldLoc(1000).ToString() 453 + "r" + Util.RegionToWorldLoc(1000).ToString()
@@ -593,7 +593,7 @@ namespace OpenSim.Services.LLLoginService
593 // responseData["real_currency"] = currency; 593 // responseData["real_currency"] = currency;
594 responseData["currency"] = currency; 594 responseData["currency"] = currency;
595 } 595 }
596 596
597 if (ClassifiedFee != String.Empty) 597 if (ClassifiedFee != String.Empty)
598 responseData["classified_fee"] = ClassifiedFee; 598 responseData["classified_fee"] = ClassifiedFee;
599 599
@@ -1070,7 +1070,7 @@ namespace OpenSim.Services.LLLoginService
1070 get { return activeGestures; } 1070 get { return activeGestures; }
1071 set { activeGestures = value; } 1071 set { activeGestures = value; }
1072 } 1072 }
1073 1073
1074 public string Home 1074 public string Home
1075 { 1075 {
1076 get { return home; } 1076 get { return home; }
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 2941f51..fc45f86 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Services.LLLoginService
131 m_AllowedClients = Util.GetConfigVarFromSections<string>( 131 m_AllowedClients = Util.GetConfigVarFromSections<string>(
132 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); 132 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
133 m_DeniedClients = Util.GetConfigVarFromSections<string>( 133 m_DeniedClients = Util.GetConfigVarFromSections<string>(
134 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); 134 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
135 135
136 m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); 136 m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty);
137 m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); 137 m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time");
@@ -180,13 +180,13 @@ namespace OpenSim.Services.LLLoginService
180 string hgInvServicePlugin = m_LoginServerConfig.GetString("HGInventoryServicePlugin", String.Empty); 180 string hgInvServicePlugin = m_LoginServerConfig.GetString("HGInventoryServicePlugin", String.Empty);
181 if (hgInvServicePlugin != string.Empty) 181 if (hgInvServicePlugin != string.Empty)
182 { 182 {
183 // TODO: Remove HGInventoryServiceConstructorArg after 0.9 release 183 // TODO: Remove HGInventoryServiceConstructorArg after 0.9 release
184 string hgInvServiceArg = m_LoginServerConfig.GetString("HGInventoryServiceConstructorArg", String.Empty); 184 string hgInvServiceArg = m_LoginServerConfig.GetString("HGInventoryServiceConstructorArg", String.Empty);
185 if (hgInvServiceArg != String.Empty) 185 if (hgInvServiceArg != String.Empty)
186 { 186 {
187 m_log.Warn("[LLOGIN SERVICE]: You are using HGInventoryServiceConstructorArg, which is deprecated. See example file for correct syntax."); 187 m_log.Warn("[LLOGIN SERVICE]: You are using HGInventoryServiceConstructorArg, which is deprecated. See example file for correct syntax.");
188 hgInvServicePlugin = hgInvServiceArg + "@" + hgInvServicePlugin; 188 hgInvServicePlugin = hgInvServiceArg + "@" + hgInvServicePlugin;
189 } 189 }
190 m_HGInventoryService = ServerUtils.LoadPlugin<IInventoryService>(hgInvServicePlugin, args); 190 m_HGInventoryService = ServerUtils.LoadPlugin<IInventoryService>(hgInvServicePlugin, args);
191 } 191 }
192 192
@@ -270,7 +270,7 @@ namespace OpenSim.Services.LLLoginService
270 return response; 270 return response;
271 } 271 }
272 272
273 public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, 273 public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
274 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) 274 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient)
275 { 275 {
276 bool success = false; 276 bool success = false;
@@ -283,7 +283,7 @@ namespace OpenSim.Services.LLLoginService
283 283
284 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", 284 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ",
285 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); 285 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString());
286 286
287 try 287 try
288 { 288 {
289 // 289 //
@@ -452,7 +452,7 @@ namespace OpenSim.Services.LLLoginService
452 guinfo = new GridUserInfo(); 452 guinfo = new GridUserInfo();
453 guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); 453 guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30);
454 } 454 }
455 455
456 // 456 //
457 // Find the destination region/grid 457 // Find the destination region/grid
458 // 458 //
@@ -494,7 +494,7 @@ namespace OpenSim.Services.LLLoginService
494 // 494 //
495 string reason = string.Empty; 495 string reason = string.Empty;
496 GridRegion dest; 496 GridRegion dest;
497 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, 497 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
498 clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest); 498 clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest);
499 destination = dest; 499 destination = dest;
500 if (aCircuit == null) 500 if (aCircuit == null)
@@ -504,7 +504,7 @@ namespace OpenSim.Services.LLLoginService
504 return new LLFailedLoginResponse("key", reason, "false"); 504 return new LLFailedLoginResponse("key", reason, "false");
505 505
506 } 506 }
507 // Get Friends list 507 // Get Friends list
508 FriendInfo[] friendsList = new FriendInfo[0]; 508 FriendInfo[] friendsList = new FriendInfo[0];
509 if (m_FriendsService != null) 509 if (m_FriendsService != null)
510 { 510 {
@@ -587,7 +587,7 @@ namespace OpenSim.Services.LLLoginService
587 lookAt = pinfo.HomeLookAt; 587 lookAt = pinfo.HomeLookAt;
588 flags |= TeleportFlags.ViaHome; 588 flags |= TeleportFlags.ViaHome;
589 } 589 }
590 590
591 if (tryDefaults) 591 if (tryDefaults)
592 { 592 {
593 List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); 593 List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID);
@@ -648,7 +648,7 @@ namespace OpenSim.Services.LLLoginService
648 position = pinfo.LastPosition; 648 position = pinfo.LastPosition;
649 lookAt = pinfo.LastLookAt; 649 lookAt = pinfo.LastLookAt;
650 } 650 }
651 651
652 return region; 652 return region;
653 } 653 }
654 else 654 else
@@ -684,7 +684,7 @@ namespace OpenSim.Services.LLLoginService
684 regions = m_GridService.GetDefaultRegions(scopeID); 684 regions = m_GridService.GetDefaultRegions(scopeID);
685 if (regions != null && regions.Count > 0) 685 if (regions != null && regions.Count > 0)
686 { 686 {
687 where = "safe"; 687 where = "safe";
688 return regions[0]; 688 return regions[0];
689 } 689 }
690 else 690 else
@@ -719,7 +719,7 @@ namespace OpenSim.Services.LLLoginService
719 return null; 719 return null;
720 } 720 }
721 // Valid specification of a remote grid 721 // Valid specification of a remote grid
722 722
723 regionName = parts[0]; 723 regionName = parts[0];
724 string domainLocator = parts[1]; 724 string domainLocator = parts[1];
725 parts = domainLocator.Split(new char[] {':'}); 725 parts = domainLocator.Split(new char[] {':'});
@@ -737,7 +737,7 @@ namespace OpenSim.Services.LLLoginService
737 List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); 737 List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID);
738 if (defaults != null && defaults.Count > 0) 738 if (defaults != null && defaults.Count > 0)
739 { 739 {
740 where = "safe"; 740 where = "safe";
741 return defaults[0]; 741 return defaults[0];
742 } 742 }
743 else 743 else
@@ -798,7 +798,7 @@ namespace OpenSim.Services.LLLoginService
798 string homeURI = null; 798 string homeURI = null;
799 if (account.ServiceURLs != null && account.ServiceURLs.ContainsKey("HomeURI")) 799 if (account.ServiceURLs != null && account.ServiceURLs.ContainsKey("HomeURI"))
800 homeURI = (string)account.ServiceURLs["HomeURI"]; 800 homeURI = (string)account.ServiceURLs["HomeURI"];
801 801
802 GridRegion destination = m_GatekeeperConnector.GetHyperlinkRegion(gatekeeper, regionID, account.PrincipalID, homeURI, out message); 802 GridRegion destination = m_GatekeeperConnector.GetHyperlinkRegion(gatekeeper, regionID, account.PrincipalID, homeURI, out message);
803 return destination; 803 return destination;
804 } 804 }
@@ -917,8 +917,8 @@ namespace OpenSim.Services.LLLoginService
917 return null; 917 return null;
918 } 918 }
919 919
920 private AgentCircuitData MakeAgent(GridRegion region, UserAccount account, 920 private AgentCircuitData MakeAgent(GridRegion region, UserAccount account,
921 AvatarAppearance avatar, UUID session, UUID secureSession, uint circuit, Vector3 position, 921 AvatarAppearance avatar, UUID session, UUID secureSession, uint circuit, Vector3 position,
922 string ipaddress, string viewer, string channel, string mac, string id0) 922 string ipaddress, string viewer, string channel, string mac, string id0)
923 { 923 {
924 AgentCircuitData aCircuit = new AgentCircuitData(); 924 AgentCircuitData aCircuit = new AgentCircuitData();
@@ -956,7 +956,7 @@ namespace OpenSim.Services.LLLoginService
956 if (account.ServiceURLs == null) 956 if (account.ServiceURLs == null)
957 return; 957 return;
958 958
959 // Old style: get the service keys from the DB 959 // Old style: get the service keys from the DB
960 foreach (KeyValuePair<string, object> kvp in account.ServiceURLs) 960 foreach (KeyValuePair<string, object> kvp in account.ServiceURLs)
961 { 961 {
962 if (kvp.Value != null) 962 if (kvp.Value != null)
@@ -1053,7 +1053,7 @@ namespace OpenSim.Services.LLLoginService
1053 switch (subcommand) 1053 switch (subcommand)
1054 { 1054 {
1055 case "level": 1055 case "level":
1056 // Set the minimum level to allow login 1056 // Set the minimum level to allow login
1057 // Useful to allow grid update without worrying about users. 1057 // Useful to allow grid update without worrying about users.
1058 // or fixing critical issues 1058 // or fixing critical issues
1059 // 1059 //
diff --git a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
index ee9c333..005ddd8 100644
--- a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.LLLoginService")] 8[assembly: AssemblyTitle("OpenSim.Services.LLLoginService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs
index 7249e70..c90f5bd 100644
--- a/OpenSim/Services/MapImageService/MapImageService.cs
+++ b/OpenSim/Services/MapImageService/MapImageService.cs
@@ -23,8 +23,8 @@
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * 26 *
27 * The design of this map service is based on SimianGrid's PHP-based 27 * The design of this map service is based on SimianGrid's PHP-based
28 * map service. See this URL for the original PHP version: 28 * map service. See this URL for the original PHP version:
29 * https://github.com/openmetaversefoundation/simiangrid/ 29 * https://github.com/openmetaversefoundation/simiangrid/
30 */ 30 */
@@ -291,7 +291,7 @@ namespace OpenSim.Services.MapImageService
291 { 291 {
292 try 292 try
293 { 293 {
294 if (File.Exists(fileName)) 294 if (File.Exists(fileName))
295 return new Bitmap(fileName); 295 return new Bitmap(fileName);
296 296
297 else 297 else
diff --git a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
index 53a33d6..8f4b9b9 100644
--- a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.MapImageService")] 8[assembly: AssemblyTitle("OpenSim.Services.MapImageService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 0fe0200..ae92919 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Services.PresenceService
71 data.SessionID = sessionID; 71 data.SessionID = sessionID;
72 data.Data = new Dictionary<string, string>(); 72 data.Data = new Dictionary<string, string>();
73 data.Data["SecureSessionID"] = secureSessionID.ToString(); 73 data.Data["SecureSessionID"] = secureSessionID.ToString();
74 74
75 m_Database.Store(data); 75 m_Database.Store(data);
76 76
77 string prevUserStr = ""; 77 string prevUserStr = "";
@@ -80,7 +80,7 @@ namespace OpenSim.Services.PresenceService
80 80
81 m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}", 81 m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}",
82 data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr); 82 data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr);
83 83
84 return true; 84 return true;
85 } 85 }
86 86
@@ -92,7 +92,7 @@ namespace OpenSim.Services.PresenceService
92 sessionID, 92 sessionID,
93 (presence == null) ? null : presence.UserID, 93 (presence == null) ? null : presence.UserID,
94 (presence == null) ? null : presence.RegionID.ToString()); 94 (presence == null) ? null : presence.RegionID.ToString());
95 95
96 return m_Database.Delete("SessionID", sessionID.ToString()); 96 return m_Database.Delete("SessionID", sessionID.ToString());
97 } 97 }
98 98
@@ -144,7 +144,7 @@ namespace OpenSim.Services.PresenceService
144 public PresenceInfo GetAgent(UUID sessionID) 144 public PresenceInfo GetAgent(UUID sessionID)
145 { 145 {
146 PresenceInfo ret = new PresenceInfo(); 146 PresenceInfo ret = new PresenceInfo();
147 147
148 PresenceData data = m_Database.Get(sessionID); 148 PresenceData data = m_Database.Get(sessionID);
149 if (data == null) 149 if (data == null)
150 return null; 150 return null;
diff --git a/OpenSim/Services/PresenceService/PresenceServiceBase.cs b/OpenSim/Services/PresenceService/PresenceServiceBase.cs
index a4adb2f..7647865 100644
--- a/OpenSim/Services/PresenceService/PresenceServiceBase.cs
+++ b/OpenSim/Services/PresenceService/PresenceServiceBase.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.PresenceService
68 connString = presenceConfig.GetString("ConnectionString", connString); 68 connString = presenceConfig.GetString("ConnectionString", connString);
69 realm = presenceConfig.GetString("Realm", realm); 69 realm = presenceConfig.GetString("Realm", realm);
70 } 70 }
71 71
72 // 72 //
73 // We tried, but this doesn't exist. We can't proceed. 73 // We tried, but this doesn't exist. We can't proceed.
74 // 74 //
diff --git a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
index af6ec65..a79bc9f 100644
--- a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.PresenceService")] 8[assembly: AssemblyTitle("OpenSim.Services.PresenceService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/UserAccountService/AgentPreferencesService.cs b/OpenSim/Services/UserAccountService/AgentPreferencesService.cs
index 5013152..c473d4a 100644
--- a/OpenSim/Services/UserAccountService/AgentPreferencesService.cs
+++ b/OpenSim/Services/UserAccountService/AgentPreferencesService.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Services.UserAccountService
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 public AgentPreferencesService(IConfigSource config) : base(config) 44 public AgentPreferencesService(IConfigSource config) : base(config)
45 { 45 {
46 m_log.Debug("[AGENT PREFERENCES SERVICE]: Starting agent preferences service"); 46 m_log.Debug("[AGENT PREFERENCES SERVICE]: Starting agent preferences service");
47 } 47 }
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index e4bcf15..3cb672e 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Services.UserAccountService
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 private static bool m_Initialized; 46 private static bool m_Initialized;
47 47
48 public GridUserService(IConfigSource config) : base(config) 48 public GridUserService(IConfigSource config) : base(config)
49 { 49 {
50 m_log.Debug("[GRID USER SERVICE]: Starting user grid service"); 50 m_log.Debug("[GRID USER SERVICE]: Starting user grid service");
51 51
diff --git a/OpenSim/Services/UserAccountService/GridUserServiceBase.cs b/OpenSim/Services/UserAccountService/GridUserServiceBase.cs
index 8c5f5df..f9a7260 100644
--- a/OpenSim/Services/UserAccountService/GridUserServiceBase.cs
+++ b/OpenSim/Services/UserAccountService/GridUserServiceBase.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Services.UserAccountService
67 connString = usersConfig.GetString("ConnectionString", connString); 67 connString = usersConfig.GetString("ConnectionString", connString);
68 realm = usersConfig.GetString("Realm", realm); 68 realm = usersConfig.GetString("Realm", realm);
69 } 69 }
70 70
71 // 71 //
72 // We tried, but this doesn't exist. We can't proceed. 72 // We tried, but this doesn't exist. We can't proceed.
73 // 73 //
diff --git a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs
index 77ca083..0c1464d 100644
--- a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.UserAccountService")] 8[assembly: AssemblyTitle("OpenSim.Services.UserAccountService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index 706d475..7120aeb 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -764,7 +764,7 @@ namespace OpenSim.Services.UserAccountService
764 string[] modelSpecifiers = model.Split(); 764 string[] modelSpecifiers = model.Split();
765 if (modelSpecifiers.Length != 2) 765 if (modelSpecifiers.Length != 2)
766 { 766 {
767 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Invalid model name \'{0}\'. Falling back to Ruth for {1}", 767 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Invalid model name \'{0}\'. Falling back to Ruth for {1}",
768 model, destinationAgent); 768 model, destinationAgent);
769 CreateDefaultAppearanceEntries(destinationAgent); 769 CreateDefaultAppearanceEntries(destinationAgent);
770 return; 770 return;
@@ -774,7 +774,7 @@ namespace OpenSim.Services.UserAccountService
774 UserAccount modelAccount = GetUserAccount(UUID.Zero, modelSpecifiers[0], modelSpecifiers[1]); 774 UserAccount modelAccount = GetUserAccount(UUID.Zero, modelSpecifiers[0], modelSpecifiers[1]);
775 if (modelAccount == null) 775 if (modelAccount == null)
776 { 776 {
777 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Requested model \'{0}\' not found. Falling back to Ruth for {1}", 777 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Requested model \'{0}\' not found. Falling back to Ruth for {1}",
778 model, destinationAgent); 778 model, destinationAgent);
779 CreateDefaultAppearanceEntries(destinationAgent); 779 CreateDefaultAppearanceEntries(destinationAgent);
780 return; 780 return;
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
index 9a52e02..76aa093 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Services.ProfilesService
45 static readonly ILog m_log = 45 static readonly ILog m_log =
46 LogManager.GetLogger( 46 LogManager.GetLogger(
47 MethodBase.GetCurrentMethod().DeclaringType); 47 MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 IUserAccountService userAccounts; 49 IUserAccountService userAccounts;
50 50
51 public UserProfilesService(IConfigSource config, string configName): 51 public UserProfilesService(IConfigSource config, string configName):
@@ -58,23 +58,23 @@ namespace OpenSim.Services.ProfilesService
58 return; 58 return;
59 } 59 }
60 Object[] args = null; 60 Object[] args = null;
61 61
62 args = new Object[] { config }; 62 args = new Object[] { config };
63 string accountService = Config.GetString("UserAccountService", String.Empty); 63 string accountService = Config.GetString("UserAccountService", String.Empty);
64 if (accountService != string.Empty) 64 if (accountService != string.Empty)
65 userAccounts = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); 65 userAccounts = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
66 66
67 args = new Object[] { config }; 67 args = new Object[] { config };
68 } 68 }
69 69
70 #region Classifieds 70 #region Classifieds
71 public OSD AvatarClassifiedsRequest(UUID creatorId) 71 public OSD AvatarClassifiedsRequest(UUID creatorId)
72 { 72 {
73 OSDArray records = ProfilesData.GetClassifiedRecords(creatorId); 73 OSDArray records = ProfilesData.GetClassifiedRecords(creatorId);
74 74
75 return records; 75 return records;
76 } 76 }
77 77
78 public bool ClassifiedUpdate(UserClassifiedAdd ad, ref string result) 78 public bool ClassifiedUpdate(UserClassifiedAdd ad, ref string result)
79 { 79 {
80 if(!ProfilesData.UpdateClassifiedRecord(ad, ref result)) 80 if(!ProfilesData.UpdateClassifiedRecord(ad, ref result))
@@ -84,74 +84,74 @@ namespace OpenSim.Services.ProfilesService
84 result = "success"; 84 result = "success";
85 return true; 85 return true;
86 } 86 }
87 87
88 public bool ClassifiedDelete(UUID recordId) 88 public bool ClassifiedDelete(UUID recordId)
89 { 89 {
90 if(ProfilesData.DeleteClassifiedRecord(recordId)) 90 if(ProfilesData.DeleteClassifiedRecord(recordId))
91 return true; 91 return true;
92 92
93 return false; 93 return false;
94 } 94 }
95 95
96 public bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result) 96 public bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result)
97 { 97 {
98 if(ProfilesData.GetClassifiedInfo(ref ad, ref result)) 98 if(ProfilesData.GetClassifiedInfo(ref ad, ref result))
99 return true; 99 return true;
100 100
101 return false; 101 return false;
102 } 102 }
103 #endregion Classifieds 103 #endregion Classifieds
104 104
105 #region Picks 105 #region Picks
106 public OSD AvatarPicksRequest(UUID creatorId) 106 public OSD AvatarPicksRequest(UUID creatorId)
107 { 107 {
108 OSDArray records = ProfilesData.GetAvatarPicks(creatorId); 108 OSDArray records = ProfilesData.GetAvatarPicks(creatorId);
109 109
110 return records; 110 return records;
111 } 111 }
112 112
113 public bool PickInfoRequest(ref UserProfilePick pick, ref string result) 113 public bool PickInfoRequest(ref UserProfilePick pick, ref string result)
114 { 114 {
115 pick = ProfilesData.GetPickInfo(pick.CreatorId, pick.PickId); 115 pick = ProfilesData.GetPickInfo(pick.CreatorId, pick.PickId);
116 result = "OK"; 116 result = "OK";
117 return true; 117 return true;
118 } 118 }
119 119
120 public bool PicksUpdate(ref UserProfilePick pick, ref string result) 120 public bool PicksUpdate(ref UserProfilePick pick, ref string result)
121 { 121 {
122 return ProfilesData.UpdatePicksRecord(pick); 122 return ProfilesData.UpdatePicksRecord(pick);
123 } 123 }
124 124
125 public bool PicksDelete(UUID pickId) 125 public bool PicksDelete(UUID pickId)
126 { 126 {
127 return ProfilesData.DeletePicksRecord(pickId); 127 return ProfilesData.DeletePicksRecord(pickId);
128 } 128 }
129 #endregion Picks 129 #endregion Picks
130 130
131 #region Notes 131 #region Notes
132 public bool AvatarNotesRequest(ref UserProfileNotes note) 132 public bool AvatarNotesRequest(ref UserProfileNotes note)
133 { 133 {
134 return ProfilesData.GetAvatarNotes(ref note); 134 return ProfilesData.GetAvatarNotes(ref note);
135 } 135 }
136 136
137 public bool NotesUpdate(ref UserProfileNotes note, ref string result) 137 public bool NotesUpdate(ref UserProfileNotes note, ref string result)
138 { 138 {
139 return ProfilesData.UpdateAvatarNotes(ref note, ref result); 139 return ProfilesData.UpdateAvatarNotes(ref note, ref result);
140 } 140 }
141 #endregion Notes 141 #endregion Notes
142 142
143 #region Profile Properties 143 #region Profile Properties
144 public bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result) 144 public bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result)
145 { 145 {
146 return ProfilesData.GetAvatarProperties(ref prop, ref result); 146 return ProfilesData.GetAvatarProperties(ref prop, ref result);
147 } 147 }
148 148
149 public bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result) 149 public bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result)
150 { 150 {
151 return ProfilesData.UpdateAvatarProperties(ref prop, ref result); 151 return ProfilesData.UpdateAvatarProperties(ref prop, ref result);
152 } 152 }
153 #endregion Profile Properties 153 #endregion Profile Properties
154 154
155 #region Interests 155 #region Interests
156 public bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result) 156 public bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result)
157 { 157 {
@@ -254,7 +254,7 @@ namespace OpenSim.Services.ProfilesService
254 { 254 {
255 return ProfilesData.GetUserAppData(ref prop, ref result); 255 return ProfilesData.GetUserAppData(ref prop, ref result);
256 } 256 }
257 257
258 public bool SetUserAppData(UserAppData prop, ref string result) 258 public bool SetUserAppData(UserAppData prop, ref string result)
259 { 259 {
260 return true; 260 return true;
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs b/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs
index c31578f..48b43a6 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.ProfilesService
68 if (string.IsNullOrEmpty(connString)) 68 if (string.IsNullOrEmpty(connString))
69 connString = dbConfig.GetString("ConnectionString", String.Empty); 69 connString = dbConfig.GetString("ConnectionString", String.Empty);
70 } 70 }
71 71
72 IConfig ProfilesConfig = config.Configs[configName]; 72 IConfig ProfilesConfig = config.Configs[configName];
73 if (ProfilesConfig != null) 73 if (ProfilesConfig != null)
74 { 74 {
@@ -76,7 +76,7 @@ namespace OpenSim.Services.ProfilesService
76 connString = ProfilesConfig.GetString("ConnectionString", connString); 76 connString = ProfilesConfig.GetString("ConnectionString", connString);
77 realm = ProfilesConfig.GetString("Realm", realm); 77 realm = ProfilesConfig.GetString("Realm", realm);
78 } 78 }
79 79
80 ProfilesData = LoadPlugin<IProfilesData>(dllName, new Object[] { connString }); 80 ProfilesData = LoadPlugin<IProfilesData>(dllName, new Object[] { connString });
81 if (ProfilesData == null) 81 if (ProfilesData == null)
82 throw new Exception("Could not find a storage interface in the given module"); 82 throw new Exception("Could not find a storage interface in the given module");
diff --git a/OpenSim/Tests/Clients/Grid/GridClient.cs b/OpenSim/Tests/Clients/Grid/GridClient.cs
index fed7a16..7d3aee3 100644
--- a/OpenSim/Tests/Clients/Grid/GridClient.cs
+++ b/OpenSim/Tests/Clients/Grid/GridClient.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Tests.Clients.GridClient
47// private static readonly ILog m_log = 47// private static readonly ILog m_log =
48// LogManager.GetLogger( 48// LogManager.GetLogger(
49// MethodBase.GetCurrentMethod().DeclaringType); 49// MethodBase.GetCurrentMethod().DeclaringType);
50 50
51 public static void Main(string[] args) 51 public static void Main(string[] args)
52 { 52 {
53 ConsoleAppender consoleAppender = new ConsoleAppender(); 53 ConsoleAppender consoleAppender = new ConsoleAppender();
@@ -62,7 +62,7 @@ namespace OpenSim.Tests.Clients.GridClient
62 GridRegion r2 = CreateRegion("Test Region 2", 1001, 1000); 62 GridRegion r2 = CreateRegion("Test Region 2", 1001, 1000);
63 GridRegion r3 = CreateRegion("Test Region 3", 1005, 1000); 63 GridRegion r3 = CreateRegion("Test Region 3", 1005, 1000);
64 64
65 Console.WriteLine("[GRID CLIENT]: *** Registering region 1"); 65 Console.WriteLine("[GRID CLIENT]: *** Registering region 1");
66 string msg = m_Connector.RegisterRegion(UUID.Zero, r1); 66 string msg = m_Connector.RegisterRegion(UUID.Zero, r1);
67 if (msg == String.Empty) 67 if (msg == String.Empty)
68 Console.WriteLine("[GRID CLIENT]: Successfully registered region 1"); 68 Console.WriteLine("[GRID CLIENT]: Successfully registered region 1");
@@ -149,7 +149,7 @@ namespace OpenSim.Tests.Clients.GridClient
149 Console.WriteLine("[GRID CLIENT]: GetRegionsByName returned " + regions.Count + " regions"); 149 Console.WriteLine("[GRID CLIENT]: GetRegionsByName returned " + regions.Count + " regions");
150 150
151 Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)"); 151 Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)");
152 regions = m_Connector.GetRegionRange(UUID.Zero, 152 regions = m_Connector.GetRegionRange(UUID.Zero,
153 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002), 153 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002),
154 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) ); 154 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) );
155 if (regions == null) 155 if (regions == null)
@@ -198,7 +198,7 @@ namespace OpenSim.Tests.Clients.GridClient
198 region.ExternalHostName = "127.0.0.1"; 198 region.ExternalHostName = "127.0.0.1";
199 region.HttpPort = 9000; 199 region.HttpPort = 9000;
200 region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000); 200 region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000);
201 201
202 return region; 202 return region;
203 } 203 }
204 } 204 }
diff --git a/OpenSim/Tests/Common/DatabaseTestAttribute.cs b/OpenSim/Tests/Common/DatabaseTestAttribute.cs
index d027d59..d6a03cd 100644
--- a/OpenSim/Tests/Common/DatabaseTestAttribute.cs
+++ b/OpenSim/Tests/Common/DatabaseTestAttribute.cs
@@ -32,13 +32,13 @@ using NUnit.Framework;
32 32
33namespace OpenSim.Tests.Common 33namespace OpenSim.Tests.Common
34{ 34{
35 [AttributeUsage(AttributeTargets.All, 35 [AttributeUsage(AttributeTargets.All,
36 AllowMultiple=false, 36 AllowMultiple=false,
37 Inherited=true)] 37 Inherited=true)]
38 public class DatabaseTestAttribute : LongRunningAttribute 38 public class DatabaseTestAttribute : LongRunningAttribute
39 { 39 {
40 public DatabaseTestAttribute() : base("Database") 40 public DatabaseTestAttribute() : base("Database")
41 { 41 {
42 } 42 }
43 } 43 }
44} \ No newline at end of file 44} \ No newline at end of file
diff --git a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs
index 7af8bed..974da4c 100644
--- a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Tests.Common
66 { 66 {
67 return CreateAsset(assetId, AssetType.Notecard, text, UUID.Random()); 67 return CreateAsset(assetId, AssetType.Notecard, text, UUID.Random());
68 } 68 }
69 69
70// /// <summary> 70// /// <summary>
71// /// Create and store a notecard asset with a random uuid and dummy text. 71// /// Create and store a notecard asset with a random uuid and dummy text.
72// /// </summary> 72// /// </summary>
@@ -92,7 +92,7 @@ namespace OpenSim.Tests.Common
92 { 92 {
93 return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), sog); 93 return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), sog);
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Create an asset from the given object. 97 /// Create an asset from the given object.
98 /// </summary> 98 /// </summary>
@@ -102,12 +102,12 @@ namespace OpenSim.Tests.Common
102 public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) 102 public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog)
103 { 103 {
104 return CreateAsset( 104 return CreateAsset(
105 assetUuid, 105 assetUuid,
106 AssetType.Object, 106 AssetType.Object,
107 Encoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)), 107 Encoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(sog)),
108 sog.OwnerID); 108 sog.OwnerID);
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
112 /// Create an asset from the given scene object. 112 /// Create an asset from the given scene object.
113 /// </summary> 113 /// </summary>
@@ -120,8 +120,8 @@ namespace OpenSim.Tests.Common
120 public static AssetBase CreateAsset(int assetUuidTail, CoalescedSceneObjects coa) 120 public static AssetBase CreateAsset(int assetUuidTail, CoalescedSceneObjects coa)
121 { 121 {
122 return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), coa); 122 return CreateAsset(new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", assetUuidTail)), coa);
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
126 /// Create an asset from the given scene object. 126 /// Create an asset from the given scene object.
127 /// </summary> 127 /// </summary>
@@ -131,12 +131,12 @@ namespace OpenSim.Tests.Common
131 public static AssetBase CreateAsset(UUID assetUuid, CoalescedSceneObjects coa) 131 public static AssetBase CreateAsset(UUID assetUuid, CoalescedSceneObjects coa)
132 { 132 {
133 return CreateAsset( 133 return CreateAsset(
134 assetUuid, 134 assetUuid,
135 AssetType.Object, 135 AssetType.Object,
136 Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)), 136 Encoding.ASCII.GetBytes(CoalescedSceneObjectsSerializer.ToXml(coa)),
137 coa.CreatorId); 137 coa.CreatorId);
138 } 138 }
139 139
140 /// <summary> 140 /// <summary>
141 /// Create an asset from the given data. 141 /// Create an asset from the given data.
142 /// </summary> 142 /// </summary>
@@ -148,7 +148,7 @@ namespace OpenSim.Tests.Common
148 148
149 return CreateAsset(assetUuid, assetType, anc.AssetData, creatorID); 149 return CreateAsset(assetUuid, assetType, anc.AssetData, creatorID);
150 } 150 }
151 151
152 /// <summary> 152 /// <summary>
153 /// Create an asset from the given data. 153 /// Create an asset from the given data.
154 /// </summary> 154 /// </summary>
@@ -158,9 +158,9 @@ namespace OpenSim.Tests.Common
158 asset.Data = data; 158 asset.Data = data;
159 return asset; 159 return asset;
160 } 160 }
161 161
162 public static string ReadAssetAsString(IAssetService assetService, UUID uuid) 162 public static string ReadAssetAsString(IAssetService assetService, UUID uuid)
163 { 163 {
164 byte[] assetData = assetService.GetData(uuid.ToString()); 164 byte[] assetData = assetService.GetData(uuid.ToString());
165 return Encoding.ASCII.GetString(assetData); 165 return Encoding.ASCII.GetString(assetData);
166 } 166 }
diff --git a/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs b/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs
index 82ecf9a..b27c719 100644
--- a/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/BaseRequestHandlerHelpers.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Tests.Common
59 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(null), "Failed on null."); 59 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(null), "Failed on null.");
60 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(""), "Failed on empty path."); 60 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(""), "Failed on empty path.");
61 Assert.AreEqual(m_emptyStringArray, handler.SplitParams("corruptUrl"), "Failed on corrupt url."); 61 Assert.AreEqual(m_emptyStringArray, handler.SplitParams("corruptUrl"), "Failed on corrupt url.");
62 62
63 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath), "Failed on empty params."); 63 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath), "Failed on empty params.");
64 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath + "/"), "Failed on single slash."); 64 Assert.AreEqual(m_emptyStringArray, handler.SplitParams(assetsPath + "/"), "Failed on single slash.");
65 65
diff --git a/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs b/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs
index df9f6f2..753830f 100644
--- a/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/ClientStackHelpers.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Tests.Common
48 { 48 {
49 public static ScenePresence AddChildClient( 49 public static ScenePresence AddChildClient(
50 Scene scene, LLUDPServer udpServer, UUID agentId, UUID sessionId, uint circuitCode) 50 Scene scene, LLUDPServer udpServer, UUID agentId, UUID sessionId, uint circuitCode)
51 { 51 {
52 IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); 52 IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999);
53 53
54 UseCircuitCodePacket uccp = new UseCircuitCodePacket(); 54 UseCircuitCodePacket uccp = new UseCircuitCodePacket();
diff --git a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
index 1f6233d..b0c9596 100644
--- a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Tests.Common
56 /// </summary> 56 /// </summary>
57 /// <param name='tc'></param> 57 /// <param name='tc'></param>
58 /// <param name='neighbourTcs'> 58 /// <param name='neighbourTcs'>
59 /// A list that will be populated with any TestClients set up in response to 59 /// A list that will be populated with any TestClients set up in response to
60 /// being informed about a destination region. 60 /// being informed about a destination region.
61 /// </param> 61 /// </param>
62 public static void SetupInformClientOfNeighbourTriggersNeighbourClientCreate( 62 public static void SetupInformClientOfNeighbourTriggersNeighbourClientCreate(
@@ -71,7 +71,7 @@ namespace OpenSim.Tests.Common
71 Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y); 71 Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y);
72 72
73 m_log.DebugFormat( 73 m_log.DebugFormat(
74 "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", 74 "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}",
75 x, y, neighbourExternalEndPoint); 75 x, y, neighbourExternalEndPoint);
76 76
77 AgentCircuitData newAgent = tc.RequestClientInfo(); 77 AgentCircuitData newAgent = tc.RequestClientInfo();
@@ -91,20 +91,20 @@ namespace OpenSim.Tests.Common
91 /// </summary> 91 /// </summary>
92 /// <param name='tc'></param> 92 /// <param name='tc'></param>
93 /// <param name='neighbourTcs'> 93 /// <param name='neighbourTcs'>
94 /// A list that will be populated with any TestClients set up in response to 94 /// A list that will be populated with any TestClients set up in response to
95 /// being informed about a destination region. 95 /// being informed about a destination region.
96 /// </param> 96 /// </param>
97 public static void SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement( 97 public static void SetupSendRegionTeleportTriggersDestinationClientCreateAndCompleteMovement(
98 TestClient client, List<TestClient> destinationClients) 98 TestClient client, List<TestClient> destinationClients)
99 { 99 {
100 client.OnTestClientSendRegionTeleport 100 client.OnTestClientSendRegionTeleport
101 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) => 101 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) =>
102 { 102 {
103 uint x, y; 103 uint x, y;
104 Util.RegionHandleToRegionLoc(regionHandle, out x, out y); 104 Util.RegionHandleToRegionLoc(regionHandle, out x, out y);
105 105
106 m_log.DebugFormat( 106 m_log.DebugFormat(
107 "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", 107 "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}",
108 x, y, regionExternalEndPoint); 108 x, y, regionExternalEndPoint);
109 109
110 AgentCircuitData newAgent = client.RequestClientInfo(); 110 AgentCircuitData newAgent = client.RequestClientInfo();
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index f8485e0..fbd7e90 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Tests.Common
102 102
103 m_physicsScene = StartPhysicsScene(); 103 m_physicsScene = StartPhysicsScene();
104 104
105 SimDataService 105 SimDataService
106 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); 106 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null);
107 } 107 }
108 108
@@ -146,7 +146,7 @@ namespace OpenSim.Tests.Common
146 146
147 // We must set up a console otherwise setup of some modules may fail 147 // We must set up a console otherwise setup of some modules may fail
148 MainConsole.Instance = new MockConsole(); 148 MainConsole.Instance = new MockConsole();
149 149
150 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); 150 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
151 regInfo.RegionName = name; 151 regInfo.RegionName = name;
152 regInfo.RegionID = id; 152 regInfo.RegionID = id;
@@ -199,13 +199,13 @@ namespace OpenSim.Tests.Common
199 m_presenceService.AddRegion(testScene); 199 m_presenceService.AddRegion(testScene);
200 m_presenceService.RegionLoaded(testScene); 200 m_presenceService.RegionLoaded(testScene);
201 testScene.AddRegionModule(m_presenceService.Name, m_presenceService); 201 testScene.AddRegionModule(m_presenceService.Name, m_presenceService);
202 202
203 203
204 testScene.SetModuleInterfaces(); 204 testScene.SetModuleInterfaces();
205 205
206 testScene.LandChannel = new TestLandChannel(testScene); 206 testScene.LandChannel = new TestLandChannel(testScene);
207 testScene.LoadWorldMap(); 207 testScene.LoadWorldMap();
208 208
209 testScene.LoginsEnabled = true; 209 testScene.LoginsEnabled = true;
210 testScene.RegisterRegionWithGrid(); 210 testScene.RegisterRegionWithGrid();
211 211
@@ -217,10 +217,10 @@ namespace OpenSim.Tests.Common
217 private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache) 217 private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache)
218 { 218 {
219 IConfigSource config = new IniConfigSource(); 219 IConfigSource config = new IniConfigSource();
220 config.AddConfig("Modules"); 220 config.AddConfig("Modules");
221 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); 221 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
222 config.AddConfig("AssetService"); 222 config.AddConfig("AssetService");
223 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); 223 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
224 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 224 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
225 225
226 LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); 226 LocalAssetServicesConnector assetService = new LocalAssetServicesConnector();
@@ -235,7 +235,7 @@ namespace OpenSim.Tests.Common
235 235
236 cache.Initialise(cacheConfig); 236 cache.Initialise(cacheConfig);
237 } 237 }
238 238
239 return assetService; 239 return assetService;
240 } 240 }
241 241
@@ -257,7 +257,7 @@ namespace OpenSim.Tests.Common
257 257
258 private static LocalInventoryServicesConnector StartInventoryService() 258 private static LocalInventoryServicesConnector StartInventoryService()
259 { 259 {
260 IConfigSource config = new IniConfigSource(); 260 IConfigSource config = new IniConfigSource();
261 config.AddConfig("Modules"); 261 config.AddConfig("Modules");
262 config.AddConfig("InventoryService"); 262 config.AddConfig("InventoryService");
263 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); 263 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
@@ -266,8 +266,8 @@ namespace OpenSim.Tests.Common
266 266
267 LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector(); 267 LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector();
268 inventoryService.Initialise(config); 268 inventoryService.Initialise(config);
269 269
270 return inventoryService; 270 return inventoryService;
271 } 271 }
272 272
273 private static LocalGridServicesConnector StartGridService() 273 private static LocalGridServicesConnector StartGridService()
@@ -282,7 +282,7 @@ namespace OpenSim.Tests.Common
282 282
283 LocalGridServicesConnector gridService = new LocalGridServicesConnector(); 283 LocalGridServicesConnector gridService = new LocalGridServicesConnector();
284 gridService.Initialise(config); 284 gridService.Initialise(config);
285 285
286 return gridService; 286 return gridService;
287 } 287 }
288 288
@@ -303,7 +303,7 @@ namespace OpenSim.Tests.Common
303 303
304 LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector(); 304 LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector();
305 userAccountService.Initialise(config); 305 userAccountService.Initialise(config);
306 306
307 return userAccountService; 307 return userAccountService;
308 } 308 }
309 309
@@ -328,7 +328,7 @@ namespace OpenSim.Tests.Common
328 328
329 LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector(); 329 LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector();
330 presenceService.Initialise(config); 330 presenceService.Initialise(config);
331 331
332 return presenceService; 332 return presenceService;
333 } 333 }
334 334
@@ -384,8 +384,8 @@ namespace OpenSim.Tests.Common
384 /// </summary> 384 /// </summary>
385 /// <remarks> 385 /// <remarks>
386 /// If called directly, then all the modules must be shared modules. 386 /// If called directly, then all the modules must be shared modules.
387 /// 387 ///
388 /// We are emulating here the normal calls made to setup region modules 388 /// We are emulating here the normal calls made to setup region modules
389 /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). 389 /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()).
390 /// TODO: Need to reuse normal runtime module code. 390 /// TODO: Need to reuse normal runtime module code.
391 /// </remarks> 391 /// </remarks>
@@ -655,7 +655,7 @@ namespace OpenSim.Tests.Common
655 655
656 return so; 656 return so;
657 } 657 }
658 658
659 /// <summary> 659 /// <summary>
660 /// Create a scene object part. 660 /// Create a scene object part.
661 /// </summary> 661 /// </summary>
@@ -664,10 +664,10 @@ namespace OpenSim.Tests.Common
664 /// <param name="ownerId"></param> 664 /// <param name="ownerId"></param>
665 /// <returns></returns> 665 /// <returns></returns>
666 public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId) 666 public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId)
667 { 667 {
668 return new SceneObjectPart( 668 return new SceneObjectPart(
669 ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 669 ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
670 { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) }; 670 { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) };
671 } 671 }
672 672
673 /// <summary> 673 /// <summary>
@@ -682,10 +682,10 @@ namespace OpenSim.Tests.Common
682 /// <param name="ownerId"></param> 682 /// <param name="ownerId"></param>
683 /// <returns></returns> 683 /// <returns></returns>
684 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) 684 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId)
685 { 685 {
686 return CreateSceneObject(parts, ownerId, 0x1); 686 return CreateSceneObject(parts, ownerId, 0x1);
687 } 687 }
688 688
689 /// <summary> 689 /// <summary>
690 /// Create a scene object but do not add it to the scene. 690 /// Create a scene object but do not add it to the scene.
691 /// </summary> 691 /// </summary>
@@ -697,10 +697,10 @@ namespace OpenSim.Tests.Common
697 /// </param> 697 /// </param>
698 /// <returns></returns> 698 /// <returns></returns>
699 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail) 699 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail)
700 { 700 {
701 return CreateSceneObject(parts, ownerId, "", uuidTail); 701 return CreateSceneObject(parts, ownerId, "", uuidTail);
702 } 702 }
703 703
704 /// <summary> 704 /// <summary>
705 /// Create a scene object but do not add it to the scene. 705 /// Create a scene object but do not add it to the scene.
706 /// </summary> 706 /// </summary>
@@ -718,22 +718,22 @@ namespace OpenSim.Tests.Common
718 /// </param> 718 /// </param>
719 /// <returns></returns> 719 /// <returns></returns>
720 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail) 720 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail)
721 { 721 {
722 string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail); 722 string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail);
723 723
724 SceneObjectGroup sog 724 SceneObjectGroup sog
725 = new SceneObjectGroup( 725 = new SceneObjectGroup(
726 CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId)); 726 CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId));
727 727
728 if (parts > 1) 728 if (parts > 1)
729 for (int i = 2; i <= parts; i++) 729 for (int i = 2; i <= parts; i++)
730 sog.AddPart( 730 sog.AddPart(
731 CreateSceneObjectPart( 731 CreateSceneObjectPart(
732 string.Format("{0}Part{1}", partNamePrefix, i), 732 string.Format("{0}Part{1}", partNamePrefix, i),
733 new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)), 733 new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)),
734 ownerId)); 734 ownerId));
735 735
736 return sog; 736 return sog;
737 } 737 }
738 } 738 }
739} 739}
diff --git a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
index 3a3b33a..e3110f6 100644
--- a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
@@ -78,12 +78,12 @@ namespace OpenSim.Tests.Common
78 = AssetHelpers.CreateAsset(assetID, AssetType.Notecard, nc.AssetData, UUID.Zero); 78 = AssetHelpers.CreateAsset(assetID, AssetType.Notecard, nc.AssetData, UUID.Zero);
79 assetService.Store(ncAsset); 79 assetService.Store(ncAsset);
80 80
81 TaskInventoryItem ncItem 81 TaskInventoryItem ncItem
82 = new TaskInventoryItem 82 = new TaskInventoryItem
83 { Name = itemName, AssetID = assetID, ItemID = itemID, 83 { Name = itemName, AssetID = assetID, ItemID = itemID,
84 Type = (int)AssetType.Notecard, InvType = (int)InventoryType.Notecard }; 84 Type = (int)AssetType.Notecard, InvType = (int)InventoryType.Notecard };
85 part.Inventory.AddInventoryItem(ncItem, true); 85 part.Inventory.AddInventoryItem(ncItem, true);
86 86
87 return ncItem; 87 return ncItem;
88 } 88 }
89 89
@@ -119,7 +119,7 @@ namespace OpenSim.Tests.Common
119 { 119 {
120 return AddScript(assetService, part, UUID.Random(), UUID.Random(), scriptName, scriptSource); 120 return AddScript(assetService, part, UUID.Random(), UUID.Random(), scriptName, scriptSource);
121 } 121 }
122 122
123 /// <summary> 123 /// <summary>
124 /// Add a simple script to the given part. 124 /// Add a simple script to the given part.
125 /// </summary> 125 /// </summary>
@@ -145,7 +145,7 @@ namespace OpenSim.Tests.Common
145 = AssetHelpers.CreateAsset(assetId, AssetType.LSLText, ast.AssetData, UUID.Zero); 145 = AssetHelpers.CreateAsset(assetId, AssetType.LSLText, ast.AssetData, UUID.Zero);
146 assetService.Store(asset); 146 assetService.Store(asset);
147 TaskInventoryItem item 147 TaskInventoryItem item
148 = new TaskInventoryItem 148 = new TaskInventoryItem
149 { Name = scriptName, AssetID = assetId, ItemID = itemId, 149 { Name = scriptName, AssetID = assetId, ItemID = itemId,
150 Type = (int)AssetType.LSLText, InvType = (int)InventoryType.LSL }; 150 Type = (int)AssetType.LSLText, InvType = (int)InventoryType.LSL };
151 part.Inventory.AddInventoryItem(item, true); 151 part.Inventory.AddInventoryItem(item, true);
diff --git a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs
index c62b58e..e6af34b 100644
--- a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Tests.Common
83// /// </param> 83// /// </param>
84// /// <returns></returns> 84// /// <returns></returns>
85// public static CachedUserInfo CreateUserWithInventory( 85// public static CachedUserInfo CreateUserWithInventory(
86// CommunicationsManager commsManager, string firstName, string lastName, 86// CommunicationsManager commsManager, string firstName, string lastName,
87// UUID userId, OnInventoryReceivedDelegate callback) 87// UUID userId, OnInventoryReceivedDelegate callback)
88// { 88// {
89// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); 89// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
@@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common
147 CreateUserWithInventory(scene, ua, pw); 147 CreateUserWithInventory(scene, ua, pw);
148 return ua; 148 return ua;
149 } 149 }
150 150
151 public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw) 151 public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw)
152 { 152 {
153 // FIXME: This should really be set up by UserAccount itself 153 // FIXME: This should really be set up by UserAccount itself
diff --git a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs
index e7e145a..5a46201 100644
--- a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Tests.Common
101 Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId) 101 Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId)
102 { 102 {
103 return AddInventoryItem( 103 return AddInventoryItem(
104 scene, itemName, itemId, itemType, asset, userId, 104 scene, itemName, itemId, itemType, asset, userId,
105 scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name); 105 scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name);
106 } 106 }
107 107
@@ -128,7 +128,7 @@ namespace OpenSim.Tests.Common
128 item.Owner = userId; 128 item.Owner = userId;
129 item.AssetType = asset.Type; 129 item.AssetType = asset.Type;
130 item.InvType = (int)itemType; 130 item.InvType = (int)itemType;
131 item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All | 131 item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All |
132 (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); 132 (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer);
133 item.CurrentPermissions = (uint)OpenMetaverse.PermissionMask.All | 133 item.CurrentPermissions = (uint)OpenMetaverse.PermissionMask.All |
134 (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer); 134 (uint)(Framework.PermissionMask.foldedMask | Framework.PermissionMask.foldedCopy | Framework.PermissionMask.foldedModify | Framework.PermissionMask.foldedTransfer);
@@ -211,7 +211,7 @@ namespace OpenSim.Tests.Common
211 /// </param> 211 /// </param>
212 /// <param name="useExistingFolders"> 212 /// <param name="useExistingFolders">
213 /// If true, then folders in the path which already the same name are 213 /// If true, then folders in the path which already the same name are
214 /// used. This applies to the terminal folder as well. 214 /// used. This applies to the terminal folder as well.
215 /// If false, then all folders in the path are created, even if there is already a folder at a particular 215 /// If false, then all folders in the path are created, even if there is already a folder at a particular
216 /// level with the same name. 216 /// level with the same name.
217 /// </param> 217 /// </param>
@@ -236,7 +236,7 @@ namespace OpenSim.Tests.Common
236 /// </param> 236 /// </param>
237 /// <param name="useExistingFolders"> 237 /// <param name="useExistingFolders">
238 /// If true, then folders in the path which already the same name are 238 /// If true, then folders in the path which already the same name are
239 /// used. This applies to the terminal folder as well. 239 /// used. This applies to the terminal folder as well.
240 /// If false, then all folders in the path are created, even if there is already a folder at a particular 240 /// If false, then all folders in the path are created, even if there is already a folder at a particular
241 /// level with the same name. 241 /// level with the same name.
242 /// </param> 242 /// </param>
@@ -259,7 +259,7 @@ namespace OpenSim.Tests.Common
259 /// Create inventory folders starting from a given parent folder 259 /// Create inventory folders starting from a given parent folder
260 /// </summary> 260 /// </summary>
261 /// <remarks> 261 /// <remarks>
262 /// If any stem of the path names folders that already exist then these are not recreated. This includes the 262 /// If any stem of the path names folders that already exist then these are not recreated. This includes the
263 /// final folder. 263 /// final folder.
264 /// TODO: May need to make it an option to create duplicate folders. 264 /// TODO: May need to make it an option to create duplicate folders.
265 /// </remarks> 265 /// </remarks>
@@ -271,7 +271,7 @@ namespace OpenSim.Tests.Common
271 /// </param> 271 /// </param>
272 /// <param name="useExistingFolders"> 272 /// <param name="useExistingFolders">
273 /// If true, then folders in the path which already the same name are 273 /// If true, then folders in the path which already the same name are
274 /// used. This applies to the terminal folder as well. 274 /// used. This applies to the terminal folder as well.
275 /// If false, then all folders in the path are created, even if there is already a folder at a particular 275 /// If false, then all folders in the path are created, even if there is already a folder at a particular
276 /// level with the same name. 276 /// level with the same name.
277 /// </param> 277 /// </param>
@@ -299,10 +299,10 @@ namespace OpenSim.Tests.Common
299 else 299 else
300 folderIdForCreate = folderId; 300 folderIdForCreate = folderId;
301 301
302 folder 302 folder
303 = new InventoryFolderBase( 303 = new InventoryFolderBase(
304 folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0); 304 folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0);
305 305
306 inventoryService.AddFolder(folder); 306 inventoryService.AddFolder(folder);
307 } 307 }
308// else 308// else
diff --git a/OpenSim/Tests/Common/LongRunningAttribute.cs b/OpenSim/Tests/Common/LongRunningAttribute.cs
index 9831ea8..6013fcb 100644
--- a/OpenSim/Tests/Common/LongRunningAttribute.cs
+++ b/OpenSim/Tests/Common/LongRunningAttribute.cs
@@ -35,11 +35,11 @@ namespace OpenSim.Tests.Common
35 [AttributeUsage(AttributeTargets.All, 35 [AttributeUsage(AttributeTargets.All,
36 AllowMultiple = false, 36 AllowMultiple = false,
37 Inherited = true)] 37 Inherited = true)]
38 public class LongRunningAttribute : CategoryAttribute 38 public class LongRunningAttribute : CategoryAttribute
39 { 39 {
40 public LongRunningAttribute() : this("Long Running Test") 40 public LongRunningAttribute() : this("Long Running Test")
41 { 41 {
42 42
43 } 43 }
44 44
45 protected LongRunningAttribute(string category) : base(category) 45 protected LongRunningAttribute(string category) : base(category)
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
index cb4fb80..d0430ff 100644
--- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common
36 { 36 {
37 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>(); 37 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>();
38 38
39 public AssetBase FetchAsset(UUID uuid) 39 public AssetBase FetchAsset(UUID uuid)
40 { 40 {
41 if (AssetsExist(new[] { uuid })[0]) 41 if (AssetsExist(new[] { uuid })[0])
42 return Assets[uuid]; 42 return Assets[uuid];
@@ -44,17 +44,17 @@ namespace OpenSim.Tests.Common
44 return null; 44 return null;
45 } 45 }
46 46
47 public void CreateAsset(AssetBase asset) 47 public void CreateAsset(AssetBase asset)
48 { 48 {
49 Assets[asset.FullID] = asset; 49 Assets[asset.FullID] = asset;
50 } 50 }
51 51
52 public void UpdateAsset(AssetBase asset) 52 public void UpdateAsset(AssetBase asset)
53 { 53 {
54 CreateAsset(asset); 54 CreateAsset(asset);
55 } 55 }
56 56
57 public bool[] AssetsExist(UUID[] uuids) 57 public bool[] AssetsExist(UUID[] uuids)
58 { 58 {
59 return Array.ConvertAll(uuids, id => Assets.ContainsKey(id)); 59 return Array.ConvertAll(uuids, id => Assets.ContainsKey(id));
60 } 60 }
diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
index 7f530d0..e9deac7 100644
--- a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
+++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs
@@ -85,8 +85,8 @@ namespace OpenSim.Tests.Common
85 { 85 {
86 } 86 }
87 87
88 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, 88 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID,
89 int membershipFee, bool openEnrollment, bool allowPublish, 89 int membershipFee, bool openEnrollment, bool allowPublish,
90 bool maturePublish, UUID founderID) 90 bool maturePublish, UUID founderID)
91 { 91 {
92 XGroup group = new XGroup() 92 XGroup group = new XGroup()
@@ -118,13 +118,13 @@ namespace OpenSim.Tests.Common
118 } 118 }
119 } 119 }
120 120
121 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, 121 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
122 UUID insigniaID, int membershipFee, bool openEnrollment, 122 UUID insigniaID, int membershipFee, bool openEnrollment,
123 bool allowPublish, bool maturePublish) 123 bool allowPublish, bool maturePublish)
124 { 124 {
125 } 125 }
126 126
127 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 127 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
128 string title, ulong powers) 128 string title, ulong powers)
129 { 129 {
130 } 130 }
@@ -133,7 +133,7 @@ namespace OpenSim.Tests.Common
133 { 133 {
134 } 134 }
135 135
136 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 136 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
137 string title, ulong powers) 137 string title, ulong powers)
138 { 138 {
139 } 139 }
@@ -144,7 +144,7 @@ namespace OpenSim.Tests.Common
144 144
145 145
146 if (group == null) 146 if (group == null)
147 m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: No group found with ID {0}", groupID); 147 m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: No group found with ID {0}", groupID);
148 148
149 return group; 149 return group;
150 } 150 }
@@ -152,7 +152,7 @@ namespace OpenSim.Tests.Common
152 public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID groupID, string groupName) 152 public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID groupID, string groupName)
153 { 153 {
154 m_log.DebugFormat( 154 m_log.DebugFormat(
155 "[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}", 155 "[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}",
156 groupID, groupName); 156 groupID, groupName);
157 157
158 XGroup xg = GetXGroup(groupID, groupName); 158 XGroup xg = GetXGroup(groupID, groupName);
@@ -194,7 +194,7 @@ namespace OpenSim.Tests.Common
194 public void SetAgentGroupInfo(UUID requestingAgentID, UUID agentID, UUID groupID, bool acceptNotices, bool listInProfile) 194 public void SetAgentGroupInfo(UUID requestingAgentID, UUID agentID, UUID groupID, bool acceptNotices, bool listInProfile)
195 { 195 {
196 m_log.DebugFormat( 196 m_log.DebugFormat(
197 "[MOCK GROUPS SERVICES CONNECTOR]: SetAgentGroupInfo, requestingAgentID {0}, agentID {1}, groupID {2}, acceptNotices {3}, listInProfile {4}", 197 "[MOCK GROUPS SERVICES CONNECTOR]: SetAgentGroupInfo, requestingAgentID {0}, agentID {1}, groupID {2}, acceptNotices {3}, listInProfile {4}",
198 requestingAgentID, agentID, groupID, acceptNotices, listInProfile); 198 requestingAgentID, agentID, groupID, acceptNotices, listInProfile);
199 199
200 XGroup group = GetXGroup(groupID, null); 200 XGroup group = GetXGroup(groupID, null);
@@ -228,7 +228,7 @@ namespace OpenSim.Tests.Common
228 public void AddAgentToGroup(UUID requestingAgentID, UUID agentID, UUID groupID, UUID roleID) 228 public void AddAgentToGroup(UUID requestingAgentID, UUID agentID, UUID groupID, UUID roleID)
229 { 229 {
230 m_log.DebugFormat( 230 m_log.DebugFormat(
231 "[MOCK GROUPS SERVICES CONNECTOR]: AddAgentToGroup, requestingAgentID {0}, agentID {1}, groupID {2}, roleID {3}", 231 "[MOCK GROUPS SERVICES CONNECTOR]: AddAgentToGroup, requestingAgentID {0}, agentID {1}, groupID {2}, roleID {3}",
232 requestingAgentID, agentID, groupID, roleID); 232 requestingAgentID, agentID, groupID, roleID);
233 233
234 XGroup group = GetXGroup(groupID, null); 234 XGroup group = GetXGroup(groupID, null);
@@ -348,7 +348,7 @@ namespace OpenSim.Tests.Common
348 348
349 return notices; 349 return notices;
350 } 350 }
351 351
352 public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID) 352 public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
353 { 353 {
354 m_log.DebugFormat( 354 m_log.DebugFormat(
@@ -378,14 +378,14 @@ namespace OpenSim.Tests.Common
378 return gni; 378 return gni;
379 } 379 }
380 } 380 }
381 381
382 return null; 382 return null;
383 } 383 }
384 384
385 public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket) 385 public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket)
386 { 386 {
387 m_log.DebugFormat( 387 m_log.DebugFormat(
388 "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}", 388 "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}",
389 requestingAgentID, groupID, noticeID, fromName, subject, message, binaryBucket.Length); 389 requestingAgentID, groupID, noticeID, fromName, subject, message, binaryBucket.Length);
390 390
391 XGroup group = GetXGroup(groupID, null); 391 XGroup group = GetXGroup(groupID, null);
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
index 8daa19d..a73a0b8 100644
--- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -174,15 +174,15 @@ namespace OpenSim.Data.Null
174 public class NullDataStore : ISimulationDataStore 174 public class NullDataStore : ISimulationDataStore
175 { 175 {
176// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 176// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
177 177
178 protected Dictionary<UUID, RegionSettings> m_regionSettings = new Dictionary<UUID, RegionSettings>(); 178 protected Dictionary<UUID, RegionSettings> m_regionSettings = new Dictionary<UUID, RegionSettings>();
179 protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); 179 protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>();
180 protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems 180 protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems
181 = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); 181 = new Dictionary<UUID, ICollection<TaskInventoryItem>>();
182 protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); 182 protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>();
183 protected Dictionary<UUID, TerrainData> m_bakedterrains = new Dictionary<UUID, TerrainData>(); 183 protected Dictionary<UUID, TerrainData> m_bakedterrains = new Dictionary<UUID, TerrainData>();
184 protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); 184 protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>();
185 185
186 public void Initialise(string dbfile) 186 public void Initialise(string dbfile)
187 { 187 {
188 return; 188 return;
@@ -196,14 +196,14 @@ namespace OpenSim.Data.Null
196 { 196 {
197 m_regionSettings[rs.RegionUUID] = rs; 197 m_regionSettings[rs.RegionUUID] = rs;
198 } 198 }
199 199
200 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) 200 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
201 { 201 {
202 //This connector doesn't support the windlight module yet 202 //This connector doesn't support the windlight module yet
203 //Return default LL windlight settings 203 //Return default LL windlight settings
204 return new RegionLightShareData(); 204 return new RegionLightShareData();
205 } 205 }
206 206
207 public void RemoveRegionWindlightSettings(UUID regionID) 207 public void RemoveRegionWindlightSettings(UUID regionID)
208 { 208 {
209 } 209 }
@@ -238,7 +238,7 @@ namespace OpenSim.Data.Null
238 238
239 if (rs == null) 239 if (rs == null)
240 rs = new RegionSettings(); 240 rs = new RegionSettings();
241 241
242 return rs; 242 return rs;
243 } 243 }
244 244
@@ -250,9 +250,9 @@ namespace OpenSim.Data.Null
250 foreach (SceneObjectPart prim in obj.Parts) 250 foreach (SceneObjectPart prim in obj.Parts)
251 { 251 {
252// m_log.DebugFormat( 252// m_log.DebugFormat(
253// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", 253// "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}",
254// prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); 254// prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID);
255 255
256 m_sceneObjectParts[prim.UUID] = prim; 256 m_sceneObjectParts[prim.UUID] = prim;
257 } 257 }
258 } 258 }
@@ -266,7 +266,7 @@ namespace OpenSim.Data.Null
266 if (part.ParentGroup.UUID == obj) 266 if (part.ParentGroup.UUID == obj)
267 { 267 {
268// m_log.DebugFormat( 268// m_log.DebugFormat(
269// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", 269// "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}",
270// part.Name, part.UUID, obj, regionUUID); 270// part.Name, part.UUID, obj, regionUUID);
271 m_sceneObjectParts.Remove(part.UUID); 271 m_sceneObjectParts.Remove(part.UUID);
272 } 272 }
@@ -281,7 +281,7 @@ namespace OpenSim.Data.Null
281 public List<SceneObjectGroup> LoadObjects(UUID regionUUID) 281 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
282 { 282 {
283 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>(); 283 Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
284 284
285 // Create all of the SOGs from the root prims first 285 // Create all of the SOGs from the root prims first
286 foreach (SceneObjectPart prim in m_sceneObjectParts.Values) 286 foreach (SceneObjectPart prim in m_sceneObjectParts.Values)
287 { 287 {
@@ -318,10 +318,10 @@ namespace OpenSim.Data.Null
318 } 318 }
319 } 319 }
320 } 320 }
321 321
322 // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that 322 // TODO: Load items. This is assymetric - we store items as a separate method but don't retrieve them that
323 // way! 323 // way!
324 324
325 return new List<SceneObjectGroup>(objects.Values); 325 return new List<SceneObjectGroup>(objects.Values);
326 } 326 }
327 327
diff --git a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
index b6f5760..9d426f6 100644
--- a/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
+++ b/OpenSim/Tests/Common/Mock/MockScriptEngine.cs
@@ -40,7 +40,7 @@ using OpenSim.Region.ScriptEngine.Shared;
40namespace OpenSim.Tests.Common 40namespace OpenSim.Tests.Common
41{ 41{
42 public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine 42 public class MockScriptEngine : INonSharedRegionModule, IScriptModule, IScriptEngine
43 { 43 {
44 public IConfigSource ConfigSource { get; private set; } 44 public IConfigSource ConfigSource { get; private set; }
45 45
46 public IConfig Config { get; private set; } 46 public IConfig Config { get; private set; }
@@ -89,7 +89,7 @@ namespace OpenSim.Tests.Common
89 { 89 {
90 } 90 }
91 91
92 public string Name { get { return "Mock Script Engine"; } } 92 public string Name { get { return "Mock Script Engine"; } }
93 public string ScriptEngineName { get { return Name; } } 93 public string ScriptEngineName { get { return Name; } }
94 94
95 public Type ReplaceableInterface { get { return null; } } 95 public Type ReplaceableInterface { get { return null; } }
@@ -200,7 +200,7 @@ namespace OpenSim.Tests.Common
200 { 200 {
201 throw new System.NotImplementedException (); 201 throw new System.NotImplementedException ();
202 } 202 }
203 203
204 public IScriptWorkItem QueueEventHandler(object parms) 204 public IScriptWorkItem QueueEventHandler(object parms)
205 { 205 {
206 throw new System.NotImplementedException (); 206 throw new System.NotImplementedException ();
@@ -258,7 +258,7 @@ namespace OpenSim.Tests.Common
258 258
259 public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } } 259 public string[] ScriptReferencedAssemblies { get { throw new System.NotImplementedException (); } }
260 260
261 public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } } 261 public ParameterInfo[] ScriptBaseClassParameters { get { throw new System.NotImplementedException (); } }
262 262
263 public void ClearPostedEvents() 263 public void ClearPostedEvents()
264 { 264 {
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f407e5a..e2f57b5 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -321,7 +321,7 @@ namespace OpenSim.Tests.Common
321 public event AvatarInterestUpdate OnAvatarInterestUpdate; 321 public event AvatarInterestUpdate OnAvatarInterestUpdate;
322 322
323 public event PlacesQuery OnPlacesQuery; 323 public event PlacesQuery OnPlacesQuery;
324 324
325 public event FindAgentUpdate OnFindAgent; 325 public event FindAgentUpdate OnFindAgent;
326 public event TrackAgentUpdate OnTrackAgent; 326 public event TrackAgentUpdate OnTrackAgent;
327 public event NewUserReport OnUserReport; 327 public event NewUserReport OnUserReport;
@@ -673,7 +673,7 @@ namespace OpenSim.Tests.Common
673 { 673 {
674 AgentCircuitData agentData = new AgentCircuitData(); 674 AgentCircuitData agentData = new AgentCircuitData();
675 agentData.AgentID = AgentId; 675 agentData.AgentID = AgentId;
676 agentData.SessionID = SessionId; 676 agentData.SessionID = SessionId;
677 agentData.SecureSessionID = UUID.Zero; 677 agentData.SecureSessionID = UUID.Zero;
678 agentData.circuitcode = m_circuitCode; 678 agentData.circuitcode = m_circuitCode;
679 agentData.child = false; 679 agentData.child = false;
@@ -713,7 +713,7 @@ namespace OpenSim.Tests.Common
713 public virtual void SendTeleportFailed(string reason) 713 public virtual void SendTeleportFailed(string reason)
714 { 714 {
715 m_log.DebugFormat( 715 m_log.DebugFormat(
716 "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}", 716 "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}",
717 m_firstName, m_lastName, m_scene.Name, reason); 717 m_firstName, m_lastName, m_scene.Name, reason);
718 } 718 }
719 719
@@ -781,7 +781,7 @@ namespace OpenSim.Tests.Common
781 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, 781 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
782 List<InventoryItemBase> items, 782 List<InventoryItemBase> items,
783 List<InventoryFolderBase> folders, 783 List<InventoryFolderBase> folders,
784 int version, 784 int version,
785 bool fetchFolders, 785 bool fetchFolders,
786 bool fetchItems) 786 bool fetchItems)
787 { 787 {
@@ -881,7 +881,7 @@ namespace OpenSim.Tests.Common
881 OnRegionHandShakeReply(this); 881 OnRegionHandShakeReply(this);
882 } 882 }
883 } 883 }
884 884
885 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 885 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
886 { 886 {
887 } 887 }
@@ -1314,7 +1314,7 @@ namespace OpenSim.Tests.Common
1314 public void SendMuteListUpdate(string filename) 1314 public void SendMuteListUpdate(string filename)
1315 { 1315 {
1316 } 1316 }
1317 1317
1318 public void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) 1318 public void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled)
1319 { 1319 {
1320 } 1320 }
@@ -1334,7 +1334,7 @@ namespace OpenSim.Tests.Common
1334 { 1334 {
1335 } 1335 }
1336 1336
1337 public void Disconnect() 1337 public void Disconnect()
1338 { 1338 {
1339 } 1339 }
1340 1340
@@ -1343,19 +1343,19 @@ namespace OpenSim.Tests.Common
1343 if (OnReceivedSendRebakeAvatarTextures != null) 1343 if (OnReceivedSendRebakeAvatarTextures != null)
1344 OnReceivedSendRebakeAvatarTextures(textureID); 1344 OnReceivedSendRebakeAvatarTextures(textureID);
1345 } 1345 }
1346 1346
1347 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) 1347 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1348 { 1348 {
1349 } 1349 }
1350 1350
1351 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) 1351 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1352 { 1352 {
1353 } 1353 }
1354 1354
1355 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) 1355 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1356 { 1356 {
1357 } 1357 }
1358 1358
1359 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) 1359 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1360 { 1360 {
1361 } 1361 }
diff --git a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
index bc30945..3e00d82 100644
--- a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
+++ b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Tests.Common
46{ 46{
47 public class TestEventQueueGetModule : IEventQueue, INonSharedRegionModule 47 public class TestEventQueueGetModule : IEventQueue, INonSharedRegionModule
48 { 48 {
49 public class Event 49 public class Event
50 { 50 {
51 public string Name { get; set; } 51 public string Name { get; set; }
52 public object[] Args { get; set; } 52 public object[] Args { get; set; }
@@ -64,7 +64,7 @@ namespace OpenSim.Tests.Common
64 64
65 public void Close() {} 65 public void Close() {}
66 66
67 public void AddRegion(Scene scene) 67 public void AddRegion(Scene scene)
68 { 68 {
69 Events = new Dictionary<UUID, List<Event>>(); 69 Events = new Dictionary<UUID, List<Event>>();
70 scene.RegisterModuleInterface<IEventQueue>(this); 70 scene.RegisterModuleInterface<IEventQueue>(this);
@@ -138,12 +138,12 @@ namespace OpenSim.Tests.Common
138 } 138 }
139 139
140 public void ChatterboxInvitation( 140 public void ChatterboxInvitation(
141 UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName, 141 UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName,
142 byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl, 142 byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl,
143 UUID transactionID, bool fromGroup, byte[] binaryBucket) 143 UUID transactionID, bool fromGroup, byte[] binaryBucket)
144 { 144 {
145 AddEvent( 145 AddEvent(
146 toAgent, "ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, 146 toAgent, "ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
147 timeStamp, offline, parentEstateID, position, ttl, transactionID, fromGroup, binaryBucket); 147 timeStamp, offline, parentEstateID, position, ttl, transactionID, fromGroup, binaryBucket);
148 } 148 }
149 149
diff --git a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs
index be437dc..7b20b8c 100644
--- a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs
+++ b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common
43 /// Bodies of responses from the server. 43 /// Bodies of responses from the server.
44 /// </summary> 44 /// </summary>
45 public string ResponseBody 45 public string ResponseBody
46 { 46 {
47 get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); } 47 get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); }
48 } 48 }
49 49
@@ -56,8 +56,8 @@ namespace OpenSim.Tests.Common
56 56
57 public bool IsSecured { get; set; } 57 public bool IsSecured { get; set; }
58 58
59 public bool Secured 59 public bool Secured
60 { 60 {
61 get { return IsSecured; } 61 get { return IsSecured; }
62 set { IsSecured = value; } 62 set { IsSecured = value; }
63 } 63 }
@@ -67,7 +67,7 @@ namespace OpenSim.Tests.Common
67 Secured = secured; 67 Secured = secured;
68 } 68 }
69 69
70 public void Disconnect(SocketError error) 70 public void Disconnect(SocketError error)
71 { 71 {
72// Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error); 72// Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error);
73 } 73 }
@@ -76,18 +76,18 @@ namespace OpenSim.Tests.Common
76 public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");} 76 public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");}
77 public void Respond(string body) { Console.WriteLine("xxx");} 77 public void Respond(string body) { Console.WriteLine("xxx");}
78 78
79 public void Send(byte[] buffer) 79 public void Send(byte[] buffer)
80 { 80 {
81 // Getting header data here 81 // Getting header data here
82// Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer)); 82// Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer));
83 } 83 }
84 84
85 public void Send(byte[] buffer, int offset, int size) 85 public void Send(byte[] buffer, int offset, int size)
86 { 86 {
87// Util.PrintCallStack(); 87// Util.PrintCallStack();
88// 88//
89// Console.WriteLine( 89// Console.WriteLine(
90// "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}", 90// "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}",
91// offset, size, Encoding.UTF8.GetString(buffer)); 91// offset, size, Encoding.UTF8.GetString(buffer));
92 92
93 m_responseStream.Write(buffer, offset, size); 93 m_responseStream.Write(buffer, offset, size);
diff --git a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs
index d07287d..4c5ea4a 100644
--- a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs
+++ b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs
@@ -37,85 +37,85 @@ namespace OpenSim.Tests.Common
37 public class TestHttpRequest: IHttpRequest 37 public class TestHttpRequest: IHttpRequest
38 { 38 {
39 private string _uriPath; 39 private string _uriPath;
40 public bool BodyIsComplete 40 public bool BodyIsComplete
41 { 41 {
42 get { return true; } 42 get { return true; }
43 } 43 }
44 public string[] AcceptTypes 44 public string[] AcceptTypes
45 { 45 {
46 get {return _acceptTypes; } 46 get {return _acceptTypes; }
47 } 47 }
48 private string[] _acceptTypes; 48 private string[] _acceptTypes;
49 public Stream Body 49 public Stream Body
50 { 50 {
51 get { return _body; } 51 get { return _body; }
52 set { _body = value;} 52 set { _body = value;}
53 } 53 }
54 private Stream _body; 54 private Stream _body;
55 public ConnectionType Connection 55 public ConnectionType Connection
56 { 56 {
57 get { return _connection; } 57 get { return _connection; }
58 set { _connection = value; } 58 set { _connection = value; }
59 } 59 }
60 private ConnectionType _connection; 60 private ConnectionType _connection;
61 public int ContentLength 61 public int ContentLength
62 { 62 {
63 get { return _contentLength; } 63 get { return _contentLength; }
64 set { _contentLength = value; } 64 set { _contentLength = value; }
65 } 65 }
66 private int _contentLength; 66 private int _contentLength;
67 public NameValueCollection Headers 67 public NameValueCollection Headers
68 { 68 {
69 get { return _headers; } 69 get { return _headers; }
70 } 70 }
71 private NameValueCollection _headers = new NameValueCollection(); 71 private NameValueCollection _headers = new NameValueCollection();
72 72
73 public string HttpVersion { get; set; } 73 public string HttpVersion { get; set; }
74 74
75 public string Method 75 public string Method
76 { 76 {
77 get { return _method; } 77 get { return _method; }
78 set { _method = value; } 78 set { _method = value; }
79 } 79 }
80 private string _method = null; 80 private string _method = null;
81 public HttpInput QueryString 81 public HttpInput QueryString
82 { 82 {
83 get { return _queryString; } 83 get { return _queryString; }
84 } 84 }
85 private HttpInput _queryString = null; 85 private HttpInput _queryString = null;
86 public Uri Uri 86 public Uri Uri
87 { 87 {
88 get { return _uri; } 88 get { return _uri; }
89 set { _uri = value; } 89 set { _uri = value; }
90 } 90 }
91 private Uri _uri = null; 91 private Uri _uri = null;
92 public string[] UriParts 92 public string[] UriParts
93 { 93 {
94 get { return _uri.Segments; } 94 get { return _uri.Segments; }
95 } 95 }
96 public HttpParam Param 96 public HttpParam Param
97 { 97 {
98 get { return null; } 98 get { return null; }
99 } 99 }
100 public HttpForm Form 100 public HttpForm Form
101 { 101 {
102 get { return null; } 102 get { return null; }
103 } 103 }
104 public bool IsAjax 104 public bool IsAjax
105 { 105 {
106 get { return false; } 106 get { return false; }
107 } 107 }
108 public RequestCookies Cookies 108 public RequestCookies Cookies
109 { 109 {
110 get { return null; } 110 get { return null; }
111 } 111 }
112 112
113 public TestHttpRequest() 113 public TestHttpRequest()
114 { 114 {
115 HttpVersion = "HTTP/1.1"; 115 HttpVersion = "HTTP/1.1";
116 } 116 }
117 117
118 public TestHttpRequest(string contentEncoding, string contentType, string userAgent, 118 public TestHttpRequest(string contentEncoding, string contentType, string userAgent,
119 string remoteAddr, string remotePort, string[] acceptTypes, 119 string remoteAddr, string remotePort, string[] acceptTypes,
120 ConnectionType connectionType, int contentLength, Uri uri) : base() 120 ConnectionType connectionType, int contentLength, Uri uri) : base()
121 { 121 {
@@ -137,7 +137,7 @@ namespace OpenSim.Tests.Common
137 { 137 {
138 _headers.Add(name, value); 138 _headers.Add(name, value);
139 } 139 }
140 public int AddToBody(byte[] bytes, int offset, int length) 140 public int AddToBody(byte[] bytes, int offset, int length)
141 { 141 {
142 return 0; 142 return 0;
143 } 143 }
@@ -168,7 +168,7 @@ namespace OpenSim.Tests.Common
168 set 168 set
169 { 169 {
170 _uriPath = value; 170 _uriPath = value;
171 171
172 } 172 }
173 } 173 }
174 } 174 }
diff --git a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs
index c344fb8..190f6d5 100644
--- a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common
36/* 36/*
37 public class TestHttpResponse: IHttpResponse 37 public class TestHttpResponse: IHttpResponse
38 { 38 {
39 public Stream Body 39 public Stream Body
40 { 40 {
41 get { return _body; } 41 get { return _body; }
42 42
@@ -44,14 +44,14 @@ namespace OpenSim.Tests.Common
44 } 44 }
45 private Stream _body; 45 private Stream _body;
46 46
47 public string ProtocolVersion 47 public string ProtocolVersion
48 { 48 {
49 get { return _protocolVersion; } 49 get { return _protocolVersion; }
50 set { _protocolVersion = value; } 50 set { _protocolVersion = value; }
51 } 51 }
52 private string _protocolVersion; 52 private string _protocolVersion;
53 53
54 public bool Chunked 54 public bool Chunked
55 { 55 {
56 get { return _chunked; } 56 get { return _chunked; }
57 57
@@ -59,7 +59,7 @@ namespace OpenSim.Tests.Common
59 } 59 }
60 private bool _chunked; 60 private bool _chunked;
61 61
62 public ConnectionType Connection 62 public ConnectionType Connection
63 { 63 {
64 get { return _connection; } 64 get { return _connection; }
65 65
@@ -67,7 +67,7 @@ namespace OpenSim.Tests.Common
67 } 67 }
68 private ConnectionType _connection; 68 private ConnectionType _connection;
69 69
70 public Encoding Encoding 70 public Encoding Encoding
71 { 71 {
72 get { return _encoding; } 72 get { return _encoding; }
73 73
@@ -75,7 +75,7 @@ namespace OpenSim.Tests.Common
75 } 75 }
76 private Encoding _encoding; 76 private Encoding _encoding;
77 77
78 public int KeepAlive 78 public int KeepAlive
79 { 79 {
80 get { return _keepAlive; } 80 get { return _keepAlive; }
81 81
@@ -83,7 +83,7 @@ namespace OpenSim.Tests.Common
83 } 83 }
84 private int _keepAlive; 84 private int _keepAlive;
85 85
86 public HttpStatusCode Status 86 public HttpStatusCode Status
87 { 87 {
88 get { return _status; } 88 get { return _status; }
89 89
@@ -91,7 +91,7 @@ namespace OpenSim.Tests.Common
91 } 91 }
92 private HttpStatusCode _status; 92 private HttpStatusCode _status;
93 93
94 public string Reason 94 public string Reason
95 { 95 {
96 get { return _reason; } 96 get { return _reason; }
97 97
@@ -99,7 +99,7 @@ namespace OpenSim.Tests.Common
99 } 99 }
100 private string _reason; 100 private string _reason;
101 101
102 public long ContentLength 102 public long ContentLength
103 { 103 {
104 get { return _contentLength; } 104 get { return _contentLength; }
105 105
@@ -107,7 +107,7 @@ namespace OpenSim.Tests.Common
107 } 107 }
108 private long _contentLength; 108 private long _contentLength;
109 109
110 public string ContentType 110 public string ContentType
111 { 111 {
112 get { return _contentType; } 112 get { return _contentType; }
113 113
@@ -115,19 +115,19 @@ namespace OpenSim.Tests.Common
115 } 115 }
116 private string _contentType; 116 private string _contentType;
117 117
118 public bool HeadersSent 118 public bool HeadersSent
119 { 119 {
120 get { return _headersSent; } 120 get { return _headersSent; }
121 } 121 }
122 private bool _headersSent; 122 private bool _headersSent;
123 123
124 public bool Sent 124 public bool Sent
125 { 125 {
126 get { return _sent; } 126 get { return _sent; }
127 } 127 }
128 private bool _sent; 128 private bool _sent;
129 129
130 public ResponseCookies Cookies 130 public ResponseCookies Cookies
131 { 131 {
132 get { return _cookies; } 132 get { return _cookies; }
133 } 133 }
@@ -141,26 +141,26 @@ namespace OpenSim.Tests.Common
141 141
142 public void AddHeader(string name, string value) {} 142 public void AddHeader(string name, string value) {}
143 143
144 public void Send() 144 public void Send()
145 { 145 {
146 if (!_headersSent) SendHeaders(); 146 if (!_headersSent) SendHeaders();
147 if (_sent) throw new InvalidOperationException("stuff already sent"); 147 if (_sent) throw new InvalidOperationException("stuff already sent");
148 _sent = true; 148 _sent = true;
149 } 149 }
150 150
151 public void SendBody(byte[] buffer, int offset, int count) 151 public void SendBody(byte[] buffer, int offset, int count)
152 { 152 {
153 if (!_headersSent) SendHeaders(); 153 if (!_headersSent) SendHeaders();
154 _sent = true; 154 _sent = true;
155 } 155 }
156 156
157 public void SendBody(byte[] buffer) 157 public void SendBody(byte[] buffer)
158 { 158 {
159 if (!_headersSent) SendHeaders(); 159 if (!_headersSent) SendHeaders();
160 _sent = true; 160 _sent = true;
161 } 161 }
162 162
163 public void SendHeaders() 163 public void SendHeaders()
164 { 164 {
165 if (_headersSent) throw new InvalidOperationException("headers already sent"); 165 if (_headersSent) throw new InvalidOperationException("headers already sent");
166 _headersSent = true; 166 _headersSent = true;
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index c97a765..0ff6f7f 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common
43 public class TestInventoryDataPlugin : IInventoryDataPlugin 43 public class TestInventoryDataPlugin : IInventoryDataPlugin
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 /// <value> 47 /// <value>
48 /// Inventory folders 48 /// Inventory folders
49 /// </value> 49 /// </value>
@@ -85,9 +85,9 @@ namespace OpenSim.Tests.Common
85 public List<InventoryItemBase> getInventoryInFolder(UUID folderID) 85 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
86 { 86 {
87// InventoryFolderBase folder = m_folders[folderID]; 87// InventoryFolderBase folder = m_folders[folderID];
88 88
89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID); 89// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0} {1}", folder.Name, folder.ID);
90 90
91 List<InventoryItemBase> items = new List<InventoryItemBase>(); 91 List<InventoryItemBase> items = new List<InventoryItemBase>();
92 92
93 foreach (InventoryItemBase item in m_items.Values) 93 foreach (InventoryItemBase item in m_items.Values)
@@ -98,7 +98,7 @@ namespace OpenSim.Tests.Common
98 items.Add(item); 98 items.Add(item);
99 } 99 }
100 } 100 }
101 101
102 return items; 102 return items;
103 } 103 }
104 104
@@ -107,7 +107,7 @@ namespace OpenSim.Tests.Common
107 public InventoryFolderBase getUserRootFolder(UUID user) 107 public InventoryFolderBase getUserRootFolder(UUID user)
108 { 108 {
109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user); 109// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user);
110 110
111 InventoryFolderBase folder = null; 111 InventoryFolderBase folder = null;
112 m_rootFolders.TryGetValue(user, out folder); 112 m_rootFolders.TryGetValue(user, out folder);
113 113
@@ -117,9 +117,9 @@ namespace OpenSim.Tests.Common
117 public List<InventoryFolderBase> getInventoryFolders(UUID parentID) 117 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
118 { 118 {
119// InventoryFolderBase parentFolder = m_folders[parentID]; 119// InventoryFolderBase parentFolder = m_folders[parentID];
120 120
121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID); 121// m_log.DebugFormat("[MOCK INV DB]: Getting folders in folder {0} {1}", parentFolder.Name, parentFolder.ID);
122 122
123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 123 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
124 124
125 foreach (InventoryFolderBase folder in m_folders.Values) 125 foreach (InventoryFolderBase folder in m_folders.Values)
@@ -127,9 +127,9 @@ namespace OpenSim.Tests.Common
127 if (folder.ParentID == parentID) 127 if (folder.ParentID == parentID)
128 { 128 {
129// m_log.DebugFormat( 129// m_log.DebugFormat(
130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}", 130// "[MOCK INV DB]: Found folder {0} {1} in {2} {3}",
131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID); 131// folder.Name, folder.ID, parentFolder.Name, parentFolder.ID);
132 132
133 folders.Add(folder); 133 folders.Add(folder);
134 } 134 }
135 } 135 }
@@ -153,9 +153,9 @@ namespace OpenSim.Tests.Common
153 public void addInventoryFolder(InventoryFolderBase folder) 153 public void addInventoryFolder(InventoryFolderBase folder)
154 { 154 {
155// m_log.DebugFormat( 155// m_log.DebugFormat(
156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}", 156// "[MOCK INV DB]: Adding inventory folder {0} {1} type {2}",
157// folder.Name, folder.ID, (AssetType)folder.Type); 157// folder.Name, folder.ID, (AssetType)folder.Type);
158 158
159 m_folders[folder.ID] = folder; 159 m_folders[folder.ID] = folder;
160 160
161 if (folder.ParentID == UUID.Zero) 161 if (folder.ParentID == UUID.Zero)
@@ -183,30 +183,30 @@ namespace OpenSim.Tests.Common
183 m_folders.Remove(folderId); 183 m_folders.Remove(folderId);
184 } 184 }
185 185
186 public void addInventoryItem(InventoryItemBase item) 186 public void addInventoryItem(InventoryItemBase item)
187 { 187 {
188 InventoryFolderBase folder = m_folders[item.Folder]; 188 InventoryFolderBase folder = m_folders[item.Folder];
189 189
190// m_log.DebugFormat( 190// m_log.DebugFormat(
191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID); 191// "[MOCK INV DB]: Adding inventory item {0} {1} in {2} {3}", item.Name, item.ID, folder.Name, folder.ID);
192 192
193 m_items[item.ID] = item; 193 m_items[item.ID] = item;
194 } 194 }
195 195
196 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); } 196 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
197 197
198 public void deleteInventoryItem(UUID itemId) 198 public void deleteInventoryItem(UUID itemId)
199 { 199 {
200 if (m_items.ContainsKey(itemId)) 200 if (m_items.ContainsKey(itemId))
201 m_items.Remove(itemId); 201 m_items.Remove(itemId);
202 } 202 }
203 203
204 public InventoryItemBase getInventoryItem(UUID itemId) 204 public InventoryItemBase getInventoryItem(UUID itemId)
205 { 205 {
206 if (m_items.ContainsKey(itemId)) 206 if (m_items.ContainsKey(itemId))
207 return m_items[itemId]; 207 return m_items[itemId];
208 else 208 else
209 return null; 209 return null;
210 } 210 }
211 211
212 public InventoryItemBase queryInventoryItem(UUID item) 212 public InventoryItemBase queryInventoryItem(UUID item)
diff --git a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
index b2c6a8c..388b56b 100644
--- a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
+++ b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Tests.Common
73//// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive 73//// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive
74//// /// </summary> 74//// /// </summary>
75//// protected Queue<ChunkSenderTuple> m_chunksToLoad = new Queue<ChunkSenderTuple>(); 75//// protected Queue<ChunkSenderTuple> m_chunksToLoad = new Queue<ChunkSenderTuple>();
76// 76//
77//// protected override void BeginReceive() 77//// protected override void BeginReceive()
78//// { 78//// {
79//// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException) 79//// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException)
@@ -83,29 +83,29 @@ namespace OpenSim.Tests.Common
83//// throw new SocketException(); 83//// throw new SocketException();
84//// } 84//// }
85//// } 85//// }
86// 86//
87//// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender) 87//// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender)
88//// { 88//// {
89//// numBytes = 0; 89//// numBytes = 0;
90//// 90////
91//// //m_log.Debug("Queue size " + m_chunksToLoad.Count); 91//// //m_log.Debug("Queue size " + m_chunksToLoad.Count);
92//// 92////
93//// if (m_chunksToLoad.Count <= 0) 93//// if (m_chunksToLoad.Count <= 0)
94//// return false; 94//// return false;
95//// 95////
96//// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue(); 96//// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue();
97//// RecvBuffer = tuple.Data; 97//// RecvBuffer = tuple.Data;
98//// numBytes = tuple.Data.Length; 98//// numBytes = tuple.Data.Length;
99//// epSender = tuple.Sender; 99//// epSender = tuple.Sender;
100//// 100////
101//// return true; 101//// return true;
102//// } 102//// }
103// 103//
104//// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) 104//// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
105//// { 105//// {
106//// // Don't do anything just yet 106//// // Don't do anything just yet
107//// } 107//// }
108// 108//
109// /// <summary> 109// /// <summary>
110// /// Signal that this chunk should throw an exception on Socket.BeginReceive() 110// /// Signal that this chunk should throw an exception on Socket.BeginReceive()
111// /// </summary> 111// /// </summary>
@@ -116,7 +116,7 @@ namespace OpenSim.Tests.Common
116// tuple.BeginReceiveException = true; 116// tuple.BeginReceiveException = true;
117// m_chunksToLoad.Enqueue(tuple); 117// m_chunksToLoad.Enqueue(tuple);
118// } 118// }
119// 119//
120// /// <summary> 120// /// <summary>
121// /// Load some data to be received by the LLUDPServer on the next receive call 121// /// Load some data to be received by the LLUDPServer on the next receive call
122// /// </summary> 122// /// </summary>
@@ -126,7 +126,7 @@ namespace OpenSim.Tests.Common
126// { 126// {
127// m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender)); 127// m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender));
128// } 128// }
129// 129//
130// /// <summary> 130// /// <summary>
131// /// Load a packet to be received by the LLUDPServer on the next receive call 131// /// Load a packet to be received by the LLUDPServer on the next receive call
132// /// </summary> 132// /// </summary>
@@ -135,7 +135,7 @@ namespace OpenSim.Tests.Common
135// { 135// {
136// LoadReceive(packet.ToBytes(), epSender); 136// LoadReceive(packet.ToBytes(), epSender);
137// } 137// }
138// 138//
139// /// <summary> 139// /// <summary>
140// /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send 140// /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send
141// /// </summary> 141// /// </summary>
@@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common
147//// OnReceivedData(result); 147//// OnReceivedData(result);
148// } 148// }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Record the data and sender tuple 152 /// Record the data and sender tuple
153 /// </summary> 153 /// </summary>
@@ -156,13 +156,13 @@ namespace OpenSim.Tests.Common
156 public byte[] Data; 156 public byte[] Data;
157 public EndPoint Sender; 157 public EndPoint Sender;
158 public bool BeginReceiveException; 158 public bool BeginReceiveException;
159 159
160 public ChunkSenderTuple(byte[] data, EndPoint sender) 160 public ChunkSenderTuple(byte[] data, EndPoint sender)
161 { 161 {
162 Data = data; 162 Data = data;
163 Sender = sender; 163 Sender = sender;
164 } 164 }
165 165
166 public ChunkSenderTuple(EndPoint sender) 166 public ChunkSenderTuple(EndPoint sender)
167 { 167 {
168 Sender = sender; 168 Sender = sender;
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
index 23258ad..3d44a33 100644
--- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs
+++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Tests.Common
65 { 65 {
66 return m_parcels; 66 return m_parcels;
67 } 67 }
68 68
69 public void Clear(bool setupDefaultParcel) 69 public void Clear(bool setupDefaultParcel)
70 { 70 {
71 m_parcels.Clear(); 71 m_parcels.Clear();
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 1a93c9f..0b3d446 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Tests.Common
41 public class TestScene : Scene 41 public class TestScene : Scene
42 { 42 {
43 public TestScene( 43 public TestScene(
44 RegionInfo regInfo, AgentCircuitManager authen, 44 RegionInfo regInfo, AgentCircuitManager authen,
45 ISimulationDataService simDataService, IEstateDataService estateDataService, 45 ISimulationDataService simDataService, IEstateDataService estateDataService,
46 IConfigSource config, string simulatorVersion) 46 IConfigSource config, string simulatorVersion)
47 : base(regInfo, authen, simDataService, estateDataService, 47 : base(regInfo, authen, simDataService, estateDataService,
@@ -54,7 +54,7 @@ namespace OpenSim.Tests.Common
54 //Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName); 54 //Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName);
55 Console.WriteLine("TestScene destructor called"); 55 Console.WriteLine("TestScene destructor called");
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Temporarily override session authentication for tests (namely teleport). 59 /// Temporarily override session authentication for tests (namely teleport).
60 /// </summary> 60 /// </summary>
@@ -68,7 +68,7 @@ namespace OpenSim.Tests.Common
68 reason = String.Empty; 68 reason = String.Empty;
69 return true; 69 return true;
70 } 70 }
71 71
72 public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter 72 public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
73 { 73 {
74 get { return m_asyncSceneObjectDeleter; } 74 get { return m_asyncSceneObjectDeleter; }
diff --git a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
index 2b272e6..77f1793 100644
--- a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Tests.Common
89 m_allItems[item.inventoryID] = item.Clone(); 89 m_allItems[item.inventoryID] = item.Clone();
90 90
91// Console.WriteLine( 91// Console.WriteLine(
92// "Added item {0} {1}, folder {2}, creator {3}, owner {4}", 92// "Added item {0} {1}, folder {2}, creator {3}, owner {4}",
93// item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID); 93// item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID);
94 94
95 return true; 95 return true;
@@ -123,8 +123,8 @@ namespace OpenSim.Tests.Common
123 123
124 public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); } 124 public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); }
125 125
126 public bool MoveFolder(string id, string newParent) 126 public bool MoveFolder(string id, string newParent)
127 { 127 {
128 // Don't use GetFolders() here - it takes a clone! 128 // Don't use GetFolders() here - it takes a clone!
129 XInventoryFolder folder = m_allFolders[new UUID(id)]; 129 XInventoryFolder folder = m_allFolders[new UUID(id)];
130 130
@@ -133,11 +133,11 @@ namespace OpenSim.Tests.Common
133 133
134 folder.parentFolderID = new UUID(newParent); 134 folder.parentFolderID = new UUID(newParent);
135 135
136// XInventoryFolder[] newParentFolders 136// XInventoryFolder[] newParentFolders
137// = GetFolders(new string[] { "folderID" }, new string[] { folder.parentFolderID.ToString() }); 137// = GetFolders(new string[] { "folderID" }, new string[] { folder.parentFolderID.ToString() });
138 138
139// Console.WriteLine( 139// Console.WriteLine(
140// "Moved folder {0} {1}, to {2} {3}", 140// "Moved folder {0} {1}, to {2} {3}",
141// folder.folderName, folder.folderID, newParentFolders[0].folderName, folder.parentFolderID); 141// folder.folderName, folder.folderID, newParentFolders[0].folderName, folder.parentFolderID);
142 142
143 // TODO: Really need to implement folder version incrementing, though this should be common code anyway, 143 // TODO: Really need to implement folder version incrementing, though this should be common code anyway,
diff --git a/OpenSim/Tests/Common/TestHelpers.cs b/OpenSim/Tests/Common/TestHelpers.cs
index 6bf23f8..2b2af34 100644
--- a/OpenSim/Tests/Common/TestHelpers.cs
+++ b/OpenSim/Tests/Common/TestHelpers.cs
@@ -81,9 +81,9 @@ namespace OpenSim.Tests.Common
81 81
82 return false; 82 return false;
83 } 83 }
84 84
85 /// <summary> 85 /// <summary>
86 /// A debugging method that can be used to print out which test method you are in 86 /// A debugging method that can be used to print out which test method you are in
87 /// </summary> 87 /// </summary>
88 public static void InMethod() 88 public static void InMethod()
89 { 89 {
@@ -129,7 +129,7 @@ namespace OpenSim.Tests.Common
129 { 129 {
130 string rawUuid = stem.PadRight(32, '0'); 130 string rawUuid = stem.PadRight(32, '0');
131 131
132 return UUID.Parse(rawUuid); 132 return UUID.Parse(rawUuid);
133 } 133 }
134 134
135 /// <summary> 135 /// <summary>
@@ -158,7 +158,7 @@ namespace OpenSim.Tests.Common
158 { 158 {
159 string rawUuid = stem.PadLeft(32, '0'); 159 string rawUuid = stem.PadLeft(32, '0');
160 160
161 return UUID.Parse(rawUuid); 161 return UUID.Parse(rawUuid);
162 } 162 }
163 } 163 }
164} 164}
diff --git a/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs b/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs
index 671aca7..1549851 100644
--- a/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs
+++ b/OpenSim/Tests/Robust/Clients/Grid/GridClient.cs
@@ -95,7 +95,7 @@ namespace Robust.Tests
95 Assert.AreNotEqual(regions, null, "GetRegionsByName failed"); 95 Assert.AreNotEqual(regions, null, "GetRegionsByName failed");
96 Assert.AreEqual(regions.Count, 3, "GetRegionsByName should return 3"); 96 Assert.AreEqual(regions.Count, 3, "GetRegionsByName should return 3");
97 97
98 regions = m_Connector.GetRegionRange(UUID.Zero, 98 regions = m_Connector.GetRegionRange(UUID.Zero,
99 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002), 99 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002),
100 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) ); 100 (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) );
101 Assert.AreNotEqual(regions, null, "GetRegionRange failed"); 101 Assert.AreNotEqual(regions, null, "GetRegionRange failed");
@@ -126,7 +126,7 @@ namespace Robust.Tests
126 region.ExternalHostName = "127.0.0.1"; 126 region.ExternalHostName = "127.0.0.1";
127 region.HttpPort = 9000; 127 region.HttpPort = 9000;
128 region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000); 128 region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 9000);
129 129
130 return region; 130 return region;
131 } 131 }
132 } 132 }
diff --git a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
index d5c7dcb..fe46a4f 100644
--- a/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
+++ b/OpenSim/Tests/Robust/Clients/Inventory/InventoryClient.cs
@@ -176,7 +176,7 @@ namespace Robust.Tests
176 Assert.NotNull(items, "(Repeat) Failed to get multiple items"); 176 Assert.NotNull(items, "(Repeat) Failed to get multiple items");
177 Assert.IsTrue(items.Length == 2, "(Repeat) Requested 2 items, but didn't receive 2 items"); 177 Assert.IsTrue(items.Length == 2, "(Repeat) Requested 2 items, but didn't receive 2 items");
178 178
179 // This item doesn't exist, but [0] does, and it's cached. 179 // This item doesn't exist, but [0] does, and it's cached.
180 uuids[1] = new UUID("bb000000-0000-0000-0000-0000000000bb"); 180 uuids[1] = new UUID("bb000000-0000-0000-0000-0000000000bb");
181 // Fetching should return 2 items, but [1] should be null 181 // Fetching should return 2 items, but [1] should be null
182 items = m_Connector.GetMultipleItems(m_userID, uuids); 182 items = m_Connector.GetMultipleItems(m_userID, uuids);
@@ -185,7 +185,7 @@ namespace Robust.Tests
185 Assert.AreEqual("Test Notecard 1", items[0].Name, "(Three times) Wrong name for Notecard 1"); 185 Assert.AreEqual("Test Notecard 1", items[0].Name, "(Three times) Wrong name for Notecard 1");
186 Assert.IsNull(items[1], "(Three times) Expecting 2nd item to be null"); 186 Assert.IsNull(items[1], "(Three times) Expecting 2nd item to be null");
187 187
188 // Now both don't exist 188 // Now both don't exist
189 uuids[0] = new UUID("aa000000-0000-0000-0000-0000000000aa"); 189 uuids[0] = new UUID("aa000000-0000-0000-0000-0000000000aa");
190 items = m_Connector.GetMultipleItems(m_userID, uuids); 190 items = m_Connector.GetMultipleItems(m_userID, uuids);
191 Assert.Null(items[0], "Request to multiple non-existent items is supposed to return null [0]"); 191 Assert.Null(items[0], "Request to multiple non-existent items is supposed to return null [0]");
diff --git a/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs b/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs
index 0ab407e..5e6a638 100644
--- a/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs
+++ b/OpenSim/Tests/Stress/VectorRenderModuleStressTests.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Tests.Stress
105 public void Draw() 105 public void Draw()
106 { 106 {
107 SceneObjectGroup so = SceneHelpers.AddSceneObject(m_tests.Scene); 107 SceneObjectGroup so = SceneHelpers.AddSceneObject(m_tests.Scene);
108 108
109 while (Ready) 109 while (Ready)
110 { 110 {
111 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; 111 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
@@ -120,7 +120,7 @@ namespace OpenSim.Tests.Stress
120 string.Format("PenColour BLACK; MoveTo 40,220; FontSize 32; Text {0};", text), 120 string.Format("PenColour BLACK; MoveTo 40,220; FontSize 32; Text {0};", text),
121 "", 121 "",
122 0); 122 0);
123 123
124 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); 124 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
125 125
126 Pass++; 126 Pass++;
diff --git a/OpenSim/Tools/Compiler/Program.cs b/OpenSim/Tools/Compiler/Program.cs
index b010eaf..9270c96 100644
--- a/OpenSim/Tools/Compiler/Program.cs
+++ b/OpenSim/Tools/Compiler/Program.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Tools.LSL.Compiler
38 class Program 38 class Program
39 { 39 {
40// Commented out because generated warning since m_positionMap could never be anything other than null 40// Commented out because generated warning since m_positionMap could never be anything other than null
41// private static Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> m_positionMap; 41// private static Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> m_positionMap;
42 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); 42 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider();
43 43
44 static void Main(string[] args) 44 static void Main(string[] args)
@@ -154,7 +154,7 @@ namespace OpenSim.Tools.LSL.Compiler
154 lslPos.Key - 1, lslPos.Value - 1, 154 lslPos.Key - 1, lslPos.Value - 1,
155 CompErr.ErrorNumber, text, severity); 155 CompErr.ErrorNumber, text, severity);
156 } 156 }
157 157
158 disp = "Completed with errors"; 158 disp = "Completed with errors";
159 159
160 if (!File.Exists(OutFile)) 160 if (!File.Exists(OutFile))
diff --git a/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs b/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs
index a7679ed..fe29f27 100644
--- a/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs
+++ b/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Tools.lslc")] 8[assembly: AssemblyTitle("OpenSim.Tools.lslc")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs b/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs
index e6500f3..50ff5a4 100644
--- a/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs
+++ b/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Tools.Configger")] 8[assembly: AssemblyTitle("OpenSim.Tools.Configger")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Tools/Configger/Util.cs b/OpenSim/Tools/Configger/Util.cs
index 1a24034..d25b666 100644
--- a/OpenSim/Tools/Configger/Util.cs
+++ b/OpenSim/Tools/Configger/Util.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Tools.Configger
58 vol = vcomps[0]; 58 vol = vcomps[0];
59 } 59 }
60 } 60 }
61 61
62 string[] comps = path.Split(new char[] {Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar}, StringSplitOptions.RemoveEmptyEntries); 62 string[] comps = path.Split(new char[] {Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar}, StringSplitOptions.RemoveEmptyEntries);
63 63
64 // Glob 64 // Glob
diff --git a/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs
index c1ba36b..f46948c 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs
@@ -37,7 +37,7 @@ namespace pCampBot
37 public abstract class AbstractBehaviour : IBehaviour 37 public abstract class AbstractBehaviour : IBehaviour
38 { 38 {
39 /// <summary> 39 /// <summary>
40 /// Abbreviated name of this behaviour. 40 /// Abbreviated name of this behaviour.
41 /// </summary> 41 /// </summary>
42 public string AbbreviatedName { get; protected set; } 42 public string AbbreviatedName { get; protected set; }
43 43
@@ -56,7 +56,7 @@ namespace pCampBot
56 Bot = bot; 56 Bot = bot;
57 } 57 }
58 58
59 public virtual void Close() 59 public virtual void Close()
60 { 60 {
61 Interrupt(); 61 Interrupt();
62 } 62 }
diff --git a/OpenSim/Tools/pCampBot/Behaviours/CrossBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/CrossBehaviour.cs
index 4d806fc..451cfcc 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/CrossBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/CrossBehaviour.cs
@@ -47,10 +47,10 @@ namespace pCampBot
47 47
48 public const int m_regionCrossingTimeout = 1000 * 60; 48 public const int m_regionCrossingTimeout = 1000 * 60;
49 49
50 public CrossBehaviour() 50 public CrossBehaviour()
51 { 51 {
52 AbbreviatedName = "c"; 52 AbbreviatedName = "c";
53 Name = "Cross"; 53 Name = "Cross";
54 } 54 }
55 55
56 public override void Action() 56 public override void Action()
diff --git a/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
index 59f6244..b27ece8 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
@@ -42,10 +42,10 @@ namespace pCampBot
42 /// </remarks> 42 /// </remarks>
43 public class GrabbingBehaviour : AbstractBehaviour 43 public class GrabbingBehaviour : AbstractBehaviour
44 { 44 {
45 public GrabbingBehaviour() 45 public GrabbingBehaviour()
46 { 46 {
47 AbbreviatedName = "g"; 47 AbbreviatedName = "g";
48 Name = "Grabbing"; 48 Name = "Grabbing";
49 } 49 }
50 50
51 public override void Action() 51 public override void Action()
diff --git a/OpenSim/Tools/pCampBot/Behaviours/InventoryDownloadBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/InventoryDownloadBehaviour.cs
index 521415c..e868fa9 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/InventoryDownloadBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/InventoryDownloadBehaviour.cs
@@ -45,8 +45,8 @@ namespace pCampBot
45 private Stopwatch m_StopWatch = new Stopwatch(); 45 private Stopwatch m_StopWatch = new Stopwatch();
46 private List<UUID> m_processed = new List<UUID>(); 46 private List<UUID> m_processed = new List<UUID>();
47 47
48 public InventoryDownloadBehaviour() 48 public InventoryDownloadBehaviour()
49 { 49 {
50 AbbreviatedName = "inv"; 50 AbbreviatedName = "inv";
51 Name = "Inventory"; 51 Name = "Inventory";
52 } 52 }
@@ -113,7 +113,7 @@ namespace pCampBot
113 113
114 } 114 }
115 115
116 public override void Interrupt() 116 public override void Interrupt()
117 { 117 {
118 m_interruptEvent.Set(); 118 m_interruptEvent.Set();
119 } 119 }
diff --git a/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs
index 0d43781..b832d7e 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/NoneBehaviour.cs
@@ -38,10 +38,10 @@ namespace pCampBot
38 /// </summary> 38 /// </summary>
39 public class NoneBehaviour : AbstractBehaviour 39 public class NoneBehaviour : AbstractBehaviour
40 { 40 {
41 public NoneBehaviour() 41 public NoneBehaviour()
42 { 42 {
43 AbbreviatedName = "n"; 43 AbbreviatedName = "n";
44 Name = "None"; 44 Name = "None";
45 } 45 }
46 46
47 public override void Action() 47 public override void Action()
@@ -52,7 +52,7 @@ namespace pCampBot
52 Bot.Client.Self.Movement.Stop = false; 52 Bot.Client.Self.Movement.Stop = false;
53 } 53 }
54 54
55 public override void Interrupt() 55 public override void Interrupt()
56 { 56 {
57 m_interruptEvent.Set(); 57 m_interruptEvent.Set();
58 } 58 }
diff --git a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour2.cs b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour2.cs
index 1ec2046..54782c1 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour2.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour2.cs
@@ -45,10 +45,10 @@ namespace pCampBot
45 { 45 {
46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 public PhysicsBehaviour2() 48 public PhysicsBehaviour2()
49 { 49 {
50 AbbreviatedName = "ph2"; 50 AbbreviatedName = "ph2";
51 Name = "Physics2"; 51 Name = "Physics2";
52 } 52 }
53 53
54 private const int TIME_WALKING = 5 * 10; // 5 seconds 54 private const int TIME_WALKING = 5 * 10; // 5 seconds
diff --git a/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs
index 81f250d..9611d72 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs
@@ -43,10 +43,10 @@ namespace pCampBot
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 public TeleportBehaviour() 46 public TeleportBehaviour()
47 { 47 {
48 AbbreviatedName = "t"; 48 AbbreviatedName = "t";
49 Name = "Teleport"; 49 Name = "Teleport";
50 } 50 }
51 51
52 public override void Action() 52 public override void Action()
diff --git a/OpenSim/Tools/pCampBot/Behaviours/TwitchyBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/TwitchyBehaviour.cs
index 7b4639d..42dbc8f 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/TwitchyBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/TwitchyBehaviour.cs
@@ -38,7 +38,7 @@ namespace pCampBot
38 /// <summary> 38 /// <summary>
39 /// This behavior is for the systematic study of some performance improvements made 39 /// This behavior is for the systematic study of some performance improvements made
40 /// for OSCC'13. 40 /// for OSCC'13.
41 /// Do nothing, but send AgentUpdate packets all the time that have only slightly 41 /// Do nothing, but send AgentUpdate packets all the time that have only slightly
42 /// different state. The delta of difference will be filtered by OpenSim early on 42 /// different state. The delta of difference will be filtered by OpenSim early on
43 /// in the packet processing pipeline. These filters did not exist before OSCC'13. 43 /// in the packet processing pipeline. These filters did not exist before OSCC'13.
44 /// </summary> 44 /// </summary>
@@ -46,10 +46,10 @@ namespace pCampBot
46 { 46 {
47// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 public TwitchyBehaviour() 49 public TwitchyBehaviour()
50 { 50 {
51 AbbreviatedName = "tw"; 51 AbbreviatedName = "tw";
52 Name = "Twitchy"; 52 Name = "Twitchy";
53 } 53 }
54 54
55 private const float TWITCH = 0.0001f; 55 private const float TWITCH = 0.0001f;
diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs
index 4f28733..a142527 100644
--- a/OpenSim/Tools/pCampBot/Bot.cs
+++ b/OpenSim/Tools/pCampBot/Bot.cs
@@ -57,10 +57,10 @@ namespace pCampBot
57 { 57 {
58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 59
60 public int PacketDebugLevel 60 public int PacketDebugLevel
61 { 61 {
62 get { return m_packetDebugLevel; } 62 get { return m_packetDebugLevel; }
63 set 63 set
64 { 64 {
65 if (value == m_packetDebugLevel) 65 if (value == m_packetDebugLevel)
66 return; 66 return;
@@ -217,7 +217,7 @@ namespace pCampBot
217 Dictionary<string, IBehaviour> updatedBehaviours = new Dictionary<string, IBehaviour>(Behaviours); 217 Dictionary<string, IBehaviour> updatedBehaviours = new Dictionary<string, IBehaviour>(Behaviours);
218 218
219 if (!updatedBehaviours.ContainsKey(behaviour.AbbreviatedName)) 219 if (!updatedBehaviours.ContainsKey(behaviour.AbbreviatedName))
220 { 220 {
221 behaviour.Initialize(this); 221 behaviour.Initialize(this);
222 updatedBehaviours.Add(behaviour.AbbreviatedName, behaviour); 222 updatedBehaviours.Add(behaviour.AbbreviatedName, behaviour);
223 Behaviours = updatedBehaviours; 223 Behaviours = updatedBehaviours;
@@ -313,7 +313,7 @@ namespace pCampBot
313 foreach (IBehaviour behaviour in Behaviours.Values) 313 foreach (IBehaviour behaviour in Behaviours.Values)
314 { 314 {
315// Thread.Sleep(Random.Next(3000, 10000)); 315// Thread.Sleep(Random.Next(3000, 10000));
316 316
317 // m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType()); 317 // m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType());
318 behaviour.Action(); 318 behaviour.Action();
319 } 319 }
@@ -329,7 +329,7 @@ namespace pCampBot
329 public void Disconnect() 329 public void Disconnect()
330 { 330 {
331 ConnectionState = ConnectionState.Disconnecting; 331 ConnectionState = ConnectionState.Disconnecting;
332 332
333 foreach (IBehaviour behaviour in Behaviours.Values) 333 foreach (IBehaviour behaviour in Behaviours.Values)
334 behaviour.Close(); 334 behaviour.Close();
335 335
@@ -337,7 +337,7 @@ namespace pCampBot
337 } 337 }
338 338
339 public void Connect() 339 public void Connect()
340 { 340 {
341 Thread connectThread = new Thread(ConnectInternal); 341 Thread connectThread = new Thread(ConnectInternal);
342 connectThread.Name = Name; 342 connectThread.Name = Name;
343 connectThread.IsBackground = true; 343 connectThread.IsBackground = true;
@@ -508,7 +508,7 @@ namespace pCampBot
508 InventoryFolder clothfolder = FindClothingFolder(); 508 InventoryFolder clothfolder = FindClothingFolder();
509 UUID transid = UUID.Random(); 509 UUID transid = UUID.Random();
510 List<InventoryBase> listwearables = new List<InventoryBase>(); 510 List<InventoryBase> listwearables = new List<InventoryBase>();
511 511
512 for (int i = 0; i < clothing.Length; i++) 512 for (int i = 0; i < clothing.Length; i++)
513 { 513 {
514 UUID assetID = UUID.Random(); 514 UUID assetID = UUID.Random();
@@ -707,7 +707,7 @@ namespace pCampBot
707 m_log.Warn(string.Format("Error requesting {0} {1}", texture ? "texture" : "mesh", assetID), e); 707 m_log.Warn(string.Format("Error requesting {0} {1}", texture ? "texture" : "mesh", assetID), e);
708 } 708 }
709 } 709 }
710 710
711 public void Asset_TextureCallback_Texture(TextureRequestState state, AssetTexture assetTexture) 711 public void Asset_TextureCallback_Texture(TextureRequestState state, AssetTexture assetTexture)
712 { 712 {
713 if (state == TextureRequestState.Finished) 713 if (state == TextureRequestState.Finished)
@@ -722,7 +722,7 @@ namespace pCampBot
722 lock (Manager.AssetsReceived) 722 lock (Manager.AssetsReceived)
723 Manager.AssetsReceived[assetMesh.AssetID] = success; 723 Manager.AssetsReceived[assetMesh.AssetID] = success;
724 } 724 }
725 725
726 public void Asset_ReceivedCallback(AssetDownload transfer, Asset asset) 726 public void Asset_ReceivedCallback(AssetDownload transfer, Asset asset)
727 { 727 {
728 lock (Manager.AssetsReceived) 728 lock (Manager.AssetsReceived)
@@ -733,7 +733,7 @@ namespace pCampBot
733// SaveAsset((AssetWearable) asset); 733// SaveAsset((AssetWearable) asset);
734// } 734// }
735 } 735 }
736 736
737 private void PacketReceivedDebugHandler(object o, PacketReceivedEventArgs args) 737 private void PacketReceivedDebugHandler(object o, PacketReceivedEventArgs args)
738 { 738 {
739 Packet p = args.Packet; 739 Packet p = args.Packet;
@@ -741,7 +741,7 @@ namespace pCampBot
741 Simulator s = args.Simulator; 741 Simulator s = args.Simulator;
742 742
743 m_log.DebugFormat( 743 m_log.DebugFormat(
744 "[BOT]: Bot {0} received from {1} packet {2} #{3}, rel {4}, res {5}", 744 "[BOT]: Bot {0} received from {1} packet {2} #{3}, rel {4}, res {5}",
745 Name, s.Name, p.Type, h.Sequence, h.Reliable, h.Resent); 745 Name, s.Name, p.Type, h.Sequence, h.Reliable, h.Resent);
746 } 746 }
747 } 747 }
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 0af9592..37dc0d9 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -219,14 +219,14 @@ namespace pCampBot
219 HandleDisconnect); 219 HandleDisconnect);
220 220
221 m_console.Commands.AddCommand( 221 m_console.Commands.AddCommand(
222 "Bots", false, "add behaviour", "add behaviour <abbreviated-name> [<bot-number>]", 222 "Bots", false, "add behaviour", "add behaviour <abbreviated-name> [<bot-number>]",
223 "Add a behaviour to a bot", 223 "Add a behaviour to a bot",
224 "If no bot number is specified then behaviour is added to all bots.\n" 224 "If no bot number is specified then behaviour is added to all bots.\n"
225 + "Can be performed on connected or disconnected bots.", 225 + "Can be performed on connected or disconnected bots.",
226 HandleAddBehaviour); 226 HandleAddBehaviour);
227 227
228 m_console.Commands.AddCommand( 228 m_console.Commands.AddCommand(
229 "Bots", false, "remove behaviour", "remove behaviour <abbreviated-name> [<bot-number>]", 229 "Bots", false, "remove behaviour", "remove behaviour <abbreviated-name> [<bot-number>]",
230 "Remove a behaviour from a bot", 230 "Remove a behaviour from a bot",
231 "If no bot number is specified then behaviour is added to all bots.\n" 231 "If no bot number is specified then behaviour is added to all bots.\n"
232 + "Can be performed on connected or disconnected bots.", 232 + "Can be performed on connected or disconnected bots.",
@@ -250,14 +250,14 @@ namespace pCampBot
250 "Bots", false, "show bots", "show bots", "Shows the status of all bots.", HandleShowBotsStatus); 250 "Bots", false, "show bots", "show bots", "Shows the status of all bots.", HandleShowBotsStatus);
251 251
252 m_console.Commands.AddCommand( 252 m_console.Commands.AddCommand(
253 "Bots", false, "show bot", "show bot <bot-number>", 253 "Bots", false, "show bot", "show bot <bot-number>",
254 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); 254 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus);
255 255
256 m_console.Commands.AddCommand( 256 m_console.Commands.AddCommand(
257 "Debug", 257 "Debug",
258 false, 258 false,
259 "debug lludp packet", 259 "debug lludp packet",
260 "debug lludp packet <level> <avatar-first-name> <avatar-last-name>", 260 "debug lludp packet <level> <avatar-first-name> <avatar-last-name>",
261 "Turn on received packet logging.", 261 "Turn on received packet logging.",
262 "If level > 0 then all received packets that are not duplicates are logged.\n" 262 "If level > 0 then all received packets that are not duplicates are logged.\n"
263 + "If level <= 0 then no received packets are logged.", 263 + "If level <= 0 then no received packets are logged.",
@@ -317,7 +317,7 @@ namespace pCampBot
317 // We must give each bot its own list of instantiated behaviours since they store state. 317 // We must give each bot its own list of instantiated behaviours since they store state.
318 List<IBehaviour> behaviours = new List<IBehaviour>(); 318 List<IBehaviour> behaviours = new List<IBehaviour>();
319 319
320 // Hard-coded for now 320 // Hard-coded for now
321 foreach (string abName in abbreviatedNames) 321 foreach (string abName in abbreviatedNames)
322 { 322 {
323 IBehaviour newBehaviour = null; 323 IBehaviour newBehaviour = null;
@@ -534,7 +534,7 @@ namespace pCampBot
534 } 534 }
535 535
536 private void HandleConnect(string module, string[] cmd) 536 private void HandleConnect(string module, string[] cmd)
537 { 537 {
538 lock (m_bots) 538 lock (m_bots)
539 { 539 {
540 int botsToConnect; 540 int botsToConnect;
@@ -607,7 +607,7 @@ namespace pCampBot
607 } 607 }
608 608
609 MainConsole.Instance.OutputFormat( 609 MainConsole.Instance.OutputFormat(
610 "Added behaviours {0} to bot {1}", 610 "Added behaviours {0} to bot {1}",
611 string.Join(", ", behavioursAdded.ConvertAll<string>(b => b.Name).ToArray()), bot.Name); 611 string.Join(", ", behavioursAdded.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
612 } 612 }
613 } 613 }
@@ -665,7 +665,7 @@ namespace pCampBot
665 } 665 }
666 666
667 MainConsole.Instance.OutputFormat( 667 MainConsole.Instance.OutputFormat(
668 "Removed behaviours {0} from bot {1}", 668 "Removed behaviours {0} from bot {1}",
669 string.Join(", ", behavioursRemoved.ConvertAll<string>(b => b.Name).ToArray()), bot.Name); 669 string.Join(", ", behavioursRemoved.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
670 } 670 }
671 } 671 }
@@ -779,7 +779,7 @@ namespace pCampBot
779 string rawValue = cmd[3]; 779 string rawValue = cmd[3];
780 780
781 if (key == "SEND_AGENT_UPDATES") 781 if (key == "SEND_AGENT_UPDATES")
782 { 782 {
783 bool newSendAgentUpdatesSetting; 783 bool newSendAgentUpdatesSetting;
784 784
785 if (!ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, rawValue, out newSendAgentUpdatesSetting)) 785 if (!ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, rawValue, out newSendAgentUpdatesSetting))
@@ -873,10 +873,10 @@ namespace pCampBot
873 totals[bot.ConnectionState]++; 873 totals[bot.ConnectionState]++;
874 874
875 cdt.AddRow( 875 cdt.AddRow(
876 bot.Name, 876 bot.Name,
877 currentSim != null ? currentSim.Name : "(none)", 877 currentSim != null ? currentSim.Name : "(none)",
878 bot.ConnectionState, 878 bot.ConnectionState,
879 bot.SimulatorsCount, 879 bot.SimulatorsCount,
880 string.Join(",", bot.Behaviours.Keys.ToArray())); 880 string.Join(",", bot.Behaviours.Keys.ToArray()));
881 } 881 }
882 } 882 }
@@ -930,7 +930,7 @@ namespace pCampBot
930 ConsoleDisplayList statusCdl = new ConsoleDisplayList(); 930 ConsoleDisplayList statusCdl = new ConsoleDisplayList();
931 931
932 statusCdl.AddRow( 932 statusCdl.AddRow(
933 "Behaviours", 933 "Behaviours",
934 string.Join(", ", bot.Behaviours.Values.ToList().ConvertAll<string>(b => b.Name).ToArray())); 934 string.Join(", ", bot.Behaviours.Values.ToList().ConvertAll<string>(b => b.Name).ToArray()));
935 935
936 GridClient botClient = bot.Client; 936 GridClient botClient = bot.Client;
diff --git a/OpenSim/Tools/pCampBot/Interfaces/IBehaviour.cs b/OpenSim/Tools/pCampBot/Interfaces/IBehaviour.cs
index 660c630..beb8413 100644
--- a/OpenSim/Tools/pCampBot/Interfaces/IBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Interfaces/IBehaviour.cs
@@ -32,7 +32,7 @@ namespace pCampBot.Interfaces
32 public interface IBehaviour 32 public interface IBehaviour
33 { 33 {
34 /// <summary> 34 /// <summary>
35 /// Abbreviated name of this behaviour. 35 /// Abbreviated name of this behaviour.
36 /// </summary> 36 /// </summary>
37 string AbbreviatedName { get; } 37 string AbbreviatedName { get; }
38 38
diff --git a/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs b/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs
index a33f689..8b96c92 100644
--- a/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs
+++ b/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("pCampBot")] 8[assembly: AssemblyTitle("pCampBot")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs
index 1fb0e03..f162f10 100644
--- a/OpenSim/Tools/pCampBot/pCampBot.cs
+++ b/OpenSim/Tools/pCampBot/pCampBot.cs
@@ -64,8 +64,8 @@ namespace pCampBot
64 Help(); 64 Help();
65 } 65 }
66 else if ( 66 else if (
67 commandLineConfig.Get("firstname") == null 67 commandLineConfig.Get("firstname") == null
68 || commandLineConfig.Get("lastname") == null 68 || commandLineConfig.Get("lastname") == null
69 || commandLineConfig.Get("password") == null) 69 || commandLineConfig.Get("password") == null)
70 { 70 {
71 Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots."); 71 Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots.");
@@ -93,7 +93,7 @@ namespace pCampBot
93 93
94 if (botConfig != null) 94 if (botConfig != null)
95 { 95 {
96 bm.InitBotSendAgentUpdates 96 bm.InitBotSendAgentUpdates
97 = botConfig.GetBoolean("SendAgentUpdates", bm.InitBotSendAgentUpdates); 97 = botConfig.GetBoolean("SendAgentUpdates", bm.InitBotSendAgentUpdates);
98 bm.InitBotRequestObjectTextures 98 bm.InitBotRequestObjectTextures
99 = botConfig.GetBoolean("RequestObjectTextures", bm.InitBotRequestObjectTextures); 99 = botConfig.GetBoolean("RequestObjectTextures", bm.InitBotRequestObjectTextures);
diff --git a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs b/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
index f1938a2..cd3cea4 100644
--- a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
+++ b/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -28,45 +28,45 @@ using System.Collections.Specialized;
28 28
29namespace Prebuild.Core.Attributes 29namespace Prebuild.Core.Attributes
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// 32 ///
33 /// </summary> 33 /// </summary>
34 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple=true)] 34 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple=true)]
35 public sealed class DataNodeAttribute : Attribute 35 public sealed class DataNodeAttribute : Attribute
36 { 36 {
37 #region Fields 37 #region Fields
38 38
39 private string m_Name = "unknown"; 39 private string m_Name = "unknown";
40 40
41 #endregion 41 #endregion
42 42
43 #region Constructors 43 #region Constructors
44 44
45 /// <summary> 45 /// <summary>
46 /// Initializes a new instance of the <see cref="DataNodeAttribute"/> class. 46 /// Initializes a new instance of the <see cref="DataNodeAttribute"/> class.
47 /// </summary> 47 /// </summary>
48 /// <param name="name">The name.</param> 48 /// <param name="name">The name.</param>
49 public DataNodeAttribute(string name) 49 public DataNodeAttribute(string name)
50 { 50 {
51 m_Name = name; 51 m_Name = name;
52 } 52 }
53 53
54 #endregion 54 #endregion
55 55
56 #region Properties 56 #region Properties
57 57
58 /// <summary> 58 /// <summary>
59 /// Gets the name. 59 /// Gets the name.
60 /// </summary> 60 /// </summary>
61 /// <value>The name.</value> 61 /// <value>The name.</value>
62 public string Name 62 public string Name
63 { 63 {
64 get 64 get
65 { 65 {
66 return m_Name; 66 return m_Name;
67 } 67 }
68 } 68 }
69 69
70 #endregion 70 #endregion
71 } 71 }
72} 72}
diff --git a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs b/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
index 2d6a6a7..8ef97a1 100644
--- a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
+++ b/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -27,45 +27,45 @@ using System;
27 27
28namespace Prebuild.Core.Attributes 28namespace Prebuild.Core.Attributes
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// 31 ///
32 /// </summary> 32 /// </summary>
33 [AttributeUsage(AttributeTargets.Field)] 33 [AttributeUsage(AttributeTargets.Field)]
34 public sealed class OptionNodeAttribute : Attribute 34 public sealed class OptionNodeAttribute : Attribute
35 { 35 {
36 #region Fields 36 #region Fields
37 37
38 private string m_NodeName; 38 private string m_NodeName;
39 39
40 #endregion 40 #endregion
41 41
42 #region Constructors 42 #region Constructors
43 43
44 /// <summary> 44 /// <summary>
45 /// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class. 45 /// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class.
46 /// </summary> 46 /// </summary>
47 /// <param name="nodeName">Name of the node.</param> 47 /// <param name="nodeName">Name of the node.</param>
48 public OptionNodeAttribute(string nodeName) 48 public OptionNodeAttribute(string nodeName)
49 { 49 {
50 m_NodeName = nodeName; 50 m_NodeName = nodeName;
51 } 51 }
52 52
53 #endregion 53 #endregion
54 54
55 #region Properties 55 #region Properties
56 56
57 /// <summary> 57 /// <summary>
58 /// Gets the name of the node. 58 /// Gets the name of the node.
59 /// </summary> 59 /// </summary>
60 /// <value>The name of the node.</value> 60 /// <value>The name of the node.</value>
61 public string NodeName 61 public string NodeName
62 { 62 {
63 get 63 get
64 { 64 {
65 return m_NodeName; 65 return m_NodeName;
66 } 66 }
67 } 67 }
68 68
69 #endregion 69 #endregion
70 } 70 }
71} 71}
diff --git a/Prebuild/src/Core/Attributes/TargetAttribute.cs b/Prebuild/src/Core/Attributes/TargetAttribute.cs
index 5ad62ee..fb30914 100644
--- a/Prebuild/src/Core/Attributes/TargetAttribute.cs
+++ b/Prebuild/src/Core/Attributes/TargetAttribute.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -27,45 +27,45 @@ using System;
27 27
28namespace Prebuild.Core.Attributes 28namespace Prebuild.Core.Attributes
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// 31 ///
32 /// </summary> 32 /// </summary>
33 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] 33 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
34 public sealed class TargetAttribute : Attribute 34 public sealed class TargetAttribute : Attribute
35 { 35 {
36 #region Fields 36 #region Fields
37 37
38 private string m_Name; 38 private string m_Name;
39 39
40 #endregion 40 #endregion
41 41
42 #region Constructors 42 #region Constructors
43 43
44 /// <summary> 44 /// <summary>
45 /// Initializes a new instance of the <see cref="TargetAttribute"/> class. 45 /// Initializes a new instance of the <see cref="TargetAttribute"/> class.
46 /// </summary> 46 /// </summary>
47 /// <param name="name">The name.</param> 47 /// <param name="name">The name.</param>
48 public TargetAttribute(string name) 48 public TargetAttribute(string name)
49 { 49 {
50 m_Name = name; 50 m_Name = name;
51 } 51 }
52 52
53 #endregion 53 #endregion
54 54
55 #region Properties 55 #region Properties
56 56
57 /// <summary> 57 /// <summary>
58 /// Gets the name. 58 /// Gets the name.
59 /// </summary> 59 /// </summary>
60 /// <value>The name.</value> 60 /// <value>The name.</value>
61 public string Name 61 public string Name
62 { 62 {
63 get 63 get
64 { 64 {
65 return m_Name; 65 return m_Name;
66 } 66 }
67 } 67 }
68 68
69 #endregion 69 #endregion
70 } 70 }
71} 71}
diff --git a/Prebuild/src/Core/FatalException.cs b/Prebuild/src/Core/FatalException.cs
index 3487905..751297a 100644
--- a/Prebuild/src/Core/FatalException.cs
+++ b/Prebuild/src/Core/FatalException.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -28,58 +28,58 @@ using System.Runtime.Serialization;
28 28
29namespace Prebuild.Core 29namespace Prebuild.Core
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// 32 ///
33 /// </summary> 33 /// </summary>
34 [Serializable()] 34 [Serializable()]
35 public class FatalException : Exception 35 public class FatalException : Exception
36 { 36 {
37 #region Constructors 37 #region Constructors
38 38
39
40 /// <summary>
41 /// Initializes a new instance of the <see cref="FatalException"/> class.
42 /// </summary>
43 public FatalException()
44 {
45 }
46 39
47 /// <summary> 40 /// <summary>
48 /// Initializes a new instance of the <see cref="FatalException"/> class. 41 /// Initializes a new instance of the <see cref="FatalException"/> class.
49 /// </summary> 42 /// </summary>
50 /// <param name="format">The format.</param> 43 public FatalException()
51 /// <param name="args">The args.</param> 44 {
52 public FatalException(string format, params object[] args) 45 }
53 : base(String.Format(format, args))
54 {
55 }
56 46
57 /// <summary> 47 /// <summary>
58 /// Exception with specified string 48 /// Initializes a new instance of the <see cref="FatalException"/> class.
59 /// </summary> 49 /// </summary>
60 /// <param name="message">Exception message</param> 50 /// <param name="format">The format.</param>
61 public FatalException(string message): base(message) 51 /// <param name="args">The args.</param>
62 { 52 public FatalException(string format, params object[] args)
63 } 53 : base(String.Format(format, args))
54 {
55 }
64 56
65 /// <summary> 57 /// <summary>
66 /// 58 /// Exception with specified string
67 /// </summary> 59 /// </summary>
68 /// <param name="message"></param> 60 /// <param name="message">Exception message</param>
69 /// <param name="exception"></param> 61 public FatalException(string message): base(message)
70 public FatalException(string message, Exception exception) : base(message, exception) 62 {
71 { 63 }
72 }
73 64
74 /// <summary> 65 /// <summary>
75 /// 66 ///
76 /// </summary> 67 /// </summary>
77 /// <param name="info"></param> 68 /// <param name="message"></param>
78 /// <param name="context"></param> 69 /// <param name="exception"></param>
79 protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context ) 70 public FatalException(string message, Exception exception) : base(message, exception)
80 { 71 {
81 } 72 }
82 73
83 #endregion 74 /// <summary>
84 } 75 ///
76 /// </summary>
77 /// <param name="info"></param>
78 /// <param name="context"></param>
79 protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context )
80 {
81 }
82
83 #endregion
84 }
85} 85}
diff --git a/Prebuild/src/Core/Interfaces/IDataNode.cs b/Prebuild/src/Core/Interfaces/IDataNode.cs
index 986dd2d..4917b18 100644
--- a/Prebuild/src/Core/Interfaces/IDataNode.cs
+++ b/Prebuild/src/Core/Interfaces/IDataNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -26,22 +26,22 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
26using System; 26using System;
27using System.Xml; 27using System.Xml;
28 28
29namespace Prebuild.Core.Interfaces 29namespace Prebuild.Core.Interfaces
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// 32 ///
33 /// </summary> 33 /// </summary>
34 public interface IDataNode 34 public interface IDataNode
35 { 35 {
36 /// <summary> 36 /// <summary>
37 /// Gets or sets the parent. 37 /// Gets or sets the parent.
38 /// </summary> 38 /// </summary>
39 /// <value>The parent.</value> 39 /// <value>The parent.</value>
40 IDataNode Parent { get; set; } 40 IDataNode Parent { get; set; }
41 /// <summary> 41 /// <summary>
42 /// Parses the specified node. 42 /// Parses the specified node.
43 /// </summary> 43 /// </summary>
44 /// <param name="node">The node.</param> 44 /// <param name="node">The node.</param>
45 void Parse(XmlNode node); 45 void Parse(XmlNode node);
46 } 46 }
47} 47}
diff --git a/Prebuild/src/Core/Interfaces/ITarget.cs b/Prebuild/src/Core/Interfaces/ITarget.cs
index 47115c6..e4c3ea4 100644
--- a/Prebuild/src/Core/Interfaces/ITarget.cs
+++ b/Prebuild/src/Core/Interfaces/ITarget.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -25,27 +25,27 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
25 25
26using System; 26using System;
27 27
28namespace Prebuild.Core.Interfaces 28namespace Prebuild.Core.Interfaces
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// 31 ///
32 /// </summary> 32 /// </summary>
33 public interface ITarget 33 public interface ITarget
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// Writes the specified kern. 36 /// Writes the specified kern.
37 /// </summary> 37 /// </summary>
38 /// <param name="kern">The kern.</param> 38 /// <param name="kern">The kern.</param>
39 void Write(Kernel kern); 39 void Write(Kernel kern);
40 /// <summary> 40 /// <summary>
41 /// Cleans the specified kern. 41 /// Cleans the specified kern.
42 /// </summary> 42 /// </summary>
43 /// <param name="kern">The kern.</param> 43 /// <param name="kern">The kern.</param>
44 void Clean(Kernel kern); 44 void Clean(Kernel kern);
45 /// <summary> 45 /// <summary>
46 /// Gets the name. 46 /// Gets the name.
47 /// </summary> 47 /// </summary>
48 /// <value>The name.</value> 48 /// <value>The name.</value>
49 string Name { get; } 49 string Name { get; }
50 } 50 }
51} \ No newline at end of file 51} \ No newline at end of file
diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs
index 761962e..454ff8b 100644
--- a/Prebuild/src/Core/Kernel.cs
+++ b/Prebuild/src/Core/Kernel.cs
@@ -49,202 +49,202 @@ using Prebuild.Core.Interfaces;
49using Prebuild.Core.Nodes; 49using Prebuild.Core.Nodes;
50using Prebuild.Core.Utilities; 50using Prebuild.Core.Utilities;
51 51
52namespace Prebuild.Core 52namespace Prebuild.Core
53{ 53{
54 /// <summary> 54 /// <summary>
55 /// 55 ///
56 /// </summary> 56 /// </summary>
57 public class Kernel : IDisposable 57 public class Kernel : IDisposable
58 { 58 {
59 #region Inner Classes 59 #region Inner Classes
60 60
61 private struct NodeEntry 61 private struct NodeEntry
62 { 62 {
63 public Type Type; 63 public Type Type;
64 public DataNodeAttribute Attribute; 64 public DataNodeAttribute Attribute;
65 } 65 }
66 66
67 #endregion 67 #endregion
68 68
69 #region Fields 69 #region Fields
70 70
71 private static readonly Kernel m_Instance = new Kernel(); 71 private static readonly Kernel m_Instance = new Kernel();
72 72
73 /// <summary> 73 /// <summary>
74 /// This must match the version of the schema that is embeeded 74 /// This must match the version of the schema that is embeeded
75 /// </summary> 75 /// </summary>
76 private const string m_SchemaVersion = "1.10"; 76 private const string m_SchemaVersion = "1.10";
77 private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd"; 77 private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
78 private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema; 78 private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
79 bool disposed; 79 bool disposed;
80 private Version m_Version; 80 private Version m_Version;
81 private const string m_Revision = ""; 81 private const string m_Revision = "";
82 private CommandLineCollection m_CommandLine; 82 private CommandLineCollection m_CommandLine;
83 private Log m_Log; 83 private Log m_Log;
84 private CurrentDirectory m_CurrentWorkingDirectory; 84 private CurrentDirectory m_CurrentWorkingDirectory;
85 private XmlSchemaCollection m_Schemas; 85 private XmlSchemaCollection m_Schemas;
86 86
87 private readonly Dictionary<string, ITarget> m_Targets = new Dictionary<string, ITarget>(); 87 private readonly Dictionary<string, ITarget> m_Targets = new Dictionary<string, ITarget>();
88 private readonly Dictionary<string, NodeEntry> m_Nodes = new Dictionary<string, NodeEntry>(); 88 private readonly Dictionary<string, NodeEntry> m_Nodes = new Dictionary<string, NodeEntry>();
89 89
90 readonly List<SolutionNode> m_Solutions = new List<SolutionNode>(); 90 readonly List<SolutionNode> m_Solutions = new List<SolutionNode>();
91 string m_Target; 91 string m_Target;
92 string m_Clean; 92 string m_Clean;
93 string[] m_RemoveDirectories; 93 string[] m_RemoveDirectories;
94 XmlDocument m_CurrentDoc; 94 XmlDocument m_CurrentDoc;
95 bool m_PauseAfterFinish; 95 bool m_PauseAfterFinish;
96 string[] m_ProjectGroups; 96 string[] m_ProjectGroups;
97 97
98 #endregion 98 #endregion
99 99
100 #region Constructors 100 #region Constructors
101 101
102 private Kernel() 102 private Kernel()
103 { 103 {
104 } 104 }
105 105
106 #endregion 106 #endregion
107 107
108 #region Properties 108 #region Properties
109 109
110 /// <summary> 110 /// <summary>
111 /// Gets a value indicating whether [pause after finish]. 111 /// Gets a value indicating whether [pause after finish].
112 /// </summary> 112 /// </summary>
113 /// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value> 113 /// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value>
114 public bool PauseAfterFinish 114 public bool PauseAfterFinish
115 { 115 {
116 get 116 get
117 { 117 {
118 return m_PauseAfterFinish; 118 return m_PauseAfterFinish;
119 } 119 }
120 } 120 }
121 121
122 /// <summary> 122 /// <summary>
123 /// Gets the instance. 123 /// Gets the instance.
124 /// </summary> 124 /// </summary>
125 /// <value>The instance.</value> 125 /// <value>The instance.</value>
126 public static Kernel Instance 126 public static Kernel Instance
127 { 127 {
128 get 128 get
129 { 129 {
130 return m_Instance; 130 return m_Instance;
131 } 131 }
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Gets the version. 135 /// Gets the version.
136 /// </summary> 136 /// </summary>
137 /// <value>The version.</value> 137 /// <value>The version.</value>
138 public string Version 138 public string Version
139 { 139 {
140 get 140 get
141 { 141 {
142 return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision); 142 return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision);
143 } 143 }
144 } 144 }
145 145
146 /// <summary> 146 /// <summary>
147 /// Gets the command line. 147 /// Gets the command line.
148 /// </summary> 148 /// </summary>
149 /// <value>The command line.</value> 149 /// <value>The command line.</value>
150 public CommandLineCollection CommandLine 150 public CommandLineCollection CommandLine
151 { 151 {
152 get 152 get
153 { 153 {
154 return m_CommandLine; 154 return m_CommandLine;
155 } 155 }
156 } 156 }
157 157
158 /// <summary> 158 /// <summary>
159 /// Gets the targets. 159 /// Gets the targets.
160 /// </summary> 160 /// </summary>
161 /// <value>The targets.</value> 161 /// <value>The targets.</value>
162 public Dictionary<string, ITarget> Targets 162 public Dictionary<string, ITarget> Targets
163 { 163 {
164 get 164 get
165 { 165 {
166 return m_Targets; 166 return m_Targets;
167 } 167 }
168 } 168 }
169 169
170 /// <summary> 170 /// <summary>
171 /// Gets the log. 171 /// Gets the log.
172 /// </summary> 172 /// </summary>
173 /// <value>The log.</value> 173 /// <value>The log.</value>
174 public Log Log 174 public Log Log
175 { 175 {
176 get 176 get
177 { 177 {
178 return m_Log; 178 return m_Log;
179 } 179 }
180 } 180 }
181 181
182 /// <summary> 182 /// <summary>
183 /// Gets the current working directory. 183 /// Gets the current working directory.
184 /// </summary> 184 /// </summary>
185 /// <value>The current working directory.</value> 185 /// <value>The current working directory.</value>
186 public CurrentDirectory CurrentWorkingDirectory 186 public CurrentDirectory CurrentWorkingDirectory
187 { 187 {
188 get 188 get
189 { 189 {
190 return m_CurrentWorkingDirectory; 190 return m_CurrentWorkingDirectory;
191 } 191 }
192 } 192 }
193 193
194 /// <summary> 194 /// <summary>
195 /// Gets the solutions. 195 /// Gets the solutions.
196 /// </summary> 196 /// </summary>
197 /// <value>The solutions.</value> 197 /// <value>The solutions.</value>
198 public List<SolutionNode> Solutions 198 public List<SolutionNode> Solutions
199 { 199 {
200 get 200 get
201 { 201 {
202 return m_Solutions; 202 return m_Solutions;
203 } 203 }
204 } 204 }
205 205
206 /// <summary> 206 /// <summary>
207 /// Gets the XmlDocument object representing the prebuild.xml 207 /// Gets the XmlDocument object representing the prebuild.xml
208 /// being processed 208 /// being processed
209 /// </summary> 209 /// </summary>
210 /// <value>The XmlDocument object</value> 210 /// <value>The XmlDocument object</value>
211 public XmlDocument CurrentDoc 211 public XmlDocument CurrentDoc
212 { 212 {
213 get 213 get
214 { 214 {
215 return m_CurrentDoc; 215 return m_CurrentDoc;
216 } 216 }
217 } 217 }
218 218
219 #endregion 219 #endregion
220 220
221 #region Private Methods 221 #region Private Methods
222 222
223 private static void RemoveDirectories(string rootDir, string[] dirNames) 223 private static void RemoveDirectories(string rootDir, string[] dirNames)
224 { 224 {
225 foreach(string dir in Directory.GetDirectories(rootDir)) 225 foreach(string dir in Directory.GetDirectories(rootDir))
226 { 226 {
227 string simpleName = Path.GetFileName(dir); 227 string simpleName = Path.GetFileName(dir);
228 228
229 if(Array.IndexOf(dirNames, simpleName) != -1) 229 if(Array.IndexOf(dirNames, simpleName) != -1)
230 { 230 {
231 //delete if the name matches one of the directory names to delete 231 //delete if the name matches one of the directory names to delete
232 string fullDirPath = Path.GetFullPath(dir); 232 string fullDirPath = Path.GetFullPath(dir);
233 Directory.Delete(fullDirPath,true); 233 Directory.Delete(fullDirPath,true);
234 } 234 }
235 else//not a match, so check children 235 else//not a match, so check children
236 { 236 {
237 RemoveDirectories(dir,dirNames); 237 RemoveDirectories(dir,dirNames);
238 //recurse, checking children for them 238 //recurse, checking children for them
239 } 239 }
240 } 240 }
241 } 241 }
242 242
243// private void RemoveDirectoryMatches(string rootDir, string dirPattern) 243// private void RemoveDirectoryMatches(string rootDir, string dirPattern)
244// { 244// {
245// foreach(string dir in Directory.GetDirectories(rootDir)) 245// foreach(string dir in Directory.GetDirectories(rootDir))
246// { 246// {
247// foreach(string match in Directory.GetDirectories(dir)) 247// foreach(string match in Directory.GetDirectories(dir))
248// {//delete all child directories that match 248// {//delete all child directories that match
249// Directory.Delete(Path.GetFullPath(match),true); 249// Directory.Delete(Path.GetFullPath(match),true);
250// } 250// }
@@ -253,56 +253,56 @@ namespace Prebuild.Core
253// } 253// }
254// } 254// }
255 255
256 private void LoadSchema() 256 private void LoadSchema()
257 { 257 {
258 Assembly assembly = GetType().Assembly; 258 Assembly assembly = GetType().Assembly;
259 Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema); 259 Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema);
260 if(stream == null) 260 if(stream == null)
261 { 261 {
262 //try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET 262 //try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET
263 stream = assembly.GetManifestResourceStream(m_Schema); 263 stream = assembly.GetManifestResourceStream(m_Schema);
264 if(stream == null) 264 if(stream == null)
265 { 265 {
266 throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema)); 266 throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema));
267 } 267 }
268 } 268 }
269 XmlReader schema = new XmlTextReader(stream); 269 XmlReader schema = new XmlTextReader(stream);
270 270
271 m_Schemas = new XmlSchemaCollection(); 271 m_Schemas = new XmlSchemaCollection();
272 m_Schemas.Add(m_SchemaURI, schema); 272 m_Schemas.Add(m_SchemaURI, schema);
273 } 273 }
274 274
275 private void CacheVersion() 275 private void CacheVersion()
276 { 276 {
277 m_Version = Assembly.GetEntryAssembly().GetName().Version; 277 m_Version = Assembly.GetEntryAssembly().GetName().Version;
278 } 278 }
279 279
280 private void CacheTargets(Assembly assm) 280 private void CacheTargets(Assembly assm)
281 { 281 {
282 foreach(Type t in assm.GetTypes()) 282 foreach(Type t in assm.GetTypes())
283 { 283 {
284 TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget)); 284 TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget));
285 285
286 if(ta == null) 286 if(ta == null)
287 continue; 287 continue;
288 288
289 if (t.IsAbstract) 289 if (t.IsAbstract)
290 continue; 290 continue;
291 291
292 ITarget target = (ITarget)assm.CreateInstance(t.FullName); 292 ITarget target = (ITarget)assm.CreateInstance(t.FullName);
293 if (target == null) 293 if (target == null)
294 { 294 {
295 throw new MissingMethodException("Could not create ITarget instance"); 295 throw new MissingMethodException("Could not create ITarget instance");
296 } 296 }
297 297
298 m_Targets[ta.Name] = target; 298 m_Targets[ta.Name] = target;
299 } 299 }
300 } 300 }
301 301
302 private void CacheNodeTypes(Assembly assm) 302 private void CacheNodeTypes(Assembly assm)
303 { 303 {
304 foreach(Type t in assm.GetTypes()) 304 foreach(Type t in assm.GetTypes())
305 { 305 {
306 foreach (DataNodeAttribute dna in t.GetCustomAttributes(typeof(DataNodeAttribute), true)) 306 foreach (DataNodeAttribute dna in t.GetCustomAttributes(typeof(DataNodeAttribute), true))
307 { 307 {
308 NodeEntry ne = new NodeEntry(); 308 NodeEntry ne = new NodeEntry();
@@ -310,11 +310,11 @@ namespace Prebuild.Core
310 ne.Attribute = dna; 310 ne.Attribute = dna;
311 m_Nodes[dna.Name] = ne; 311 m_Nodes[dna.Name] = ne;
312 } 312 }
313 } 313 }
314 } 314 }
315 315
316 private void LogBanner() 316 private void LogBanner()
317 { 317 {
318 m_Log.Write("Prebuild v" + Version); 318 m_Log.Write("Prebuild v" + Version);
319 m_Log.Write("Copyright (c) 2004-2010"); 319 m_Log.Write("Copyright (c) 2004-2010");
320 m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),"); 320 m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),");
@@ -326,7 +326,7 @@ namespace Prebuild.Core
326 326
327 m_Log.Write("See 'prebuild /usage' for help"); 327 m_Log.Write("See 'prebuild /usage' for help");
328 m_Log.Write(); 328 m_Log.Write();
329 } 329 }
330 330
331 331
332 332
@@ -348,37 +348,37 @@ namespace Prebuild.Core
348 } 348 }
349 349
350 /// <summary> 350 /// <summary>
351 /// 351 ///
352 /// </summary> 352 /// </summary>
353 /// <param name="file"></param> 353 /// <param name="file"></param>
354 /// <param name="solutions"></param> 354 /// <param name="solutions"></param>
355 /// <returns></returns> 355 /// <returns></returns>
356 public void ProcessFile(string file, IList<SolutionNode> solutions) 356 public void ProcessFile(string file, IList<SolutionNode> solutions)
357 { 357 {
358 m_CurrentWorkingDirectory.Push(); 358 m_CurrentWorkingDirectory.Push();
359 359
360 string path = file; 360 string path = file;
361 try 361 try
362 { 362 {
363 try 363 try
364 { 364 {
365 path = Helper.ResolvePath(path); 365 path = Helper.ResolvePath(path);
366 } 366 }
367 catch(ArgumentException) 367 catch(ArgumentException)
368 { 368 {
369 m_Log.Write("Could not open Prebuild file: " + path); 369 m_Log.Write("Could not open Prebuild file: " + path);
370 m_CurrentWorkingDirectory.Pop(); 370 m_CurrentWorkingDirectory.Pop();
371 return; 371 return;
372 } 372 }
373 373
374 Helper.SetCurrentDir(Path.GetDirectoryName(path)); 374 Helper.SetCurrentDir(Path.GetDirectoryName(path));
375 375
376 XmlTextReader reader = new XmlTextReader(path); 376 XmlTextReader reader = new XmlTextReader(path);
377 377
378 Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor(); 378 Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor();
379 379
380 //register command line arguments as XML variables 380 //register command line arguments as XML variables
381 IEnumerator<KeyValuePair<string, string>> dict = m_CommandLine.GetEnumerator(); 381 IEnumerator<KeyValuePair<string, string>> dict = m_CommandLine.GetEnumerator();
382 while (dict.MoveNext()) 382 while (dict.MoveNext())
383 { 383 {
384 string name = dict.Current.Key.Trim(); 384 string name = dict.Current.Key.Trim();
@@ -386,447 +386,447 @@ namespace Prebuild.Core
386 pre.RegisterVariable(name, dict.Current.Value); 386 pre.RegisterVariable(name, dict.Current.Value);
387 } 387 }
388 388
389 string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML 389 string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML
390 390
391 // See if the user put into a pseudo target of "prebuild:preprocessed-input" to indicate they want to see the 391 // See if the user put into a pseudo target of "prebuild:preprocessed-input" to indicate they want to see the
392 // output before the system processes it. 392 // output before the system processes it.
393 if (m_CommandLine.WasPassed("ppi")) 393 if (m_CommandLine.WasPassed("ppi"))
394 { 394 {
395 // Get the filename if there is one, otherwise use a default. 395 // Get the filename if there is one, otherwise use a default.
396 string ppiFile = m_CommandLine["ppi"]; 396 string ppiFile = m_CommandLine["ppi"];
397 if (ppiFile == null || ppiFile.Trim().Length == 0) 397 if (ppiFile == null || ppiFile.Trim().Length == 0)
398 { 398 {
399 ppiFile = "preprocessed-input.xml"; 399 ppiFile = "preprocessed-input.xml";
400 } 400 }
401 401
402 // Write out the string to the given stream. 402 // Write out the string to the given stream.
403 try 403 try
404 { 404 {
405 using (StreamWriter ppiWriter = new StreamWriter(ppiFile)) 405 using (StreamWriter ppiWriter = new StreamWriter(ppiFile))
406 { 406 {
407 ppiWriter.WriteLine(xml); 407 ppiWriter.WriteLine(xml);
408 } 408 }
409 } 409 }
410 catch(IOException ex) 410 catch(IOException ex)
411 { 411 {
412 Console.WriteLine("Could not write PPI file '{0}': {1}", ppiFile, ex.Message); 412 Console.WriteLine("Could not write PPI file '{0}': {1}", ppiFile, ex.Message);
413 } 413 }
414 414
415 // Finish processing this special tag. 415 // Finish processing this special tag.
416 return; 416 return;
417 } 417 }
418 418
419 m_CurrentDoc = new XmlDocument(); 419 m_CurrentDoc = new XmlDocument();
420 try 420 try
421 { 421 {
422#if NO_VALIDATE 422#if NO_VALIDATE
423 XmlReader validator = XmlReader.Create(new StringReader(xml)); 423 XmlReader validator = XmlReader.Create(new StringReader(xml));
424 m_CurrentDoc.Load(validator); 424 m_CurrentDoc.Load(validator);
425#else 425#else
426 XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml))); 426 XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml)));
427 427
428 //validate while reading from string into XmlDocument DOM structure in memory 428 //validate while reading from string into XmlDocument DOM structure in memory
429 foreach(XmlSchema schema in m_Schemas) 429 foreach(XmlSchema schema in m_Schemas)
430 { 430 {
431 validator.Schemas.Add(schema); 431 validator.Schemas.Add(schema);
432 } 432 }
433 m_CurrentDoc.Load(validator); 433 m_CurrentDoc.Load(validator);
434#endif 434#endif
435 } 435 }
436 catch(XmlException e) 436 catch(XmlException e)
437 { 437 {
438 throw new XmlException(e.ToString()); 438 throw new XmlException(e.ToString());
439 } 439 }
440 440
441 //is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details 441 //is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details
442 if(m_CommandLine.WasPassed("ppo")) 442 if(m_CommandLine.WasPassed("ppo"))
443 { 443 {
444 string ppoFile = m_CommandLine["ppo"]; 444 string ppoFile = m_CommandLine["ppo"];
445 if(ppoFile == null || ppoFile.Trim().Length < 1) 445 if(ppoFile == null || ppoFile.Trim().Length < 1)
446 { 446 {
447 ppoFile = "preprocessed.xml"; 447 ppoFile = "preprocessed.xml";
448 } 448 }
449 449
450 StreamWriter writer = null; 450 StreamWriter writer = null;
451 try 451 try
452 { 452 {
453 writer = new StreamWriter(ppoFile); 453 writer = new StreamWriter(ppoFile);
454 writer.Write(xml); 454 writer.Write(xml);
455 } 455 }
456 catch(IOException ex) 456 catch(IOException ex)
457 { 457 {
458 Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message); 458 Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message);
459 } 459 }
460 finally 460 finally
461 { 461 {
462 if(writer != null) 462 if(writer != null)
463 { 463 {
464 writer.Close(); 464 writer.Close();
465 } 465 }
466 } 466 }
467 return; 467 return;
468 } 468 }
469 //start reading the xml config file 469 //start reading the xml config file
470 XmlElement rootNode = m_CurrentDoc.DocumentElement; 470 XmlElement rootNode = m_CurrentDoc.DocumentElement;
471 //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0"); 471 //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0");
472 Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false); 472 Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false);
473 473
474 foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions 474 foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions
475 { 475 {
476 IDataNode dataNode = ParseNode(node, null); 476 IDataNode dataNode = ParseNode(node, null);
477 if(dataNode is ProcessNode) 477 if(dataNode is ProcessNode)
478 { 478 {
479 ProcessNode proc = (ProcessNode)dataNode; 479 ProcessNode proc = (ProcessNode)dataNode;
480 if(proc.IsValid) 480 if(proc.IsValid)
481 { 481 {
482 ProcessFile(proc.Path); 482 ProcessFile(proc.Path);
483 } 483 }
484 } 484 }
485 else if(dataNode is SolutionNode) 485 else if(dataNode is SolutionNode)
486 { 486 {
487 solutions.Add((SolutionNode)dataNode); 487 solutions.Add((SolutionNode)dataNode);
488 } 488 }
489 } 489 }
490 } 490 }
491 catch(XmlSchemaException xse) 491 catch(XmlSchemaException xse)
492 { 492 {
493 m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}", 493 m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}",
494 xse.LineNumber, path, xse.Message); 494 xse.LineNumber, path, xse.Message);
495 } 495 }
496 finally 496 finally
497 { 497 {
498 m_CurrentWorkingDirectory.Pop(); 498 m_CurrentWorkingDirectory.Pop();
499 } 499 }
500 } 500 }
501 501
502 #endregion 502 #endregion
503 503
504 #region Public Methods 504 #region Public Methods
505 505
506 /// <summary> 506 /// <summary>
507 /// Allows the project. 507 /// Allows the project.
508 /// </summary> 508 /// </summary>
509 /// <param name="projectGroupsFlags">The project groups flags.</param> 509 /// <param name="projectGroupsFlags">The project groups flags.</param>
510 /// <returns></returns> 510 /// <returns></returns>
511 public bool AllowProject(string projectGroupsFlags) 511 public bool AllowProject(string projectGroupsFlags)
512 { 512 {
513 if(m_ProjectGroups != null && m_ProjectGroups.Length > 0) 513 if(m_ProjectGroups != null && m_ProjectGroups.Length > 0)
514 { 514 {
515 if(projectGroupsFlags != null && projectGroupsFlags.Length == 0) 515 if(projectGroupsFlags != null && projectGroupsFlags.Length == 0)
516 { 516 {
517 foreach(string group in projectGroupsFlags.Split('|')) 517 foreach(string group in projectGroupsFlags.Split('|'))
518 { 518 {
519 if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list 519 if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list
520 { 520 {
521 return true; 521 return true;
522 } 522 }
523 } 523 }
524 } 524 }
525 return false;//not included in the list or no groups specified for the project 525 return false;//not included in the list or no groups specified for the project
526 } 526 }
527 return true;//no filter specified in the command line args 527 return true;//no filter specified in the command line args
528 } 528 }
529 529
530 /// <summary> 530 /// <summary>
531 /// Gets the type of the node. 531 /// Gets the type of the node.
532 /// </summary> 532 /// </summary>
533 /// <param name="node">The node.</param> 533 /// <param name="node">The node.</param>
534 /// <returns></returns> 534 /// <returns></returns>
535 public Type GetNodeType(XmlNode node) 535 public Type GetNodeType(XmlNode node)
536 { 536 {
537 if( node == null ) 537 if( node == null )
538 { 538 {
539 throw new ArgumentNullException("node"); 539 throw new ArgumentNullException("node");
540 } 540 }
541 if(!m_Nodes.ContainsKey(node.Name)) 541 if(!m_Nodes.ContainsKey(node.Name))
542 { 542 {
543 return null; 543 return null;
544 } 544 }
545 545
546 NodeEntry ne = m_Nodes[node.Name]; 546 NodeEntry ne = m_Nodes[node.Name];
547 return ne.Type; 547 return ne.Type;
548 } 548 }
549 549
550 /// <summary> 550 /// <summary>
551 /// 551 ///
552 /// </summary> 552 /// </summary>
553 /// <param name="node"></param> 553 /// <param name="node"></param>
554 /// <param name="parent"></param> 554 /// <param name="parent"></param>
555 /// <returns></returns> 555 /// <returns></returns>
556 public IDataNode ParseNode(XmlNode node, IDataNode parent) 556 public IDataNode ParseNode(XmlNode node, IDataNode parent)
557 { 557 {
558 return ParseNode(node, parent, null); 558 return ParseNode(node, parent, null);
559 } 559 }
560 560
561 //Create an instance of the data node type that is mapped to the name of the xml DOM node 561 //Create an instance of the data node type that is mapped to the name of the xml DOM node
562 /// <summary> 562 /// <summary>
563 /// Parses the node. 563 /// Parses the node.
564 /// </summary> 564 /// </summary>
565 /// <param name="node">The node.</param> 565 /// <param name="node">The node.</param>
566 /// <param name="parent">The parent.</param> 566 /// <param name="parent">The parent.</param>
567 /// <param name="preNode">The pre node.</param> 567 /// <param name="preNode">The pre node.</param>
568 /// <returns></returns> 568 /// <returns></returns>
569 public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode) 569 public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode)
570 { 570 {
571 IDataNode dataNode; 571 IDataNode dataNode;
572 572
573 try 573 try
574 { 574 {
575 if( node == null ) 575 if( node == null )
576 { 576 {
577 throw new ArgumentNullException("node"); 577 throw new ArgumentNullException("node");
578 } 578 }
579 if(preNode == null) 579 if(preNode == null)
580 { 580 {
581 if(!m_Nodes.ContainsKey(node.Name)) 581 if(!m_Nodes.ContainsKey(node.Name))
582 { 582 {
583 Console.WriteLine("WARNING: Unknown XML node: " + node.Name); 583 Console.WriteLine("WARNING: Unknown XML node: " + node.Name);
584 return null; 584 return null;
585 } 585 }
586 586
587 NodeEntry ne = m_Nodes[node.Name]; 587 NodeEntry ne = m_Nodes[node.Name];
588 Type type = ne.Type; 588 Type type = ne.Type;
589 //DataNodeAttribute dna = ne.Attribute; 589 //DataNodeAttribute dna = ne.Attribute;
590 590
591 dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName); 591 dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName);
592 if(dataNode == null) 592 if(dataNode == null)
593 { 593 {
594 throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName); 594 throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName);
595 } 595 }
596 } 596 }
597 else 597 else
598 dataNode = preNode; 598 dataNode = preNode;
599 599
600 dataNode.Parent = parent; 600 dataNode.Parent = parent;
601 dataNode.Parse(node); 601 dataNode.Parse(node);
602 } 602 }
603 catch(WarningException wex) 603 catch(WarningException wex)
604 { 604 {
605 m_Log.Write(LogType.Warning, wex.Message); 605 m_Log.Write(LogType.Warning, wex.Message);
606 return null; 606 return null;
607 } 607 }
608 catch(FatalException fex) 608 catch(FatalException fex)
609 { 609 {
610 m_Log.WriteException(LogType.Error, fex); 610 m_Log.WriteException(LogType.Error, fex);
611 throw; 611 throw;
612 } 612 }
613 catch(Exception ex) 613 catch(Exception ex)
614 { 614 {
615 m_Log.WriteException(LogType.Error, ex); 615 m_Log.WriteException(LogType.Error, ex);
616 throw; 616 throw;
617 } 617 }
618 618
619 return dataNode; 619 return dataNode;
620 } 620 }
621 621
622 /// <summary> 622 /// <summary>
623 /// Initializes the specified target. 623 /// Initializes the specified target.
624 /// </summary> 624 /// </summary>
625 /// <param name="target">The target.</param> 625 /// <param name="target">The target.</param>
626 /// <param name="args">The args.</param> 626 /// <param name="args">The args.</param>
627 public void Initialize(LogTargets target, string[] args) 627 public void Initialize(LogTargets target, string[] args)
628 { 628 {
629 CacheTargets(GetType().Assembly); 629 CacheTargets(GetType().Assembly);
630 CacheNodeTypes(GetType().Assembly); 630 CacheNodeTypes(GetType().Assembly);
631 CacheVersion(); 631 CacheVersion();
632 632
633 m_CommandLine = new CommandLineCollection(args); 633 m_CommandLine = new CommandLineCollection(args);
634 634
635 string logFile = null; 635 string logFile = null;
636 if(m_CommandLine.WasPassed("log")) 636 if(m_CommandLine.WasPassed("log"))
637 { 637 {
638 logFile = m_CommandLine["log"]; 638 logFile = m_CommandLine["log"];
639 639
640 if(logFile != null && logFile.Length == 0) 640 if(logFile != null && logFile.Length == 0)
641 { 641 {
642 logFile = "Prebuild.log"; 642 logFile = "Prebuild.log";
643 } 643 }
644 } 644 }
645 else 645 else
646 { 646 {
647 target = target & ~LogTargets.File; //dont output to a file 647 target = target & ~LogTargets.File; //dont output to a file
648 } 648 }
649 649
650 m_Log = new Log(target, logFile); 650 m_Log = new Log(target, logFile);
651 LogBanner(); 651 LogBanner();
652 652
653 m_CurrentWorkingDirectory = new CurrentDirectory(); 653 m_CurrentWorkingDirectory = new CurrentDirectory();
654 654
655 m_Target = m_CommandLine["target"]; 655 m_Target = m_CommandLine["target"];
656 m_Clean = m_CommandLine["clean"]; 656 m_Clean = m_CommandLine["clean"];
657 string removeDirs = m_CommandLine["removedir"]; 657 string removeDirs = m_CommandLine["removedir"];
658 if(removeDirs != null && removeDirs.Length == 0) 658 if(removeDirs != null && removeDirs.Length == 0)
659 { 659 {
660 m_RemoveDirectories = removeDirs.Split('|'); 660 m_RemoveDirectories = removeDirs.Split('|');
661 } 661 }
662 662
663 string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include 663 string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include
664 if(flags != null && flags.Length == 0) 664 if(flags != null && flags.Length == 0)
665 { 665 {
666 m_ProjectGroups = flags.Split('|'); 666 m_ProjectGroups = flags.Split('|');
667 } 667 }
668 m_PauseAfterFinish = m_CommandLine.WasPassed("pause"); 668 m_PauseAfterFinish = m_CommandLine.WasPassed("pause");
669 669
670 LoadSchema(); 670 LoadSchema();
671 } 671 }
672 672
673 /// <summary> 673 /// <summary>
674 /// Processes this instance. 674 /// Processes this instance.
675 /// </summary> 675 /// </summary>
676 public void Process() 676 public void Process()
677 { 677 {
678 bool perfomedOtherTask = false; 678 bool perfomedOtherTask = false;
679 if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0) 679 if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0)
680 { 680 {
681 try 681 try
682 { 682 {
683 RemoveDirectories(".",m_RemoveDirectories); 683 RemoveDirectories(".",m_RemoveDirectories);
684 } 684 }
685 catch(IOException e) 685 catch(IOException e)
686 { 686 {
687 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories); 687 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
688 m_Log.WriteException(LogType.Error,e); 688 m_Log.WriteException(LogType.Error,e);
689 } 689 }
690 catch(UnauthorizedAccessException e) 690 catch(UnauthorizedAccessException e)
691 { 691 {
692 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories); 692 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
693 m_Log.WriteException(LogType.Error,e); 693 m_Log.WriteException(LogType.Error,e);
694 } 694 }
695 perfomedOtherTask = true; 695 perfomedOtherTask = true;
696 } 696 }
697 697
698 if(m_Target != null && m_Clean != null) 698 if(m_Target != null && m_Clean != null)
699 { 699 {
700 m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together"); 700 m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together");
701 return; 701 return;
702 } 702 }
703 703
704 if(m_Target == null && m_Clean == null) 704 if(m_Target == null && m_Clean == null)
705 { 705 {
706 if(perfomedOtherTask) //finished 706 if(perfomedOtherTask) //finished
707 { 707 {
708 return; 708 return;
709 } 709 }
710 m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file"); 710 m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file");
711 return; 711 return;
712 } 712 }
713 713
714 string file = "./prebuild.xml"; 714 string file = "./prebuild.xml";
715 if(m_CommandLine.WasPassed("file")) 715 if(m_CommandLine.WasPassed("file"))
716 { 716 {
717 file = m_CommandLine["file"]; 717 file = m_CommandLine["file"];
718 } 718 }
719 719
720 ProcessFile(file); 720 ProcessFile(file);
721 721
722 string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower()); 722 string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower());
723 bool clean = (m_Target == null); 723 bool clean = (m_Target == null);
724 if(clean && target != null && target.Length == 0) 724 if(clean && target != null && target.Length == 0)
725 { 725 {
726 target = "all"; 726 target = "all";
727 } 727 }
728 if(clean && target == "all")//default to all if no target was specified for clean 728 if(clean && target == "all")//default to all if no target was specified for clean
729 { 729 {
730 //check if they passed yes 730 //check if they passed yes
731 if (!m_CommandLine.WasPassed("yes")) 731 if (!m_CommandLine.WasPassed("yes"))
732 { 732 {
733 Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):"); 733 Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):");
734 string ret = Console.ReadLine(); 734 string ret = Console.ReadLine();
735 if(ret == null) 735 if(ret == null)
736 { 736 {
737 return; 737 return;
738 }
739 ret = ret.Trim().ToLower();
740 if((ret.ToLower() != "y" && ret.ToLower() != "yes"))
741 {
742 return;
743 } 738 }
739 ret = ret.Trim().ToLower();
740 if((ret.ToLower() != "y" && ret.ToLower() != "yes"))
741 {
742 return;
743 }
744 }
745 //clean all targets (just cleaning vs2002 target didn't clean nant)
746 foreach(ITarget targ in m_Targets.Values)
747 {
748 targ.Clean(this);
744 } 749 }
745 //clean all targets (just cleaning vs2002 target didn't clean nant) 750 }
746 foreach(ITarget targ in m_Targets.Values) 751 else
747 { 752 {
748 targ.Clean(this); 753 if (!m_Targets.ContainsKey(target)) {
749 } 754 m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target);
750 } 755 return;
751 else 756 }
752 { 757 ITarget targ = m_Targets[target];
753 if (!m_Targets.ContainsKey(target)) { 758
754 m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target); 759 if(clean)
755 return; 760 {
756 } 761 targ.Clean(this);
757 ITarget targ = m_Targets[target]; 762 }
758 763 else
759 if(clean) 764 {
760 { 765 targ.Write(this);
761 targ.Clean(this); 766 }
762 } 767 }
763 else 768
764 { 769 m_Log.Flush();
765 targ.Write(this); 770 }
766 } 771
767 } 772 #endregion
768 773
769 m_Log.Flush(); 774 #region IDisposable Members
770 } 775
771 776 /// <summary>
772 #endregion 777 ///
773 778 /// </summary>
774 #region IDisposable Members 779 public void Dispose()
775 780 {
776 /// <summary> 781 Dispose(true);
777 /// 782 GC.SuppressFinalize(this);
778 /// </summary> 783 }
779 public void Dispose() 784
780 { 785 /// <summary>
781 Dispose(true); 786 /// Dispose objects
782 GC.SuppressFinalize(this); 787 /// </summary>
783 } 788 /// <param name="disposing">
784 789 /// If true, it will dispose close the handle
785 /// <summary> 790 /// </param>
786 /// Dispose objects 791 /// <remarks>
787 /// </summary> 792 /// Will dispose managed and unmanaged resources.
788 /// <param name="disposing"> 793 /// </remarks>
789 /// If true, it will dispose close the handle 794 protected virtual void Dispose(bool disposing)
790 /// </param> 795 {
791 /// <remarks> 796 if (!disposed)
792 /// Will dispose managed and unmanaged resources. 797 {
793 /// </remarks> 798 if (disposing)
794 protected virtual void Dispose(bool disposing) 799 {
795 {
796 if (!disposed)
797 {
798 if (disposing)
799 {
800 GC.SuppressFinalize(this); 800 GC.SuppressFinalize(this);
801 if (m_Log != null) 801 if (m_Log != null)
802 { 802 {
803 m_Log.Close(); 803 m_Log.Close();
804 m_Log = null; 804 m_Log = null;
805 } 805 }
806 } 806 }
807 } 807 }
808 disposed = true; 808 disposed = true;
809 } 809 }
810 810
811 /// <summary> 811 /// <summary>
812 /// 812 ///
813 /// </summary> 813 /// </summary>
814 ~Kernel() 814 ~Kernel()
815 { 815 {
816 Dispose(false); 816 Dispose(false);
817 } 817 }
818 818
819 /// <summary> 819 /// <summary>
820 /// Closes and destroys this object 820 /// Closes and destroys this object
821 /// </summary> 821 /// </summary>
822 /// <remarks> 822 /// <remarks>
823 /// Same as Dispose(true) 823 /// Same as Dispose(true)
824 /// </remarks> 824 /// </remarks>
825 public void Close() 825 public void Close()
826 { 826 {
827 Dispose(); 827 Dispose();
828 } 828 }
829 829
830 #endregion 830 #endregion
831 } 831 }
832} 832}
diff --git a/Prebuild/src/Core/Nodes/AuthorNode.cs b/Prebuild/src/Core/Nodes/AuthorNode.cs
index 4c415bb..e4b024f 100644
--- a/Prebuild/src/Core/Nodes/AuthorNode.cs
+++ b/Prebuild/src/Core/Nodes/AuthorNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,56 +32,56 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 [DataNode("Author")] 38 [DataNode("Author")]
39 public class AuthorNode : DataNode 39 public class AuthorNode : DataNode
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Signature; 43 private string m_Signature;
44 44
45 #endregion 45 #endregion
46 46
47 #region Properties 47 #region Properties
48 48
49 /// <summary> 49 /// <summary>
50 /// Gets the signature. 50 /// Gets the signature.
51 /// </summary> 51 /// </summary>
52 /// <value>The signature.</value> 52 /// <value>The signature.</value>
53 public string Signature 53 public string Signature
54 { 54 {
55 get 55 get
56 { 56 {
57 return m_Signature; 57 return m_Signature;
58 } 58 }
59 } 59 }
60 60
61 #endregion 61 #endregion
62 62
63 #region Public Methods 63 #region Public Methods
64 64
65 /// <summary> 65 /// <summary>
66 /// Parses the specified node. 66 /// Parses the specified node.
67 /// </summary> 67 /// </summary>
68 /// <param name="node">The node.</param> 68 /// <param name="node">The node.</param>
69 public override void Parse(XmlNode node) 69 public override void Parse(XmlNode node)
70 { 70 {
71 if( node == null ) 71 if( node == null )
72 { 72 {
73 throw new ArgumentNullException("node"); 73 throw new ArgumentNullException("node");
74 } 74 }
75 75
76 m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText); 76 m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText);
77 if(m_Signature == null) 77 if(m_Signature == null)
78 { 78 {
79 m_Signature = ""; 79 m_Signature = "";
80 } 80 }
81 81
82 m_Signature = m_Signature.Trim(); 82 m_Signature = m_Signature.Trim();
83 } 83 }
84 84
85 #endregion 85 #endregion
86 } 86 }
87} 87}
diff --git a/Prebuild/src/Core/Nodes/CleanFilesNode.cs b/Prebuild/src/Core/Nodes/CleanFilesNode.cs
index 71405f9..bd564d5 100644
--- a/Prebuild/src/Core/Nodes/CleanFilesNode.cs
+++ b/Prebuild/src/Core/Nodes/CleanFilesNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
diff --git a/Prebuild/src/Core/Nodes/CleanupNode.cs b/Prebuild/src/Core/Nodes/CleanupNode.cs
index b8131b0..f334ea3 100644
--- a/Prebuild/src/Core/Nodes/CleanupNode.cs
+++ b/Prebuild/src/Core/Nodes/CleanupNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -35,40 +35,40 @@ namespace Prebuild.Core.Nodes
35 [DataNode("Cleanup")] 35 [DataNode("Cleanup")]
36 public class CleanupNode : DataNode 36 public class CleanupNode : DataNode
37 { 37 {
38 #region Fields 38 #region Fields
39 39
40 private List<CleanFilesNode> m_CleanFiles = new List<CleanFilesNode>(); 40 private List<CleanFilesNode> m_CleanFiles = new List<CleanFilesNode>();
41 41
42 #endregion 42 #endregion
43 43
44 #region Properties 44 #region Properties
45 45
46 /// <summary> 46 /// <summary>
47 /// Gets the signature. 47 /// Gets the signature.
48 /// </summary> 48 /// </summary>
49 /// <value>The signature.</value> 49 /// <value>The signature.</value>
50 public List<CleanFilesNode> CleanFiles 50 public List<CleanFilesNode> CleanFiles
51 { 51 {
52 get 52 get
53 { 53 {
54 return m_CleanFiles; 54 return m_CleanFiles;
55 } 55 }
56 } 56 }
57 57
58 #endregion 58 #endregion
59 59
60 #region Public Methods 60 #region Public Methods
61 61
62 /// <summary> 62 /// <summary>
63 /// Parses the specified node. 63 /// Parses the specified node.
64 /// </summary> 64 /// </summary>
65 /// <param name="node">The node.</param> 65 /// <param name="node">The node.</param>
66 public override void Parse(XmlNode node) 66 public override void Parse(XmlNode node)
67 { 67 {
68 if( node == null ) 68 if( node == null )
69 { 69 {
70 throw new ArgumentNullException("node"); 70 throw new ArgumentNullException("node");
71 } 71 }
72 72
73 foreach (XmlNode child in node.ChildNodes) 73 foreach (XmlNode child in node.ChildNodes)
74 { 74 {
@@ -78,8 +78,8 @@ namespace Prebuild.Core.Nodes
78 m_CleanFiles.Add((CleanFilesNode)dataNode); 78 m_CleanFiles.Add((CleanFilesNode)dataNode);
79 } 79 }
80 } 80 }
81 } 81 }
82 82
83 #endregion 83 #endregion
84 } 84 }
85} \ No newline at end of file 85} \ No newline at end of file
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs
index cd2f740..a101799 100644
--- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs
+++ b/Prebuild/src/Core/Nodes/ConfigurationNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,185 +32,185 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 [DataNode("Configuration")] 38 [DataNode("Configuration")]
39 public class ConfigurationNode : DataNode, ICloneable, IComparable 39 public class ConfigurationNode : DataNode, ICloneable, IComparable
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Name = "unknown"; 43 private string m_Name = "unknown";
44 private string m_Platform = "AnyCPU"; 44 private string m_Platform = "AnyCPU";
45 private OptionsNode m_Options; 45 private OptionsNode m_Options;
46 46
47 #endregion 47 #endregion
48 48
49 #region Constructors 49 #region Constructors
50 50
51 /// <summary> 51 /// <summary>
52 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class. 52 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class.
53 /// </summary> 53 /// </summary>
54 public ConfigurationNode() 54 public ConfigurationNode()
55 { 55 {
56 m_Options = new OptionsNode(); 56 m_Options = new OptionsNode();
57 } 57 }
58 58
59 #endregion 59 #endregion
60 60
61 #region Properties 61 #region Properties
62 62
63 /// <summary> 63 /// <summary>
64 /// Gets or sets the parent. 64 /// Gets or sets the parent.
65 /// </summary> 65 /// </summary>
66 /// <value>The parent.</value> 66 /// <value>The parent.</value>
67 public override IDataNode Parent 67 public override IDataNode Parent
68 { 68 {
69 get 69 get
70 { 70 {
71 return base.Parent; 71 return base.Parent;
72 } 72 }
73 set 73 set
74 { 74 {
75 base.Parent = value; 75 base.Parent = value;
76 if(base.Parent is SolutionNode) 76 if(base.Parent is SolutionNode)
77 { 77 {
78 SolutionNode node = (SolutionNode)base.Parent; 78 SolutionNode node = (SolutionNode)base.Parent;
79 if(node != null && node.Options != null) 79 if(node != null && node.Options != null)
80 { 80 {
81 node.Options.CopyTo(m_Options); 81 node.Options.CopyTo(m_Options);
82 } 82 }
83 } 83 }
84 } 84 }
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// Identifies the platform for this specific configuration. 88 /// Identifies the platform for this specific configuration.
89 /// </summary> 89 /// </summary>
90 public string Platform 90 public string Platform
91 { 91 {
92 get 92 get
93 { 93 {
94 return m_Platform; 94 return m_Platform;
95 } 95 }
96 set 96 set
97 { 97 {
98 switch ((value + "").ToLower()) 98 switch ((value + "").ToLower())
99 { 99 {
100 case "x86": 100 case "x86":
101 case "x64": 101 case "x64":
102 m_Platform = value; 102 m_Platform = value;
103 break; 103 break;
104 case "itanium": 104 case "itanium":
105 m_Platform = "Itanium"; 105 m_Platform = "Itanium";
106 break; 106 break;
107 default: 107 default:
108 m_Platform = "AnyCPU"; 108 m_Platform = "AnyCPU";
109 break; 109 break;
110 } 110 }
111 } 111 }
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Gets the name. 115 /// Gets the name.
116 /// </summary> 116 /// </summary>
117 /// <value>The name.</value> 117 /// <value>The name.</value>
118 public string Name 118 public string Name
119 { 119 {
120 get 120 get
121 { 121 {
122 return m_Name; 122 return m_Name;
123 } 123 }
124 } 124 }
125 125
126 /// <summary> 126 /// <summary>
127 /// Gets the name and platform for the configuration. 127 /// Gets the name and platform for the configuration.
128 /// </summary> 128 /// </summary>
129 /// <value>The name and platform.</value> 129 /// <value>The name and platform.</value>
130 public string NameAndPlatform 130 public string NameAndPlatform
131 { 131 {
132 get 132 get
133 { 133 {
134 string platform = m_Platform; 134 string platform = m_Platform;
135 if (platform == "AnyCPU") 135 if (platform == "AnyCPU")
136 platform = "Any CPU"; 136 platform = "Any CPU";
137 137
138 return String.Format("{0}|{1}", m_Name, platform); 138 return String.Format("{0}|{1}", m_Name, platform);
139 } 139 }
140 } 140 }
141 141
142 /// <summary> 142 /// <summary>
143 /// Gets or sets the options. 143 /// Gets or sets the options.
144 /// </summary> 144 /// </summary>
145 /// <value>The options.</value> 145 /// <value>The options.</value>
146 public OptionsNode Options 146 public OptionsNode Options
147 { 147 {
148 get 148 get
149 { 149 {
150 return m_Options; 150 return m_Options;
151 } 151 }
152 set 152 set
153 { 153 {
154 m_Options = value; 154 m_Options = value;
155 } 155 }
156 } 156 }
157 157
158 #endregion 158 #endregion
159 159
160 #region Public Methods 160 #region Public Methods
161 161
162 /// <summary> 162 /// <summary>
163 /// Parses the specified node. 163 /// Parses the specified node.
164 /// </summary> 164 /// </summary>
165 /// <param name="node">The node.</param> 165 /// <param name="node">The node.</param>
166 public override void Parse(XmlNode node) 166 public override void Parse(XmlNode node)
167 { 167 {
168 m_Name = Helper.AttributeValue(node, "name", m_Name); 168 m_Name = Helper.AttributeValue(node, "name", m_Name);
169 Platform = Helper.AttributeValue(node, "platform", m_Platform); 169 Platform = Helper.AttributeValue(node, "platform", m_Platform);
170 170
171 if (node == null) 171 if (node == null)
172 { 172 {
173 throw new ArgumentNullException("node"); 173 throw new ArgumentNullException("node");
174 } 174 }
175 foreach(XmlNode child in node.ChildNodes) 175 foreach(XmlNode child in node.ChildNodes)
176 { 176 {
177 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 177 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
178 if(dataNode is OptionsNode) 178 if(dataNode is OptionsNode)
179 { 179 {
180 ((OptionsNode)dataNode).CopyTo(m_Options); 180 ((OptionsNode)dataNode).CopyTo(m_Options);
181 } 181 }
182 } 182 }
183 } 183 }
184 184
185 /// <summary> 185 /// <summary>
186 /// Copies to. 186 /// Copies to.
187 /// </summary> 187 /// </summary>
188 /// <param name="conf">The conf.</param> 188 /// <param name="conf">The conf.</param>
189 public void CopyTo(ConfigurationNode conf) 189 public void CopyTo(ConfigurationNode conf)
190 { 190 {
191 m_Options.CopyTo(conf.m_Options); 191 m_Options.CopyTo(conf.m_Options);
192 } 192 }
193 193
194 #endregion 194 #endregion
195 195
196 #region ICloneable Members 196 #region ICloneable Members
197 197
198 /// <summary> 198 /// <summary>
199 /// Creates a new object that is a copy of the current instance. 199 /// Creates a new object that is a copy of the current instance.
200 /// </summary> 200 /// </summary>
201 /// <returns> 201 /// <returns>
202 /// A new object that is a copy of this instance. 202 /// A new object that is a copy of this instance.
203 /// </returns> 203 /// </returns>
204 public object Clone() 204 public object Clone()
205 { 205 {
206 ConfigurationNode ret = new ConfigurationNode(); 206 ConfigurationNode ret = new ConfigurationNode();
207 ret.m_Name = m_Name; 207 ret.m_Name = m_Name;
208 ret.m_Platform = m_Platform; 208 ret.m_Platform = m_Platform;
209 m_Options.CopyTo(ret.m_Options); 209 m_Options.CopyTo(ret.m_Options);
210 return ret; 210 return ret;
211 } 211 }
212 212
213 #endregion 213 #endregion
214 214
215 #region IComparable Members 215 #region IComparable Members
216 216
@@ -221,5 +221,5 @@ namespace Prebuild.Core.Nodes
221 } 221 }
222 222
223 #endregion 223 #endregion
224 } 224 }
225} 225}
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs b/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs
index 1c38d9e..eba6550 100644
--- a/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs
+++ b/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -27,45 +27,45 @@ using System.Collections.Generic;
27 27
28namespace Prebuild.Core.Nodes 28namespace Prebuild.Core.Nodes
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// Implements a specialized list of configuration nodes which allows for lookup via 31 /// Implements a specialized list of configuration nodes which allows for lookup via
32 /// configuration name and platform. 32 /// configuration name and platform.
33 /// </summary> 33 /// </summary>
34 public class ConfigurationNodeCollection : List<ConfigurationNode> 34 public class ConfigurationNodeCollection : List<ConfigurationNode>
35 { 35 {
36 #region Properties 36 #region Properties
37 37
38 public ConfigurationNode this[string nameAndPlatform] 38 public ConfigurationNode this[string nameAndPlatform]
39 { 39 {
40 get 40 get
41 { 41 {
42 foreach (ConfigurationNode configurationNode in this) 42 foreach (ConfigurationNode configurationNode in this)
43 { 43 {
44 if (configurationNode.NameAndPlatform == nameAndPlatform) 44 if (configurationNode.NameAndPlatform == nameAndPlatform)
45 { 45 {
46 return configurationNode; 46 return configurationNode;
47 } 47 }
48 } 48 }
49 49
50 return null; 50 return null;
51 } 51 }
52 52
53 set 53 set
54 { 54 {
55 // See if the node 55 // See if the node
56 ConfigurationNode configurationNode = this[nameAndPlatform]; 56 ConfigurationNode configurationNode = this[nameAndPlatform];
57 57
58 if (configurationNode != null) 58 if (configurationNode != null)
59 { 59 {
60 this[IndexOf(configurationNode)] = value; 60 this[IndexOf(configurationNode)] = value;
61 } 61 }
62 else 62 else
63 { 63 {
64 Add(value); 64 Add(value);
65 } 65 }
66 } 66 }
67 } 67 }
68 68
69 #endregion 69 #endregion
70 } 70 }
71} 71}
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs
index 318b13c..4f20588 100644
--- a/Prebuild/src/Core/Nodes/DataNode.cs
+++ b/Prebuild/src/Core/Nodes/DataNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,86 +32,86 @@ using System.IO;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 public abstract class DataNode : IDataNode 38 public abstract class DataNode : IDataNode
39 { 39 {
40 #region Fields 40 #region Fields
41 41
42 private IDataNode parent; 42 private IDataNode parent;
43 string[] m_WebTypes = new string[] { "aspx", "ascx", "master", "ashx", "asmx" }; 43 string[] m_WebTypes = new string[] { "aspx", "ascx", "master", "ashx", "asmx" };
44 44
45 #endregion 45 #endregion
46 46
47 #region IDataNode Members 47 #region IDataNode Members
48 48
49 /// <summary> 49 /// <summary>
50 /// Gets or sets the parent. 50 /// Gets or sets the parent.
51 /// </summary> 51 /// </summary>
52 /// <value>The parent.</value> 52 /// <value>The parent.</value>
53 public virtual IDataNode Parent 53 public virtual IDataNode Parent
54 { 54 {
55 get 55 get
56 { 56 {
57 return parent; 57 return parent;
58 } 58 }
59 set 59 set
60 { 60 {
61 parent = value; 61 parent = value;
62 } 62 }
63 } 63 }
64 public string[] WebTypes 64 public string[] WebTypes
65 { 65 {
66 get { return m_WebTypes; } 66 get { return m_WebTypes; }
67 } 67 }
68 /// <summary> 68 /// <summary>
69 /// Parses the specified node. 69 /// Parses the specified node.
70 /// </summary> 70 /// </summary>
71 /// <param name="node">The node.</param> 71 /// <param name="node">The node.</param>
72 public virtual void Parse(XmlNode node) 72 public virtual void Parse(XmlNode node)
73 { 73 {
74 } 74 }
75 public BuildAction GetBuildActionByFileName(string fileName) 75 public BuildAction GetBuildActionByFileName(string fileName)
76 { 76 {
77 string extension = Path.GetExtension(fileName).ToLower(); 77 string extension = Path.GetExtension(fileName).ToLower();
78 foreach (string type in WebTypes) 78 foreach (string type in WebTypes)
79 { 79 {
80 if (extension == type) 80 if (extension == type)
81 return BuildAction.Content; 81 return BuildAction.Content;
82 } 82 }
83 return BuildAction.Compile; 83 return BuildAction.Compile;
84 } 84 }
85 /// <summary> 85 /// <summary>
86 /// Parses the file type to figure out what type it is 86 /// Parses the file type to figure out what type it is
87 /// </summary> 87 /// </summary>
88 /// <returns></returns> 88 /// <returns></returns>
89 public SubType GetSubTypeByFileName(string fileName) 89 public SubType GetSubTypeByFileName(string fileName)
90 { 90 {
91 string extension = System.IO.Path.GetExtension(fileName).ToLower(); 91 string extension = System.IO.Path.GetExtension(fileName).ToLower();
92 string designer = String.Format(".designer{0}", extension); 92 string designer = String.Format(".designer{0}", extension);
93 string path = fileName.ToLower(); 93 string path = fileName.ToLower();
94 if (extension == ".resx") 94 if (extension == ".resx")
95 { 95 {
96 return SubType.Designer; 96 return SubType.Designer;
97 } 97 }
98 else if (path.EndsWith(".settings")) 98 else if (path.EndsWith(".settings"))
99 { 99 {
100 return SubType.Settings; 100 return SubType.Settings;
101 } 101 }
102 else 102 else
103 { 103 {
104 104
105 foreach (string type in WebTypes) 105 foreach (string type in WebTypes)
106 { 106 {
107 if (path.EndsWith(type)) 107 if (path.EndsWith(type))
108 { 108 {
109 return SubType.CodeBehind; 109 return SubType.CodeBehind;
110 } 110 }
111 } 111 }
112 } 112 }
113 return SubType.Code; 113 return SubType.Code;
114 } 114 }
115 #endregion 115 #endregion
116 } 116 }
117} 117}
diff --git a/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs b/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs
index 845db24..974b74e 100644
--- a/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs
+++ b/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs
@@ -43,18 +43,18 @@ namespace Prebuild.Core.Nodes
43 providerId = new Guid("7F041D59-D76A-44ed-9AA2-FBF6B0548B80"); break; 43 providerId = new Guid("7F041D59-D76A-44ed-9AA2-FBF6B0548B80"); break;
44 case "System.Data.OracleClient": 44 case "System.Data.OracleClient":
45 providerId = new Guid("8F5C5018-AE09-42cf-B2CC-2CCCC7CFC2BB"); break; 45 providerId = new Guid("8F5C5018-AE09-42cf-B2CC-2CCCC7CFC2BB"); break;
46 case "System.Data.SqlClient": 46 case "System.Data.SqlClient":
47 providerId = new Guid("91510608-8809-4020-8897-FBA057E22D54"); break; 47 providerId = new Guid("91510608-8809-4020-8897-FBA057E22D54"); break;
48 case "System.Data.Odbc": 48 case "System.Data.Odbc":
49 providerId = new Guid("C3D4F4CE-2C48-4381-B4D6-34FA50C51C86"); break; 49 providerId = new Guid("C3D4F4CE-2C48-4381-B4D6-34FA50C51C86"); break;
50 50
51 default: 51 default:
52 throw new ArgumentOutOfRangeException("providerName", providerName, "Could not provider name to an id."); 52 throw new ArgumentOutOfRangeException("providerName", providerName, "Could not provider name to an id.");
53 } 53 }
54 } 54 }
55 else 55 else
56 providerId = new Guid(Helper.AttributeValue(node, "providerId", Guid.Empty.ToString("B"))); 56 providerId = new Guid(Helper.AttributeValue(node, "providerId", Guid.Empty.ToString("B")));
57 57
58 connectionString = Helper.AttributeValue(node, "connectionString", connectionString); 58 connectionString = Helper.AttributeValue(node, "connectionString", connectionString);
59 59
60 base.Parse(node); 60 base.Parse(node);
diff --git a/Prebuild/src/Core/Nodes/DescriptionNode.cs b/Prebuild/src/Core/Nodes/DescriptionNode.cs
index d1293a0..713b47c 100644
--- a/Prebuild/src/Core/Nodes/DescriptionNode.cs
+++ b/Prebuild/src/Core/Nodes/DescriptionNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,56 +32,56 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// The object representing the /Prebuild/Solution/Project/Description element 36 /// The object representing the /Prebuild/Solution/Project/Description element
37 /// </summary> 37 /// </summary>
38 [DataNode("Description")] 38 [DataNode("Description")]
39 public class DescriptionNode : DataNode 39 public class DescriptionNode : DataNode
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Value; 43 private string m_Value;
44 44
45 #endregion 45 #endregion
46 46
47 #region Properties 47 #region Properties
48 48
49 /// <summary> 49 /// <summary>
50 /// Gets the description Value. 50 /// Gets the description Value.
51 /// </summary> 51 /// </summary>
52 /// <value>The description Value.</value> 52 /// <value>The description Value.</value>
53 public string Value 53 public string Value
54 { 54 {
55 get 55 get
56 { 56 {
57 return m_Value; 57 return m_Value;
58 } 58 }
59 } 59 }
60 60
61 #endregion 61 #endregion
62 62
63 #region Public Methods 63 #region Public Methods
64 64
65 /// <summary> 65 /// <summary>
66 /// Parses the specified node. 66 /// Parses the specified node.
67 /// </summary> 67 /// </summary>
68 /// <param name="node">The node.</param> 68 /// <param name="node">The node.</param>
69 public override void Parse(XmlNode node) 69 public override void Parse(XmlNode node)
70 { 70 {
71 if( node == null ) 71 if( node == null )
72 { 72 {
73 throw new ArgumentNullException("node"); 73 throw new ArgumentNullException("node");
74 } 74 }
75 75
76 m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText); 76 m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText);
77 if(m_Value == null) 77 if(m_Value == null)
78 { 78 {
79 m_Value = ""; 79 m_Value = "";
80 } 80 }
81 81
82 m_Value = m_Value.Trim(); 82 m_Value = m_Value.Trim();
83 } 83 }
84 84
85 #endregion 85 #endregion
86 } 86 }
87} 87}
diff --git a/Prebuild/src/Core/Nodes/ExcludeNode.cs b/Prebuild/src/Core/Nodes/ExcludeNode.cs
index 7f04cba..addbdb4 100644
--- a/Prebuild/src/Core/Nodes/ExcludeNode.cs
+++ b/Prebuild/src/Core/Nodes/ExcludeNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,31 +32,31 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 [DataNode("Exclude")] 38 [DataNode("Exclude")]
39 public class ExcludeNode : DataNode 39 public class ExcludeNode : DataNode
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Pattern = ""; 43 private string m_Pattern = "";
44 44
45 #endregion 45 #endregion
46 46
47 #region Properties 47 #region Properties
48 48
49 /// <summary> 49 /// <summary>
50 /// Gets the name. 50 /// Gets the name.
51 /// </summary> 51 /// </summary>
52 /// <value>The name.</value> 52 /// <value>The name.</value>
53 public string Name 53 public string Name
54 { 54 {
55 get 55 get
56 { 56 {
57 return m_Pattern; 57 return m_Pattern;
58 } 58 }
59 } 59 }
60 60
61 /// <summary> 61 /// <summary>
62 /// Gets the pattern. 62 /// Gets the pattern.
@@ -72,18 +72,18 @@ namespace Prebuild.Core.Nodes
72 72
73 #endregion 73 #endregion
74 74
75 #region Public Methods 75 #region Public Methods
76 76
77 /// <summary> 77 /// <summary>
78 /// Parses the specified node. 78 /// Parses the specified node.
79 /// </summary> 79 /// </summary>
80 /// <param name="node">The node.</param> 80 /// <param name="node">The node.</param>
81 public override void Parse(XmlNode node) 81 public override void Parse(XmlNode node)
82 { 82 {
83 m_Pattern = Helper.AttributeValue( node, "name", m_Pattern ); 83 m_Pattern = Helper.AttributeValue( node, "name", m_Pattern );
84 m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern ); 84 m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern );
85 } 85 }
86 86
87 #endregion 87 #endregion
88 } 88 }
89} 89}
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs
index b313ffa..c66f123 100644
--- a/Prebuild/src/Core/Nodes/FileNode.cs
+++ b/Prebuild/src/Core/Nodes/FileNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,193 +34,193 @@ using Prebuild.Core.Targets;
34 34
35namespace Prebuild.Core.Nodes 35namespace Prebuild.Core.Nodes
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 public enum BuildAction 40 public enum BuildAction
41 { 41 {
42 /// <summary>
43 ///
44 /// </summary>
45 None,
46 /// <summary>
47 ///
48 /// </summary>
49 Compile,
50 /// <summary>
51 ///
52 /// </summary>
53 Content,
54 /// <summary>
55 ///
56 /// </summary>
57 EmbeddedResource,
58 /// <summary>
59 ///
60 /// </summary>
61 ApplicationDefinition,
62 /// <summary>
63 ///
64 /// </summary>
65 Page,
66 /// <summary> 42 /// <summary>
67 /// 43 ///
44 /// </summary>
45 None,
46 /// <summary>
47 ///
48 /// </summary>
49 Compile,
50 /// <summary>
51 ///
52 /// </summary>
53 Content,
54 /// <summary>
55 ///
56 /// </summary>
57 EmbeddedResource,
58 /// <summary>
59 ///
60 /// </summary>
61 ApplicationDefinition,
62 /// <summary>
63 ///
64 /// </summary>
65 Page,
66 /// <summary>
67 ///
68 /// </summary> 68 /// </summary>
69 Copy 69 Copy
70 } 70 }
71 71
72 /// <summary> 72 /// <summary>
73 /// 73 ///
74 /// </summary> 74 /// </summary>
75 public enum SubType 75 public enum SubType
76 { 76 {
77 /// <summary>
78 ///
79 /// </summary>
80 Code,
81 /// <summary>
82 ///
83 /// </summary>
84 Component,
85 /// <summary> 77 /// <summary>
86 /// 78 ///
79 /// </summary>
80 Code,
81 /// <summary>
82 ///
83 /// </summary>
84 Component,
85 /// <summary>
86 ///
87 /// </summary> 87 /// </summary>
88 Designer, 88 Designer,
89 /// <summary> 89 /// <summary>
90 /// 90 ///
91 /// </summary> 91 /// </summary>
92 Form, 92 Form,
93 /// <summary> 93 /// <summary>
94 /// 94 ///
95 /// </summary> 95 /// </summary>
96 Settings, 96 Settings,
97 /// <summary> 97 /// <summary>
98 /// 98 ///
99 /// </summary> 99 /// </summary>
100 UserControl, 100 UserControl,
101 /// <summary> 101 /// <summary>
102 /// 102 ///
103 /// </summary> 103 /// </summary>
104 CodeBehind, 104 CodeBehind,
105 } 105 }
106 106
107 public enum CopyToOutput 107 public enum CopyToOutput
108 { 108 {
109 Never, 109 Never,
110 Always, 110 Always,
111 PreserveNewest 111 PreserveNewest
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// 115 ///
116 /// </summary> 116 /// </summary>
117 [DataNode("File")] 117 [DataNode("File")]
118 public class FileNode : DataNode 118 public class FileNode : DataNode
119 { 119 {
120 #region Fields 120 #region Fields
121 121
122 private string m_Path; 122 private string m_Path;
123 private string m_ResourceName = ""; 123 private string m_ResourceName = "";
124 private BuildAction? m_BuildAction; 124 private BuildAction? m_BuildAction;
125 private bool m_Valid; 125 private bool m_Valid;
126 private SubType? m_SubType; 126 private SubType? m_SubType;
127 private CopyToOutput m_CopyToOutput = CopyToOutput.Never; 127 private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
128 private bool m_Link = false; 128 private bool m_Link = false;
129 private string m_LinkPath = string.Empty; 129 private string m_LinkPath = string.Empty;
130 private bool m_PreservePath = false; 130 private bool m_PreservePath = false;
131 131
132 132
133 #endregion 133 #endregion
134 134
135 #region Properties 135 #region Properties
136 136
137 /// <summary> 137 /// <summary>
138 /// 138 ///
139 /// </summary> 139 /// </summary>
140 public string Path 140 public string Path
141 { 141 {
142 get 142 get
143 { 143 {
144 return m_Path; 144 return m_Path;
145 } 145 }
146 } 146 }
147 147
148 /// <summary> 148 /// <summary>
149 /// 149 ///
150 /// </summary> 150 /// </summary>
151 public string ResourceName 151 public string ResourceName
152 { 152 {
153 get 153 get
154 { 154 {
155 return m_ResourceName; 155 return m_ResourceName;
156 } 156 }
157 } 157 }
158 158
159 /// <summary> 159 /// <summary>
160 /// 160 ///
161 /// </summary> 161 /// </summary>
162 public BuildAction BuildAction 162 public BuildAction BuildAction
163 { 163 {
164 get 164 get
165 { 165 {
166 if (m_BuildAction != null) 166 if (m_BuildAction != null)
167 return m_BuildAction.Value; 167 return m_BuildAction.Value;
168 else 168 else
169 return GetBuildActionByFileName(this.Path); 169 return GetBuildActionByFileName(this.Path);
170 170
171 } 171 }
172 } 172 }
173 173
174 public CopyToOutput CopyToOutput 174 public CopyToOutput CopyToOutput
175 { 175 {
176 get 176 get
177 { 177 {
178 return this.m_CopyToOutput; 178 return this.m_CopyToOutput;
179 } 179 }
180 } 180 }
181
182 public bool IsLink
183 {
184 get
185 {
186 return this.m_Link;
187 }
188 }
189
190 public string LinkPath
191 {
192 get
193 {
194 return this.m_LinkPath;
195 }
196 }
197 /// <summary>
198 ///
199 /// </summary>
200 public SubType SubType
201 {
202 get
203 {
204 if (m_SubType != null)
205 return m_SubType.Value;
206 else
207 return GetSubTypeByFileName(this.Path);
208 }
209 }
210
211 /// <summary>
212 ///
213 /// </summary>
214 public bool IsValid
215 {
216 get
217 {
218 return m_Valid;
219 }
220 }
221 181
182 public bool IsLink
183 {
184 get
185 {
186 return this.m_Link;
187 }
188 }
189
190 public string LinkPath
191 {
192 get
193 {
194 return this.m_LinkPath;
195 }
196 }
222 /// <summary> 197 /// <summary>
223 /// 198 ///
199 /// </summary>
200 public SubType SubType
201 {
202 get
203 {
204 if (m_SubType != null)
205 return m_SubType.Value;
206 else
207 return GetSubTypeByFileName(this.Path);
208 }
209 }
210
211 /// <summary>
212 ///
213 /// </summary>
214 public bool IsValid
215 {
216 get
217 {
218 return m_Valid;
219 }
220 }
221
222 /// <summary>
223 ///
224 /// </summary> 224 /// </summary>
225 /// <param name="file"></param> 225 /// <param name="file"></param>
226 /// <returns></returns> 226 /// <returns></returns>
@@ -232,61 +232,61 @@ namespace Prebuild.Core.Nodes
232 } 232 }
233 } 233 }
234 234
235 #endregion 235 #endregion
236 236
237 #region Public Methods 237 #region Public Methods
238 238
239 /// <summary> 239 /// <summary>
240 /// 240 ///
241 /// </summary> 241 /// </summary>
242 /// <param name="node"></param> 242 /// <param name="node"></param>
243 public override void Parse(XmlNode node) 243 public override void Parse(XmlNode node)
244 { 244 {
245 string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); 245 string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty);
246 if (buildAction != string.Empty) 246 if (buildAction != string.Empty)
247 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); 247 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction);
248 string subType = Helper.AttributeValue(node, "subType", string.Empty); 248 string subType = Helper.AttributeValue(node, "subType", string.Empty);
249 if (subType != String.Empty) 249 if (subType != String.Empty)
250 m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); 250 m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
251 251
252 Console.WriteLine("[FileNode]:BuildAction is {0}", buildAction); 252 Console.WriteLine("[FileNode]:BuildAction is {0}", buildAction);
253 253
254 254
255 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); 255 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
256 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 256 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
257 if ( this.m_Link == true ) 257 if ( this.m_Link == true )
258 { 258 {
259 this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); 259 this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty );
260 } 260 }
261 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); 261 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
262 this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); 262 this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) );
263 263
264 if( node == null ) 264 if( node == null )
265 { 265 {
266 throw new ArgumentNullException("node"); 266 throw new ArgumentNullException("node");
267 } 267 }
268 268
269 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); 269 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
270 if(m_Path == null) 270 if(m_Path == null)
271 { 271 {
272 m_Path = ""; 272 m_Path = "";
273 } 273 }
274 274
275 m_Path = m_Path.Trim(); 275 m_Path = m_Path.Trim();
276 m_Valid = true; 276 m_Valid = true;
277 if(!File.Exists(m_Path)) 277 if(!File.Exists(m_Path))
278 { 278 {
279 m_Valid = false; 279 m_Valid = false;
280 Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path); 280 Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path);
281 } 281 }
282 282
283 if (System.IO.Path.GetExtension(m_Path) == ".settings") 283 if (System.IO.Path.GetExtension(m_Path) == ".settings")
284 { 284 {
285 m_SubType = SubType.Settings; 285 m_SubType = SubType.Settings;
286 m_BuildAction = BuildAction.None; 286 m_BuildAction = BuildAction.None;
287 } 287 }
288 } 288 }
289 289
290 #endregion 290 #endregion
291 } 291 }
292} 292}
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs
index 16658f3..58b54fb 100644
--- a/Prebuild/src/Core/Nodes/FilesNode.cs
+++ b/Prebuild/src/Core/Nodes/FilesNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,36 +34,36 @@ using System.IO;
34 34
35namespace Prebuild.Core.Nodes 35namespace Prebuild.Core.Nodes
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 [DataNode("Files")] 40 [DataNode("Files")]
41 public class FilesNode : DataNode 41 public class FilesNode : DataNode
42 { 42 {
43 #region Fields 43 #region Fields
44 44
45 private readonly List<string> m_Files = new List<string>(); 45 private readonly List<string> m_Files = new List<string>();
46 private readonly Dictionary<string,BuildAction> m_BuildActions = new Dictionary<string, BuildAction>(); 46 private readonly Dictionary<string,BuildAction> m_BuildActions = new Dictionary<string, BuildAction>();
47 private readonly Dictionary<string, SubType> m_SubTypes = new Dictionary<string, SubType>(); 47 private readonly Dictionary<string, SubType> m_SubTypes = new Dictionary<string, SubType>();
48 private readonly Dictionary<string, string> m_ResourceNames = new Dictionary<string, string>(); 48 private readonly Dictionary<string, string> m_ResourceNames = new Dictionary<string, string>();
49 private readonly Dictionary<string, CopyToOutput> m_CopyToOutputs = new Dictionary<string, CopyToOutput>(); 49 private readonly Dictionary<string, CopyToOutput> m_CopyToOutputs = new Dictionary<string, CopyToOutput>();
50 private readonly Dictionary<string, bool> m_Links = new Dictionary<string, bool>(); 50 private readonly Dictionary<string, bool> m_Links = new Dictionary<string, bool>();
51 private readonly Dictionary<string, string> m_LinkPaths = new Dictionary<string, string>(); 51 private readonly Dictionary<string, string> m_LinkPaths = new Dictionary<string, string>();
52 private readonly Dictionary<string, bool> m_PreservePaths = new Dictionary<string, bool>(); 52 private readonly Dictionary<string, bool> m_PreservePaths = new Dictionary<string, bool>();
53 private readonly Dictionary<string, string> m_DestinationPath = new Dictionary<string, string>(); 53 private readonly Dictionary<string, string> m_DestinationPath = new Dictionary<string, string>();
54 private readonly NameValueCollection m_CopyFiles = new NameValueCollection(); 54 private readonly NameValueCollection m_CopyFiles = new NameValueCollection();
55 55
56 #endregion 56 #endregion
57 57
58 #region Properties 58 #region Properties
59 59
60 public int Count 60 public int Count
61 { 61 {
62 get 62 get
63 { 63 {
64 return m_Files.Count; 64 return m_Files.Count;
65 } 65 }
66 } 66 }
67 67
68 public string[] Destinations 68 public string[] Destinations
69 { 69 {
@@ -75,19 +75,19 @@ namespace Prebuild.Core.Nodes
75 get { return m_CopyFiles.Count; } 75 get { return m_CopyFiles.Count; }
76 } 76 }
77 77
78 #endregion 78 #endregion
79 79
80 #region Public Methods 80 #region Public Methods
81 81
82 public BuildAction GetBuildAction(string file) 82 public BuildAction GetBuildAction(string file)
83 { 83 {
84 if(!m_BuildActions.ContainsKey(file)) 84 if(!m_BuildActions.ContainsKey(file))
85 { 85 {
86 return BuildAction.Compile; 86 return BuildAction.Compile;
87 } 87 }
88 88
89 return m_BuildActions[file]; 89 return m_BuildActions[file];
90 } 90 }
91 91
92 public string GetDestinationPath(string file) 92 public string GetDestinationPath(string file)
93 { 93 {
@@ -103,57 +103,57 @@ namespace Prebuild.Core.Nodes
103 return m_CopyFiles.GetValues(dest); 103 return m_CopyFiles.GetValues(dest);
104 } 104 }
105 105
106 public CopyToOutput GetCopyToOutput(string file) 106 public CopyToOutput GetCopyToOutput(string file)
107 { 107 {
108 if (!m_CopyToOutputs.ContainsKey(file)) 108 if (!m_CopyToOutputs.ContainsKey(file))
109 { 109 {
110 return CopyToOutput.Never; 110 return CopyToOutput.Never;
111 } 111 }
112 return m_CopyToOutputs[file]; 112 return m_CopyToOutputs[file];
113 } 113 }
114 114
115 public bool GetIsLink(string file) 115 public bool GetIsLink(string file)
116 { 116 {
117 if (!m_Links.ContainsKey(file)) 117 if (!m_Links.ContainsKey(file))
118 { 118 {
119 return false; 119 return false;
120 } 120 }
121 return m_Links[file]; 121 return m_Links[file];
122 } 122 }
123 123
124 public bool Contains(string file) 124 public bool Contains(string file)
125 { 125 {
126 return m_Files.Contains(file); 126 return m_Files.Contains(file);
127 } 127 }
128 128
129 public string GetLinkPath( string file ) 129 public string GetLinkPath( string file )
130 { 130 {
131 if ( !m_LinkPaths.ContainsKey( file ) ) 131 if ( !m_LinkPaths.ContainsKey( file ) )
132 { 132 {
133 return string.Empty; 133 return string.Empty;
134 } 134 }
135 return m_LinkPaths[ file ]; 135 return m_LinkPaths[ file ];
136 } 136 }
137 137
138 public SubType GetSubType(string file) 138 public SubType GetSubType(string file)
139 { 139 {
140 if(!m_SubTypes.ContainsKey(file)) 140 if(!m_SubTypes.ContainsKey(file))
141 { 141 {
142 return SubType.Code; 142 return SubType.Code;
143 } 143 }
144 144
145 return m_SubTypes[file]; 145 return m_SubTypes[file];
146 } 146 }
147 147
148 public string GetResourceName(string file) 148 public string GetResourceName(string file)
149 { 149 {
150 if(!m_ResourceNames.ContainsKey(file)) 150 if(!m_ResourceNames.ContainsKey(file))
151 { 151 {
152 return string.Empty; 152 return string.Empty;
153 } 153 }
154 154
155 return m_ResourceNames[file]; 155 return m_ResourceNames[file];
156 } 156 }
157 157
158 public bool GetPreservePath( string file ) 158 public bool GetPreservePath( string file )
159 { 159 {
@@ -165,45 +165,45 @@ namespace Prebuild.Core.Nodes
165 return m_PreservePaths[ file ]; 165 return m_PreservePaths[ file ];
166 } 166 }
167 167
168 public override void Parse(XmlNode node) 168 public override void Parse(XmlNode node)
169 { 169 {
170 if( node == null ) 170 if( node == null )
171 { 171 {
172 throw new ArgumentNullException("node"); 172 throw new ArgumentNullException("node");
173 } 173 }
174 foreach(XmlNode child in node.ChildNodes) 174 foreach(XmlNode child in node.ChildNodes)
175 { 175 {
176 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 176 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
177 if(dataNode is FileNode) 177 if(dataNode is FileNode)
178 { 178 {
179 FileNode fileNode = (FileNode)dataNode; 179 FileNode fileNode = (FileNode)dataNode;
180 if(fileNode.IsValid) 180 if(fileNode.IsValid)
181 { 181 {
182 if (!m_Files.Contains(fileNode.Path)) 182 if (!m_Files.Contains(fileNode.Path))
183 { 183 {
184 m_Files.Add(fileNode.Path); 184 m_Files.Add(fileNode.Path);
185 m_BuildActions[fileNode.Path] = fileNode.BuildAction; 185 m_BuildActions[fileNode.Path] = fileNode.BuildAction;
186 m_SubTypes[fileNode.Path] = fileNode.SubType; 186 m_SubTypes[fileNode.Path] = fileNode.SubType;
187 m_ResourceNames[fileNode.Path] = fileNode.ResourceName; 187 m_ResourceNames[fileNode.Path] = fileNode.ResourceName;
188 m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; 188 m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath;
189 m_Links[ fileNode.Path ] = fileNode.IsLink; 189 m_Links[ fileNode.Path ] = fileNode.IsLink;
190 m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; 190 m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath;
191 m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; 191 m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput;
192 192
193 } 193 }
194 } 194 }
195 } 195 }
196 else if(dataNode is MatchNode) 196 else if(dataNode is MatchNode)
197 { 197 {
198 foreach(string file in ((MatchNode)dataNode).Files) 198 foreach(string file in ((MatchNode)dataNode).Files)
199 { 199 {
200 MatchNode matchNode = (MatchNode)dataNode; 200 MatchNode matchNode = (MatchNode)dataNode;
201 if (!m_Files.Contains(file)) 201 if (!m_Files.Contains(file))
202 { 202 {
203 m_Files.Add(file); 203 m_Files.Add(file);
204 if (matchNode.BuildAction == null) 204 if (matchNode.BuildAction == null)
205 m_BuildActions[file] = GetBuildActionByFileName(file); 205 m_BuildActions[file] = GetBuildActionByFileName(file);
206 else 206 else
207 m_BuildActions[file] = matchNode.BuildAction.Value; 207 m_BuildActions[file] = matchNode.BuildAction.Value;
208 208
209 if (matchNode.BuildAction == BuildAction.Copy) 209 if (matchNode.BuildAction == BuildAction.Copy)
@@ -212,27 +212,27 @@ namespace Prebuild.Core.Nodes
212 m_DestinationPath[file] = matchNode.DestinationPath; 212 m_DestinationPath[file] = matchNode.DestinationPath;
213 } 213 }
214 214
215 m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value; 215 m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value;
216 m_ResourceNames[ file ] = matchNode.ResourceName; 216 m_ResourceNames[ file ] = matchNode.ResourceName;
217 m_PreservePaths[ file ] = matchNode.PreservePath; 217 m_PreservePaths[ file ] = matchNode.PreservePath;
218 m_Links[ file ] = matchNode.IsLink; 218 m_Links[ file ] = matchNode.IsLink;
219 m_LinkPaths[ file ] = matchNode.LinkPath; 219 m_LinkPaths[ file ] = matchNode.LinkPath;
220 m_CopyToOutputs[ file ] = matchNode.CopyToOutput; 220 m_CopyToOutputs[ file ] = matchNode.CopyToOutput;
221 221
222 } 222 }
223 } 223 }
224 } 224 }
225 } 225 }
226 } 226 }
227 227
228 // TODO: Check in to why StringCollection's enumerator doesn't implement 228 // TODO: Check in to why StringCollection's enumerator doesn't implement
229 // IEnumerator? 229 // IEnumerator?
230 public IEnumerator<string> GetEnumerator() 230 public IEnumerator<string> GetEnumerator()
231 { 231 {
232 return m_Files.GetEnumerator(); 232 return m_Files.GetEnumerator();
233 } 233 }
234 234
235 #endregion 235 #endregion
236 236
237 } 237 }
238} 238}
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs
index 000bde9..fe02277 100644
--- a/Prebuild/src/Core/Nodes/MatchNode.cs
+++ b/Prebuild/src/Core/Nodes/MatchNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -35,51 +35,51 @@ using Prebuild.Core.Utilities;
35 35
36namespace Prebuild.Core.Nodes 36namespace Prebuild.Core.Nodes
37{ 37{
38 /// <summary> 38 /// <summary>
39 /// 39 ///
40 /// </summary> 40 /// </summary>
41 [DataNode("Match")] 41 [DataNode("Match")]
42 public class MatchNode : DataNode 42 public class MatchNode : DataNode
43 { 43 {
44 #region Fields 44 #region Fields
45 45
46 private readonly List<string> m_Files = new List<string>(); 46 private readonly List<string> m_Files = new List<string>();
47 private Regex m_Regex; 47 private Regex m_Regex;
48 private BuildAction? m_BuildAction; 48 private BuildAction? m_BuildAction;
49 private SubType? m_SubType; 49 private SubType? m_SubType;
50 string m_ResourceName = ""; 50 string m_ResourceName = "";
51 private CopyToOutput m_CopyToOutput; 51 private CopyToOutput m_CopyToOutput;
52 private bool m_Link; 52 private bool m_Link;
53 private string m_LinkPath; 53 private string m_LinkPath;
54 private bool m_PreservePath; 54 private bool m_PreservePath;
55 private string m_Destination = ""; 55 private string m_Destination = "";
56 private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>(); 56 private readonly List<ExcludeNode> m_Exclusions = new List<ExcludeNode>();
57 57
58 #endregion 58 #endregion
59 59
60 #region Properties 60 #region Properties
61 61
62 /// <summary> 62 /// <summary>
63 /// 63 ///
64 /// </summary> 64 /// </summary>
65 public IEnumerable<string> Files 65 public IEnumerable<string> Files
66 { 66 {
67 get 67 get
68 { 68 {
69 return m_Files; 69 return m_Files;
70 } 70 }
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// 74 ///
75 /// </summary> 75 /// </summary>
76 public BuildAction? BuildAction 76 public BuildAction? BuildAction
77 { 77 {
78 get 78 get
79 { 79 {
80 return m_BuildAction; 80 return m_BuildAction;
81 } 81 }
82 } 82 }
83 83
84 public string DestinationPath 84 public string DestinationPath
85 { 85 {
@@ -88,50 +88,50 @@ namespace Prebuild.Core.Nodes
88 return m_Destination; 88 return m_Destination;
89 } 89 }
90 } 90 }
91 /// <summary> 91 /// <summary>
92 /// 92 ///
93 /// </summary> 93 /// </summary>
94 public SubType? SubType 94 public SubType? SubType
95 { 95 {
96 get 96 get
97 { 97 {
98 return m_SubType; 98 return m_SubType;
99 } 99 }
100 } 100 }
101 101
102 public CopyToOutput CopyToOutput 102 public CopyToOutput CopyToOutput
103 { 103 {
104 get 104 get
105 { 105 {
106 return m_CopyToOutput; 106 return m_CopyToOutput;
107 } 107 }
108 } 108 }
109 109
110 public bool IsLink 110 public bool IsLink
111 { 111 {
112 get 112 get
113 { 113 {
114 return m_Link; 114 return m_Link;
115 } 115 }
116 } 116 }
117 117
118 public string LinkPath 118 public string LinkPath
119 { 119 {
120 get 120 get
121 { 121 {
122 return m_LinkPath; 122 return m_LinkPath;
123 } 123 }
124 } 124 }
125 /// <summary> 125 /// <summary>
126 /// 126 ///
127 /// </summary> 127 /// </summary>
128 public string ResourceName 128 public string ResourceName
129 { 129 {
130 get 130 get
131 { 131 {
132 return m_ResourceName; 132 return m_ResourceName;
133 } 133 }
134 } 134 }
135 135
136 public bool PreservePath 136 public bool PreservePath
137 { 137 {
@@ -141,27 +141,27 @@ namespace Prebuild.Core.Nodes
141 } 141 }
142 } 142 }
143 143
144 #endregion 144 #endregion
145 145
146 #region Private Methods 146 #region Private Methods
147 147
148 /// <summary> 148 /// <summary>
149 /// Recurses the directories. 149 /// Recurses the directories.
150 /// </summary> 150 /// </summary>
151 /// <param name="path">The path.</param> 151 /// <param name="path">The path.</param>
152 /// <param name="pattern">The pattern.</param> 152 /// <param name="pattern">The pattern.</param>
153 /// <param name="recurse">if set to <c>true</c> [recurse].</param> 153 /// <param name="recurse">if set to <c>true</c> [recurse].</param>
154 /// <param name="useRegex">if set to <c>true</c> [use regex].</param> 154 /// <param name="useRegex">if set to <c>true</c> [use regex].</param>
155 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions) 155 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions)
156 { 156 {
157 Match match; 157 Match match;
158 try 158 try
159 { 159 {
160 string[] files; 160 string[] files;
161 161
162 Boolean excludeFile; 162 Boolean excludeFile;
163 if(!useRegex) 163 if(!useRegex)
164 { 164 {
165 try 165 try
166 { 166 {
167 files = Directory.GetFiles(path, pattern); 167 files = Directory.GetFiles(path, pattern);
@@ -169,7 +169,7 @@ namespace Prebuild.Core.Nodes
169 catch (IOException) 169 catch (IOException)
170 { 170 {
171 // swallow weird IOException error when running in a virtual box 171 // swallow weird IOException error when running in a virtual box
172 // guest OS on a network share when the host OS is not Windows. 172 // guest OS on a network share when the host OS is not Windows.
173 // This seems to happen on network shares 173 // This seems to happen on network shares
174 // when no files match, and may be related to this report: 174 // when no files match, and may be related to this report:
175 // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254546 175 // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254546
@@ -177,20 +177,20 @@ namespace Prebuild.Core.Nodes
177 files = null; 177 files = null;
178 } 178 }
179 179
180 if(files != null) 180 if(files != null)
181 { 181 {
182 foreach (string file in files) 182 foreach (string file in files)
183 { 183 {
184 excludeFile = false; 184 excludeFile = false;
185 string fileTemp; 185 string fileTemp;
186 if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") 186 if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\")
187 { 187 {
188 fileTemp = file.Substring(2); 188 fileTemp = file.Substring(2);
189 } 189 }
190 else 190 else
191 { 191 {
192 fileTemp = file; 192 fileTemp = file;
193 } 193 }
194 194
195 // Check all excludions and set flag if there are any hits. 195 // Check all excludions and set flag if there are any hits.
196 foreach ( ExcludeNode exclude in exclusions ) 196 foreach ( ExcludeNode exclude in exclusions )
@@ -205,18 +205,18 @@ namespace Prebuild.Core.Nodes
205 m_Files.Add( fileTemp ); 205 m_Files.Add( fileTemp );
206 } 206 }
207 207
208 } 208 }
209 } 209 }
210 210
211 // don't call return here, because we may need to recursively search directories below 211 // don't call return here, because we may need to recursively search directories below
212 // this one, even if no matches were found in this directory. 212 // this one, even if no matches were found in this directory.
213 } 213 }
214 else 214 else
215 { 215 {
216 try 216 try
217 { 217 {
218 files = Directory.GetFiles(path); 218 files = Directory.GetFiles(path);
219 } 219 }
220 catch (IOException) 220 catch (IOException)
221 { 221 {
222 // swallow weird IOException error when running in a virtual box 222 // swallow weird IOException error when running in a virtual box
@@ -248,12 +248,12 @@ namespace Prebuild.Core.Nodes
248 } 248 }
249 } 249 }
250 } 250 }
251 } 251 }
252 252
253 if(recurse) 253 if(recurse)
254 { 254 {
255 string[] dirs = Directory.GetDirectories(path); 255 string[] dirs = Directory.GetDirectories(path);
256 if(dirs != null && dirs.Length > 0) 256 if(dirs != null && dirs.Length > 0)
257 { 257 {
258 foreach (string str in dirs) 258 foreach (string str in dirs)
259 { 259 {
@@ -265,96 +265,96 @@ namespace Prebuild.Core.Nodes
265 RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions); 265 RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions);
266 } 266 }
267 } 267 }
268 } 268 }
269 } 269 }
270 catch(DirectoryNotFoundException) 270 catch(DirectoryNotFoundException)
271 { 271 {
272 return; 272 return;
273 } 273 }
274 catch(ArgumentException) 274 catch(ArgumentException)
275 { 275 {
276 return; 276 return;
277 } 277 }
278 } 278 }
279 279
280 #endregion 280 #endregion
281 281
282 #region Public Methods 282 #region Public Methods
283 283
284 /// <summary> 284 /// <summary>
285 /// 285 ///
286 /// </summary> 286 /// </summary>
287 /// <param name="node"></param> 287 /// <param name="node"></param>
288 public override void Parse(XmlNode node) 288 public override void Parse(XmlNode node)
289 { 289 {
290 if( node == null ) 290 if( node == null )
291 { 291 {
292 throw new ArgumentNullException("node"); 292 throw new ArgumentNullException("node");
293 } 293 }
294 string path = Helper.AttributeValue(node, "path", "."); 294 string path = Helper.AttributeValue(node, "path", ".");
295 string pattern = Helper.AttributeValue(node, "pattern", "*"); 295 string pattern = Helper.AttributeValue(node, "pattern", "*");
296 string destination = Helper.AttributeValue(node, "destination", string.Empty); 296 string destination = Helper.AttributeValue(node, "destination", string.Empty);
297 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); 297 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false"));
298 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); 298 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false"));
299 string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty); 299 string buildAction = Helper.AttributeValue(node, "buildAction", String.Empty);
300 if (buildAction != string.Empty) 300 if (buildAction != string.Empty)
301 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction); 301 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), buildAction);
302 302
303 303
304 //TODO: Figure out where the subtype node is being assigned 304 //TODO: Figure out where the subtype node is being assigned
305 //string subType = Helper.AttributeValue(node, "subType", string.Empty); 305 //string subType = Helper.AttributeValue(node, "subType", string.Empty);
306 //if (subType != String.Empty) 306 //if (subType != String.Empty)
307 // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); 307 // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType);
308 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName); 308 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName);
309 m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", m_CopyToOutput.ToString())); 309 m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", m_CopyToOutput.ToString()));
310 m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 310 m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
311 if ( m_Link ) 311 if ( m_Link )
312 { 312 {
313 m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); 313 m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty );
314 } 314 }
315 m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); 315 m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) );
316 316
317 if ( buildAction == "Copy") 317 if ( buildAction == "Copy")
318 m_Destination = destination; 318 m_Destination = destination;
319 319
320 if(path != null && path.Length == 0) 320 if(path != null && path.Length == 0)
321 path = ".";//use current directory 321 path = ".";//use current directory
322 322
323 //throw new WarningException("Match must have a 'path' attribute"); 323 //throw new WarningException("Match must have a 'path' attribute");
324 324
325 if(pattern == null) 325 if(pattern == null)
326 { 326 {
327 throw new WarningException("Match must have a 'pattern' attribute"); 327 throw new WarningException("Match must have a 'pattern' attribute");
328 } 328 }
329 329
330 path = Helper.NormalizePath(path); 330 path = Helper.NormalizePath(path);
331 if(!Directory.Exists(path)) 331 if(!Directory.Exists(path))
332 { 332 {
333 throw new WarningException("Match path does not exist: {0}", path); 333 throw new WarningException("Match path does not exist: {0}", path);
334 } 334 }
335 335
336 try 336 try
337 { 337 {
338 if(useRegex) 338 if(useRegex)
339 { 339 {
340 m_Regex = new Regex(pattern); 340 m_Regex = new Regex(pattern);
341 } 341 }
342 } 342 }
343 catch(ArgumentException ex) 343 catch(ArgumentException ex)
344 { 344 {
345 throw new WarningException("Could not compile regex pattern: {0}", ex.Message); 345 throw new WarningException("Could not compile regex pattern: {0}", ex.Message);
346 } 346 }
347 347
348 348
349 foreach(XmlNode child in node.ChildNodes) 349 foreach(XmlNode child in node.ChildNodes)
350 { 350 {
351 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 351 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
352 if(dataNode is ExcludeNode) 352 if(dataNode is ExcludeNode)
353 { 353 {
354 ExcludeNode excludeNode = (ExcludeNode)dataNode; 354 ExcludeNode excludeNode = (ExcludeNode)dataNode;
355 m_Exclusions.Add( excludeNode ); 355 m_Exclusions.Add( excludeNode );
356 } 356 }
357 } 357 }
358 358
359 RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions ); 359 RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions );
360 360
@@ -371,8 +371,8 @@ namespace Prebuild.Core.Nodes
371 throw new WarningException("Match" + projectName + " returned no files: {0}{1}", Helper.EndPath(path), pattern); 371 throw new WarningException("Match" + projectName + " returned no files: {0}{1}", Helper.EndPath(path), pattern);
372 } 372 }
373 m_Regex = null; 373 m_Regex = null;
374 } 374 }
375 375
376 #endregion 376 #endregion
377 } 377 }
378} 378}
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs
index 577de71..d45bd34 100644
--- a/Prebuild/src/Core/Nodes/OptionsNode.cs
+++ b/Prebuild/src/Core/Nodes/OptionsNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,273 +34,273 @@ using Prebuild.Core.Utilities;
34 34
35namespace Prebuild.Core.Nodes 35namespace Prebuild.Core.Nodes
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 [DataNode("Options")] 40 [DataNode("Options")]
41 public class OptionsNode : DataNode 41 public class OptionsNode : DataNode
42 { 42 {
43 #region Fields 43 #region Fields
44 44
45 private static readonly Dictionary<string,FieldInfo> m_OptionFields = new Dictionary<string, FieldInfo>(); 45 private static readonly Dictionary<string,FieldInfo> m_OptionFields = new Dictionary<string, FieldInfo>();
46 46
47 [OptionNode("CompilerDefines")] 47 [OptionNode("CompilerDefines")]
48 private string m_CompilerDefines = ""; 48 private string m_CompilerDefines = "";
49 49
50 /// <summary> 50 /// <summary>
51 /// 51 ///
52 /// </summary> 52 /// </summary>
53 public string CompilerDefines 53 public string CompilerDefines
54 { 54 {
55 get 55 get
56 { 56 {
57 return m_CompilerDefines; 57 return m_CompilerDefines;
58 } 58 }
59 set 59 set
60 { 60 {
61 m_CompilerDefines = value; 61 m_CompilerDefines = value;
62 } 62 }
63 } 63 }
64 64
65 [OptionNode("OptimizeCode")] 65 [OptionNode("OptimizeCode")]
66 private bool m_OptimizeCode; 66 private bool m_OptimizeCode;
67 67
68 /// <summary> 68 /// <summary>
69 /// 69 ///
70 /// </summary> 70 /// </summary>
71 public bool OptimizeCode 71 public bool OptimizeCode
72 { 72 {
73 get 73 get
74 { 74 {
75 return m_OptimizeCode; 75 return m_OptimizeCode;
76 } 76 }
77 set 77 set
78 { 78 {
79 m_OptimizeCode = value; 79 m_OptimizeCode = value;
80 } 80 }
81 } 81 }
82 82
83 [OptionNode("CheckUnderflowOverflow")] 83 [OptionNode("CheckUnderflowOverflow")]
84 private bool m_CheckUnderflowOverflow; 84 private bool m_CheckUnderflowOverflow;
85 85
86 /// <summary> 86 /// <summary>
87 /// 87 ///
88 /// </summary> 88 /// </summary>
89 public bool CheckUnderflowOverflow 89 public bool CheckUnderflowOverflow
90 { 90 {
91 get 91 get
92 { 92 {
93 return m_CheckUnderflowOverflow; 93 return m_CheckUnderflowOverflow;
94 } 94 }
95 set 95 set
96 { 96 {
97 m_CheckUnderflowOverflow = value; 97 m_CheckUnderflowOverflow = value;
98 } 98 }
99 } 99 }
100 100
101 [OptionNode("AllowUnsafe")] 101 [OptionNode("AllowUnsafe")]
102 private bool m_AllowUnsafe; 102 private bool m_AllowUnsafe;
103 103
104 /// <summary> 104 /// <summary>
105 /// 105 ///
106 /// </summary> 106 /// </summary>
107 public bool AllowUnsafe 107 public bool AllowUnsafe
108 { 108 {
109 get 109 get
110 { 110 {
111 return m_AllowUnsafe; 111 return m_AllowUnsafe;
112 } 112 }
113 set 113 set
114 { 114 {
115 m_AllowUnsafe = value; 115 m_AllowUnsafe = value;
116 } 116 }
117 } 117 }
118 118
119 [OptionNode("PreBuildEvent")] 119 [OptionNode("PreBuildEvent")]
120 private string m_PreBuildEvent; 120 private string m_PreBuildEvent;
121 121
122 /// <summary> 122 /// <summary>
123 /// 123 ///
124 /// </summary> 124 /// </summary>
125 public string PreBuildEvent 125 public string PreBuildEvent
126 { 126 {
127 get 127 get
128 { 128 {
129 return m_PreBuildEvent; 129 return m_PreBuildEvent;
130 } 130 }
131 set 131 set
132 { 132 {
133 m_PreBuildEvent = value; 133 m_PreBuildEvent = value;
134 } 134 }
135 } 135 }
136 136
137 [OptionNode("PostBuildEvent")] 137 [OptionNode("PostBuildEvent")]
138 private string m_PostBuildEvent; 138 private string m_PostBuildEvent;
139 139
140 /// <summary> 140 /// <summary>
141 /// 141 ///
142 /// </summary> 142 /// </summary>
143 public string PostBuildEvent 143 public string PostBuildEvent
144 { 144 {
145 get 145 get
146 { 146 {
147 return m_PostBuildEvent; 147 return m_PostBuildEvent;
148 } 148 }
149 set 149 set
150 { 150 {
151 m_PostBuildEvent = value; 151 m_PostBuildEvent = value;
152 } 152 }
153 } 153 }
154 154
155 [OptionNode("PreBuildEventArgs")] 155 [OptionNode("PreBuildEventArgs")]
156 private string m_PreBuildEventArgs; 156 private string m_PreBuildEventArgs;
157 157
158 /// <summary> 158 /// <summary>
159 /// 159 ///
160 /// </summary> 160 /// </summary>
161 public string PreBuildEventArgs 161 public string PreBuildEventArgs
162 { 162 {
163 get 163 get
164 { 164 {
165 return m_PreBuildEventArgs; 165 return m_PreBuildEventArgs;
166 } 166 }
167 set 167 set
168 { 168 {
169 m_PreBuildEventArgs = value; 169 m_PreBuildEventArgs = value;
170 } 170 }
171 } 171 }
172 172
173 [OptionNode("PostBuildEventArgs")] 173 [OptionNode("PostBuildEventArgs")]
174 private string m_PostBuildEventArgs; 174 private string m_PostBuildEventArgs;
175 175
176 /// <summary> 176 /// <summary>
177 /// 177 ///
178 /// </summary> 178 /// </summary>
179 public string PostBuildEventArgs 179 public string PostBuildEventArgs
180 { 180 {
181 get 181 get
182 { 182 {
183 return m_PostBuildEventArgs; 183 return m_PostBuildEventArgs;
184 } 184 }
185 set 185 set
186 { 186 {
187 m_PostBuildEventArgs = value; 187 m_PostBuildEventArgs = value;
188 } 188 }
189 } 189 }
190 190
191 [OptionNode("RunPostBuildEvent")] 191 [OptionNode("RunPostBuildEvent")]
192 private string m_RunPostBuildEvent; 192 private string m_RunPostBuildEvent;
193 193
194 /// <summary> 194 /// <summary>
195 /// 195 ///
196 /// </summary> 196 /// </summary>
197 public string RunPostBuildEvent 197 public string RunPostBuildEvent
198 { 198 {
199 get 199 get
200 { 200 {
201 return m_RunPostBuildEvent; 201 return m_RunPostBuildEvent;
202 } 202 }
203 set 203 set
204 { 204 {
205 m_RunPostBuildEvent = value; 205 m_RunPostBuildEvent = value;
206 } 206 }
207 } 207 }
208 208
209 [OptionNode("RunScript")] 209 [OptionNode("RunScript")]
210 private string m_RunScript; 210 private string m_RunScript;
211 211
212 /// <summary> 212 /// <summary>
213 /// 213 ///
214 /// </summary> 214 /// </summary>
215 public string RunScript 215 public string RunScript
216 { 216 {
217 get 217 get
218 { 218 {
219 return m_RunScript; 219 return m_RunScript;
220 } 220 }
221 set 221 set
222 { 222 {
223 m_RunScript = value; 223 m_RunScript = value;
224 } 224 }
225 } 225 }
226 226
227 [OptionNode("WarningLevel")] 227 [OptionNode("WarningLevel")]
228 private int m_WarningLevel = 4; 228 private int m_WarningLevel = 4;
229 229
230 /// <summary> 230 /// <summary>
231 /// 231 ///
232 /// </summary> 232 /// </summary>
233 public int WarningLevel 233 public int WarningLevel
234 { 234 {
235 get 235 get
236 { 236 {
237 return m_WarningLevel; 237 return m_WarningLevel;
238 } 238 }
239 set 239 set
240 { 240 {
241 m_WarningLevel = value; 241 m_WarningLevel = value;
242 } 242 }
243 } 243 }
244 244
245 [OptionNode("WarningsAsErrors")] 245 [OptionNode("WarningsAsErrors")]
246 private bool m_WarningsAsErrors; 246 private bool m_WarningsAsErrors;
247 247
248 /// <summary> 248 /// <summary>
249 /// 249 ///
250 /// </summary> 250 /// </summary>
251 public bool WarningsAsErrors 251 public bool WarningsAsErrors
252 { 252 {
253 get 253 get
254 { 254 {
255 return m_WarningsAsErrors; 255 return m_WarningsAsErrors;
256 } 256 }
257 set 257 set
258 { 258 {
259 m_WarningsAsErrors = value; 259 m_WarningsAsErrors = value;
260 } 260 }
261 } 261 }
262 262
263 [OptionNode("SuppressWarnings")] 263 [OptionNode("SuppressWarnings")]
264 private string m_SuppressWarnings = ""; 264 private string m_SuppressWarnings = "";
265 265
266 /// <summary> 266 /// <summary>
267 /// 267 ///
268 /// </summary> 268 /// </summary>
269 public string SuppressWarnings 269 public string SuppressWarnings
270 { 270 {
271 get 271 get
272 { 272 {
273 return m_SuppressWarnings; 273 return m_SuppressWarnings;
274 } 274 }
275 set 275 set
276 { 276 {
277 m_SuppressWarnings = value; 277 m_SuppressWarnings = value;
278 } 278 }
279 } 279 }
280 280
281 [OptionNode("OutputPath")] 281 [OptionNode("OutputPath")]
282 private string m_OutputPath = "bin/"; 282 private string m_OutputPath = "bin/";
283 283
284 /// <summary> 284 /// <summary>
285 /// 285 ///
286 /// </summary> 286 /// </summary>
287 public string OutputPath 287 public string OutputPath
288 { 288 {
289 get 289 get
290 { 290 {
291 return m_OutputPath; 291 return m_OutputPath;
292 } 292 }
293 set 293 set
294 { 294 {
295 m_OutputPath = value; 295 m_OutputPath = value;
296 } 296 }
297 } 297 }
298 298
299 [OptionNode("GenerateDocumentation")] 299 [OptionNode("GenerateDocumentation")]
300 private bool m_GenerateDocumentation; 300 private bool m_GenerateDocumentation;
301 301
302 /// <summary> 302 /// <summary>
303 /// 303 ///
304 /// </summary> 304 /// </summary>
305 public bool GenerateDocumentation 305 public bool GenerateDocumentation
306 { 306 {
@@ -314,321 +314,321 @@ namespace Prebuild.Core.Nodes
314 } 314 }
315 } 315 }
316 316
317 [OptionNode("GenerateXmlDocFile")] 317 [OptionNode("GenerateXmlDocFile")]
318 private bool m_GenerateXmlDocFile; 318 private bool m_GenerateXmlDocFile;
319 319
320 /// <summary> 320 /// <summary>
321 /// 321 ///
322 /// </summary> 322 /// </summary>
323 public bool GenerateXmlDocFile 323 public bool GenerateXmlDocFile
324 { 324 {
325 get 325 get
326 { 326 {
327 return m_GenerateXmlDocFile; 327 return m_GenerateXmlDocFile;
328 } 328 }
329 set 329 set
330 { 330 {
331 m_GenerateXmlDocFile = value; 331 m_GenerateXmlDocFile = value;
332 } 332 }
333 } 333 }
334 334
335 [OptionNode("XmlDocFile")] 335 [OptionNode("XmlDocFile")]
336 private string m_XmlDocFile = ""; 336 private string m_XmlDocFile = "";
337 337
338 /// <summary> 338 /// <summary>
339 /// 339 ///
340 /// </summary> 340 /// </summary>
341 public string XmlDocFile 341 public string XmlDocFile
342 { 342 {
343 get 343 get
344 { 344 {
345 return m_XmlDocFile; 345 return m_XmlDocFile;
346 } 346 }
347 set 347 set
348 { 348 {
349 m_XmlDocFile = value; 349 m_XmlDocFile = value;
350 } 350 }
351 } 351 }
352 352
353 [OptionNode("KeyFile")] 353 [OptionNode("KeyFile")]
354 private string m_KeyFile = ""; 354 private string m_KeyFile = "";
355 355
356 /// <summary> 356 /// <summary>
357 /// 357 ///
358 /// </summary> 358 /// </summary>
359 public string KeyFile 359 public string KeyFile
360 { 360 {
361 get 361 get
362 { 362 {
363 return m_KeyFile; 363 return m_KeyFile;
364 } 364 }
365 set 365 set
366 { 366 {
367 m_KeyFile = value; 367 m_KeyFile = value;
368 } 368 }
369 } 369 }
370 370
371 [OptionNode("DebugInformation")] 371 [OptionNode("DebugInformation")]
372 private bool m_DebugInformation; 372 private bool m_DebugInformation;
373 373
374 /// <summary> 374 /// <summary>
375 /// 375 ///
376 /// </summary> 376 /// </summary>
377 public bool DebugInformation 377 public bool DebugInformation
378 { 378 {
379 get 379 get
380 { 380 {
381 return m_DebugInformation; 381 return m_DebugInformation;
382 } 382 }
383 set 383 set
384 { 384 {
385 m_DebugInformation = value; 385 m_DebugInformation = value;
386 } 386 }
387 } 387 }
388 388
389 [OptionNode("RegisterComInterop")] 389 [OptionNode("RegisterComInterop")]
390 private bool m_RegisterComInterop; 390 private bool m_RegisterComInterop;
391 391
392 /// <summary> 392 /// <summary>
393 /// 393 ///
394 /// </summary> 394 /// </summary>
395 public bool RegisterComInterop 395 public bool RegisterComInterop
396 { 396 {
397 get 397 get
398 { 398 {
399 return m_RegisterComInterop; 399 return m_RegisterComInterop;
400 } 400 }
401 set 401 set
402 { 402 {
403 m_RegisterComInterop = value; 403 m_RegisterComInterop = value;
404 } 404 }
405 } 405 }
406 406
407 [OptionNode("RemoveIntegerChecks")] 407 [OptionNode("RemoveIntegerChecks")]
408 private bool m_RemoveIntegerChecks; 408 private bool m_RemoveIntegerChecks;
409 409
410 /// <summary> 410 /// <summary>
411 /// 411 ///
412 /// </summary> 412 /// </summary>
413 public bool RemoveIntegerChecks 413 public bool RemoveIntegerChecks
414 { 414 {
415 get 415 get
416 { 416 {
417 return m_RemoveIntegerChecks; 417 return m_RemoveIntegerChecks;
418 } 418 }
419 set 419 set
420 { 420 {
421 m_RemoveIntegerChecks = value; 421 m_RemoveIntegerChecks = value;
422 } 422 }
423 } 423 }
424 424
425 [OptionNode("IncrementalBuild")] 425 [OptionNode("IncrementalBuild")]
426 private bool m_IncrementalBuild; 426 private bool m_IncrementalBuild;
427 427
428 /// <summary> 428 /// <summary>
429 /// 429 ///
430 /// </summary> 430 /// </summary>
431 public bool IncrementalBuild 431 public bool IncrementalBuild
432 { 432 {
433 get 433 get
434 { 434 {
435 return m_IncrementalBuild; 435 return m_IncrementalBuild;
436 } 436 }
437 set 437 set
438 { 438 {
439 m_IncrementalBuild = value; 439 m_IncrementalBuild = value;
440 } 440 }
441 } 441 }
442 442
443 [OptionNode("BaseAddress")] 443 [OptionNode("BaseAddress")]
444 private string m_BaseAddress = "285212672"; 444 private string m_BaseAddress = "285212672";
445 445
446 /// <summary> 446 /// <summary>
447 /// 447 ///
448 /// </summary> 448 /// </summary>
449 public string BaseAddress 449 public string BaseAddress
450 { 450 {
451 get 451 get
452 { 452 {
453 return m_BaseAddress; 453 return m_BaseAddress;
454 } 454 }
455 set 455 set
456 { 456 {
457 m_BaseAddress = value; 457 m_BaseAddress = value;
458 } 458 }
459 } 459 }
460 460
461 [OptionNode("FileAlignment")] 461 [OptionNode("FileAlignment")]
462 private int m_FileAlignment = 4096; 462 private int m_FileAlignment = 4096;
463 463
464 /// <summary> 464 /// <summary>
465 /// 465 ///
466 /// </summary> 466 /// </summary>
467 public int FileAlignment 467 public int FileAlignment
468 { 468 {
469 get 469 get
470 { 470 {
471 return m_FileAlignment; 471 return m_FileAlignment;
472 } 472 }
473 set 473 set
474 { 474 {
475 m_FileAlignment = value; 475 m_FileAlignment = value;
476 } 476 }
477 } 477 }
478 478
479 [OptionNode("NoStdLib")] 479 [OptionNode("NoStdLib")]
480 private bool m_NoStdLib; 480 private bool m_NoStdLib;
481 481
482 /// <summary> 482 /// <summary>
483 /// 483 ///
484 /// </summary> 484 /// </summary>
485 public bool NoStdLib 485 public bool NoStdLib
486 { 486 {
487 get 487 get
488 { 488 {
489 return m_NoStdLib; 489 return m_NoStdLib;
490 } 490 }
491 set 491 set
492 { 492 {
493 m_NoStdLib = value; 493 m_NoStdLib = value;
494 } 494 }
495 } 495 }
496 496
497 private readonly List<string> m_FieldsDefined = new List<string>(); 497 private readonly List<string> m_FieldsDefined = new List<string>();
498 498
499 #endregion 499 #endregion
500 500
501 #region Constructors 501 #region Constructors
502 502
503 /// <summary> 503 /// <summary>
504 /// Initializes the <see cref="OptionsNode"/> class. 504 /// Initializes the <see cref="OptionsNode"/> class.
505 /// </summary> 505 /// </summary>
506 static OptionsNode() 506 static OptionsNode()
507 { 507 {
508 Type t = typeof(OptionsNode); 508 Type t = typeof(OptionsNode);
509 509
510 foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)) 510 foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance))
511 { 511 {
512 object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false); 512 object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false);
513 if(attrs == null || attrs.Length < 1) 513 if(attrs == null || attrs.Length < 1)
514 { 514 {
515 continue; 515 continue;
516 } 516 }
517 517
518 OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0]; 518 OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0];
519 m_OptionFields[ona.NodeName] = f; 519 m_OptionFields[ona.NodeName] = f;
520 } 520 }
521 } 521 }
522 522
523 #endregion 523 #endregion
524 524
525 #region Properties 525 #region Properties
526 526
527 /// <summary> 527 /// <summary>
528 /// Gets the <see cref="Object"/> at the specified index. 528 /// Gets the <see cref="Object"/> at the specified index.
529 /// </summary> 529 /// </summary>
530 /// <value></value> 530 /// <value></value>
531 public object this[string index] 531 public object this[string index]
532 { 532 {
533 get 533 get
534 { 534 {
535 if(!m_OptionFields.ContainsKey(index)) 535 if(!m_OptionFields.ContainsKey(index))
536 { 536 {
537 return null; 537 return null;
538 } 538 }
539 539
540 FieldInfo f = m_OptionFields[index]; 540 FieldInfo f = m_OptionFields[index];
541 return f.GetValue(this); 541 return f.GetValue(this);
542 } 542 }
543 } 543 }
544 544
545 /// <summary> 545 /// <summary>
546 /// Gets the <see cref="Object"/> at the specified index. 546 /// Gets the <see cref="Object"/> at the specified index.
547 /// </summary> 547 /// </summary>
548 /// <value></value> 548 /// <value></value>
549 public object this[string index, object defaultValue] 549 public object this[string index, object defaultValue]
550 { 550 {
551 get 551 get
552 { 552 {
553 object valueObject = this[index]; 553 object valueObject = this[index];
554 if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0) 554 if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0)
555 { 555 {
556 return defaultValue; 556 return defaultValue;
557 } 557 }
558 return valueObject; 558 return valueObject;
559 } 559 }
560 } 560 }
561 561
562 562
563 #endregion 563 #endregion
564 564
565 #region Private Methods 565 #region Private Methods
566 566
567 private void FlagDefined(string name) 567 private void FlagDefined(string name)
568 { 568 {
569 if(!m_FieldsDefined.Contains(name)) 569 if(!m_FieldsDefined.Contains(name))
570 { 570 {
571 m_FieldsDefined.Add(name); 571 m_FieldsDefined.Add(name);
572 } 572 }
573 } 573 }
574 574
575 private void SetOption(string nodeName, string val) 575 private void SetOption(string nodeName, string val)
576 { 576 {
577 lock(m_OptionFields) 577 lock(m_OptionFields)
578 { 578 {
579 if(!m_OptionFields.ContainsKey(nodeName)) 579 if(!m_OptionFields.ContainsKey(nodeName))
580 { 580 {
581 return; 581 return;
582 } 582 }
583 583
584 FieldInfo f = m_OptionFields[nodeName]; 584 FieldInfo f = m_OptionFields[nodeName];
585 f.SetValue(this, Helper.TranslateValue(f.FieldType, val)); 585 f.SetValue(this, Helper.TranslateValue(f.FieldType, val));
586 FlagDefined(f.Name); 586 FlagDefined(f.Name);
587 } 587 }
588 } 588 }
589 589
590 #endregion 590 #endregion
591 591
592 #region Public Methods 592 #region Public Methods
593 593
594 /// <summary> 594 /// <summary>
595 /// Parses the specified node. 595 /// Parses the specified node.
596 /// </summary> 596 /// </summary>
597 /// <param name="node">The node.</param> 597 /// <param name="node">The node.</param>
598 public override void Parse(XmlNode node) 598 public override void Parse(XmlNode node)
599 { 599 {
600 if( node == null ) 600 if( node == null )
601 { 601 {
602 throw new ArgumentNullException("node"); 602 throw new ArgumentNullException("node");
603 } 603 }
604 604
605 foreach(XmlNode child in node.ChildNodes) 605 foreach(XmlNode child in node.ChildNodes)
606 { 606 {
607 SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText)); 607 SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText));
608 } 608 }
609 } 609 }
610 610
611 /// <summary> 611 /// <summary>
612 /// Copies to. 612 /// Copies to.
613 /// </summary> 613 /// </summary>
614 /// <param name="opt">The opt.</param> 614 /// <param name="opt">The opt.</param>
615 public void CopyTo(OptionsNode opt) 615 public void CopyTo(OptionsNode opt)
616 { 616 {
617 if(opt == null) 617 if(opt == null)
618 { 618 {
619 return; 619 return;
620 } 620 }
621 621
622 foreach(FieldInfo f in m_OptionFields.Values) 622 foreach(FieldInfo f in m_OptionFields.Values)
623 { 623 {
624 if(m_FieldsDefined.Contains(f.Name)) 624 if(m_FieldsDefined.Contains(f.Name))
625 { 625 {
626 f.SetValue(opt, f.GetValue(this)); 626 f.SetValue(opt, f.GetValue(this));
627 opt.m_FieldsDefined.Add(f.Name); 627 opt.m_FieldsDefined.Add(f.Name);
628 } 628 }
629 } 629 }
630 } 630 }
631 631
632 #endregion 632 #endregion
633 } 633 }
634} 634}
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs
index 8ca8e49..b05ffc6 100644
--- a/Prebuild/src/Core/Nodes/ProcessNode.cs
+++ b/Prebuild/src/Core/Nodes/ProcessNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,77 +32,77 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 [DataNode("Process")] 38 [DataNode("Process")]
39 public class ProcessNode : DataNode 39 public class ProcessNode : DataNode
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Path; 43 private string m_Path;
44 private bool m_IsValid = true; 44 private bool m_IsValid = true;
45 45
46 #endregion 46 #endregion
47 47
48 #region Properties 48 #region Properties
49 49
50 /// <summary> 50 /// <summary>
51 /// Gets the path. 51 /// Gets the path.
52 /// </summary> 52 /// </summary>
53 /// <value>The path.</value> 53 /// <value>The path.</value>
54 public string Path 54 public string Path
55 { 55 {
56 get 56 get
57 { 57 {
58 return m_Path; 58 return m_Path;
59 } 59 }
60 } 60 }
61 61
62 /// <summary> 62 /// <summary>
63 /// Gets a value indicating whether this instance is valid. 63 /// Gets a value indicating whether this instance is valid.
64 /// </summary> 64 /// </summary>
65 /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value> 65 /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value>
66 public bool IsValid 66 public bool IsValid
67 { 67 {
68 get 68 get
69 { 69 {
70 return m_IsValid; 70 return m_IsValid;
71 } 71 }
72 } 72 }
73 73
74 #endregion 74 #endregion
75 75
76 #region Public Methods 76 #region Public Methods
77 77
78 /// <summary> 78 /// <summary>
79 /// Parses the specified node. 79 /// Parses the specified node.
80 /// </summary> 80 /// </summary>
81 /// <param name="node">The node.</param> 81 /// <param name="node">The node.</param>
82 public override void Parse(XmlNode node) 82 public override void Parse(XmlNode node)
83 { 83 {
84 if( node == null ) 84 if( node == null )
85 { 85 {
86 throw new ArgumentNullException("node"); 86 throw new ArgumentNullException("node");
87 } 87 }
88 88
89 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); 89 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
90 if(m_Path == null) 90 if(m_Path == null)
91 { 91 {
92 m_Path = ""; 92 m_Path = "";
93 } 93 }
94 94
95 try 95 try
96 { 96 {
97 m_Path = Helper.ResolvePath(m_Path); 97 m_Path = Helper.ResolvePath(m_Path);
98 } 98 }
99 catch(ArgumentException) 99 catch(ArgumentException)
100 { 100 {
101 Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path); 101 Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path);
102 m_IsValid = false; 102 m_IsValid = false;
103 } 103 }
104 } 104 }
105 105
106 #endregion 106 #endregion
107 } 107 }
108} 108}
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs
index a822704..e02b11b 100644
--- a/Prebuild/src/Core/Nodes/ProjectNode.cs
+++ b/Prebuild/src/Core/Nodes/ProjectNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,65 +34,65 @@ using Prebuild.Core.Utilities;
34 34
35namespace Prebuild.Core.Nodes 35namespace Prebuild.Core.Nodes
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// A set of values that the Project's type can be 38 /// A set of values that the Project's type can be
39 /// </summary> 39 /// </summary>
40 public enum ProjectType 40 public enum ProjectType
41 { 41 {
42 /// <summary> 42 /// <summary>
43 /// The project is a console executable 43 /// The project is a console executable
44 /// </summary> 44 /// </summary>
45 Exe, 45 Exe,
46 /// <summary> 46 /// <summary>
47 /// The project is a windows executable 47 /// The project is a windows executable
48 /// </summary> 48 /// </summary>
49 WinExe, 49 WinExe,
50 /// <summary> 50 /// <summary>
51 /// The project is a library 51 /// The project is a library
52 /// </summary> 52 /// </summary>
53 Library, 53 Library,
54 /// <summary> 54 /// <summary>
55 /// The project is a website 55 /// The project is a website
56 /// </summary> 56 /// </summary>
57 Web, 57 Web,
58 } 58 }
59 59
60 /// <summary> 60 /// <summary>
61 /// 61 ///
62 /// </summary> 62 /// </summary>
63 public enum ClrRuntime 63 public enum ClrRuntime
64 { 64 {
65 /// <summary> 65 /// <summary>
66 /// 66 ///
67 /// </summary> 67 /// </summary>
68 Microsoft, 68 Microsoft,
69 /// <summary> 69 /// <summary>
70 /// 70 ///
71 /// </summary> 71 /// </summary>
72 Mono 72 Mono
73 } 73 }
74 /// <summary> 74 /// <summary>
75 /// The version of the .NET framework to use (Required for VS2008) 75 /// The version of the .NET framework to use (Required for VS2008)
76 /// <remarks>We don't need .NET 1.1 in here, it'll default when using vs2003.</remarks> 76 /// <remarks>We don't need .NET 1.1 in here, it'll default when using vs2003.</remarks>
77 /// </summary> 77 /// </summary>
78 public enum FrameworkVersion 78 public enum FrameworkVersion
79 { 79 {
80 /// <summary> 80 /// <summary>
81 /// .NET 2.0 81 /// .NET 2.0
82 /// </summary> 82 /// </summary>
83 v2_0, 83 v2_0,
84 /// <summary> 84 /// <summary>
85 /// .NET 3.0 85 /// .NET 3.0
86 /// </summary> 86 /// </summary>
87 v3_0, 87 v3_0,
88 /// <summary> 88 /// <summary>
89 /// .NET 3.5 89 /// .NET 3.5
90 /// </summary> 90 /// </summary>
91 v3_5, 91 v3_5,
92 /// <summary> 92 /// <summary>
93 /// .NET 4.0 93 /// .NET 4.0
94 /// </summary> 94 /// </summary>
95 v4_0, 95 v4_0,
96 /// <summary> 96 /// <summary>
97 /// .NET 4.5 97 /// .NET 4.5
98 /// </summary> 98 /// </summary>
@@ -102,477 +102,477 @@ namespace Prebuild.Core.Nodes
102 /// </summary> 102 /// </summary>
103 v4_5_1 103 v4_5_1
104 } 104 }
105 /// <summary> 105 /// <summary>
106 /// The Node object representing /Prebuild/Solution/Project elements 106 /// The Node object representing /Prebuild/Solution/Project elements
107 /// </summary> 107 /// </summary>
108 [DataNode("Project")] 108 [DataNode("Project")]
109 public class ProjectNode : DataNode, IComparable 109 public class ProjectNode : DataNode, IComparable
110 { 110 {
111 #region Fields 111 #region Fields
112 112
113 private string m_Name = "unknown"; 113 private string m_Name = "unknown";
114 private string m_Path = ""; 114 private string m_Path = "";
115 private string m_FullPath = ""; 115 private string m_FullPath = "";
116 private string m_AssemblyName; 116 private string m_AssemblyName;
117 private string m_AppIcon = ""; 117 private string m_AppIcon = "";
118 private string m_ConfigFile = ""; 118 private string m_ConfigFile = "";
119 private string m_DesignerFolder = ""; 119 private string m_DesignerFolder = "";
120 private string m_Language = "C#"; 120 private string m_Language = "C#";
121 private ProjectType m_Type = ProjectType.Exe; 121 private ProjectType m_Type = ProjectType.Exe;
122 private ClrRuntime m_Runtime = ClrRuntime.Microsoft; 122 private ClrRuntime m_Runtime = ClrRuntime.Microsoft;
123 private FrameworkVersion m_Framework = FrameworkVersion.v2_0; 123 private FrameworkVersion m_Framework = FrameworkVersion.v2_0;
124 private string m_StartupObject = ""; 124 private string m_StartupObject = "";
125 private string m_RootNamespace; 125 private string m_RootNamespace;
126 private string m_FilterGroups = ""; 126 private string m_FilterGroups = "";
127 private string m_Version = ""; 127 private string m_Version = "";
128 private Guid m_Guid; 128 private Guid m_Guid;
129 private string m_DebugStartParameters; 129 private string m_DebugStartParameters;
130 130
131 private readonly Dictionary<string, ConfigurationNode> m_Configurations = new Dictionary<string, ConfigurationNode>(); 131 private readonly Dictionary<string, ConfigurationNode> m_Configurations = new Dictionary<string, ConfigurationNode>();
132 private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); 132 private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>();
133 private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); 133 private readonly List<ReferenceNode> m_References = new List<ReferenceNode>();
134 private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); 134 private readonly List<AuthorNode> m_Authors = new List<AuthorNode>();
135 private FilesNode m_Files; 135 private FilesNode m_Files;
136 136
137 #endregion 137 #endregion
138 138
139 #region Properties 139 #region Properties
140 140
141 /// <summary> 141 /// <summary>
142 /// Gets the name. 142 /// Gets the name.
143 /// </summary> 143 /// </summary>
144 /// <value>The name.</value> 144 /// <value>The name.</value>
145 public string Name 145 public string Name
146 { 146 {
147 get 147 get
148 { 148 {
149 return m_Name; 149 return m_Name;
150 } 150 }
151 } 151 }
152 /// <summary> 152 /// <summary>
153 /// The version of the .NET Framework to compile under 153 /// The version of the .NET Framework to compile under
154 /// </summary> 154 /// </summary>
155 public FrameworkVersion FrameworkVersion 155 public FrameworkVersion FrameworkVersion
156 { 156 {
157 get 157 get
158 { 158 {
159 return m_Framework; 159 return m_Framework;
160 } 160 }
161 } 161 }
162 /// <summary> 162 /// <summary>
163 /// Gets the path. 163 /// Gets the path.
164 /// </summary> 164 /// </summary>
165 /// <value>The path.</value> 165 /// <value>The path.</value>
166 public string Path 166 public string Path
167 { 167 {
168 get 168 get
169 { 169 {
170 return m_Path; 170 return m_Path;
171 } 171 }
172 } 172 }
173 173
174 /// <summary> 174 /// <summary>
175 /// Gets the filter groups. 175 /// Gets the filter groups.
176 /// </summary> 176 /// </summary>
177 /// <value>The filter groups.</value> 177 /// <value>The filter groups.</value>
178 public string FilterGroups 178 public string FilterGroups
179 { 179 {
180 get 180 get
181 { 181 {
182 return m_FilterGroups; 182 return m_FilterGroups;
183 } 183 }
184 } 184 }
185 185
186 /// <summary> 186 /// <summary>
187 /// Gets the project's version 187 /// Gets the project's version
188 /// </summary> 188 /// </summary>
189 /// <value>The project's version.</value> 189 /// <value>The project's version.</value>
190 public string Version 190 public string Version
191 { 191 {
192 get 192 get
193 { 193 {
194 return m_Version; 194 return m_Version;
195 } 195 }
196 } 196 }
197 197
198 /// <summary> 198 /// <summary>
199 /// Gets the full path. 199 /// Gets the full path.
200 /// </summary> 200 /// </summary>
201 /// <value>The full path.</value> 201 /// <value>The full path.</value>
202 public string FullPath 202 public string FullPath
203 { 203 {
204 get 204 get
205 { 205 {
206 return m_FullPath; 206 return m_FullPath;
207 } 207 }
208 } 208 }
209 209
210 /// <summary> 210 /// <summary>
211 /// Gets the name of the assembly. 211 /// Gets the name of the assembly.
212 /// </summary> 212 /// </summary>
213 /// <value>The name of the assembly.</value> 213 /// <value>The name of the assembly.</value>
214 public string AssemblyName 214 public string AssemblyName
215 { 215 {
216 get 216 get
217 { 217 {
218 return m_AssemblyName; 218 return m_AssemblyName;
219 } 219 }
220 } 220 }
221 221
222 /// <summary> 222 /// <summary>
223 /// Gets the app icon. 223 /// Gets the app icon.
224 /// </summary> 224 /// </summary>
225 /// <value>The app icon.</value> 225 /// <value>The app icon.</value>
226 public string AppIcon 226 public string AppIcon
227 { 227 {
228 get 228 get
229 { 229 {
230 return m_AppIcon; 230 return m_AppIcon;
231 } 231 }
232 } 232 }
233 233
234 /// <summary> 234 /// <summary>
235 /// Gets the app icon. 235 /// Gets the app icon.
236 /// </summary> 236 /// </summary>
237 /// <value>The app icon.</value> 237 /// <value>The app icon.</value>
238 public string ConfigFile 238 public string ConfigFile
239 { 239 {
240 get 240 get
241 { 241 {
242 return m_ConfigFile; 242 return m_ConfigFile;
243 } 243 }
244 } 244 }
245 245
246 /// <summary> 246 /// <summary>
247 /// 247 ///
248 /// </summary> 248 /// </summary>
249 public string DesignerFolder 249 public string DesignerFolder
250 { 250 {
251 get 251 get
252 { 252 {
253 return m_DesignerFolder; 253 return m_DesignerFolder;
254 } 254 }
255 } 255 }
256 256
257 /// <summary> 257 /// <summary>
258 /// Gets the language. 258 /// Gets the language.
259 /// </summary> 259 /// </summary>
260 /// <value>The language.</value> 260 /// <value>The language.</value>
261 public string Language 261 public string Language
262 { 262 {
263 get 263 get
264 { 264 {
265 return m_Language; 265 return m_Language;
266 } 266 }
267 } 267 }
268 268
269 /// <summary> 269 /// <summary>
270 /// Gets the type. 270 /// Gets the type.
271 /// </summary> 271 /// </summary>
272 /// <value>The type.</value> 272 /// <value>The type.</value>
273 public ProjectType Type 273 public ProjectType Type
274 { 274 {
275 get 275 get
276 { 276 {
277 return m_Type; 277 return m_Type;
278 } 278 }
279 } 279 }
280 280
281 /// <summary> 281 /// <summary>
282 /// Gets the runtime. 282 /// Gets the runtime.
283 /// </summary> 283 /// </summary>
284 /// <value>The runtime.</value> 284 /// <value>The runtime.</value>
285 public ClrRuntime Runtime 285 public ClrRuntime Runtime
286 { 286 {
287 get 287 get
288 { 288 {
289 return m_Runtime; 289 return m_Runtime;
290 } 290 }
291 } 291 }
292 292
293 private bool m_GenerateAssemblyInfoFile; 293 private bool m_GenerateAssemblyInfoFile;
294 294
295 /// <summary> 295 /// <summary>
296 /// 296 ///
297 /// </summary> 297 /// </summary>
298 public bool GenerateAssemblyInfoFile 298 public bool GenerateAssemblyInfoFile
299 { 299 {
300 get 300 get
301 { 301 {
302 return m_GenerateAssemblyInfoFile; 302 return m_GenerateAssemblyInfoFile;
303 } 303 }
304 set 304 set
305 { 305 {
306 m_GenerateAssemblyInfoFile = value; 306 m_GenerateAssemblyInfoFile = value;
307 } 307 }
308 } 308 }
309 309
310 /// <summary> 310 /// <summary>
311 /// Gets the startup object. 311 /// Gets the startup object.
312 /// </summary> 312 /// </summary>
313 /// <value>The startup object.</value> 313 /// <value>The startup object.</value>
314 public string StartupObject 314 public string StartupObject
315 { 315 {
316 get 316 get
317 { 317 {
318 return m_StartupObject; 318 return m_StartupObject;
319 } 319 }
320 } 320 }
321 321
322 /// <summary> 322 /// <summary>
323 /// Gets the root namespace. 323 /// Gets the root namespace.
324 /// </summary> 324 /// </summary>
325 /// <value>The root namespace.</value> 325 /// <value>The root namespace.</value>
326 public string RootNamespace 326 public string RootNamespace
327 { 327 {
328 get 328 get
329 { 329 {
330 return m_RootNamespace; 330 return m_RootNamespace;
331 } 331 }
332 } 332 }
333 333
334 /// <summary> 334 /// <summary>
335 /// Gets the configurations. 335 /// Gets the configurations.
336 /// </summary> 336 /// </summary>
337 /// <value>The configurations.</value> 337 /// <value>The configurations.</value>
338 public List<ConfigurationNode> Configurations 338 public List<ConfigurationNode> Configurations
339 { 339 {
340 get 340 get
341 { 341 {
342 List<ConfigurationNode> tmp = new List<ConfigurationNode>(ConfigurationsTable.Values); 342 List<ConfigurationNode> tmp = new List<ConfigurationNode>(ConfigurationsTable.Values);
343 tmp.Sort(); 343 tmp.Sort();
344 return tmp; 344 return tmp;
345 } 345 }
346 } 346 }
347 347
348 /// <summary> 348 /// <summary>
349 /// Gets the configurations table. 349 /// Gets the configurations table.
350 /// </summary> 350 /// </summary>
351 /// <value>The configurations table.</value> 351 /// <value>The configurations table.</value>
352 public Dictionary<string, ConfigurationNode> ConfigurationsTable 352 public Dictionary<string, ConfigurationNode> ConfigurationsTable
353 { 353 {
354 get 354 get
355 { 355 {
356 return m_Configurations; 356 return m_Configurations;
357 } 357 }
358 } 358 }
359 359
360 /// <summary> 360 /// <summary>
361 /// Gets the reference paths. 361 /// Gets the reference paths.
362 /// </summary> 362 /// </summary>
363 /// <value>The reference paths.</value> 363 /// <value>The reference paths.</value>
364 public List<ReferencePathNode> ReferencePaths 364 public List<ReferencePathNode> ReferencePaths
365 { 365 {
366 get 366 get
367 { 367 {
368 List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths); 368 List<ReferencePathNode> tmp = new List<ReferencePathNode>(m_ReferencePaths);
369 tmp.Sort(); 369 tmp.Sort();
370 return tmp; 370 return tmp;
371 } 371 }
372 } 372 }
373 373
374 /// <summary> 374 /// <summary>
375 /// Gets the references. 375 /// Gets the references.
376 /// </summary> 376 /// </summary>
377 /// <value>The references.</value> 377 /// <value>The references.</value>
378 public List<ReferenceNode> References 378 public List<ReferenceNode> References
379 { 379 {
380 get 380 get
381 { 381 {
382 List<ReferenceNode> tmp = new List<ReferenceNode>(m_References); 382 List<ReferenceNode> tmp = new List<ReferenceNode>(m_References);
383 tmp.Sort(); 383 tmp.Sort();
384 return tmp; 384 return tmp;
385 } 385 }
386 } 386 }
387 387
388 /// <summary> 388 /// <summary>
389 /// Gets the Authors list. 389 /// Gets the Authors list.
390 /// </summary> 390 /// </summary>
391 /// <value>The list of the project's authors.</value> 391 /// <value>The list of the project's authors.</value>
392 public List<AuthorNode> Authors 392 public List<AuthorNode> Authors
393 { 393 {
394 get 394 get
395 { 395 {
396 return m_Authors; 396 return m_Authors;
397 } 397 }
398 } 398 }
399 399
400 /// <summary> 400 /// <summary>
401 /// Gets the files. 401 /// Gets the files.
402 /// </summary> 402 /// </summary>
403 /// <value>The files.</value> 403 /// <value>The files.</value>
404 public FilesNode Files 404 public FilesNode Files
405 { 405 {
406 get 406 get
407 { 407 {
408 return m_Files; 408 return m_Files;
409 } 409 }
410 } 410 }
411 411
412 /// <summary> 412 /// <summary>
413 /// Gets or sets the parent. 413 /// Gets or sets the parent.
414 /// </summary> 414 /// </summary>
415 /// <value>The parent.</value> 415 /// <value>The parent.</value>
416 public override IDataNode Parent 416 public override IDataNode Parent
417 { 417 {
418 get 418 get
419 { 419 {
420 return base.Parent; 420 return base.Parent;
421 } 421 }
422 set 422 set
423 { 423 {
424 base.Parent = value; 424 base.Parent = value;
425 if(base.Parent is SolutionNode && m_Configurations.Count < 1) 425 if(base.Parent is SolutionNode && m_Configurations.Count < 1)
426 { 426 {
427 SolutionNode parent = (SolutionNode)base.Parent; 427 SolutionNode parent = (SolutionNode)base.Parent;
428 foreach(ConfigurationNode conf in parent.Configurations) 428 foreach(ConfigurationNode conf in parent.Configurations)
429 { 429 {
430 m_Configurations[conf.NameAndPlatform] = (ConfigurationNode) conf.Clone(); 430 m_Configurations[conf.NameAndPlatform] = (ConfigurationNode) conf.Clone();
431 } 431 }
432 } 432 }
433 } 433 }
434 } 434 }
435 435
436 /// <summary> 436 /// <summary>
437 /// Gets the GUID. 437 /// Gets the GUID.
438 /// </summary> 438 /// </summary>
439 /// <value>The GUID.</value> 439 /// <value>The GUID.</value>
440 public Guid Guid 440 public Guid Guid
441 { 441 {
442 get 442 get
443 { 443 {
444 return m_Guid; 444 return m_Guid;
445 } 445 }
446 } 446 }
447 447
448 public string DebugStartParameters 448 public string DebugStartParameters
449 { 449 {
450 get 450 get
451 { 451 {
452 return m_DebugStartParameters; 452 return m_DebugStartParameters;
453 } 453 }
454 } 454 }
455 455
456 #endregion 456 #endregion
457 457
458 #region Private Methods 458 #region Private Methods
459 459
460 private void HandleConfiguration(ConfigurationNode conf) 460 private void HandleConfiguration(ConfigurationNode conf)
461 { 461 {
462 if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first, 462 if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first,
463 //so it *may* override changes to the same properties for configurations defines at the project level 463 //so it *may* override changes to the same properties for configurations defines at the project level
464 { 464 {
465 foreach(ConfigurationNode confNode in m_Configurations.Values) 465 foreach(ConfigurationNode confNode in m_Configurations.Values)
466 { 466 {
467 conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides 467 conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides
468 } 468 }
469 } 469 }
470 if(m_Configurations.ContainsKey(conf.NameAndPlatform)) 470 if(m_Configurations.ContainsKey(conf.NameAndPlatform))
471 { 471 {
472 ConfigurationNode parentConf = m_Configurations[conf.NameAndPlatform]; 472 ConfigurationNode parentConf = m_Configurations[conf.NameAndPlatform];
473 conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides 473 conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides
474 } 474 }
475 else 475 else
476 { 476 {
477 m_Configurations[conf.NameAndPlatform] = conf; 477 m_Configurations[conf.NameAndPlatform] = conf;
478 } 478 }
479 } 479 }
480 480
481 #endregion 481 #endregion
482 482
483 #region Public Methods 483 #region Public Methods
484 484
485 /// <summary> 485 /// <summary>
486 /// Parses the specified node. 486 /// Parses the specified node.
487 /// </summary> 487 /// </summary>
488 /// <param name="node">The node.</param> 488 /// <param name="node">The node.</param>
489 public override void Parse(XmlNode node) 489 public override void Parse(XmlNode node)
490 { 490 {
491 m_Name = Helper.AttributeValue(node, "name", m_Name); 491 m_Name = Helper.AttributeValue(node, "name", m_Name);
492 m_Path = Helper.AttributeValue(node, "path", m_Path); 492 m_Path = Helper.AttributeValue(node, "path", m_Path);
493 m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); 493 m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups);
494 m_Version = Helper.AttributeValue(node, "version", m_Version); 494 m_Version = Helper.AttributeValue(node, "version", m_Version);
495 m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon); 495 m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon);
496 m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile); 496 m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile);
497 m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); 497 m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder);
498 m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); 498 m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName);
499 m_Language = Helper.AttributeValue(node, "language", m_Language); 499 m_Language = Helper.AttributeValue(node, "language", m_Language);
500 m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); 500 m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type);
501 m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); 501 m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
502 m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework); 502 m_Framework = (FrameworkVersion)Helper.EnumAttributeValue(node, "frameworkVersion", typeof(FrameworkVersion), m_Framework);
503 m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); 503 m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
504 m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); 504 m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
505 505
506 int hash = m_Name.GetHashCode(); 506 int hash = m_Name.GetHashCode();
507 Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); 507 Guid guidByHash = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
508 string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString()); 508 string guid = Helper.AttributeValue(node, "guid", guidByHash.ToString());
509 m_Guid = new Guid(guid); 509 m_Guid = new Guid(guid);
510 510
511 m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); 511 m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
512 m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); 512 m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty);
513 513
514 if(string.IsNullOrEmpty(m_AssemblyName)) 514 if(string.IsNullOrEmpty(m_AssemblyName))
515 { 515 {
516 m_AssemblyName = m_Name; 516 m_AssemblyName = m_Name;
517 } 517 }
518 518
519 if(string.IsNullOrEmpty(m_RootNamespace)) 519 if(string.IsNullOrEmpty(m_RootNamespace))
520 { 520 {
521 m_RootNamespace = m_Name; 521 m_RootNamespace = m_Name;
522 } 522 }
523 523
524 m_FullPath = m_Path; 524 m_FullPath = m_Path;
525 try 525 try
526 { 526 {
527 m_FullPath = Helper.ResolvePath(m_FullPath); 527 m_FullPath = Helper.ResolvePath(m_FullPath);
528 } 528 }
529 catch 529 catch
530 { 530 {
531 throw new WarningException("Could not resolve Solution path: {0}", m_Path); 531 throw new WarningException("Could not resolve Solution path: {0}", m_Path);
532 } 532 }
533 533
534 Kernel.Instance.CurrentWorkingDirectory.Push(); 534 Kernel.Instance.CurrentWorkingDirectory.Push();
535 try 535 try
536 { 536 {
537 Helper.SetCurrentDir(m_FullPath); 537 Helper.SetCurrentDir(m_FullPath);
538 538
539 if( node == null ) 539 if( node == null )
540 { 540 {
541 throw new ArgumentNullException("node"); 541 throw new ArgumentNullException("node");
542 } 542 }
543 543
544 foreach(XmlNode child in node.ChildNodes) 544 foreach(XmlNode child in node.ChildNodes)
545 { 545 {
546 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 546 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
547 if(dataNode is ConfigurationNode) 547 if(dataNode is ConfigurationNode)
548 { 548 {
549 HandleConfiguration((ConfigurationNode)dataNode); 549 HandleConfiguration((ConfigurationNode)dataNode);
550 } 550 }
551 else if(dataNode is ReferencePathNode) 551 else if(dataNode is ReferencePathNode)
552 { 552 {
553 m_ReferencePaths.Add((ReferencePathNode)dataNode); 553 m_ReferencePaths.Add((ReferencePathNode)dataNode);
554 } 554 }
555 else if(dataNode is ReferenceNode) 555 else if(dataNode is ReferenceNode)
556 { 556 {
557 m_References.Add((ReferenceNode)dataNode); 557 m_References.Add((ReferenceNode)dataNode);
558 } 558 }
559 else if(dataNode is AuthorNode) 559 else if(dataNode is AuthorNode)
560 { 560 {
561 m_Authors.Add((AuthorNode)dataNode); 561 m_Authors.Add((AuthorNode)dataNode);
562 } 562 }
563 else if(dataNode is FilesNode) 563 else if(dataNode is FilesNode)
564 { 564 {
565 m_Files = (FilesNode)dataNode; 565 m_Files = (FilesNode)dataNode;
566 } 566 }
567 } 567 }
568 } 568 }
569 finally 569 finally
570 { 570 {
571 Kernel.Instance.CurrentWorkingDirectory.Pop(); 571 Kernel.Instance.CurrentWorkingDirectory.Pop();
572 } 572 }
573 } 573 }
574 574
575 #endregion 575 #endregion
576 576
577 #region IComparable Members 577 #region IComparable Members
578 578
@@ -582,6 +582,6 @@ namespace Prebuild.Core.Nodes
582 return m_Name.CompareTo(that.m_Name); 582 return m_Name.CompareTo(that.m_Name);
583 } 583 }
584 584
585 #endregion 585 #endregion
586 } 586 }
587} 587}
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs
index 9c5d1a3..9afb512 100644
--- a/Prebuild/src/Core/Nodes/ReferenceNode.cs
+++ b/Prebuild/src/Core/Nodes/ReferenceNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,104 +32,104 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 [DataNode("Reference")] 38 [DataNode("Reference")]
39 public class ReferenceNode : DataNode, IComparable 39 public class ReferenceNode : DataNode, IComparable
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Name = "unknown"; 43 private string m_Name = "unknown";
44 private string m_Path; 44 private string m_Path;
45 private string m_LocalCopy; 45 private string m_LocalCopy;
46 private string m_Version; 46 private string m_Version;
47 47
48 #endregion 48 #endregion
49 49
50 #region Properties 50 #region Properties
51 51
52 /// <summary> 52 /// <summary>
53 /// Gets the name. 53 /// Gets the name.
54 /// </summary> 54 /// </summary>
55 /// <value>The name.</value> 55 /// <value>The name.</value>
56 public string Name 56 public string Name
57 { 57 {
58 get 58 get
59 { 59 {
60 return m_Name; 60 return m_Name;
61 } 61 }
62 } 62 }
63 63
64 /// <summary> 64 /// <summary>
65 /// Gets the path. 65 /// Gets the path.
66 /// </summary> 66 /// </summary>
67 /// <value>The path.</value> 67 /// <value>The path.</value>
68 public string Path 68 public string Path
69 { 69 {
70 get 70 get
71 { 71 {
72 return m_Path; 72 return m_Path;
73 } 73 }
74 } 74 }
75 75
76 /// <summary> 76 /// <summary>
77 /// Gets a value indicating whether [local copy specified]. 77 /// Gets a value indicating whether [local copy specified].
78 /// </summary> 78 /// </summary>
79 /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value> 79 /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value>
80 public bool LocalCopySpecified 80 public bool LocalCopySpecified
81 { 81 {
82 get 82 get
83 { 83 {
84 return ( m_LocalCopy != null && m_LocalCopy.Length == 0); 84 return ( m_LocalCopy != null && m_LocalCopy.Length == 0);
85 } 85 }
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
89 /// Gets a value indicating whether [local copy]. 89 /// Gets a value indicating whether [local copy].
90 /// </summary> 90 /// </summary>
91 /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value> 91 /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value>
92 public bool LocalCopy 92 public bool LocalCopy
93 { 93 {
94 get 94 get
95 { 95 {
96 if( m_LocalCopy == null) 96 if( m_LocalCopy == null)
97 { 97 {
98 return false; 98 return false;
99 } 99 }
100 return bool.Parse(m_LocalCopy); 100 return bool.Parse(m_LocalCopy);
101 } 101 }
102 } 102 }
103 103
104 /// <summary> 104 /// <summary>
105 /// Gets the version. 105 /// Gets the version.
106 /// </summary> 106 /// </summary>
107 /// <value>The version.</value> 107 /// <value>The version.</value>
108 public string Version 108 public string Version
109 { 109 {
110 get 110 get
111 { 111 {
112 return m_Version; 112 return m_Version;
113 } 113 }
114 } 114 }
115 115
116 #endregion 116 #endregion
117 117
118 #region Public Methods 118 #region Public Methods
119 119
120 /// <summary> 120 /// <summary>
121 /// Parses the specified node. 121 /// Parses the specified node.
122 /// </summary> 122 /// </summary>
123 /// <param name="node">The node.</param> 123 /// <param name="node">The node.</param>
124 public override void Parse(XmlNode node) 124 public override void Parse(XmlNode node)
125 { 125 {
126 m_Name = Helper.AttributeValue(node, "name", m_Name); 126 m_Name = Helper.AttributeValue(node, "name", m_Name);
127 m_Path = Helper.AttributeValue(node, "path", m_Path); 127 m_Path = Helper.AttributeValue(node, "path", m_Path);
128 m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy); 128 m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy);
129 m_Version = Helper.AttributeValue(node, "version", m_Version); 129 m_Version = Helper.AttributeValue(node, "version", m_Version);
130 } 130 }
131 131
132 #endregion 132 #endregion
133 133
134 #region IComparable Members 134 #region IComparable Members
135 135
@@ -140,5 +140,5 @@ namespace Prebuild.Core.Nodes
140 } 140 }
141 141
142 #endregion 142 #endregion
143 } 143 }
144} 144}
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs
index 7331cd7..29c63c5 100644
--- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs
+++ b/Prebuild/src/Core/Nodes/ReferencePathNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -32,57 +32,57 @@ using Prebuild.Core.Utilities;
32 32
33namespace Prebuild.Core.Nodes 33namespace Prebuild.Core.Nodes
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 [DataNode("ReferencePath")] 38 [DataNode("ReferencePath")]
39 public class ReferencePathNode : DataNode, IComparable 39 public class ReferencePathNode : DataNode, IComparable
40 { 40 {
41 #region Fields 41 #region Fields
42 42
43 private string m_Path; 43 private string m_Path;
44 44
45 #endregion 45 #endregion
46 46
47 #region Properties 47 #region Properties
48 48
49 /// <summary> 49 /// <summary>
50 /// Gets the path. 50 /// Gets the path.
51 /// </summary> 51 /// </summary>
52 /// <value>The path.</value> 52 /// <value>The path.</value>
53 public string Path 53 public string Path
54 { 54 {
55 get 55 get
56 { 56 {
57 return m_Path; 57 return m_Path;
58 } 58 }
59 } 59 }
60 60
61 #endregion 61 #endregion
62 62
63 #region Public Methods 63 #region Public Methods
64 64
65 /// <summary> 65 /// <summary>
66 /// Parses the specified node. 66 /// Parses the specified node.
67 /// </summary> 67 /// </summary>
68 /// <param name="node">The node.</param> 68 /// <param name="node">The node.</param>
69 public override void Parse(XmlNode node) 69 public override void Parse(XmlNode node)
70 { 70 {
71 if( node == null ) 71 if( node == null )
72 { 72 {
73 throw new ArgumentNullException("node"); 73 throw new ArgumentNullException("node");
74 } 74 }
75 75
76 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); 76 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
77 if(m_Path == null) 77 if(m_Path == null)
78 { 78 {
79 m_Path = ""; 79 m_Path = "";
80 } 80 }
81 81
82 m_Path = m_Path.Trim(); 82 m_Path = m_Path.Trim();
83 } 83 }
84 84
85 #endregion 85 #endregion
86 86
87 #region IComparable Members 87 #region IComparable Members
88 88
@@ -93,5 +93,5 @@ namespace Prebuild.Core.Nodes
93 } 93 }
94 94
95 #endregion 95 #endregion
96 } 96 }
97} 97}
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs
index 10c0223..e1d5b3b 100644
--- a/Prebuild/src/Core/Nodes/SolutionNode.cs
+++ b/Prebuild/src/Core/Nodes/SolutionNode.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,35 +34,35 @@ using Prebuild.Core.Utilities;
34 34
35namespace Prebuild.Core.Nodes 35namespace Prebuild.Core.Nodes
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 [DataNode("Solution")] 40 [DataNode("Solution")]
41 [DataNode("EmbeddedSolution")] 41 [DataNode("EmbeddedSolution")]
42 [DebuggerDisplay("{Name}")] 42 [DebuggerDisplay("{Name}")]
43 public class SolutionNode : DataNode 43 public class SolutionNode : DataNode
44 { 44 {
45 #region Fields 45 #region Fields
46 46
47 private Guid m_Guid = Guid.NewGuid(); 47 private Guid m_Guid = Guid.NewGuid();
48 private string m_Name = "unknown"; 48 private string m_Name = "unknown";
49 private string m_Path = ""; 49 private string m_Path = "";
50 private string m_FullPath = ""; 50 private string m_FullPath = "";
51 private string m_ActiveConfig; 51 private string m_ActiveConfig;
52 private string m_Version = "1.0.0"; 52 private string m_Version = "1.0.0";
53 53
54 private OptionsNode m_Options; 54 private OptionsNode m_Options;
55 private FilesNode m_Files; 55 private FilesNode m_Files;
56 private readonly ConfigurationNodeCollection m_Configurations = new ConfigurationNodeCollection(); 56 private readonly ConfigurationNodeCollection m_Configurations = new ConfigurationNodeCollection();
57 private readonly Dictionary<string, ProjectNode> m_Projects = new Dictionary<string, ProjectNode>(); 57 private readonly Dictionary<string, ProjectNode> m_Projects = new Dictionary<string, ProjectNode>();
58 private readonly Dictionary<string, DatabaseProjectNode> m_DatabaseProjects = new Dictionary<string, DatabaseProjectNode>(); 58 private readonly Dictionary<string, DatabaseProjectNode> m_DatabaseProjects = new Dictionary<string, DatabaseProjectNode>();
59 private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); 59 private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>();
60 private readonly Dictionary<string, SolutionNode> m_Solutions = new Dictionary<string, SolutionNode>(); 60 private readonly Dictionary<string, SolutionNode> m_Solutions = new Dictionary<string, SolutionNode>();
61 private CleanupNode m_Cleanup; 61 private CleanupNode m_Cleanup;
62 62
63 #endregion 63 #endregion
64 64
65 #region Properties 65 #region Properties
66 public override IDataNode Parent 66 public override IDataNode Parent
67 { 67 {
68 get 68 get
@@ -84,142 +84,142 @@ namespace Prebuild.Core.Nodes
84 } 84 }
85 } 85 }
86 86
87 public CleanupNode Cleanup 87 public CleanupNode Cleanup
88 { 88 {
89 get 89 get
90 { 90 {
91 return m_Cleanup; 91 return m_Cleanup;
92 } 92 }
93 set 93 set
94 { 94 {
95 m_Cleanup = value; 95 m_Cleanup = value;
96 } 96 }
97 } 97 }
98 98
99 public Guid Guid 99 public Guid Guid
100 { 100 {
101 get 101 get
102 { 102 {
103 return m_Guid; 103 return m_Guid;
104 } 104 }
105 set 105 set
106 { 106 {
107 m_Guid = value; 107 m_Guid = value;
108 }
109 }
110 /// <summary>
111 /// Gets or sets the active config.
112 /// </summary>
113 /// <value>The active config.</value>
114 public string ActiveConfig
115 {
116 get
117 {
118 return m_ActiveConfig;
119 }
120 set
121 {
122 m_ActiveConfig = value;
123 }
124 }
125
126 /// <summary>
127 /// Gets the name.
128 /// </summary>
129 /// <value>The name.</value>
130 public string Name
131 {
132 get
133 {
134 return m_Name;
135 }
136 }
137
138 /// <summary>
139 /// Gets the path.
140 /// </summary>
141 /// <value>The path.</value>
142 public string Path
143 {
144 get
145 {
146 return m_Path;
147 }
148 }
149
150 /// <summary>
151 /// Gets the full path.
152 /// </summary>
153 /// <value>The full path.</value>
154 public string FullPath
155 {
156 get
157 {
158 return m_FullPath;
159 }
160 }
161
162 /// <summary>
163 /// Gets the version.
164 /// </summary>
165 /// <value>The version.</value>
166 public string Version
167 {
168 get
169 {
170 return m_Version;
171 }
172 }
173
174 /// <summary>
175 /// Gets the options.
176 /// </summary>
177 /// <value>The options.</value>
178 public OptionsNode Options
179 {
180 get
181 {
182 return m_Options;
183 }
184 }
185
186 /// <summary>
187 /// Gets the files.
188 /// </summary>
189 /// <value>The files.</value>
190 public FilesNode Files
191 {
192 get
193 {
194 return m_Files;
195 }
196 }
197
198 /// <summary>
199 /// Gets the configurations.
200 /// </summary>
201 /// <value>The configurations.</value>
202 public ConfigurationNodeCollection Configurations
203 {
204 get
205 {
206 ConfigurationNodeCollection tmp = new ConfigurationNodeCollection();
207 tmp.AddRange(ConfigurationsTable);
208 return tmp;
209 }
210 }
211
212 /// <summary>
213 /// Gets the configurations table.
214 /// </summary>
215 /// <value>The configurations table.</value>
216 public ConfigurationNodeCollection ConfigurationsTable
217 {
218 get
219 {
220 return m_Configurations;
108 } 221 }
109 } 222 }
110 /// <summary>
111 /// Gets or sets the active config.
112 /// </summary>
113 /// <value>The active config.</value>
114 public string ActiveConfig
115 {
116 get
117 {
118 return m_ActiveConfig;
119 }
120 set
121 {
122 m_ActiveConfig = value;
123 }
124 }
125
126 /// <summary>
127 /// Gets the name.
128 /// </summary>
129 /// <value>The name.</value>
130 public string Name
131 {
132 get
133 {
134 return m_Name;
135 }
136 }
137
138 /// <summary>
139 /// Gets the path.
140 /// </summary>
141 /// <value>The path.</value>
142 public string Path
143 {
144 get
145 {
146 return m_Path;
147 }
148 }
149
150 /// <summary>
151 /// Gets the full path.
152 /// </summary>
153 /// <value>The full path.</value>
154 public string FullPath
155 {
156 get
157 {
158 return m_FullPath;
159 }
160 }
161
162 /// <summary>
163 /// Gets the version.
164 /// </summary>
165 /// <value>The version.</value>
166 public string Version
167 {
168 get
169 {
170 return m_Version;
171 }
172 }
173
174 /// <summary>
175 /// Gets the options.
176 /// </summary>
177 /// <value>The options.</value>
178 public OptionsNode Options
179 {
180 get
181 {
182 return m_Options;
183 }
184 }
185
186 /// <summary>
187 /// Gets the files.
188 /// </summary>
189 /// <value>The files.</value>
190 public FilesNode Files
191 {
192 get
193 {
194 return m_Files;
195 }
196 }
197
198 /// <summary>
199 /// Gets the configurations.
200 /// </summary>
201 /// <value>The configurations.</value>
202 public ConfigurationNodeCollection Configurations
203 {
204 get
205 {
206 ConfigurationNodeCollection tmp = new ConfigurationNodeCollection();
207 tmp.AddRange(ConfigurationsTable);
208 return tmp;
209 }
210 }
211
212 /// <summary>
213 /// Gets the configurations table.
214 /// </summary>
215 /// <value>The configurations table.</value>
216 public ConfigurationNodeCollection ConfigurationsTable
217 {
218 get
219 {
220 return m_Configurations;
221 }
222 }
223 /// <summary> 223 /// <summary>
224 /// Gets the database projects. 224 /// Gets the database projects.
225 /// </summary> 225 /// </summary>
@@ -250,106 +250,106 @@ namespace Prebuild.Core.Nodes
250 return m_Solutions; 250 return m_Solutions;
251 } 251 }
252 } 252 }
253 /// <summary> 253 /// <summary>
254 /// Gets the projects. 254 /// Gets the projects.
255 /// </summary> 255 /// </summary>
256 /// <value>The projects.</value> 256 /// <value>The projects.</value>
257 public ICollection<ProjectNode> Projects 257 public ICollection<ProjectNode> Projects
258 { 258 {
259 get 259 get
260 { 260 {
261 List<ProjectNode> tmp = new List<ProjectNode>(m_Projects.Values); 261 List<ProjectNode> tmp = new List<ProjectNode>(m_Projects.Values);
262 tmp.Sort(); 262 tmp.Sort();
263 return tmp; 263 return tmp;
264 } 264 }
265 } 265 }
266 266
267 /// <summary> 267 /// <summary>
268 /// Gets the projects table. 268 /// Gets the projects table.
269 /// </summary> 269 /// </summary>
270 /// <value>The projects table.</value> 270 /// <value>The projects table.</value>
271 public Dictionary<string, ProjectNode> ProjectsTable 271 public Dictionary<string, ProjectNode> ProjectsTable
272 { 272 {
273 get 273 get
274 { 274 {
275 return m_Projects; 275 return m_Projects;
276 } 276 }
277 } 277 }
278 278
279 /// <summary> 279 /// <summary>
280 /// Gets the projects table. 280 /// Gets the projects table.
281 /// </summary> 281 /// </summary>
282 /// <value>The projects table.</value> 282 /// <value>The projects table.</value>
283 public List<ProjectNode> ProjectsTableOrder 283 public List<ProjectNode> ProjectsTableOrder
284 { 284 {
285 get 285 get
286 { 286 {
287 return m_ProjectsOrder; 287 return m_ProjectsOrder;
288 } 288 }
289 } 289 }
290 290
291 #endregion 291 #endregion
292 292
293 #region Public Methods 293 #region Public Methods
294 294
295 /// <summary> 295 /// <summary>
296 /// Parses the specified node. 296 /// Parses the specified node.
297 /// </summary> 297 /// </summary>
298 /// <param name="node">The node.</param> 298 /// <param name="node">The node.</param>
299 public override void Parse(XmlNode node) 299 public override void Parse(XmlNode node)
300 { 300 {
301 m_Name = Helper.AttributeValue(node, "name", m_Name); 301 m_Name = Helper.AttributeValue(node, "name", m_Name);
302 m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig); 302 m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig);
303 m_Path = Helper.AttributeValue(node, "path", m_Path); 303 m_Path = Helper.AttributeValue(node, "path", m_Path);
304 m_Version = Helper.AttributeValue(node, "version", m_Version); 304 m_Version = Helper.AttributeValue(node, "version", m_Version);
305 305
306 m_FullPath = m_Path; 306 m_FullPath = m_Path;
307 try 307 try
308 { 308 {
309 m_FullPath = Helper.ResolvePath(m_FullPath); 309 m_FullPath = Helper.ResolvePath(m_FullPath);
310 } 310 }
311 catch 311 catch
312 { 312 {
313 throw new WarningException("Could not resolve solution path: {0}", m_Path); 313 throw new WarningException("Could not resolve solution path: {0}", m_Path);
314 } 314 }
315 315
316 Kernel.Instance.CurrentWorkingDirectory.Push(); 316 Kernel.Instance.CurrentWorkingDirectory.Push();
317 try 317 try
318 { 318 {
319 Helper.SetCurrentDir(m_FullPath); 319 Helper.SetCurrentDir(m_FullPath);
320 320
321 if( node == null ) 321 if( node == null )
322 { 322 {
323 throw new ArgumentNullException("node"); 323 throw new ArgumentNullException("node");
324 } 324 }
325 325
326 foreach(XmlNode child in node.ChildNodes) 326 foreach(XmlNode child in node.ChildNodes)
327 { 327 {
328 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 328 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
329 if(dataNode is OptionsNode) 329 if(dataNode is OptionsNode)
330 { 330 {
331 m_Options = (OptionsNode)dataNode; 331 m_Options = (OptionsNode)dataNode;
332 } 332 }
333 else if(dataNode is FilesNode) 333 else if(dataNode is FilesNode)
334 { 334 {
335 m_Files = (FilesNode)dataNode; 335 m_Files = (FilesNode)dataNode;
336 } 336 }
337 else if(dataNode is ConfigurationNode) 337 else if(dataNode is ConfigurationNode)
338 { 338 {
339 ConfigurationNode configurationNode = (ConfigurationNode) dataNode; 339 ConfigurationNode configurationNode = (ConfigurationNode) dataNode;
340 m_Configurations[configurationNode.NameAndPlatform] = configurationNode; 340 m_Configurations[configurationNode.NameAndPlatform] = configurationNode;
341 341
342 // If the active configuration is null, then we populate it. 342 // If the active configuration is null, then we populate it.
343 if (ActiveConfig == null) 343 if (ActiveConfig == null)
344 { 344 {
345 ActiveConfig = configurationNode.Name; 345 ActiveConfig = configurationNode.Name;
346 } 346 }
347 } 347 }
348 else if(dataNode is ProjectNode) 348 else if(dataNode is ProjectNode)
349 { 349 {
350 m_Projects[((ProjectNode)dataNode).Name] = (ProjectNode) dataNode; 350 m_Projects[((ProjectNode)dataNode).Name] = (ProjectNode) dataNode;
351 m_ProjectsOrder.Add((ProjectNode)dataNode); 351 m_ProjectsOrder.Add((ProjectNode)dataNode);
352 } 352 }
353 else if(dataNode is SolutionNode) 353 else if(dataNode is SolutionNode)
354 { 354 {
355 m_Solutions[((SolutionNode)dataNode).Name] = (SolutionNode) dataNode; 355 m_Solutions[((SolutionNode)dataNode).Name] = (SolutionNode) dataNode;
@@ -369,14 +369,14 @@ namespace Prebuild.Core.Nodes
369 throw new WarningException("There can only be one Cleanup node."); 369 throw new WarningException("There can only be one Cleanup node.");
370 m_Cleanup = (CleanupNode)dataNode; 370 m_Cleanup = (CleanupNode)dataNode;
371 } 371 }
372 } 372 }
373 } 373 }
374 finally 374 finally
375 { 375 {
376 Kernel.Instance.CurrentWorkingDirectory.Pop(); 376 Kernel.Instance.CurrentWorkingDirectory.Pop();
377 } 377 }
378 } 378 }
379 379
380 #endregion 380 #endregion
381 } 381 }
382} 382}
diff --git a/Prebuild/src/Core/Parse/IfContext.cs b/Prebuild/src/Core/Parse/IfContext.cs
index 3c79d38..7729d3b 100644
--- a/Prebuild/src/Core/Parse/IfContext.cs
+++ b/Prebuild/src/Core/Parse/IfContext.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -27,128 +27,128 @@ using System;
27 27
28namespace Prebuild.Core.Parse 28namespace Prebuild.Core.Parse
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// 31 ///
32 /// </summary> 32 /// </summary>
33 public enum IfState 33 public enum IfState
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// 36 ///
37 /// </summary> 37 /// </summary>
38 None, 38 None,
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 If, 42 If,
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 ElseIf, 46 ElseIf,
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 Else 50 Else
51 } 51 }
52 52
53 /// <summary> 53 /// <summary>
54 /// Summary description for IfContext. 54 /// Summary description for IfContext.
55 /// </summary> 55 /// </summary>
56 // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/) 56 // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/)
57 public class IfContext 57 public class IfContext
58 { 58 {
59 #region Properties 59 #region Properties
60 60
61 bool m_Active; 61 bool m_Active;
62 bool m_Keep; 62 bool m_Keep;
63 bool m_EverKept; 63 bool m_EverKept;
64 IfState m_State = IfState.None; 64 IfState m_State = IfState.None;
65 65
66 #endregion 66 #endregion
67 67
68 #region Constructors 68 #region Constructors
69 69
70 /// <summary> 70 /// <summary>
71 /// Initializes a new instance of the <see cref="IfContext"/> class. 71 /// Initializes a new instance of the <see cref="IfContext"/> class.
72 /// </summary> 72 /// </summary>
73 /// <param name="active">if set to <c>true</c> [active].</param> 73 /// <param name="active">if set to <c>true</c> [active].</param>
74 /// <param name="keep">if set to <c>true</c> [keep].</param> 74 /// <param name="keep">if set to <c>true</c> [keep].</param>
75 /// <param name="state">The state.</param> 75 /// <param name="state">The state.</param>
76 public IfContext(bool active, bool keep, IfState state) 76 public IfContext(bool active, bool keep, IfState state)
77 { 77 {
78 m_Active = active; 78 m_Active = active;
79 m_Keep = keep; 79 m_Keep = keep;
80 m_EverKept = keep; 80 m_EverKept = keep;
81 m_State = state; 81 m_State = state;
82 } 82 }
83 83
84 #endregion 84 #endregion
85 85
86 #region Properties 86 #region Properties
87 87
88 /// <summary> 88 /// <summary>
89 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active. 89 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active.
90 /// </summary> 90 /// </summary>
91 /// <value><c>true</c> if active; otherwise, <c>false</c>.</value> 91 /// <value><c>true</c> if active; otherwise, <c>false</c>.</value>
92 public bool Active 92 public bool Active
93 { 93 {
94 get 94 get
95 { 95 {
96 return m_Active; 96 return m_Active;
97 } 97 }
98 set 98 set
99 { 99 {
100 m_Active = value; 100 m_Active = value;
101 } 101 }
102 } 102 }
103 103
104 /// <summary> 104 /// <summary>
105 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep. 105 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep.
106 /// </summary> 106 /// </summary>
107 /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value> 107 /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value>
108 public bool Keep 108 public bool Keep
109 { 109 {
110 get 110 get
111 { 111 {
112 return m_Keep; 112 return m_Keep;
113 } 113 }
114 set 114 set
115 { 115 {
116 m_Keep = value; 116 m_Keep = value;
117 if(m_Keep) 117 if(m_Keep)
118 { 118 {
119 m_EverKept = true; 119 m_EverKept = true;
120 } 120 }
121 } 121 }
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// Gets a value indicating whether [ever kept]. 125 /// Gets a value indicating whether [ever kept].
126 /// </summary> 126 /// </summary>
127 /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value> 127 /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value>
128 public bool EverKept 128 public bool EverKept
129 { 129 {
130 get 130 get
131 { 131 {
132 return m_EverKept; 132 return m_EverKept;
133 } 133 }
134 } 134 }
135 135
136 /// <summary> 136 /// <summary>
137 /// Gets or sets the state. 137 /// Gets or sets the state.
138 /// </summary> 138 /// </summary>
139 /// <value>The state.</value> 139 /// <value>The state.</value>
140 public IfState State 140 public IfState State
141 { 141 {
142 get 142 get
143 { 143 {
144 return m_State; 144 return m_State;
145 } 145 }
146 set 146 set
147 { 147 {
148 m_State = value; 148 m_State = value;
149 } 149 }
150 } 150 }
151 151
152 #endregion 152 #endregion
153 } 153 }
154} 154}
diff --git a/Prebuild/src/Core/Parse/Preprocessor.cs b/Prebuild/src/Core/Parse/Preprocessor.cs
index 0648fad..0cd6e82 100644
--- a/Prebuild/src/Core/Parse/Preprocessor.cs
+++ b/Prebuild/src/Core/Parse/Preprocessor.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -31,336 +31,336 @@ using System.Xml;
31 31
32namespace Prebuild.Core.Parse 32namespace Prebuild.Core.Parse
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// 35 ///
36 /// </summary> 36 /// </summary>
37 public enum OperatorSymbol 37 public enum OperatorSymbol
38 { 38 {
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 None, 42 None,
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 Equal, 46 Equal,
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 NotEqual, 50 NotEqual,
51 /// <summary> 51 /// <summary>
52 /// 52 ///
53 /// </summary> 53 /// </summary>
54 LessThan, 54 LessThan,
55 /// <summary> 55 /// <summary>
56 /// 56 ///
57 /// </summary> 57 /// </summary>
58 GreaterThan, 58 GreaterThan,
59 /// <summary> 59 /// <summary>
60 /// 60 ///
61 /// </summary> 61 /// </summary>
62 LessThanEqual, 62 LessThanEqual,
63 /// <summary> 63 /// <summary>
64 /// 64 ///
65 /// </summary> 65 /// </summary>
66 GreaterThanEqual 66 GreaterThanEqual
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// 70 ///
71 /// </summary> 71 /// </summary>
72 public class Preprocessor 72 public class Preprocessor
73 { 73 {
74 #region Constants 74 #region Constants
75 75
76 /// <summary> 76 /// <summary>
77 /// Includes the regex to look for file tags in the <?include 77 /// Includes the regex to look for file tags in the <?include
78 /// ?> processing instruction. 78 /// ?> processing instruction.
79 /// </summary> 79 /// </summary>
80 private static readonly Regex includeFileRegex = new Regex("file=\"(.+?)\""); 80 private static readonly Regex includeFileRegex = new Regex("file=\"(.+?)\"");
81 81
82 #endregion 82 #endregion
83 83
84 #region Fields 84 #region Fields
85 85
86 readonly XmlDocument m_OutDoc = new XmlDocument(); 86 readonly XmlDocument m_OutDoc = new XmlDocument();
87 readonly Stack<IfContext> m_IfStack = new Stack<IfContext>(); 87 readonly Stack<IfContext> m_IfStack = new Stack<IfContext>();
88 readonly Dictionary<string, object> m_Variables = new Dictionary<string, object>(); 88 readonly Dictionary<string, object> m_Variables = new Dictionary<string, object>();
89 89
90 #endregion 90 #endregion
91 91
92 #region Constructors 92 #region Constructors
93 93
94 /// <summary> 94 /// <summary>
95 /// Initializes a new instance of the <see cref="Preprocessor"/> class. 95 /// Initializes a new instance of the <see cref="Preprocessor"/> class.
96 /// </summary> 96 /// </summary>
97 public Preprocessor() 97 public Preprocessor()
98 { 98 {
99 RegisterVariable("OS", GetOS()); 99 RegisterVariable("OS", GetOS());
100 RegisterVariable("RuntimeVersion", Environment.Version.Major); 100 RegisterVariable("RuntimeVersion", Environment.Version.Major);
101 RegisterVariable("RuntimeMajor", Environment.Version.Major); 101 RegisterVariable("RuntimeMajor", Environment.Version.Major);
102 RegisterVariable("RuntimeMinor", Environment.Version.Minor); 102 RegisterVariable("RuntimeMinor", Environment.Version.Minor);
103 RegisterVariable("RuntimeRevision", Environment.Version.Revision); 103 RegisterVariable("RuntimeRevision", Environment.Version.Revision);
104 } 104 }
105 105
106 #endregion 106 #endregion
107 107
108 #region Properties 108 #region Properties
109 109
110 /// <summary> 110 /// <summary>
111 /// Gets the processed doc. 111 /// Gets the processed doc.
112 /// </summary> 112 /// </summary>
113 /// <value>The processed doc.</value> 113 /// <value>The processed doc.</value>
114 public XmlDocument ProcessedDoc 114 public XmlDocument ProcessedDoc
115 { 115 {
116 get 116 get
117 { 117 {
118 return m_OutDoc; 118 return m_OutDoc;
119 } 119 }
120 } 120 }
121 121
122 #endregion 122 #endregion
123 123
124 #region Private Methods 124 #region Private Methods
125 125
126 /// <summary> 126 /// <summary>
127 /// Parts of this code were taken from NAnt and is subject to the GPL 127 /// Parts of this code were taken from NAnt and is subject to the GPL
128 /// as per NAnt's license. Thanks to the NAnt guys for this little gem. 128 /// as per NAnt's license. Thanks to the NAnt guys for this little gem.
129 /// </summary> 129 /// </summary>
130 /// <returns></returns> 130 /// <returns></returns>
131 public static string GetOS() 131 public static string GetOS()
132 { 132 {
133 PlatformID platId = Environment.OSVersion.Platform; 133 PlatformID platId = Environment.OSVersion.Platform;
134 if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows) 134 if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows)
135 { 135 {
136 return "Win32"; 136 return "Win32";
137 } 137 }
138 138
139 if (File.Exists("/System/Library/Frameworks/Cocoa.framework/Cocoa")) 139 if (File.Exists("/System/Library/Frameworks/Cocoa.framework/Cocoa"))
140 { 140 {
141 return "MACOSX"; 141 return "MACOSX";
142 } 142 }
143 143
144 /* 144 /*
145 * .NET 1.x, under Mono, the UNIX code is 128. Under 145 * .NET 1.x, under Mono, the UNIX code is 128. Under
146 * .NET 2.x, Mono or MS, the UNIX code is 4 146 * .NET 2.x, Mono or MS, the UNIX code is 4
147 */ 147 */
148 if(Environment.Version.Major == 1) 148 if(Environment.Version.Major == 1)
149 { 149 {
150 if((int)platId == 128) 150 if((int)platId == 128)
151 { 151 {
152 return "UNIX"; 152 return "UNIX";
153 } 153 }
154 } 154 }
155 else if((int)platId == 4) 155 else if((int)platId == 4)
156 { 156 {
157 return "UNIX"; 157 return "UNIX";
158 } 158 }
159 159
160 return "Unknown"; 160 return "Unknown";
161 } 161 }
162 162
163 private static bool CompareNum(OperatorSymbol oper, int val1, int val2) 163 private static bool CompareNum(OperatorSymbol oper, int val1, int val2)
164 { 164 {
165 switch(oper) 165 switch(oper)
166 { 166 {
167 case OperatorSymbol.Equal: 167 case OperatorSymbol.Equal:
168 return (val1 == val2); 168 return (val1 == val2);
169 case OperatorSymbol.NotEqual: 169 case OperatorSymbol.NotEqual:
170 return (val1 != val2); 170 return (val1 != val2);
171 case OperatorSymbol.LessThan: 171 case OperatorSymbol.LessThan:
172 return (val1 < val2); 172 return (val1 < val2);
173 case OperatorSymbol.LessThanEqual: 173 case OperatorSymbol.LessThanEqual:
174 return (val1 <= val2); 174 return (val1 <= val2);
175 case OperatorSymbol.GreaterThan: 175 case OperatorSymbol.GreaterThan:
176 return (val1 > val2); 176 return (val1 > val2);
177 case OperatorSymbol.GreaterThanEqual: 177 case OperatorSymbol.GreaterThanEqual:
178 return (val1 >= val2); 178 return (val1 >= val2);
179 } 179 }
180 180
181 throw new WarningException("Unknown operator type"); 181 throw new WarningException("Unknown operator type");
182 } 182 }
183 183
184 private static bool CompareStr(OperatorSymbol oper, string val1, string val2) 184 private static bool CompareStr(OperatorSymbol oper, string val1, string val2)
185 { 185 {
186 switch(oper) 186 switch(oper)
187 { 187 {
188 case OperatorSymbol.Equal: 188 case OperatorSymbol.Equal:
189 return (val1 == val2); 189 return (val1 == val2);
190 case OperatorSymbol.NotEqual: 190 case OperatorSymbol.NotEqual:
191 return (val1 != val2); 191 return (val1 != val2);
192 case OperatorSymbol.LessThan: 192 case OperatorSymbol.LessThan:
193 return (val1.CompareTo(val2) < 0); 193 return (val1.CompareTo(val2) < 0);
194 case OperatorSymbol.LessThanEqual: 194 case OperatorSymbol.LessThanEqual:
195 return (val1.CompareTo(val2) <= 0); 195 return (val1.CompareTo(val2) <= 0);
196 case OperatorSymbol.GreaterThan: 196 case OperatorSymbol.GreaterThan:
197 return (val1.CompareTo(val2) > 0); 197 return (val1.CompareTo(val2) > 0);
198 case OperatorSymbol.GreaterThanEqual: 198 case OperatorSymbol.GreaterThanEqual:
199 return (val1.CompareTo(val2) >= 0); 199 return (val1.CompareTo(val2) >= 0);
200 } 200 }
201 201
202 throw new WarningException("Unknown operator type"); 202 throw new WarningException("Unknown operator type");
203 } 203 }
204 204
205 private static char NextChar(int idx, string str) 205 private static char NextChar(int idx, string str)
206 { 206 {
207 if((idx + 1) >= str.Length) 207 if((idx + 1) >= str.Length)
208 { 208 {
209 return Char.MaxValue; 209 return Char.MaxValue;
210 } 210 }
211 211
212 return str[idx + 1]; 212 return str[idx + 1];
213 } 213 }
214 // Very very simple expression parser. Can only match expressions of the form 214 // Very very simple expression parser. Can only match expressions of the form
215 // <var> <op> <value>: 215 // <var> <op> <value>:
216 // OS = Windows 216 // OS = Windows
217 // OS != Linux 217 // OS != Linux
218 // RuntimeMinor > 0 218 // RuntimeMinor > 0
219 private bool ParseExpression(string exp) 219 private bool ParseExpression(string exp)
220 { 220 {
221 if(exp == null) 221 if(exp == null)
222 { 222 {
223 throw new ArgumentException("Invalid expression, cannot be null"); 223 throw new ArgumentException("Invalid expression, cannot be null");
224 } 224 }
225 225
226 exp = exp.Trim(); 226 exp = exp.Trim();
227 if(exp.Length < 1) 227 if(exp.Length < 1)
228 { 228 {
229 throw new ArgumentException("Invalid expression, cannot be 0 length"); 229 throw new ArgumentException("Invalid expression, cannot be 0 length");
230 } 230 }
231 231
232 string id = ""; 232 string id = "";
233 string str = ""; 233 string str = "";
234 OperatorSymbol oper = OperatorSymbol.None; 234 OperatorSymbol oper = OperatorSymbol.None;
235 bool inStr = false; 235 bool inStr = false;
236 236
237 for(int i = 0; i < exp.Length; i++) 237 for(int i = 0; i < exp.Length; i++)
238 { 238 {
239 char c = exp[i]; 239 char c = exp[i];
240 if(Char.IsWhiteSpace(c)) 240 if(Char.IsWhiteSpace(c))
241 { 241 {
242 continue; 242 continue;
243 } 243 }
244 244
245 if(Char.IsLetterOrDigit(c) || c == '_') 245 if(Char.IsLetterOrDigit(c) || c == '_')
246 { 246 {
247 if(inStr) 247 if(inStr)
248 { 248 {
249 str += c; 249 str += c;
250 } 250 }
251 else 251 else
252 { 252 {
253 id += c; 253 id += c;
254 } 254 }
255 } 255 }
256 else if(c == '\"') 256 else if(c == '\"')
257 { 257 {
258 inStr = !inStr; 258 inStr = !inStr;
259 if(inStr) 259 if(inStr)
260 { 260 {
261 str = ""; 261 str = "";
262 } 262 }
263 } 263 }
264 else 264 else
265 { 265 {
266 if(inStr) 266 if(inStr)
267 { 267 {
268 str += c; 268 str += c;
269 } 269 }
270 else 270 else
271 { 271 {
272 switch(c) 272 switch(c)
273 { 273 {
274 case '=': 274 case '=':
275 oper = OperatorSymbol.Equal; 275 oper = OperatorSymbol.Equal;
276 break; 276 break;
277 277
278 case '!': 278 case '!':
279 if(NextChar(i, exp) == '=') 279 if(NextChar(i, exp) == '=')
280 { 280 {
281 oper = OperatorSymbol.NotEqual; 281 oper = OperatorSymbol.NotEqual;
282 } 282 }
283 283
284 break; 284 break;
285 285
286 case '<': 286 case '<':
287 if(NextChar(i, exp) == '=') 287 if(NextChar(i, exp) == '=')
288 { 288 {
289 oper = OperatorSymbol.LessThanEqual; 289 oper = OperatorSymbol.LessThanEqual;
290 } 290 }
291 else 291 else
292 { 292 {
293 oper = OperatorSymbol.LessThan; 293 oper = OperatorSymbol.LessThan;
294 } 294 }
295 295
296 break; 296 break;
297 297
298 case '>': 298 case '>':
299 if(NextChar(i, exp) == '=') 299 if(NextChar(i, exp) == '=')
300 { 300 {
301 oper = OperatorSymbol.GreaterThanEqual; 301 oper = OperatorSymbol.GreaterThanEqual;
302 } 302 }
303 else 303 else
304 { 304 {
305 oper = OperatorSymbol.GreaterThan; 305 oper = OperatorSymbol.GreaterThan;
306 } 306 }
307 307
308 break; 308 break;
309 } 309 }
310 } 310 }
311 } 311 }
312 } 312 }
313 313
314 314
315 if(inStr) 315 if(inStr)
316 { 316 {
317 throw new WarningException("Expected end of string in expression"); 317 throw new WarningException("Expected end of string in expression");
318 } 318 }
319 319
320 if(oper == OperatorSymbol.None) 320 if(oper == OperatorSymbol.None)
321 { 321 {
322 throw new WarningException("Expected operator in expression"); 322 throw new WarningException("Expected operator in expression");
323 } 323 }
324 if(id.Length < 1) 324 if(id.Length < 1)
325 { 325 {
326 throw new WarningException("Expected identifier in expression"); 326 throw new WarningException("Expected identifier in expression");
327 } 327 }
328 if(str.Length < 1) 328 if(str.Length < 1)
329 { 329 {
330 throw new WarningException("Expected value in expression"); 330 throw new WarningException("Expected value in expression");
331 } 331 }
332 332
333 bool ret; 333 bool ret;
334 try 334 try
335 { 335 {
336 object val = m_Variables[id.ToLower()]; 336 object val = m_Variables[id.ToLower()];
337 if(val == null) 337 if(val == null)
338 { 338 {
339 throw new WarningException("Unknown identifier '{0}'", id); 339 throw new WarningException("Unknown identifier '{0}'", id);
340 } 340 }
341 341
342 Type t = val.GetType(); 342 Type t = val.GetType();
343 if(t.IsAssignableFrom(typeof(int))) 343 if(t.IsAssignableFrom(typeof(int)))
344 { 344 {
345 int numVal = (int)val; 345 int numVal = (int)val;
346 int numVal2 = Int32.Parse(str); 346 int numVal2 = Int32.Parse(str);
347 ret = CompareNum(oper, numVal, numVal2); 347 ret = CompareNum(oper, numVal, numVal2);
348 } 348 }
349 else 349 else
350 { 350 {
351 string strVal = val.ToString(); 351 string strVal = val.ToString();
352 string strVal2 = str; 352 string strVal2 = str;
353 ret = CompareStr(oper, strVal, strVal2); 353 ret = CompareStr(oper, strVal, strVal2);
354 } 354 }
355 } 355 }
356 catch(ArgumentException ex) 356 catch(ArgumentException ex)
357 { 357 {
358 ex.ToString(); 358 ex.ToString();
359 throw new WarningException("Invalid value type for system variable '{0}', expected int", id); 359 throw new WarningException("Invalid value type for system variable '{0}', expected int", id);
360 } 360 }
361 361
362 return ret; 362 return ret;
363 } 363 }
364 364
365 /// <summary> 365 /// <summary>
366 /// Taken from current Prebuild included in OpenSim 0.7.x 366 /// Taken from current Prebuild included in OpenSim 0.7.x
@@ -376,13 +376,13 @@ namespace Prebuild.Core.Parse
376 if (!include.Contains ("*")) { 376 if (!include.Contains ("*")) {
377 return; 377 return;
378 } 378 }
379 379
380 // Console.WriteLine("Processing {0}", include); 380 // Console.WriteLine("Processing {0}", include);
381 381
382 // Break up the include into pre and post wildcard sections 382 // Break up the include into pre and post wildcard sections
383 string preWildcard = include.Substring (0, include.IndexOf ("*")); 383 string preWildcard = include.Substring (0, include.IndexOf ("*"));
384 string postWildcard = include.Substring (include.IndexOf ("*") + 2); 384 string postWildcard = include.Substring (include.IndexOf ("*") + 2);
385 385
386 // If preWildcard is a directory, recurse 386 // If preWildcard is a directory, recurse
387 if (Directory.Exists (preWildcard)) { 387 if (Directory.Exists (preWildcard)) {
388 string[] directories = Directory.GetDirectories (preWildcard); 388 string[] directories = Directory.GetDirectories (preWildcard);
@@ -390,7 +390,7 @@ namespace Prebuild.Core.Parse
390 Array.Reverse (directories); 390 Array.Reverse (directories);
391 foreach (string dirPath in directories) { 391 foreach (string dirPath in directories) {
392 //Console.WriteLine ("Scanning : {0}", dirPath); 392 //Console.WriteLine ("Scanning : {0}", dirPath);
393 393
394 string includeFile = Path.Combine (dirPath, postWildcard); 394 string includeFile = Path.Combine (dirPath, postWildcard);
395 if (includeFile.Contains ("*")) { 395 if (includeFile.Contains ("*")) {
396 // postWildcard included another wildcard, recurse. 396 // postWildcard included another wildcard, recurse.
@@ -408,10 +408,10 @@ namespace Prebuild.Core.Parse
408 // preWildcard is not a path to a directory, so the wildcard is in the filename 408 // preWildcard is not a path to a directory, so the wildcard is in the filename
409 string searchFilename = Path.GetFileName (preWildcard.Substring (preWildcard.IndexOf ("/") + 1) + "*" + postWildcard); 409 string searchFilename = Path.GetFileName (preWildcard.Substring (preWildcard.IndexOf ("/") + 1) + "*" + postWildcard);
410 Console.WriteLine ("searchFilename: {0}", searchFilename); 410 Console.WriteLine ("searchFilename: {0}", searchFilename);
411 411
412 string searchDirectory = Path.GetDirectoryName (preWildcard); 412 string searchDirectory = Path.GetDirectoryName (preWildcard);
413 Console.WriteLine ("searchDirectory: {0}", searchDirectory); 413 Console.WriteLine ("searchDirectory: {0}", searchDirectory);
414 414
415 string[] files = Directory.GetFiles (searchDirectory, searchFilename); 415 string[] files = Directory.GetFiles (searchDirectory, searchFilename);
416 Array.Sort (files); 416 Array.Sort (files);
417 Array.Reverse (files); 417 Array.Reverse (files);
@@ -426,227 +426,227 @@ namespace Prebuild.Core.Parse
426 } 426 }
427 } 427 }
428 428
429 #endregion 429 #endregion
430 430
431 #region Public Methods 431 #region Public Methods
432 432
433 /// <summary> 433 /// <summary>
434 /// 434 ///
435 /// </summary> 435 /// </summary>
436 /// <param name="name"></param> 436 /// <param name="name"></param>
437 /// <param name="variableValue"></param> 437 /// <param name="variableValue"></param>
438 public void RegisterVariable(string name, object variableValue) 438 public void RegisterVariable(string name, object variableValue)
439 { 439 {
440 if(name == null || variableValue == null) 440 if(name == null || variableValue == null)
441 { 441 {
442 return; 442 return;
443 } 443 }
444 444
445 m_Variables[name.ToLower()] = variableValue; 445 m_Variables[name.ToLower()] = variableValue;
446 } 446 }
447 447
448 /// <summary> 448 /// <summary>
449 /// Performs validation on the xml source as well as evaluates conditional and flow expresions 449 /// Performs validation on the xml source as well as evaluates conditional and flow expresions
450 /// </summary> 450 /// </summary>
451 /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception> 451 /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception>
452 /// <param name="initialReader"></param> 452 /// <param name="initialReader"></param>
453 /// <returns>the output xml </returns> 453 /// <returns>the output xml </returns>
454 public string Process(XmlReader initialReader) 454 public string Process(XmlReader initialReader)
455 { 455 {
456 if(initialReader == null) 456 if(initialReader == null)
457 { 457 {
458 throw new ArgumentException("Invalid XML reader to pre-process"); 458 throw new ArgumentException("Invalid XML reader to pre-process");
459 } 459 }
460 460
461 IfContext context = new IfContext(true, true, IfState.None); 461 IfContext context = new IfContext(true, true, IfState.None);
462 StringWriter xmlText = new StringWriter(); 462 StringWriter xmlText = new StringWriter();
463 XmlTextWriter writer = new XmlTextWriter(xmlText); 463 XmlTextWriter writer = new XmlTextWriter(xmlText);
464 writer.Formatting = Formatting.Indented; 464 writer.Formatting = Formatting.Indented;
465 465
466 // Create a queue of XML readers and add the initial 466 // Create a queue of XML readers and add the initial
467 // reader to it. Then we process until we run out of 467 // reader to it. Then we process until we run out of
468 // readers which lets the <?include?> operation add more 468 // readers which lets the <?include?> operation add more
469 // readers to generate a multi-file parser and not require 469 // readers to generate a multi-file parser and not require
470 // XML fragments that a recursive version would use. 470 // XML fragments that a recursive version would use.
471 Stack<XmlReader> readerStack = new Stack<XmlReader>(); 471 Stack<XmlReader> readerStack = new Stack<XmlReader>();
472 readerStack.Push(initialReader); 472 readerStack.Push(initialReader);
473 473
474 while(readerStack.Count > 0) 474 while(readerStack.Count > 0)
475 { 475 {
476 // Pop off the next reader. 476 // Pop off the next reader.
477 XmlReader reader = readerStack.Pop(); 477 XmlReader reader = readerStack.Pop();
478 478
479 // Process through this XML reader until it is 479 // Process through this XML reader until it is
480 // completed (or it is replaced by the include 480 // completed (or it is replaced by the include
481 // operation). 481 // operation).
482 while(reader.Read()) 482 while(reader.Read())
483 { 483 {
484 // The prebuild file has a series of processing 484 // The prebuild file has a series of processing
485 // instructions which allow for specific 485 // instructions which allow for specific
486 // inclusions based on operating system or to 486 // inclusions based on operating system or to
487 // include additional files. 487 // include additional files.
488 if(reader.NodeType == XmlNodeType.ProcessingInstruction) 488 if(reader.NodeType == XmlNodeType.ProcessingInstruction)
489 { 489 {
490 bool ignore = false; 490 bool ignore = false;
491 491
492 switch(reader.LocalName) 492 switch(reader.LocalName)
493 { 493 {
494 case "include": 494 case "include":
495 // use regular expressions to parse out the attributes. 495 // use regular expressions to parse out the attributes.
496 MatchCollection matches = includeFileRegex.Matches(reader.Value); 496 MatchCollection matches = includeFileRegex.Matches(reader.Value);
497 497
498 // make sure there is only one file attribute. 498 // make sure there is only one file attribute.
499 if(matches.Count > 1) 499 if(matches.Count > 1)
500 { 500 {
501 throw new WarningException("An <?include ?> node was found, but it specified more than one file."); 501 throw new WarningException("An <?include ?> node was found, but it specified more than one file.");
502 } 502 }
503 503
504 if(matches.Count == 0) 504 if(matches.Count == 0)
505 { 505 {
506 throw new WarningException("An <?include ?> node was found, but it did not specify the file attribute."); 506 throw new WarningException("An <?include ?> node was found, but it did not specify the file attribute.");
507 } 507 }
508 508
509 // ***** Adding for wildcard handling 509 // ***** Adding for wildcard handling
510 // Push current reader back onto the stack. 510 // Push current reader back onto the stack.
511 readerStack.Push (reader); 511 readerStack.Push (reader);
512 512
513 // Pull the file out from the regex and make sure it is a valid file before using it. 513 // Pull the file out from the regex and make sure it is a valid file before using it.
514 string filename = matches[0].Groups[1].Value; 514 string filename = matches[0].Groups[1].Value;
515 515
516 filename = String.Join (Path.DirectorySeparatorChar.ToString (), filename.Split (new char[] { '/', '\\' })); 516 filename = String.Join (Path.DirectorySeparatorChar.ToString (), filename.Split (new char[] { '/', '\\' }));
517 517
518 if (!filename.Contains ("*")) { 518 if (!filename.Contains ("*")) {
519 519
520 FileInfo includeFile = new FileInfo (filename); 520 FileInfo includeFile = new FileInfo (filename);
521 if (!includeFile.Exists) { 521 if (!includeFile.Exists) {
522 throw new WarningException ("Cannot include file: " + includeFile.FullName); 522 throw new WarningException ("Cannot include file: " + includeFile.FullName);
523 } 523 }
524 524
525 // Create a new reader object for this file. Then put the old reader back on the stack and start 525 // Create a new reader object for this file. Then put the old reader back on the stack and start
526 // processing using this new XML reader. 526 // processing using this new XML reader.
527 527
528 XmlReader newReader = new XmlTextReader (includeFile.Open (FileMode.Open, FileAccess.Read, FileShare.Read)); 528 XmlReader newReader = new XmlTextReader (includeFile.Open (FileMode.Open, FileAccess.Read, FileShare.Read));
529 reader = newReader; 529 reader = newReader;
530 readerStack.Push (reader); 530 readerStack.Push (reader);
531 531
532 } else { 532 } else {
533 WildCardInclude (readerStack, filename); 533 WildCardInclude (readerStack, filename);
534 } 534 }
535 535
536 reader = (XmlReader)readerStack.Pop (); 536 reader = (XmlReader)readerStack.Pop ();
537 ignore = true; 537 ignore = true;
538 break; 538 break;
539 539
540 case "if": 540 case "if":
541 m_IfStack.Push(context); 541 m_IfStack.Push(context);
542 context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If); 542 context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If);
543 ignore = true; 543 ignore = true;
544 break; 544 break;
545 545
546 case "elseif": 546 case "elseif":
547 if(m_IfStack.Count == 0) 547 if(m_IfStack.Count == 0)
548 { 548 {
549 throw new WarningException("Unexpected 'elseif' outside of 'if'"); 549 throw new WarningException("Unexpected 'elseif' outside of 'if'");
550 } 550 }
551 if(context.State != IfState.If && context.State != IfState.ElseIf) 551 if(context.State != IfState.If && context.State != IfState.ElseIf)
552 { 552 {
553 throw new WarningException("Unexpected 'elseif' outside of 'if'"); 553 throw new WarningException("Unexpected 'elseif' outside of 'if'");
554 } 554 }
555 555
556 context.State = IfState.ElseIf; 556 context.State = IfState.ElseIf;
557 if(!context.EverKept) 557 if(!context.EverKept)
558 { 558 {
559 context.Keep = ParseExpression(reader.Value); 559 context.Keep = ParseExpression(reader.Value);
560 } 560 }
561 else 561 else
562 { 562 {
563 context.Keep = false; 563 context.Keep = false;
564 } 564 }
565 565
566 ignore = true; 566 ignore = true;
567 break; 567 break;
568 568
569 case "else": 569 case "else":
570 if(m_IfStack.Count == 0) 570 if(m_IfStack.Count == 0)
571 { 571 {
572 throw new WarningException("Unexpected 'else' outside of 'if'"); 572 throw new WarningException("Unexpected 'else' outside of 'if'");
573 } 573 }
574 if(context.State != IfState.If && context.State != IfState.ElseIf) 574 if(context.State != IfState.If && context.State != IfState.ElseIf)
575 { 575 {
576 throw new WarningException("Unexpected 'else' outside of 'if'"); 576 throw new WarningException("Unexpected 'else' outside of 'if'");
577 } 577 }
578 578
579 context.State = IfState.Else; 579 context.State = IfState.Else;
580 context.Keep = !context.EverKept; 580 context.Keep = !context.EverKept;
581 ignore = true; 581 ignore = true;
582 break; 582 break;
583 583
584 case "endif": 584 case "endif":
585 if(m_IfStack.Count == 0) 585 if(m_IfStack.Count == 0)
586 { 586 {
587 throw new WarningException("Unexpected 'endif' outside of 'if'"); 587 throw new WarningException("Unexpected 'endif' outside of 'if'");
588 } 588 }
589 589
590 context = m_IfStack.Pop(); 590 context = m_IfStack.Pop();
591 ignore = true; 591 ignore = true;
592 break; 592 break;
593 } 593 }
594 594
595 if(ignore) 595 if(ignore)
596 { 596 {
597 continue; 597 continue;
598 } 598 }
599 }//end pre-proc instruction 599 }//end pre-proc instruction
600 600
601 if(!context.Active || !context.Keep) 601 if(!context.Active || !context.Keep)
602 { 602 {
603 continue; 603 continue;
604 } 604 }
605 605
606 switch(reader.NodeType) 606 switch(reader.NodeType)
607 { 607 {
608 case XmlNodeType.Element: 608 case XmlNodeType.Element:
609 bool empty = reader.IsEmptyElement; 609 bool empty = reader.IsEmptyElement;
610 writer.WriteStartElement(reader.Name); 610 writer.WriteStartElement(reader.Name);
611 611
612 while (reader.MoveToNextAttribute()) 612 while (reader.MoveToNextAttribute())
613 { 613 {
614 writer.WriteAttributeString(reader.Name, reader.Value); 614 writer.WriteAttributeString(reader.Name, reader.Value);
615 } 615 }
616 616
617 if(empty) 617 if(empty)
618 { 618 {
619 writer.WriteEndElement(); 619 writer.WriteEndElement();
620 } 620 }
621 621
622 break; 622 break;
623 623
624 case XmlNodeType.EndElement: 624 case XmlNodeType.EndElement:
625 writer.WriteEndElement(); 625 writer.WriteEndElement();
626 break; 626 break;
627 627
628 case XmlNodeType.Text: 628 case XmlNodeType.Text:
629 writer.WriteString(reader.Value); 629 writer.WriteString(reader.Value);
630 break; 630 break;
631 631
632 case XmlNodeType.CDATA: 632 case XmlNodeType.CDATA:
633 writer.WriteCData(reader.Value); 633 writer.WriteCData(reader.Value);
634 break; 634 break;
635 635
636 default: 636 default:
637 break; 637 break;
638 } 638 }
639 } 639 }
640 640
641 if(m_IfStack.Count != 0) 641 if(m_IfStack.Count != 0)
642 { 642 {
643 throw new WarningException("Mismatched 'if', 'endif' pair"); 643 throw new WarningException("Mismatched 'if', 'endif' pair");
644 } 644 }
645 } 645 }
646 646
647 return xmlText.ToString(); 647 return xmlText.ToString();
648 } 648 }
649 649
650 #endregion 650 #endregion
651 } 651 }
652} 652}
diff --git a/Prebuild/src/Core/Targets/AutotoolsTarget.cs b/Prebuild/src/Core/Targets/AutotoolsTarget.cs
index 485e4dd..c52c4f1 100644
--- a/Prebuild/src/Core/Targets/AutotoolsTarget.cs
+++ b/Prebuild/src/Core/Targets/AutotoolsTarget.cs
@@ -51,10 +51,10 @@ POSSIBILITY OF SUCH DAMAGE.
51 distribute, sublicense, and/or sell copies of the Software, and to 51 distribute, sublicense, and/or sell copies of the Software, and to
52 permit persons to whom the Software is furnished to do so, subject to 52 permit persons to whom the Software is furnished to do so, subject to
53 the following conditions: 53 the following conditions:
54 54
55 The above copyright notice and this permission notice shall be 55 The above copyright notice and this permission notice shall be
56 included in all copies or substantial portions of the Software. 56 included in all copies or substantial portions of the Software.
57 57
58 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 58 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
59 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 59 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
60 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 60 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -156,7 +156,7 @@ namespace Prebuild.Core.Targets
156 156
157 157
158 /// <summary> 158 /// <summary>
159 /// 159 ///
160 /// </summary> 160 /// </summary>
161 [Target("autotools")] 161 [Target("autotools")]
162 public class AutotoolsTarget : ITarget 162 public class AutotoolsTarget : ITarget
@@ -650,7 +650,7 @@ namespace Prebuild.Core.Targets
650 string tempAssemblyFile = Path.Combine(Path.GetTempPath(), project.Name + "-temp.dll"); 650 string tempAssemblyFile = Path.Combine(Path.GetTempPath(), project.Name + "-temp.dll");
651 System.CodeDom.Compiler.CompilerParameters cparam = 651 System.CodeDom.Compiler.CompilerParameters cparam =
652 new System.CodeDom.Compiler.CompilerParameters(args, tempAssemblyFile); 652 new System.CodeDom.Compiler.CompilerParameters(args, tempAssemblyFile);
653 653
654 System.CodeDom.Compiler.CompilerResults cr = 654 System.CodeDom.Compiler.CompilerResults cr =
655 cscp.CompileAssemblyFromFile(cparam, sources); 655 cscp.CompileAssemblyFromFile(cparam, sources);
656 656
@@ -673,11 +673,11 @@ namespace Prebuild.Core.Targets
673 if (File.Exists(tempAssemblyFile)) 673 if (File.Exists(tempAssemblyFile))
674 File.Delete(tempAssemblyFile); 674 File.Delete(tempAssemblyFile);
675 } 675 }
676 catch 676 catch
677 { 677 {
678 Console.WriteLine("Error! '{0}'", e); 678 Console.WriteLine("Error! '{0}'", e);
679 } 679 }
680 680
681 } 681 }
682 682
683 // Tell the user if there's a problem copying the file 683 // Tell the user if there's a problem copying the file
@@ -977,7 +977,7 @@ namespace Prebuild.Core.Targets
977 977
978 if(autotoolsStream == null) { 978 if(autotoolsStream == null) {
979 979
980 /* 980 /*
981 * try without the default namespace prepended, in 981 * try without the default namespace prepended, in
982 * case prebuild.exe assembly was compiled with 982 * case prebuild.exe assembly was compiled with
983 * something other than Visual Studio .NET 983 * something other than Visual Studio .NET
diff --git a/Prebuild/src/Core/Targets/DebugTarget.cs b/Prebuild/src/Core/Targets/DebugTarget.cs
index d78064f..be8aea9 100644
--- a/Prebuild/src/Core/Targets/DebugTarget.cs
+++ b/Prebuild/src/Core/Targets/DebugTarget.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -41,62 +41,62 @@ using Prebuild.Core.Nodes;
41#if (DEBUG && _DEBUG_TARGET) 41#if (DEBUG && _DEBUG_TARGET)
42namespace Prebuild.Core.Targets 42namespace Prebuild.Core.Targets
43{ 43{
44 [Target("debug")] 44 [Target("debug")]
45 public class DebugTarget : ITarget 45 public class DebugTarget : ITarget
46 { 46 {
47#region Fields 47#region Fields
48 48
49 private Kernel m_Kernel = null; 49 private Kernel m_Kernel = null;
50 50
51#endregion 51#endregion
52 52
53#region ITarget Members 53#region ITarget Members
54 54
55 public void Write() 55 public void Write()
56 { 56 {
57 foreach(SolutionNode s in m_Kernel.Solutions) 57 foreach(SolutionNode s in m_Kernel.Solutions)
58 { 58 {
59 Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path); 59 Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path);
60 foreach(string file in s.Files) 60 foreach(string file in s.Files)
61{ 61{
62 Console.WriteLine("\tFile [ {0} ]", file); 62 Console.WriteLine("\tFile [ {0} ]", file);
63} 63}
64 64
65 foreach(ProjectNode proj in s.Projects) 65 foreach(ProjectNode proj in s.Projects)
66 { 66 {
67 Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language); 67 Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language);
68 foreach(string file in proj.Files) 68 foreach(string file in proj.Files)
69 Console.WriteLine("\t\tFile [ {0} ]", file); 69 Console.WriteLine("\t\tFile [ {0} ]", file);
70 } 70 }
71 } 71 }
72 } 72 }
73 73
74 public void Clean() 74 public void Clean()
75 { 75 {
76 Console.WriteLine("Not implemented"); 76 Console.WriteLine("Not implemented");
77 } 77 }
78 78
79 public string Name 79 public string Name
80 { 80 {
81 get 81 get
82 { 82 {
83 return "debug"; 83 return "debug";
84 } 84 }
85 } 85 }
86 86
87 public Kernel Kernel 87 public Kernel Kernel
88 { 88 {
89 get 89 get
90 { 90 {
91 return m_Kernel; 91 return m_Kernel;
92 } 92 }
93 set 93 set
94 { 94 {
95 m_Kernel = value; 95 m_Kernel = value;
96 } 96 }
97 } 97 }
98 98
99#endregion 99#endregion
100 } 100 }
101} 101}
102#endif 102#endif
diff --git a/Prebuild/src/Core/Targets/MakefileTarget.cs b/Prebuild/src/Core/Targets/MakefileTarget.cs
index 54046dd..8fe1c44 100644
--- a/Prebuild/src/Core/Targets/MakefileTarget.cs
+++ b/Prebuild/src/Core/Targets/MakefileTarget.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004 Crestez Leonard (cleonard@go.ro)
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
diff --git a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
index ea6d2c2..85fe2db 100644
--- a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
+++ b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (da
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -35,481 +35,481 @@ using Prebuild.Core.Utilities;
35 35
36namespace Prebuild.Core.Targets 36namespace Prebuild.Core.Targets
37{ 37{
38 /// <summary> 38 /// <summary>
39 /// 39 ///
40 /// </summary> 40 /// </summary>
41 [Target("monodev")] 41 [Target("monodev")]
42 public class MonoDevelopTarget : ITarget 42 public class MonoDevelopTarget : ITarget
43 { 43 {
44 #region Fields 44 #region Fields
45 45
46 private Kernel m_Kernel; 46 private Kernel m_Kernel;
47 47
48 #endregion 48 #endregion
49 49
50 #region Private Methods 50 #region Private Methods
51 51
52 private static string PrependPath(string path) 52 private static string PrependPath(string path)
53 { 53 {
54 string tmpPath = Helper.NormalizePath(path, '/'); 54 string tmpPath = Helper.NormalizePath(path, '/');
55 Regex regex = new Regex(@"(\w):/(\w+)"); 55 Regex regex = new Regex(@"(\w):/(\w+)");
56 Match match = regex.Match(tmpPath); 56 Match match = regex.Match(tmpPath);
57 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 57 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
58 { 58 {
59 tmpPath = Helper.NormalizePath(tmpPath); 59 tmpPath = Helper.NormalizePath(tmpPath);
60 } 60 }
61 else 61 else
62 { 62 {
63 tmpPath = Helper.NormalizePath("./" + tmpPath); 63 tmpPath = Helper.NormalizePath("./" + tmpPath);
64 } 64 }
65 65
66 return tmpPath; 66 return tmpPath;
67 } 67 }
68 68
69 private static string BuildReference(SolutionNode solution, ReferenceNode refr) 69 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
70 { 70 {
71 string ret = "<ProjectReference type=\""; 71 string ret = "<ProjectReference type=\"";
72 if(solution.ProjectsTable.ContainsKey(refr.Name)) 72 if(solution.ProjectsTable.ContainsKey(refr.Name))
73 { 73 {
74 ret += "Project\""; 74 ret += "Project\"";
75 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />"; 75 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />";
76 } 76 }
77 else 77 else
78 { 78 {
79 ProjectNode project = (ProjectNode)refr.Parent; 79 ProjectNode project = (ProjectNode)refr.Parent;
80 string fileRef = FindFileReference(refr.Name, project); 80 string fileRef = FindFileReference(refr.Name, project);
81 81
82 if(refr.Path != null || fileRef != null) 82 if(refr.Path != null || fileRef != null)
83 { 83 {
84 ret += "Assembly\" refto=\""; 84 ret += "Assembly\" refto=\"";
85 85
86 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef; 86 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
87 87
88 ret += finalPath; 88 ret += finalPath;
89 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 89 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
90 return ret; 90 return ret;
91 } 91 }
92 92
93 ret += "Gac\""; 93 ret += "Gac\"";
94 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\""; 94 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\"";
95 ret += " refto=\""; 95 ret += " refto=\"";
96 try 96 try
97 { 97 {
98 /* 98 /*
99 Day changed to 28 Mar 2007 99 Day changed to 28 Mar 2007
100 ... 100 ...
101 08:09 < cj> is there anything that replaces Assembly.LoadFromPartialName() ? 101 08:09 < cj> is there anything that replaces Assembly.LoadFromPartialName() ?
102 08:09 < jonp> no 102 08:09 < jonp> no
103 08:10 < jonp> in their infinite wisdom [sic], microsoft decided that the 103 08:10 < jonp> in their infinite wisdom [sic], microsoft decided that the
104 ability to load any assembly version by-name was an inherently 104 ability to load any assembly version by-name was an inherently
105 bad idea 105 bad idea
106 08:11 < cj> I'm thinking of a bunch of four-letter words right now... 106 08:11 < cj> I'm thinking of a bunch of four-letter words right now...
107 08:11 < cj> security through making it difficult for the developer!!! 107 08:11 < cj> security through making it difficult for the developer!!!
108 08:12 < jonp> just use the Obsolete API 108 08:12 < jonp> just use the Obsolete API
109 08:12 < jonp> it should still work 109 08:12 < jonp> it should still work
110 08:12 < cj> alrighty. 110 08:12 < cj> alrighty.
111 08:12 < jonp> you just get warnings when using it 111 08:12 < jonp> you just get warnings when using it
112 */ 112 */
113 Assembly assem = Assembly.LoadWithPartialName(refr.Name); 113 Assembly assem = Assembly.LoadWithPartialName(refr.Name);
114 ret += assem.FullName; 114 ret += assem.FullName;
115 //ret += refr.Name; 115 //ret += refr.Name;
116 } 116 }
117 catch (System.NullReferenceException e) 117 catch (System.NullReferenceException e)
118 { 118 {
119 e.ToString(); 119 e.ToString();
120 ret += refr.Name; 120 ret += refr.Name;
121 } 121 }
122 ret += "\" />"; 122 ret += "\" />";
123 } 123 }
124 124
125 return ret; 125 return ret;
126 } 126 }
127 127
128 private static string FindFileReference(string refName, ProjectNode project) 128 private static string FindFileReference(string refName, ProjectNode project)
129 { 129 {
130 foreach(ReferencePathNode refPath in project.ReferencePaths) 130 foreach(ReferencePathNode refPath in project.ReferencePaths)
131 { 131 {
132 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 132 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
133 133
134 if(File.Exists(fullPath)) 134 if(File.Exists(fullPath))
135 { 135 {
136 return fullPath; 136 return fullPath;
137 } 137 }
138 } 138 }
139 139
140 return null; 140 return null;
141 } 141 }
142 142
143 /// <summary> 143 /// <summary>
144 /// Gets the XML doc file. 144 /// Gets the XML doc file.
145 /// </summary> 145 /// </summary>
146 /// <param name="project">The project.</param> 146 /// <param name="project">The project.</param>
147 /// <param name="conf">The conf.</param> 147 /// <param name="conf">The conf.</param>
148 /// <returns></returns> 148 /// <returns></returns>
149 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf) 149 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
150 { 150 {
151 if( conf == null ) 151 if( conf == null )
152 { 152 {
153 throw new ArgumentNullException("conf"); 153 throw new ArgumentNullException("conf");
154 } 154 }
155 if( project == null ) 155 if( project == null )
156 { 156 {
157 throw new ArgumentNullException("project"); 157 throw new ArgumentNullException("project");
158 } 158 }
159 string docFile = (string)conf.Options["XmlDocFile"]; 159 string docFile = (string)conf.Options["XmlDocFile"];
160 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 160 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
161 { 161 {
162 return "False"; 162 return "False";
163 } 163 }
164 return "True"; 164 return "True";
165 } 165 }
166 166
167 private void WriteProject(SolutionNode solution, ProjectNode project) 167 private void WriteProject(SolutionNode solution, ProjectNode project)
168 { 168 {
169 string csComp = "Mcs"; 169 string csComp = "Mcs";
170 string netRuntime = "Mono"; 170 string netRuntime = "Mono";
171 if(project.Runtime == ClrRuntime.Microsoft) 171 if(project.Runtime == ClrRuntime.Microsoft)
172 { 172 {
173 csComp = "Csc"; 173 csComp = "Csc";
174 netRuntime = "MsNet"; 174 netRuntime = "MsNet";
175 } 175 }
176 176
177 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp"); 177 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
178 StreamWriter ss = new StreamWriter(projFile); 178 StreamWriter ss = new StreamWriter(projFile);
179 179
180 m_Kernel.CurrentWorkingDirectory.Push(); 180 m_Kernel.CurrentWorkingDirectory.Push();
181 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 181 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
182 182
183 using(ss) 183 using(ss)
184 { 184 {
185 ss.WriteLine( 185 ss.WriteLine(
186 "<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">", 186 "<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">",
187 project.Name, 187 project.Name,
188 project.RootNamespace 188 project.RootNamespace
189 ); 189 );
190 190
191 int count = 0; 191 int count = 0;
192 192
193 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig); 193 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
194 194
195 foreach(ConfigurationNode conf in project.Configurations) 195 foreach(ConfigurationNode conf in project.Configurations)
196 { 196 {
197 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name); 197 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name);
198 ss.Write(" <Output"); 198 ss.Write(" <Output");
199 ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString()))); 199 ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString())));
200 ss.Write(" assembly=\"{0}\"", project.AssemblyName); 200 ss.Write(" assembly=\"{0}\"", project.AssemblyName);
201 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]); 201 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
202 //ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); 202 //ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
203 //ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); 203 //ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
204 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) 204 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
205 { 205 {
206 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); 206 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
207 } 207 }
208 else 208 else
209 { 209 {
210 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); 210 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
211 } 211 }
212 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) 212 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
213 { 213 {
214 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); 214 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
215 } 215 }
216 else 216 else
217 { 217 {
218 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); 218 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
219 } 219 }
220 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 220 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
221 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 221 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
222 ss.WriteLine(" />"); 222 ss.WriteLine(" />");
223 223
224 ss.Write(" <Build"); 224 ss.Write(" <Build");
225 ss.Write(" debugmode=\"True\""); 225 ss.Write(" debugmode=\"True\"");
226 if (project.Type == ProjectType.WinExe) 226 if (project.Type == ProjectType.WinExe)
227 { 227 {
228 ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString()); 228 ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString());
229 } 229 }
230 else 230 else
231 { 231 {
232 ss.Write(" target=\"{0}\"", project.Type); 232 ss.Write(" target=\"{0}\"", project.Type);
233 } 233 }
234 ss.WriteLine(" />"); 234 ss.WriteLine(" />");
235 235
236 ss.Write(" <Execution"); 236 ss.Write(" <Execution");
237 ss.Write(" runwithwarnings=\"{0}\"", !conf.Options.WarningsAsErrors); 237 ss.Write(" runwithwarnings=\"{0}\"", !conf.Options.WarningsAsErrors);
238 ss.Write(" consolepause=\"True\""); 238 ss.Write(" consolepause=\"True\"");
239 ss.Write(" runtime=\"{0}\"", netRuntime); 239 ss.Write(" runtime=\"{0}\"", netRuntime);
240 ss.Write(" clr-version=\"Net_2_0\""); 240 ss.Write(" clr-version=\"Net_2_0\"");
241 ss.WriteLine(" />"); 241 ss.WriteLine(" />");
242 242
243 ss.Write(" <CodeGeneration"); 243 ss.Write(" <CodeGeneration");
244 ss.Write(" compiler=\"{0}\"", csComp); 244 ss.Write(" compiler=\"{0}\"", csComp);
245 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]); 245 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
246 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]); 246 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
247 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]); 247 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
248 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]); 248 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
249 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]); 249 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
250 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]); 250 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
251 ss.Write(" mainclass=\"{0}\"", project.StartupObject); 251 ss.Write(" mainclass=\"{0}\"", project.StartupObject);
252 ss.Write(" target=\"{0}\"", project.Type); 252 ss.Write(" target=\"{0}\"", project.Type);
253 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]); 253 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
254 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf)); 254 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
255 ss.Write(" win32Icon=\"{0}\"", project.AppIcon); 255 ss.Write(" win32Icon=\"{0}\"", project.AppIcon);
256 ss.Write(" ctype=\"CSharpCompilerParameters\""); 256 ss.Write(" ctype=\"CSharpCompilerParameters\"");
257 ss.WriteLine(" />"); 257 ss.WriteLine(" />");
258 ss.WriteLine(" </Configuration>"); 258 ss.WriteLine(" </Configuration>");
259 259
260 count++; 260 count++;
261 } 261 }
262 ss.WriteLine(" </Configurations>"); 262 ss.WriteLine(" </Configurations>");
263 263
264 ss.Write(" <DeploymentInformation"); 264 ss.Write(" <DeploymentInformation");
265 ss.Write(" target=\"\""); 265 ss.Write(" target=\"\"");
266 ss.Write(" script=\"\""); 266 ss.Write(" script=\"\"");
267 ss.Write(" strategy=\"File\""); 267 ss.Write(" strategy=\"File\"");
268 ss.WriteLine(">"); 268 ss.WriteLine(">");
269 ss.WriteLine(" <excludeFiles />"); 269 ss.WriteLine(" <excludeFiles />");
270 ss.WriteLine(" </DeploymentInformation>"); 270 ss.WriteLine(" </DeploymentInformation>");
271 271
272 ss.WriteLine(" <Contents>"); 272 ss.WriteLine(" <Contents>");
273 foreach(string file in project.Files) 273 foreach(string file in project.Files)
274 { 274 {
275 string buildAction; 275 string buildAction;
276 string dependson = ""; 276 string dependson = "";
277 string resource_id = ""; 277 string resource_id = "";
278 string copyToOutput = ""; 278 string copyToOutput = "";
279 279
280 switch(project.Files.GetBuildAction(file)) 280 switch(project.Files.GetBuildAction(file))
281 { 281 {
282 case BuildAction.None: 282 case BuildAction.None:
283 buildAction = "Nothing"; 283 buildAction = "Nothing";
284 break; 284 break;
285 285
286 case BuildAction.Content: 286 case BuildAction.Content:
287 buildAction = "Exclude"; 287 buildAction = "Exclude";
288 break; 288 break;
289 289
290 case BuildAction.EmbeddedResource: 290 case BuildAction.EmbeddedResource:
291 buildAction = "EmbedAsResource"; 291 buildAction = "EmbedAsResource";
292 break; 292 break;
293 293
294 default: 294 default:
295 buildAction = "Compile"; 295 buildAction = "Compile";
296 break; 296 break;
297 } 297 }
298 298
299 if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never) 299 if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never)
300 buildAction = "FileCopy"; 300 buildAction = "FileCopy";
301 301
302 // Sort of a hack, we try and resolve the path and make it relative, if we can. 302 // Sort of a hack, we try and resolve the path and make it relative, if we can.
303 string extension = Path.GetExtension(file); 303 string extension = Path.GetExtension(file);
304 string designer_format = string.Format(".Designer{0}", extension); 304 string designer_format = string.Format(".Designer{0}", extension);
305 305
306 if (file.EndsWith(designer_format)) 306 if (file.EndsWith(designer_format))
307 { 307 {
308 string basename = file.Substring(0, file.LastIndexOf(designer_format)); 308 string basename = file.Substring(0, file.LastIndexOf(designer_format));
309 string[] extensions = new string[] { ".cs", ".resx", ".settings" }; 309 string[] extensions = new string[] { ".cs", ".resx", ".settings" };
310 310
311 foreach(string ext in extensions) 311 foreach(string ext in extensions)
312 { 312 {
313 if (project.Files.Contains(basename + ext)) 313 if (project.Files.Contains(basename + ext))
314 { 314 {
315 dependson = string.Format(" dependson=\"{0}{1}\"", basename, ext); 315 dependson = string.Format(" dependson=\"{0}{1}\"", basename, ext);
316 break; 316 break;
317 } 317 }
318 } 318 }
319 } 319 }
320 if (extension == ".resx") 320 if (extension == ".resx")
321 { 321 {
322 buildAction = "EmbedAsResource"; 322 buildAction = "EmbedAsResource";
323 string basename = file.Substring(0, file.LastIndexOf(".resx")); 323 string basename = file.Substring(0, file.LastIndexOf(".resx"));
324 324
325 // Visual Studio type resx + form dependency 325 // Visual Studio type resx + form dependency
326 if (project.Files.Contains(basename + ".cs")) 326 if (project.Files.Contains(basename + ".cs"))
327 { 327 {
328 dependson = string.Format(" dependson=\"{0}{1}\"", basename, ".cs"); 328 dependson = string.Format(" dependson=\"{0}{1}\"", basename, ".cs");
329 } 329 }
330 330
331 // We need to specify a resources file name to avoid MissingManifestResourceExceptions 331 // We need to specify a resources file name to avoid MissingManifestResourceExceptions
332 // in libraries that are built. 332 // in libraries that are built.
333 resource_id = string.Format(" resource_id=\"{0}.{1}.resources\"", 333 resource_id = string.Format(" resource_id=\"{0}.{1}.resources\"",
334 project.AssemblyName, basename.Replace("/", ".")); 334 project.AssemblyName, basename.Replace("/", "."));
335 } 335 }
336 336
337 switch(project.Files.GetCopyToOutput(file)) 337 switch(project.Files.GetCopyToOutput(file))
338 { 338 {
339 case CopyToOutput.Always: 339 case CopyToOutput.Always:
340 copyToOutput = string.Format(" copyToOutputDirectory=\"Always\""); 340 copyToOutput = string.Format(" copyToOutputDirectory=\"Always\"");
341 break; 341 break;
342 case CopyToOutput.PreserveNewest: 342 case CopyToOutput.PreserveNewest:
343 copyToOutput = string.Format(" copyToOutputDirectory=\"PreserveNewest\""); 343 copyToOutput = string.Format(" copyToOutputDirectory=\"PreserveNewest\"");
344 break; 344 break;
345 } 345 }
346 346
347 // Sort of a hack, we try and resolve the path and make it relative, if we can. 347 // Sort of a hack, we try and resolve the path and make it relative, if we can.
348 string filePath = PrependPath(file); 348 string filePath = PrependPath(file);
349 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\"{2}{3}{4} />", 349 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\"{2}{3}{4} />",
350 filePath, buildAction, dependson, resource_id, copyToOutput); 350 filePath, buildAction, dependson, resource_id, copyToOutput);
351 } 351 }
352 ss.WriteLine(" </Contents>"); 352 ss.WriteLine(" </Contents>");
353 353
354 ss.WriteLine(" <References>"); 354 ss.WriteLine(" <References>");
355 foreach(ReferenceNode refr in project.References) 355 foreach(ReferenceNode refr in project.References)
356 { 356 {
357 ss.WriteLine(" {0}", BuildReference(solution, refr)); 357 ss.WriteLine(" {0}", BuildReference(solution, refr));
358 } 358 }
359 ss.WriteLine(" </References>"); 359 ss.WriteLine(" </References>");
360 360
361 361
362 ss.WriteLine("</Project>"); 362 ss.WriteLine("</Project>");
363 } 363 }
364 364
365 m_Kernel.CurrentWorkingDirectory.Pop(); 365 m_Kernel.CurrentWorkingDirectory.Pop();
366 } 366 }
367 367
368 private void WriteCombine(SolutionNode solution) 368 private void WriteCombine(SolutionNode solution)
369 { 369 {
370 m_Kernel.Log.Write("Creating MonoDevelop combine and project files"); 370 m_Kernel.Log.Write("Creating MonoDevelop combine and project files");
371 foreach(ProjectNode project in solution.Projects) 371 foreach(ProjectNode project in solution.Projects)
372 { 372 {
373 if(m_Kernel.AllowProject(project.FilterGroups)) 373 if(m_Kernel.AllowProject(project.FilterGroups))
374 { 374 {
375 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 375 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
376 WriteProject(solution, project); 376 WriteProject(solution, project);
377 } 377 }
378 } 378 }
379 379
380 m_Kernel.Log.Write(""); 380 m_Kernel.Log.Write("");
381 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds"); 381 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
382 StreamWriter ss = new StreamWriter(combFile); 382 StreamWriter ss = new StreamWriter(combFile);
383 383
384 m_Kernel.CurrentWorkingDirectory.Push(); 384 m_Kernel.CurrentWorkingDirectory.Push();
385 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 385 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
386 386
387 int count = 0; 387 int count = 0;
388 388
389 using(ss) 389 using(ss)
390 { 390 {
391 ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name); 391 ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name);
392 392
393 count = 0; 393 count = 0;
394 foreach(ConfigurationNode conf in solution.Configurations) 394 foreach(ConfigurationNode conf in solution.Configurations)
395 { 395 {
396 if(count == 0) 396 if(count == 0)
397 { 397 {
398 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name); 398 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
399 } 399 }
400 400
401 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name); 401 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name);
402 foreach(ProjectNode project in solution.Projects) 402 foreach(ProjectNode project in solution.Projects)
403 { 403 {
404 ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name); 404 ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name);
405 } 405 }
406 ss.WriteLine(" </Configuration>"); 406 ss.WriteLine(" </Configuration>");
407 407
408 count++; 408 count++;
409 } 409 }
410 ss.WriteLine(" </Configurations>"); 410 ss.WriteLine(" </Configurations>");
411 411
412 count = 0; 412 count = 0;
413 413
414 foreach(ProjectNode project in solution.Projects) 414 foreach(ProjectNode project in solution.Projects)
415 { 415 {
416 if(count == 0) 416 if(count == 0)
417 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name); 417 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
418 418
419 ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name); 419 ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name);
420 count++; 420 count++;
421 } 421 }
422 ss.WriteLine(" </StartMode>"); 422 ss.WriteLine(" </StartMode>");
423 423
424 ss.WriteLine(" <Entries>"); 424 ss.WriteLine(" <Entries>");
425 foreach(ProjectNode project in solution.Projects) 425 foreach(ProjectNode project in solution.Projects)
426 { 426 {
427 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 427 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
428 ss.WriteLine(" <Entry filename=\"{0}\" />", 428 ss.WriteLine(" <Entry filename=\"{0}\" />",
429 Helper.MakeFilePath(path, project.Name, "mdp")); 429 Helper.MakeFilePath(path, project.Name, "mdp"));
430 } 430 }
431 ss.WriteLine(" </Entries>"); 431 ss.WriteLine(" </Entries>");
432 432
433 ss.WriteLine("</Combine>"); 433 ss.WriteLine("</Combine>");
434 } 434 }
435 435
436 m_Kernel.CurrentWorkingDirectory.Pop(); 436 m_Kernel.CurrentWorkingDirectory.Pop();
437 } 437 }
438 438
439 private void CleanProject(ProjectNode project) 439 private void CleanProject(ProjectNode project)
440 { 440 {
441 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 441 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
442 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp"); 442 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
443 Helper.DeleteIfExists(projectFile); 443 Helper.DeleteIfExists(projectFile);
444 } 444 }
445 445
446 private void CleanSolution(SolutionNode solution) 446 private void CleanSolution(SolutionNode solution)
447 { 447 {
448 m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name); 448 m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name);
449 449
450 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds"); 450 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
451 Helper.DeleteIfExists(slnFile); 451 Helper.DeleteIfExists(slnFile);
452 452
453 foreach(ProjectNode project in solution.Projects) 453 foreach(ProjectNode project in solution.Projects)
454 { 454 {
455 CleanProject(project); 455 CleanProject(project);
456 } 456 }
457 457
458 m_Kernel.Log.Write(""); 458 m_Kernel.Log.Write("");
459 } 459 }
460 460
461 #endregion 461 #endregion
462 462
463 #region ITarget Members 463 #region ITarget Members
464 464
465 /// <summary> 465 /// <summary>
466 /// Writes the specified kern. 466 /// Writes the specified kern.
467 /// </summary> 467 /// </summary>
468 /// <param name="kern">The kern.</param> 468 /// <param name="kern">The kern.</param>
469 public void Write(Kernel kern) 469 public void Write(Kernel kern)
470 { 470 {
471 if( kern == null ) 471 if( kern == null )
472 { 472 {
473 throw new ArgumentNullException("kern"); 473 throw new ArgumentNullException("kern");
474 } 474 }
475 m_Kernel = kern; 475 m_Kernel = kern;
476 foreach(SolutionNode solution in kern.Solutions) 476 foreach(SolutionNode solution in kern.Solutions)
477 { 477 {
478 WriteCombine(solution); 478 WriteCombine(solution);
479 } 479 }
480 m_Kernel = null; 480 m_Kernel = null;
481 } 481 }
482 482
483 /// <summary> 483 /// <summary>
484 /// Cleans the specified kern. 484 /// Cleans the specified kern.
485 /// </summary> 485 /// </summary>
486 /// <param name="kern">The kern.</param> 486 /// <param name="kern">The kern.</param>
487 public virtual void Clean(Kernel kern) 487 public virtual void Clean(Kernel kern)
488 { 488 {
489 if( kern == null ) 489 if( kern == null )
490 { 490 {
491 throw new ArgumentNullException("kern"); 491 throw new ArgumentNullException("kern");
492 } 492 }
493 m_Kernel = kern; 493 m_Kernel = kern;
494 foreach(SolutionNode sol in kern.Solutions) 494 foreach(SolutionNode sol in kern.Solutions)
495 { 495 {
496 CleanSolution(sol); 496 CleanSolution(sol);
497 } 497 }
498 m_Kernel = null; 498 m_Kernel = null;
499 } 499 }
500 500
501 /// <summary> 501 /// <summary>
502 /// Gets the name. 502 /// Gets the name.
503 /// </summary> 503 /// </summary>
504 /// <value>The name.</value> 504 /// <value>The name.</value>
505 public string Name 505 public string Name
506 { 506 {
507 get 507 get
508 { 508 {
509 return "sharpdev"; 509 return "sharpdev";
510 } 510 }
511 } 511 }
512 512
513 #endregion 513 #endregion
514 } 514 }
515} 515}
diff --git a/Prebuild/src/Core/Targets/NAntTarget.cs b/Prebuild/src/Core/Targets/NAntTarget.cs
index 9a86767..21bc80e 100644
--- a/Prebuild/src/Core/Targets/NAntTarget.cs
+++ b/Prebuild/src/Core/Targets/NAntTarget.cs
@@ -47,36 +47,36 @@ using Prebuild.Core.Utilities;
47 47
48namespace Prebuild.Core.Targets 48namespace Prebuild.Core.Targets
49{ 49{
50 /// <summary> 50 /// <summary>
51 /// 51 ///
52 /// </summary> 52 /// </summary>
53 [Target("nant")] 53 [Target("nant")]
54 public class NAntTarget : ITarget 54 public class NAntTarget : ITarget
55 { 55 {
56 #region Fields 56 #region Fields
57 57
58 private Kernel m_Kernel; 58 private Kernel m_Kernel;
59 59
60 #endregion 60 #endregion
61 61
62 #region Private Methods 62 #region Private Methods
63 63
64 private static string PrependPath(string path) 64 private static string PrependPath(string path)
65 { 65 {
66 string tmpPath = Helper.NormalizePath(path, '/'); 66 string tmpPath = Helper.NormalizePath(path, '/');
67 Regex regex = new Regex(@"(\w):/(\w+)"); 67 Regex regex = new Regex(@"(\w):/(\w+)");
68 Match match = regex.Match(tmpPath); 68 Match match = regex.Match(tmpPath);
69 //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 69 //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
70 //{ 70 //{
71 tmpPath = Helper.NormalizePath(tmpPath); 71 tmpPath = Helper.NormalizePath(tmpPath);
72 //} 72 //}
73 // else 73 // else
74 // { 74 // {
75 // tmpPath = Helper.NormalizePath("./" + tmpPath); 75 // tmpPath = Helper.NormalizePath("./" + tmpPath);
76 // } 76 // }
77 77
78 return tmpPath; 78 return tmpPath;
79 } 79 }
80 80
81 private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr) 81 private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr)
82 { 82 {
@@ -85,7 +85,7 @@ namespace Prebuild.Core.Targets
85 { 85 {
86 return refr.Path; 86 return refr.Path;
87 } 87 }
88 88
89 if (solution.ProjectsTable.ContainsKey(refr.Name)) 89 if (solution.ProjectsTable.ContainsKey(refr.Name))
90 { 90 {
91 ProjectNode projectRef = (ProjectNode) solution.ProjectsTable[refr.Name]; 91 ProjectNode projectRef = (ProjectNode) solution.ProjectsTable[refr.Name];
@@ -113,7 +113,7 @@ namespace Prebuild.Core.Targets
113 return refr.Name + ".dll"; 113 return refr.Name + ".dll";
114 } 114 }
115 115
116 public static string GetRefFileName(string refName) 116 public static string GetRefFileName(string refName)
117 { 117 {
118 if (ExtensionSpecified(refName)) 118 if (ExtensionSpecified(refName))
119 { 119 {
@@ -140,11 +140,11 @@ namespace Prebuild.Core.Targets
140 return extension; 140 return extension;
141 } 141 }
142 142
143 private static string FindFileReference(string refName, ProjectNode project) 143 private static string FindFileReference(string refName, ProjectNode project)
144 { 144 {
145 foreach (ReferencePathNode refPath in project.ReferencePaths) 145 foreach (ReferencePathNode refPath in project.ReferencePaths)
146 { 146 {
147 string fullPath = Helper.MakeFilePath(refPath.Path, refName); 147 string fullPath = Helper.MakeFilePath(refPath.Path, refName);
148 148
149 if (File.Exists(fullPath)) 149 if (File.Exists(fullPath))
150 { 150 {
@@ -153,10 +153,10 @@ namespace Prebuild.Core.Targets
153 153
154 fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 154 fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
155 155
156 if (File.Exists(fullPath)) 156 if (File.Exists(fullPath))
157 { 157 {
158 return fullPath; 158 return fullPath;
159 } 159 }
160 160
161 fullPath = Helper.MakeFilePath(refPath.Path, refName, "exe"); 161 fullPath = Helper.MakeFilePath(refPath.Path, refName, "exe");
162 162
@@ -164,162 +164,162 @@ namespace Prebuild.Core.Targets
164 { 164 {
165 return fullPath; 165 return fullPath;
166 } 166 }
167 } 167 }
168 168
169 return null; 169 return null;
170 } 170 }
171 171
172 /// <summary> 172 /// <summary>
173 /// Gets the XML doc file. 173 /// Gets the XML doc file.
174 /// </summary> 174 /// </summary>
175 /// <param name="project">The project.</param> 175 /// <param name="project">The project.</param>
176 /// <param name="conf">The conf.</param> 176 /// <param name="conf">The conf.</param>
177 /// <returns></returns> 177 /// <returns></returns>
178 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) 178 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
179 { 179 {
180 if (conf == null) 180 if (conf == null)
181 { 181 {
182 throw new ArgumentNullException("conf"); 182 throw new ArgumentNullException("conf");
183 } 183 }
184 if (project == null) 184 if (project == null)
185 { 185 {
186 throw new ArgumentNullException("project"); 186 throw new ArgumentNullException("project");
187 } 187 }
188 string docFile = (string)conf.Options["XmlDocFile"]; 188 string docFile = (string)conf.Options["XmlDocFile"];
189 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 189 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
190 // { 190 // {
191 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; 191 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
192 // } 192 // }
193 return docFile; 193 return docFile;
194 } 194 }
195 195
196 private void WriteProject(SolutionNode solution, ProjectNode project) 196 private void WriteProject(SolutionNode solution, ProjectNode project)
197 { 197 {
198 string projFile = Helper.MakeFilePath(project.FullPath, project.Name + GetProjectExtension(project), "build"); 198 string projFile = Helper.MakeFilePath(project.FullPath, project.Name + GetProjectExtension(project), "build");
199 StreamWriter ss = new StreamWriter(projFile); 199 StreamWriter ss = new StreamWriter(projFile);
200 200
201 m_Kernel.CurrentWorkingDirectory.Push(); 201 m_Kernel.CurrentWorkingDirectory.Push();
202 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 202 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
203 bool hasDoc = false; 203 bool hasDoc = false;
204 204
205 using (ss) 205 using (ss)
206 { 206 {
207 ss.WriteLine("<?xml version=\"1.0\" ?>"); 207 ss.WriteLine("<?xml version=\"1.0\" ?>");
208 ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name); 208 ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name);
209 ss.WriteLine(" <target name=\"{0}\">", "build"); 209 ss.WriteLine(" <target name=\"{0}\">", "build");
210 ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />"); 210 ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
211 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />"); 211 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
212 212
213 ss.Write(" <csc "); 213 ss.Write(" <csc ");
214 ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); 214 ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
215 ss.Write(" debug=\"{0}\"", "${build.debug}"); 215 ss.Write(" debug=\"{0}\"", "${build.debug}");
216 ss.Write(" platform=\"${build.platform}\""); 216 ss.Write(" platform=\"${build.platform}\"");
217 217
218 218
219 foreach (ConfigurationNode conf in project.Configurations) 219 foreach (ConfigurationNode conf in project.Configurations)
220 { 220 {
221 if (conf.Options.KeyFile != "") 221 if (conf.Options.KeyFile != "")
222 { 222 {
223 ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile); 223 ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile);
224 break; 224 break;
225 } 225 }
226 } 226 }
227 foreach (ConfigurationNode conf in project.Configurations) 227 foreach (ConfigurationNode conf in project.Configurations)
228 { 228 {
229 ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe); 229 ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe);
230 break; 230 break;
231 } 231 }
232 foreach (ConfigurationNode conf in project.Configurations) 232 foreach (ConfigurationNode conf in project.Configurations)
233 { 233 {
234 ss.Write(" warnaserror=\"{0}\"", conf.Options.WarningsAsErrors); 234 ss.Write(" warnaserror=\"{0}\"", conf.Options.WarningsAsErrors);
235 break; 235 break;
236 } 236 }
237 foreach (ConfigurationNode conf in project.Configurations) 237 foreach (ConfigurationNode conf in project.Configurations)
238 { 238 {
239 ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines); 239 ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
240 break; 240 break;
241 } 241 }
242 foreach (ConfigurationNode conf in project.Configurations) 242 foreach (ConfigurationNode conf in project.Configurations)
243 { 243 {
244 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]); 244 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]);
245 break; 245 break;
246 } 246 }
247 247
248 ss.Write(" main=\"{0}\"", project.StartupObject); 248 ss.Write(" main=\"{0}\"", project.StartupObject);
249 249
250 foreach (ConfigurationNode conf in project.Configurations) 250 foreach (ConfigurationNode conf in project.Configurations)
251 { 251 {
252 if (GetXmlDocFile(project, conf) != "") 252 if (GetXmlDocFile(project, conf) != "")
253 { 253 {
254 ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf)); 254 ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf));
255 hasDoc = true; 255 hasDoc = true;
256 } 256 }
257 break; 257 break;
258 } 258 }
259 ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}"); 259 ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}");
260 if (project.Type == ProjectType.Library) 260 if (project.Type == ProjectType.Library)
261 { 261 {
262 ss.Write(".dll\""); 262 ss.Write(".dll\"");
263 } 263 }
264 else 264 else
265 { 265 {
266 ss.Write(".exe\""); 266 ss.Write(".exe\"");
267 } 267 }
268 if (project.AppIcon != null && project.AppIcon.Length != 0) 268 if (project.AppIcon != null && project.AppIcon.Length != 0)
269 { 269 {
270 ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/')); 270 ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/'));
271 } 271 }
272 // This disables a very different behavior between VS and NAnt. With Nant, 272 // This disables a very different behavior between VS and NAnt. With Nant,
273 // If you have using System.Xml; it will ensure System.Xml.dll is referenced, 273 // If you have using System.Xml; it will ensure System.Xml.dll is referenced,
274 // but not in VS. This will force the behaviors to match, so when it works 274 // but not in VS. This will force the behaviors to match, so when it works
275 // in nant, it will work in VS. 275 // in nant, it will work in VS.
276 ss.Write(" noconfig=\"true\""); 276 ss.Write(" noconfig=\"true\"");
277 ss.WriteLine(">"); 277 ss.WriteLine(">");
278 ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace); 278 ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace);
279 foreach (string file in project.Files) 279 foreach (string file in project.Files)
280 { 280 {
281 switch (project.Files.GetBuildAction(file)) 281 switch (project.Files.GetBuildAction(file))
282 { 282 {
283 case BuildAction.EmbeddedResource: 283 case BuildAction.EmbeddedResource:
284 ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); 284 ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
285 break; 285 break;
286 default: 286 default:
287 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) 287 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
288 { 288 {
289 ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 289 ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx");
290 } 290 }
291 break; 291 break;
292 } 292 }
293 } 293 }
294 //if (project.Files.GetSubType(file).ToString() != "Code") 294 //if (project.Files.GetSubType(file).ToString() != "Code")
295 //{ 295 //{
296 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 296 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
297 297
298 ss.WriteLine(" </resources>"); 298 ss.WriteLine(" </resources>");
299 ss.WriteLine(" <sources failonempty=\"true\">"); 299 ss.WriteLine(" <sources failonempty=\"true\">");
300 foreach (string file in project.Files) 300 foreach (string file in project.Files)
301 { 301 {
302 switch (project.Files.GetBuildAction(file)) 302 switch (project.Files.GetBuildAction(file))
303 { 303 {
304 case BuildAction.Compile: 304 case BuildAction.Compile:
305 ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); 305 ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
306 break; 306 break;
307 default: 307 default:
308 break; 308 break;
309 } 309 }
310 } 310 }
311 ss.WriteLine(" </sources>"); 311 ss.WriteLine(" </sources>");
312 ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">"); 312 ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">");
313 ss.WriteLine(" <lib>"); 313 ss.WriteLine(" <lib>");
314 ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />"); 314 ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />");
315 foreach(ReferencePathNode refPath in project.ReferencePaths) 315 foreach(ReferencePathNode refPath in project.ReferencePaths)
316 { 316 {
317 ss.WriteLine(" <include name=\"${project::get-base-directory()}/" + refPath.Path.TrimEnd('/', '\\') + "\" />"); 317 ss.WriteLine(" <include name=\"${project::get-base-directory()}/" + refPath.Path.TrimEnd('/', '\\') + "\" />");
318 } 318 }
319 ss.WriteLine(" </lib>"); 319 ss.WriteLine(" </lib>");
320 foreach (ReferenceNode refr in project.References) 320 foreach (ReferenceNode refr in project.References)
321 { 321 {
322 string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/'); 322 string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/');
323 if (refr.Path != null) { 323 if (refr.Path != null) {
324 if (ExtensionSpecified(refr.Name)) 324 if (ExtensionSpecified(refr.Name))
325 { 325 {
@@ -334,12 +334,12 @@ namespace Prebuild.Core.Targets
334 { 334 {
335 ss.WriteLine (" <include name=\"" + path + "\" />"); 335 ss.WriteLine (" <include name=\"" + path + "\" />");
336 } 336 }
337 } 337 }
338 ss.WriteLine(" </references>"); 338 ss.WriteLine(" </references>");
339 339
340 ss.WriteLine(" </csc>"); 340 ss.WriteLine(" </csc>");
341 341
342 foreach (ConfigurationNode conf in project.Configurations) 342 foreach (ConfigurationNode conf in project.Configurations)
343 { 343 {
344 if (!String.IsNullOrEmpty(conf.Options.OutputPath)) 344 if (!String.IsNullOrEmpty(conf.Options.OutputPath))
345 { 345 {
@@ -361,170 +361,170 @@ namespace Prebuild.Core.Targets
361 } 361 }
362 } 362 }
363 363
364 ss.WriteLine(" </target>"); 364 ss.WriteLine(" </target>");
365 365
366 ss.WriteLine(" <target name=\"clean\">"); 366 ss.WriteLine(" <target name=\"clean\">");
367 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />"); 367 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
368 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); 368 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
369 ss.WriteLine(" </target>"); 369 ss.WriteLine(" </target>");
370 370
371 ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">"); 371 ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">");
372 if (hasDoc) 372 if (hasDoc)
373 { 373 {
374 ss.WriteLine(" <property name=\"doc.target\" value=\"\" />"); 374 ss.WriteLine(" <property name=\"doc.target\" value=\"\" />");
375 ss.WriteLine(" <if test=\"${platform::is-unix()}\">"); 375 ss.WriteLine(" <if test=\"${platform::is-unix()}\">");
376 ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />"); 376 ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />");
377 ss.WriteLine(" </if>"); 377 ss.WriteLine(" </if>");
378 ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">"); 378 ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">");
379 ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">"); 379 ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">");
380 ss.Write(" <include name=\"${build.dir}/${project::get-name()}"); 380 ss.Write(" <include name=\"${build.dir}/${project::get-name()}");
381 if (project.Type == ProjectType.Library) 381 if (project.Type == ProjectType.Library)
382 { 382 {
383 ss.WriteLine(".dll\" />"); 383 ss.WriteLine(".dll\" />");
384 } 384 }
385 else 385 else
386 { 386 {
387 ss.WriteLine(".exe\" />"); 387 ss.WriteLine(".exe\" />");
388 } 388 }
389 389
390 ss.WriteLine(" </assemblies>"); 390 ss.WriteLine(" </assemblies>");
391 ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">"); 391 ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">");
392 ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>"); 392 ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>");
393 ss.WriteLine(" </summaries>"); 393 ss.WriteLine(" </summaries>");
394 ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">"); 394 ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">");
395 ss.WriteLine(" <include name=\"${build.dir}\" />"); 395 ss.WriteLine(" <include name=\"${build.dir}\" />");
396 // foreach(ReferenceNode refr in project.References) 396 // foreach(ReferenceNode refr in project.References)
397 // { 397 // {
398 // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); 398 // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/');
399 // if (path != "") 399 // if (path != "")
400 // { 400 // {
401 // ss.WriteLine(" <include name=\"{0}\" />", path); 401 // ss.WriteLine(" <include name=\"{0}\" />", path);
402 // } 402 // }
403 // } 403 // }
404 ss.WriteLine(" </referencepaths>"); 404 ss.WriteLine(" </referencepaths>");
405 ss.WriteLine(" <documenters>"); 405 ss.WriteLine(" <documenters>");
406 ss.WriteLine(" <documenter name=\"MSDN\">"); 406 ss.WriteLine(" <documenter name=\"MSDN\">");
407 ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />"); 407 ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />");
408 ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />"); 408 ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />");
409 ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />"); 409 ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />");
410 ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />"); 410 ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />");
411 ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />"); 411 ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />");
412 ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />"); 412 ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />");
413 ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />"); 413 ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />");
414 ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />"); 414 ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />");
415 ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />"); 415 ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />");
416 ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />"); 416 ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />");
417 ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />"); 417 ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />");
418 ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />"); 418 ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />");
419 ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />"); 419 ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />");
420 ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />"); 420 ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />");
421 ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />"); 421 ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />");
422 ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />"); 422 ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />");
423 ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />"); 423 ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />");
424 ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />"); 424 ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />");
425 ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />"); 425 ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />");
426 ss.WriteLine(" </documenter>"); 426 ss.WriteLine(" </documenter>");
427 ss.WriteLine(" </documenters>"); 427 ss.WriteLine(" </documenters>");
428 ss.WriteLine(" </ndoc>"); 428 ss.WriteLine(" </ndoc>");
429 } 429 }
430 ss.WriteLine(" </target>"); 430 ss.WriteLine(" </target>");
431 ss.WriteLine("</project>"); 431 ss.WriteLine("</project>");
432 } 432 }
433 m_Kernel.CurrentWorkingDirectory.Pop(); 433 m_Kernel.CurrentWorkingDirectory.Pop();
434 } 434 }
435 435
436 private void WriteCombine(SolutionNode solution) 436 private void WriteCombine(SolutionNode solution)
437 { 437 {
438 m_Kernel.Log.Write("Creating NAnt build files"); 438 m_Kernel.Log.Write("Creating NAnt build files");
439 foreach (ProjectNode project in solution.Projects) 439 foreach (ProjectNode project in solution.Projects)
440 { 440 {
441 if (m_Kernel.AllowProject(project.FilterGroups)) 441 if (m_Kernel.AllowProject(project.FilterGroups))
442 { 442 {
443 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 443 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
444 WriteProject(solution, project); 444 WriteProject(solution, project);
445 } 445 }
446 } 446 }
447 447
448 m_Kernel.Log.Write(""); 448 m_Kernel.Log.Write("");
449 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); 449 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
450 StreamWriter ss = new StreamWriter(combFile); 450 StreamWriter ss = new StreamWriter(combFile);
451 451
452 m_Kernel.CurrentWorkingDirectory.Push(); 452 m_Kernel.CurrentWorkingDirectory.Push();
453 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 453 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
454 454
455 using (ss) 455 using (ss)
456 { 456 {
457 ss.WriteLine("<?xml version=\"1.0\" ?>"); 457 ss.WriteLine("<?xml version=\"1.0\" ?>");
458 ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name); 458 ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name);
459 ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>"); 459 ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>");
460 ss.WriteLine(); 460 ss.WriteLine();
461 461
462 //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />"); 462 //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />");
463 //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />"); 463 //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />");
464 ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />"); 464 ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />");
465 ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />"); 465 ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />");
466 ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />"); 466 ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />");
467 ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />"); 467 ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />");
468 468
469 // Use the active configuration, which is the first configuration name in the prebuild file. 469 // Use the active configuration, which is the first configuration name in the prebuild file.
470 Dictionary<string,string> emittedConfigurations = new Dictionary<string, string>(); 470 Dictionary<string,string> emittedConfigurations = new Dictionary<string, string>();
471 471
472 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", solution.ActiveConfig); 472 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", solution.ActiveConfig);
473 ss.WriteLine(); 473 ss.WriteLine();
474 474
475 foreach (ConfigurationNode conf in solution.Configurations) 475 foreach (ConfigurationNode conf in solution.Configurations)
476 { 476 {
477 // If the name isn't in the emitted configurations, we give a high level target to the 477 // If the name isn't in the emitted configurations, we give a high level target to the
478 // platform specific on. This lets "Debug" point to "Debug-AnyCPU". 478 // platform specific on. This lets "Debug" point to "Debug-AnyCPU".
479 if (!emittedConfigurations.ContainsKey(conf.Name)) 479 if (!emittedConfigurations.ContainsKey(conf.Name))
480 { 480 {
481 // Add it to the dictionary so we only emit one. 481 // Add it to the dictionary so we only emit one.
482 emittedConfigurations.Add(conf.Name, conf.Platform); 482 emittedConfigurations.Add(conf.Name, conf.Platform);
483 483
484 // Write out the target block. 484 // Write out the target block.
485 ss.WriteLine(" <target name=\"{0}\" description=\"{0}|{1}\" depends=\"{0}-{1}\">", conf.Name, conf.Platform); 485 ss.WriteLine(" <target name=\"{0}\" description=\"{0}|{1}\" depends=\"{0}-{1}\">", conf.Name, conf.Platform);
486 ss.WriteLine(" </target>"); 486 ss.WriteLine(" </target>");
487 ss.WriteLine(); 487 ss.WriteLine();
488 } 488 }
489 489
490 // Write out the target for the configuration. 490 // Write out the target for the configuration.
491 ss.WriteLine(" <target name=\"{0}-{1}\" description=\"{0}|{1}\">", conf.Name, conf.Platform); 491 ss.WriteLine(" <target name=\"{0}-{1}\" description=\"{0}|{1}\">", conf.Name, conf.Platform);
492 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); 492 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
493 ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower()); 493 ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower());
494 ss.WriteLine("\t\t <property name=\"build.platform\" value=\"{0}\" />", conf.Platform); 494 ss.WriteLine("\t\t <property name=\"build.platform\" value=\"{0}\" />", conf.Platform);
495 ss.WriteLine(" </target>"); 495 ss.WriteLine(" </target>");
496 ss.WriteLine(); 496 ss.WriteLine();
497 } 497 }
498 498
499 ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">"); 499 ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">");
500 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />"); 500 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />");
501 ss.WriteLine(" </target>"); 501 ss.WriteLine(" </target>");
502 ss.WriteLine(); 502 ss.WriteLine();
503 503
504 ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">"); 504 ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">");
505 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />"); 505 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />");
506 ss.WriteLine(" </target>"); 506 ss.WriteLine(" </target>");
507 ss.WriteLine(); 507 ss.WriteLine();
508 508
509 ss.WriteLine(" <target name=\"net-3.5\" description=\"Sets framework to .NET 3.5\">"); 509 ss.WriteLine(" <target name=\"net-3.5\" description=\"Sets framework to .NET 3.5\">");
510 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-3.5\" />"); 510 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-3.5\" />");
511 ss.WriteLine(" </target>"); 511 ss.WriteLine(" </target>");
512 ss.WriteLine(); 512 ss.WriteLine();
513 513
514 ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">"); 514 ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">");
515 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />"); 515 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />");
516 ss.WriteLine(" </target>"); 516 ss.WriteLine(" </target>");
517 ss.WriteLine(); 517 ss.WriteLine();
518 518
519 ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">"); 519 ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">");
520 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />"); 520 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />");
521 ss.WriteLine(" </target>"); 521 ss.WriteLine(" </target>");
522 ss.WriteLine(); 522 ss.WriteLine();
523 523
524 ss.WriteLine(" <target name=\"mono-3.5\" description=\"Sets framework to mono 3.5\">"); 524 ss.WriteLine(" <target name=\"mono-3.5\" description=\"Sets framework to mono 3.5\">");
525 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-3.5\" />"); 525 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-3.5\" />");
526 ss.WriteLine(" </target>"); 526 ss.WriteLine(" </target>");
527 ss.WriteLine(); 527 ss.WriteLine();
528 528
529 ss.WriteLine(" <target name=\"init\" description=\"\">"); 529 ss.WriteLine(" <target name=\"init\" description=\"\">");
530 ss.WriteLine(" <call target=\"${project.config}\" />"); 530 ss.WriteLine(" <call target=\"${project.config}\" />");
@@ -625,7 +625,7 @@ namespace Prebuild.Core.Targets
625 } 625 }
626 } 626 }
627 627
628 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); 628 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
629 foreach (ProjectNode project in solution.Projects) 629 foreach (ProjectNode project in solution.Projects)
630 { 630 {
631 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 631 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
diff --git a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
index 66dd1bc..40a210d 100644
--- a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
+++ b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -29,11 +29,11 @@ using Prebuild.Core.Attributes;
29 29
30namespace Prebuild.Core.Targets 30namespace Prebuild.Core.Targets
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// 33 ///
34 /// </summary> 34 /// </summary>
35 [Target("sharpdev2")] 35 [Target("sharpdev2")]
36 public class SharpDevelop2Target : VS2005Target 36 public class SharpDevelop2Target : VS2005Target
37 { 37 {
38 #region Properties 38 #region Properties
39 public override string VersionName 39 public override string VersionName
@@ -45,38 +45,38 @@ namespace Prebuild.Core.Targets
45 } 45 }
46 #endregion 46 #endregion
47 47
48 #region Public Methods 48 #region Public Methods
49 49
50 /// <summary> 50 /// <summary>
51 /// Writes the specified kern. 51 /// Writes the specified kern.
52 /// </summary> 52 /// </summary>
53 /// <param name="kern">The kern.</param> 53 /// <param name="kern">The kern.</param>
54 public override void Write(Kernel kern) 54 public override void Write(Kernel kern)
55 { 55 {
56 base.Write(kern); 56 base.Write(kern);
57 } 57 }
58 58
59 /// <summary> 59 /// <summary>
60 /// Cleans the specified kern. 60 /// Cleans the specified kern.
61 /// </summary> 61 /// </summary>
62 /// <param name="kern">The kern.</param> 62 /// <param name="kern">The kern.</param>
63 public override void Clean(Kernel kern) 63 public override void Clean(Kernel kern)
64 { 64 {
65 base.Clean(kern); 65 base.Clean(kern);
66 } 66 }
67 67
68 /// <summary> 68 /// <summary>
69 /// Gets the name. 69 /// Gets the name.
70 /// </summary> 70 /// </summary>
71 /// <value>The name.</value> 71 /// <value>The name.</value>
72 public override string Name 72 public override string Name
73 { 73 {
74 get 74 get
75 { 75 {
76 return "sharpdev2"; 76 return "sharpdev2";
77 } 77 }
78 } 78 }
79 79
80 #endregion 80 #endregion
81 } 81 }
82} 82}
diff --git a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
index 8e32050..acab9f4 100644
--- a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
+++ b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (da
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,392 +34,392 @@ using Prebuild.Core.Utilities;
34 34
35namespace Prebuild.Core.Targets 35namespace Prebuild.Core.Targets
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 [Target("sharpdev")] 40 [Target("sharpdev")]
41 public class SharpDevelopTarget : ITarget 41 public class SharpDevelopTarget : ITarget
42 { 42 {
43 #region Fields 43 #region Fields
44 44
45 private Kernel m_Kernel; 45 private Kernel m_Kernel;
46 46
47 #endregion 47 #endregion
48 48
49 #region Private Methods 49 #region Private Methods
50 50
51 private static string PrependPath(string path) 51 private static string PrependPath(string path)
52 { 52 {
53 string tmpPath = Helper.NormalizePath(path, '/'); 53 string tmpPath = Helper.NormalizePath(path, '/');
54 Regex regex = new Regex(@"(\w):/(\w+)"); 54 Regex regex = new Regex(@"(\w):/(\w+)");
55 Match match = regex.Match(tmpPath); 55 Match match = regex.Match(tmpPath);
56 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 56 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
57 { 57 {
58 tmpPath = Helper.NormalizePath(tmpPath); 58 tmpPath = Helper.NormalizePath(tmpPath);
59 } 59 }
60 else 60 else
61 { 61 {
62 tmpPath = Helper.NormalizePath("./" + tmpPath); 62 tmpPath = Helper.NormalizePath("./" + tmpPath);
63 } 63 }
64 64
65 return tmpPath; 65 return tmpPath;
66 } 66 }
67 67
68 private static string BuildReference(SolutionNode solution, ReferenceNode refr) 68 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
69 { 69 {
70 string ret = "<Reference type=\""; 70 string ret = "<Reference type=\"";
71 if(solution.ProjectsTable.ContainsKey(refr.Name)) 71 if(solution.ProjectsTable.ContainsKey(refr.Name))
72 { 72 {
73 ret += "Project\" refto=\"" + refr.Name; 73 ret += "Project\" refto=\"" + refr.Name;
74 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 74 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
75 } 75 }
76 else 76 else
77 { 77 {
78 ProjectNode project = (ProjectNode)refr.Parent; 78 ProjectNode project = (ProjectNode)refr.Parent;
79 string fileRef = FindFileReference(refr.Name, project); 79 string fileRef = FindFileReference(refr.Name, project);
80 80
81 if(refr.Path != null || fileRef != null) 81 if(refr.Path != null || fileRef != null)
82 { 82 {
83 ret += "Assembly\" refto=\""; 83 ret += "Assembly\" refto=\"";
84 84
85 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef; 85 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
86 86
87 ret += finalPath; 87 ret += finalPath;
88 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 88 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
89 return ret; 89 return ret;
90 } 90 }
91 91
92 ret += "Gac\" refto=\""; 92 ret += "Gac\" refto=\"";
93 try 93 try
94 { 94 {
95 //Assembly assem = Assembly.Load(refr.Name); 95 //Assembly assem = Assembly.Load(refr.Name);
96 ret += refr.Name;// assem.FullName; 96 ret += refr.Name;// assem.FullName;
97 } 97 }
98 catch (System.NullReferenceException e) 98 catch (System.NullReferenceException e)
99 { 99 {
100 e.ToString(); 100 e.ToString();
101 ret += refr.Name; 101 ret += refr.Name;
102 } 102 }
103 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 103 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
104 } 104 }
105 105
106 return ret; 106 return ret;
107 } 107 }
108 108
109 private static string FindFileReference(string refName, ProjectNode project) 109 private static string FindFileReference(string refName, ProjectNode project)
110 { 110 {
111 foreach(ReferencePathNode refPath in project.ReferencePaths) 111 foreach(ReferencePathNode refPath in project.ReferencePaths)
112 { 112 {
113 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 113 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
114 114
115 if(File.Exists(fullPath)) 115 if(File.Exists(fullPath))
116 { 116 {
117 return fullPath; 117 return fullPath;
118 } 118 }
119 } 119 }
120 120
121 return null; 121 return null;
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// Gets the XML doc file. 125 /// Gets the XML doc file.
126 /// </summary> 126 /// </summary>
127 /// <param name="project">The project.</param> 127 /// <param name="project">The project.</param>
128 /// <param name="conf">The conf.</param> 128 /// <param name="conf">The conf.</param>
129 /// <returns></returns> 129 /// <returns></returns>
130 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf) 130 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
131 { 131 {
132 if( conf == null ) 132 if( conf == null )
133 { 133 {
134 throw new ArgumentNullException("conf"); 134 throw new ArgumentNullException("conf");
135 } 135 }
136 if( project == null ) 136 if( project == null )
137 { 137 {
138 throw new ArgumentNullException("project"); 138 throw new ArgumentNullException("project");
139 } 139 }
140 string docFile = (string)conf.Options["XmlDocFile"]; 140 string docFile = (string)conf.Options["XmlDocFile"];
141 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 141 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
142 { 142 {
143 return "False"; 143 return "False";
144 } 144 }
145 return "True"; 145 return "True";
146 } 146 }
147 147
148 private void WriteProject(SolutionNode solution, ProjectNode project) 148 private void WriteProject(SolutionNode solution, ProjectNode project)
149 { 149 {
150 string csComp = "Csc"; 150 string csComp = "Csc";
151 string netRuntime = "MsNet"; 151 string netRuntime = "MsNet";
152 if(project.Runtime == ClrRuntime.Mono) 152 if(project.Runtime == ClrRuntime.Mono)
153 { 153 {
154 csComp = "Mcs"; 154 csComp = "Mcs";
155 netRuntime = "Mono"; 155 netRuntime = "Mono";
156 } 156 }
157 157
158 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx"); 158 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
159 StreamWriter ss = new StreamWriter(projFile); 159 StreamWriter ss = new StreamWriter(projFile);
160 160
161 m_Kernel.CurrentWorkingDirectory.Push(); 161 m_Kernel.CurrentWorkingDirectory.Push();
162 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 162 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
163 163
164 using(ss) 164 using(ss)
165 { 165 {
166 ss.WriteLine( 166 ss.WriteLine(
167 "<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">", 167 "<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">",
168 project.Name, 168 project.Name,
169 project.RootNamespace 169 project.RootNamespace
170 ); 170 );
171 171
172 ss.WriteLine(" <Contents>"); 172 ss.WriteLine(" <Contents>");
173 foreach(string file in project.Files) 173 foreach(string file in project.Files)
174 { 174 {
175 string buildAction = "Compile"; 175 string buildAction = "Compile";
176 switch(project.Files.GetBuildAction(file)) 176 switch(project.Files.GetBuildAction(file))
177 { 177 {
178 case BuildAction.None: 178 case BuildAction.None:
179 buildAction = "Nothing"; 179 buildAction = "Nothing";
180 break; 180 break;
181 181
182 case BuildAction.Content: 182 case BuildAction.Content:
183 buildAction = "Exclude"; 183 buildAction = "Exclude";
184 break; 184 break;
185 185
186 case BuildAction.EmbeddedResource: 186 case BuildAction.EmbeddedResource:
187 buildAction = "EmbedAsResource"; 187 buildAction = "EmbedAsResource";
188 break; 188 break;
189 189
190 default: 190 default:
191 buildAction = "Compile"; 191 buildAction = "Compile";
192 break; 192 break;
193 } 193 }
194 194
195 // Sort of a hack, we try and resolve the path and make it relative, if we can. 195 // Sort of a hack, we try and resolve the path and make it relative, if we can.
196 string filePath = PrependPath(file); 196 string filePath = PrependPath(file);
197 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction); 197 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction);
198 } 198 }
199 ss.WriteLine(" </Contents>"); 199 ss.WriteLine(" </Contents>");
200 200
201 ss.WriteLine(" <References>"); 201 ss.WriteLine(" <References>");
202 foreach(ReferenceNode refr in project.References) 202 foreach(ReferenceNode refr in project.References)
203 { 203 {
204 ss.WriteLine(" {0}", BuildReference(solution, refr)); 204 ss.WriteLine(" {0}", BuildReference(solution, refr));
205 } 205 }
206 ss.WriteLine(" </References>"); 206 ss.WriteLine(" </References>");
207 207
208 ss.Write(" <DeploymentInformation"); 208 ss.Write(" <DeploymentInformation");
209 ss.Write(" target=\"\""); 209 ss.Write(" target=\"\"");
210 ss.Write(" script=\"\""); 210 ss.Write(" script=\"\"");
211 ss.Write(" strategy=\"File\""); 211 ss.Write(" strategy=\"File\"");
212 ss.WriteLine(" />"); 212 ss.WriteLine(" />");
213 213
214 int count = 0; 214 int count = 0;
215 215
216 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig); 216 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
217 217
218 foreach(ConfigurationNode conf in project.Configurations) 218 foreach(ConfigurationNode conf in project.Configurations)
219 { 219 {
220 ss.Write(" <Configuration"); 220 ss.Write(" <Configuration");
221 ss.Write(" runwithwarnings=\"True\""); 221 ss.Write(" runwithwarnings=\"True\"");
222 ss.Write(" name=\"{0}\"", conf.Name); 222 ss.Write(" name=\"{0}\"", conf.Name);
223 ss.WriteLine(">"); 223 ss.WriteLine(">");
224 ss.Write(" <CodeGeneration"); 224 ss.Write(" <CodeGeneration");
225 ss.Write(" runtime=\"{0}\"", netRuntime); 225 ss.Write(" runtime=\"{0}\"", netRuntime);
226 ss.Write(" compiler=\"{0}\"", csComp); 226 ss.Write(" compiler=\"{0}\"", csComp);
227 ss.Write(" compilerversion=\"\""); 227 ss.Write(" compilerversion=\"\"");
228 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]); 228 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
229 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]); 229 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
230 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]); 230 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
231 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]); 231 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
232 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]); 232 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
233 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]); 233 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
234 ss.Write(" mainclass=\"{0}\"", project.StartupObject); 234 ss.Write(" mainclass=\"{0}\"", project.StartupObject);
235 ss.Write(" target=\"{0}\"", project.Type); 235 ss.Write(" target=\"{0}\"", project.Type);
236 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]); 236 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
237 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf)); 237 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
238 ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon)); 238 ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon));
239 ss.Write(" noconfig=\"{0}\"", "False"); 239 ss.Write(" noconfig=\"{0}\"", "False");
240 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]); 240 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]);
241 ss.WriteLine(" />"); 241 ss.WriteLine(" />");
242 242
243 ss.Write(" <Execution"); 243 ss.Write(" <Execution");
244 ss.Write(" commandlineparameters=\"\""); 244 ss.Write(" commandlineparameters=\"\"");
245 ss.Write(" consolepause=\"True\""); 245 ss.Write(" consolepause=\"True\"");
246 ss.WriteLine(" />"); 246 ss.WriteLine(" />");
247 247
248 ss.Write(" <Output"); 248 ss.Write(" <Output");
249 ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString())); 249 ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString()));
250 ss.Write(" assembly=\"{0}\"", project.AssemblyName); 250 ss.Write(" assembly=\"{0}\"", project.AssemblyName);
251 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]); 251 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
252 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) 252 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
253 { 253 {
254 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); 254 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
255 } 255 }
256 else 256 else
257 { 257 {
258 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); 258 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
259 } 259 }
260 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) 260 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
261 { 261 {
262 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); 262 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
263 } 263 }
264 else 264 else
265 { 265 {
266 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); 266 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
267 } 267 }
268 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 268 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
269 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 269 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
270 ss.WriteLine(" />"); 270 ss.WriteLine(" />");
271 ss.WriteLine(" </Configuration>"); 271 ss.WriteLine(" </Configuration>");
272 272
273 count++; 273 count++;
274 } 274 }
275 ss.WriteLine(" </Configurations>"); 275 ss.WriteLine(" </Configurations>");
276 ss.WriteLine("</Project>"); 276 ss.WriteLine("</Project>");
277 } 277 }
278 278
279 m_Kernel.CurrentWorkingDirectory.Pop(); 279 m_Kernel.CurrentWorkingDirectory.Pop();
280 } 280 }
281 281
282 private void WriteCombine(SolutionNode solution) 282 private void WriteCombine(SolutionNode solution)
283 { 283 {
284 m_Kernel.Log.Write("Creating SharpDevelop combine and project files"); 284 m_Kernel.Log.Write("Creating SharpDevelop combine and project files");
285 foreach(ProjectNode project in solution.Projects) 285 foreach(ProjectNode project in solution.Projects)
286 { 286 {
287 if(m_Kernel.AllowProject(project.FilterGroups)) 287 if(m_Kernel.AllowProject(project.FilterGroups))
288 { 288 {
289 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 289 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
290 WriteProject(solution, project); 290 WriteProject(solution, project);
291 } 291 }
292 } 292 }
293 293
294 m_Kernel.Log.Write(""); 294 m_Kernel.Log.Write("");
295 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx"); 295 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
296 StreamWriter ss = new StreamWriter(combFile); 296 StreamWriter ss = new StreamWriter(combFile);
297 297
298 m_Kernel.CurrentWorkingDirectory.Push(); 298 m_Kernel.CurrentWorkingDirectory.Push();
299 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 299 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
300 300
301 using(ss) 301 using(ss)
302 { 302 {
303 ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name); 303 ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name);
304 304
305 int count = 0; 305 int count = 0;
306 foreach(ProjectNode project in solution.Projects) 306 foreach(ProjectNode project in solution.Projects)
307 { 307 {
308 if(count == 0) 308 if(count == 0)
309 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name); 309 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
310 310
311 ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name); 311 ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name);
312 count++; 312 count++;
313 } 313 }
314 ss.WriteLine(" </StartMode>"); 314 ss.WriteLine(" </StartMode>");
315 315
316 ss.WriteLine(" <Entries>"); 316 ss.WriteLine(" <Entries>");
317 foreach(ProjectNode project in solution.Projects) 317 foreach(ProjectNode project in solution.Projects)
318 { 318 {
319 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 319 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
320 ss.WriteLine(" <Entry filename=\"{0}\" />", 320 ss.WriteLine(" <Entry filename=\"{0}\" />",
321 Helper.MakeFilePath(path, project.Name, "prjx")); 321 Helper.MakeFilePath(path, project.Name, "prjx"));
322 } 322 }
323 ss.WriteLine(" </Entries>"); 323 ss.WriteLine(" </Entries>");
324 324
325 count = 0; 325 count = 0;
326 foreach(ConfigurationNode conf in solution.Configurations) 326 foreach(ConfigurationNode conf in solution.Configurations)
327 { 327 {
328 if(count == 0) 328 if(count == 0)
329 { 329 {
330 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name); 330 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
331 } 331 }
332 332
333 ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name); 333 ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name);
334 foreach(ProjectNode project in solution.Projects) 334 foreach(ProjectNode project in solution.Projects)
335 { 335 {
336 ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name); 336 ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name);
337 } 337 }
338 ss.WriteLine(" </Configuration>"); 338 ss.WriteLine(" </Configuration>");
339 339
340 count++; 340 count++;
341 } 341 }
342 ss.WriteLine(" </Configurations>"); 342 ss.WriteLine(" </Configurations>");
343 ss.WriteLine("</Combine>"); 343 ss.WriteLine("</Combine>");
344 } 344 }
345 345
346 m_Kernel.CurrentWorkingDirectory.Pop(); 346 m_Kernel.CurrentWorkingDirectory.Pop();
347 } 347 }
348 348
349 private void CleanProject(ProjectNode project) 349 private void CleanProject(ProjectNode project)
350 { 350 {
351 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 351 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
352 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx"); 352 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
353 Helper.DeleteIfExists(projectFile); 353 Helper.DeleteIfExists(projectFile);
354 } 354 }
355 355
356 private void CleanSolution(SolutionNode solution) 356 private void CleanSolution(SolutionNode solution)
357 { 357 {
358 m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name); 358 m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name);
359 359
360 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx"); 360 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
361 Helper.DeleteIfExists(slnFile); 361 Helper.DeleteIfExists(slnFile);
362 362
363 foreach(ProjectNode project in solution.Projects) 363 foreach(ProjectNode project in solution.Projects)
364 { 364 {
365 CleanProject(project); 365 CleanProject(project);
366 } 366 }
367 367
368 m_Kernel.Log.Write(""); 368 m_Kernel.Log.Write("");
369 } 369 }
370 370
371 #endregion 371 #endregion
372 372
373 #region ITarget Members 373 #region ITarget Members
374 374
375 /// <summary> 375 /// <summary>
376 /// Writes the specified kern. 376 /// Writes the specified kern.
377 /// </summary> 377 /// </summary>
378 /// <param name="kern">The kern.</param> 378 /// <param name="kern">The kern.</param>
379 public void Write(Kernel kern) 379 public void Write(Kernel kern)
380 { 380 {
381 if( kern == null ) 381 if( kern == null )
382 { 382 {
383 throw new ArgumentNullException("kern"); 383 throw new ArgumentNullException("kern");
384 } 384 }
385 m_Kernel = kern; 385 m_Kernel = kern;
386 foreach(SolutionNode solution in kern.Solutions) 386 foreach(SolutionNode solution in kern.Solutions)
387 { 387 {
388 WriteCombine(solution); 388 WriteCombine(solution);
389 } 389 }
390 m_Kernel = null; 390 m_Kernel = null;
391 } 391 }
392 392
393 /// <summary> 393 /// <summary>
394 /// Cleans the specified kern. 394 /// Cleans the specified kern.
395 /// </summary> 395 /// </summary>
396 /// <param name="kern">The kern.</param> 396 /// <param name="kern">The kern.</param>
397 public virtual void Clean(Kernel kern) 397 public virtual void Clean(Kernel kern)
398 { 398 {
399 if( kern == null ) 399 if( kern == null )
400 { 400 {
401 throw new ArgumentNullException("kern"); 401 throw new ArgumentNullException("kern");
402 } 402 }
403 m_Kernel = kern; 403 m_Kernel = kern;
404 foreach(SolutionNode sol in kern.Solutions) 404 foreach(SolutionNode sol in kern.Solutions)
405 { 405 {
406 CleanSolution(sol); 406 CleanSolution(sol);
407 } 407 }
408 m_Kernel = null; 408 m_Kernel = null;
409 } 409 }
410 410
411 /// <summary> 411 /// <summary>
412 /// Gets the name. 412 /// Gets the name.
413 /// </summary> 413 /// </summary>
414 /// <value>The name.</value> 414 /// <value>The name.</value>
415 public string Name 415 public string Name
416 { 416 {
417 get 417 get
418 { 418 {
419 return "sharpdev"; 419 return "sharpdev";
420 } 420 }
421 } 421 }
422 422
423 #endregion 423 #endregion
424 } 424 }
425} 425}
diff --git a/Prebuild/src/Core/Targets/ToolInfo.cs b/Prebuild/src/Core/Targets/ToolInfo.cs
index 935c674..984d20e 100644
--- a/Prebuild/src/Core/Targets/ToolInfo.cs
+++ b/Prebuild/src/Core/Targets/ToolInfo.cs
@@ -4,194 +4,194 @@ using System.Text;
4 4
5namespace Prebuild.Core.Targets 5namespace Prebuild.Core.Targets
6{ 6{
7 /// <summary> 7 /// <summary>
8 /// 8 ///
9 /// </summary> 9 /// </summary>
10 public struct ToolInfo 10 public struct ToolInfo
11 { 11 {
12 string name; 12 string name;
13 string guid; 13 string guid;
14 string fileExtension; 14 string fileExtension;
15 string xmlTag; 15 string xmlTag;
16 string importProject; 16 string importProject;
17 17
18 /// <summary> 18 /// <summary>
19 /// Gets or sets the name. 19 /// Gets or sets the name.
20 /// </summary> 20 /// </summary>
21 /// <value>The name.</value> 21 /// <value>The name.</value>
22 public string Name 22 public string Name
23 { 23 {
24 get 24 get
25 { 25 {
26 return name; 26 return name;
27 } 27 }
28 set 28 set
29 { 29 {
30 name = value; 30 name = value;
31 } 31 }
32 } 32 }
33 33
34 /// <summary> 34 /// <summary>
35 /// Gets or sets the GUID. 35 /// Gets or sets the GUID.
36 /// </summary> 36 /// </summary>
37 /// <value>The GUID.</value> 37 /// <value>The GUID.</value>
38 public string Guid 38 public string Guid
39 { 39 {
40 get 40 get
41 { 41 {
42 return guid; 42 return guid;
43 } 43 }
44 set 44 set
45 { 45 {
46 guid = value; 46 guid = value;
47 } 47 }
48 } 48 }
49 49
50 /// <summary> 50 /// <summary>
51 /// Gets or sets the file extension. 51 /// Gets or sets the file extension.
52 /// </summary> 52 /// </summary>
53 /// <value>The file extension.</value> 53 /// <value>The file extension.</value>
54 public string FileExtension 54 public string FileExtension
55 { 55 {
56 get 56 get
57 { 57 {
58 return fileExtension; 58 return fileExtension;
59 } 59 }
60 set 60 set
61 { 61 {
62 fileExtension = value; 62 fileExtension = value;
63 } 63 }
64 } 64 }
65 public string LanguageExtension 65 public string LanguageExtension
66 { 66 {
67 get 67 get
68 { 68 {
69 switch (this.Name) 69 switch (this.Name)
70 { 70 {
71 case "C#": 71 case "C#":
72 return ".cs"; 72 return ".cs";
73 case "VisualBasic": 73 case "VisualBasic":
74 return ".vb"; 74 return ".vb";
75 case "Boo": 75 case "Boo":
76 return ".boo"; 76 return ".boo";
77 default: 77 default:
78 return ".cs"; 78 return ".cs";
79 } 79 }
80 } 80 }
81 } 81 }
82 /// <summary> 82 /// <summary>
83 /// Gets or sets the XML tag. 83 /// Gets or sets the XML tag.
84 /// </summary> 84 /// </summary>
85 /// <value>The XML tag.</value> 85 /// <value>The XML tag.</value>
86 public string XmlTag 86 public string XmlTag
87 { 87 {
88 get 88 get
89 { 89 {
90 return xmlTag; 90 return xmlTag;
91 } 91 }
92 set 92 set
93 { 93 {
94 xmlTag = value; 94 xmlTag = value;
95 } 95 }
96 } 96 }
97 97
98 /// <summary> 98 /// <summary>
99 /// Gets or sets the import project property. 99 /// Gets or sets the import project property.
100 /// </summary> 100 /// </summary>
101 /// <value>The ImportProject tag.</value> 101 /// <value>The ImportProject tag.</value>
102 public string ImportProject 102 public string ImportProject
103 { 103 {
104 get 104 get
105 { 105 {
106 return importProject; 106 return importProject;
107 } 107 }
108 set 108 set
109 { 109 {
110 importProject = value; 110 importProject = value;
111 } 111 }
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Initializes a new instance of the <see cref="ToolInfo"/> class. 115 /// Initializes a new instance of the <see cref="ToolInfo"/> class.
116 /// </summary> 116 /// </summary>
117 /// <param name="name">The name.</param> 117 /// <param name="name">The name.</param>
118 /// <param name="guid">The GUID.</param> 118 /// <param name="guid">The GUID.</param>
119 /// <param name="fileExtension">The file extension.</param> 119 /// <param name="fileExtension">The file extension.</param>
120 /// <param name="xml">The XML.</param> 120 /// <param name="xml">The XML.</param>
121 /// <param name="importProject">The import project.</param> 121 /// <param name="importProject">The import project.</param>
122 public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject) 122 public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject)
123 { 123 {
124 this.name = name; 124 this.name = name;
125 this.guid = guid; 125 this.guid = guid;
126 this.fileExtension = fileExtension; 126 this.fileExtension = fileExtension;
127 this.xmlTag = xml; 127 this.xmlTag = xml;
128 this.importProject = importProject; 128 this.importProject = importProject;
129 } 129 }
130 130
131 /// <summary> 131 /// <summary>
132 /// Initializes a new instance of the <see cref="ToolInfo"/> class. 132 /// Initializes a new instance of the <see cref="ToolInfo"/> class.
133 /// </summary> 133 /// </summary>
134 /// <param name="name">The name.</param> 134 /// <param name="name">The name.</param>
135 /// <param name="guid">The GUID.</param> 135 /// <param name="guid">The GUID.</param>
136 /// <param name="fileExtension">The file extension.</param> 136 /// <param name="fileExtension">The file extension.</param>
137 /// <param name="xml">The XML.</param> 137 /// <param name="xml">The XML.</param>
138 public ToolInfo(string name, string guid, string fileExtension, string xml) 138 public ToolInfo(string name, string guid, string fileExtension, string xml)
139 { 139 {
140 this.name = name; 140 this.name = name;
141 this.guid = guid; 141 this.guid = guid;
142 this.fileExtension = fileExtension; 142 this.fileExtension = fileExtension;
143 this.xmlTag = xml; 143 this.xmlTag = xml;
144 this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets"; 144 this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets";
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 /// Equals operator 148 /// Equals operator
149 /// </summary> 149 /// </summary>
150 /// <param name="obj">ToolInfo to compare</param> 150 /// <param name="obj">ToolInfo to compare</param>
151 /// <returns>true if toolInfos are equal</returns> 151 /// <returns>true if toolInfos are equal</returns>
152 public override bool Equals(object obj) 152 public override bool Equals(object obj)
153 { 153 {
154 if (obj == null) 154 if (obj == null)
155 { 155 {
156 throw new ArgumentNullException("obj"); 156 throw new ArgumentNullException("obj");
157 } 157 }
158 if (obj.GetType() != typeof(ToolInfo)) 158 if (obj.GetType() != typeof(ToolInfo))
159 return false; 159 return false;
160 160
161 ToolInfo c = (ToolInfo)obj; 161 ToolInfo c = (ToolInfo)obj;
162 return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject)); 162 return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject));
163 } 163 }
164 164
165 /// <summary> 165 /// <summary>
166 /// Equals operator 166 /// Equals operator
167 /// </summary> 167 /// </summary>
168 /// <param name="c1">ToolInfo to compare</param> 168 /// <param name="c1">ToolInfo to compare</param>
169 /// <param name="c2">ToolInfo to compare</param> 169 /// <param name="c2">ToolInfo to compare</param>
170 /// <returns>True if toolInfos are equal</returns> 170 /// <returns>True if toolInfos are equal</returns>
171 public static bool operator ==(ToolInfo c1, ToolInfo c2) 171 public static bool operator ==(ToolInfo c1, ToolInfo c2)
172 { 172 {
173 return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag)); 173 return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag));
174 } 174 }
175 175
176 /// <summary> 176 /// <summary>
177 /// Not equals operator 177 /// Not equals operator
178 /// </summary> 178 /// </summary>
179 /// <param name="c1">ToolInfo to compare</param> 179 /// <param name="c1">ToolInfo to compare</param>
180 /// <param name="c2">ToolInfo to compare</param> 180 /// <param name="c2">ToolInfo to compare</param>
181 /// <returns>True if toolInfos are not equal</returns> 181 /// <returns>True if toolInfos are not equal</returns>
182 public static bool operator !=(ToolInfo c1, ToolInfo c2) 182 public static bool operator !=(ToolInfo c1, ToolInfo c2)
183 { 183 {
184 return !(c1 == c2); 184 return !(c1 == c2);
185 } 185 }
186 186
187 /// <summary> 187 /// <summary>
188 /// Hash Code 188 /// Hash Code
189 /// </summary> 189 /// </summary>
190 /// <returns>Hash code</returns> 190 /// <returns>Hash code</returns>
191 public override int GetHashCode() 191 public override int GetHashCode()
192 { 192 {
193 return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode(); 193 return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode();
194 194
195 } 195 }
196 } 196 }
197} 197}
diff --git a/Prebuild/src/Core/Targets/VS2002Target.cs b/Prebuild/src/Core/Targets/VS2002Target.cs
index 2292624..d7f6dd1 100644
--- a/Prebuild/src/Core/Targets/VS2002Target.cs
+++ b/Prebuild/src/Core/Targets/VS2002Target.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -29,59 +29,59 @@ using Prebuild.Core.Attributes;
29 29
30namespace Prebuild.Core.Targets 30namespace Prebuild.Core.Targets
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// 33 ///
34 /// </summary> 34 /// </summary>
35 [Target("vs2002")] 35 [Target("vs2002")]
36 public class VS2002Target : VS2003Target 36 public class VS2002Target : VS2003Target
37 { 37 {
38 #region Private Methods 38 #region Private Methods
39 39
40 private void SetVS2002() 40 private void SetVS2002()
41 { 41 {
42 this.SolutionVersion = "7.00"; 42 this.SolutionVersion = "7.00";
43 this.ProductVersion = "7.0.9254"; 43 this.ProductVersion = "7.0.9254";
44 this.SchemaVersion = "1.0"; 44 this.SchemaVersion = "1.0";
45 this.VersionName = "2002"; 45 this.VersionName = "2002";
46 this.Version = VSVersion.VS70; 46 this.Version = VSVersion.VS70;
47 } 47 }
48 48
49 #endregion 49 #endregion
50 50
51 #region Public Methods 51 #region Public Methods
52 52
53 /// <summary> 53 /// <summary>
54 /// Writes the specified kern. 54 /// Writes the specified kern.
55 /// </summary> 55 /// </summary>
56 /// <param name="kern">The kern.</param> 56 /// <param name="kern">The kern.</param>
57 public override void Write(Kernel kern) 57 public override void Write(Kernel kern)
58 { 58 {
59 SetVS2002(); 59 SetVS2002();
60 base.Write(kern); 60 base.Write(kern);
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Cleans the specified kern. 64 /// Cleans the specified kern.
65 /// </summary> 65 /// </summary>
66 /// <param name="kern">The kern.</param> 66 /// <param name="kern">The kern.</param>
67 public override void Clean(Kernel kern) 67 public override void Clean(Kernel kern)
68 { 68 {
69 SetVS2002(); 69 SetVS2002();
70 base.Clean(kern); 70 base.Clean(kern);
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Gets the name. 74 /// Gets the name.
75 /// </summary> 75 /// </summary>
76 /// <value>The name.</value> 76 /// <value>The name.</value>
77 public override string Name 77 public override string Name
78 { 78 {
79 get 79 get
80 { 80 {
81 return "vs2002"; 81 return "vs2002";
82 } 82 }
83 } 83 }
84 84
85 #endregion 85 #endregion
86 } 86 }
87} 87}
diff --git a/Prebuild/src/Core/Targets/VS2003Target.cs b/Prebuild/src/Core/Targets/VS2003Target.cs
index 10e2dc4..f4b4517 100644
--- a/Prebuild/src/Core/Targets/VS2003Target.cs
+++ b/Prebuild/src/Core/Targets/VS2003Target.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -34,560 +34,560 @@ using Prebuild.Core.Utilities;
34 34
35namespace Prebuild.Core.Targets 35namespace Prebuild.Core.Targets
36{ 36{
37 [Target("vs2003")] 37 [Target("vs2003")]
38 public class VS2003Target : ITarget 38 public class VS2003Target : ITarget
39 { 39 {
40 40
41 #region Fields 41 #region Fields
42 42
43 string solutionVersion = "8.00"; 43 string solutionVersion = "8.00";
44 string productVersion = "7.10.3077"; 44 string productVersion = "7.10.3077";
45 string schemaVersion = "2.0"; 45 string schemaVersion = "2.0";
46 string versionName = "2003"; 46 string versionName = "2003";
47 VSVersion version = VSVersion.VS71; 47 VSVersion version = VSVersion.VS71;
48 48
49 readonly Dictionary<string, ToolInfo> m_Tools = new Dictionary<string, ToolInfo>(); 49 readonly Dictionary<string, ToolInfo> m_Tools = new Dictionary<string, ToolInfo>();
50 Kernel m_Kernel; 50 Kernel m_Kernel;
51 51
52 /// <summary> 52 /// <summary>
53 /// Gets or sets the solution version. 53 /// Gets or sets the solution version.
54 /// </summary> 54 /// </summary>
55 /// <value>The solution version.</value> 55 /// <value>The solution version.</value>
56 protected string SolutionVersion 56 protected string SolutionVersion
57 { 57 {
58 get 58 get
59 { 59 {
60 return solutionVersion; 60 return solutionVersion;
61 } 61 }
62 set 62 set
63 { 63 {
64 solutionVersion = value; 64 solutionVersion = value;
65 } 65 }
66 } 66 }
67 /// <summary> 67 /// <summary>
68 /// Gets or sets the product version. 68 /// Gets or sets the product version.
69 /// </summary> 69 /// </summary>
70 /// <value>The product version.</value> 70 /// <value>The product version.</value>
71 protected string ProductVersion 71 protected string ProductVersion
72 { 72 {
73 get 73 get
74 { 74 {
75 return productVersion; 75 return productVersion;
76 } 76 }
77 set 77 set
78 { 78 {
79 productVersion = value; 79 productVersion = value;
80 } 80 }
81 } 81 }
82 /// <summary> 82 /// <summary>
83 /// Gets or sets the schema version. 83 /// Gets or sets the schema version.
84 /// </summary> 84 /// </summary>
85 /// <value>The schema version.</value> 85 /// <value>The schema version.</value>
86 protected string SchemaVersion 86 protected string SchemaVersion
87 { 87 {
88 get 88 get
89 { 89 {
90 return schemaVersion; 90 return schemaVersion;
91 } 91 }
92 set 92 set
93 { 93 {
94 schemaVersion = value; 94 schemaVersion = value;
95 } 95 }
96 } 96 }
97 /// <summary> 97 /// <summary>
98 /// Gets or sets the name of the version. 98 /// Gets or sets the name of the version.
99 /// </summary> 99 /// </summary>
100 /// <value>The name of the version.</value> 100 /// <value>The name of the version.</value>
101 protected string VersionName 101 protected string VersionName
102 { 102 {
103 get 103 get
104 { 104 {
105 return versionName; 105 return versionName;
106 } 106 }
107 set 107 set
108 { 108 {
109 versionName = value; 109 versionName = value;
110 } 110 }
111 } 111 }
112 /// <summary> 112 /// <summary>
113 /// Gets or sets the version. 113 /// Gets or sets the version.
114 /// </summary> 114 /// </summary>
115 /// <value>The version.</value> 115 /// <value>The version.</value>
116 protected VSVersion Version 116 protected VSVersion Version
117 { 117 {
118 get 118 get
119 { 119 {
120 return version; 120 return version;
121 } 121 }
122 set 122 set
123 { 123 {
124 version = value; 124 version = value;
125 } 125 }
126 } 126 }
127 127
128 #endregion 128 #endregion
129 129
130 #region Constructors 130 #region Constructors
131 131
132 /// <summary> 132 /// <summary>
133 /// Initializes a new instance of the <see cref="VS2003Target"/> class. 133 /// Initializes a new instance of the <see cref="VS2003Target"/> class.
134 /// </summary> 134 /// </summary>
135 public VS2003Target() 135 public VS2003Target()
136 { 136 {
137 m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP"); 137 m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP");
138 m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic"); 138 m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic");
139 } 139 }
140 140
141 #endregion 141 #endregion
142 142
143 #region Private Methods 143 #region Private Methods
144 144
145 private string MakeRefPath(ProjectNode project) 145 private string MakeRefPath(ProjectNode project)
146 { 146 {
147 string ret = ""; 147 string ret = "";
148 foreach(ReferencePathNode node in project.ReferencePaths) 148 foreach(ReferencePathNode node in project.ReferencePaths)
149 { 149 {
150 try 150 try
151 { 151 {
152 string fullPath = Helper.ResolvePath(node.Path); 152 string fullPath = Helper.ResolvePath(node.Path);
153 if(ret.Length < 1) 153 if(ret.Length < 1)
154 { 154 {
155 ret = fullPath; 155 ret = fullPath;
156 } 156 }
157 else 157 else
158 { 158 {
159 ret += ";" + fullPath; 159 ret += ";" + fullPath;
160 } 160 }
161 } 161 }
162 catch(ArgumentException) 162 catch(ArgumentException)
163 { 163 {
164 m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); 164 m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
165 } 165 }
166 } 166 }
167 167
168 return ret; 168 return ret;
169 } 169 }
170 170
171 private void WriteProject(SolutionNode solution, ProjectNode project) 171 private void WriteProject(SolutionNode solution, ProjectNode project)
172 { 172 {
173 if(!m_Tools.ContainsKey(project.Language)) 173 if(!m_Tools.ContainsKey(project.Language))
174 { 174 {
175 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 175 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
176 } 176 }
177 177
178 ToolInfo toolInfo = m_Tools[project.Language]; 178 ToolInfo toolInfo = m_Tools[project.Language];
179 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 179 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
180 StreamWriter ps = new StreamWriter(projectFile); 180 StreamWriter ps = new StreamWriter(projectFile);
181 181
182 m_Kernel.CurrentWorkingDirectory.Push(); 182 m_Kernel.CurrentWorkingDirectory.Push();
183 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); 183 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
184 184
185 using(ps) 185 using(ps)
186 { 186 {
187 ps.WriteLine("<VisualStudioProject>"); 187 ps.WriteLine("<VisualStudioProject>");
188 ps.WriteLine(" <{0}", toolInfo.XmlTag); 188 ps.WriteLine(" <{0}", toolInfo.XmlTag);
189 ps.WriteLine("\t\t\t\tProjectType = \"Local\""); 189 ps.WriteLine("\t\t\t\tProjectType = \"Local\"");
190 ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", ProductVersion); 190 ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", ProductVersion);
191 ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", SchemaVersion); 191 ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", SchemaVersion);
192 ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper()); 192 ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper());
193 ps.WriteLine("\t\t>"); 193 ps.WriteLine("\t\t>");
194 194
195 ps.WriteLine("\t\t\t\t<Build>"); 195 ps.WriteLine("\t\t\t\t<Build>");
196 ps.WriteLine(" <Settings"); 196 ps.WriteLine(" <Settings");
197 ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon); 197 ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon);
198 ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\""); 198 ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\"");
199 ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName); 199 ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName);
200 ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\""); 200 ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\"");
201 ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\""); 201 ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\"");
202 ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\""); 202 ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\"");
203 ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\""); 203 ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\"");
204 ps.WriteLine("\t\t\t\t DelaySign = \"false\""); 204 ps.WriteLine("\t\t\t\t DelaySign = \"false\"");
205 205
206 if(Version == VSVersion.VS70) 206 if(Version == VSVersion.VS70)
207 { 207 {
208 ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\""); 208 ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\"");
209 } 209 }
210 210
211 ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type); 211 ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type);
212 212
213 foreach(ConfigurationNode conf in project.Configurations) 213 foreach(ConfigurationNode conf in project.Configurations)
214 { 214 {
215 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) 215 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
216 { 216 {
217 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); 217 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
218 } 218 }
219 else 219 else
220 { 220 {
221 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]); 221 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]);
222 } 222 }
223 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) 223 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
224 { 224 {
225 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); 225 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
226 } 226 }
227 else 227 else
228 { 228 {
229 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]); 229 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]);
230 } 230 }
231 if (conf.Options["RunPostBuildEvent"] == null) 231 if (conf.Options["RunPostBuildEvent"] == null)
232 { 232 {
233 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess"); 233 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess");
234 } 234 }
235 else 235 else
236 { 236 {
237 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]); 237 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]);
238 } 238 }
239 break; 239 break;
240 } 240 }
241 241
242 ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace); 242 ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace);
243 ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject); 243 ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject);
244 ps.WriteLine("\t\t >"); 244 ps.WriteLine("\t\t >");
245 245
246 foreach(ConfigurationNode conf in project.Configurations) 246 foreach(ConfigurationNode conf in project.Configurations)
247 { 247 {
248 ps.WriteLine("\t\t\t\t <Config"); 248 ps.WriteLine("\t\t\t\t <Config");
249 ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name); 249 ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name);
250 ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower()); 250 ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower());
251 ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]); 251 ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]);
252 ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower()); 252 ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower());
253 ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\""); 253 ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\"");
254 ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]); 254 ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]);
255 ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name 255 ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name
256 ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower()); 256 ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower());
257 ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]); 257 ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]);
258 ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower()); 258 ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower());
259 259
260 if(Version == VSVersion.VS71) 260 if(Version == VSVersion.VS71)
261 { 261 {
262 ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower()); 262 ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower());
263 ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower()); 263 ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower());
264 } 264 }
265 265
266 ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower()); 266 ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower());
267 ps.WriteLine(" OutputPath = \"{0}\"", 267 ps.WriteLine(" OutputPath = \"{0}\"",
268 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); 268 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
269 ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower()); 269 ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower());
270 ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower()); 270 ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower());
271 ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower()); 271 ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower());
272 ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]); 272 ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]);
273 ps.WriteLine(" />"); 273 ps.WriteLine(" />");
274 } 274 }
275 275
276 ps.WriteLine(" </Settings>"); 276 ps.WriteLine(" </Settings>");
277 277
278 ps.WriteLine(" <References>"); 278 ps.WriteLine(" <References>");
279 foreach(ReferenceNode refr in project.References) 279 foreach(ReferenceNode refr in project.References)
280 { 280 {
281 ps.WriteLine(" <Reference"); 281 ps.WriteLine(" <Reference");
282 ps.WriteLine(" Name = \"{0}\"", refr.Name); 282 ps.WriteLine(" Name = \"{0}\"", refr.Name);
283 ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name); 283 ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name);
284 284
285 if(solution.ProjectsTable.ContainsKey(refr.Name)) 285 if(solution.ProjectsTable.ContainsKey(refr.Name))
286 { 286 {
287 ProjectNode refProject = solution.ProjectsTable[refr.Name]; 287 ProjectNode refProject = solution.ProjectsTable[refr.Name];
288 ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper()); 288 ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper());
289 ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToUpper()); 289 ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToUpper());
290 } 290 }
291 else 291 else
292 { 292 {
293 if(refr.Path != null) 293 if(refr.Path != null)
294 { 294 {
295 ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); 295 ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
296 } 296 }
297 297
298 } 298 }
299 299
300 if(refr.LocalCopySpecified) 300 if(refr.LocalCopySpecified)
301 { 301 {
302 ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy); 302 ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy);
303 } 303 }
304 304
305 ps.WriteLine(" />"); 305 ps.WriteLine(" />");
306 } 306 }
307 ps.WriteLine(" </References>"); 307 ps.WriteLine(" </References>");
308 308
309 ps.WriteLine(" </Build>"); 309 ps.WriteLine(" </Build>");
310 ps.WriteLine(" <Files>"); 310 ps.WriteLine(" <Files>");
311 311
312 ps.WriteLine(" <Include>"); 312 ps.WriteLine(" <Include>");
313 313
314 foreach(string file in project.Files) 314 foreach(string file in project.Files)
315 { 315 {
316 string fileName = file.Replace(".\\", ""); 316 string fileName = file.Replace(".\\", "");
317 ps.WriteLine(" <File"); 317 ps.WriteLine(" <File");
318 ps.WriteLine(" RelPath = \"{0}\"", fileName); 318 ps.WriteLine(" RelPath = \"{0}\"", fileName);
319 ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file)); 319 ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file));
320 ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file)); 320 ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file));
321 ps.WriteLine(" />"); 321 ps.WriteLine(" />");
322 322
323 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) 323 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
324 { 324 {
325 ps.WriteLine(" <File"); 325 ps.WriteLine(" <File");
326 ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx"); 326 ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx");
327 int slash = fileName.LastIndexOf('\\'); 327 int slash = fileName.LastIndexOf('\\');
328 if (slash == -1) 328 if (slash == -1)
329 { 329 {
330 ps.WriteLine(" DependentUpon = \"{0}\"", fileName); 330 ps.WriteLine(" DependentUpon = \"{0}\"", fileName);
331 } 331 }
332 else 332 else
333 { 333 {
334 ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1)); 334 ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1));
335 } 335 }
336 ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource"); 336 ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource");
337 ps.WriteLine(" />"); 337 ps.WriteLine(" />");
338 338
339 } 339 }
340 } 340 }
341 ps.WriteLine(" </Include>"); 341 ps.WriteLine(" </Include>");
342 342
343 ps.WriteLine(" </Files>"); 343 ps.WriteLine(" </Files>");
344 ps.WriteLine(" </{0}>", toolInfo.XmlTag); 344 ps.WriteLine(" </{0}>", toolInfo.XmlTag);
345 ps.WriteLine("</VisualStudioProject>"); 345 ps.WriteLine("</VisualStudioProject>");
346 } 346 }
347 347
348 ps = new StreamWriter(projectFile + ".user"); 348 ps = new StreamWriter(projectFile + ".user");
349 using(ps) 349 using(ps)
350 { 350 {
351 ps.WriteLine("<VisualStudioProject>"); 351 ps.WriteLine("<VisualStudioProject>");
352 ps.WriteLine(" <{0}>", toolInfo.XmlTag); 352 ps.WriteLine(" <{0}>", toolInfo.XmlTag);
353 ps.WriteLine(" <Build>"); 353 ps.WriteLine(" <Build>");
354 354
355 ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); 355 ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
356 foreach(ConfigurationNode conf in project.Configurations) 356 foreach(ConfigurationNode conf in project.Configurations)
357 { 357 {
358 ps.WriteLine(" <Config"); 358 ps.WriteLine(" <Config");
359 ps.WriteLine(" Name = \"{0}\"", conf.Name); 359 ps.WriteLine(" Name = \"{0}\"", conf.Name);
360 ps.WriteLine(" />"); 360 ps.WriteLine(" />");
361 } 361 }
362 ps.WriteLine(" </Settings>"); 362 ps.WriteLine(" </Settings>");
363 363
364 ps.WriteLine(" </Build>"); 364 ps.WriteLine(" </Build>");
365 ps.WriteLine(" </{0}>", toolInfo.XmlTag); 365 ps.WriteLine(" </{0}>", toolInfo.XmlTag);
366 ps.WriteLine("</VisualStudioProject>"); 366 ps.WriteLine("</VisualStudioProject>");
367 } 367 }
368 368
369 m_Kernel.CurrentWorkingDirectory.Pop(); 369 m_Kernel.CurrentWorkingDirectory.Pop();
370 } 370 }
371 371
372 /// <summary> 372 /// <summary>
373 /// Gets the XML doc file. 373 /// Gets the XML doc file.
374 /// </summary> 374 /// </summary>
375 /// <param name="project">The project.</param> 375 /// <param name="project">The project.</param>
376 /// <param name="conf">The conf.</param> 376 /// <param name="conf">The conf.</param>
377 /// <returns></returns> 377 /// <returns></returns>
378 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) 378 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
379 { 379 {
380 if( conf == null ) 380 if( conf == null )
381 { 381 {
382 throw new ArgumentNullException("conf"); 382 throw new ArgumentNullException("conf");
383 } 383 }
384 if( project == null ) 384 if( project == null )
385 { 385 {
386 throw new ArgumentNullException("project"); 386 throw new ArgumentNullException("project");
387 } 387 }
388 // if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false 388 // if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false
389 // { 389 // {
390 // return string.Empty; 390 // return string.Empty;
391 // } 391 // }
392 392
393 //default to "AssemblyName.xml" 393 //default to "AssemblyName.xml"
394 //string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; 394 //string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
395 //return (string)conf.Options["XmlDocFile", defaultValue]; 395 //return (string)conf.Options["XmlDocFile", defaultValue];
396 396
397 //default to no XmlDocFile file 397 //default to no XmlDocFile file
398 return (string)conf.Options["XmlDocFile", ""]; 398 return (string)conf.Options["XmlDocFile", ""];
399 } 399 }
400 400
401 private void WriteSolution(SolutionNode solution) 401 private void WriteSolution(SolutionNode solution)
402 { 402 {
403 m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", VersionName); 403 m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", VersionName);
404 404
405 foreach(ProjectNode project in solution.Projects) 405 foreach(ProjectNode project in solution.Projects)
406 { 406 {
407 if(m_Kernel.AllowProject(project.FilterGroups)) 407 if(m_Kernel.AllowProject(project.FilterGroups))
408 { 408 {
409 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 409 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
410 WriteProject(solution, project); 410 WriteProject(solution, project);
411 } 411 }
412 } 412 }
413 413
414 m_Kernel.Log.Write(""); 414 m_Kernel.Log.Write("");
415 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 415 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
416 StreamWriter ss = new StreamWriter(solutionFile); 416 StreamWriter ss = new StreamWriter(solutionFile);
417 417
418 m_Kernel.CurrentWorkingDirectory.Push(); 418 m_Kernel.CurrentWorkingDirectory.Push();
419 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); 419 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
420 420
421 using(ss) 421 using(ss)
422 { 422 {
423 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion); 423 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion);
424 foreach(ProjectNode project in solution.Projects) 424 foreach(ProjectNode project in solution.Projects)
425 { 425 {
426 if(!m_Tools.ContainsKey(project.Language)) 426 if(!m_Tools.ContainsKey(project.Language))
427 { 427 {
428 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 428 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
429 } 429 }
430 430
431 ToolInfo toolInfo = m_Tools[project.Language]; 431 ToolInfo toolInfo = m_Tools[project.Language];
432 432
433 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 433 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
434 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"", 434 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"",
435 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name, 435 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name,
436 toolInfo.FileExtension), project.Guid.ToString().ToUpper()); 436 toolInfo.FileExtension), project.Guid.ToString().ToUpper());
437 437
438 ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject"); 438 ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject");
439 ss.WriteLine("\tEndProjectSection"); 439 ss.WriteLine("\tEndProjectSection");
440 440
441 ss.WriteLine("EndProject"); 441 ss.WriteLine("EndProject");
442 } 442 }
443 443
444 ss.WriteLine("Global"); 444 ss.WriteLine("Global");
445 445
446 ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution"); 446 ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution");
447 foreach(ConfigurationNode conf in solution.Configurations) 447 foreach(ConfigurationNode conf in solution.Configurations)
448 { 448 {
449 ss.WriteLine("\t\t{0} = {0}", conf.Name); 449 ss.WriteLine("\t\t{0} = {0}", conf.Name);
450 } 450 }
451 ss.WriteLine("\tEndGlobalSection"); 451 ss.WriteLine("\tEndGlobalSection");
452 452
453 ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution"); 453 ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution");
454 foreach(ProjectNode project in solution.Projects) 454 foreach(ProjectNode project in solution.Projects)
455 { 455 {
456 for(int i = 0; i < project.References.Count; i++) 456 for(int i = 0; i < project.References.Count; i++)
457 { 457 {
458 ReferenceNode refr = project.References[i]; 458 ReferenceNode refr = project.References[i];
459 if(solution.ProjectsTable.ContainsKey(refr.Name)) 459 if(solution.ProjectsTable.ContainsKey(refr.Name))
460 { 460 {
461 ProjectNode refProject = solution.ProjectsTable[refr.Name]; 461 ProjectNode refProject = solution.ProjectsTable[refr.Name];
462 ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})", 462 ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})",
463 project.Guid.ToString().ToUpper() 463 project.Guid.ToString().ToUpper()
464 , i, 464 , i,
465 refProject.Guid.ToString().ToUpper() 465 refProject.Guid.ToString().ToUpper()
466 ); 466 );
467 } 467 }
468 } 468 }
469 } 469 }
470 ss.WriteLine("\tEndGlobalSection"); 470 ss.WriteLine("\tEndGlobalSection");
471 471
472 ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution"); 472 ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution");
473 foreach(ProjectNode project in solution.Projects) 473 foreach(ProjectNode project in solution.Projects)
474 { 474 {
475 foreach(ConfigurationNode conf in solution.Configurations) 475 foreach(ConfigurationNode conf in solution.Configurations)
476 { 476 {
477 ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET", 477 ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET",
478 project.Guid.ToString().ToUpper(), 478 project.Guid.ToString().ToUpper(),
479 conf.Name); 479 conf.Name);
480 480
481 ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET", 481 ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET",
482 project.Guid.ToString().ToUpper(), 482 project.Guid.ToString().ToUpper(),
483 conf.Name); 483 conf.Name);
484 } 484 }
485 } 485 }
486 ss.WriteLine("\tEndGlobalSection"); 486 ss.WriteLine("\tEndGlobalSection");
487 487
488 if(solution.Files != null) 488 if(solution.Files != null)
489 { 489 {
490 ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution"); 490 ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution");
491 foreach(string file in solution.Files) 491 foreach(string file in solution.Files)
492 { 492 {
493 ss.WriteLine("\t\t{0} = {0}", file); 493 ss.WriteLine("\t\t{0} = {0}", file);
494 } 494 }
495 ss.WriteLine("\tEndGlobalSection"); 495 ss.WriteLine("\tEndGlobalSection");
496 } 496 }
497 497
498 ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution"); 498 ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution");
499 ss.WriteLine("\tEndGlobalSection"); 499 ss.WriteLine("\tEndGlobalSection");
500 ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution"); 500 ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution");
501 ss.WriteLine("\tEndGlobalSection"); 501 ss.WriteLine("\tEndGlobalSection");
502 502
503 ss.WriteLine("EndGlobal"); 503 ss.WriteLine("EndGlobal");
504 } 504 }
505 505
506 m_Kernel.CurrentWorkingDirectory.Pop(); 506 m_Kernel.CurrentWorkingDirectory.Pop();
507 } 507 }
508 508
509 private void CleanProject(ProjectNode project) 509 private void CleanProject(ProjectNode project)
510 { 510 {
511 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 511 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
512 512
513 ToolInfo toolInfo = m_Tools[project.Language]; 513 ToolInfo toolInfo = m_Tools[project.Language];
514 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 514 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
515 string userFile = projectFile + ".user"; 515 string userFile = projectFile + ".user";
516 516
517 Helper.DeleteIfExists(projectFile); 517 Helper.DeleteIfExists(projectFile);
518 Helper.DeleteIfExists(userFile); 518 Helper.DeleteIfExists(userFile);
519 } 519 }
520 520
521 private void CleanSolution(SolutionNode solution) 521 private void CleanSolution(SolutionNode solution)
522 { 522 {
523 m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", VersionName, solution.Name); 523 m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", VersionName, solution.Name);
524 524
525 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 525 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
526 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); 526 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
527 527
528 Helper.DeleteIfExists(slnFile); 528 Helper.DeleteIfExists(slnFile);
529 Helper.DeleteIfExists(suoFile); 529 Helper.DeleteIfExists(suoFile);
530 530
531 foreach(ProjectNode project in solution.Projects) 531 foreach(ProjectNode project in solution.Projects)
532 { 532 {
533 CleanProject(project); 533 CleanProject(project);
534 } 534 }
535 535
536 m_Kernel.Log.Write(""); 536 m_Kernel.Log.Write("");
537 } 537 }
538 538
539 #endregion 539 #endregion
540 540
541 #region ITarget Members 541 #region ITarget Members
542 542
543 /// <summary> 543 /// <summary>
544 /// Writes the specified kern. 544 /// Writes the specified kern.
545 /// </summary> 545 /// </summary>
546 /// <param name="kern">The kern.</param> 546 /// <param name="kern">The kern.</param>
547 public virtual void Write(Kernel kern) 547 public virtual void Write(Kernel kern)
548 { 548 {
549 if( kern == null ) 549 if( kern == null )
550 { 550 {
551 throw new ArgumentNullException("kern"); 551 throw new ArgumentNullException("kern");
552 } 552 }
553 m_Kernel = kern; 553 m_Kernel = kern;
554 foreach(SolutionNode sol in m_Kernel.Solutions) 554 foreach(SolutionNode sol in m_Kernel.Solutions)
555 { 555 {
556 WriteSolution(sol); 556 WriteSolution(sol);
557 } 557 }
558 m_Kernel = null; 558 m_Kernel = null;
559 } 559 }
560 560
561 /// <summary> 561 /// <summary>
562 /// Cleans the specified kern. 562 /// Cleans the specified kern.
563 /// </summary> 563 /// </summary>
564 /// <param name="kern">The kern.</param> 564 /// <param name="kern">The kern.</param>
565 public virtual void Clean(Kernel kern) 565 public virtual void Clean(Kernel kern)
566 { 566 {
567 if( kern == null ) 567 if( kern == null )
568 { 568 {
569 throw new ArgumentNullException("kern"); 569 throw new ArgumentNullException("kern");
570 } 570 }
571 m_Kernel = kern; 571 m_Kernel = kern;
572 foreach(SolutionNode sol in m_Kernel.Solutions) 572 foreach(SolutionNode sol in m_Kernel.Solutions)
573 { 573 {
574 CleanSolution(sol); 574 CleanSolution(sol);
575 } 575 }
576 m_Kernel = null; 576 m_Kernel = null;
577 } 577 }
578 578
579 /// <summary> 579 /// <summary>
580 /// Gets the name. 580 /// Gets the name.
581 /// </summary> 581 /// </summary>
582 /// <value>The name.</value> 582 /// <value>The name.</value>
583 public virtual string Name 583 public virtual string Name
584 { 584 {
585 get 585 get
586 { 586 {
587 return "vs2003"; 587 return "vs2003";
588 } 588 }
589 } 589 }
590 590
591 #endregion 591 #endregion
592 } 592 }
593} 593}
diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs
index 9c70e26..e5a0939 100644
--- a/Prebuild/src/Core/Targets/VS2005Target.cs
+++ b/Prebuild/src/Core/Targets/VS2005Target.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com)
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -35,7 +35,7 @@ using Prebuild.Core.Utilities;
35namespace Prebuild.Core.Targets 35namespace Prebuild.Core.Targets
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 [Target("vs2005")] 40 [Target("vs2005")]
41 public class VS2005Target : VSGenericTarget 41 public class VS2005Target : VSGenericTarget
@@ -137,9 +137,9 @@ namespace Prebuild.Core.Targets
137 /// <summary> 137 /// <summary>
138 /// Initializes a new instance of the <see cref="VS2005Target"/> class. 138 /// Initializes a new instance of the <see cref="VS2005Target"/> class.
139 /// </summary> 139 /// </summary>
140 public VS2005Target() 140 public VS2005Target()
141 : base() 141 : base()
142 { 142 {
143 } 143 }
144 144
145 #endregion 145 #endregion
diff --git a/Prebuild/src/Core/Targets/VS2008Target.cs b/Prebuild/src/Core/Targets/VS2008Target.cs
index fee4f7f..a3f3aca 100644
--- a/Prebuild/src/Core/Targets/VS2008Target.cs
+++ b/Prebuild/src/Core/Targets/VS2008Target.cs
@@ -11,86 +11,86 @@ using System.CodeDom.Compiler;
11namespace Prebuild.Core.Targets 11namespace Prebuild.Core.Targets
12{ 12{
13 13
14 /// <summary> 14 /// <summary>
15 /// 15 ///
16 /// </summary> 16 /// </summary>
17 [Target("vs2008")] 17 [Target("vs2008")]
18 public class VS2008Target : VSGenericTarget 18 public class VS2008Target : VSGenericTarget
19 { 19 {
20 #region Fields 20 #region Fields
21 string solutionVersion = "10.00"; 21 string solutionVersion = "10.00";
22 string productVersion = "9.0.21022"; 22 string productVersion = "9.0.21022";
23 string schemaVersion = "2.0"; 23 string schemaVersion = "2.0";
24 string versionName = "Visual Studio 2008"; 24 string versionName = "Visual Studio 2008";
25 string name = "vs2008"; 25 string name = "vs2008";
26 VSVersion version = VSVersion.VS90; 26 VSVersion version = VSVersion.VS90;
27 27
28 /// <summary> 28 /// <summary>
29 /// Gets or sets the solution version. 29 /// Gets or sets the solution version.
30 /// </summary> 30 /// </summary>
31 /// <value>The solution version.</value> 31 /// <value>The solution version.</value>
32 public override string SolutionVersion 32 public override string SolutionVersion
33 { 33 {
34 get 34 get
35 { 35 {
36 return solutionVersion; 36 return solutionVersion;
37 } 37 }
38 } 38 }
39 /// <summary> 39 /// <summary>
40 /// Gets or sets the product version. 40 /// Gets or sets the product version.
41 /// </summary> 41 /// </summary>
42 /// <value>The product version.</value> 42 /// <value>The product version.</value>
43 public override string ProductVersion 43 public override string ProductVersion
44 { 44 {
45 get 45 get
46 { 46 {
47 return productVersion; 47 return productVersion;
48 } 48 }
49 } 49 }
50 /// <summary> 50 /// <summary>
51 /// Gets or sets the schema version. 51 /// Gets or sets the schema version.
52 /// </summary> 52 /// </summary>
53 /// <value>The schema version.</value> 53 /// <value>The schema version.</value>
54 public override string SchemaVersion 54 public override string SchemaVersion
55 { 55 {
56 get 56 get
57 { 57 {
58 return schemaVersion; 58 return schemaVersion;
59 } 59 }
60 } 60 }
61 /// <summary> 61 /// <summary>
62 /// Gets or sets the name of the version. 62 /// Gets or sets the name of the version.
63 /// </summary> 63 /// </summary>
64 /// <value>The name of the version.</value> 64 /// <value>The name of the version.</value>
65 public override string VersionName 65 public override string VersionName
66 { 66 {
67 get 67 get
68 { 68 {
69 return versionName; 69 return versionName;
70 } 70 }
71 } 71 }
72 /// <summary> 72 /// <summary>
73 /// Gets or sets the version. 73 /// Gets or sets the version.
74 /// </summary> 74 /// </summary>
75 /// <value>The version.</value> 75 /// <value>The version.</value>
76 public override VSVersion Version 76 public override VSVersion Version
77 { 77 {
78 get 78 get
79 { 79 {
80 return version; 80 return version;
81 } 81 }
82 } 82 }
83 /// <summary> 83 /// <summary>
84 /// Gets the name. 84 /// Gets the name.
85 /// </summary> 85 /// </summary>
86 /// <value>The name.</value> 86 /// <value>The name.</value>
87 public override string Name 87 public override string Name
88 { 88 {
89 get 89 get
90 { 90 {
91 return name; 91 return name;
92 } 92 }
93 } 93 }
94 94
95 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) 95 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
96 { 96 {
@@ -110,18 +110,18 @@ namespace Prebuild.Core.Targets
110 get { return "# Visual Studio 2008"; } 110 get { return "# Visual Studio 2008"; }
111 } 111 }
112 112
113 #endregion 113 #endregion
114 114
115 #region Constructors 115 #region Constructors
116 116
117 /// <summary> 117 /// <summary>
118 /// Initializes a new instance of the <see cref="VS2005Target"/> class. 118 /// Initializes a new instance of the <see cref="VS2005Target"/> class.
119 /// </summary> 119 /// </summary>
120 public VS2008Target() 120 public VS2008Target()
121 : base() 121 : base()
122 { 122 {
123 } 123 }
124 124
125 #endregion 125 #endregion
126 } 126 }
127} 127}
diff --git a/Prebuild/src/Core/Targets/VS2010Target.cs b/Prebuild/src/Core/Targets/VS2010Target.cs
index e8aeab5..b4c79dc 100644
--- a/Prebuild/src/Core/Targets/VS2010Target.cs
+++ b/Prebuild/src/Core/Targets/VS2010Target.cs
@@ -11,96 +11,96 @@ using System.CodeDom.Compiler;
11namespace Prebuild.Core.Targets 11namespace Prebuild.Core.Targets
12{ 12{
13 13
14 /// <summary> 14 /// <summary>
15 /// 15 ///
16 /// </summary> 16 /// </summary>
17 [Target("vs2010")] 17 [Target("vs2010")]
18 public class VS2010Target : VSGenericTarget 18 public class VS2010Target : VSGenericTarget
19 { 19 {
20 #region Fields 20 #region Fields
21 21
22 string solutionVersion = "11.00"; 22 string solutionVersion = "11.00";
23 string productVersion = "9.0.30729"; 23 string productVersion = "9.0.30729";
24 string schemaVersion = "2.0"; 24 string schemaVersion = "2.0";
25 string versionName = "Visual Studio 2010"; 25 string versionName = "Visual Studio 2010";
26 string name = "vs2010"; 26 string name = "vs2010";
27 VSVersion version = VSVersion.VS10; 27 VSVersion version = VSVersion.VS10;
28 28
29 #endregion 29 #endregion
30 30
31 #region Properties 31 #region Properties
32 32
33 /// <summary> 33 /// <summary>
34 /// Gets or sets the solution version. 34 /// Gets or sets the solution version.
35 /// </summary> 35 /// </summary>
36 /// <value>The solution version.</value> 36 /// <value>The solution version.</value>
37 public override string SolutionVersion 37 public override string SolutionVersion
38 { 38 {
39 get 39 get
40 { 40 {
41 return solutionVersion; 41 return solutionVersion;
42 } 42 }
43 } 43 }
44 44
45 /// <summary> 45 /// <summary>
46 /// Gets or sets the product version. 46 /// Gets or sets the product version.
47 /// </summary> 47 /// </summary>
48 /// <value>The product version.</value> 48 /// <value>The product version.</value>
49 public override string ProductVersion 49 public override string ProductVersion
50 { 50 {
51 get 51 get
52 { 52 {
53 return productVersion; 53 return productVersion;
54 } 54 }
55 } 55 }
56 56
57 /// <summary> 57 /// <summary>
58 /// Gets or sets the schema version. 58 /// Gets or sets the schema version.
59 /// </summary> 59 /// </summary>
60 /// <value>The schema version.</value> 60 /// <value>The schema version.</value>
61 public override string SchemaVersion 61 public override string SchemaVersion
62 { 62 {
63 get 63 get
64 { 64 {
65 return schemaVersion; 65 return schemaVersion;
66 } 66 }
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// Gets or sets the name of the version. 70 /// Gets or sets the name of the version.
71 /// </summary> 71 /// </summary>
72 /// <value>The name of the version.</value> 72 /// <value>The name of the version.</value>
73 public override string VersionName 73 public override string VersionName
74 { 74 {
75 get 75 get
76 { 76 {
77 return versionName; 77 return versionName;
78 } 78 }
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Gets or sets the version. 82 /// Gets or sets the version.
83 /// </summary> 83 /// </summary>
84 /// <value>The version.</value> 84 /// <value>The version.</value>
85 public override VSVersion Version 85 public override VSVersion Version
86 { 86 {
87 get 87 get
88 { 88 {
89 return version; 89 return version;
90 } 90 }
91 } 91 }
92 92
93 /// <summary> 93 /// <summary>
94 /// Gets the name. 94 /// Gets the name.
95 /// </summary> 95 /// </summary>
96 /// <value>The name.</value> 96 /// <value>The name.</value>
97 public override string Name 97 public override string Name
98 { 98 {
99 get 99 get
100 { 100 {
101 return name; 101 return name;
102 } 102 }
103 } 103 }
104 104
105 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) 105 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
106 { 106 {
@@ -110,7 +110,7 @@ namespace Prebuild.Core.Targets
110 case FrameworkVersion.v4_5: 110 case FrameworkVersion.v4_5:
111 case FrameworkVersion.v4_0: 111 case FrameworkVersion.v4_0:
112 case FrameworkVersion.v3_5: 112 case FrameworkVersion.v3_5:
113 return "ToolsVersion=\"4.0\""; 113 return "ToolsVersion=\"4.0\"";
114 case FrameworkVersion.v3_0: 114 case FrameworkVersion.v3_0:
115 return "ToolsVersion=\"3.0\""; 115 return "ToolsVersion=\"3.0\"";
116 default: 116 default:
@@ -123,18 +123,18 @@ namespace Prebuild.Core.Targets
123 get { return "# Visual Studio 2010"; } 123 get { return "# Visual Studio 2010"; }
124 } 124 }
125 125
126 #endregion 126 #endregion
127 127
128 #region Constructors 128 #region Constructors
129 129
130 /// <summary> 130 /// <summary>
131 /// Initializes a new instance of the <see cref="VS2005Target"/> class. 131 /// Initializes a new instance of the <see cref="VS2005Target"/> class.
132 /// </summary> 132 /// </summary>
133 public VS2010Target() 133 public VS2010Target()
134 : base() 134 : base()
135 { 135 {
136 } 136 }
137 137
138 #endregion 138 #endregion
139 } 139 }
140} 140}
diff --git a/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Prebuild/src/Core/Targets/VSGenericTarget.cs
index b7c71e6..400788b 100644
--- a/Prebuild/src/Core/Targets/VSGenericTarget.cs
+++ b/Prebuild/src/Core/Targets/VSGenericTarget.cs
@@ -35,141 +35,141 @@ using System.CodeDom.Compiler;
35namespace Prebuild.Core.Targets 35namespace Prebuild.Core.Targets
36{ 36{
37 37
38 /// <summary> 38 /// <summary>
39 /// 39 ///
40 /// </summary> 40 /// </summary>
41 public abstract class VSGenericTarget : ITarget 41 public abstract class VSGenericTarget : ITarget
42 { 42 {
43 #region Fields 43 #region Fields
44 44
45 readonly Dictionary<string, ToolInfo> tools = new Dictionary<string, ToolInfo>(); 45 readonly Dictionary<string, ToolInfo> tools = new Dictionary<string, ToolInfo>();
46// NameValueCollection CopyFiles = new NameValueCollection(); 46// NameValueCollection CopyFiles = new NameValueCollection();
47 Kernel kernel; 47 Kernel kernel;
48 #endregion 48 #endregion
49 49
50 #region Properties 50 #region Properties
51 /// <summary> 51 /// <summary>
52 /// Gets or sets the solution version. 52 /// Gets or sets the solution version.
53 /// </summary> 53 /// </summary>
54 /// <value>The solution version.</value> 54 /// <value>The solution version.</value>
55 public abstract string SolutionVersion { get; } 55 public abstract string SolutionVersion { get; }
56 /// <summary> 56 /// <summary>
57 /// Gets or sets the product version. 57 /// Gets or sets the product version.
58 /// </summary> 58 /// </summary>
59 /// <value>The product version.</value> 59 /// <value>The product version.</value>
60 public abstract string ProductVersion { get; } 60 public abstract string ProductVersion { get; }
61 /// <summary> 61 /// <summary>
62 /// Gets or sets the schema version. 62 /// Gets or sets the schema version.
63 /// </summary> 63 /// </summary>
64 /// <value>The schema version.</value> 64 /// <value>The schema version.</value>
65 public abstract string SchemaVersion { get; } 65 public abstract string SchemaVersion { get; }
66 /// <summary> 66 /// <summary>
67 /// Gets or sets the name of the version. 67 /// Gets or sets the name of the version.
68 /// </summary> 68 /// </summary>
69 /// <value>The name of the version.</value> 69 /// <value>The name of the version.</value>
70 public abstract string VersionName { get; } 70 public abstract string VersionName { get; }
71 /// <summary> 71 /// <summary>
72 /// Gets or sets the version. 72 /// Gets or sets the version.
73 /// </summary> 73 /// </summary>
74 /// <value>The version.</value> 74 /// <value>The version.</value>
75 public abstract VSVersion Version { get; } 75 public abstract VSVersion Version { get; }
76 /// <summary> 76 /// <summary>
77 /// Gets the name. 77 /// Gets the name.
78 /// </summary> 78 /// </summary>
79 /// <value>The name.</value> 79 /// <value>The name.</value>
80 public abstract string Name { get; } 80 public abstract string Name { get; }
81 81
82 protected abstract string GetToolsVersionXml(FrameworkVersion version); 82 protected abstract string GetToolsVersionXml(FrameworkVersion version);
83 public abstract string SolutionTag { get; } 83 public abstract string SolutionTag { get; }
84 84
85 #endregion 85 #endregion
86 86
87 #region Constructors 87 #region Constructors
88 88
89 /// <summary> 89 /// <summary>
90 /// Initializes a new instance of the <see cref="VSGenericTarget"/> class. 90 /// Initializes a new instance of the <see cref="VSGenericTarget"/> class.
91 /// </summary> 91 /// </summary>
92 protected VSGenericTarget() 92 protected VSGenericTarget()
93 { 93 {
94 tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets"); 94 tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets");
95 tools["Database"] = new ToolInfo("Database", "{4F174C21-8C12-11D0-8340-0000F80270F8}", "dbp", "UNKNOWN"); 95 tools["Database"] = new ToolInfo("Database", "{4F174C21-8C12-11D0-8340-0000F80270F8}", "dbp", "UNKNOWN");
96 tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets"); 96 tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets");
97 tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets"); 97 tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets");
98 tools["Folder"] = new ToolInfo("Folder", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", null, null); 98 tools["Folder"] = new ToolInfo("Folder", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", null, null);
99 } 99 }
100 100
101 #endregion 101 #endregion
102 102
103 #region Private Methods 103 #region Private Methods
104 104
105 private string MakeRefPath(ProjectNode project) 105 private string MakeRefPath(ProjectNode project)
106 { 106 {
107 string ret = ""; 107 string ret = "";
108 foreach (ReferencePathNode node in project.ReferencePaths) 108 foreach (ReferencePathNode node in project.ReferencePaths)
109 { 109 {
110 try 110 try
111 { 111 {
112 string fullPath = Helper.ResolvePath(node.Path); 112 string fullPath = Helper.ResolvePath(node.Path);
113 if (ret.Length < 1) 113 if (ret.Length < 1)
114 { 114 {
115 ret = fullPath; 115 ret = fullPath;
116 } 116 }
117 else 117 else
118 { 118 {
119 ret += ";" + fullPath; 119 ret += ";" + fullPath;
120 } 120 }
121 } 121 }
122 catch (ArgumentException) 122 catch (ArgumentException)
123 { 123 {
124 kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); 124 kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
125 } 125 }
126 } 126 }
127 127
128 return ret; 128 return ret;
129 } 129 }
130 130
131 private static ProjectNode FindProjectInSolution(string name, SolutionNode solution) 131 private static ProjectNode FindProjectInSolution(string name, SolutionNode solution)
132 { 132 {
133 SolutionNode node = solution; 133 SolutionNode node = solution;
134 134
135 while (node.Parent is SolutionNode) 135 while (node.Parent is SolutionNode)
136 node = node.Parent as SolutionNode; 136 node = node.Parent as SolutionNode;
137 137
138 return FindProjectInSolutionRecursively(name, node); 138 return FindProjectInSolutionRecursively(name, node);
139 } 139 }
140 140
141 private static ProjectNode FindProjectInSolutionRecursively(string name, SolutionNode solution) 141 private static ProjectNode FindProjectInSolutionRecursively(string name, SolutionNode solution)
142 { 142 {
143 if (solution.ProjectsTable.ContainsKey(name)) 143 if (solution.ProjectsTable.ContainsKey(name))
144 return solution.ProjectsTable[name]; 144 return solution.ProjectsTable[name];
145 145
146 foreach (SolutionNode child in solution.Solutions) 146 foreach (SolutionNode child in solution.Solutions)
147 { 147 {
148 ProjectNode node = FindProjectInSolutionRecursively(name, child); 148 ProjectNode node = FindProjectInSolutionRecursively(name, child);
149 if (node != null) 149 if (node != null)
150 return node; 150 return node;
151 } 151 }
152 152
153 return null; 153 return null;
154 } 154 }
155 155
156 private void WriteProject(SolutionNode solution, ProjectNode project) 156 private void WriteProject(SolutionNode solution, ProjectNode project)
157 { 157 {
158 if (!tools.ContainsKey(project.Language)) 158 if (!tools.ContainsKey(project.Language))
159 { 159 {
160 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 160 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
161 } 161 }
162 162
163 ToolInfo toolInfo = tools[project.Language]; 163 ToolInfo toolInfo = tools[project.Language];
164 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 164 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
165 StreamWriter ps = new StreamWriter(projectFile); 165 StreamWriter ps = new StreamWriter(projectFile);
166 166
167 kernel.CurrentWorkingDirectory.Push(); 167 kernel.CurrentWorkingDirectory.Push();
168 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); 168 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
169 169
170 #region Project File 170 #region Project File
171 using (ps) 171 using (ps)
172 { 172 {
173 string targets = ""; 173 string targets = "";
174 174
175 if(project.Files.CopyFiles > 0) 175 if(project.Files.CopyFiles > 0)
@@ -177,347 +177,347 @@ namespace Prebuild.Core.Targets
177 else 177 else
178 targets = "Build"; 178 targets = "Build";
179 179
180 ps.WriteLine("<Project DefaultTargets=\"{0}\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" {1}>", targets, GetToolsVersionXml(project.FrameworkVersion)); 180 ps.WriteLine("<Project DefaultTargets=\"{0}\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" {1}>", targets, GetToolsVersionXml(project.FrameworkVersion));
181 ps.WriteLine(" <PropertyGroup>"); 181 ps.WriteLine(" <PropertyGroup>");
182 ps.WriteLine(" <ProjectType>Local</ProjectType>"); 182 ps.WriteLine(" <ProjectType>Local</ProjectType>");
183 ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", ProductVersion); 183 ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", ProductVersion);
184 ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", SchemaVersion); 184 ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", SchemaVersion);
185 ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper()); 185 ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper());
186 186
187 // Visual Studio has a hard coded guid for the project type 187 // Visual Studio has a hard coded guid for the project type
188 if (project.Type == ProjectType.Web) 188 if (project.Type == ProjectType.Web)
189 ps.WriteLine(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>"); 189 ps.WriteLine(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>");
190 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); 190 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
191 ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon); 191 ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon);
192 ps.WriteLine(" <AssemblyKeyContainerName>"); 192 ps.WriteLine(" <AssemblyKeyContainerName>");
193 ps.WriteLine(" </AssemblyKeyContainerName>"); 193 ps.WriteLine(" </AssemblyKeyContainerName>");
194 ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName); 194 ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName);
195 foreach (ConfigurationNode conf in project.Configurations) 195 foreach (ConfigurationNode conf in project.Configurations)
196 { 196 {
197 if (conf.Options.KeyFile != "") 197 if (conf.Options.KeyFile != "")
198 { 198 {
199 ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile); 199 ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile);
200 ps.WriteLine(" <SignAssembly>true</SignAssembly>"); 200 ps.WriteLine(" <SignAssembly>true</SignAssembly>");
201 break; 201 break;
202 } 202 }
203 } 203 }
204 ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>"); 204 ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>");
205 ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>"); 205 ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>");
206 ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>"); 206 ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>");
207 ps.WriteLine(" <DelaySign>false</DelaySign>"); 207 ps.WriteLine(" <DelaySign>false</DelaySign>");
208 ps.WriteLine(" <TargetFrameworkVersion>{0}</TargetFrameworkVersion>", project.FrameworkVersion.ToString().Replace("_", ".")); 208 ps.WriteLine(" <TargetFrameworkVersion>{0}</TargetFrameworkVersion>", project.FrameworkVersion.ToString().Replace("_", "."));
209 209
210 ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type == ProjectType.Web ? ProjectType.Library.ToString() : project.Type.ToString()); 210 ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type == ProjectType.Web ? ProjectType.Library.ToString() : project.Type.ToString());
211 ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder); 211 ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder);
212 ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace); 212 ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace);
213 ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject); 213 ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject);
214 if (string.IsNullOrEmpty(project.DebugStartParameters)) 214 if (string.IsNullOrEmpty(project.DebugStartParameters))
215 { 215 {
216 ps.WriteLine(" <StartArguments>{0}</StartArguments>", project.DebugStartParameters); 216 ps.WriteLine(" <StartArguments>{0}</StartArguments>", project.DebugStartParameters);
217 } 217 }
218 ps.WriteLine(" <FileUpgradeFlags>"); 218 ps.WriteLine(" <FileUpgradeFlags>");
219 ps.WriteLine(" </FileUpgradeFlags>"); 219 ps.WriteLine(" </FileUpgradeFlags>");
220 220
221 ps.WriteLine(" </PropertyGroup>"); 221 ps.WriteLine(" </PropertyGroup>");
222 222
223 foreach (ConfigurationNode conf in project.Configurations) 223 foreach (ConfigurationNode conf in project.Configurations)
224 { 224 {
225 ps.Write(" <PropertyGroup "); 225 ps.Write(" <PropertyGroup ");
226 ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|{1}' \">", conf.Name, conf.Platform); 226 ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|{1}' \">", conf.Name, conf.Platform);
227 ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]); 227 ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]);
228 ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]); 228 ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]);
229 ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]); 229 ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]);
230 ps.WriteLine(" <ConfigurationOverrideFile>"); 230 ps.WriteLine(" <ConfigurationOverrideFile>");
231 ps.WriteLine(" </ConfigurationOverrideFile>"); 231 ps.WriteLine(" </ConfigurationOverrideFile>");
232 ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]); 232 ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]);
233 ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); 233 ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString()));
234 ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]); 234 ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]);
235 ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]); 235 ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]);
236 ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]); 236 ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]);
237 if (project.Type != ProjectType.Web) 237 if (project.Type != ProjectType.Web)
238 ps.WriteLine(" <OutputPath>{0}</OutputPath>", 238 ps.WriteLine(" <OutputPath>{0}</OutputPath>",
239 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); 239 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
240 else 240 else
241 ps.WriteLine(" <OutputPath>{0}</OutputPath>", 241 ps.WriteLine(" <OutputPath>{0}</OutputPath>",
242 Helper.EndPath(Helper.NormalizePath("bin\\"))); 242 Helper.EndPath(Helper.NormalizePath("bin\\")));
243 243
244 ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]); 244 ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]);
245 ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]); 245 ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]);
246 ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]); 246 ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]);
247 ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]); 247 ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]);
248 ps.WriteLine(" <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]); 248 ps.WriteLine(" <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]);
249 ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]); 249 ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]);
250 ps.WriteLine(" <PlatformTarget>{0}</PlatformTarget>", conf.Platform); 250 ps.WriteLine(" <PlatformTarget>{0}</PlatformTarget>", conf.Platform);
251 ps.WriteLine(" </PropertyGroup>"); 251 ps.WriteLine(" </PropertyGroup>");
252 } 252 }
253 253
254 //ps.WriteLine(" </Settings>"); 254 //ps.WriteLine(" </Settings>");
255 255
256 Dictionary<ReferenceNode, ProjectNode> projectReferences = new Dictionary<ReferenceNode, ProjectNode>(); 256 Dictionary<ReferenceNode, ProjectNode> projectReferences = new Dictionary<ReferenceNode, ProjectNode>();
257 List<ReferenceNode> otherReferences = new List<ReferenceNode>(); 257 List<ReferenceNode> otherReferences = new List<ReferenceNode>();
258 258
259 foreach (ReferenceNode refr in project.References) 259 foreach (ReferenceNode refr in project.References)
260 { 260 {
261 ProjectNode projectNode = FindProjectInSolution(refr.Name, solution); 261 ProjectNode projectNode = FindProjectInSolution(refr.Name, solution);
262 262
263 if (projectNode == null) 263 if (projectNode == null)
264 otherReferences.Add(refr); 264 otherReferences.Add(refr);
265 else 265 else
266 projectReferences.Add(refr, projectNode); 266 projectReferences.Add(refr, projectNode);
267 } 267 }
268 // Assembly References 268 // Assembly References
269 ps.WriteLine(" <ItemGroup>"); 269 ps.WriteLine(" <ItemGroup>");
270 270
271 foreach (ReferenceNode refr in otherReferences) 271 foreach (ReferenceNode refr in otherReferences)
272 { 272 {
273 ps.Write(" <Reference"); 273 ps.Write(" <Reference");
274 ps.Write(" Include=\""); 274 ps.Write(" Include=\"");
275 ps.Write(refr.Name); 275 ps.Write(refr.Name);
276 ps.WriteLine("\" >"); 276 ps.WriteLine("\" >");
277 ps.Write(" <Name>"); 277 ps.Write(" <Name>");
278 ps.Write(refr.Name); 278 ps.Write(refr.Name);
279 ps.WriteLine("</Name>"); 279 ps.WriteLine("</Name>");
280 280
281 if(!String.IsNullOrEmpty(refr.Path)) 281 if(!String.IsNullOrEmpty(refr.Path))
282 { 282 {
283 // Use absolute path to assembly (for determining assembly type) 283 // Use absolute path to assembly (for determining assembly type)
284 string absolutePath = Path.Combine(project.FullPath, refr.Path); 284 string absolutePath = Path.Combine(project.FullPath, refr.Path);
285 if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) { 285 if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) {
286 // Assembly is an executable (exe) 286 // Assembly is an executable (exe)
287 ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "exe")); 287 ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "exe"));
288 } else if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) { 288 } else if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) {
289 // Assembly is an library (dll) 289 // Assembly is an library (dll)
290 ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); 290 ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
291 } else { 291 } else {
292 string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll"); 292 string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll");
293 kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath); 293 kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath);
294 ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); 294 ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
295 } 295 }
296 } 296 }
297 297
298 ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy); 298 ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy);
299 ps.WriteLine(" </Reference>"); 299 ps.WriteLine(" </Reference>");
300 } 300 }
301 ps.WriteLine(" </ItemGroup>"); 301 ps.WriteLine(" </ItemGroup>");
302 302
303 //Project References 303 //Project References
304 ps.WriteLine(" <ItemGroup>"); 304 ps.WriteLine(" <ItemGroup>");
305 foreach (KeyValuePair<ReferenceNode, ProjectNode> pair in projectReferences) 305 foreach (KeyValuePair<ReferenceNode, ProjectNode> pair in projectReferences)
306 { 306 {
307 ToolInfo tool = tools[pair.Value.Language]; 307 ToolInfo tool = tools[pair.Value.Language];
308 if (tools == null) 308 if (tools == null)
309 throw new UnknownLanguageException(); 309 throw new UnknownLanguageException();
310 310
311 string path = 311 string path =
312 Helper.MakePathRelativeTo(project.FullPath, 312 Helper.MakePathRelativeTo(project.FullPath,
313 Helper.MakeFilePath(pair.Value.FullPath, pair.Value.Name, tool.FileExtension)); 313 Helper.MakeFilePath(pair.Value.FullPath, pair.Value.Name, tool.FileExtension));
314 ps.WriteLine(" <ProjectReference Include=\"{0}\">", path); 314 ps.WriteLine(" <ProjectReference Include=\"{0}\">", path);
315 315
316 // TODO: Allow reference to visual basic projects 316 // TODO: Allow reference to visual basic projects
317 ps.WriteLine(" <Name>{0}</Name>", pair.Value.Name); 317 ps.WriteLine(" <Name>{0}</Name>", pair.Value.Name);
318 ps.WriteLine(" <Project>{0}</Project>", pair.Value.Guid.ToString("B").ToUpper()); 318 ps.WriteLine(" <Project>{0}</Project>", pair.Value.Guid.ToString("B").ToUpper());
319 ps.WriteLine(" <Package>{0}</Package>", tool.Guid.ToUpper()); 319 ps.WriteLine(" <Package>{0}</Package>", tool.Guid.ToUpper());
320 320
321 //This is the Copy Local flag in VS 321 //This is the Copy Local flag in VS
322 ps.WriteLine(" <Private>{0}</Private>", pair.Key.LocalCopy); 322 ps.WriteLine(" <Private>{0}</Private>", pair.Key.LocalCopy);
323 323
324 ps.WriteLine(" </ProjectReference>"); 324 ps.WriteLine(" </ProjectReference>");
325 } 325 }
326 ps.WriteLine(" </ItemGroup>"); 326 ps.WriteLine(" </ItemGroup>");
327 327
328 // ps.WriteLine(" </Build>"); 328 // ps.WriteLine(" </Build>");
329 ps.WriteLine(" <ItemGroup>"); 329 ps.WriteLine(" <ItemGroup>");
330 330
331 // ps.WriteLine(" <Include>"); 331 // ps.WriteLine(" <Include>");
332 List<string> list = new List<string>(); 332 List<string> list = new List<string>();
333 333
334 foreach (string path in project.Files) 334 foreach (string path in project.Files)
335 { 335 {
336 string lower = path.ToLower(); 336 string lower = path.ToLower();
337 if (lower.EndsWith(".resx")) 337 if (lower.EndsWith(".resx"))
338 { 338 {
339 string codebehind = String.Format("{0}.Designer{1}", path.Substring(0, path.LastIndexOf('.')), toolInfo.LanguageExtension); 339 string codebehind = String.Format("{0}.Designer{1}", path.Substring(0, path.LastIndexOf('.')), toolInfo.LanguageExtension);
340 if (!list.Contains(codebehind)) 340 if (!list.Contains(codebehind))
341 list.Add(codebehind); 341 list.Add(codebehind);
342 } 342 }
343 343
344 } 344 }
345 345
346 346
347 foreach (string filePath in project.Files) 347 foreach (string filePath in project.Files)
348 { 348 {
349 // Add the filePath with the destination as the key 349 // Add the filePath with the destination as the key
350 // will use it later to form the copy parameters with Include lists 350 // will use it later to form the copy parameters with Include lists
351 // for each destination 351 // for each destination
352 if (project.Files.GetBuildAction(filePath) == BuildAction.Copy) 352 if (project.Files.GetBuildAction(filePath) == BuildAction.Copy)
353 continue; 353 continue;
354 // if (file == "Properties\\Bind.Designer.cs") 354 // if (file == "Properties\\Bind.Designer.cs")
355 // { 355 // {
356 // Console.WriteLine("Wait a minute!"); 356 // Console.WriteLine("Wait a minute!");
357 // Console.WriteLine(project.Files.GetSubType(file).ToString()); 357 // Console.WriteLine(project.Files.GetSubType(file).ToString());
358 // } 358 // }
359 SubType subType = project.Files.GetSubType(filePath); 359 SubType subType = project.Files.GetSubType(filePath);
360 360
361 // Visual Studio chokes on file names if forward slash is used as a path separator 361 // Visual Studio chokes on file names if forward slash is used as a path separator
362 // instead of backslash. So we must make sure that all file paths written to the 362 // instead of backslash. So we must make sure that all file paths written to the
363 // project file use \ as a path separator. 363 // project file use \ as a path separator.
364 string file = filePath.Replace(@"/", @"\"); 364 string file = filePath.Replace(@"/", @"\");
365 365
366 if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer 366 if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer
367 && subType != SubType.CodeBehind) 367 && subType != SubType.CodeBehind)
368 { 368 {
369 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 369 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
370 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file)); 370 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file));
371 ps.WriteLine(" <SubType>Designer</SubType>"); 371 ps.WriteLine(" <SubType>Designer</SubType>");
372 ps.WriteLine(" </EmbeddedResource>"); 372 ps.WriteLine(" </EmbeddedResource>");
373 // 373 //
374 } 374 }
375 375
376 if (subType == SubType.Designer) 376 if (subType == SubType.Designer)
377 { 377 {
378 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file); 378 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file);
379 379
380 string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"; 380 string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs";
381 string dependent_name = filePath.Substring(0, file.LastIndexOf('.')) + ".cs"; 381 string dependent_name = filePath.Substring(0, file.LastIndexOf('.')) + ".cs";
382 382
383 // Check for a parent .cs file with the same name as this designer file 383 // Check for a parent .cs file with the same name as this designer file
384 if (File.Exists(Helper.NormalizePath(dependent_name))) 384 if (File.Exists(Helper.NormalizePath(dependent_name)))
385 { 385 {
386 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); 386 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name));
387 } 387 }
388 else 388 else
389 { 389 {
390 ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>"); 390 ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>");
391 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", Path.GetFileName(autogen_name)); 391 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", Path.GetFileName(autogen_name));
392 ps.WriteLine(" <SubType>" + subType + "</SubType>"); 392 ps.WriteLine(" <SubType>" + subType + "</SubType>");
393 } 393 }
394 394
395 ps.WriteLine(" </EmbeddedResource>"); 395 ps.WriteLine(" </EmbeddedResource>");
396 if (File.Exists(Helper.NormalizePath(autogen_name))) 396 if (File.Exists(Helper.NormalizePath(autogen_name)))
397 { 397 {
398 ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name); 398 ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name);
399 //ps.WriteLine(" <DesignTime>True</DesignTime>"); 399 //ps.WriteLine(" <DesignTime>True</DesignTime>");
400 400
401 // If a parent .cs file exists, link this autogen file to it. Otherwise link 401 // If a parent .cs file exists, link this autogen file to it. Otherwise link
402 // to the designer file 402 // to the designer file
403 if (File.Exists(dependent_name)) 403 if (File.Exists(dependent_name))
404 { 404 {
405 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); 405 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name));
406 } 406 }
407 else 407 else
408 { 408 {
409 ps.WriteLine(" <AutoGen>True</AutoGen>"); 409 ps.WriteLine(" <AutoGen>True</AutoGen>");
410 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(filePath)); 410 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(filePath));
411 } 411 }
412 412
413 ps.WriteLine(" </Compile>"); 413 ps.WriteLine(" </Compile>");
414 } 414 }
415 list.Add(autogen_name); 415 list.Add(autogen_name);
416 } 416 }
417 if (subType == SubType.Settings) 417 if (subType == SubType.Settings)
418 { 418 {
419 ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); 419 ps.Write(" <{0} ", project.Files.GetBuildAction(filePath));
420 ps.WriteLine("Include=\"{0}\">", file); 420 ps.WriteLine("Include=\"{0}\">", file);
421 string fileName = Path.GetFileName(filePath); 421 string fileName = Path.GetFileName(filePath);
422 if (project.Files.GetBuildAction(filePath) == BuildAction.None) 422 if (project.Files.GetBuildAction(filePath) == BuildAction.None)
423 { 423 {
424 ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>"); 424 ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>");
425 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); 425 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs");
426 } 426 }
427 else 427 else
428 { 428 {
429 ps.WriteLine(" <SubType>Code</SubType>"); 429 ps.WriteLine(" <SubType>Code</SubType>");
430 ps.WriteLine(" <AutoGen>True</AutoGen>"); 430 ps.WriteLine(" <AutoGen>True</AutoGen>");
431 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); 431 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
432 string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); 432 string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.'));
433 string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); 433 string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.'));
434 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings")); 434 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings"));
435 } 435 }
436 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath)); 436 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath));
437 } 437 }
438 else if (subType != SubType.Designer) 438 else if (subType != SubType.Designer)
439 { 439 {
440 string path = Helper.NormalizePath(file); 440 string path = Helper.NormalizePath(file);
441 string path_lower = path.ToLower(); 441 string path_lower = path.ToLower();
442 442
443 if (!list.Contains(filePath)) 443 if (!list.Contains(filePath))
444 { 444 {
445 ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); 445 ps.Write(" <{0} ", project.Files.GetBuildAction(filePath));
446 446
447 int startPos = 0; 447 int startPos = 0;
448 if (project.Files.GetPreservePath(filePath)) 448 if (project.Files.GetPreservePath(filePath))
449 { 449 {
450 while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1) 450 while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1)
451 startPos++; 451 startPos++;
452 452
453 } 453 }
454 else 454 else
455 { 455 {
456 startPos = file.LastIndexOf(Path.GetFileName(path)); 456 startPos = file.LastIndexOf(Path.GetFileName(path));
457 } 457 }
458 458
459 // be sure to write out the path with backslashes so VS recognizes 459 // be sure to write out the path with backslashes so VS recognizes
460 // the file properly. 460 // the file properly.
461 ps.WriteLine("Include=\"{0}\">", file); 461 ps.WriteLine("Include=\"{0}\">", file);
462 462
463 int last_period_index = file.LastIndexOf('.'); 463 int last_period_index = file.LastIndexOf('.');
464 string short_file_name = (last_period_index >= 0) 464 string short_file_name = (last_period_index >= 0)
465 ? file.Substring(0, last_period_index) 465 ? file.Substring(0, last_period_index)
466 : file; 466 : file;
467 string extension = Path.GetExtension(path); 467 string extension = Path.GetExtension(path);
468 // make this upper case, so that when File.Exists tests for the 468 // make this upper case, so that when File.Exists tests for the
469 // existence of a designer file on a case-sensitive platform, 469 // existence of a designer file on a case-sensitive platform,
470 // it is correctly identified. 470 // it is correctly identified.
471 string designer_format = string.Format(".Designer{0}", extension); 471 string designer_format = string.Format(".Designer{0}", extension);
472 472
473 if (path_lower.EndsWith(designer_format.ToLowerInvariant())) 473 if (path_lower.EndsWith(designer_format.ToLowerInvariant()))
474 { 474 {
475 int designer_index = path.IndexOf(designer_format); 475 int designer_index = path.IndexOf(designer_format);
476 string file_name = path.Substring(0, designer_index); 476 string file_name = path.Substring(0, designer_index);
477 477
478 // There are two corrections to the next lines: 478 // There are two corrections to the next lines:
479 // 1. Fix the connection between a designer file and a form 479 // 1. Fix the connection between a designer file and a form
480 // or usercontrol that don't have an associated resx file. 480 // or usercontrol that don't have an associated resx file.
481 // 2. Connect settings files to associated designer files. 481 // 2. Connect settings files to associated designer files.
482 if (File.Exists(file_name + extension)) 482 if (File.Exists(file_name + extension))
483 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + extension)); 483 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + extension));
484 else if (File.Exists(file_name + ".resx")) 484 else if (File.Exists(file_name + ".resx"))
485 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx")); 485 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx"));
486 else if (File.Exists(file_name + ".settings")) 486 else if (File.Exists(file_name + ".settings"))
487 { 487 {
488 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".settings")); 488 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".settings"));
489 ps.WriteLine(" <AutoGen>True</AutoGen>"); 489 ps.WriteLine(" <AutoGen>True</AutoGen>");
490 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); 490 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
491 } 491 }
492 } 492 }
493 else if (subType == SubType.CodeBehind) 493 else if (subType == SubType.CodeBehind)
494 { 494 {
495 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(short_file_name)); 495 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(short_file_name));
496 } 496 }
497 if (project.Files.GetIsLink(filePath)) 497 if (project.Files.GetIsLink(filePath))
498 { 498 {
499 string alias = project.Files.GetLinkPath(filePath); 499 string alias = project.Files.GetLinkPath(filePath);
500 alias += file.Substring(startPos); 500 alias += file.Substring(startPos);
501 alias = Helper.NormalizePath(alias); 501 alias = Helper.NormalizePath(alias);
502 ps.WriteLine(" <Link>{0}</Link>", alias); 502 ps.WriteLine(" <Link>{0}</Link>", alias);
503 } 503 }
504 else if (project.Files.GetBuildAction(filePath) != BuildAction.None) 504 else if (project.Files.GetBuildAction(filePath) != BuildAction.None)
505 { 505 {
506 if (project.Files.GetBuildAction(filePath) != BuildAction.EmbeddedResource) 506 if (project.Files.GetBuildAction(filePath) != BuildAction.EmbeddedResource)
507 { 507 {
508 ps.WriteLine(" <SubType>{0}</SubType>", subType); 508 ps.WriteLine(" <SubType>{0}</SubType>", subType);
509 } 509 }
510 } 510 }
511 511
512 if (project.Files.GetCopyToOutput(filePath) != CopyToOutput.Never) 512 if (project.Files.GetCopyToOutput(filePath) != CopyToOutput.Never)
513 { 513 {
514 ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(filePath)); 514 ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(filePath));
515 } 515 }
516 516
517 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath)); 517 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath));
518 } 518 }
519 } 519 }
520 } 520 }
521 ps.WriteLine(" </ItemGroup>"); 521 ps.WriteLine(" </ItemGroup>");
522 522
523 /* 523 /*
@@ -553,420 +553,420 @@ namespace Prebuild.Core.Targets
553 ps.WriteLine(" </Target>"); 553 ps.WriteLine(" </Target>");
554 } 554 }
555 555
556 ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />"); 556 ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />");
557 ps.WriteLine(" <PropertyGroup>"); 557 ps.WriteLine(" <PropertyGroup>");
558 ps.WriteLine(" <PreBuildEvent>"); 558 ps.WriteLine(" <PreBuildEvent>");
559 ps.WriteLine(" </PreBuildEvent>"); 559 ps.WriteLine(" </PreBuildEvent>");
560 ps.WriteLine(" <PostBuildEvent>"); 560 ps.WriteLine(" <PostBuildEvent>");
561 ps.WriteLine(" </PostBuildEvent>"); 561 ps.WriteLine(" </PostBuildEvent>");
562 ps.WriteLine(" </PropertyGroup>"); 562 ps.WriteLine(" </PropertyGroup>");
563 ps.WriteLine("</Project>"); 563 ps.WriteLine("</Project>");
564 } 564 }
565 #endregion 565 #endregion
566 566
567 #region User File 567 #region User File
568 568
569 ps = new StreamWriter(projectFile + ".user"); 569 ps = new StreamWriter(projectFile + ".user");
570 using (ps) 570 using (ps)
571 { 571 {
572 // Get the first configuration from the project. 572 // Get the first configuration from the project.
573 ConfigurationNode firstConfiguration = null; 573 ConfigurationNode firstConfiguration = null;
574 574
575 if (project.Configurations.Count > 0) 575 if (project.Configurations.Count > 0)
576 { 576 {
577 firstConfiguration = project.Configurations[0]; 577 firstConfiguration = project.Configurations[0];
578 } 578 }
579 579
580 ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); 580 ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
581 //ps.WriteLine( "<VisualStudioProject>" ); 581 //ps.WriteLine( "<VisualStudioProject>" );
582 //ps.WriteLine(" <{0}>", toolInfo.XMLTag); 582 //ps.WriteLine(" <{0}>", toolInfo.XMLTag);
583 //ps.WriteLine(" <Build>"); 583 //ps.WriteLine(" <Build>");
584 ps.WriteLine(" <PropertyGroup>"); 584 ps.WriteLine(" <PropertyGroup>");
585 //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); 585 //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
586 586
587 if (firstConfiguration != null) 587 if (firstConfiguration != null)
588 { 588 {
589 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">{0}</Configuration>", firstConfiguration.Name); 589 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">{0}</Configuration>", firstConfiguration.Name);
590 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">{0}</Platform>", firstConfiguration.Platform); 590 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">{0}</Platform>", firstConfiguration.Platform);
591 } 591 }
592 592
593 ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project)); 593 ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project));
594 ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", ProductVersion); 594 ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", ProductVersion);
595 ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>"); 595 ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>");
596 ps.WriteLine(" <ProjectTrust>0</ProjectTrust>"); 596 ps.WriteLine(" <ProjectTrust>0</ProjectTrust>");
597 ps.WriteLine(" </PropertyGroup>"); 597 ps.WriteLine(" </PropertyGroup>");
598 foreach (ConfigurationNode conf in project.Configurations) 598 foreach (ConfigurationNode conf in project.Configurations)
599 { 599 {
600 ps.Write(" <PropertyGroup"); 600 ps.Write(" <PropertyGroup");
601 ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|{1}' \"", conf.Name, conf.Platform); 601 ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|{1}' \"", conf.Name, conf.Platform);
602 ps.WriteLine(" />"); 602 ps.WriteLine(" />");
603 } 603 }
604 ps.WriteLine("</Project>"); 604 ps.WriteLine("</Project>");
605 } 605 }
606 #endregion 606 #endregion
607 607
608 kernel.CurrentWorkingDirectory.Pop(); 608 kernel.CurrentWorkingDirectory.Pop();
609 } 609 }
610 610
611 private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk) 611 private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk)
612 { 612 {
613 kernel.Log.Write("Creating {0} solution and project files", VersionName); 613 kernel.Log.Write("Creating {0} solution and project files", VersionName);
614 614
615 foreach (SolutionNode child in solution.Solutions) 615 foreach (SolutionNode child in solution.Solutions)
616 { 616 {
617 kernel.Log.Write("...Creating folder: {0}", child.Name); 617 kernel.Log.Write("...Creating folder: {0}", child.Name);
618 WriteSolution(child, false); 618 WriteSolution(child, false);
619 } 619 }
620 620
621 foreach (ProjectNode project in solution.Projects) 621 foreach (ProjectNode project in solution.Projects)
622 { 622 {
623 kernel.Log.Write("...Creating project: {0}", project.Name); 623 kernel.Log.Write("...Creating project: {0}", project.Name);
624 WriteProject(solution, project); 624 WriteProject(solution, project);
625 } 625 }
626 626
627 foreach (DatabaseProjectNode project in solution.DatabaseProjects) 627 foreach (DatabaseProjectNode project in solution.DatabaseProjects)
628 { 628 {
629 kernel.Log.Write("...Creating database project: {0}", project.Name); 629 kernel.Log.Write("...Creating database project: {0}", project.Name);
630 WriteDatabaseProject(solution, project); 630 WriteDatabaseProject(solution, project);
631 } 631 }
632 632
633 if (writeSolutionToDisk) // only write main solution 633 if (writeSolutionToDisk) // only write main solution
634 { 634 {
635 kernel.Log.Write(""); 635 kernel.Log.Write("");
636 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 636 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
637 637
638 using (StreamWriter ss = new StreamWriter(solutionFile)) 638 using (StreamWriter ss = new StreamWriter(solutionFile))
639 { 639 {
640 kernel.CurrentWorkingDirectory.Push(); 640 kernel.CurrentWorkingDirectory.Push();
641 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); 641 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
642 642
643 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion); 643 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion);
644 ss.WriteLine(SolutionTag); 644 ss.WriteLine(SolutionTag);
645 645
646 WriteProjectDeclarations(ss, solution, solution); 646 WriteProjectDeclarations(ss, solution, solution);
647 647
648 ss.WriteLine("Global"); 648 ss.WriteLine("Global");
649 649
650 ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution"); 650 ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution");
651 foreach (ConfigurationNode conf in solution.Configurations) 651 foreach (ConfigurationNode conf in solution.Configurations)
652 { 652 {
653 ss.WriteLine("\t\t{0} = {0}", conf.NameAndPlatform); 653 ss.WriteLine("\t\t{0} = {0}", conf.NameAndPlatform);
654 } 654 }
655 ss.WriteLine("\tEndGlobalSection"); 655 ss.WriteLine("\tEndGlobalSection");
656 656
657 ss.WriteLine("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution"); 657 ss.WriteLine("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution");
658 WriteConfigurationLines(solution.Configurations, solution, ss); 658 WriteConfigurationLines(solution.Configurations, solution, ss);
659 ss.WriteLine("\tEndGlobalSection"); 659 ss.WriteLine("\tEndGlobalSection");
660 660
661 if (solution.Solutions.Count > 0) 661 if (solution.Solutions.Count > 0)
662 { 662 {
663 ss.WriteLine("\tGlobalSection(NestedProjects) = preSolution"); 663 ss.WriteLine("\tGlobalSection(NestedProjects) = preSolution");
664 foreach (SolutionNode embeddedSolution in solution.Solutions) 664 foreach (SolutionNode embeddedSolution in solution.Solutions)
665 { 665 {
666 WriteNestedProjectMap(ss, embeddedSolution); 666 WriteNestedProjectMap(ss, embeddedSolution);
667 } 667 }
668 ss.WriteLine("\tEndGlobalSection"); 668 ss.WriteLine("\tEndGlobalSection");
669 } 669 }
670 670
671 ss.WriteLine("EndGlobal"); 671 ss.WriteLine("EndGlobal");
672 } 672 }
673 673
674 kernel.CurrentWorkingDirectory.Pop(); 674 kernel.CurrentWorkingDirectory.Pop();
675 } 675 }
676 } 676 }
677 677
678 private void WriteProjectDeclarations(TextWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution) 678 private void WriteProjectDeclarations(TextWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution)
679 { 679 {
680 foreach (SolutionNode childSolution in embeddedSolution.Solutions) 680 foreach (SolutionNode childSolution in embeddedSolution.Solutions)
681 { 681 {
682 WriteEmbeddedSolution(writer, childSolution); 682 WriteEmbeddedSolution(writer, childSolution);
683 WriteProjectDeclarations(writer, actualSolution, childSolution); 683 WriteProjectDeclarations(writer, actualSolution, childSolution);
684 } 684 }
685 685
686 foreach (ProjectNode project in embeddedSolution.Projects) 686 foreach (ProjectNode project in embeddedSolution.Projects)
687 { 687 {
688 WriteProject(actualSolution, writer, project); 688 WriteProject(actualSolution, writer, project);
689 } 689 }
690 690
691 foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects) 691 foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects)
692 { 692 {
693 WriteProject(actualSolution, writer, dbProject); 693 WriteProject(actualSolution, writer, dbProject);
694 } 694 }
695 695
696 if (actualSolution.Guid == embeddedSolution.Guid) 696 if (actualSolution.Guid == embeddedSolution.Guid)
697 { 697 {
698 WriteSolutionFiles(actualSolution, writer); 698 WriteSolutionFiles(actualSolution, writer);
699 } 699 }
700 } 700 }
701 701
702 private static void WriteNestedProjectMap(TextWriter writer, SolutionNode embeddedSolution) 702 private static void WriteNestedProjectMap(TextWriter writer, SolutionNode embeddedSolution)
703 { 703 {
704 foreach (ProjectNode project in embeddedSolution.Projects) 704 foreach (ProjectNode project in embeddedSolution.Projects)
705 { 705 {
706 WriteNestedProject(writer, embeddedSolution, project.Guid); 706 WriteNestedProject(writer, embeddedSolution, project.Guid);
707 } 707 }
708 708
709 foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects) 709 foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects)
710 { 710 {
711 WriteNestedProject(writer, embeddedSolution, dbProject.Guid); 711 WriteNestedProject(writer, embeddedSolution, dbProject.Guid);
712 } 712 }
713 713
714 foreach (SolutionNode child in embeddedSolution.Solutions) 714 foreach (SolutionNode child in embeddedSolution.Solutions)
715 { 715 {
716 WriteNestedProject(writer, embeddedSolution, child.Guid); 716 WriteNestedProject(writer, embeddedSolution, child.Guid);
717 WriteNestedProjectMap(writer, child); 717 WriteNestedProjectMap(writer, child);
718 } 718 }
719 } 719 }
720 720
721 private static void WriteNestedProject(TextWriter writer, SolutionNode solution, Guid projectGuid) 721 private static void WriteNestedProject(TextWriter writer, SolutionNode solution, Guid projectGuid)
722 { 722 {
723 WriteNestedFolder(writer, solution.Guid, projectGuid); 723 WriteNestedFolder(writer, solution.Guid, projectGuid);
724 } 724 }
725 725
726 private static void WriteNestedFolder(TextWriter writer, Guid parentGuid, Guid childGuid) 726 private static void WriteNestedFolder(TextWriter writer, Guid parentGuid, Guid childGuid)
727 { 727 {
728 writer.WriteLine("\t\t{0} = {1}", 728 writer.WriteLine("\t\t{0} = {1}",
729 childGuid.ToString("B").ToUpper(), 729 childGuid.ToString("B").ToUpper(),
730 parentGuid.ToString("B").ToUpper()); 730 parentGuid.ToString("B").ToUpper());
731 } 731 }
732 732
733 private static void WriteConfigurationLines(IEnumerable<ConfigurationNode> configurations, SolutionNode solution, TextWriter ss) 733 private static void WriteConfigurationLines(IEnumerable<ConfigurationNode> configurations, SolutionNode solution, TextWriter ss)
734 { 734 {
735 foreach (ProjectNode project in solution.Projects) 735 foreach (ProjectNode project in solution.Projects)
736 { 736 {
737 foreach (ConfigurationNode conf in configurations) 737 foreach (ConfigurationNode conf in configurations)
738 { 738 {
739 ss.WriteLine("\t\t{0}.{1}.ActiveCfg = {1}", 739 ss.WriteLine("\t\t{0}.{1}.ActiveCfg = {1}",
740 project.Guid.ToString("B").ToUpper(), 740 project.Guid.ToString("B").ToUpper(),
741 conf.NameAndPlatform); 741 conf.NameAndPlatform);
742 742
743 ss.WriteLine("\t\t{0}.{1}.Build.0 = {1}", 743 ss.WriteLine("\t\t{0}.{1}.Build.0 = {1}",
744 project.Guid.ToString("B").ToUpper(), 744 project.Guid.ToString("B").ToUpper(),
745 conf.NameAndPlatform); 745 conf.NameAndPlatform);
746 } 746 }
747 } 747 }
748 748
749 foreach (SolutionNode child in solution.Solutions) 749 foreach (SolutionNode child in solution.Solutions)
750 { 750 {
751 WriteConfigurationLines(configurations, child, ss); 751 WriteConfigurationLines(configurations, child, ss);
752 } 752 }
753 } 753 }
754 754
755 private void WriteSolutionFiles(SolutionNode solution, TextWriter ss) 755 private void WriteSolutionFiles(SolutionNode solution, TextWriter ss)
756 { 756 {
757 if(solution.Files != null && solution.Files.Count > 0) 757 if(solution.Files != null && solution.Files.Count > 0)
758 WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files); 758 WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files);
759 } 759 }
760 760
761 private void WriteEmbeddedSolution(TextWriter writer, SolutionNode embeddedSolution) 761 private void WriteEmbeddedSolution(TextWriter writer, SolutionNode embeddedSolution)
762 { 762 {
763 WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files); 763 WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files);
764 } 764 }
765 765
766 private void WriteProject(SolutionNode solution, TextWriter ss, ProjectNode project) 766 private void WriteProject(SolutionNode solution, TextWriter ss, ProjectNode project)
767 { 767 {
768 WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath); 768 WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath);
769 } 769 }
770 770
771 private void WriteProject(SolutionNode solution, TextWriter ss, DatabaseProjectNode dbProject) 771 private void WriteProject(SolutionNode solution, TextWriter ss, DatabaseProjectNode dbProject)
772 { 772 {
773 if (solution.Files != null && solution.Files.Count > 0) 773 if (solution.Files != null && solution.Files.Count > 0)
774 WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath); 774 WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath);
775 } 775 }
776 776
777 const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\""; 777 const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\"";
778 const string ProjectDeclarationEndFormat = "EndProject"; 778 const string ProjectDeclarationEndFormat = "EndProject";
779 779
780 private void WriteProject(TextWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath) 780 private void WriteProject(TextWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath)
781 { 781 {
782 if (!tools.ContainsKey(language)) 782 if (!tools.ContainsKey(language))
783 throw new UnknownLanguageException("Unknown .NET language: " + language); 783 throw new UnknownLanguageException("Unknown .NET language: " + language);
784 784
785 ToolInfo toolInfo = tools[language]; 785 ToolInfo toolInfo = tools[language];
786 786
787 string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath); 787 string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath);
788 788
789 path = Helper.MakeFilePath(path, name, toolInfo.FileExtension); 789 path = Helper.MakeFilePath(path, name, toolInfo.FileExtension);
790 790
791 WriteProject(ss, language, guid, name, path); 791 WriteProject(ss, language, guid, name, path);
792 } 792 }
793 793
794 private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location) 794 private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location)
795 { 795 {
796 WriteProject(writer, language, projectGuid, name, location, null); 796 WriteProject(writer, language, projectGuid, name, location, null);
797 } 797 }
798 798
799 private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files) 799 private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files)
800 { 800 {
801 if (!tools.ContainsKey(language)) 801 if (!tools.ContainsKey(language))
802 throw new UnknownLanguageException("Unknown .NET language: " + language); 802 throw new UnknownLanguageException("Unknown .NET language: " + language);
803 803
804 ToolInfo toolInfo = tools[language]; 804 ToolInfo toolInfo = tools[language];
805 805
806 writer.WriteLine(ProjectDeclarationBeginFormat, 806 writer.WriteLine(ProjectDeclarationBeginFormat,
807 toolInfo.Guid, 807 toolInfo.Guid,
808 name, 808 name,
809 location, 809 location,
810 projectGuid.ToString("B").ToUpper()); 810 projectGuid.ToString("B").ToUpper());
811 811
812 if (files != null) 812 if (files != null)
813 { 813 {
814 writer.WriteLine("\tProjectSection(SolutionItems) = preProject"); 814 writer.WriteLine("\tProjectSection(SolutionItems) = preProject");
815 815
816 foreach (string file in files) 816 foreach (string file in files)
817 writer.WriteLine("\t\t{0} = {0}", file); 817 writer.WriteLine("\t\t{0} = {0}", file);
818 818
819 writer.WriteLine("\tEndProjectSection"); 819 writer.WriteLine("\tEndProjectSection");
820 } 820 }
821 821
822 writer.WriteLine(ProjectDeclarationEndFormat); 822 writer.WriteLine(ProjectDeclarationEndFormat);
823 } 823 }
824 824
825 private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project) 825 private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project)
826 { 826 {
827 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp"); 827 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp");
828 IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " "); 828 IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " ");
829 829
830 kernel.CurrentWorkingDirectory.Push(); 830 kernel.CurrentWorkingDirectory.Push();
831 831
832 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); 832 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
833 833
834 using (ps) 834 using (ps)
835 { 835 {
836 ps.WriteLine("# Microsoft Developer Studio Project File - Database Project"); 836 ps.WriteLine("# Microsoft Developer Studio Project File - Database Project");
837 ps.WriteLine("Begin DataProject = \"{0}\"", project.Name); 837 ps.WriteLine("Begin DataProject = \"{0}\"", project.Name);
838 ps.Indent++; 838 ps.Indent++;
839 ps.WriteLine("MSDTVersion = \"80\""); 839 ps.WriteLine("MSDTVersion = \"80\"");
840 // TODO: Use the project.Files property 840 // TODO: Use the project.Files property
841 if (ContainsSqlFiles(Path.GetDirectoryName(projectFile))) 841 if (ContainsSqlFiles(Path.GetDirectoryName(projectFile)))
842 WriteDatabaseFoldersAndFiles(ps, Path.GetDirectoryName(projectFile)); 842 WriteDatabaseFoldersAndFiles(ps, Path.GetDirectoryName(projectFile));
843 843
844 ps.WriteLine("Begin DBRefFolder = \"Database References\""); 844 ps.WriteLine("Begin DBRefFolder = \"Database References\"");
845 ps.Indent++; 845 ps.Indent++;
846 foreach (DatabaseReferenceNode reference in project.References) 846 foreach (DatabaseReferenceNode reference in project.References)
847 { 847 {
848 ps.WriteLine("Begin DBRefNode = \"{0}\"", reference.Name); 848 ps.WriteLine("Begin DBRefNode = \"{0}\"", reference.Name);
849 ps.Indent++; 849 ps.Indent++;
850 ps.WriteLine("ConnectStr = \"{0}\"", reference.ConnectionString); 850 ps.WriteLine("ConnectStr = \"{0}\"", reference.ConnectionString);
851 ps.WriteLine("Provider = \"{0}\"", reference.ProviderId.ToString("B").ToUpper()); 851 ps.WriteLine("Provider = \"{0}\"", reference.ProviderId.ToString("B").ToUpper());
852 //ps.WriteLine("Colorizer = 5"); 852 //ps.WriteLine("Colorizer = 5");
853 ps.Indent--; 853 ps.Indent--;
854 ps.WriteLine("End"); 854 ps.WriteLine("End");
855 } 855 }
856 ps.Indent--; 856 ps.Indent--;
857 ps.WriteLine("End"); 857 ps.WriteLine("End");
858 ps.Indent--; 858 ps.Indent--;
859 ps.WriteLine("End"); 859 ps.WriteLine("End");
860 860
861 ps.Flush(); 861 ps.Flush();
862 } 862 }
863 863
864 kernel.CurrentWorkingDirectory.Pop(); 864 kernel.CurrentWorkingDirectory.Pop();
865 } 865 }
866 866
867 private static bool ContainsSqlFiles(string folder) 867 private static bool ContainsSqlFiles(string folder)
868 { 868 {
869 if(Directory.GetFiles(folder, "*.sql").Length > 0) 869 if(Directory.GetFiles(folder, "*.sql").Length > 0)
870 return true; // if the folder contains 1 .sql file, that's good enough 870 return true; // if the folder contains 1 .sql file, that's good enough
871 871
872 foreach (string child in Directory.GetDirectories(folder)) 872 foreach (string child in Directory.GetDirectories(folder))
873 { 873 {
874 if (ContainsSqlFiles(child)) 874 if (ContainsSqlFiles(child))
875 return true; // if 1 child folder contains a .sql file, still good enough 875 return true; // if 1 child folder contains a .sql file, still good enough
876 } 876 }
877 877
878 return false; 878 return false;
879 } 879 }
880 880
881 private static void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder) 881 private static void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder)
882 { 882 {
883 foreach (string child in Directory.GetDirectories(folder)) 883 foreach (string child in Directory.GetDirectories(folder))
884 { 884 {
885 if (ContainsSqlFiles(child)) 885 if (ContainsSqlFiles(child))
886 { 886 {
887 writer.WriteLine("Begin Folder = \"{0}\"", Path.GetFileName(child)); 887 writer.WriteLine("Begin Folder = \"{0}\"", Path.GetFileName(child));
888 writer.Indent++; 888 writer.Indent++;
889 WriteDatabaseFoldersAndFiles(writer, child); 889 WriteDatabaseFoldersAndFiles(writer, child);
890 writer.Indent--; 890 writer.Indent--;
891 writer.WriteLine("End"); 891 writer.WriteLine("End");
892 } 892 }
893 } 893 }
894 foreach (string file in Directory.GetFiles(folder, "*.sql")) 894 foreach (string file in Directory.GetFiles(folder, "*.sql"))
895 { 895 {
896 writer.WriteLine("Script = \"{0}\"", Path.GetFileName(file)); 896 writer.WriteLine("Script = \"{0}\"", Path.GetFileName(file));
897 } 897 }
898 } 898 }
899 899
900 private void CleanProject(ProjectNode project) 900 private void CleanProject(ProjectNode project)
901 { 901 {
902 kernel.Log.Write("...Cleaning project: {0}", project.Name); 902 kernel.Log.Write("...Cleaning project: {0}", project.Name);
903 903
904 ToolInfo toolInfo = tools[project.Language]; 904 ToolInfo toolInfo = tools[project.Language];
905 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 905 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
906 string userFile = projectFile + ".user"; 906 string userFile = projectFile + ".user";
907 907
908 Helper.DeleteIfExists(projectFile); 908 Helper.DeleteIfExists(projectFile);
909 Helper.DeleteIfExists(userFile); 909 Helper.DeleteIfExists(userFile);
910 } 910 }
911 911
912 private void CleanSolution(SolutionNode solution) 912 private void CleanSolution(SolutionNode solution)
913 { 913 {
914 kernel.Log.Write("Cleaning {0} solution and project files", VersionName, solution.Name); 914 kernel.Log.Write("Cleaning {0} solution and project files", VersionName, solution.Name);
915 915
916 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 916 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
917 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); 917 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
918 918
919 Helper.DeleteIfExists(slnFile); 919 Helper.DeleteIfExists(slnFile);
920 Helper.DeleteIfExists(suoFile); 920 Helper.DeleteIfExists(suoFile);
921 921
922 foreach (ProjectNode project in solution.Projects) 922 foreach (ProjectNode project in solution.Projects)
923 { 923 {
924 CleanProject(project); 924 CleanProject(project);
925 } 925 }
926 926
927 kernel.Log.Write(""); 927 kernel.Log.Write("");
928 } 928 }
929 929
930 #endregion 930 #endregion
931 931
932 #region ITarget Members 932 #region ITarget Members
933 933
934 /// <summary> 934 /// <summary>
935 /// Writes the specified kern. 935 /// Writes the specified kern.
936 /// </summary> 936 /// </summary>
937 /// <param name="kern">The kern.</param> 937 /// <param name="kern">The kern.</param>
938 public virtual void Write(Kernel kern) 938 public virtual void Write(Kernel kern)
939 { 939 {
940 if (kern == null) 940 if (kern == null)
941 { 941 {
942 throw new ArgumentNullException("kern"); 942 throw new ArgumentNullException("kern");
943 } 943 }
944 kernel = kern; 944 kernel = kern;
945 foreach (SolutionNode sol in kernel.Solutions) 945 foreach (SolutionNode sol in kernel.Solutions)
946 { 946 {
947 WriteSolution(sol, true); 947 WriteSolution(sol, true);
948 } 948 }
949 kernel = null; 949 kernel = null;
950 } 950 }
951 951
952 /// <summary> 952 /// <summary>
953 /// Cleans the specified kern. 953 /// Cleans the specified kern.
954 /// </summary> 954 /// </summary>
955 /// <param name="kern">The kern.</param> 955 /// <param name="kern">The kern.</param>
956 public virtual void Clean(Kernel kern) 956 public virtual void Clean(Kernel kern)
957 { 957 {
958 if (kern == null) 958 if (kern == null)
959 { 959 {
960 throw new ArgumentNullException("kern"); 960 throw new ArgumentNullException("kern");
961 } 961 }
962 kernel = kern; 962 kernel = kern;
963 foreach (SolutionNode sol in kernel.Solutions) 963 foreach (SolutionNode sol in kernel.Solutions)
964 { 964 {
965 CleanSolution(sol); 965 CleanSolution(sol);
966 } 966 }
967 kernel = null; 967 kernel = null;
968 } 968 }
969 969
970 #endregion 970 #endregion
971 } 971 }
972} 972}
diff --git a/Prebuild/src/Core/Targets/VSVersion.cs b/Prebuild/src/Core/Targets/VSVersion.cs
index 699b5ca..a7434c6 100644
--- a/Prebuild/src/Core/Targets/VSVersion.cs
+++ b/Prebuild/src/Core/Targets/VSVersion.cs
@@ -5,16 +5,16 @@ Copyright (c) 2008-2009 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -25,30 +25,30 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
25 25
26namespace Prebuild.Core.Targets 26namespace Prebuild.Core.Targets
27{ 27{
28 /// <summary> 28 /// <summary>
29 /// 29 ///
30 /// </summary> 30 /// </summary>
31 public enum VSVersion 31 public enum VSVersion
32 { 32 {
33 /// <summary> 33 /// <summary>
34 /// Visual Studio 2002 34 /// Visual Studio 2002
35 /// </summary> 35 /// </summary>
36 VS70, 36 VS70,
37 /// <summary> 37 /// <summary>
38 /// Visual Studio 2003 38 /// Visual Studio 2003
39 /// </summary> 39 /// </summary>
40 VS71, 40 VS71,
41 /// <summary> 41 /// <summary>
42 /// Visual Studio 2005 42 /// Visual Studio 2005
43 /// </summary> 43 /// </summary>
44 VS80, 44 VS80,
45 /// <summary> 45 /// <summary>
46 /// Visual Studio 2008 46 /// Visual Studio 2008
47 /// </summary> 47 /// </summary>
48 VS90, 48 VS90,
49 /// <summary> 49 /// <summary>
50 /// Visual Studio 2010 50 /// Visual Studio 2010
51 /// </summary> 51 /// </summary>
52 VS10 52 VS10
53 } 53 }
54} 54}
diff --git a/Prebuild/src/Core/Targets/XcodeTarget.cs b/Prebuild/src/Core/Targets/XcodeTarget.cs
index 5393cec..d2c86a0 100644
--- a/Prebuild/src/Core/Targets/XcodeTarget.cs
+++ b/Prebuild/src/Core/Targets/XcodeTarget.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (da
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -36,7 +36,7 @@ using Prebuild.Core.Utilities;
36namespace Prebuild.Core.Targets 36namespace Prebuild.Core.Targets
37{ 37{
38 /// <summary> 38 /// <summary>
39 /// 39 ///
40 /// </summary> 40 /// </summary>
41 [Target("xcode")] 41 [Target("xcode")]
42 public class XcodeTarget : ITarget 42 public class XcodeTarget : ITarget
@@ -282,7 +282,7 @@ namespace Prebuild.Core.Targets
282 } 282 }
283 //if (project.Files.GetSubType(file).ToString() != "Code") 283 //if (project.Files.GetSubType(file).ToString() != "Code")
284 //{ 284 //{
285 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 285 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
286 286
287 ss.WriteLine(" </resources>"); 287 ss.WriteLine(" </resources>");
288 ss.WriteLine(" <sources failonempty=\"true\">"); 288 ss.WriteLine(" <sources failonempty=\"true\">");
diff --git a/Prebuild/src/Core/UnknownLanguageException.cs b/Prebuild/src/Core/UnknownLanguageException.cs
index 607b66c..71fc885 100644
--- a/Prebuild/src/Core/UnknownLanguageException.cs
+++ b/Prebuild/src/Core/UnknownLanguageException.cs
@@ -6,12 +6,12 @@
6 * modify it under the terms of the GNU Lesser General Public 6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version. 8 * version 2.1 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details. 13 * Lesser General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -20,44 +20,44 @@
20using System; 20using System;
21using System.Runtime.Serialization; 21using System.Runtime.Serialization;
22 22
23namespace Prebuild.Core 23namespace Prebuild.Core
24{ 24{
25 /// <summary> 25 /// <summary>
26 /// </summary> 26 /// </summary>
27 [Serializable()] 27 [Serializable()]
28 public class UnknownLanguageException : Exception 28 public class UnknownLanguageException : Exception
29 { 29 {
30 /// <summary> 30 /// <summary>
31 /// Basic exception. 31 /// Basic exception.
32 /// </summary> 32 /// </summary>
33 public UnknownLanguageException() 33 public UnknownLanguageException()
34 { 34 {
35 } 35 }
36 36
37 /// <summary> 37 /// <summary>
38 /// Exception with specified string 38 /// Exception with specified string
39 /// </summary> 39 /// </summary>
40 /// <param name="message">Exception message</param> 40 /// <param name="message">Exception message</param>
41 public UnknownLanguageException(string message): base(message) 41 public UnknownLanguageException(string message): base(message)
42 { 42 {
43 } 43 }
44 44
45 /// <summary> 45 /// <summary>
46 /// 46 ///
47 /// </summary> 47 /// </summary>
48 /// <param name="message"></param> 48 /// <param name="message"></param>
49 /// <param name="exception"></param> 49 /// <param name="exception"></param>
50 public UnknownLanguageException(string message, Exception exception) : base(message, exception) 50 public UnknownLanguageException(string message, Exception exception) : base(message, exception)
51 { 51 {
52 } 52 }
53 53
54 /// <summary> 54 /// <summary>
55 /// 55 ///
56 /// </summary> 56 /// </summary>
57 /// <param name="info"></param> 57 /// <param name="info"></param>
58 /// <param name="context"></param> 58 /// <param name="context"></param>
59 protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context ) 59 protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context )
60 { 60 {
61 } 61 }
62 } 62 }
63} 63}
diff --git a/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
index 786fa1e..5e6face 100644
--- a/Prebuild/src/Core/Utilities/CommandLineCollection.cs
+++ b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -27,126 +27,126 @@ using System.Collections;
27using System.Collections.Generic; 27using System.Collections.Generic;
28 28
29namespace Prebuild.Core.Utilities 29namespace Prebuild.Core.Utilities
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// The CommandLine class parses and interprets the command-line arguments passed to 32 /// The CommandLine class parses and interprets the command-line arguments passed to
33 /// prebuild. 33 /// prebuild.
34 /// </summary> 34 /// </summary>
35 public class CommandLineCollection : IEnumerable<KeyValuePair<string, string>> 35 public class CommandLineCollection : IEnumerable<KeyValuePair<string, string>>
36 { 36 {
37 #region Fields 37 #region Fields
38 38
39 // The raw OS arguments 39 // The raw OS arguments
40 private readonly string[] m_RawArgs; 40 private readonly string[] m_RawArgs;
41 41
42 // Command-line argument storage 42 // Command-line argument storage
43 private readonly Dictionary<string, string> m_Arguments = new Dictionary<string, string>(); 43 private readonly Dictionary<string, string> m_Arguments = new Dictionary<string, string>();
44 44
45 #endregion 45 #endregion
46 46
47 #region Constructors 47 #region Constructors
48 48
49 /// <summary> 49 /// <summary>
50 /// Create a new CommandLine instance and set some internal variables. 50 /// Create a new CommandLine instance and set some internal variables.
51 /// </summary> 51 /// </summary>
52 public CommandLineCollection(string[] args) 52 public CommandLineCollection(string[] args)
53 { 53 {
54 m_RawArgs = args; 54 m_RawArgs = args;
55 55
56 Parse(); 56 Parse();
57 } 57 }
58 58
59 #endregion 59 #endregion
60 60
61 #region Private Methods 61 #region Private Methods
62 62
63 private void Parse() 63 private void Parse()
64 { 64 {
65 if(m_RawArgs.Length < 1) 65 if(m_RawArgs.Length < 1)
66 return; 66 return;
67 67
68 int idx = 0; 68 int idx = 0;
69 string lastArg = null; 69 string lastArg = null;
70 70
71 while(idx <m_RawArgs.Length) 71 while(idx <m_RawArgs.Length)
72 { 72 {
73 string arg = m_RawArgs[idx]; 73 string arg = m_RawArgs[idx];
74 74
75 if(arg.Length > 2 && arg[0] == '/') 75 if(arg.Length > 2 && arg[0] == '/')
76 { 76 {
77 arg = arg.Substring(1); 77 arg = arg.Substring(1);
78 lastArg = arg; 78 lastArg = arg;
79 m_Arguments[arg] = ""; 79 m_Arguments[arg] = "";
80 } 80 }
81 else 81 else
82 { 82 {
83 if(lastArg != null) 83 if(lastArg != null)
84 { 84 {
85 m_Arguments[lastArg] = arg; 85 m_Arguments[lastArg] = arg;
86 lastArg = null; 86 lastArg = null;
87 } 87 }
88 } 88 }
89 89
90 idx++; 90 idx++;
91 } 91 }
92 } 92 }
93 93
94 #endregion 94 #endregion
95 95
96 #region Public Methods 96 #region Public Methods
97 97
98 /// <summary> 98 /// <summary>
99 /// Wases the passed. 99 /// Wases the passed.
100 /// </summary> 100 /// </summary>
101 /// <param name="arg">The arg.</param> 101 /// <param name="arg">The arg.</param>
102 /// <returns></returns> 102 /// <returns></returns>
103 public bool WasPassed(string arg) 103 public bool WasPassed(string arg)
104 { 104 {
105 return (m_Arguments.ContainsKey(arg)); 105 return (m_Arguments.ContainsKey(arg));
106 } 106 }
107 107
108 #endregion 108 #endregion
109 109
110 #region Properties 110 #region Properties
111 111
112 /// <summary> 112 /// <summary>
113 /// Gets the parameter associated with the command line option 113 /// Gets the parameter associated with the command line option
114 /// </summary> 114 /// </summary>
115 /// <remarks>Returns null if option was not specified, 115 /// <remarks>Returns null if option was not specified,
116 /// null string if no parameter was specified, and the value if a parameter was specified</remarks> 116 /// null string if no parameter was specified, and the value if a parameter was specified</remarks>
117 public string this[string index] 117 public string this[string index]
118 { 118 {
119 get 119 get
120 { 120 {
121 if(m_Arguments.ContainsKey(index)) 121 if(m_Arguments.ContainsKey(index))
122 { 122 {
123 return (m_Arguments[index]); 123 return (m_Arguments[index]);
124 } 124 }
125 return null; 125 return null;
126 } 126 }
127 } 127 }
128 128
129 #endregion 129 #endregion
130 130
131 #region IEnumerable Members 131 #region IEnumerable Members
132 132
133 /// <summary> 133 /// <summary>
134 /// Returns an enumerator that can iterate through a collection. 134 /// Returns an enumerator that can iterate through a collection.
135 /// </summary> 135 /// </summary>
136 /// <returns> 136 /// <returns>
137 /// An <see cref="T:System.Collections.IDictionaryEnumerator"/> 137 /// An <see cref="T:System.Collections.IDictionaryEnumerator"/>
138 /// that can be used to iterate through the collection. 138 /// that can be used to iterate through the collection.
139 /// </returns> 139 /// </returns>
140 public IEnumerator<KeyValuePair<string, string>> GetEnumerator() 140 public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
141 { 141 {
142 return m_Arguments.GetEnumerator(); 142 return m_Arguments.GetEnumerator();
143 } 143 }
144 144
145 IEnumerator IEnumerable.GetEnumerator() 145 IEnumerator IEnumerable.GetEnumerator()
146 { 146 {
147 return GetEnumerator(); 147 return GetEnumerator();
148 } 148 }
149 149
150 #endregion 150 #endregion
151 } 151 }
152} 152}
diff --git a/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
index 9624c35..d743d83 100644
--- a/Prebuild/src/Core/Utilities/CurrentDirectory.cs
+++ b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -28,41 +28,41 @@ using System.Collections.Generic;
28 28
29namespace Prebuild.Core.Utilities 29namespace Prebuild.Core.Utilities
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// 32 ///
33 /// </summary> 33 /// </summary>
34 public class CurrentDirectory 34 public class CurrentDirectory
35 { 35 {
36 #region Fields 36 #region Fields
37 37
38 private readonly Stack<string> m_Stack = new Stack<string>(); 38 private readonly Stack<string> m_Stack = new Stack<string>();
39 39
40 #endregion 40 #endregion
41 41
42 #region Public Methods 42 #region Public Methods
43 43
44 /// <summary> 44 /// <summary>
45 /// Pushes this instance. 45 /// Pushes this instance.
46 /// </summary> 46 /// </summary>
47 public void Push() 47 public void Push()
48 { 48 {
49 m_Stack.Push(Environment.CurrentDirectory); 49 m_Stack.Push(Environment.CurrentDirectory);
50 } 50 }
51 51
52 /// <summary> 52 /// <summary>
53 /// Pops this instance. 53 /// Pops this instance.
54 /// </summary> 54 /// </summary>
55 public void Pop() 55 public void Pop()
56 { 56 {
57 if(m_Stack.Count < 1) 57 if(m_Stack.Count < 1)
58 { 58 {
59 return; 59 return;
60 } 60 }
61
62 string cwd = m_Stack.Pop();
63 Helper.SetCurrentDir(cwd);
64 }
65 61
66 #endregion 62 string cwd = m_Stack.Pop();
67 } 63 Helper.SetCurrentDir(cwd);
64 }
65
66 #endregion
67 }
68} 68}
diff --git a/Prebuild/src/Core/Utilities/Helper.cs b/Prebuild/src/Core/Utilities/Helper.cs
index 8c3e968..a440e58 100644
--- a/Prebuild/src/Core/Utilities/Helper.cs
+++ b/Prebuild/src/Core/Utilities/Helper.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -35,541 +35,541 @@ using Prebuild.Core.Nodes;
35 35
36namespace Prebuild.Core.Utilities 36namespace Prebuild.Core.Utilities
37{ 37{
38 /// <summary> 38 /// <summary>
39 /// 39 ///
40 /// </summary> 40 /// </summary>
41 public class Helper 41 public class Helper
42 { 42 {
43 #region Fields 43 #region Fields
44 44
45 static bool checkForOSVariables; 45 static bool checkForOSVariables;
46 46
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 public static bool CheckForOSVariables 50 public static bool CheckForOSVariables
51 { 51 {
52 get 52 get
53 { 53 {
54 return checkForOSVariables; 54 return checkForOSVariables;
55 } 55 }
56 set 56 set
57 { 57 {
58 checkForOSVariables = value; 58 checkForOSVariables = value;
59 } 59 }
60 } 60 }
61 61
62 #endregion 62 #endregion
63 63
64 #region Public Methods 64 #region Public Methods
65 65
66 #region String Parsing 66 #region String Parsing
67 67
68 public delegate string StringLookup(string key); 68 public delegate string StringLookup(string key);
69 69
70 /// <summary> 70 /// <summary>
71 /// Gets a collection of StringLocationPair objects that represent the matches 71 /// Gets a collection of StringLocationPair objects that represent the matches
72 /// </summary> 72 /// </summary>
73 /// <param name="target">The target.</param> 73 /// <param name="target">The target.</param>
74 /// <param name="beforeGroup">The before group.</param> 74 /// <param name="beforeGroup">The before group.</param>
75 /// <param name="afterGroup">The after group.</param> 75 /// <param name="afterGroup">The after group.</param>
76 /// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param> 76 /// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param>
77 /// <returns></returns> 77 /// <returns></returns>
78 public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings) 78 public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings)
79 { 79 {
80 if( beforeGroup == null ) 80 if( beforeGroup == null )
81 { 81 {
82 throw new ArgumentNullException("beforeGroup"); 82 throw new ArgumentNullException("beforeGroup");
83 } 83 }
84 if( afterGroup == null ) 84 if( afterGroup == null )
85 { 85 {
86 throw new ArgumentNullException("afterGroup"); 86 throw new ArgumentNullException("afterGroup");
87 } 87 }
88 StringCollection results = new StringCollection(); 88 StringCollection results = new StringCollection();
89 if(target == null || target.Length == 0) 89 if(target == null || target.Length == 0)
90 { 90 {
91 return results; 91 return results;
92 } 92 }
93 93
94 int beforeMod = 0; 94 int beforeMod = 0;
95 int afterMod = 0; 95 int afterMod = 0;
96 if(includeDelimitersInSubstrings) 96 if(includeDelimitersInSubstrings)
97 { 97 {
98 //be sure to not exlude the delims 98 //be sure to not exlude the delims
99 beforeMod = beforeGroup.Length; 99 beforeMod = beforeGroup.Length;
100 afterMod = afterGroup.Length; 100 afterMod = afterGroup.Length;
101 } 101 }
102 int startIndex = 0; 102 int startIndex = 0;
103 while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) { 103 while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) {
104 int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it 104 int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it
105 if(endIndex == -1) 105 if(endIndex == -1)
106 { 106 {
107 break; 107 break;
108 } 108 }
109 int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string 109 int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string
110 string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod, 110 string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod,
111 length - afterMod); 111 length - afterMod);
112 112
113 results.Add(substring); 113 results.Add(substring);
114 //results.Add(new StringLocationPair(substring,startIndex)); 114 //results.Add(new StringLocationPair(substring,startIndex));
115 startIndex = endIndex + 1; 115 startIndex = endIndex + 1;
116 //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization 116 //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization
117 //so start after endIndex 117 //so start after endIndex
118 118
119 } 119 }
120 return results; 120 return results;
121 } 121 }
122 122
123 /// <summary> 123 /// <summary>
124 /// Replaces the groups. 124 /// Replaces the groups.
125 /// </summary> 125 /// </summary>
126 /// <param name="target">The target.</param> 126 /// <param name="target">The target.</param>
127 /// <param name="beforeGroup">The before group.</param> 127 /// <param name="beforeGroup">The before group.</param>
128 /// <param name="afterGroup">The after group.</param> 128 /// <param name="afterGroup">The after group.</param>
129 /// <param name="lookup">The lookup.</param> 129 /// <param name="lookup">The lookup.</param>
130 /// <returns></returns> 130 /// <returns></returns>
131 public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) { 131 public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) {
132 if( target == null ) 132 if( target == null )
133 { 133 {
134 throw new ArgumentNullException("target"); 134 throw new ArgumentNullException("target");
135 } 135 }
136 //int targetLength = target.Length; 136 //int targetLength = target.Length;
137 StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false); 137 StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false);
138 if( lookup == null ) 138 if( lookup == null )
139 { 139 {
140 throw new ArgumentNullException("lookup"); 140 throw new ArgumentNullException("lookup");
141 } 141 }
142 foreach(string substring in strings) 142 foreach(string substring in strings)
143 { 143 {
144 target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) ); 144 target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) );
145 } 145 }
146 return target; 146 return target;
147 } 147 }
148 148
149 /// <summary> 149 /// <summary>
150 /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate 150 /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate
151 /// </summary> 151 /// </summary>
152 /// <param name="target">The target.</param> 152 /// <param name="target">The target.</param>
153 /// <param name="lookup">The lookup.</param> 153 /// <param name="lookup">The lookup.</param>
154 /// <returns></returns> 154 /// <returns></returns>
155 public static string InterpolateForVariables(string target, StringLookup lookup) 155 public static string InterpolateForVariables(string target, StringLookup lookup)
156 { 156 {
157 return ReplaceGroups(target, "${" , "}" , lookup); 157 return ReplaceGroups(target, "${" , "}" , lookup);
158 } 158 }
159 159
160 /// <summary> 160 /// <summary>
161 /// Replaces ${var} statements in a string with the corresonding environment variable with name var 161 /// Replaces ${var} statements in a string with the corresonding environment variable with name var
162 /// </summary> 162 /// </summary>
163 /// <param name="target"></param> 163 /// <param name="target"></param>
164 /// <returns></returns> 164 /// <returns></returns>
165 public static string InterpolateForEnvironmentVariables(string target) 165 public static string InterpolateForEnvironmentVariables(string target)
166 { 166 {
167 return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable)); 167 return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable));
168 } 168 }
169 169
170 #endregion 170 #endregion
171 171
172 /// <summary> 172 /// <summary>
173 /// Translates the value. 173 /// Translates the value.
174 /// </summary> 174 /// </summary>
175 /// <param name="translateType">Type of the translate.</param> 175 /// <param name="translateType">Type of the translate.</param>
176 /// <param name="translationItem">The translation item.</param> 176 /// <param name="translationItem">The translation item.</param>
177 /// <returns></returns> 177 /// <returns></returns>
178 public static object TranslateValue(Type translateType, string translationItem) 178 public static object TranslateValue(Type translateType, string translationItem)
179 { 179 {
180 if(translationItem == null) 180 if(translationItem == null)
181 { 181 {
182 return null; 182 return null;
183 } 183 }
184 184
185 try 185 try
186 { 186 {
187 string lowerVal = translationItem.ToLower(); 187 string lowerVal = translationItem.ToLower();
188 if(translateType == typeof(bool)) 188 if(translateType == typeof(bool))
189 { 189 {
190 return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on"); 190 return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on");
191 } 191 }
192 else if(translateType == typeof(int)) 192 else if(translateType == typeof(int))
193 { 193 {
194 return (Int32.Parse(translationItem)); 194 return (Int32.Parse(translationItem));
195 } 195 }
196 else 196 else
197 { 197 {
198 return translationItem; 198 return translationItem;
199 } 199 }
200 } 200 }
201 catch(FormatException) 201 catch(FormatException)
202 { 202 {
203 return null; 203 return null;
204 } 204 }
205 } 205 }
206 206
207 /// <summary> 207 /// <summary>
208 /// Deletes if exists. 208 /// Deletes if exists.
209 /// </summary> 209 /// </summary>
210 /// <param name="file">The file.</param> 210 /// <param name="file">The file.</param>
211 /// <returns></returns> 211 /// <returns></returns>
212 public static bool DeleteIfExists(string file) 212 public static bool DeleteIfExists(string file)
213 { 213 {
214 string resFile = null; 214 string resFile = null;
215 try 215 try
216 { 216 {
217 resFile = ResolvePath(file); 217 resFile = ResolvePath(file);
218 } 218 }
219 catch(ArgumentException) 219 catch(ArgumentException)
220 { 220 {
221 return false; 221 return false;
222 } 222 }
223 223
224 if(!File.Exists(resFile)) 224 if(!File.Exists(resFile))
225 { 225 {
226 return false; 226 return false;
227 } 227 }
228 228
229 File.Delete(resFile); 229 File.Delete(resFile);
230 return true; 230 return true;
231 } 231 }
232 232
233 static readonly char seperator = Path.DirectorySeparatorChar; 233 static readonly char seperator = Path.DirectorySeparatorChar;
234 234
235 // This little gem was taken from the NeL source, thanks guys! 235 // This little gem was taken from the NeL source, thanks guys!
236 /// <summary> 236 /// <summary>
237 /// Makes a relative path 237 /// Makes a relative path
238 /// </summary> 238 /// </summary>
239 /// <param name="startPath">Path to start from</param> 239 /// <param name="startPath">Path to start from</param>
240 /// <param name="endPath">Path to end at</param> 240 /// <param name="endPath">Path to end at</param>
241 /// <returns>Path that will get from startPath to endPath</returns> 241 /// <returns>Path that will get from startPath to endPath</returns>
242 public static string MakePathRelativeTo(string startPath, string endPath) 242 public static string MakePathRelativeTo(string startPath, string endPath)
243 { 243 {
244 string tmp = NormalizePath(startPath, seperator); 244 string tmp = NormalizePath(startPath, seperator);
245 string src = NormalizePath(endPath, seperator); 245 string src = NormalizePath(endPath, seperator);
246 string prefix = ""; 246 string prefix = "";
247 247
248 while(true) 248 while(true)
249 { 249 {
250 if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0)) 250 if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0))
251 { 251 {
252 string ret; 252 string ret;
253 int size = tmp.Length; 253 int size = tmp.Length;
254 if(size == src.Length) 254 if(size == src.Length)
255 { 255 {
256 return "./"; 256 return "./";
257 } 257 }
258 if((src.Length > tmp.Length) && src[tmp.Length - 1] != seperator) 258 if((src.Length > tmp.Length) && src[tmp.Length - 1] != seperator)
259 { 259 {
260 } 260 }
261 else 261 else
262 { 262 {
263 ret = prefix + endPath.Substring(size, endPath.Length - size); 263 ret = prefix + endPath.Substring(size, endPath.Length - size);
264 ret = ret.Trim(); 264 ret = ret.Trim();
265 if(ret[0] == seperator) 265 if(ret[0] == seperator)
266 { 266 {
267 ret = "." + ret; 267 ret = "." + ret;
268 } 268 }
269 269
270 return NormalizePath(ret); 270 return NormalizePath(ret);
271 } 271 }
272
273 }
274 272
275 if(tmp.Length < 2) 273 }
276 { 274
277 break; 275 if(tmp.Length < 2)
278 } 276 {
277 break;
278 }
279 279
280 int lastPos = tmp.LastIndexOf(seperator, tmp.Length - 2); 280 int lastPos = tmp.LastIndexOf(seperator, tmp.Length - 2);
281 int prevPos = tmp.IndexOf(seperator); 281 int prevPos = tmp.IndexOf(seperator);
282 282
283 if((lastPos == prevPos) || (lastPos == -1)) 283 if((lastPos == prevPos) || (lastPos == -1))
284 { 284 {
285 break; 285 break;
286 } 286 }
287 287
288 tmp = tmp.Substring(0, lastPos + 1); 288 tmp = tmp.Substring(0, lastPos + 1);
289 prefix += ".." + seperator.ToString(); 289 prefix += ".." + seperator.ToString();
290 } 290 }
291 291
292 return endPath; 292 return endPath;
293 } 293 }
294 294
295 /// <summary> 295 /// <summary>
296 /// Resolves the path. 296 /// Resolves the path.
297 /// </summary> 297 /// </summary>
298 /// <param name="path">The path.</param> 298 /// <param name="path">The path.</param>
299 /// <returns></returns> 299 /// <returns></returns>
300 public static string ResolvePath(string path) 300 public static string ResolvePath(string path)
301 { 301 {
302 string tmpPath = NormalizePath(path); 302 string tmpPath = NormalizePath(path);
303 if(tmpPath.Length < 1) 303 if(tmpPath.Length < 1)
304 { 304 {
305 tmpPath = "."; 305 tmpPath = ".";
306 } 306 }
307 307
308 tmpPath = Path.GetFullPath(tmpPath); 308 tmpPath = Path.GetFullPath(tmpPath);
309 if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath)) 309 if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath))
310 { 310 {
311 throw new ArgumentException("Path could not be resolved: " + tmpPath); 311 throw new ArgumentException("Path could not be resolved: " + tmpPath);
312 } 312 }
313 313
314 return tmpPath; 314 return tmpPath;
315 } 315 }
316 316
317 /// <summary> 317 /// <summary>
318 /// Normalizes the path. 318 /// Normalizes the path.
319 /// </summary> 319 /// </summary>
320 /// <param name="path">The path.</param> 320 /// <param name="path">The path.</param>
321 /// <param name="separatorCharacter">The separator character.</param> 321 /// <param name="separatorCharacter">The separator character.</param>
322 /// <returns></returns> 322 /// <returns></returns>
323 public static string NormalizePath(string path, char separatorCharacter) 323 public static string NormalizePath(string path, char separatorCharacter)
324 { 324 {
325 if(path == null || path == "" || path.Length < 1) 325 if(path == null || path == "" || path.Length < 1)
326 { 326 {
327 return ""; 327 return "";
328 } 328 }
329 329
330 string tmpPath = path.Replace('\\', '/'); 330 string tmpPath = path.Replace('\\', '/');
331 tmpPath = tmpPath.Replace('/', separatorCharacter); 331 tmpPath = tmpPath.Replace('/', separatorCharacter);
332 return tmpPath; 332 return tmpPath;
333 } 333 }
334 334
335 /// <summary> 335 /// <summary>
336 /// Normalizes the path. 336 /// Normalizes the path.
337 /// </summary> 337 /// </summary>
338 /// <param name="path">The path.</param> 338 /// <param name="path">The path.</param>
339 /// <returns></returns> 339 /// <returns></returns>
340 public static string NormalizePath(string path) 340 public static string NormalizePath(string path)
341 { 341 {
342 return NormalizePath(path, Path.DirectorySeparatorChar); 342 return NormalizePath(path, Path.DirectorySeparatorChar);
343 } 343 }
344 344
345 /// <summary> 345 /// <summary>
346 /// Ends the path. 346 /// Ends the path.
347 /// </summary> 347 /// </summary>
348 /// <param name="path">The path.</param> 348 /// <param name="path">The path.</param>
349 /// <param name="separatorCharacter">The separator character.</param> 349 /// <param name="separatorCharacter">The separator character.</param>
350 /// <returns></returns> 350 /// <returns></returns>
351 public static string EndPath(string path, char separatorCharacter) 351 public static string EndPath(string path, char separatorCharacter)
352 { 352 {
353 if(path == null || path == "" || path.Length < 1) 353 if(path == null || path == "" || path.Length < 1)
354 { 354 {
355 return ""; 355 return "";
356 } 356 }
357 357
358 if(!path.EndsWith(separatorCharacter.ToString())) 358 if(!path.EndsWith(separatorCharacter.ToString()))
359 { 359 {
360 return (path + separatorCharacter); 360 return (path + separatorCharacter);
361 } 361 }
362 362
363 return path; 363 return path;
364 } 364 }
365 365
366 /// <summary> 366 /// <summary>
367 /// Ends the path. 367 /// Ends the path.
368 /// </summary> 368 /// </summary>
369 /// <param name="path">The path.</param> 369 /// <param name="path">The path.</param>
370 /// <returns></returns> 370 /// <returns></returns>
371 public static string EndPath(string path) 371 public static string EndPath(string path)
372 { 372 {
373 return EndPath(path, Path.DirectorySeparatorChar); 373 return EndPath(path, Path.DirectorySeparatorChar);
374 } 374 }
375 375
376 /// <summary> 376 /// <summary>
377 /// Makes the file path. 377 /// Makes the file path.
378 /// </summary> 378 /// </summary>
379 /// <param name="path">The path.</param> 379 /// <param name="path">The path.</param>
380 /// <param name="name">The name.</param> 380 /// <param name="name">The name.</param>
381 /// <param name="ext">The ext.</param> 381 /// <param name="ext">The ext.</param>
382 /// <returns></returns> 382 /// <returns></returns>
383 public static string MakeFilePath(string path, string name, string ext) 383 public static string MakeFilePath(string path, string name, string ext)
384 { 384 {
385 string ret = EndPath(NormalizePath(path)); 385 string ret = EndPath(NormalizePath(path));
386 386
387 if( name == null ) 387 if( name == null )
388 { 388 {
389 throw new ArgumentNullException("name"); 389 throw new ArgumentNullException("name");
390 } 390 }
391 391
392 ret += name; 392 ret += name;
393 if(!name.EndsWith("." + ext)) 393 if(!name.EndsWith("." + ext))
394 { 394 {
395 ret += "." + ext; 395 ret += "." + ext;
396 } 396 }
397 397
398 //foreach(char c in Path.GetInvalidPathChars()) 398 //foreach(char c in Path.GetInvalidPathChars())
399 //{ 399 //{
400 // ret = ret.Replace(c, '_'); 400 // ret = ret.Replace(c, '_');
401 //} 401 //}
402 402
403 return ret; 403 return ret;
404 } 404 }
405 405
406 /// <summary> 406 /// <summary>
407 /// Makes the file path. 407 /// Makes the file path.
408 /// </summary> 408 /// </summary>
409 /// <param name="path">The path.</param> 409 /// <param name="path">The path.</param>
410 /// <param name="name">The name.</param> 410 /// <param name="name">The name.</param>
411 /// <returns></returns> 411 /// <returns></returns>
412 public static string MakeFilePath(string path, string name) 412 public static string MakeFilePath(string path, string name)
413 { 413 {
414 string ret = EndPath(NormalizePath(path)); 414 string ret = EndPath(NormalizePath(path));
415 415
416 if( name == null ) 416 if( name == null )
417 { 417 {
418 throw new ArgumentNullException("name"); 418 throw new ArgumentNullException("name");
419 } 419 }
420 420
421 ret += name; 421 ret += name;
422 422
423 //foreach (char c in Path.GetInvalidPathChars()) 423 //foreach (char c in Path.GetInvalidPathChars())
424 //{ 424 //{
425 // ret = ret.Replace(c, '_'); 425 // ret = ret.Replace(c, '_');
426 //} 426 //}
427 427
428 return ret; 428 return ret;
429 } 429 }
430 430
431 /// <summary> 431 /// <summary>
432 /// 432 ///
433 /// </summary> 433 /// </summary>
434 /// <param name="path"></param> 434 /// <param name="path"></param>
435 /// <returns></returns> 435 /// <returns></returns>
436 public static string MakeReferencePath(string path) 436 public static string MakeReferencePath(string path)
437 { 437 {
438 string ret = EndPath(NormalizePath(path)); 438 string ret = EndPath(NormalizePath(path));
439 439
440 //foreach (char c in Path.GetInvalidPathChars()) 440 //foreach (char c in Path.GetInvalidPathChars())
441 //{ 441 //{
442 // ret = ret.Replace(c, '_'); 442 // ret = ret.Replace(c, '_');
443 //} 443 //}
444 444
445 return ret; 445 return ret;
446 } 446 }
447 447
448 /// <summary> 448 /// <summary>
449 /// Sets the current dir. 449 /// Sets the current dir.
450 /// </summary> 450 /// </summary>
451 /// <param name="path">The path.</param> 451 /// <param name="path">The path.</param>
452 public static void SetCurrentDir(string path) 452 public static void SetCurrentDir(string path)
453 { 453 {
454 if( path == null ) 454 if( path == null )
455 { 455 {
456 throw new ArgumentNullException("path"); 456 throw new ArgumentNullException("path");
457 } 457 }
458 if(path.Length < 1) 458 if(path.Length < 1)
459 { 459 {
460 return; 460 return;
461 } 461 }
462 462
463 Environment.CurrentDirectory = path; 463 Environment.CurrentDirectory = path;
464 } 464 }
465 465
466 /// <summary> 466 /// <summary>
467 /// Checks the type. 467 /// Checks the type.
468 /// </summary> 468 /// </summary>
469 /// <param name="typeToCheck">The type to check.</param> 469 /// <param name="typeToCheck">The type to check.</param>
470 /// <param name="attr">The attr.</param> 470 /// <param name="attr">The attr.</param>
471 /// <param name="inter">The inter.</param> 471 /// <param name="inter">The inter.</param>
472 /// <returns></returns> 472 /// <returns></returns>
473 public static object CheckType(Type typeToCheck, Type attr, Type inter) 473 public static object CheckType(Type typeToCheck, Type attr, Type inter)
474 { 474 {
475 if(typeToCheck == null || attr == null) 475 if(typeToCheck == null || attr == null)
476 { 476 {
477 return null; 477 return null;
478 } 478 }
479 479
480 object[] attrs = typeToCheck.GetCustomAttributes(attr, false); 480 object[] attrs = typeToCheck.GetCustomAttributes(attr, false);
481 if(attrs == null || attrs.Length < 1) 481 if(attrs == null || attrs.Length < 1)
482 { 482 {
483 return null; 483 return null;
484 } 484 }
485 if( inter == null ) 485 if( inter == null )
486 { 486 {
487 throw new ArgumentNullException("inter"); 487 throw new ArgumentNullException("inter");
488 } 488 }
489 489
490 if(typeToCheck.GetInterface(inter.FullName) == null) 490 if(typeToCheck.GetInterface(inter.FullName) == null)
491 { 491 {
492 return null; 492 return null;
493 } 493 }
494 494
495 return attrs[0]; 495 return attrs[0];
496 } 496 }
497 497
498 /// <summary> 498 /// <summary>
499 /// Attributes the value. 499 /// Attributes the value.
500 /// </summary> 500 /// </summary>
501 /// <param name="node">The node.</param> 501 /// <param name="node">The node.</param>
502 /// <param name="attr">The attr.</param> 502 /// <param name="attr">The attr.</param>
503 /// <param name="def">The def.</param> 503 /// <param name="def">The def.</param>
504 /// <returns></returns> 504 /// <returns></returns>
505 public static string AttributeValue(XmlNode node, string attr, string def) 505 public static string AttributeValue(XmlNode node, string attr, string def)
506 { 506 {
507 if( node == null ) 507 if( node == null )
508 { 508 {
509 throw new ArgumentNullException("node"); 509 throw new ArgumentNullException("node");
510 } 510 }
511 if(node.Attributes[attr] == null) 511 if(node.Attributes[attr] == null)
512 { 512 {
513 return def; 513 return def;
514 } 514 }
515 string val = node.Attributes[attr].Value; 515 string val = node.Attributes[attr].Value;
516 if(!CheckForOSVariables) 516 if(!CheckForOSVariables)
517 { 517 {
518 return val; 518 return val;
519 } 519 }
520 520
521 return InterpolateForEnvironmentVariables(val); 521 return InterpolateForEnvironmentVariables(val);
522 } 522 }
523 523
524 /// <summary> 524 /// <summary>
525 /// Parses the boolean. 525 /// Parses the boolean.
526 /// </summary> 526 /// </summary>
527 /// <param name="node">The node.</param> 527 /// <param name="node">The node.</param>
528 /// <param name="attr">The attr.</param> 528 /// <param name="attr">The attr.</param>
529 /// <param name="defaultValue">if set to <c>true</c> [default value].</param> 529 /// <param name="defaultValue">if set to <c>true</c> [default value].</param>
530 /// <returns></returns> 530 /// <returns></returns>
531 public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue) 531 public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue)
532 { 532 {
533 if( node == null ) 533 if( node == null )
534 { 534 {
535 throw new ArgumentNullException("node"); 535 throw new ArgumentNullException("node");
536 } 536 }
537 if(node.Attributes[attr] == null) 537 if(node.Attributes[attr] == null)
538 { 538 {
539 return defaultValue; 539 return defaultValue;
540 } 540 }
541 return bool.Parse(node.Attributes[attr].Value); 541 return bool.Parse(node.Attributes[attr].Value);
542 } 542 }
543 543
544 /// <summary> 544 /// <summary>
545 /// Enums the attribute value. 545 /// Enums the attribute value.
546 /// </summary> 546 /// </summary>
547 /// <param name="node">The node.</param> 547 /// <param name="node">The node.</param>
548 /// <param name="attr">The attr.</param> 548 /// <param name="attr">The attr.</param>
549 /// <param name="enumType">Type of the enum.</param> 549 /// <param name="enumType">Type of the enum.</param>
550 /// <param name="def">The def.</param> 550 /// <param name="def">The def.</param>
551 /// <returns></returns> 551 /// <returns></returns>
552 public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def) 552 public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def)
553 { 553 {
554 if( def == null ) 554 if( def == null )
555 { 555 {
556 throw new ArgumentNullException("def"); 556 throw new ArgumentNullException("def");
557 } 557 }
558 string val = AttributeValue(node, attr, def.ToString()); 558 string val = AttributeValue(node, attr, def.ToString());
559 return Enum.Parse(enumType, val, true); 559 return Enum.Parse(enumType, val, true);
560 } 560 }
561 561
562 /// <summary> 562 /// <summary>
563 /// 563 ///
564 /// </summary> 564 /// </summary>
565 /// <param name="assemblyName"></param> 565 /// <param name="assemblyName"></param>
566 /// <param name="projectType"></param> 566 /// <param name="projectType"></param>
567 /// <returns></returns> 567 /// <returns></returns>
568 public static string AssemblyFullName(string assemblyName, ProjectType projectType) 568 public static string AssemblyFullName(string assemblyName, ProjectType projectType)
569 { 569 {
570 return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe"); 570 return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe");
571 } 571 }
572 572
573 #endregion 573 #endregion
574 } 574 }
575} 575}
diff --git a/Prebuild/src/Core/Utilities/Log.cs b/Prebuild/src/Core/Utilities/Log.cs
index 4df3def..cd95633 100644
--- a/Prebuild/src/Core/Utilities/Log.cs
+++ b/Prebuild/src/Core/Utilities/Log.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -28,74 +28,74 @@ using System.IO;
28 28
29namespace Prebuild.Core.Utilities 29namespace Prebuild.Core.Utilities
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// 32 ///
33 /// </summary> 33 /// </summary>
34 public enum LogType 34 public enum LogType
35 { 35 {
36 /// <summary> 36 /// <summary>
37 /// 37 ///
38 /// </summary> 38 /// </summary>
39 None, 39 None,
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 Info, 43 Info,
44 /// <summary> 44 /// <summary>
45 /// 45 ///
46 /// </summary> 46 /// </summary>
47 Warning, 47 Warning,
48 /// <summary> 48 /// <summary>
49 /// 49 ///
50 /// </summary> 50 /// </summary>
51 Error 51 Error
52 } 52 }
53 53
54 /// <summary> 54 /// <summary>
55 /// 55 ///
56 /// </summary> 56 /// </summary>
57 [Flags] 57 [Flags]
58 public enum LogTargets 58 public enum LogTargets
59 { 59 {
60 /// <summary> 60 /// <summary>
61 /// 61 ///
62 /// </summary> 62 /// </summary>
63 None = 0, 63 None = 0,
64 /// <summary> 64 /// <summary>
65 /// 65 ///
66 /// </summary> 66 /// </summary>
67 Null = 1, 67 Null = 1,
68 /// <summary> 68 /// <summary>
69 /// 69 ///
70 /// </summary> 70 /// </summary>
71 File = 2, 71 File = 2,
72 /// <summary> 72 /// <summary>
73 /// 73 ///
74 /// </summary> 74 /// </summary>
75 Console = 4 75 Console = 4
76 } 76 }
77 77
78 /// <summary> 78 /// <summary>
79 /// Summary description for Log. 79 /// Summary description for Log.
80 /// </summary> 80 /// </summary>
81 public class Log : IDisposable 81 public class Log : IDisposable
82 { 82 {
83 #region Fields 83 #region Fields
84 84
85 private TextWriter m_Writer; 85 private TextWriter m_Writer;
86 private LogTargets m_Target = LogTargets.Null; 86 private LogTargets m_Target = LogTargets.Null;
87 bool disposed; 87 bool disposed;
88 88
89 #endregion 89 #endregion
90 90
91 #region Constructors 91 #region Constructors
92 92
93 /// <summary> 93 /// <summary>
94 /// Initializes a new instance of the <see cref="Log"/> class. 94 /// Initializes a new instance of the <see cref="Log"/> class.
95 /// </summary> 95 /// </summary>
96 /// <param name="target">The target.</param> 96 /// <param name="target">The target.</param>
97 /// <param name="fileName">Name of the file.</param> 97 /// <param name="fileName">Name of the file.</param>
98 public Log(LogTargets target, string fileName) 98 public Log(LogTargets target, string fileName)
99 { 99 {
100 m_Target = target; 100 m_Target = target;
101 101
@@ -111,166 +111,166 @@ namespace Prebuild.Core.Utilities
111 } 111 }
112 } 112 }
113 113
114 #endregion 114 #endregion
115 115
116 #region Public Methods 116 #region Public Methods
117 117
118 /// <summary> 118 /// <summary>
119 /// Writes this instance. 119 /// Writes this instance.
120 /// </summary> 120 /// </summary>
121 public void Write() 121 public void Write()
122 { 122 {
123 Write(string.Empty); 123 Write(string.Empty);
124 } 124 }
125 125
126 /// <summary> 126 /// <summary>
127 /// Writes the specified MSG. 127 /// Writes the specified MSG.
128 /// </summary> 128 /// </summary>
129 /// <param name="msg">The MSG.</param> 129 /// <param name="msg">The MSG.</param>
130 public void Write(string msg) 130 public void Write(string msg)
131 { 131 {
132 if((m_Target & LogTargets.Null) != 0) 132 if((m_Target & LogTargets.Null) != 0)
133 { 133 {
134 return; 134 return;
135 } 135 }
136 136
137 if((m_Target & LogTargets.Console) != 0) 137 if((m_Target & LogTargets.Console) != 0)
138 { 138 {
139 Console.WriteLine(msg); 139 Console.WriteLine(msg);
140 } 140 }
141 if((m_Target & LogTargets.File) != 0 && m_Writer != null) 141 if((m_Target & LogTargets.File) != 0 && m_Writer != null)
142 { 142 {
143 m_Writer.WriteLine(msg); 143 m_Writer.WriteLine(msg);
144 } 144 }
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 /// Writes the specified format. 148 /// Writes the specified format.
149 /// </summary> 149 /// </summary>
150 /// <param name="format">The format.</param> 150 /// <param name="format">The format.</param>
151 /// <param name="args">The args.</param> 151 /// <param name="args">The args.</param>
152 public void Write(string format, params object[] args) 152 public void Write(string format, params object[] args)
153 { 153 {
154 Write(string.Format(format,args)); 154 Write(string.Format(format,args));
155 } 155 }
156 156
157 /// <summary> 157 /// <summary>
158 /// Writes the specified type. 158 /// Writes the specified type.
159 /// </summary> 159 /// </summary>
160 /// <param name="type">The type.</param> 160 /// <param name="type">The type.</param>
161 /// <param name="format">The format.</param> 161 /// <param name="format">The format.</param>
162 /// <param name="args">The args.</param> 162 /// <param name="args">The args.</param>
163 public void Write(LogType type, string format, params object[] args) 163 public void Write(LogType type, string format, params object[] args)
164 { 164 {
165 if((m_Target & LogTargets.Null) != 0) 165 if((m_Target & LogTargets.Null) != 0)
166 { 166 {
167 return; 167 return;
168 } 168 }
169 169
170 string str = ""; 170 string str = "";
171 switch(type) 171 switch(type)
172 { 172 {
173 case LogType.Info: 173 case LogType.Info:
174 str = "[I] "; 174 str = "[I] ";
175 break; 175 break;
176 case LogType.Warning: 176 case LogType.Warning:
177 str = "[!] "; 177 str = "[!] ";
178 break; 178 break;
179 case LogType.Error: 179 case LogType.Error:
180 str = "[X] "; 180 str = "[X] ";
181 break; 181 break;
182 } 182 }
183 183
184 Write(str + format,args); 184 Write(str + format,args);
185 } 185 }
186 186
187 /// <summary> 187 /// <summary>
188 /// Writes the exception. 188 /// Writes the exception.
189 /// </summary> 189 /// </summary>
190 /// <param name="type">The type.</param> 190 /// <param name="type">The type.</param>
191 /// <param name="ex">The ex.</param> 191 /// <param name="ex">The ex.</param>
192 public void WriteException(LogType type, Exception ex) 192 public void WriteException(LogType type, Exception ex)
193 { 193 {
194 if(ex != null) 194 if(ex != null)
195 { 195 {
196 Write(type, ex.Message); 196 Write(type, ex.Message);
197 //#if DEBUG 197 //#if DEBUG
198 m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name); 198 m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name);
199 m_Writer.WriteLine(ex.StackTrace); 199 m_Writer.WriteLine(ex.StackTrace);
200 m_Writer.WriteLine("]]"); 200 m_Writer.WriteLine("]]");
201 //#endif 201 //#endif
202 } 202 }
203 } 203 }
204 204
205 /// <summary> 205 /// <summary>
206 /// Flushes this instance. 206 /// Flushes this instance.
207 /// </summary> 207 /// </summary>
208 public void Flush() 208 public void Flush()
209 { 209 {
210 if(m_Writer != null) 210 if(m_Writer != null)
211 { 211 {
212 m_Writer.Flush(); 212 m_Writer.Flush();
213 } 213 }
214 } 214 }
215 215
216 #endregion 216 #endregion
217 217
218 #region IDisposable Members 218 #region IDisposable Members
219
220 /// <summary>
221 /// Performs application-defined tasks associated with freeing, releasing, or
222 /// resetting unmanaged resources.
223 /// </summary>
224 public void Dispose()
225 {
226 Dispose(true);
227 GC.SuppressFinalize(this);
228 }
219 229
220 /// <summary> 230 /// <summary>
221 /// Performs application-defined tasks associated with freeing, releasing, or 231 /// Dispose objects
222 /// resetting unmanaged resources. 232 /// </summary>
223 /// </summary> 233 /// <param name="disposing">
224 public void Dispose() 234 /// If true, it will dispose close the handle
225 { 235 /// </param>
226 Dispose(true); 236 /// <remarks>
227 GC.SuppressFinalize(this); 237 /// Will dispose managed and unmanaged resources.
228 } 238 /// </remarks>
239 protected virtual void Dispose(bool disposing)
240 {
241 if (!this.disposed)
242 {
243 if (disposing)
244 {
245 if (m_Writer != null)
246 {
247 m_Writer.Close();
248 m_Writer = null;
249 }
250 }
251 }
252 this.disposed = true;
253 }
229 254
230 /// <summary> 255 /// <summary>
231 /// Dispose objects 256 ///
232 /// </summary> 257 /// </summary>
233 /// <param name="disposing"> 258 ~Log()
234 /// If true, it will dispose close the handle 259 {
235 /// </param> 260 this.Dispose(false);
236 /// <remarks> 261 }
237 /// Will dispose managed and unmanaged resources.
238 /// </remarks>
239 protected virtual void Dispose(bool disposing)
240 {
241 if (!this.disposed)
242 {
243 if (disposing)
244 {
245 if (m_Writer != null)
246 {
247 m_Writer.Close();
248 m_Writer = null;
249 }
250 }
251 }
252 this.disposed = true;
253 }
254 262
255 /// <summary> 263 /// <summary>
256 /// 264 /// Closes and destroys this object
257 /// </summary> 265 /// </summary>
258 ~Log() 266 /// <remarks>
259 { 267 /// Same as Dispose(true)
260 this.Dispose(false); 268 /// </remarks>
261 } 269 public void Close()
262 270 {
263 /// <summary> 271 Dispose();
264 /// Closes and destroys this object 272 }
265 /// </summary>
266 /// <remarks>
267 /// Same as Dispose(true)
268 /// </remarks>
269 public void Close()
270 {
271 Dispose();
272 }
273 273
274 #endregion 274 #endregion
275 } 275 }
276} 276}
diff --git a/Prebuild/src/Core/WarningException.cs b/Prebuild/src/Core/WarningException.cs
index b7c3668..721f43d 100644
--- a/Prebuild/src/Core/WarningException.cs
+++ b/Prebuild/src/Core/WarningException.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -28,57 +28,57 @@ using System.Runtime.Serialization;
28 28
29namespace Prebuild.Core 29namespace Prebuild.Core
30{ 30{
31 /// <summary> 31 /// <summary>
32 /// 32 ///
33 /// </summary> 33 /// </summary>
34 [Serializable] 34 [Serializable]
35 public class WarningException : Exception 35 public class WarningException : Exception
36 { 36 {
37 #region Constructors 37 #region Constructors
38 38
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 public WarningException() 42 public WarningException()
43 { 43 {
44 } 44 }
45 45
46 /// <summary> 46 /// <summary>
47 /// 47 ///
48 /// </summary> 48 /// </summary>
49 /// <param name="format"></param> 49 /// <param name="format"></param>
50 /// <param name="args"></param> 50 /// <param name="args"></param>
51 public WarningException(string format, params object[] args) 51 public WarningException(string format, params object[] args)
52 : base(String.Format(format, args)) 52 : base(String.Format(format, args))
53 { 53 {
54 } 54 }
55 55
56 /// <summary> 56 /// <summary>
57 /// Exception with specified string 57 /// Exception with specified string
58 /// </summary> 58 /// </summary>
59 /// <param name="message">Exception message</param> 59 /// <param name="message">Exception message</param>
60 public WarningException(string message): base(message) 60 public WarningException(string message): base(message)
61 { 61 {
62 } 62 }
63 63
64 /// <summary> 64 /// <summary>
65 /// 65 ///
66 /// </summary> 66 /// </summary>
67 /// <param name="message"></param> 67 /// <param name="message"></param>
68 /// <param name="exception"></param> 68 /// <param name="exception"></param>
69 public WarningException(string message, Exception exception) : base(message, exception) 69 public WarningException(string message, Exception exception) : base(message, exception)
70 { 70 {
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// 74 ///
75 /// </summary> 75 /// </summary>
76 /// <param name="info"></param> 76 /// <param name="info"></param>
77 /// <param name="context"></param> 77 /// <param name="context"></param>
78 protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context ) 78 protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context )
79 { 79 {
80 } 80 }
81 81
82 #endregion 82 #endregion
83 } 83 }
84} 84}
diff --git a/Prebuild/src/Prebuild.cs b/Prebuild/src/Prebuild.cs
index 35a5dfa..996dea0 100644
--- a/Prebuild/src/Prebuild.cs
+++ b/Prebuild/src/Prebuild.cs
@@ -5,16 +5,16 @@ Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehea
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
@@ -42,50 +42,50 @@ using System.EnterpriseServices.Internal;
42using Prebuild.Core; 42using Prebuild.Core;
43using Prebuild.Core.Utilities; 43using Prebuild.Core.Utilities;
44 44
45namespace Prebuild 45namespace Prebuild
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 class Prebuild 50 class Prebuild
51 { 51 {
52 #region Main 52 #region Main
53 53
54 [STAThread] 54 [STAThread]
55 static void Main(string[] args) 55 static void Main(string[] args)
56 { 56 {
57 Kernel kernel = null; 57 Kernel kernel = null;
58 try 58 try
59 { 59 {
60 kernel = Kernel.Instance; 60 kernel = Kernel.Instance;
61 kernel.Initialize(LogTargets.File | LogTargets.Console, args); 61 kernel.Initialize(LogTargets.File | LogTargets.Console, args);
62 bool exit = false; 62 bool exit = false;
63 63
64 if(kernel.CommandLine.WasPassed("usage")) 64 if(kernel.CommandLine.WasPassed("usage"))
65 { 65 {
66 exit = true; 66 exit = true;
67 OutputUsage(); 67 OutputUsage();
68 } 68 }
69 if(kernel.CommandLine.WasPassed("showtargets")) 69 if(kernel.CommandLine.WasPassed("showtargets"))
70 { 70 {
71 exit = true; 71 exit = true;
72 OutputTargets(kernel); 72 OutputTargets(kernel);
73 } 73 }
74 if(kernel.CommandLine.WasPassed("install")) 74 if(kernel.CommandLine.WasPassed("install"))
75 { 75 {
76 exit = true; 76 exit = true;
77 InstallAssembly(kernel); 77 InstallAssembly(kernel);
78 } 78 }
79 if(kernel.CommandLine.WasPassed("remove")) 79 if(kernel.CommandLine.WasPassed("remove"))
80 { 80 {
81 exit = true; 81 exit = true;
82 RemoveAssembly(kernel); 82 RemoveAssembly(kernel);
83 } 83 }
84 84
85 if(!exit) 85 if(!exit)
86 { 86 {
87 kernel.Process(); 87 kernel.Process();
88 } 88 }
89 } 89 }
90#if !DEBUG 90#if !DEBUG
91 catch (Exception ex) 91 catch (Exception ex)
@@ -96,70 +96,70 @@ namespace Prebuild
96#endif 96#endif
97 finally 97 finally
98 { 98 {
99 if(kernel != null && kernel.PauseAfterFinish) 99 if(kernel != null && kernel.PauseAfterFinish)
100 { 100 {
101 Console.WriteLine("\nPress enter to continue..."); 101 Console.WriteLine("\nPress enter to continue...");
102 Console.ReadLine(); 102 Console.ReadLine();
103 } 103 }
104 } 104 }
105 } 105 }
106 106
107 #endregion 107 #endregion
108 108
109 #region Private Methods 109 #region Private Methods
110 110
111 private static void InstallAssembly(Kernel kernel) 111 private static void InstallAssembly(Kernel kernel)
112 { 112 {
113 Publish publish = new Publish(); 113 Publish publish = new Publish();
114 string file = kernel.CommandLine["install"]; 114 string file = kernel.CommandLine["install"];
115 //Console.WriteLine(".."+file+".."); 115 //Console.WriteLine(".."+file+"..");
116 publish.GacInstall(file); 116 publish.GacInstall(file);
117 } 117 }
118 118
119 private static void RemoveAssembly(Kernel kernel) 119 private static void RemoveAssembly(Kernel kernel)
120 { 120 {
121 Publish publish = new Publish(); 121 Publish publish = new Publish();
122 string file = kernel.CommandLine["remove"]; 122 string file = kernel.CommandLine["remove"];
123 publish.GacRemove(file); 123 publish.GacRemove(file);
124 } 124 }
125 125
126 private static void OutputUsage() 126 private static void OutputUsage()
127 { 127 {
128 Console.WriteLine("Usage: prebuild /target <target> [options]"); 128 Console.WriteLine("Usage: prebuild /target <target> [options]");
129 Console.WriteLine("Available command-line switches:"); 129 Console.WriteLine("Available command-line switches:");
130 Console.WriteLine(); 130 Console.WriteLine();
131 Console.WriteLine("/target Target for Prebuild"); 131 Console.WriteLine("/target Target for Prebuild");
132 Console.WriteLine("/clean Clean the build files for the given target"); 132 Console.WriteLine("/clean Clean the build files for the given target");
133 Console.WriteLine("/file XML file to process"); 133 Console.WriteLine("/file XML file to process");
134 Console.WriteLine("/log Log file to write to"); 134 Console.WriteLine("/log Log file to write to");
135 Console.WriteLine("/ppo Pre-process the file, but perform no other processing"); 135 Console.WriteLine("/ppo Pre-process the file, but perform no other processing");
136 Console.WriteLine("/pause Pauses the application after execution to view the output"); 136 Console.WriteLine("/pause Pauses the application after execution to view the output");
137 Console.WriteLine("/yes Default to yes to any questions asked"); 137 Console.WriteLine("/yes Default to yes to any questions asked");
138 Console.WriteLine("/install Install assembly into the GAC"); 138 Console.WriteLine("/install Install assembly into the GAC");
139 Console.WriteLine("/remove Remove assembly from the GAC"); 139 Console.WriteLine("/remove Remove assembly from the GAC");
140 Console.WriteLine(); 140 Console.WriteLine();
141 Console.WriteLine("See 'prebuild /showtargets for a list of available targets"); 141 Console.WriteLine("See 'prebuild /showtargets for a list of available targets");
142 Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information"); 142 Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information");
143 Console.WriteLine(); 143 Console.WriteLine();
144 } 144 }
145 145
146 private static void OutputTargets(Kernel kern) 146 private static void OutputTargets(Kernel kern)
147 { 147 {
148 Console.WriteLine("Targets available in Prebuild:"); 148 Console.WriteLine("Targets available in Prebuild:");
149 Console.WriteLine(""); 149 Console.WriteLine("");
150 if(kern.Targets.Keys.Count > 0) 150 if(kern.Targets.Keys.Count > 0)
151 { 151 {
152 string[] targs = new string[kern.Targets.Keys.Count]; 152 string[] targs = new string[kern.Targets.Keys.Count];
153 kern.Targets.Keys.CopyTo(targs, 0); 153 kern.Targets.Keys.CopyTo(targs, 0);
154 Array.Sort(targs); 154 Array.Sort(targs);
155 foreach(string target in targs) 155 foreach(string target in targs)
156 { 156 {
157 Console.WriteLine(target); 157 Console.WriteLine(target);
158 } 158 }
159 } 159 }
160 Console.WriteLine(""); 160 Console.WriteLine("");
161 } 161 }
162 162
163 #endregion 163 #endregion
164 } 164 }
165} 165}
diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs
index 013743d..f9d90bb 100644
--- a/Prebuild/src/Properties/AssemblyInfo.cs
+++ b/Prebuild/src/Properties/AssemblyInfo.cs
@@ -52,7 +52,7 @@ using System.Resources;
52[assembly: CLSCompliant(true)] 52[assembly: CLSCompliant(true)]
53 53
54// 54//
55// General Information about an assembly is controlled through the following 55// General Information about an assembly is controlled through the following
56// set of attributes. Change these attribute values to modify the information 56// set of attributes. Change these attribute values to modify the information
57// associated with an assembly. 57// associated with an assembly.
58// 58//
@@ -77,34 +77,34 @@ using System.Resources;
77// Version information for an assembly consists of the following four values: 77// Version information for an assembly consists of the following four values:
78// 78//
79// Major Version 79// Major Version
80// Minor Version 80// Minor Version
81// Build Number 81// Build Number
82// Revision 82// Revision
83// 83//
84// You can specify all the values or you can default the Revision and Build Numbers 84// You can specify all the values or you can default the Revision and Build Numbers
85// by using the '*' as shown below: 85// by using the '*' as shown below:
86 86
87// 87//
88// In order to sign your assembly you must specify a key to use. Refer to the 88// In order to sign your assembly you must specify a key to use. Refer to the
89// Microsoft .NET Framework documentation for more information on assembly signing. 89// Microsoft .NET Framework documentation for more information on assembly signing.
90// 90//
91// Use the attributes below to control which key is used for signing. 91// Use the attributes below to control which key is used for signing.
92// 92//
93// Notes: 93// Notes:
94// (*) If no key is specified, the assembly is not signed. 94// (*) If no key is specified, the assembly is not signed.
95// (*) KeyName refers to a key that has been installed in the Crypto Service 95// (*) KeyName refers to a key that has been installed in the Crypto Service
96// Provider (CSP) on your machine. KeyFile refers to a file which contains 96// Provider (CSP) on your machine. KeyFile refers to a file which contains
97// a key. 97// a key.
98// (*) If the KeyFile and the KeyName values are both specified, the 98// (*) If the KeyFile and the KeyName values are both specified, the
99// following processing occurs: 99// following processing occurs:
100// (1) If the KeyName can be found in the CSP, that key is used. 100// (1) If the KeyName can be found in the CSP, that key is used.
101// (2) If the KeyName does not exist and the KeyFile does exist, the key 101// (2) If the KeyName does not exist and the KeyFile does exist, the key
102// in the KeyFile is installed into the CSP and used. 102// in the KeyFile is installed into the CSP and used.
103// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 103// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
104// When specifying the KeyFile, the location of the KeyFile should be 104// When specifying the KeyFile, the location of the KeyFile should be
105// relative to the project output directory which is 105// relative to the project output directory which is
106// %Project Directory%\obj\<configuration>. For example, if your KeyFile is 106// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
107// located in the project directory, you would specify the AssemblyKeyFile 107// located in the project directory, you would specify the AssemblyKeyFile
108// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 108// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
109// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 109// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
110// documentation for more information on this. 110// documentation for more information on this.
diff --git a/ThirdParty/SmartThreadPool/CallerThreadContext.cs b/ThirdParty/SmartThreadPool/CallerThreadContext.cs
index e63add5..925c39b 100644
--- a/ThirdParty/SmartThreadPool/CallerThreadContext.cs
+++ b/ThirdParty/SmartThreadPool/CallerThreadContext.cs
@@ -13,125 +13,125 @@ namespace Amib.Threading.Internal
13{ 13{
14#region CallerThreadContext class 14#region CallerThreadContext class
15 15
16 /// <summary> 16 /// <summary>
17 /// This class stores the caller call context in order to restore 17 /// This class stores the caller call context in order to restore
18 /// it when the work item is executed in the thread pool environment. 18 /// it when the work item is executed in the thread pool environment.
19 /// </summary> 19 /// </summary>
20 internal class CallerThreadContext 20 internal class CallerThreadContext
21 { 21 {
22#region Prepare reflection information 22#region Prepare reflection information
23 23
24 // Cached type information. 24 // Cached type information.
25 private static readonly MethodInfo getLogicalCallContextMethodInfo = 25 private static readonly MethodInfo getLogicalCallContextMethodInfo =
26 typeof(Thread).GetMethod("GetLogicalCallContext", BindingFlags.Instance | BindingFlags.NonPublic); 26 typeof(Thread).GetMethod("GetLogicalCallContext", BindingFlags.Instance | BindingFlags.NonPublic);
27 27
28 private static readonly MethodInfo setLogicalCallContextMethodInfo = 28 private static readonly MethodInfo setLogicalCallContextMethodInfo =
29 typeof(Thread).GetMethod("SetLogicalCallContext", BindingFlags.Instance | BindingFlags.NonPublic); 29 typeof(Thread).GetMethod("SetLogicalCallContext", BindingFlags.Instance | BindingFlags.NonPublic);
30 30
31 private static string HttpContextSlotName = GetHttpContextSlotName(); 31 private static string HttpContextSlotName = GetHttpContextSlotName();
32 32
33 private static string GetHttpContextSlotName() 33 private static string GetHttpContextSlotName()
34 { 34 {
35 FieldInfo fi = typeof(HttpContext).GetField("CallContextSlotName", BindingFlags.Static | BindingFlags.NonPublic); 35 FieldInfo fi = typeof(HttpContext).GetField("CallContextSlotName", BindingFlags.Static | BindingFlags.NonPublic);
36 36
37 if (fi != null) 37 if (fi != null)
38 { 38 {
39 return (string) fi.GetValue(null); 39 return (string) fi.GetValue(null);
40 } 40 }
41 41
42 return "HttpContext"; 42 return "HttpContext";
43 } 43 }
44 44
45 #endregion 45 #endregion
46 46
47#region Private fields 47#region Private fields
48 48
49 private HttpContext _httpContext; 49 private HttpContext _httpContext;
50 private LogicalCallContext _callContext; 50 private LogicalCallContext _callContext;
51 51
52 #endregion 52 #endregion
53 53
54 /// <summary> 54 /// <summary>
55 /// Constructor 55 /// Constructor
56 /// </summary> 56 /// </summary>
57 private CallerThreadContext() 57 private CallerThreadContext()
58 { 58 {
59 } 59 }
60 60
61 public bool CapturedCallContext 61 public bool CapturedCallContext
62 { 62 {
63 get 63 get
64 { 64 {
65 return (null != _callContext); 65 return (null != _callContext);
66 } 66 }
67 } 67 }
68 68
69 public bool CapturedHttpContext 69 public bool CapturedHttpContext
70 { 70 {
71 get 71 get
72 { 72 {
73 return (null != _httpContext); 73 return (null != _httpContext);
74 } 74 }
75 } 75 }
76 76
77 /// <summary> 77 /// <summary>
78 /// Captures the current thread context 78 /// Captures the current thread context
79 /// </summary> 79 /// </summary>
80 /// <returns></returns> 80 /// <returns></returns>
81 public static CallerThreadContext Capture( 81 public static CallerThreadContext Capture(
82 bool captureCallContext, 82 bool captureCallContext,
83 bool captureHttpContext) 83 bool captureHttpContext)
84 { 84 {
85 Debug.Assert(captureCallContext || captureHttpContext); 85 Debug.Assert(captureCallContext || captureHttpContext);
86 86
87 CallerThreadContext callerThreadContext = new CallerThreadContext(); 87 CallerThreadContext callerThreadContext = new CallerThreadContext();
88 88
89 // TODO: In NET 2.0, redo using the new feature of ExecutionContext class - Capture() 89 // TODO: In NET 2.0, redo using the new feature of ExecutionContext class - Capture()
90 // Capture Call Context 90 // Capture Call Context
91 if(captureCallContext && (getLogicalCallContextMethodInfo != null)) 91 if(captureCallContext && (getLogicalCallContextMethodInfo != null))
92 { 92 {
93 callerThreadContext._callContext = (LogicalCallContext)getLogicalCallContextMethodInfo.Invoke(Thread.CurrentThread, null); 93 callerThreadContext._callContext = (LogicalCallContext)getLogicalCallContextMethodInfo.Invoke(Thread.CurrentThread, null);
94 if (callerThreadContext._callContext != null) 94 if (callerThreadContext._callContext != null)
95 { 95 {
96 callerThreadContext._callContext = (LogicalCallContext)callerThreadContext._callContext.Clone(); 96 callerThreadContext._callContext = (LogicalCallContext)callerThreadContext._callContext.Clone();
97 } 97 }
98 } 98 }
99 99
100 // Capture httpContext 100 // Capture httpContext
101 if (captureHttpContext && (null != HttpContext.Current)) 101 if (captureHttpContext && (null != HttpContext.Current))
102 { 102 {
103 callerThreadContext._httpContext = HttpContext.Current; 103 callerThreadContext._httpContext = HttpContext.Current;
104 } 104 }
105 105
106 return callerThreadContext; 106 return callerThreadContext;
107 } 107 }
108 108
109 /// <summary> 109 /// <summary>
110 /// Applies the thread context stored earlier 110 /// Applies the thread context stored earlier
111 /// </summary> 111 /// </summary>
112 /// <param name="callerThreadContext"></param> 112 /// <param name="callerThreadContext"></param>
113 public static void Apply(CallerThreadContext callerThreadContext) 113 public static void Apply(CallerThreadContext callerThreadContext)
114 { 114 {
115 if (null == callerThreadContext) 115 if (null == callerThreadContext)
116 { 116 {
117 throw new ArgumentNullException("callerThreadContext"); 117 throw new ArgumentNullException("callerThreadContext");
118 } 118 }
119 119
120 // Todo: In NET 2.0, redo using the new feature of ExecutionContext class - Run() 120 // Todo: In NET 2.0, redo using the new feature of ExecutionContext class - Run()
121 // Restore call context 121 // Restore call context
122 if ((callerThreadContext._callContext != null) && (setLogicalCallContextMethodInfo != null)) 122 if ((callerThreadContext._callContext != null) && (setLogicalCallContextMethodInfo != null))
123 { 123 {
124 setLogicalCallContextMethodInfo.Invoke(Thread.CurrentThread, new object[] { callerThreadContext._callContext }); 124 setLogicalCallContextMethodInfo.Invoke(Thread.CurrentThread, new object[] { callerThreadContext._callContext });
125 } 125 }
126 126
127 // Restore HttpContext 127 // Restore HttpContext
128 if (callerThreadContext._httpContext != null) 128 if (callerThreadContext._httpContext != null)
129 { 129 {
130 HttpContext.Current = callerThreadContext._httpContext; 130 HttpContext.Current = callerThreadContext._httpContext;
131 //CallContext.SetData(HttpContextSlotName, callerThreadContext._httpContext); 131 //CallContext.SetData(HttpContextSlotName, callerThreadContext._httpContext);
132 } 132 }
133 } 133 }
134 } 134 }
135 135
136 #endregion 136 #endregion
137} 137}
diff --git a/ThirdParty/SmartThreadPool/EventWaitHandle.cs b/ThirdParty/SmartThreadPool/EventWaitHandle.cs
index 25be07a..b7983cd 100644
--- a/ThirdParty/SmartThreadPool/EventWaitHandle.cs
+++ b/ThirdParty/SmartThreadPool/EventWaitHandle.cs
@@ -36,34 +36,34 @@ namespace Amib.Threading.Internal
36 return waitHandle.WaitOne(millisecondsTimeout, exitContext); 36 return waitHandle.WaitOne(millisecondsTimeout, exitContext);
37 } 37 }
38 38
39 private static IntPtr[] PrepareNativeHandles(WaitHandle[] waitHandles) 39 private static IntPtr[] PrepareNativeHandles(WaitHandle[] waitHandles)
40 { 40 {
41 IntPtr[] nativeHandles = new IntPtr[waitHandles.Length]; 41 IntPtr[] nativeHandles = new IntPtr[waitHandles.Length];
42 for (int i = 0; i < waitHandles.Length; i++) 42 for (int i = 0; i < waitHandles.Length; i++)
43 { 43 {
44 nativeHandles[i] = waitHandles[i].Handle; 44 nativeHandles[i] = waitHandles[i].Handle;
45 } 45 }
46 return nativeHandles; 46 return nativeHandles;
47 } 47 }
48 48
49 public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 49 public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
50 { 50 {
51 uint timeout = millisecondsTimeout < 0 ? INFINITE : (uint)millisecondsTimeout; 51 uint timeout = millisecondsTimeout < 0 ? INFINITE : (uint)millisecondsTimeout;
52 52
53 IntPtr[] nativeHandles = PrepareNativeHandles(waitHandles); 53 IntPtr[] nativeHandles = PrepareNativeHandles(waitHandles);
54 54
55 int result = WaitForMultipleObjects((uint)waitHandles.Length, nativeHandles, true, timeout); 55 int result = WaitForMultipleObjects((uint)waitHandles.Length, nativeHandles, true, timeout);
56 56
57 if (result == WAIT_TIMEOUT || result == WAIT_FAILED) 57 if (result == WAIT_TIMEOUT || result == WAIT_FAILED)
58 { 58 {
59 return false; 59 return false;
60 } 60 }
61 61
62 return true; 62 return true;
63 } 63 }
64 64
65 65
66 public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 66 public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
67 { 67 {
68 uint timeout = millisecondsTimeout < 0 ? INFINITE : (uint)millisecondsTimeout; 68 uint timeout = millisecondsTimeout < 0 ? INFINITE : (uint)millisecondsTimeout;
69 69
@@ -90,7 +90,7 @@ namespace Amib.Threading.Internal
90 90
91 return WaitAny(waitHandles, millisecondsTimeout, false); 91 return WaitAny(waitHandles, millisecondsTimeout, false);
92 } 92 }
93 93
94 #endregion 94 #endregion
95 95
96 #region External methods 96 #region External methods
diff --git a/ThirdParty/SmartThreadPool/EventWaitHandleFactory.cs b/ThirdParty/SmartThreadPool/EventWaitHandleFactory.cs
index 3c9c849..ece24de 100644
--- a/ThirdParty/SmartThreadPool/EventWaitHandleFactory.cs
+++ b/ThirdParty/SmartThreadPool/EventWaitHandleFactory.cs
@@ -10,7 +10,7 @@ namespace Amib.Threading.Internal
10 /// <summary> 10 /// <summary>
11 /// EventWaitHandleFactory class. 11 /// EventWaitHandleFactory class.
12 /// This is a static class that creates AutoResetEvent and ManualResetEvent objects. 12 /// This is a static class that creates AutoResetEvent and ManualResetEvent objects.
13 /// In WindowCE the WaitForMultipleObjects API fails to use the Handle property 13 /// In WindowCE the WaitForMultipleObjects API fails to use the Handle property
14 /// of XxxResetEvent. It can use only handles that were created by the CreateEvent API. 14 /// of XxxResetEvent. It can use only handles that were created by the CreateEvent API.
15 /// Consequently this class creates the needed XxxResetEvent and replaces the handle if 15 /// Consequently this class creates the needed XxxResetEvent and replaces the handle if
16 /// it's a WindowsCE OS. 16 /// it's a WindowsCE OS.
@@ -57,7 +57,7 @@ namespace Amib.Threading.Internal
57 /// <param name="initialState">The initial state of the event</param> 57 /// <param name="initialState">The initial state of the event</param>
58 private static void ReplaceEventHandle(WaitHandle waitHandle, bool manualReset, bool initialState) 58 private static void ReplaceEventHandle(WaitHandle waitHandle, bool manualReset, bool initialState)
59 { 59 {
60 // Store the old handle 60 // Store the old handle
61 IntPtr oldHandle = waitHandle.Handle; 61 IntPtr oldHandle = waitHandle.Handle;
62 62
63 // Create a new event 63 // Create a new event
@@ -67,7 +67,7 @@ namespace Amib.Threading.Internal
67 waitHandle.Handle = newHandle; 67 waitHandle.Handle = newHandle;
68 68
69 // Close the old event 69 // Close the old event
70 CloseHandle (oldHandle); 70 CloseHandle (oldHandle);
71 } 71 }
72 72
73 [DllImport("coredll.dll", SetLastError = true)] 73 [DllImport("coredll.dll", SetLastError = true)]
diff --git a/ThirdParty/SmartThreadPool/Interfaces.cs b/ThirdParty/SmartThreadPool/Interfaces.cs
index 513422f..8cc23a0 100644
--- a/ThirdParty/SmartThreadPool/Interfaces.cs
+++ b/ThirdParty/SmartThreadPool/Interfaces.cs
@@ -3,18 +3,18 @@ using System.Threading;
3 3
4namespace Amib.Threading 4namespace Amib.Threading
5{ 5{
6 #region Delegates 6 #region Delegates
7 7
8 /// <summary> 8 /// <summary>
9 /// A delegate that represents the method to run as the work item 9 /// A delegate that represents the method to run as the work item
10 /// </summary> 10 /// </summary>
11 /// <param name="state">A state object for the method to run</param> 11 /// <param name="state">A state object for the method to run</param>
12 public delegate object WorkItemCallback(object state); 12 public delegate object WorkItemCallback(object state);
13 13
14 /// <summary> 14 /// <summary>
15 /// A delegate to call after the WorkItemCallback completed 15 /// A delegate to call after the WorkItemCallback completed
16 /// </summary> 16 /// </summary>
17 /// <param name="wir">The work item result object</param> 17 /// <param name="wir">The work item result object</param>
18 public delegate void PostExecuteWorkItemCallback(IWorkItemResult wir); 18 public delegate void PostExecuteWorkItemCallback(IWorkItemResult wir);
19 19
20 /// <summary> 20 /// <summary>
@@ -23,56 +23,56 @@ namespace Amib.Threading
23 /// <param name="wir">The work item result object</param> 23 /// <param name="wir">The work item result object</param>
24 public delegate void PostExecuteWorkItemCallback<TResult>(IWorkItemResult<TResult> wir); 24 public delegate void PostExecuteWorkItemCallback<TResult>(IWorkItemResult<TResult> wir);
25 25
26 /// <summary> 26 /// <summary>
27 /// A delegate to call when a WorkItemsGroup becomes idle 27 /// A delegate to call when a WorkItemsGroup becomes idle
28 /// </summary> 28 /// </summary>
29 /// <param name="workItemsGroup">A reference to the WorkItemsGroup that became idle</param> 29 /// <param name="workItemsGroup">A reference to the WorkItemsGroup that became idle</param>
30 public delegate void WorkItemsGroupIdleHandler(IWorkItemsGroup workItemsGroup); 30 public delegate void WorkItemsGroupIdleHandler(IWorkItemsGroup workItemsGroup);
31 31
32 /// <summary> 32 /// <summary>
33 /// A delegate to call after a thread is created, but before 33 /// A delegate to call after a thread is created, but before
34 /// it's first use. 34 /// it's first use.
35 /// </summary> 35 /// </summary>
36 public delegate void ThreadInitializationHandler(); 36 public delegate void ThreadInitializationHandler();
37 37
38 /// <summary> 38 /// <summary>
39 /// A delegate to call when a thread is about to exit, after 39 /// A delegate to call when a thread is about to exit, after
40 /// it is no longer belong to the pool. 40 /// it is no longer belong to the pool.
41 /// </summary> 41 /// </summary>
42 public delegate void ThreadTerminationHandler(); 42 public delegate void ThreadTerminationHandler();
43 43
44 #endregion 44 #endregion
45 45
46 #region WorkItem Priority 46 #region WorkItem Priority
47 47
48 /// <summary> 48 /// <summary>
49 /// Defines the availeable priorities of a work item. 49 /// Defines the availeable priorities of a work item.
50 /// The higher the priority a work item has, the sooner 50 /// The higher the priority a work item has, the sooner
51 /// it will be executed. 51 /// it will be executed.
52 /// </summary> 52 /// </summary>
53 public enum WorkItemPriority 53 public enum WorkItemPriority
54 { 54 {
55 Lowest, 55 Lowest,
56 BelowNormal, 56 BelowNormal,
57 Normal, 57 Normal,
58 AboveNormal, 58 AboveNormal,
59 Highest, 59 Highest,
60 } 60 }
61 61
62 #endregion 62 #endregion
63 63
64 #region IWorkItemsGroup interface 64 #region IWorkItemsGroup interface
65 65
66 /// <summary> 66 /// <summary>
67 /// IWorkItemsGroup interface 67 /// IWorkItemsGroup interface
68 /// Created by SmartThreadPool.CreateWorkItemsGroup() 68 /// Created by SmartThreadPool.CreateWorkItemsGroup()
69 /// </summary> 69 /// </summary>
70 public interface IWorkItemsGroup 70 public interface IWorkItemsGroup
71 { 71 {
72 /// <summary> 72 /// <summary>
73 /// Get/Set the name of the WorkItemsGroup 73 /// Get/Set the name of the WorkItemsGroup
74 /// </summary> 74 /// </summary>
75 string Name { get; set; } 75 string Name { get; set; }
76 76
77 /// <summary> 77 /// <summary>
78 /// Get/Set the maximum number of workitem that execute cocurrency on the thread pool 78 /// Get/Set the maximum number of workitem that execute cocurrency on the thread pool
@@ -115,14 +115,14 @@ namespace Amib.Threading
115 /// <summary> 115 /// <summary>
116 /// Wait for all work item to complete. 116 /// Wait for all work item to complete.
117 /// </summary> 117 /// </summary>
118 void WaitForIdle(); 118 void WaitForIdle();
119 119
120 /// <summary> 120 /// <summary>
121 /// Wait for all work item to complete, until timeout expired 121 /// Wait for all work item to complete, until timeout expired
122 /// </summary> 122 /// </summary>
123 /// <param name="timeout">How long to wait for the work items to complete</param> 123 /// <param name="timeout">How long to wait for the work items to complete</param>
124 /// <returns>Returns true if work items completed within the timeout, otherwise false.</returns> 124 /// <returns>Returns true if work items completed within the timeout, otherwise false.</returns>
125 bool WaitForIdle(TimeSpan timeout); 125 bool WaitForIdle(TimeSpan timeout);
126 126
127 /// <summary> 127 /// <summary>
128 /// Wait for all work item to complete, until timeout expired 128 /// Wait for all work item to complete, until timeout expired
@@ -150,7 +150,7 @@ namespace Amib.Threading
150 /// Queue a work item 150 /// Queue a work item
151 /// </summary> 151 /// </summary>
152 /// <param name="callback">A callback to execute</param> 152 /// <param name="callback">A callback to execute</param>
153 /// <returns>Returns a work item result</returns> 153 /// <returns>Returns a work item result</returns>
154 IWorkItemResult QueueWorkItem(WorkItemCallback callback); 154 IWorkItemResult QueueWorkItem(WorkItemCallback callback);
155 155
156 /// <summary> 156 /// <summary>
@@ -166,7 +166,7 @@ namespace Amib.Threading
166 /// </summary> 166 /// </summary>
167 /// <param name="callback">A callback to execute</param> 167 /// <param name="callback">A callback to execute</param>
168 /// <param name="state"> 168 /// <param name="state">
169 /// The context object of the work item. Used for passing arguments to the work item. 169 /// The context object of the work item. Used for passing arguments to the work item.
170 /// </param> 170 /// </param>
171 /// <returns>Returns a work item result</returns> 171 /// <returns>Returns a work item result</returns>
172 IWorkItemResult QueueWorkItem(WorkItemCallback callback, object state); 172 IWorkItemResult QueueWorkItem(WorkItemCallback callback, object state);
@@ -176,7 +176,7 @@ namespace Amib.Threading
176 /// </summary> 176 /// </summary>
177 /// <param name="callback">A callback to execute</param> 177 /// <param name="callback">A callback to execute</param>
178 /// <param name="state"> 178 /// <param name="state">
179 /// The context object of the work item. Used for passing arguments to the work item. 179 /// The context object of the work item. Used for passing arguments to the work item.
180 /// </param> 180 /// </param>
181 /// <param name="workItemPriority">The work item priority</param> 181 /// <param name="workItemPriority">The work item priority</param>
182 /// <returns>Returns a work item result</returns> 182 /// <returns>Returns a work item result</returns>
@@ -187,7 +187,7 @@ namespace Amib.Threading
187 /// </summary> 187 /// </summary>
188 /// <param name="callback">A callback to execute</param> 188 /// <param name="callback">A callback to execute</param>
189 /// <param name="state"> 189 /// <param name="state">
190 /// The context object of the work item. Used for passing arguments to the work item. 190 /// The context object of the work item. Used for passing arguments to the work item.
191 /// </param> 191 /// </param>
192 /// <param name="postExecuteWorkItemCallback"> 192 /// <param name="postExecuteWorkItemCallback">
193 /// A delegate to call after the callback completion 193 /// A delegate to call after the callback completion
@@ -200,7 +200,7 @@ namespace Amib.Threading
200 /// </summary> 200 /// </summary>
201 /// <param name="callback">A callback to execute</param> 201 /// <param name="callback">A callback to execute</param>
202 /// <param name="state"> 202 /// <param name="state">
203 /// The context object of the work item. Used for passing arguments to the work item. 203 /// The context object of the work item. Used for passing arguments to the work item.
204 /// </param> 204 /// </param>
205 /// <param name="postExecuteWorkItemCallback"> 205 /// <param name="postExecuteWorkItemCallback">
206 /// A delegate to call after the callback completion 206 /// A delegate to call after the callback completion
@@ -214,7 +214,7 @@ namespace Amib.Threading
214 /// </summary> 214 /// </summary>
215 /// <param name="callback">A callback to execute</param> 215 /// <param name="callback">A callback to execute</param>
216 /// <param name="state"> 216 /// <param name="state">
217 /// The context object of the work item. Used for passing arguments to the work item. 217 /// The context object of the work item. Used for passing arguments to the work item.
218 /// </param> 218 /// </param>
219 /// <param name="postExecuteWorkItemCallback"> 219 /// <param name="postExecuteWorkItemCallback">
220 /// A delegate to call after the callback completion 220 /// A delegate to call after the callback completion
@@ -228,7 +228,7 @@ namespace Amib.Threading
228 /// </summary> 228 /// </summary>
229 /// <param name="callback">A callback to execute</param> 229 /// <param name="callback">A callback to execute</param>
230 /// <param name="state"> 230 /// <param name="state">
231 /// The context object of the work item. Used for passing arguments to the work item. 231 /// The context object of the work item. Used for passing arguments to the work item.
232 /// </param> 232 /// </param>
233 /// <param name="postExecuteWorkItemCallback"> 233 /// <param name="postExecuteWorkItemCallback">
234 /// A delegate to call after the callback completion 234 /// A delegate to call after the callback completion
@@ -252,7 +252,7 @@ namespace Amib.Threading
252 /// <param name="workItemInfo">Work item information</param> 252 /// <param name="workItemInfo">Work item information</param>
253 /// <param name="callback">A callback to execute</param> 253 /// <param name="callback">A callback to execute</param>
254 /// <param name="state"> 254 /// <param name="state">
255 /// The context object of the work item. Used for passing arguments to the work item. 255 /// The context object of the work item. Used for passing arguments to the work item.
256 /// </param> 256 /// </param>
257 /// <returns>Returns a work item result</returns> 257 /// <returns>Returns a work item result</returns>
258 IWorkItemResult QueueWorkItem(WorkItemInfo workItemInfo, WorkItemCallback callback, object state); 258 IWorkItemResult QueueWorkItem(WorkItemInfo workItemInfo, WorkItemCallback callback, object state);
@@ -328,72 +328,72 @@ namespace Amib.Threading
328 /// <summary> 328 /// <summary>
329 /// Queue a work item. 329 /// Queue a work item.
330 /// </summary> 330 /// </summary>
331 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object. 331 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object.
332 /// its GetResult() returns a TResult object</returns> 332 /// its GetResult() returns a TResult object</returns>
333 IWorkItemResult<TResult> QueueWorkItem<TResult>(Func<TResult> func); 333 IWorkItemResult<TResult> QueueWorkItem<TResult>(Func<TResult> func);
334 334
335 /// <summary> 335 /// <summary>
336 /// Queue a work item. 336 /// Queue a work item.
337 /// </summary> 337 /// </summary>
338 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object. 338 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object.
339 /// its GetResult() returns a TResult object</returns> 339 /// its GetResult() returns a TResult object</returns>
340 IWorkItemResult<TResult> QueueWorkItem<T, TResult>(Func<T, TResult> func, T arg); 340 IWorkItemResult<TResult> QueueWorkItem<T, TResult>(Func<T, TResult> func, T arg);
341 341
342 /// <summary> 342 /// <summary>
343 /// Queue a work item. 343 /// Queue a work item.
344 /// </summary> 344 /// </summary>
345 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object. 345 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object.
346 /// its GetResult() returns a TResult object</returns> 346 /// its GetResult() returns a TResult object</returns>
347 IWorkItemResult<TResult> QueueWorkItem<T1, T2, TResult>(Func<T1, T2, TResult> func, T1 arg1, T2 arg2); 347 IWorkItemResult<TResult> QueueWorkItem<T1, T2, TResult>(Func<T1, T2, TResult> func, T1 arg1, T2 arg2);
348 348
349 /// <summary> 349 /// <summary>
350 /// Queue a work item. 350 /// Queue a work item.
351 /// </summary> 351 /// </summary>
352 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object. 352 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object.
353 /// its GetResult() returns a TResult object</returns> 353 /// its GetResult() returns a TResult object</returns>
354 IWorkItemResult<TResult> QueueWorkItem<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> func, T1 arg1, T2 arg2, T3 arg3); 354 IWorkItemResult<TResult> QueueWorkItem<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> func, T1 arg1, T2 arg2, T3 arg3);
355 355
356 /// <summary> 356 /// <summary>
357 /// Queue a work item. 357 /// Queue a work item.
358 /// </summary> 358 /// </summary>
359 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object. 359 /// <returns>Returns a IWorkItemResult&lt;TResult&gt; object.
360 /// its GetResult() returns a TResult object</returns> 360 /// its GetResult() returns a TResult object</returns>
361 IWorkItemResult<TResult> QueueWorkItem<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult> func, T1 arg1, T2 arg2, T3 arg3, T4 arg4); 361 IWorkItemResult<TResult> QueueWorkItem<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult> func, T1 arg1, T2 arg2, T3 arg3, T4 arg4);
362 362
363 #endregion 363 #endregion
364 } 364 }
365 365
366 #endregion 366 #endregion
367 367
368 #region CallToPostExecute enumerator 368 #region CallToPostExecute enumerator
369 369
370 [Flags] 370 [Flags]
371 public enum CallToPostExecute 371 public enum CallToPostExecute
372 { 372 {
373 /// <summary> 373 /// <summary>
374 /// Never call to the PostExecute call back 374 /// Never call to the PostExecute call back
375 /// </summary> 375 /// </summary>
376 Never = 0x00, 376 Never = 0x00,
377 377
378 /// <summary> 378 /// <summary>
379 /// Call to the PostExecute only when the work item is cancelled 379 /// Call to the PostExecute only when the work item is cancelled
380 /// </summary> 380 /// </summary>
381 WhenWorkItemCanceled = 0x01, 381 WhenWorkItemCanceled = 0x01,
382 382
383 /// <summary> 383 /// <summary>
384 /// Call to the PostExecute only when the work item is not cancelled 384 /// Call to the PostExecute only when the work item is not cancelled
385 /// </summary> 385 /// </summary>
386 WhenWorkItemNotCanceled = 0x02, 386 WhenWorkItemNotCanceled = 0x02,
387 387
388 /// <summary> 388 /// <summary>
389 /// Always call to the PostExecute 389 /// Always call to the PostExecute
390 /// </summary> 390 /// </summary>
391 Always = WhenWorkItemCanceled | WhenWorkItemNotCanceled, 391 Always = WhenWorkItemCanceled | WhenWorkItemNotCanceled,
392 } 392 }
393 393
394 #endregion 394 #endregion
395 395
396 #region IWorkItemResult interface 396 #region IWorkItemResult interface
397 397
398 /// <summary> 398 /// <summary>
399 /// The common interface of IWorkItemResult and IWorkItemResult&lt;T&gt; 399 /// The common interface of IWorkItemResult and IWorkItemResult&lt;T&gt;
@@ -421,159 +421,159 @@ namespace Amib.Threading
421 { 421 {
422 } 422 }
423 423
424 /// <summary> 424 /// <summary>
425 /// IWorkItemResult&lt;TResult&gt; interface. 425 /// IWorkItemResult&lt;TResult&gt; interface.
426 /// Created when a Func&lt;TResult&gt; work item is queued. 426 /// Created when a Func&lt;TResult&gt; work item is queued.
427 /// </summary> 427 /// </summary>
428 public interface IWorkItemResult<TResult> : IWaitableResult 428 public interface IWorkItemResult<TResult> : IWaitableResult
429 { 429 {
430 /// <summary> 430 /// <summary>
431 /// Get the result of the work item. 431 /// Get the result of the work item.
432 /// If the work item didn't run yet then the caller waits. 432 /// If the work item didn't run yet then the caller waits.
433 /// </summary> 433 /// </summary>
434 /// <returns>The result of the work item</returns> 434 /// <returns>The result of the work item</returns>
435 TResult GetResult(); 435 TResult GetResult();
436 436
437 /// <summary> 437 /// <summary>
438 /// Get the result of the work item. 438 /// Get the result of the work item.
439 /// If the work item didn't run yet then the caller waits until timeout. 439 /// If the work item didn't run yet then the caller waits until timeout.
440 /// </summary> 440 /// </summary>
441 /// <returns>The result of the work item</returns> 441 /// <returns>The result of the work item</returns>
442 /// On timeout throws WorkItemTimeoutException 442 /// On timeout throws WorkItemTimeoutException
443 TResult GetResult(
444 int millisecondsTimeout,
445 bool exitContext);
446
447 /// <summary>
448 /// Get the result of the work item.
449 /// If the work item didn't run yet then the caller waits until timeout.
450 /// </summary>
451 /// <returns>The result of the work item</returns>
452 /// On timeout throws WorkItemTimeoutException
453 TResult GetResult(
454 TimeSpan timeout,
455 bool exitContext);
456
457 /// <summary>
458 /// Get the result of the work item.
459 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
460 /// </summary>
461 /// <param name="millisecondsTimeout">Timeout in milliseconds, or -1 for infinite</param>
462 /// <param name="exitContext">
463 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
464 /// </param>
465 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the blocking if needed</param>
466 /// <returns>The result of the work item</returns>
467 /// On timeout throws WorkItemTimeoutException
468 /// On cancel throws WorkItemCancelException
469 TResult GetResult(
470 int millisecondsTimeout,
471 bool exitContext,
472 WaitHandle cancelWaitHandle);
473
474 /// <summary>
475 /// Get the result of the work item.
476 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
477 /// </summary>
478 /// <returns>The result of the work item</returns>
479 /// On timeout throws WorkItemTimeoutException
480 /// On cancel throws WorkItemCancelException
443 TResult GetResult( 481 TResult GetResult(
444 int millisecondsTimeout, 482 TimeSpan timeout,
445 bool exitContext); 483 bool exitContext,
446 484 WaitHandle cancelWaitHandle);
447 /// <summary> 485
448 /// Get the result of the work item. 486 /// <summary>
449 /// If the work item didn't run yet then the caller waits until timeout. 487 /// Get the result of the work item.
450 /// </summary> 488 /// If the work item didn't run yet then the caller waits.
451 /// <returns>The result of the work item</returns> 489 /// </summary>
452 /// On timeout throws WorkItemTimeoutException 490 /// <param name="e">Filled with the exception if one was thrown</param>
453 TResult GetResult( 491 /// <returns>The result of the work item</returns>
454 TimeSpan timeout,
455 bool exitContext);
456
457 /// <summary>
458 /// Get the result of the work item.
459 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
460 /// </summary>
461 /// <param name="millisecondsTimeout">Timeout in milliseconds, or -1 for infinite</param>
462 /// <param name="exitContext">
463 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
464 /// </param>
465 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the blocking if needed</param>
466 /// <returns>The result of the work item</returns>
467 /// On timeout throws WorkItemTimeoutException
468 /// On cancel throws WorkItemCancelException
469 TResult GetResult(
470 int millisecondsTimeout,
471 bool exitContext,
472 WaitHandle cancelWaitHandle);
473
474 /// <summary>
475 /// Get the result of the work item.
476 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
477 /// </summary>
478 /// <returns>The result of the work item</returns>
479 /// On timeout throws WorkItemTimeoutException
480 /// On cancel throws WorkItemCancelException
481 TResult GetResult(
482 TimeSpan timeout,
483 bool exitContext,
484 WaitHandle cancelWaitHandle);
485
486 /// <summary>
487 /// Get the result of the work item.
488 /// If the work item didn't run yet then the caller waits.
489 /// </summary>
490 /// <param name="e">Filled with the exception if one was thrown</param>
491 /// <returns>The result of the work item</returns>
492 TResult GetResult(out Exception e); 492 TResult GetResult(out Exception e);
493 493
494 /// <summary> 494 /// <summary>
495 /// Get the result of the work item. 495 /// Get the result of the work item.
496 /// If the work item didn't run yet then the caller waits until timeout. 496 /// If the work item didn't run yet then the caller waits until timeout.
497 /// </summary> 497 /// </summary>
498 /// <param name="millisecondsTimeout"></param> 498 /// <param name="millisecondsTimeout"></param>
499 /// <param name="exitContext"></param> 499 /// <param name="exitContext"></param>
500 /// <param name="e">Filled with the exception if one was thrown</param> 500 /// <param name="e">Filled with the exception if one was thrown</param>
501 /// <returns>The result of the work item</returns> 501 /// <returns>The result of the work item</returns>
502 /// On timeout throws WorkItemTimeoutException 502 /// On timeout throws WorkItemTimeoutException
503 TResult GetResult(
504 int millisecondsTimeout,
505 bool exitContext,
506 out Exception e);
507
508 /// <summary>
509 /// Get the result of the work item.
510 /// If the work item didn't run yet then the caller waits until timeout.
511 /// </summary>
512 /// <param name="exitContext"></param>
513 /// <param name="e">Filled with the exception if one was thrown</param>
514 /// <param name="timeout"></param>
515 /// <returns>The result of the work item</returns>
516 /// On timeout throws WorkItemTimeoutException
517 TResult GetResult(
518 TimeSpan timeout,
519 bool exitContext,
520 out Exception e);
521
522 /// <summary>
523 /// Get the result of the work item.
524 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
525 /// </summary>
526 /// <param name="millisecondsTimeout">Timeout in milliseconds, or -1 for infinite</param>
527 /// <param name="exitContext">
528 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
529 /// </param>
530 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the blocking if needed</param>
531 /// <param name="e">Filled with the exception if one was thrown</param>
532 /// <returns>The result of the work item</returns>
533 /// On timeout throws WorkItemTimeoutException
534 /// On cancel throws WorkItemCancelException
535 TResult GetResult(
536 int millisecondsTimeout,
537 bool exitContext,
538 WaitHandle cancelWaitHandle,
539 out Exception e);
540
541 /// <summary>
542 /// Get the result of the work item.
543 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
544 /// </summary>
545 /// <returns>The result of the work item</returns>
546 /// <param name="cancelWaitHandle"></param>
547 /// <param name="e">Filled with the exception if one was thrown</param>
548 /// <param name="timeout"></param>
549 /// <param name="exitContext"></param>
550 /// On timeout throws WorkItemTimeoutException
551 /// On cancel throws WorkItemCancelException
503 TResult GetResult( 552 TResult GetResult(
504 int millisecondsTimeout, 553 TimeSpan timeout,
505 bool exitContext, 554 bool exitContext,
506 out Exception e); 555 WaitHandle cancelWaitHandle,
507 556 out Exception e);
508 /// <summary> 557
509 /// Get the result of the work item. 558 /// <summary>
510 /// If the work item didn't run yet then the caller waits until timeout. 559 /// Gets an indication whether the asynchronous operation has completed.
511 /// </summary> 560 /// </summary>
512 /// <param name="exitContext"></param> 561 bool IsCompleted { get; }
513 /// <param name="e">Filled with the exception if one was thrown</param> 562
514 /// <param name="timeout"></param> 563 /// <summary>
515 /// <returns>The result of the work item</returns> 564 /// Gets an indication whether the asynchronous operation has been canceled.
516 /// On timeout throws WorkItemTimeoutException 565 /// </summary>
517 TResult GetResult( 566 bool IsCanceled { get; }
518 TimeSpan timeout, 567
519 bool exitContext, 568 /// <summary>
520 out Exception e); 569 /// Gets the user-defined object that contains context data
521
522 /// <summary>
523 /// Get the result of the work item.
524 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
525 /// </summary>
526 /// <param name="millisecondsTimeout">Timeout in milliseconds, or -1 for infinite</param>
527 /// <param name="exitContext">
528 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
529 /// </param>
530 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the blocking if needed</param>
531 /// <param name="e">Filled with the exception if one was thrown</param>
532 /// <returns>The result of the work item</returns>
533 /// On timeout throws WorkItemTimeoutException
534 /// On cancel throws WorkItemCancelException
535 TResult GetResult(
536 int millisecondsTimeout,
537 bool exitContext,
538 WaitHandle cancelWaitHandle,
539 out Exception e);
540
541 /// <summary>
542 /// Get the result of the work item.
543 /// If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
544 /// </summary>
545 /// <returns>The result of the work item</returns>
546 /// <param name="cancelWaitHandle"></param>
547 /// <param name="e">Filled with the exception if one was thrown</param>
548 /// <param name="timeout"></param>
549 /// <param name="exitContext"></param>
550 /// On timeout throws WorkItemTimeoutException
551 /// On cancel throws WorkItemCancelException
552 TResult GetResult(
553 TimeSpan timeout,
554 bool exitContext,
555 WaitHandle cancelWaitHandle,
556 out Exception e);
557
558 /// <summary>
559 /// Gets an indication whether the asynchronous operation has completed.
560 /// </summary>
561 bool IsCompleted { get; }
562
563 /// <summary>
564 /// Gets an indication whether the asynchronous operation has been canceled.
565 /// </summary>
566 bool IsCanceled { get; }
567
568 /// <summary>
569 /// Gets the user-defined object that contains context data
570 /// for the work item method. 570 /// for the work item method.
571 /// </summary> 571 /// </summary>
572 object State { get; } 572 object State { get; }
573 573
574 /// <summary> 574 /// <summary>
575 /// Same as Cancel(false). 575 /// Same as Cancel(false).
576 /// </summary> 576 /// </summary>
577 bool Cancel(); 577 bool Cancel();
578 578
579 /// <summary> 579 /// <summary>
@@ -582,7 +582,7 @@ namespace Amib.Threading
582 /// If the work item is completed, it will remain completed 582 /// If the work item is completed, it will remain completed
583 /// If the work item is in progress then the user can check the SmartThreadPool.IsWorkItemCanceled 583 /// If the work item is in progress then the user can check the SmartThreadPool.IsWorkItemCanceled
584 /// property to check if the work item has been cancelled. If the abortExecution is set to true then 584 /// property to check if the work item has been cancelled. If the abortExecution is set to true then
585 /// the Smart Thread Pool will send an AbortException to the running thread to stop the execution 585 /// the Smart Thread Pool will send an AbortException to the running thread to stop the execution
586 /// of the work item. When an in progress work item is canceled its GetResult will throw WorkItemCancelException. 586 /// of the work item. When an in progress work item is canceled its GetResult will throw WorkItemCancelException.
587 /// If the work item is already cancelled it will remain cancelled 587 /// If the work item is already cancelled it will remain cancelled
588 /// </summary> 588 /// </summary>
@@ -590,23 +590,23 @@ namespace Amib.Threading
590 /// <returns>Returns true if the work item was not completed, otherwise false.</returns> 590 /// <returns>Returns true if the work item was not completed, otherwise false.</returns>
591 bool Cancel(bool abortExecution); 591 bool Cancel(bool abortExecution);
592 592
593 /// <summary> 593 /// <summary>
594 /// Get the work item's priority 594 /// Get the work item's priority
595 /// </summary> 595 /// </summary>
596 WorkItemPriority WorkItemPriority { get; } 596 WorkItemPriority WorkItemPriority { get; }
597 597
598 /// <summary> 598 /// <summary>
599 /// Return the result, same as GetResult() 599 /// Return the result, same as GetResult()
600 /// </summary> 600 /// </summary>
601 TResult Result { get; } 601 TResult Result { get; }
602 602
603 /// <summary> 603 /// <summary>
604 /// Returns the exception if occured otherwise returns null. 604 /// Returns the exception if occured otherwise returns null.
605 /// </summary> 605 /// </summary>
606 object Exception { get; } 606 object Exception { get; }
607 } 607 }
608 608
609 #endregion 609 #endregion
610 610
611 #region .NET 3.5 611 #region .NET 3.5
612 612
diff --git a/ThirdParty/SmartThreadPool/InternalInterfaces.cs b/ThirdParty/SmartThreadPool/InternalInterfaces.cs
index 0072e10..3055117 100644
--- a/ThirdParty/SmartThreadPool/InternalInterfaces.cs
+++ b/ThirdParty/SmartThreadPool/InternalInterfaces.cs
@@ -16,7 +16,7 @@ namespace Amib.Threading.Internal
16 { 16 {
17 /// <summary> 17 /// <summary>
18 /// This method is intent for internal use. 18 /// This method is intent for internal use.
19 /// </summary> 19 /// </summary>
20 IWorkItemResult GetWorkItemResult(); 20 IWorkItemResult GetWorkItemResult();
21 } 21 }
22 22
diff --git a/ThirdParty/SmartThreadPool/PriorityQueue.cs b/ThirdParty/SmartThreadPool/PriorityQueue.cs
index 409c879..3ea6084 100644
--- a/ThirdParty/SmartThreadPool/PriorityQueue.cs
+++ b/ThirdParty/SmartThreadPool/PriorityQueue.cs
@@ -5,235 +5,235 @@ using System.Diagnostics;
5 5
6namespace Amib.Threading.Internal 6namespace Amib.Threading.Internal
7{ 7{
8 #region PriorityQueue class 8 #region PriorityQueue class
9 9
10 /// <summary> 10 /// <summary>
11 /// PriorityQueue class 11 /// PriorityQueue class
12 /// This class is not thread safe because we use external lock 12 /// This class is not thread safe because we use external lock
13 /// </summary> 13 /// </summary>
14 public sealed class PriorityQueue : IEnumerable 14 public sealed class PriorityQueue : IEnumerable
15 { 15 {
16 #region Private members 16 #region Private members
17 17
18 /// <summary> 18 /// <summary>
19 /// The number of queues, there is one for each type of priority 19 /// The number of queues, there is one for each type of priority
20 /// </summary> 20 /// </summary>
21 private const int _queuesCount = WorkItemPriority.Highest-WorkItemPriority.Lowest+1; 21 private const int _queuesCount = WorkItemPriority.Highest-WorkItemPriority.Lowest+1;
22 22
23 /// <summary> 23 /// <summary>
24 /// Work items queues. There is one for each type of priority 24 /// Work items queues. There is one for each type of priority
25 /// </summary> 25 /// </summary>
26 private readonly LinkedList<IHasWorkItemPriority>[] _queues = new LinkedList<IHasWorkItemPriority>[_queuesCount]; 26 private readonly LinkedList<IHasWorkItemPriority>[] _queues = new LinkedList<IHasWorkItemPriority>[_queuesCount];
27 27
28 /// <summary> 28 /// <summary>
29 /// The total number of work items within the queues 29 /// The total number of work items within the queues
30 /// </summary> 30 /// </summary>
31 private int _workItemsCount; 31 private int _workItemsCount;
32 32
33 /// <summary> 33 /// <summary>
34 /// Use with IEnumerable interface 34 /// Use with IEnumerable interface
35 /// </summary> 35 /// </summary>
36 private int _version; 36 private int _version;
37 37
38 #endregion 38 #endregion
39 39
40 #region Contructor 40 #region Contructor
41 41
42 public PriorityQueue() 42 public PriorityQueue()
43 { 43 {
44 for(int i = 0; i < _queues.Length; ++i) 44 for(int i = 0; i < _queues.Length; ++i)
45 { 45 {
46 _queues[i] = new LinkedList<IHasWorkItemPriority>(); 46 _queues[i] = new LinkedList<IHasWorkItemPriority>();
47 } 47 }
48 } 48 }
49 49
50 #endregion 50 #endregion
51 51
52 #region Methods 52 #region Methods
53 53
54 /// <summary> 54 /// <summary>
55 /// Enqueue a work item. 55 /// Enqueue a work item.
56 /// </summary> 56 /// </summary>
57 /// <param name="workItem">A work item</param> 57 /// <param name="workItem">A work item</param>
58 public void Enqueue(IHasWorkItemPriority workItem) 58 public void Enqueue(IHasWorkItemPriority workItem)
59 { 59 {
60 Debug.Assert(null != workItem); 60 Debug.Assert(null != workItem);
61 61
62 int queueIndex = _queuesCount-(int)workItem.WorkItemPriority-1; 62 int queueIndex = _queuesCount-(int)workItem.WorkItemPriority-1;
63 Debug.Assert(queueIndex >= 0); 63 Debug.Assert(queueIndex >= 0);
64 Debug.Assert(queueIndex < _queuesCount); 64 Debug.Assert(queueIndex < _queuesCount);
65 65
66 _queues[queueIndex].AddLast(workItem); 66 _queues[queueIndex].AddLast(workItem);
67 ++_workItemsCount; 67 ++_workItemsCount;
68 ++_version; 68 ++_version;
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Dequeque a work item. 72 /// Dequeque a work item.
73 /// </summary> 73 /// </summary>
74 /// <returns>Returns the next work item</returns> 74 /// <returns>Returns the next work item</returns>
75 public IHasWorkItemPriority Dequeue() 75 public IHasWorkItemPriority Dequeue()
76 { 76 {
77 IHasWorkItemPriority workItem = null; 77 IHasWorkItemPriority workItem = null;
78 78
79 if(_workItemsCount > 0) 79 if(_workItemsCount > 0)
80 { 80 {
81 int queueIndex = GetNextNonEmptyQueue(-1); 81 int queueIndex = GetNextNonEmptyQueue(-1);
82 Debug.Assert(queueIndex >= 0); 82 Debug.Assert(queueIndex >= 0);
83 workItem = _queues[queueIndex].First.Value; 83 workItem = _queues[queueIndex].First.Value;
84 _queues[queueIndex].RemoveFirst(); 84 _queues[queueIndex].RemoveFirst();
85 Debug.Assert(null != workItem); 85 Debug.Assert(null != workItem);
86 --_workItemsCount; 86 --_workItemsCount;
87 ++_version; 87 ++_version;
88 } 88 }
89 89
90 return workItem; 90 return workItem;
91 } 91 }
92 92
93 /// <summary> 93 /// <summary>
94 /// Find the next non empty queue starting at queue queueIndex+1 94 /// Find the next non empty queue starting at queue queueIndex+1
95 /// </summary> 95 /// </summary>
96 /// <param name="queueIndex">The index-1 to start from</param> 96 /// <param name="queueIndex">The index-1 to start from</param>
97 /// <returns> 97 /// <returns>
98 /// The index of the next non empty queue or -1 if all the queues are empty 98 /// The index of the next non empty queue or -1 if all the queues are empty
99 /// </returns> 99 /// </returns>
100 private int GetNextNonEmptyQueue(int queueIndex) 100 private int GetNextNonEmptyQueue(int queueIndex)
101 { 101 {
102 for(int i = queueIndex+1; i < _queuesCount; ++i) 102 for(int i = queueIndex+1; i < _queuesCount; ++i)
103 { 103 {
104 if(_queues[i].Count > 0) 104 if(_queues[i].Count > 0)
105 { 105 {
106 return i; 106 return i;
107 } 107 }
108 } 108 }
109 return -1; 109 return -1;
110 } 110 }
111 111
112 /// <summary> 112 /// <summary>
113 /// The number of work items 113 /// The number of work items
114 /// </summary> 114 /// </summary>
115 public int Count 115 public int Count
116 { 116 {
117 get 117 get
118 { 118 {
119 return _workItemsCount; 119 return _workItemsCount;
120 } 120 }
121 } 121 }
122 122
123 /// <summary> 123 /// <summary>
124 /// Clear all the work items 124 /// Clear all the work items
125 /// </summary> 125 /// </summary>
126 public void Clear() 126 public void Clear()
127 { 127 {
128 if (_workItemsCount > 0) 128 if (_workItemsCount > 0)
129 { 129 {
130 foreach(LinkedList<IHasWorkItemPriority> queue in _queues) 130 foreach(LinkedList<IHasWorkItemPriority> queue in _queues)
131 { 131 {
132 queue.Clear(); 132 queue.Clear();
133 } 133 }
134 _workItemsCount = 0; 134 _workItemsCount = 0;
135 ++_version; 135 ++_version;
136 } 136 }
137 } 137 }
138 138
139 #endregion 139 #endregion
140 140
141 #region IEnumerable Members 141 #region IEnumerable Members
142 142
143 /// <summary> 143 /// <summary>
144 /// Returns an enumerator to iterate over the work items 144 /// Returns an enumerator to iterate over the work items
145 /// </summary> 145 /// </summary>
146 /// <returns>Returns an enumerator</returns> 146 /// <returns>Returns an enumerator</returns>
147 public IEnumerator GetEnumerator() 147 public IEnumerator GetEnumerator()
148 { 148 {
149 return new PriorityQueueEnumerator(this); 149 return new PriorityQueueEnumerator(this);
150 } 150 }
151 151
152 #endregion 152 #endregion
153 153
154 #region PriorityQueueEnumerator 154 #region PriorityQueueEnumerator
155 155
156 /// <summary> 156 /// <summary>
157 /// The class the implements the enumerator 157 /// The class the implements the enumerator
158 /// </summary> 158 /// </summary>
159 private class PriorityQueueEnumerator : IEnumerator 159 private class PriorityQueueEnumerator : IEnumerator
160 { 160 {
161 private readonly PriorityQueue _priorityQueue; 161 private readonly PriorityQueue _priorityQueue;
162 private int _version; 162 private int _version;
163 private int _queueIndex; 163 private int _queueIndex;
164 private IEnumerator _enumerator; 164 private IEnumerator _enumerator;
165 165
166 public PriorityQueueEnumerator(PriorityQueue priorityQueue) 166 public PriorityQueueEnumerator(PriorityQueue priorityQueue)
167 { 167 {
168 _priorityQueue = priorityQueue; 168 _priorityQueue = priorityQueue;
169 _version = _priorityQueue._version; 169 _version = _priorityQueue._version;
170 _queueIndex = _priorityQueue.GetNextNonEmptyQueue(-1); 170 _queueIndex = _priorityQueue.GetNextNonEmptyQueue(-1);
171 if (_queueIndex >= 0) 171 if (_queueIndex >= 0)
172 { 172 {
173 _enumerator = _priorityQueue._queues[_queueIndex].GetEnumerator(); 173 _enumerator = _priorityQueue._queues[_queueIndex].GetEnumerator();
174 } 174 }
175 else 175 else
176 { 176 {
177 _enumerator = null; 177 _enumerator = null;
178 } 178 }
179 } 179 }
180 180
181 #region IEnumerator Members 181 #region IEnumerator Members
182 182
183 public void Reset() 183 public void Reset()
184 { 184 {
185 _version = _priorityQueue._version; 185 _version = _priorityQueue._version;
186 _queueIndex = _priorityQueue.GetNextNonEmptyQueue(-1); 186 _queueIndex = _priorityQueue.GetNextNonEmptyQueue(-1);
187 if (_queueIndex >= 0) 187 if (_queueIndex >= 0)
188 { 188 {
189 _enumerator = _priorityQueue._queues[_queueIndex].GetEnumerator(); 189 _enumerator = _priorityQueue._queues[_queueIndex].GetEnumerator();
190 } 190 }
191 else 191 else
192 { 192 {
193 _enumerator = null; 193 _enumerator = null;
194 } 194 }
195 } 195 }
196 196
197 public object Current 197 public object Current
198 { 198 {
199 get 199 get
200 { 200 {
201 Debug.Assert(null != _enumerator); 201 Debug.Assert(null != _enumerator);
202 return _enumerator.Current; 202 return _enumerator.Current;
203 } 203 }
204 } 204 }
205 205
206 public bool MoveNext() 206 public bool MoveNext()
207 { 207 {
208 if (null == _enumerator) 208 if (null == _enumerator)
209 { 209 {
210 return false; 210 return false;
211 } 211 }
212 212
213 if(_version != _priorityQueue._version) 213 if(_version != _priorityQueue._version)
214 { 214 {
215 throw new InvalidOperationException("The collection has been modified"); 215 throw new InvalidOperationException("The collection has been modified");
216 216
217 } 217 }
218 if (!_enumerator.MoveNext()) 218 if (!_enumerator.MoveNext())
219 { 219 {
220 _queueIndex = _priorityQueue.GetNextNonEmptyQueue(_queueIndex); 220 _queueIndex = _priorityQueue.GetNextNonEmptyQueue(_queueIndex);
221 if(-1 == _queueIndex) 221 if(-1 == _queueIndex)
222 { 222 {
223 return false; 223 return false;
224 } 224 }
225 _enumerator = _priorityQueue._queues[_queueIndex].GetEnumerator(); 225 _enumerator = _priorityQueue._queues[_queueIndex].GetEnumerator();
226 _enumerator.MoveNext(); 226 _enumerator.MoveNext();
227 return true; 227 return true;
228 } 228 }
229 return true; 229 return true;
230 } 230 }
231 231
232 #endregion 232 #endregion
233 } 233 }
234 234
235 #endregion 235 #endregion
236 } 236 }
237 237
238 #endregion 238 #endregion
239} 239}
diff --git a/ThirdParty/SmartThreadPool/STPPerformanceCounter.cs b/ThirdParty/SmartThreadPool/STPPerformanceCounter.cs
index 0663d1d..bd68499 100644
--- a/ThirdParty/SmartThreadPool/STPPerformanceCounter.cs
+++ b/ThirdParty/SmartThreadPool/STPPerformanceCounter.cs
@@ -26,188 +26,188 @@ namespace Amib.Threading.Internal
26#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE) 26#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE)
27 27
28 internal enum STPPerformanceCounterType 28 internal enum STPPerformanceCounterType
29 { 29 {
30 // Fields 30 // Fields
31 ActiveThreads = 0, 31 ActiveThreads = 0,
32 InUseThreads = 1, 32 InUseThreads = 1,
33 OverheadThreads = 2, 33 OverheadThreads = 2,
34 OverheadThreadsPercent = 3, 34 OverheadThreadsPercent = 3,
35 OverheadThreadsPercentBase = 4, 35 OverheadThreadsPercentBase = 4,
36 36
37 WorkItems = 5, 37 WorkItems = 5,
38 WorkItemsInQueue = 6, 38 WorkItemsInQueue = 6,
39 WorkItemsProcessed = 7, 39 WorkItemsProcessed = 7,
40 40
41 WorkItemsQueuedPerSecond = 8, 41 WorkItemsQueuedPerSecond = 8,
42 WorkItemsProcessedPerSecond = 9, 42 WorkItemsProcessedPerSecond = 9,
43 43
44 AvgWorkItemWaitTime = 10, 44 AvgWorkItemWaitTime = 10,
45 AvgWorkItemWaitTimeBase = 11, 45 AvgWorkItemWaitTimeBase = 11,
46 46
47 AvgWorkItemProcessTime = 12, 47 AvgWorkItemProcessTime = 12,
48 AvgWorkItemProcessTimeBase = 13, 48 AvgWorkItemProcessTimeBase = 13,
49 49
50 WorkItemsGroups = 14, 50 WorkItemsGroups = 14,
51 51
52 LastCounter = 14, 52 LastCounter = 14,
53 } 53 }
54 54
55 55
56 /// <summary> 56 /// <summary>
57 /// Summary description for STPPerformanceCounter. 57 /// Summary description for STPPerformanceCounter.
58 /// </summary> 58 /// </summary>
59 internal class STPPerformanceCounter 59 internal class STPPerformanceCounter
60 { 60 {
61 // Fields 61 // Fields
62 private readonly PerformanceCounterType _pcType; 62 private readonly PerformanceCounterType _pcType;
63 protected string _counterHelp; 63 protected string _counterHelp;
64 protected string _counterName; 64 protected string _counterName;
65 65
66 // Methods 66 // Methods
67 public STPPerformanceCounter( 67 public STPPerformanceCounter(
68 string counterName, 68 string counterName,
69 string counterHelp, 69 string counterHelp,
70 PerformanceCounterType pcType) 70 PerformanceCounterType pcType)
71 { 71 {
72 _counterName = counterName; 72 _counterName = counterName;
73 _counterHelp = counterHelp; 73 _counterHelp = counterHelp;
74 _pcType = pcType; 74 _pcType = pcType;
75 } 75 }
76 76
77 public void AddCounterToCollection(CounterCreationDataCollection counterData) 77 public void AddCounterToCollection(CounterCreationDataCollection counterData)
78 { 78 {
79 CounterCreationData counterCreationData = new CounterCreationData( 79 CounterCreationData counterCreationData = new CounterCreationData(
80 _counterName, 80 _counterName,
81 _counterHelp, 81 _counterHelp,
82 _pcType); 82 _pcType);
83 83
84 counterData.Add(counterCreationData); 84 counterData.Add(counterCreationData);
85 } 85 }
86 86
87 // Properties 87 // Properties
88 public string Name 88 public string Name
89 { 89 {
90 get 90 get
91 { 91 {
92 return _counterName; 92 return _counterName;
93 } 93 }
94 } 94 }
95 } 95 }
96 96
97 internal class STPPerformanceCounters 97 internal class STPPerformanceCounters
98 { 98 {
99 // Fields 99 // Fields
100 internal STPPerformanceCounter[] _stpPerformanceCounters; 100 internal STPPerformanceCounter[] _stpPerformanceCounters;
101 private static readonly STPPerformanceCounters _instance; 101 private static readonly STPPerformanceCounters _instance;
102 internal const string _stpCategoryHelp = "SmartThreadPool performance counters"; 102 internal const string _stpCategoryHelp = "SmartThreadPool performance counters";
103 internal const string _stpCategoryName = "SmartThreadPool"; 103 internal const string _stpCategoryName = "SmartThreadPool";
104 104
105 // Methods 105 // Methods
106 static STPPerformanceCounters() 106 static STPPerformanceCounters()
107 { 107 {
108 _instance = new STPPerformanceCounters(); 108 _instance = new STPPerformanceCounters();
109 } 109 }
110 110
111 private STPPerformanceCounters() 111 private STPPerformanceCounters()
112 { 112 {
113 STPPerformanceCounter[] stpPerformanceCounters = new STPPerformanceCounter[] 113 STPPerformanceCounter[] stpPerformanceCounters = new STPPerformanceCounter[]
114 { 114 {
115 new STPPerformanceCounter("Active threads", "The current number of available in the thread pool.", PerformanceCounterType.NumberOfItems32), 115 new STPPerformanceCounter("Active threads", "The current number of available in the thread pool.", PerformanceCounterType.NumberOfItems32),
116 new STPPerformanceCounter("In use threads", "The current number of threads that execute a work item.", PerformanceCounterType.NumberOfItems32), 116 new STPPerformanceCounter("In use threads", "The current number of threads that execute a work item.", PerformanceCounterType.NumberOfItems32),
117 new STPPerformanceCounter("Overhead threads", "The current number of threads that are active, but are not in use.", PerformanceCounterType.NumberOfItems32), 117 new STPPerformanceCounter("Overhead threads", "The current number of threads that are active, but are not in use.", PerformanceCounterType.NumberOfItems32),
118 new STPPerformanceCounter("% overhead threads", "The current number of threads that are active, but are not in use in percents.", PerformanceCounterType.RawFraction), 118 new STPPerformanceCounter("% overhead threads", "The current number of threads that are active, but are not in use in percents.", PerformanceCounterType.RawFraction),
119 new STPPerformanceCounter("% overhead threads base", "The current number of threads that are active, but are not in use in percents.", PerformanceCounterType.RawBase), 119 new STPPerformanceCounter("% overhead threads base", "The current number of threads that are active, but are not in use in percents.", PerformanceCounterType.RawBase),
120 120
121 new STPPerformanceCounter("Work Items", "The number of work items in the Smart Thread Pool. Both queued and processed.", PerformanceCounterType.NumberOfItems32), 121 new STPPerformanceCounter("Work Items", "The number of work items in the Smart Thread Pool. Both queued and processed.", PerformanceCounterType.NumberOfItems32),
122 new STPPerformanceCounter("Work Items in queue", "The current number of work items in the queue", PerformanceCounterType.NumberOfItems32), 122 new STPPerformanceCounter("Work Items in queue", "The current number of work items in the queue", PerformanceCounterType.NumberOfItems32),
123 new STPPerformanceCounter("Work Items processed", "The number of work items already processed", PerformanceCounterType.NumberOfItems32), 123 new STPPerformanceCounter("Work Items processed", "The number of work items already processed", PerformanceCounterType.NumberOfItems32),
124 124
125 new STPPerformanceCounter("Work Items queued/sec", "The number of work items queued per second", PerformanceCounterType.RateOfCountsPerSecond32), 125 new STPPerformanceCounter("Work Items queued/sec", "The number of work items queued per second", PerformanceCounterType.RateOfCountsPerSecond32),
126 new STPPerformanceCounter("Work Items processed/sec", "The number of work items processed per second", PerformanceCounterType.RateOfCountsPerSecond32), 126 new STPPerformanceCounter("Work Items processed/sec", "The number of work items processed per second", PerformanceCounterType.RateOfCountsPerSecond32),
127 127
128 new STPPerformanceCounter("Avg. Work Item wait time/sec", "The average time a work item supends in the queue waiting for its turn to execute.", PerformanceCounterType.AverageCount64), 128 new STPPerformanceCounter("Avg. Work Item wait time/sec", "The average time a work item supends in the queue waiting for its turn to execute.", PerformanceCounterType.AverageCount64),
129 new STPPerformanceCounter("Avg. Work Item wait time base", "The average time a work item supends in the queue waiting for its turn to execute.", PerformanceCounterType.AverageBase), 129 new STPPerformanceCounter("Avg. Work Item wait time base", "The average time a work item supends in the queue waiting for its turn to execute.", PerformanceCounterType.AverageBase),
130 130
131 new STPPerformanceCounter("Avg. Work Item process time/sec", "The average time it takes to process a work item.", PerformanceCounterType.AverageCount64), 131 new STPPerformanceCounter("Avg. Work Item process time/sec", "The average time it takes to process a work item.", PerformanceCounterType.AverageCount64),
132 new STPPerformanceCounter("Avg. Work Item process time base", "The average time it takes to process a work item.", PerformanceCounterType.AverageBase), 132 new STPPerformanceCounter("Avg. Work Item process time base", "The average time it takes to process a work item.", PerformanceCounterType.AverageBase),
133 133
134 new STPPerformanceCounter("Work Items Groups", "The current number of work item groups associated with the Smart Thread Pool.", PerformanceCounterType.NumberOfItems32), 134 new STPPerformanceCounter("Work Items Groups", "The current number of work item groups associated with the Smart Thread Pool.", PerformanceCounterType.NumberOfItems32),
135 }; 135 };
136 136
137 _stpPerformanceCounters = stpPerformanceCounters; 137 _stpPerformanceCounters = stpPerformanceCounters;
138 SetupCategory(); 138 SetupCategory();
139 } 139 }
140 140
141 private void SetupCategory() 141 private void SetupCategory()
142 { 142 {
143 if (!PerformanceCounterCategory.Exists(_stpCategoryName)) 143 if (!PerformanceCounterCategory.Exists(_stpCategoryName))
144 { 144 {
145 CounterCreationDataCollection counters = new CounterCreationDataCollection(); 145 CounterCreationDataCollection counters = new CounterCreationDataCollection();
146 146
147 for (int i = 0; i < _stpPerformanceCounters.Length; i++) 147 for (int i = 0; i < _stpPerformanceCounters.Length; i++)
148 { 148 {
149 _stpPerformanceCounters[i].AddCounterToCollection(counters); 149 _stpPerformanceCounters[i].AddCounterToCollection(counters);
150 } 150 }
151 151
152 PerformanceCounterCategory.Create( 152 PerformanceCounterCategory.Create(
153 _stpCategoryName, 153 _stpCategoryName,
154 _stpCategoryHelp, 154 _stpCategoryHelp,
155 PerformanceCounterCategoryType.MultiInstance, 155 PerformanceCounterCategoryType.MultiInstance,
156 counters); 156 counters);
157 157
158 } 158 }
159 } 159 }
160 160
161 // Properties 161 // Properties
162 public static STPPerformanceCounters Instance 162 public static STPPerformanceCounters Instance
163 { 163 {
164 get 164 get
165 { 165 {
166 return _instance; 166 return _instance;
167 } 167 }
168 } 168 }
169 } 169 }
170 170
171 internal class STPInstancePerformanceCounter : IDisposable 171 internal class STPInstancePerformanceCounter : IDisposable
172 { 172 {
173 // Fields 173 // Fields
174 private bool _isDisposed; 174 private bool _isDisposed;
175 private PerformanceCounter _pcs; 175 private PerformanceCounter _pcs;
176 176
177 // Methods 177 // Methods
178 protected STPInstancePerformanceCounter() 178 protected STPInstancePerformanceCounter()
179 { 179 {
180 _isDisposed = false; 180 _isDisposed = false;
181 } 181 }
182 182
183 public STPInstancePerformanceCounter( 183 public STPInstancePerformanceCounter(
184 string instance, 184 string instance,
185 STPPerformanceCounterType spcType) : this() 185 STPPerformanceCounterType spcType) : this()
186 { 186 {
187 STPPerformanceCounters counters = STPPerformanceCounters.Instance; 187 STPPerformanceCounters counters = STPPerformanceCounters.Instance;
188 _pcs = new PerformanceCounter( 188 _pcs = new PerformanceCounter(
189 STPPerformanceCounters._stpCategoryName, 189 STPPerformanceCounters._stpCategoryName,
190 counters._stpPerformanceCounters[(int) spcType].Name, 190 counters._stpPerformanceCounters[(int) spcType].Name,
191 instance, 191 instance,
192 false); 192 false);
193 _pcs.RawValue = _pcs.RawValue; 193 _pcs.RawValue = _pcs.RawValue;
194 } 194 }
195 195
196 196
197 public void Close() 197 public void Close()
198 { 198 {
199 if (_pcs != null) 199 if (_pcs != null)
200 { 200 {
201 _pcs.RemoveInstance(); 201 _pcs.RemoveInstance();
202 _pcs.Close(); 202 _pcs.Close();
203 _pcs = null; 203 _pcs = null;
204 } 204 }
205 } 205 }
206 206
207 public void Dispose() 207 public void Dispose()
208 { 208 {
209 Dispose(true); 209 Dispose(true);
210 } 210 }
211 211
212 public virtual void Dispose(bool disposing) 212 public virtual void Dispose(bool disposing)
213 { 213 {
@@ -220,90 +220,90 @@ namespace Amib.Threading.Internal
220 } 220 }
221 _isDisposed = true; 221 _isDisposed = true;
222 } 222 }
223 223
224 public virtual void Increment() 224 public virtual void Increment()
225 { 225 {
226 _pcs.Increment(); 226 _pcs.Increment();
227 } 227 }
228 228
229 public virtual void IncrementBy(long val) 229 public virtual void IncrementBy(long val)
230 { 230 {
231 _pcs.IncrementBy(val); 231 _pcs.IncrementBy(val);
232 } 232 }
233 233
234 public virtual void Set(long val) 234 public virtual void Set(long val)
235 { 235 {
236 _pcs.RawValue = val; 236 _pcs.RawValue = val;
237 } 237 }
238 } 238 }
239 239
240 internal class STPInstanceNullPerformanceCounter : STPInstancePerformanceCounter 240 internal class STPInstanceNullPerformanceCounter : STPInstancePerformanceCounter
241 { 241 {
242 // Methods 242 // Methods
243 public override void Increment() {} 243 public override void Increment() {}
244 public override void IncrementBy(long value) {} 244 public override void IncrementBy(long value) {}
245 public override void Set(long val) {} 245 public override void Set(long val) {}
246 } 246 }
247 247
248 248
249 249
250 internal class STPInstancePerformanceCounters : ISTPInstancePerformanceCounters 250 internal class STPInstancePerformanceCounters : ISTPInstancePerformanceCounters
251 { 251 {
252 private bool _isDisposed; 252 private bool _isDisposed;
253 // Fields 253 // Fields
254 private STPInstancePerformanceCounter[] _pcs; 254 private STPInstancePerformanceCounter[] _pcs;
255 private static readonly STPInstancePerformanceCounter _stpInstanceNullPerformanceCounter; 255 private static readonly STPInstancePerformanceCounter _stpInstanceNullPerformanceCounter;
256 256
257 // Methods 257 // Methods
258 static STPInstancePerformanceCounters() 258 static STPInstancePerformanceCounters()
259 { 259 {
260 _stpInstanceNullPerformanceCounter = new STPInstanceNullPerformanceCounter(); 260 _stpInstanceNullPerformanceCounter = new STPInstanceNullPerformanceCounter();
261 } 261 }
262 262
263 public STPInstancePerformanceCounters(string instance) 263 public STPInstancePerformanceCounters(string instance)
264 { 264 {
265 _isDisposed = false; 265 _isDisposed = false;
266 _pcs = new STPInstancePerformanceCounter[(int)STPPerformanceCounterType.LastCounter]; 266 _pcs = new STPInstancePerformanceCounter[(int)STPPerformanceCounterType.LastCounter];
267 267
268 // Call the STPPerformanceCounters.Instance so the static constructor will 268 // Call the STPPerformanceCounters.Instance so the static constructor will
269 // intialize the STPPerformanceCounters singleton. 269 // intialize the STPPerformanceCounters singleton.
270 STPPerformanceCounters.Instance.GetHashCode(); 270 STPPerformanceCounters.Instance.GetHashCode();
271 271
272 for (int i = 0; i < _pcs.Length; i++) 272 for (int i = 0; i < _pcs.Length; i++)
273 { 273 {
274 if (instance != null) 274 if (instance != null)
275 { 275 {
276 _pcs[i] = new STPInstancePerformanceCounter( 276 _pcs[i] = new STPInstancePerformanceCounter(
277 instance, 277 instance,
278 (STPPerformanceCounterType) i); 278 (STPPerformanceCounterType) i);
279 } 279 }
280 else 280 else
281 { 281 {
282 _pcs[i] = _stpInstanceNullPerformanceCounter; 282 _pcs[i] = _stpInstanceNullPerformanceCounter;
283 } 283 }
284 } 284 }
285 } 285 }
286 286
287 287
288 public void Close() 288 public void Close()
289 { 289 {
290 if (null != _pcs) 290 if (null != _pcs)
291 { 291 {
292 for (int i = 0; i < _pcs.Length; i++) 292 for (int i = 0; i < _pcs.Length; i++)
293 { 293 {
294 if (null != _pcs[i]) 294 if (null != _pcs[i])
295 { 295 {
296 _pcs[i].Dispose(); 296 _pcs[i].Dispose();
297 } 297 }
298 } 298 }
299 _pcs = null; 299 _pcs = null;
300 } 300 }
301 } 301 }
302 302
303 public void Dispose() 303 public void Dispose()
304 { 304 {
305 Dispose(true); 305 Dispose(true);
306 } 306 }
307 307
308 public virtual void Dispose(bool disposing) 308 public virtual void Dispose(bool disposing)
309 { 309 {
@@ -316,62 +316,62 @@ namespace Amib.Threading.Internal
316 } 316 }
317 _isDisposed = true; 317 _isDisposed = true;
318 } 318 }
319 319
320 private STPInstancePerformanceCounter GetCounter(STPPerformanceCounterType spcType) 320 private STPInstancePerformanceCounter GetCounter(STPPerformanceCounterType spcType)
321 { 321 {
322 return _pcs[(int) spcType]; 322 return _pcs[(int) spcType];
323 } 323 }
324 324
325 public void SampleThreads(long activeThreads, long inUseThreads) 325 public void SampleThreads(long activeThreads, long inUseThreads)
326 { 326 {
327 GetCounter(STPPerformanceCounterType.ActiveThreads).Set(activeThreads); 327 GetCounter(STPPerformanceCounterType.ActiveThreads).Set(activeThreads);
328 GetCounter(STPPerformanceCounterType.InUseThreads).Set(inUseThreads); 328 GetCounter(STPPerformanceCounterType.InUseThreads).Set(inUseThreads);
329 GetCounter(STPPerformanceCounterType.OverheadThreads).Set(activeThreads-inUseThreads); 329 GetCounter(STPPerformanceCounterType.OverheadThreads).Set(activeThreads-inUseThreads);
330 330
331 GetCounter(STPPerformanceCounterType.OverheadThreadsPercentBase).Set(activeThreads-inUseThreads); 331 GetCounter(STPPerformanceCounterType.OverheadThreadsPercentBase).Set(activeThreads-inUseThreads);
332 GetCounter(STPPerformanceCounterType.OverheadThreadsPercent).Set(inUseThreads); 332 GetCounter(STPPerformanceCounterType.OverheadThreadsPercent).Set(inUseThreads);
333 } 333 }
334 334
335 public void SampleWorkItems(long workItemsQueued, long workItemsProcessed) 335 public void SampleWorkItems(long workItemsQueued, long workItemsProcessed)
336 { 336 {
337 GetCounter(STPPerformanceCounterType.WorkItems).Set(workItemsQueued+workItemsProcessed); 337 GetCounter(STPPerformanceCounterType.WorkItems).Set(workItemsQueued+workItemsProcessed);
338 GetCounter(STPPerformanceCounterType.WorkItemsInQueue).Set(workItemsQueued); 338 GetCounter(STPPerformanceCounterType.WorkItemsInQueue).Set(workItemsQueued);
339 GetCounter(STPPerformanceCounterType.WorkItemsProcessed).Set(workItemsProcessed); 339 GetCounter(STPPerformanceCounterType.WorkItemsProcessed).Set(workItemsProcessed);
340 340
341 GetCounter(STPPerformanceCounterType.WorkItemsQueuedPerSecond).Set(workItemsQueued); 341 GetCounter(STPPerformanceCounterType.WorkItemsQueuedPerSecond).Set(workItemsQueued);
342 GetCounter(STPPerformanceCounterType.WorkItemsProcessedPerSecond).Set(workItemsProcessed); 342 GetCounter(STPPerformanceCounterType.WorkItemsProcessedPerSecond).Set(workItemsProcessed);
343 } 343 }
344 344
345 public void SampleWorkItemsWaitTime(TimeSpan workItemWaitTime) 345 public void SampleWorkItemsWaitTime(TimeSpan workItemWaitTime)
346 { 346 {
347 GetCounter(STPPerformanceCounterType.AvgWorkItemWaitTime).IncrementBy((long)workItemWaitTime.TotalMilliseconds); 347 GetCounter(STPPerformanceCounterType.AvgWorkItemWaitTime).IncrementBy((long)workItemWaitTime.TotalMilliseconds);
348 GetCounter(STPPerformanceCounterType.AvgWorkItemWaitTimeBase).Increment(); 348 GetCounter(STPPerformanceCounterType.AvgWorkItemWaitTimeBase).Increment();
349 } 349 }
350 350
351 public void SampleWorkItemsProcessTime(TimeSpan workItemProcessTime) 351 public void SampleWorkItemsProcessTime(TimeSpan workItemProcessTime)
352 { 352 {
353 GetCounter(STPPerformanceCounterType.AvgWorkItemProcessTime).IncrementBy((long)workItemProcessTime.TotalMilliseconds); 353 GetCounter(STPPerformanceCounterType.AvgWorkItemProcessTime).IncrementBy((long)workItemProcessTime.TotalMilliseconds);
354 GetCounter(STPPerformanceCounterType.AvgWorkItemProcessTimeBase).Increment(); 354 GetCounter(STPPerformanceCounterType.AvgWorkItemProcessTimeBase).Increment();
355 } 355 }
356 } 356 }
357#endif 357#endif
358 358
359 internal class NullSTPInstancePerformanceCounters : ISTPInstancePerformanceCounters, ISTPPerformanceCountersReader 359 internal class NullSTPInstancePerformanceCounters : ISTPInstancePerformanceCounters, ISTPPerformanceCountersReader
360 { 360 {
361 private static readonly NullSTPInstancePerformanceCounters _instance = new NullSTPInstancePerformanceCounters(); 361 private static readonly NullSTPInstancePerformanceCounters _instance = new NullSTPInstancePerformanceCounters();
362 362
363 public static NullSTPInstancePerformanceCounters Instance 363 public static NullSTPInstancePerformanceCounters Instance
364 { 364 {
365 get { return _instance; } 365 get { return _instance; }
366 } 366 }
367 367
368 public void Close() {} 368 public void Close() {}
369 public void Dispose() {} 369 public void Dispose() {}
370 370
371 public void SampleThreads(long activeThreads, long inUseThreads) {} 371 public void SampleThreads(long activeThreads, long inUseThreads) {}
372 public void SampleWorkItems(long workItemsQueued, long workItemsProcessed) {} 372 public void SampleWorkItems(long workItemsQueued, long workItemsProcessed) {}
373 public void SampleWorkItemsWaitTime(TimeSpan workItemWaitTime) {} 373 public void SampleWorkItemsWaitTime(TimeSpan workItemWaitTime) {}
374 public void SampleWorkItemsProcessTime(TimeSpan workItemProcessTime) {} 374 public void SampleWorkItemsProcessTime(TimeSpan workItemProcessTime) {}
375 public long InUseThreads 375 public long InUseThreads
376 { 376 {
377 get { return 0; } 377 get { return 0; }
@@ -391,7 +391,7 @@ namespace Amib.Threading.Internal
391 { 391 {
392 get { return 0; } 392 get { return 0; }
393 } 393 }
394 } 394 }
395 395
396 internal class LocalSTPInstancePerformanceCounters : ISTPInstancePerformanceCounters, ISTPPerformanceCountersReader 396 internal class LocalSTPInstancePerformanceCounters : ISTPInstancePerformanceCounters, ISTPPerformanceCountersReader
397 { 397 {
diff --git a/ThirdParty/SmartThreadPool/STPStartInfo.cs b/ThirdParty/SmartThreadPool/STPStartInfo.cs
index 96fa094..8ea547c 100644
--- a/ThirdParty/SmartThreadPool/STPStartInfo.cs
+++ b/ThirdParty/SmartThreadPool/STPStartInfo.cs
@@ -3,9 +3,9 @@ using System.Threading;
3 3
4namespace Amib.Threading 4namespace Amib.Threading
5{ 5{
6 /// <summary> 6 /// <summary>
7 /// Summary description for STPStartInfo. 7 /// Summary description for STPStartInfo.
8 /// </summary> 8 /// </summary>
9 public class STPStartInfo : WIGStartInfo 9 public class STPStartInfo : WIGStartInfo
10 { 10 {
11 private int _idleTimeout = SmartThreadPool.DefaultIdleTimeout; 11 private int _idleTimeout = SmartThreadPool.DefaultIdleTimeout;
@@ -31,7 +31,7 @@ namespace Amib.Threading
31 _minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads; 31 _minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads;
32 } 32 }
33 33
34 public STPStartInfo(STPStartInfo stpStartInfo) 34 public STPStartInfo(STPStartInfo stpStartInfo)
35 : base(stpStartInfo) 35 : base(stpStartInfo)
36 { 36 {
37 _idleTimeout = stpStartInfo.IdleTimeout; 37 _idleTimeout = stpStartInfo.IdleTimeout;
@@ -48,63 +48,63 @@ namespace Amib.Threading
48 _apartmentState = stpStartInfo._apartmentState; 48 _apartmentState = stpStartInfo._apartmentState;
49#endif 49#endif
50 } 50 }
51 51
52 /// <summary> 52 /// <summary>
53 /// Get/Set the idle timeout in milliseconds. 53 /// Get/Set the idle timeout in milliseconds.
54 /// If a thread is idle (starved) longer than IdleTimeout then it may quit. 54 /// If a thread is idle (starved) longer than IdleTimeout then it may quit.
55 /// </summary> 55 /// </summary>
56 public virtual int IdleTimeout 56 public virtual int IdleTimeout
57 { 57 {
58 get { return _idleTimeout; } 58 get { return _idleTimeout; }
59 set 59 set
60 { 60 {
61 ThrowIfReadOnly(); 61 ThrowIfReadOnly();
62 _idleTimeout = value; 62 _idleTimeout = value;
63 } 63 }
64 } 64 }
65 65
66 66
67 /// <summary> 67 /// <summary>
68 /// Get/Set the lower limit of threads in the pool. 68 /// Get/Set the lower limit of threads in the pool.
69 /// </summary> 69 /// </summary>
70 public virtual int MinWorkerThreads 70 public virtual int MinWorkerThreads
71 { 71 {
72 get { return _minWorkerThreads; } 72 get { return _minWorkerThreads; }
73 set 73 set
74 { 74 {
75 ThrowIfReadOnly(); 75 ThrowIfReadOnly();
76 _minWorkerThreads = value; 76 _minWorkerThreads = value;
77 } 77 }
78 } 78 }
79 79
80 80
81 /// <summary> 81 /// <summary>
82 /// Get/Set the upper limit of threads in the pool. 82 /// Get/Set the upper limit of threads in the pool.
83 /// </summary> 83 /// </summary>
84 public virtual int MaxWorkerThreads 84 public virtual int MaxWorkerThreads
85 { 85 {
86 get { return _maxWorkerThreads; } 86 get { return _maxWorkerThreads; }
87 set 87 set
88 { 88 {
89 ThrowIfReadOnly(); 89 ThrowIfReadOnly();
90 _maxWorkerThreads = value; 90 _maxWorkerThreads = value;
91 } 91 }
92 } 92 }
93 93
94#if !(WINDOWS_PHONE) 94#if !(WINDOWS_PHONE)
95 /// <summary> 95 /// <summary>
96 /// Get/Set the scheduling priority of the threads in the pool. 96 /// Get/Set the scheduling priority of the threads in the pool.
97 /// The Os handles the scheduling. 97 /// The Os handles the scheduling.
98 /// </summary> 98 /// </summary>
99 public virtual ThreadPriority ThreadPriority 99 public virtual ThreadPriority ThreadPriority
100 { 100 {
101 get { return _threadPriority; } 101 get { return _threadPriority; }
102 set 102 set
103 { 103 {
104 ThrowIfReadOnly(); 104 ThrowIfReadOnly();
105 _threadPriority = value; 105 _threadPriority = value;
106 } 106 }
107 } 107 }
108#endif 108#endif
109 /// <summary> 109 /// <summary>
110 /// Get/Set the thread pool name. Threads will get names depending on this. 110 /// Get/Set the thread pool name. Threads will get names depending on this.
@@ -118,50 +118,50 @@ namespace Amib.Threading
118 } 118 }
119 } 119 }
120 120
121 /// <summary> 121 /// <summary>
122 /// Get/Set the performance counter instance name of this SmartThreadPool 122 /// Get/Set the performance counter instance name of this SmartThreadPool
123 /// The default is null which indicate not to use performance counters at all. 123 /// The default is null which indicate not to use performance counters at all.
124 /// </summary> 124 /// </summary>
125 public virtual string PerformanceCounterInstanceName 125 public virtual string PerformanceCounterInstanceName
126 { 126 {
127 get { return _performanceCounterInstanceName; } 127 get { return _performanceCounterInstanceName; }
128 set 128 set
129 { 129 {
130 ThrowIfReadOnly(); 130 ThrowIfReadOnly();
131 _performanceCounterInstanceName = value; 131 _performanceCounterInstanceName = value;
132 } 132 }
133 } 133 }
134 134
135 /// <summary> 135 /// <summary>
136 /// Enable/Disable the local performance counter. 136 /// Enable/Disable the local performance counter.
137 /// This enables the user to get some performance information about the SmartThreadPool 137 /// This enables the user to get some performance information about the SmartThreadPool
138 /// without using Windows performance counters. (Useful on WindowsCE, Silverlight, etc.) 138 /// without using Windows performance counters. (Useful on WindowsCE, Silverlight, etc.)
139 /// The default is false. 139 /// The default is false.
140 /// </summary> 140 /// </summary>
141 public virtual bool EnableLocalPerformanceCounters 141 public virtual bool EnableLocalPerformanceCounters
142 { 142 {
143 get { return _enableLocalPerformanceCounters; } 143 get { return _enableLocalPerformanceCounters; }
144 set 144 set
145 { 145 {
146 ThrowIfReadOnly(); 146 ThrowIfReadOnly();
147 _enableLocalPerformanceCounters = value; 147 _enableLocalPerformanceCounters = value;
148 } 148 }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Get/Set backgroundness of thread in thread pool. 152 /// Get/Set backgroundness of thread in thread pool.
153 /// </summary> 153 /// </summary>
154 public virtual bool AreThreadsBackground 154 public virtual bool AreThreadsBackground
155 { 155 {
156 get { return _areThreadsBackground; } 156 get { return _areThreadsBackground; }
157 set 157 set
158 { 158 {
159 ThrowIfReadOnly (); 159 ThrowIfReadOnly ();
160 _areThreadsBackground = value; 160 _areThreadsBackground = value;
161 } 161 }
162 } 162 }
163 163
164 /// <summary> 164 /// <summary>
165 /// Get a readonly version of this STPStartInfo. 165 /// Get a readonly version of this STPStartInfo.
166 /// </summary> 166 /// </summary>
167 /// <returns>Returns a readonly reference to this STPStartInfo</returns> 167 /// <returns>Returns a readonly reference to this STPStartInfo</returns>
@@ -185,10 +185,10 @@ namespace Amib.Threading
185 ThrowIfReadOnly(); 185 ThrowIfReadOnly();
186 _apartmentState = value; 186 _apartmentState = value;
187 } 187 }
188 } 188 }
189 189
190#if !(_SILVERLIGHT) && !(WINDOWS_PHONE) 190#if !(_SILVERLIGHT) && !(WINDOWS_PHONE)
191 191
192 /// <summary> 192 /// <summary>
193 /// Get/Set the max stack size of threads in the thread pool 193 /// Get/Set the max stack size of threads in the thread pool
194 /// </summary> 194 /// </summary>
diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs
index d9502bb..4713332 100644
--- a/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs
+++ b/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs
@@ -26,15 +26,15 @@ namespace Amib.Threading
26 /// <summary> 26 /// <summary>
27 /// A reference from each thread in the thread pool to its SmartThreadPool 27 /// A reference from each thread in the thread pool to its SmartThreadPool
28 /// object container. 28 /// object container.
29 /// With this variable a thread can know whatever it belongs to a 29 /// With this variable a thread can know whatever it belongs to a
30 /// SmartThreadPool. 30 /// SmartThreadPool.
31 /// </summary> 31 /// </summary>
32 private readonly SmartThreadPool _associatedSmartThreadPool; 32 private readonly SmartThreadPool _associatedSmartThreadPool;
33 33
34 /// <summary> 34 /// <summary>
35 /// A reference to the current work item a thread from the thread pool 35 /// A reference to the current work item a thread from the thread pool
36 /// is executing. 36 /// is executing.
37 /// </summary> 37 /// </summary>
38 public WorkItem CurrentWorkItem { get; set; } 38 public WorkItem CurrentWorkItem { get; set; }
39 39
40 public ThreadEntry(SmartThreadPool stp) 40 public ThreadEntry(SmartThreadPool stp)
diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.cs
index 297e20e..7cc7fbf 100644
--- a/ThirdParty/SmartThreadPool/SmartThreadPool.cs
+++ b/ThirdParty/SmartThreadPool/SmartThreadPool.cs
@@ -3,7 +3,7 @@
3// Smart Thread Pool 3// Smart Thread Pool
4// 7 Aug 2004 - Initial release 4// 7 Aug 2004 - Initial release
5// 5//
6// 14 Sep 2004 - Bug fixes 6// 14 Sep 2004 - Bug fixes
7// 7//
8// 15 Oct 2004 - Added new features 8// 15 Oct 2004 - Added new features
9// - Work items return result. 9// - Work items return result.
@@ -18,13 +18,13 @@
18// - Added finalizers. 18// - Added finalizers.
19// - Changed Exceptions so they are serializable. 19// - Changed Exceptions so they are serializable.
20// - Fixed the bug in one of the SmartThreadPool constructors. 20// - Fixed the bug in one of the SmartThreadPool constructors.
21// - Changed the SmartThreadPool.WaitAll() so it will support any number of waiters. 21// - Changed the SmartThreadPool.WaitAll() so it will support any number of waiters.
22// The SmartThreadPool.WaitAny() is still limited by the .NET Framework. 22// The SmartThreadPool.WaitAny() is still limited by the .NET Framework.
23// - Added PostExecute with options on which cases to call it. 23// - Added PostExecute with options on which cases to call it.
24// - Added option to dispose of the state objects. 24// - Added option to dispose of the state objects.
25// - Added a WaitForIdle() method that waits until the work items queue is empty. 25// - Added a WaitForIdle() method that waits until the work items queue is empty.
26// - Added an STPStartInfo class for the initialization of the thread pool. 26// - Added an STPStartInfo class for the initialization of the thread pool.
27// - Changed exception handling so if a work item throws an exception it 27// - Changed exception handling so if a work item throws an exception it
28// is rethrown at GetResult(), rather then firing an UnhandledException event. 28// is rethrown at GetResult(), rather then firing an UnhandledException event.
29// Note that PostExecute exception are always ignored. 29// Note that PostExecute exception are always ignored.
30// 30//
@@ -32,10 +32,10 @@
32// - Fixed lost of work items bug 32// - Fixed lost of work items bug
33// 33//
34// 3 Jul 2005: Changes. 34// 3 Jul 2005: Changes.
35// - Fixed bug where Enqueue() throws an exception because PopWaiter() returned null, hardly reconstructed. 35// - Fixed bug where Enqueue() throws an exception because PopWaiter() returned null, hardly reconstructed.
36// 36//
37// 16 Aug 2005: Changes. 37// 16 Aug 2005: Changes.
38// - Fixed bug where the InUseThreads becomes negative when canceling work items. 38// - Fixed bug where the InUseThreads becomes negative when canceling work items.
39// 39//
40// 31 Jan 2006 - Changes: 40// 31 Jan 2006 - Changes:
41// - Added work items priority 41// - Added work items priority
@@ -45,7 +45,7 @@
45// - Changed SmartThreadPool.WaitAll() behavior so when it gets empty array 45// - Changed SmartThreadPool.WaitAll() behavior so when it gets empty array
46// it returns true rather then throwing an exception. 46// it returns true rather then throwing an exception.
47// - Added option to start the STP and the WIG as suspended 47// - Added option to start the STP and the WIG as suspended
48// - Exception behavior changed, the real exception is returned by an 48// - Exception behavior changed, the real exception is returned by an
49// inner exception 49// inner exception
50// - Added option to keep the Http context of the caller thread. (Thanks to Steven T.) 50// - Added option to keep the Http context of the caller thread. (Thanks to Steven T.)
51// - Added performance counters 51// - Added performance counters
@@ -54,17 +54,17 @@
54// 13 Feb 2006 - Changes: 54// 13 Feb 2006 - Changes:
55// - Added a call to the dispose of the Performance Counter so 55// - Added a call to the dispose of the Performance Counter so
56// their won't be a Performance Counter leak. 56// their won't be a Performance Counter leak.
57// - Added exception catch in case the Performance Counters cannot 57// - Added exception catch in case the Performance Counters cannot
58// be created. 58// be created.
59// 59//
60// 17 May 2008 - Changes: 60// 17 May 2008 - Changes:
61// - Changed the dispose behavior and removed the Finalizers. 61// - Changed the dispose behavior and removed the Finalizers.
62// - Enabled the change of the MaxThreads and MinThreads at run time. 62// - Enabled the change of the MaxThreads and MinThreads at run time.
63// - Enabled the change of the Concurrency of a IWorkItemsGroup at run 63// - Enabled the change of the Concurrency of a IWorkItemsGroup at run
64// time If the IWorkItemsGroup is a SmartThreadPool then the Concurrency 64// time If the IWorkItemsGroup is a SmartThreadPool then the Concurrency
65// refers to the MaxThreads. 65// refers to the MaxThreads.
66// - Improved the cancel behavior. 66// - Improved the cancel behavior.
67// - Added events for thread creation and termination. 67// - Added events for thread creation and termination.
68// - Fixed the HttpContext context capture. 68// - Fixed the HttpContext context capture.
69// - Changed internal collections so they use generic collections 69// - Changed internal collections so they use generic collections
70// - Added IsIdle flag to the SmartThreadPool and IWorkItemsGroup 70// - Added IsIdle flag to the SmartThreadPool and IWorkItemsGroup
@@ -83,7 +83,7 @@
83// 83//
84// 20 August 2012 - Changes: 84// 20 August 2012 - Changes:
85// - Added set name to threads 85// - Added set name to threads
86// - Fixed the WorkItemsQueue.Dequeue. 86// - Fixed the WorkItemsQueue.Dequeue.
87// Replaced while (!Monitor.TryEnter(this)); with lock(this) { ... } 87// Replaced while (!Monitor.TryEnter(this)); with lock(this) { ... }
88// - Fixed SmartThreadPool.Pipe 88// - Fixed SmartThreadPool.Pipe
89// - Added IsBackground option to threads 89// - Added IsBackground option to threads
@@ -92,7 +92,7 @@
92// 92//
93// 24 August 2012 - Changes: 93// 24 August 2012 - Changes:
94// - Enabled cancel abort after cancel. See: http://smartthreadpool.codeplex.com/discussions/345937 by alecswan 94// - Enabled cancel abort after cancel. See: http://smartthreadpool.codeplex.com/discussions/345937 by alecswan
95// - Added option to set MaxStackSize of threads 95// - Added option to set MaxStackSize of threads
96 96
97#endregion 97#endregion
98 98
@@ -108,77 +108,77 @@ using Amib.Threading.Internal;
108 108
109namespace Amib.Threading 109namespace Amib.Threading
110{ 110{
111 #region SmartThreadPool class 111 #region SmartThreadPool class
112 /// <summary> 112 /// <summary>
113 /// Smart thread pool class. 113 /// Smart thread pool class.
114 /// </summary> 114 /// </summary>
115 public partial class SmartThreadPool : WorkItemsGroupBase, IDisposable 115 public partial class SmartThreadPool : WorkItemsGroupBase, IDisposable
116 { 116 {
117 #region Public Default Constants 117 #region Public Default Constants
118 118
119 /// <summary> 119 /// <summary>
120 /// Default minimum number of threads the thread pool contains. (0) 120 /// Default minimum number of threads the thread pool contains. (0)
121 /// </summary> 121 /// </summary>
122 public const int DefaultMinWorkerThreads = 0; 122 public const int DefaultMinWorkerThreads = 0;
123 123
124 /// <summary> 124 /// <summary>
125 /// Default maximum number of threads the thread pool contains. (25) 125 /// Default maximum number of threads the thread pool contains. (25)
126 /// </summary> 126 /// </summary>
127 public const int DefaultMaxWorkerThreads = 25; 127 public const int DefaultMaxWorkerThreads = 25;
128 128
129 /// <summary> 129 /// <summary>
130 /// Default idle timeout in milliseconds. (One minute) 130 /// Default idle timeout in milliseconds. (One minute)
131 /// </summary> 131 /// </summary>
132 public const int DefaultIdleTimeout = 60*1000; // One minute 132 public const int DefaultIdleTimeout = 60*1000; // One minute
133 133
134 /// <summary> 134 /// <summary>
135 /// Indicate to copy the security context of the caller and then use it in the call. (false) 135 /// Indicate to copy the security context of the caller and then use it in the call. (false)
136 /// </summary> 136 /// </summary>
137 public const bool DefaultUseCallerCallContext = false; 137 public const bool DefaultUseCallerCallContext = false;
138 138
139 /// <summary> 139 /// <summary>
140 /// Indicate to copy the HTTP context of the caller and then use it in the call. (false) 140 /// Indicate to copy the HTTP context of the caller and then use it in the call. (false)
141 /// </summary> 141 /// </summary>
142 public const bool DefaultUseCallerHttpContext = false; 142 public const bool DefaultUseCallerHttpContext = false;
143 143
144 /// <summary> 144 /// <summary>
145 /// Indicate to dispose of the state objects if they support the IDispose interface. (false) 145 /// Indicate to dispose of the state objects if they support the IDispose interface. (false)
146 /// </summary> 146 /// </summary>
147 public const bool DefaultDisposeOfStateObjects = false; 147 public const bool DefaultDisposeOfStateObjects = false;
148 148
149 /// <summary> 149 /// <summary>
150 /// The default option to run the post execute (CallToPostExecute.Always) 150 /// The default option to run the post execute (CallToPostExecute.Always)
151 /// </summary> 151 /// </summary>
152 public const CallToPostExecute DefaultCallToPostExecute = CallToPostExecute.Always; 152 public const CallToPostExecute DefaultCallToPostExecute = CallToPostExecute.Always;
153 153
154 /// <summary> 154 /// <summary>
155 /// The default post execute method to run. (None) 155 /// The default post execute method to run. (None)
156 /// When null it means not to call it. 156 /// When null it means not to call it.
157 /// </summary> 157 /// </summary>
158 public static readonly PostExecuteWorkItemCallback DefaultPostExecuteWorkItemCallback; 158 public static readonly PostExecuteWorkItemCallback DefaultPostExecuteWorkItemCallback;
159 159
160 /// <summary> 160 /// <summary>
161 /// The default work item priority (WorkItemPriority.Normal) 161 /// The default work item priority (WorkItemPriority.Normal)
162 /// </summary> 162 /// </summary>
163 public const WorkItemPriority DefaultWorkItemPriority = WorkItemPriority.Normal; 163 public const WorkItemPriority DefaultWorkItemPriority = WorkItemPriority.Normal;
164 164
165 /// <summary> 165 /// <summary>
166 /// The default is to work on work items as soon as they arrive 166 /// The default is to work on work items as soon as they arrive
167 /// and not to wait for the start. (false) 167 /// and not to wait for the start. (false)
168 /// </summary> 168 /// </summary>
169 public const bool DefaultStartSuspended = false; 169 public const bool DefaultStartSuspended = false;
170 170
171 /// <summary> 171 /// <summary>
172 /// The default name to use for the performance counters instance. (null) 172 /// The default name to use for the performance counters instance. (null)
173 /// </summary> 173 /// </summary>
174 public static readonly string DefaultPerformanceCounterInstanceName; 174 public static readonly string DefaultPerformanceCounterInstanceName;
175 175
176#if !(WINDOWS_PHONE) 176#if !(WINDOWS_PHONE)
177 177
178 /// <summary> 178 /// <summary>
179 /// The default thread priority (ThreadPriority.Normal) 179 /// The default thread priority (ThreadPriority.Normal)
180 /// </summary> 180 /// </summary>
181 public const ThreadPriority DefaultThreadPriority = ThreadPriority.Normal; 181 public const ThreadPriority DefaultThreadPriority = ThreadPriority.Normal;
182#endif 182#endif
183 /// <summary> 183 /// <summary>
184 /// The default thread pool name. (SmartThreadPool) 184 /// The default thread pool name. (SmartThreadPool)
@@ -203,37 +203,37 @@ namespace Amib.Threading
203 203
204#if !(_SILVERLIGHT) && !(WINDOWS_PHONE) 204#if !(_SILVERLIGHT) && !(WINDOWS_PHONE)
205 /// <summary> 205 /// <summary>
206 /// The default apartment state of a thread in the thread pool. 206 /// The default apartment state of a thread in the thread pool.
207 /// The default is ApartmentState.Unknown which means the STP will not 207 /// The default is ApartmentState.Unknown which means the STP will not
208 /// set the apartment of the thread. It will use the .NET default. 208 /// set the apartment of the thread. It will use the .NET default.
209 /// </summary> 209 /// </summary>
210 public const ApartmentState DefaultApartmentState = ApartmentState.Unknown; 210 public const ApartmentState DefaultApartmentState = ApartmentState.Unknown;
211#endif 211#endif
212 212
213 #endregion 213 #endregion
214 214
215 #region Member Variables 215 #region Member Variables
216 216
217 /// <summary> 217 /// <summary>
218 /// Dictionary of all the threads in the thread pool. 218 /// Dictionary of all the threads in the thread pool.
219 /// </summary> 219 /// </summary>
220 private readonly SynchronizedDictionary<Thread, ThreadEntry> _workerThreads = new SynchronizedDictionary<Thread, ThreadEntry>(); 220 private readonly SynchronizedDictionary<Thread, ThreadEntry> _workerThreads = new SynchronizedDictionary<Thread, ThreadEntry>();
221 221
222 /// <summary> 222 /// <summary>
223 /// Queue of work items. 223 /// Queue of work items.
224 /// </summary> 224 /// </summary>
225 private readonly WorkItemsQueue _workItemsQueue = new WorkItemsQueue(); 225 private readonly WorkItemsQueue _workItemsQueue = new WorkItemsQueue();
226 226
227 /// <summary> 227 /// <summary>
228 /// Count the work items handled. 228 /// Count the work items handled.
229 /// Used by the performance counter. 229 /// Used by the performance counter.
230 /// </summary> 230 /// </summary>
231 private int _workItemsProcessed; 231 private int _workItemsProcessed;
232 232
233 /// <summary> 233 /// <summary>
234 /// Number of threads that currently work (not idle). 234 /// Number of threads that currently work (not idle).
235 /// </summary> 235 /// </summary>
236 private int _inUseWorkerThreads; 236 private int _inUseWorkerThreads;
237 237
238 /// <summary> 238 /// <summary>
239 /// Stores a copy of the original STPStartInfo. 239 /// Stores a copy of the original STPStartInfo.
@@ -241,51 +241,51 @@ namespace Amib.Threading
241 /// </summary> 241 /// </summary>
242 private STPStartInfo _stpStartInfo; 242 private STPStartInfo _stpStartInfo;
243 243
244 /// <summary> 244 /// <summary>
245 /// Total number of work items that are stored in the work items queue 245 /// Total number of work items that are stored in the work items queue
246 /// plus the work items that the threads in the pool are working on. 246 /// plus the work items that the threads in the pool are working on.
247 /// </summary> 247 /// </summary>
248 private int _currentWorkItemsCount; 248 private int _currentWorkItemsCount;
249 249
250 /// <summary> 250 /// <summary>
251 /// Signaled when the thread pool is idle, i.e. no thread is busy 251 /// Signaled when the thread pool is idle, i.e. no thread is busy
252 /// and the work items queue is empty 252 /// and the work items queue is empty
253 /// </summary> 253 /// </summary>
254 //private ManualResetEvent _isIdleWaitHandle = new ManualResetEvent(true); 254 //private ManualResetEvent _isIdleWaitHandle = new ManualResetEvent(true);
255 private ManualResetEvent _isIdleWaitHandle = EventWaitHandleFactory.CreateManualResetEvent(true); 255 private ManualResetEvent _isIdleWaitHandle = EventWaitHandleFactory.CreateManualResetEvent(true);
256 256
257 /// <summary> 257 /// <summary>
258 /// An event to signal all the threads to quit immediately. 258 /// An event to signal all the threads to quit immediately.
259 /// </summary> 259 /// </summary>
260 //private ManualResetEvent _shuttingDownEvent = new ManualResetEvent(false); 260 //private ManualResetEvent _shuttingDownEvent = new ManualResetEvent(false);
261 private ManualResetEvent _shuttingDownEvent = EventWaitHandleFactory.CreateManualResetEvent(false); 261 private ManualResetEvent _shuttingDownEvent = EventWaitHandleFactory.CreateManualResetEvent(false);
262 262
263 /// <summary> 263 /// <summary>
264 /// A flag to indicate if the Smart Thread Pool is now suspended. 264 /// A flag to indicate if the Smart Thread Pool is now suspended.
265 /// </summary> 265 /// </summary>
266 private bool _isSuspended; 266 private bool _isSuspended;
267 267
268 /// <summary> 268 /// <summary>
269 /// A flag to indicate the threads to quit. 269 /// A flag to indicate the threads to quit.
270 /// </summary> 270 /// </summary>
271 private bool _shutdown; 271 private bool _shutdown;
272 272
273 /// <summary> 273 /// <summary>
274 /// Counts the threads created in the pool. 274 /// Counts the threads created in the pool.
275 /// It is used to name the threads. 275 /// It is used to name the threads.
276 /// </summary> 276 /// </summary>
277 private int _threadCounter; 277 private int _threadCounter;
278 278
279 /// <summary> 279 /// <summary>
280 /// Indicate that the SmartThreadPool has been disposed 280 /// Indicate that the SmartThreadPool has been disposed
281 /// </summary> 281 /// </summary>
282 private bool _isDisposed; 282 private bool _isDisposed;
283 283
284 /// <summary> 284 /// <summary>
285 /// Holds all the WorkItemsGroup instaces that have at least one 285 /// Holds all the WorkItemsGroup instaces that have at least one
286 /// work item int the SmartThreadPool 286 /// work item int the SmartThreadPool
287 /// This variable is used in case of Shutdown 287 /// This variable is used in case of Shutdown
288 /// </summary> 288 /// </summary>
289 private readonly SynchronizedDictionary<IWorkItemsGroup, IWorkItemsGroup> _workItemsGroups = new SynchronizedDictionary<IWorkItemsGroup, IWorkItemsGroup>(); 289 private readonly SynchronizedDictionary<IWorkItemsGroup, IWorkItemsGroup> _workItemsGroups = new SynchronizedDictionary<IWorkItemsGroup, IWorkItemsGroup>();
290 290
291 /// <summary> 291 /// <summary>
@@ -305,7 +305,7 @@ namespace Amib.Threading
305 private ISTPInstancePerformanceCounters _localPCs = NullSTPInstancePerformanceCounters.Instance; 305 private ISTPInstancePerformanceCounters _localPCs = NullSTPInstancePerformanceCounters.Instance;
306 306
307 307
308#if (WINDOWS_PHONE) 308#if (WINDOWS_PHONE)
309 private static readonly Dictionary<int, ThreadEntry> _threadEntries = new Dictionary<int, ThreadEntry>(); 309 private static readonly Dictionary<int, ThreadEntry> _threadEntries = new Dictionary<int, ThreadEntry>();
310#elif (_WINDOWS_CE) 310#elif (_WINDOWS_CE)
311 private static LocalDataStoreSlot _threadEntrySlot = Thread.AllocateDataSlot(); 311 private static LocalDataStoreSlot _threadEntrySlot = Thread.AllocateDataSlot();
@@ -316,13 +316,13 @@ namespace Amib.Threading
316#endif 316#endif
317 317
318 /// <summary> 318 /// <summary>
319 /// An event to call after a thread is created, but before 319 /// An event to call after a thread is created, but before
320 /// it's first use. 320 /// it's first use.
321 /// </summary> 321 /// </summary>
322 private event ThreadInitializationHandler _onThreadInitialization; 322 private event ThreadInitializationHandler _onThreadInitialization;
323 323
324 /// <summary> 324 /// <summary>
325 /// An event to call when a thread is about to exit, after 325 /// An event to call when a thread is about to exit, after
326 /// it is no longer belong to the pool. 326 /// it is no longer belong to the pool.
327 /// </summary> 327 /// </summary>
328 private event ThreadTerminationHandler _onThreadTermination; 328 private event ThreadTerminationHandler _onThreadTermination;
@@ -332,7 +332,7 @@ namespace Amib.Threading
332 #region Per thread properties 332 #region Per thread properties
333 333
334 /// <summary> 334 /// <summary>
335 /// A reference to the current work item a thread from the thread pool 335 /// A reference to the current work item a thread from the thread pool
336 /// is executing. 336 /// is executing.
337 /// </summary> 337 /// </summary>
338 internal static ThreadEntry CurrentThreadEntry 338 internal static ThreadEntry CurrentThreadEntry
@@ -383,78 +383,78 @@ namespace Amib.Threading
383 #region Construction and Finalization 383 #region Construction and Finalization
384 384
385 /// <summary> 385 /// <summary>
386 /// Constructor 386 /// Constructor
387 /// </summary> 387 /// </summary>
388 public SmartThreadPool() 388 public SmartThreadPool()
389 { 389 {
390 _stpStartInfo = new STPStartInfo(); 390 _stpStartInfo = new STPStartInfo();
391 Initialize(); 391 Initialize();
392 } 392 }
393 393
394 /// <summary> 394 /// <summary>
395 /// Constructor 395 /// Constructor
396 /// </summary> 396 /// </summary>
397 /// <param name="idleTimeout">Idle timeout in milliseconds</param> 397 /// <param name="idleTimeout">Idle timeout in milliseconds</param>
398 public SmartThreadPool(int idleTimeout) 398 public SmartThreadPool(int idleTimeout)
399 { 399 {
400 _stpStartInfo = new STPStartInfo 400 _stpStartInfo = new STPStartInfo
401 { 401 {
402 IdleTimeout = idleTimeout, 402 IdleTimeout = idleTimeout,
403 }; 403 };
404 Initialize(); 404 Initialize();
405 } 405 }
406 406
407 /// <summary> 407 /// <summary>
408 /// Constructor 408 /// Constructor
409 /// </summary> 409 /// </summary>
410 /// <param name="idleTimeout">Idle timeout in milliseconds</param> 410 /// <param name="idleTimeout">Idle timeout in milliseconds</param>
411 /// <param name="maxWorkerThreads">Upper limit of threads in the pool</param> 411 /// <param name="maxWorkerThreads">Upper limit of threads in the pool</param>
412 public SmartThreadPool( 412 public SmartThreadPool(
413 int idleTimeout, 413 int idleTimeout,
414 int maxWorkerThreads) 414 int maxWorkerThreads)
415 { 415 {
416 _stpStartInfo = new STPStartInfo 416 _stpStartInfo = new STPStartInfo
417 { 417 {
418 IdleTimeout = idleTimeout, 418 IdleTimeout = idleTimeout,
419 MaxWorkerThreads = maxWorkerThreads, 419 MaxWorkerThreads = maxWorkerThreads,
420 }; 420 };
421 Initialize(); 421 Initialize();
422 } 422 }
423 423
424 /// <summary> 424 /// <summary>
425 /// Constructor 425 /// Constructor
426 /// </summary> 426 /// </summary>
427 /// <param name="idleTimeout">Idle timeout in milliseconds</param> 427 /// <param name="idleTimeout">Idle timeout in milliseconds</param>
428 /// <param name="maxWorkerThreads">Upper limit of threads in the pool</param> 428 /// <param name="maxWorkerThreads">Upper limit of threads in the pool</param>
429 /// <param name="minWorkerThreads">Lower limit of threads in the pool</param> 429 /// <param name="minWorkerThreads">Lower limit of threads in the pool</param>
430 public SmartThreadPool( 430 public SmartThreadPool(
431 int idleTimeout, 431 int idleTimeout,
432 int maxWorkerThreads, 432 int maxWorkerThreads,
433 int minWorkerThreads) 433 int minWorkerThreads)
434 { 434 {
435 _stpStartInfo = new STPStartInfo 435 _stpStartInfo = new STPStartInfo
436 { 436 {
437 IdleTimeout = idleTimeout, 437 IdleTimeout = idleTimeout,
438 MaxWorkerThreads = maxWorkerThreads, 438 MaxWorkerThreads = maxWorkerThreads,
439 MinWorkerThreads = minWorkerThreads, 439 MinWorkerThreads = minWorkerThreads,
440 }; 440 };
441 Initialize(); 441 Initialize();
442 } 442 }
443 443
444 /// <summary> 444 /// <summary>
445 /// Constructor 445 /// Constructor
446 /// </summary> 446 /// </summary>
447 /// <param name="stpStartInfo">A SmartThreadPool configuration that overrides the default behavior</param> 447 /// <param name="stpStartInfo">A SmartThreadPool configuration that overrides the default behavior</param>
448 public SmartThreadPool(STPStartInfo stpStartInfo) 448 public SmartThreadPool(STPStartInfo stpStartInfo)
449 { 449 {
450 _stpStartInfo = new STPStartInfo(stpStartInfo); 450 _stpStartInfo = new STPStartInfo(stpStartInfo);
451 Initialize(); 451 Initialize();
452 } 452 }
453 453
454 private void Initialize() 454 private void Initialize()
455 { 455 {
456 Name = _stpStartInfo.ThreadPoolName; 456 Name = _stpStartInfo.ThreadPoolName;
457 ValidateSTPStartInfo(); 457 ValidateSTPStartInfo();
458 458
459 // _stpStartInfoRW stores a read/write copy of the STPStartInfo. 459 // _stpStartInfoRW stores a read/write copy of the STPStartInfo.
460 // Actually only MaxWorkerThreads and MinWorkerThreads are overwritten 460 // Actually only MaxWorkerThreads and MinWorkerThreads are overwritten
@@ -462,8 +462,8 @@ namespace Amib.Threading
462 _isSuspended = _stpStartInfo.StartSuspended; 462 _isSuspended = _stpStartInfo.StartSuspended;
463 463
464#if (_WINDOWS_CE) || (_SILVERLIGHT) || (_MONO) || (WINDOWS_PHONE) 464#if (_WINDOWS_CE) || (_SILVERLIGHT) || (_MONO) || (WINDOWS_PHONE)
465 if (null != _stpStartInfo.PerformanceCounterInstanceName) 465 if (null != _stpStartInfo.PerformanceCounterInstanceName)
466 { 466 {
467 throw new NotSupportedException("Performance counters are not implemented for Compact Framework/Silverlight/Mono, instead use StpStartInfo.EnableLocalPerformanceCounters"); 467 throw new NotSupportedException("Performance counters are not implemented for Compact Framework/Silverlight/Mono, instead use StpStartInfo.EnableLocalPerformanceCounters");
468 } 468 }
469#else 469#else
@@ -486,110 +486,110 @@ namespace Amib.Threading
486 _localPCs = new LocalSTPInstancePerformanceCounters(); 486 _localPCs = new LocalSTPInstancePerformanceCounters();
487 } 487 }
488 488
489 // If the STP is not started suspended then start the threads. 489 // If the STP is not started suspended then start the threads.
490 if (!_isSuspended) 490 if (!_isSuspended)
491 { 491 {
492 StartOptimalNumberOfThreads(); 492 StartOptimalNumberOfThreads();
493 } 493 }
494 } 494 }
495 495
496 private void StartOptimalNumberOfThreads() 496 private void StartOptimalNumberOfThreads()
497 { 497 {
498 int threadsCount = Math.Max(_workItemsQueue.Count, _stpStartInfo.MinWorkerThreads); 498 int threadsCount = Math.Max(_workItemsQueue.Count, _stpStartInfo.MinWorkerThreads);
499 threadsCount = Math.Min(threadsCount, _stpStartInfo.MaxWorkerThreads); 499 threadsCount = Math.Min(threadsCount, _stpStartInfo.MaxWorkerThreads);
500 threadsCount -= _workerThreads.Count; 500 threadsCount -= _workerThreads.Count;
501 if (threadsCount > 0) 501 if (threadsCount > 0)
502 { 502 {
503 StartThreads(threadsCount); 503 StartThreads(threadsCount);
504 } 504 }
505 } 505 }
506 506
507 private void ValidateSTPStartInfo() 507 private void ValidateSTPStartInfo()
508 { 508 {
509 if (_stpStartInfo.MinWorkerThreads < 0) 509 if (_stpStartInfo.MinWorkerThreads < 0)
510 { 510 {
511 throw new ArgumentOutOfRangeException( 511 throw new ArgumentOutOfRangeException(
512 "MinWorkerThreads", "MinWorkerThreads cannot be negative"); 512 "MinWorkerThreads", "MinWorkerThreads cannot be negative");
513 } 513 }
514 514
515 if (_stpStartInfo.MaxWorkerThreads <= 0) 515 if (_stpStartInfo.MaxWorkerThreads <= 0)
516 { 516 {
517 throw new ArgumentOutOfRangeException( 517 throw new ArgumentOutOfRangeException(
518 "MaxWorkerThreads", "MaxWorkerThreads must be greater than zero"); 518 "MaxWorkerThreads", "MaxWorkerThreads must be greater than zero");
519 } 519 }
520 520
521 if (_stpStartInfo.MinWorkerThreads > _stpStartInfo.MaxWorkerThreads) 521 if (_stpStartInfo.MinWorkerThreads > _stpStartInfo.MaxWorkerThreads)
522 { 522 {
523 throw new ArgumentOutOfRangeException( 523 throw new ArgumentOutOfRangeException(
524 "MinWorkerThreads, maxWorkerThreads", 524 "MinWorkerThreads, maxWorkerThreads",
525 "MaxWorkerThreads must be greater or equal to MinWorkerThreads"); 525 "MaxWorkerThreads must be greater or equal to MinWorkerThreads");
526 } 526 }
527 } 527 }
528 528
529 private static void ValidateCallback(Delegate callback) 529 private static void ValidateCallback(Delegate callback)
530 { 530 {
531 if(callback.GetInvocationList().Length > 1) 531 if(callback.GetInvocationList().Length > 1)
532 { 532 {
533 throw new NotSupportedException("SmartThreadPool doesn't support delegates chains"); 533 throw new NotSupportedException("SmartThreadPool doesn't support delegates chains");
534 } 534 }
535 } 535 }
536 536
537 #endregion 537 #endregion
538 538
539 #region Thread Processing 539 #region Thread Processing
540 540
541 /// <summary> 541 /// <summary>
542 /// Waits on the queue for a work item, shutdown, or timeout. 542 /// Waits on the queue for a work item, shutdown, or timeout.
543 /// </summary> 543 /// </summary>
544 /// <returns> 544 /// <returns>
545 /// Returns the WaitingCallback or null in case of timeout or shutdown. 545 /// Returns the WaitingCallback or null in case of timeout or shutdown.
546 /// </returns> 546 /// </returns>
547 private WorkItem Dequeue() 547 private WorkItem Dequeue()
548 { 548 {
549 WorkItem workItem = 549 WorkItem workItem =
550 _workItemsQueue.DequeueWorkItem(_stpStartInfo.IdleTimeout, _shuttingDownEvent); 550 _workItemsQueue.DequeueWorkItem(_stpStartInfo.IdleTimeout, _shuttingDownEvent);
551 551
552 return workItem; 552 return workItem;
553 } 553 }
554 554
555 /// <summary> 555 /// <summary>
556 /// Put a new work item in the queue 556 /// Put a new work item in the queue
557 /// </summary> 557 /// </summary>
558 /// <param name="workItem">A work item to queue</param> 558 /// <param name="workItem">A work item to queue</param>
559 internal override void Enqueue(WorkItem workItem) 559 internal override void Enqueue(WorkItem workItem)
560 { 560 {
561 // Make sure the workItem is not null 561 // Make sure the workItem is not null
562 Debug.Assert(null != workItem); 562 Debug.Assert(null != workItem);
563 563
564 IncrementWorkItemsCount(); 564 IncrementWorkItemsCount();
565 565
566 workItem.CanceledSmartThreadPool = _canceledSmartThreadPool; 566 workItem.CanceledSmartThreadPool = _canceledSmartThreadPool;
567 _workItemsQueue.EnqueueWorkItem(workItem); 567 _workItemsQueue.EnqueueWorkItem(workItem);
568 workItem.WorkItemIsQueued(); 568 workItem.WorkItemIsQueued();
569 569
570 // If all the threads are busy then try to create a new one 570 // If all the threads are busy then try to create a new one
571 if (_currentWorkItemsCount > _workerThreads.Count) 571 if (_currentWorkItemsCount > _workerThreads.Count)
572 { 572 {
573 StartThreads(1); 573 StartThreads(1);
574 } 574 }
575 } 575 }
576 576
577 private void IncrementWorkItemsCount() 577 private void IncrementWorkItemsCount()
578 { 578 {
579 _windowsPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed); 579 _windowsPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed);
580 _localPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed); 580 _localPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed);
581 581
582 int count = Interlocked.Increment(ref _currentWorkItemsCount); 582 int count = Interlocked.Increment(ref _currentWorkItemsCount);
583 //Trace.WriteLine("WorkItemsCount = " + _currentWorkItemsCount.ToString()); 583 //Trace.WriteLine("WorkItemsCount = " + _currentWorkItemsCount.ToString());
584 if (count == 1) 584 if (count == 1)
585 { 585 {
586 IsIdle = false; 586 IsIdle = false;
587 _isIdleWaitHandle.Reset(); 587 _isIdleWaitHandle.Reset();
588 } 588 }
589 } 589 }
590 590
591 private void DecrementWorkItemsCount() 591 private void DecrementWorkItemsCount()
592 { 592 {
593 int count = Interlocked.Decrement(ref _currentWorkItemsCount); 593 int count = Interlocked.Decrement(ref _currentWorkItemsCount);
594 //Trace.WriteLine("WorkItemsCount = " + _currentWorkItemsCount.ToString()); 594 //Trace.WriteLine("WorkItemsCount = " + _currentWorkItemsCount.ToString());
595 if (count == 0) 595 if (count == 0)
@@ -602,81 +602,81 @@ namespace Amib.Threading
602 602
603 if (!_shutdown) 603 if (!_shutdown)
604 { 604 {
605 // The counter counts even if the work item was cancelled 605 // The counter counts even if the work item was cancelled
606 _windowsPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed); 606 _windowsPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed);
607 _localPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed); 607 _localPCs.SampleWorkItems(_workItemsQueue.Count, _workItemsProcessed);
608 } 608 }
609 609
610 } 610 }
611 611
612 internal void RegisterWorkItemsGroup(IWorkItemsGroup workItemsGroup) 612 internal void RegisterWorkItemsGroup(IWorkItemsGroup workItemsGroup)
613 { 613 {
614 _workItemsGroups[workItemsGroup] = workItemsGroup; 614 _workItemsGroups[workItemsGroup] = workItemsGroup;
615 } 615 }
616 616
617 internal void UnregisterWorkItemsGroup(IWorkItemsGroup workItemsGroup) 617 internal void UnregisterWorkItemsGroup(IWorkItemsGroup workItemsGroup)
618 { 618 {
619 if (_workItemsGroups.Contains(workItemsGroup)) 619 if (_workItemsGroups.Contains(workItemsGroup))
620 { 620 {
621 _workItemsGroups.Remove(workItemsGroup); 621 _workItemsGroups.Remove(workItemsGroup);
622 } 622 }
623 } 623 }
624 624
625 /// <summary> 625 /// <summary>
626 /// Inform that the current thread is about to quit or quiting. 626 /// Inform that the current thread is about to quit or quiting.
627 /// The same thread may call this method more than once. 627 /// The same thread may call this method more than once.
628 /// </summary> 628 /// </summary>
629 private void InformCompleted() 629 private void InformCompleted()
630 { 630 {
631 // There is no need to lock the two methods together 631 // There is no need to lock the two methods together
632 // since only the current thread removes itself 632 // since only the current thread removes itself
633 // and the _workerThreads is a synchronized dictionary 633 // and the _workerThreads is a synchronized dictionary
634 if (_workerThreads.Contains(Thread.CurrentThread)) 634 if (_workerThreads.Contains(Thread.CurrentThread))
635 { 635 {
636 _workerThreads.Remove(Thread.CurrentThread); 636 _workerThreads.Remove(Thread.CurrentThread);
637 _windowsPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads); 637 _windowsPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads);
638 _localPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads); 638 _localPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads);
639 } 639 }
640 } 640 }
641 641
642 /// <summary> 642 /// <summary>
643 /// Starts new threads 643 /// Starts new threads
644 /// </summary> 644 /// </summary>
645 /// <param name="threadsCount">The number of threads to start</param> 645 /// <param name="threadsCount">The number of threads to start</param>
646 private void StartThreads(int threadsCount) 646 private void StartThreads(int threadsCount)
647 { 647 {
648 if (_isSuspended) 648 if (_isSuspended)
649 { 649 {
650 return; 650 return;
651 } 651 }
652 652
653 lock(_workerThreads.SyncRoot) 653 lock(_workerThreads.SyncRoot)
654 { 654 {
655 // Don't start threads on shut down 655 // Don't start threads on shut down
656 if (_shutdown) 656 if (_shutdown)
657 { 657 {
658 return; 658 return;
659 } 659 }
660 660
661 for(int i = 0; i < threadsCount; ++i) 661 for(int i = 0; i < threadsCount; ++i)
662 { 662 {
663 // Don't create more threads then the upper limit 663 // Don't create more threads then the upper limit
664 if (_workerThreads.Count >= _stpStartInfo.MaxWorkerThreads) 664 if (_workerThreads.Count >= _stpStartInfo.MaxWorkerThreads)
665 { 665 {
666 return; 666 return;
667 } 667 }
668 668
669 // Create a new thread 669 // Create a new thread
670 670
671#if (_SILVERLIGHT) || (WINDOWS_PHONE) 671#if (_SILVERLIGHT) || (WINDOWS_PHONE)
672 Thread workerThread = new Thread(ProcessQueuedItems); 672 Thread workerThread = new Thread(ProcessQueuedItems);
673#else 673#else
674 Thread workerThread = 674 Thread workerThread =
675 _stpStartInfo.MaxStackSize.HasValue 675 _stpStartInfo.MaxStackSize.HasValue
676 ? new Thread(ProcessQueuedItems, _stpStartInfo.MaxStackSize.Value) 676 ? new Thread(ProcessQueuedItems, _stpStartInfo.MaxStackSize.Value)
677 : new Thread(ProcessQueuedItems); 677 : new Thread(ProcessQueuedItems);
678#endif 678#endif
679 // Configure the new thread and start it 679 // Configure the new thread and start it
680 workerThread.IsBackground = _stpStartInfo.AreThreadsBackground; 680 workerThread.IsBackground = _stpStartInfo.AreThreadsBackground;
681 681
682#if !(_SILVERLIGHT) && !(_WINDOWS_CE) && !(WINDOWS_PHONE) 682#if !(_SILVERLIGHT) && !(_WINDOWS_CE) && !(WINDOWS_PHONE)
@@ -697,32 +697,32 @@ namespace Amib.Threading
697 // Add it to the dictionary and update its creation time. 697 // Add it to the dictionary and update its creation time.
698 _workerThreads[workerThread] = new ThreadEntry(this); 698 _workerThreads[workerThread] = new ThreadEntry(this);
699 699
700 _windowsPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads); 700 _windowsPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads);
701 _localPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads); 701 _localPCs.SampleThreads(_workerThreads.Count, _inUseWorkerThreads);
702 } 702 }
703 } 703 }
704 } 704 }
705 705
706 /// <summary> 706 /// <summary>
707 /// A worker thread method that processes work items from the work items queue. 707 /// A worker thread method that processes work items from the work items queue.
708 /// </summary> 708 /// </summary>
709 private void ProcessQueuedItems() 709 private void ProcessQueuedItems()
710 { 710 {
711 // Keep the entry of the dictionary as thread's variable to avoid the synchronization locks 711 // Keep the entry of the dictionary as thread's variable to avoid the synchronization locks
712 // of the dictionary. 712 // of the dictionary.
713 CurrentThreadEntry = _workerThreads[Thread.CurrentThread]; 713 CurrentThreadEntry = _workerThreads[Thread.CurrentThread];
714 714
715 FireOnThreadInitialization(); 715 FireOnThreadInitialization();
716 716
717 try 717 try
718 { 718 {
719 bool bInUseWorkerThreadsWasIncremented = false; 719 bool bInUseWorkerThreadsWasIncremented = false;
720 720
721 // Process until shutdown. 721 // Process until shutdown.
722 while(!_shutdown) 722 while(!_shutdown)
723 { 723 {
724 // Update the last time this thread was seen alive. 724 // Update the last time this thread was seen alive.
725 // It's good for debugging. 725 // It's good for debugging.
726 CurrentThreadEntry.IAmAlive(); 726 CurrentThreadEntry.IAmAlive();
727 727
728 // The following block handles the when the MaxWorkerThreads has been 728 // The following block handles the when the MaxWorkerThreads has been
@@ -744,166 +744,166 @@ namespace Amib.Threading
744 } 744 }
745 } 745 }
746 746
747 // Wait for a work item, shutdown, or timeout 747 // Wait for a work item, shutdown, or timeout
748 WorkItem workItem = Dequeue(); 748 WorkItem workItem = Dequeue();
749 749
750 // Update the last time this thread was seen alive. 750 // Update the last time this thread was seen alive.
751 // It's good for debugging. 751 // It's good for debugging.
752 CurrentThreadEntry.IAmAlive(); 752 CurrentThreadEntry.IAmAlive();
753 753
754 // On timeout or shut down. 754 // On timeout or shut down.
755 if (null == workItem) 755 if (null == workItem)
756 { 756 {
757 // Double lock for quit. 757 // Double lock for quit.
758 if (_workerThreads.Count > _stpStartInfo.MinWorkerThreads) 758 if (_workerThreads.Count > _stpStartInfo.MinWorkerThreads)
759 { 759 {
760 lock(_workerThreads.SyncRoot) 760 lock(_workerThreads.SyncRoot)
761 { 761 {
762 if (_workerThreads.Count > _stpStartInfo.MinWorkerThreads) 762 if (_workerThreads.Count > _stpStartInfo.MinWorkerThreads)
763 { 763 {
764 // Inform that the thread is quiting and then quit. 764 // Inform that the thread is quiting and then quit.
765 // This method must be called within this lock or else 765 // This method must be called within this lock or else
766 // more threads will quit and the thread pool will go 766 // more threads will quit and the thread pool will go
767 // below the lower limit. 767 // below the lower limit.
768 InformCompleted(); 768 InformCompleted();
769 break; 769 break;
770 } 770 }
771 } 771 }
772 } 772 }
773 } 773 }
774 774
775 // If we didn't quit then skip to the next iteration. 775 // If we didn't quit then skip to the next iteration.
776 if (null == workItem) 776 if (null == workItem)
777 { 777 {
778 continue; 778 continue;
779 } 779 }
780 780
781 try 781 try
782 { 782 {
783 // Initialize the value to false 783 // Initialize the value to false
784 bInUseWorkerThreadsWasIncremented = false; 784 bInUseWorkerThreadsWasIncremented = false;
785 785
786 // Set the Current Work Item of the thread. 786 // Set the Current Work Item of the thread.
787 // Store the Current Work Item before the workItem.StartingWorkItem() is called, 787 // Store the Current Work Item before the workItem.StartingWorkItem() is called,
788 // so WorkItem.Cancel can work when the work item is between InQueue and InProgress 788 // so WorkItem.Cancel can work when the work item is between InQueue and InProgress
789 // states. 789 // states.
790 // If the work item has been cancelled BEFORE the workItem.StartingWorkItem() 790 // If the work item has been cancelled BEFORE the workItem.StartingWorkItem()
791 // (work item is in InQueue state) then workItem.StartingWorkItem() will return false. 791 // (work item is in InQueue state) then workItem.StartingWorkItem() will return false.
792 // If the work item has been cancelled AFTER the workItem.StartingWorkItem() then 792 // If the work item has been cancelled AFTER the workItem.StartingWorkItem() then
793 // (work item is in InProgress state) then the thread will be aborted 793 // (work item is in InProgress state) then the thread will be aborted
794 CurrentThreadEntry.CurrentWorkItem = workItem; 794 CurrentThreadEntry.CurrentWorkItem = workItem;
795 795
796 // Change the state of the work item to 'in progress' if possible. 796 // Change the state of the work item to 'in progress' if possible.
797 // We do it here so if the work item has been canceled we won't 797 // We do it here so if the work item has been canceled we won't
798 // increment the _inUseWorkerThreads. 798 // increment the _inUseWorkerThreads.
799 // The cancel mechanism doesn't delete items from the queue, 799 // The cancel mechanism doesn't delete items from the queue,
800 // it marks the work item as canceled, and when the work item 800 // it marks the work item as canceled, and when the work item
801 // is dequeued, we just skip it. 801 // is dequeued, we just skip it.
802 // If the post execute of work item is set to always or to 802 // If the post execute of work item is set to always or to
803 // call when the work item is canceled then the StartingWorkItem() 803 // call when the work item is canceled then the StartingWorkItem()
804 // will return true, so the post execute can run. 804 // will return true, so the post execute can run.
805 if (!workItem.StartingWorkItem()) 805 if (!workItem.StartingWorkItem())
806 { 806 {
807 continue; 807 continue;
808 } 808 }
809 809
810 // Execute the callback. Make sure to accurately 810 // Execute the callback. Make sure to accurately
811 // record how many callbacks are currently executing. 811 // record how many callbacks are currently executing.
812 int inUseWorkerThreads = Interlocked.Increment(ref _inUseWorkerThreads); 812 int inUseWorkerThreads = Interlocked.Increment(ref _inUseWorkerThreads);
813 _windowsPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads); 813 _windowsPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads);
814 _localPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads); 814 _localPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads);
815 815
816 // Mark that the _inUseWorkerThreads incremented, so in the finally{} 816 // Mark that the _inUseWorkerThreads incremented, so in the finally{}
817 // statement we will decrement it correctly. 817 // statement we will decrement it correctly.
818 bInUseWorkerThreadsWasIncremented = true; 818 bInUseWorkerThreadsWasIncremented = true;
819 819
820 workItem.FireWorkItemStarted(); 820 workItem.FireWorkItemStarted();
821 821
822 ExecuteWorkItem(workItem); 822 ExecuteWorkItem(workItem);
823 } 823 }
824 catch(Exception ex) 824 catch(Exception ex)
825 { 825 {
826 ex.GetHashCode(); 826 ex.GetHashCode();
827 // Do nothing 827 // Do nothing
828 } 828 }
829 finally 829 finally
830 { 830 {
831 workItem.DisposeOfState(); 831 workItem.DisposeOfState();
832 832
833 // Set the CurrentWorkItem to null, since we 833 // Set the CurrentWorkItem to null, since we
834 // no longer run user's code. 834 // no longer run user's code.
835 CurrentThreadEntry.CurrentWorkItem = null; 835 CurrentThreadEntry.CurrentWorkItem = null;
836 836
837 // Decrement the _inUseWorkerThreads only if we had 837 // Decrement the _inUseWorkerThreads only if we had
838 // incremented it. Note the cancelled work items don't 838 // incremented it. Note the cancelled work items don't
839 // increment _inUseWorkerThreads. 839 // increment _inUseWorkerThreads.
840 if (bInUseWorkerThreadsWasIncremented) 840 if (bInUseWorkerThreadsWasIncremented)
841 { 841 {
842 int inUseWorkerThreads = Interlocked.Decrement(ref _inUseWorkerThreads); 842 int inUseWorkerThreads = Interlocked.Decrement(ref _inUseWorkerThreads);
843 _windowsPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads); 843 _windowsPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads);
844 _localPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads); 844 _localPCs.SampleThreads(_workerThreads.Count, inUseWorkerThreads);
845 } 845 }
846 846
847 // Notify that the work item has been completed. 847 // Notify that the work item has been completed.
848 // WorkItemsGroup may enqueue their next work item. 848 // WorkItemsGroup may enqueue their next work item.
849 workItem.FireWorkItemCompleted(); 849 workItem.FireWorkItemCompleted();
850 850
851 // Decrement the number of work items here so the idle 851 // Decrement the number of work items here so the idle
852 // ManualResetEvent won't fluctuate. 852 // ManualResetEvent won't fluctuate.
853 DecrementWorkItemsCount(); 853 DecrementWorkItemsCount();
854 } 854 }
855 } 855 }
856 } 856 }
857 catch(ThreadAbortException tae) 857 catch(ThreadAbortException tae)
858 { 858 {
859 tae.GetHashCode(); 859 tae.GetHashCode();
860 // Handle the abort exception gracfully. 860 // Handle the abort exception gracfully.
861#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE) 861#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE)
862 Thread.ResetAbort(); 862 Thread.ResetAbort();
863#endif 863#endif
864 } 864 }
865 catch(Exception e) 865 catch(Exception e)
866 { 866 {
867 Debug.Assert(null != e); 867 Debug.Assert(null != e);
868 } 868 }
869 finally 869 finally
870 { 870 {
871 InformCompleted(); 871 InformCompleted();
872 FireOnThreadTermination(); 872 FireOnThreadTermination();
873 } 873 }
874 } 874 }
875 875
876 private void ExecuteWorkItem(WorkItem workItem) 876 private void ExecuteWorkItem(WorkItem workItem)
877 { 877 {
878 _windowsPCs.SampleWorkItemsWaitTime(workItem.WaitingTime); 878 _windowsPCs.SampleWorkItemsWaitTime(workItem.WaitingTime);
879 _localPCs.SampleWorkItemsWaitTime(workItem.WaitingTime); 879 _localPCs.SampleWorkItemsWaitTime(workItem.WaitingTime);
880 try 880 try
881 { 881 {
882 workItem.Execute(); 882 workItem.Execute();
883 } 883 }
884 finally 884 finally
885 { 885 {
886 _windowsPCs.SampleWorkItemsProcessTime(workItem.ProcessTime); 886 _windowsPCs.SampleWorkItemsProcessTime(workItem.ProcessTime);
887 _localPCs.SampleWorkItemsProcessTime(workItem.ProcessTime); 887 _localPCs.SampleWorkItemsProcessTime(workItem.ProcessTime);
888 } 888 }
889 } 889 }
890 890
891 891
892 #endregion 892 #endregion
893 893
894 #region Public Methods 894 #region Public Methods
895 895
896 private void ValidateWaitForIdle() 896 private void ValidateWaitForIdle()
897 { 897 {
898 if (null != CurrentThreadEntry && CurrentThreadEntry.AssociatedSmartThreadPool == this) 898 if (null != CurrentThreadEntry && CurrentThreadEntry.AssociatedSmartThreadPool == this)
899 { 899 {
900 throw new NotSupportedException( 900 throw new NotSupportedException(
901 "WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock"); 901 "WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock");
902 } 902 }
903 } 903 }
904 904
905 internal static void ValidateWorkItemsGroupWaitForIdle(IWorkItemsGroup workItemsGroup) 905 internal static void ValidateWorkItemsGroupWaitForIdle(IWorkItemsGroup workItemsGroup)
906 { 906 {
907 if (null == CurrentThreadEntry) 907 if (null == CurrentThreadEntry)
908 { 908 {
909 return; 909 return;
@@ -911,334 +911,334 @@ namespace Amib.Threading
911 911
912 WorkItem workItem = CurrentThreadEntry.CurrentWorkItem; 912 WorkItem workItem = CurrentThreadEntry.CurrentWorkItem;
913 ValidateWorkItemsGroupWaitForIdleImpl(workItemsGroup, workItem); 913 ValidateWorkItemsGroupWaitForIdleImpl(workItemsGroup, workItem);
914 if ((null != workItemsGroup) && 914 if ((null != workItemsGroup) &&
915 (null != workItem) && 915 (null != workItem) &&
916 CurrentThreadEntry.CurrentWorkItem.WasQueuedBy(workItemsGroup)) 916 CurrentThreadEntry.CurrentWorkItem.WasQueuedBy(workItemsGroup))
917 { 917 {
918 throw new NotSupportedException("WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock"); 918 throw new NotSupportedException("WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock");
919 } 919 }
920 } 920 }
921 921
922 [MethodImpl(MethodImplOptions.NoInlining)] 922 [MethodImpl(MethodImplOptions.NoInlining)]
923 private static void ValidateWorkItemsGroupWaitForIdleImpl(IWorkItemsGroup workItemsGroup, WorkItem workItem) 923 private static void ValidateWorkItemsGroupWaitForIdleImpl(IWorkItemsGroup workItemsGroup, WorkItem workItem)
924 { 924 {
925 if ((null != workItemsGroup) && 925 if ((null != workItemsGroup) &&
926 (null != workItem) && 926 (null != workItem) &&
927 workItem.WasQueuedBy(workItemsGroup)) 927 workItem.WasQueuedBy(workItemsGroup))
928 { 928 {
929 throw new NotSupportedException("WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock"); 929 throw new NotSupportedException("WaitForIdle cannot be called from a thread on its SmartThreadPool, it causes a deadlock");
930 } 930 }
931 } 931 }
932 932
933 /// <summary> 933 /// <summary>
934 /// Force the SmartThreadPool to shutdown 934 /// Force the SmartThreadPool to shutdown
935 /// </summary> 935 /// </summary>
936 public void Shutdown() 936 public void Shutdown()
937 { 937 {
938 Shutdown(true, 0); 938 Shutdown(true, 0);
939 } 939 }
940 940
941 /// <summary> 941 /// <summary>
942 /// Force the SmartThreadPool to shutdown with timeout 942 /// Force the SmartThreadPool to shutdown with timeout
943 /// </summary> 943 /// </summary>
944 public void Shutdown(bool forceAbort, TimeSpan timeout) 944 public void Shutdown(bool forceAbort, TimeSpan timeout)
945 { 945 {
946 Shutdown(forceAbort, (int)timeout.TotalMilliseconds); 946 Shutdown(forceAbort, (int)timeout.TotalMilliseconds);
947 } 947 }
948 948
949 /// <summary> 949 /// <summary>
950 /// Empties the queue of work items and abort the threads in the pool. 950 /// Empties the queue of work items and abort the threads in the pool.
951 /// </summary> 951 /// </summary>
952 public void Shutdown(bool forceAbort, int millisecondsTimeout) 952 public void Shutdown(bool forceAbort, int millisecondsTimeout)
953 { 953 {
954 ValidateNotDisposed(); 954 ValidateNotDisposed();
955 955
956 ISTPInstancePerformanceCounters pcs = _windowsPCs; 956 ISTPInstancePerformanceCounters pcs = _windowsPCs;
957 957
958 if (NullSTPInstancePerformanceCounters.Instance != _windowsPCs) 958 if (NullSTPInstancePerformanceCounters.Instance != _windowsPCs)
959 { 959 {
960 // Set the _pcs to "null" to stop updating the performance 960 // Set the _pcs to "null" to stop updating the performance
961 // counters 961 // counters
962 _windowsPCs = NullSTPInstancePerformanceCounters.Instance; 962 _windowsPCs = NullSTPInstancePerformanceCounters.Instance;
963 963
964 pcs.Dispose(); 964 pcs.Dispose();
965 } 965 }
966 966
967 Thread [] threads; 967 Thread [] threads;
968 lock(_workerThreads.SyncRoot) 968 lock(_workerThreads.SyncRoot)
969 { 969 {
970 // Shutdown the work items queue 970 // Shutdown the work items queue
971 _workItemsQueue.Dispose(); 971 _workItemsQueue.Dispose();
972 972
973 // Signal the threads to exit 973 // Signal the threads to exit
974 _shutdown = true; 974 _shutdown = true;
975 _shuttingDownEvent.Set(); 975 _shuttingDownEvent.Set();
976 976
977 // Make a copy of the threads' references in the pool 977 // Make a copy of the threads' references in the pool
978 threads = new Thread [_workerThreads.Count]; 978 threads = new Thread [_workerThreads.Count];
979 _workerThreads.Keys.CopyTo(threads, 0); 979 _workerThreads.Keys.CopyTo(threads, 0);
980 } 980 }
981 981
982 int millisecondsLeft = millisecondsTimeout; 982 int millisecondsLeft = millisecondsTimeout;
983 Stopwatch stopwatch = Stopwatch.StartNew(); 983 Stopwatch stopwatch = Stopwatch.StartNew();
984 //DateTime start = DateTime.UtcNow; 984 //DateTime start = DateTime.UtcNow;
985 bool waitInfinitely = (Timeout.Infinite == millisecondsTimeout); 985 bool waitInfinitely = (Timeout.Infinite == millisecondsTimeout);
986 bool timeout = false; 986 bool timeout = false;
987 987
988 // Each iteration we update the time left for the timeout. 988 // Each iteration we update the time left for the timeout.
989 foreach(Thread thread in threads) 989 foreach(Thread thread in threads)
990 { 990 {
991 // Join don't work with negative numbers 991 // Join don't work with negative numbers
992 if (!waitInfinitely && (millisecondsLeft < 0)) 992 if (!waitInfinitely && (millisecondsLeft < 0))
993 { 993 {
994 timeout = true; 994 timeout = true;
995 break; 995 break;
996 } 996 }
997 997
998 // Wait for the thread to terminate 998 // Wait for the thread to terminate
999 bool success = thread.Join(millisecondsLeft); 999 bool success = thread.Join(millisecondsLeft);
1000 if(!success) 1000 if(!success)
1001 { 1001 {
1002 timeout = true; 1002 timeout = true;
1003 break; 1003 break;
1004 } 1004 }
1005 1005
1006 if(!waitInfinitely) 1006 if(!waitInfinitely)
1007 { 1007 {
1008 // Update the time left to wait 1008 // Update the time left to wait
1009 //TimeSpan ts = DateTime.UtcNow - start; 1009 //TimeSpan ts = DateTime.UtcNow - start;
1010 millisecondsLeft = millisecondsTimeout - (int)stopwatch.ElapsedMilliseconds; 1010 millisecondsLeft = millisecondsTimeout - (int)stopwatch.ElapsedMilliseconds;
1011 } 1011 }
1012 } 1012 }
1013 1013
1014 if (timeout && forceAbort) 1014 if (timeout && forceAbort)
1015 { 1015 {
1016 // Abort the threads in the pool 1016 // Abort the threads in the pool
1017 foreach(Thread thread in threads) 1017 foreach(Thread thread in threads)
1018 { 1018 {
1019 1019
1020 if ((thread != null) 1020 if ((thread != null)
1021#if !(_WINDOWS_CE) 1021#if !(_WINDOWS_CE)
1022 && thread.IsAlive 1022 && thread.IsAlive
1023#endif 1023#endif
1024 ) 1024 )
1025 { 1025 {
1026 try 1026 try
1027 { 1027 {
1028 thread.Abort(); // Shutdown 1028 thread.Abort(); // Shutdown
1029 } 1029 }
1030 catch(SecurityException e) 1030 catch(SecurityException e)
1031 { 1031 {
1032 e.GetHashCode(); 1032 e.GetHashCode();
1033 } 1033 }
1034 catch(ThreadStateException ex) 1034 catch(ThreadStateException ex)
1035 { 1035 {
1036 ex.GetHashCode(); 1036 ex.GetHashCode();
1037 // In case the thread has been terminated 1037 // In case the thread has been terminated
1038 // after the check if it is alive. 1038 // after the check if it is alive.
1039 } 1039 }
1040 } 1040 }
1041 } 1041 }
1042 } 1042 }
1043 } 1043 }
1044 1044
1045 /// <summary> 1045 /// <summary>
1046 /// Wait for all work items to complete 1046 /// Wait for all work items to complete
1047 /// </summary> 1047 /// </summary>
1048 /// <param name="waitableResults">Array of work item result objects</param> 1048 /// <param name="waitableResults">Array of work item result objects</param>
1049 /// <returns> 1049 /// <returns>
1050 /// true when every work item in workItemResults has completed; otherwise false. 1050 /// true when every work item in workItemResults has completed; otherwise false.
1051 /// </returns> 1051 /// </returns>
1052 public static bool WaitAll( 1052 public static bool WaitAll(
1053 IWaitableResult [] waitableResults) 1053 IWaitableResult [] waitableResults)
1054 { 1054 {
1055 return WaitAll(waitableResults, Timeout.Infinite, true); 1055 return WaitAll(waitableResults, Timeout.Infinite, true);
1056 } 1056 }
1057 1057
1058 /// <summary> 1058 /// <summary>
1059 /// Wait for all work items to complete 1059 /// Wait for all work items to complete
1060 /// </summary> 1060 /// </summary>
1061 /// <param name="waitableResults">Array of work item result objects</param> 1061 /// <param name="waitableResults">Array of work item result objects</param>
1062 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param> 1062 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param>
1063 /// <param name="exitContext"> 1063 /// <param name="exitContext">
1064 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1064 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1065 /// </param> 1065 /// </param>
1066 /// <returns> 1066 /// <returns>
1067 /// true when every work item in workItemResults has completed; otherwise false. 1067 /// true when every work item in workItemResults has completed; otherwise false.
1068 /// </returns> 1068 /// </returns>
1069 public static bool WaitAll( 1069 public static bool WaitAll(
1070 IWaitableResult [] waitableResults, 1070 IWaitableResult [] waitableResults,
1071 TimeSpan timeout, 1071 TimeSpan timeout,
1072 bool exitContext) 1072 bool exitContext)
1073 { 1073 {
1074 return WaitAll(waitableResults, (int)timeout.TotalMilliseconds, exitContext); 1074 return WaitAll(waitableResults, (int)timeout.TotalMilliseconds, exitContext);
1075 } 1075 }
1076 1076
1077 /// <summary> 1077 /// <summary>
1078 /// Wait for all work items to complete 1078 /// Wait for all work items to complete
1079 /// </summary> 1079 /// </summary>
1080 /// <param name="waitableResults">Array of work item result objects</param> 1080 /// <param name="waitableResults">Array of work item result objects</param>
1081 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param> 1081 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param>
1082 /// <param name="exitContext"> 1082 /// <param name="exitContext">
1083 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1083 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1084 /// </param> 1084 /// </param>
1085 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 1085 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
1086 /// <returns> 1086 /// <returns>
1087 /// true when every work item in workItemResults has completed; otherwise false. 1087 /// true when every work item in workItemResults has completed; otherwise false.
1088 /// </returns> 1088 /// </returns>
1089 public static bool WaitAll( 1089 public static bool WaitAll(
1090 IWaitableResult[] waitableResults, 1090 IWaitableResult[] waitableResults,
1091 TimeSpan timeout, 1091 TimeSpan timeout,
1092 bool exitContext, 1092 bool exitContext,
1093 WaitHandle cancelWaitHandle) 1093 WaitHandle cancelWaitHandle)
1094 { 1094 {
1095 return WaitAll(waitableResults, (int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle); 1095 return WaitAll(waitableResults, (int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle);
1096 } 1096 }
1097 1097
1098 /// <summary> 1098 /// <summary>
1099 /// Wait for all work items to complete 1099 /// Wait for all work items to complete
1100 /// </summary> 1100 /// </summary>
1101 /// <param name="waitableResults">Array of work item result objects</param> 1101 /// <param name="waitableResults">Array of work item result objects</param>
1102 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 1102 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
1103 /// <param name="exitContext"> 1103 /// <param name="exitContext">
1104 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1104 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1105 /// </param> 1105 /// </param>
1106 /// <returns> 1106 /// <returns>
1107 /// true when every work item in workItemResults has completed; otherwise false. 1107 /// true when every work item in workItemResults has completed; otherwise false.
1108 /// </returns> 1108 /// </returns>
1109 public static bool WaitAll( 1109 public static bool WaitAll(
1110 IWaitableResult [] waitableResults, 1110 IWaitableResult [] waitableResults,
1111 int millisecondsTimeout, 1111 int millisecondsTimeout,
1112 bool exitContext) 1112 bool exitContext)
1113 { 1113 {
1114 return WorkItem.WaitAll(waitableResults, millisecondsTimeout, exitContext, null); 1114 return WorkItem.WaitAll(waitableResults, millisecondsTimeout, exitContext, null);
1115 } 1115 }
1116 1116
1117 /// <summary> 1117 /// <summary>
1118 /// Wait for all work items to complete 1118 /// Wait for all work items to complete
1119 /// </summary> 1119 /// </summary>
1120 /// <param name="waitableResults">Array of work item result objects</param> 1120 /// <param name="waitableResults">Array of work item result objects</param>
1121 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 1121 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
1122 /// <param name="exitContext"> 1122 /// <param name="exitContext">
1123 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1123 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1124 /// </param> 1124 /// </param>
1125 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 1125 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
1126 /// <returns> 1126 /// <returns>
1127 /// true when every work item in workItemResults has completed; otherwise false. 1127 /// true when every work item in workItemResults has completed; otherwise false.
1128 /// </returns> 1128 /// </returns>
1129 public static bool WaitAll( 1129 public static bool WaitAll(
1130 IWaitableResult[] waitableResults, 1130 IWaitableResult[] waitableResults,
1131 int millisecondsTimeout, 1131 int millisecondsTimeout,
1132 bool exitContext, 1132 bool exitContext,
1133 WaitHandle cancelWaitHandle) 1133 WaitHandle cancelWaitHandle)
1134 { 1134 {
1135 return WorkItem.WaitAll(waitableResults, millisecondsTimeout, exitContext, cancelWaitHandle); 1135 return WorkItem.WaitAll(waitableResults, millisecondsTimeout, exitContext, cancelWaitHandle);
1136 } 1136 }
1137 1137
1138 1138
1139 /// <summary> 1139 /// <summary>
1140 /// Waits for any of the work items in the specified array to complete, cancel, or timeout 1140 /// Waits for any of the work items in the specified array to complete, cancel, or timeout
1141 /// </summary> 1141 /// </summary>
1142 /// <param name="waitableResults">Array of work item result objects</param> 1142 /// <param name="waitableResults">Array of work item result objects</param>
1143 /// <returns> 1143 /// <returns>
1144 /// The array index of the work item result that satisfied the wait, or WaitTimeout if any of the work items has been canceled. 1144 /// The array index of the work item result that satisfied the wait, or WaitTimeout if any of the work items has been canceled.
1145 /// </returns> 1145 /// </returns>
1146 public static int WaitAny( 1146 public static int WaitAny(
1147 IWaitableResult [] waitableResults) 1147 IWaitableResult [] waitableResults)
1148 { 1148 {
1149 return WaitAny(waitableResults, Timeout.Infinite, true); 1149 return WaitAny(waitableResults, Timeout.Infinite, true);
1150 } 1150 }
1151 1151
1152 /// <summary> 1152 /// <summary>
1153 /// Waits for any of the work items in the specified array to complete, cancel, or timeout 1153 /// Waits for any of the work items in the specified array to complete, cancel, or timeout
1154 /// </summary> 1154 /// </summary>
1155 /// <param name="waitableResults">Array of work item result objects</param> 1155 /// <param name="waitableResults">Array of work item result objects</param>
1156 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param> 1156 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param>
1157 /// <param name="exitContext"> 1157 /// <param name="exitContext">
1158 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1158 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1159 /// </param> 1159 /// </param>
1160 /// <returns> 1160 /// <returns>
1161 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled. 1161 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
1162 /// </returns> 1162 /// </returns>
1163 public static int WaitAny( 1163 public static int WaitAny(
1164 IWaitableResult[] waitableResults, 1164 IWaitableResult[] waitableResults,
1165 TimeSpan timeout, 1165 TimeSpan timeout,
1166 bool exitContext) 1166 bool exitContext)
1167 { 1167 {
1168 return WaitAny(waitableResults, (int)timeout.TotalMilliseconds, exitContext); 1168 return WaitAny(waitableResults, (int)timeout.TotalMilliseconds, exitContext);
1169 } 1169 }
1170 1170
1171 /// <summary> 1171 /// <summary>
1172 /// Waits for any of the work items in the specified array to complete, cancel, or timeout 1172 /// Waits for any of the work items in the specified array to complete, cancel, or timeout
1173 /// </summary> 1173 /// </summary>
1174 /// <param name="waitableResults">Array of work item result objects</param> 1174 /// <param name="waitableResults">Array of work item result objects</param>
1175 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param> 1175 /// <param name="timeout">The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. </param>
1176 /// <param name="exitContext"> 1176 /// <param name="exitContext">
1177 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1177 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1178 /// </param> 1178 /// </param>
1179 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 1179 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
1180 /// <returns> 1180 /// <returns>
1181 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled. 1181 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
1182 /// </returns> 1182 /// </returns>
1183 public static int WaitAny( 1183 public static int WaitAny(
1184 IWaitableResult [] waitableResults, 1184 IWaitableResult [] waitableResults,
1185 TimeSpan timeout, 1185 TimeSpan timeout,
1186 bool exitContext, 1186 bool exitContext,
1187 WaitHandle cancelWaitHandle) 1187 WaitHandle cancelWaitHandle)
1188 { 1188 {
1189 return WaitAny(waitableResults, (int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle); 1189 return WaitAny(waitableResults, (int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle);
1190 } 1190 }
1191 1191
1192 /// <summary> 1192 /// <summary>
1193 /// Waits for any of the work items in the specified array to complete, cancel, or timeout 1193 /// Waits for any of the work items in the specified array to complete, cancel, or timeout
1194 /// </summary> 1194 /// </summary>
1195 /// <param name="waitableResults">Array of work item result objects</param> 1195 /// <param name="waitableResults">Array of work item result objects</param>
1196 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 1196 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
1197 /// <param name="exitContext"> 1197 /// <param name="exitContext">
1198 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1198 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1199 /// </param> 1199 /// </param>
1200 /// <returns> 1200 /// <returns>
1201 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled. 1201 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
1202 /// </returns> 1202 /// </returns>
1203 public static int WaitAny( 1203 public static int WaitAny(
1204 IWaitableResult [] waitableResults, 1204 IWaitableResult [] waitableResults,
1205 int millisecondsTimeout, 1205 int millisecondsTimeout,
1206 bool exitContext) 1206 bool exitContext)
1207 { 1207 {
1208 return WorkItem.WaitAny(waitableResults, millisecondsTimeout, exitContext, null); 1208 return WorkItem.WaitAny(waitableResults, millisecondsTimeout, exitContext, null);
1209 } 1209 }
1210 1210
1211 /// <summary> 1211 /// <summary>
1212 /// Waits for any of the work items in the specified array to complete, cancel, or timeout 1212 /// Waits for any of the work items in the specified array to complete, cancel, or timeout
1213 /// </summary> 1213 /// </summary>
1214 /// <param name="waitableResults">Array of work item result objects</param> 1214 /// <param name="waitableResults">Array of work item result objects</param>
1215 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 1215 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
1216 /// <param name="exitContext"> 1216 /// <param name="exitContext">
1217 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 1217 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
1218 /// </param> 1218 /// </param>
1219 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 1219 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
1220 /// <returns> 1220 /// <returns>
1221 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled. 1221 /// The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
1222 /// </returns> 1222 /// </returns>
1223 public static int WaitAny( 1223 public static int WaitAny(
1224 IWaitableResult [] waitableResults, 1224 IWaitableResult [] waitableResults,
1225 int millisecondsTimeout, 1225 int millisecondsTimeout,
1226 bool exitContext, 1226 bool exitContext,
1227 WaitHandle cancelWaitHandle) 1227 WaitHandle cancelWaitHandle)
1228 { 1228 {
1229 return WorkItem.WaitAny(waitableResults, millisecondsTimeout, exitContext, cancelWaitHandle); 1229 return WorkItem.WaitAny(waitableResults, millisecondsTimeout, exitContext, cancelWaitHandle);
1230 } 1230 }
1231 1231
1232 /// <summary> 1232 /// <summary>
1233 /// Creates a new WorkItemsGroup. 1233 /// Creates a new WorkItemsGroup.
1234 /// </summary> 1234 /// </summary>
1235 /// <param name="concurrency">The number of work items that can be run concurrently</param> 1235 /// <param name="concurrency">The number of work items that can be run concurrently</param>
1236 /// <returns>A reference to the WorkItemsGroup</returns> 1236 /// <returns>A reference to the WorkItemsGroup</returns>
1237 public IWorkItemsGroup CreateWorkItemsGroup(int concurrency) 1237 public IWorkItemsGroup CreateWorkItemsGroup(int concurrency)
1238 { 1238 {
1239 IWorkItemsGroup workItemsGroup = new WorkItemsGroup(this, concurrency, _stpStartInfo); 1239 IWorkItemsGroup workItemsGroup = new WorkItemsGroup(this, concurrency, _stpStartInfo);
1240 return workItemsGroup; 1240 return workItemsGroup;
1241 } 1241 }
1242 1242
1243 /// <summary> 1243 /// <summary>
1244 /// Creates a new WorkItemsGroup. 1244 /// Creates a new WorkItemsGroup.
@@ -1246,11 +1246,11 @@ namespace Amib.Threading
1246 /// <param name="concurrency">The number of work items that can be run concurrently</param> 1246 /// <param name="concurrency">The number of work items that can be run concurrently</param>
1247 /// <param name="wigStartInfo">A WorkItemsGroup configuration that overrides the default behavior</param> 1247 /// <param name="wigStartInfo">A WorkItemsGroup configuration that overrides the default behavior</param>
1248 /// <returns>A reference to the WorkItemsGroup</returns> 1248 /// <returns>A reference to the WorkItemsGroup</returns>
1249 public IWorkItemsGroup CreateWorkItemsGroup(int concurrency, WIGStartInfo wigStartInfo) 1249 public IWorkItemsGroup CreateWorkItemsGroup(int concurrency, WIGStartInfo wigStartInfo)
1250 { 1250 {
1251 IWorkItemsGroup workItemsGroup = new WorkItemsGroup(this, concurrency, wigStartInfo); 1251 IWorkItemsGroup workItemsGroup = new WorkItemsGroup(this, concurrency, wigStartInfo);
1252 return workItemsGroup; 1252 return workItemsGroup;
1253 } 1253 }
1254 1254
1255 #region Fire Thread's Events 1255 #region Fire Thread's Events
1256 1256
@@ -1331,22 +1331,22 @@ namespace Amib.Threading
1331 } 1331 }
1332 } 1332 }
1333 1333
1334
1335 1334
1336 #endregion
1337 1335
1338 #region Properties 1336 #endregion
1337
1338 #region Properties
1339 1339
1340 /// <summary> 1340 /// <summary>
1341 /// Get/Set the lower limit of threads in the pool. 1341 /// Get/Set the lower limit of threads in the pool.
1342 /// </summary> 1342 /// </summary>
1343 public int MinThreads 1343 public int MinThreads
1344 { 1344 {
1345 get 1345 get
1346 { 1346 {
1347 ValidateNotDisposed(); 1347 ValidateNotDisposed();
1348 return _stpStartInfo.MinWorkerThreads; 1348 return _stpStartInfo.MinWorkerThreads;
1349 } 1349 }
1350 set 1350 set
1351 { 1351 {
1352 Debug.Assert(value >= 0); 1352 Debug.Assert(value >= 0);
@@ -1358,21 +1358,21 @@ namespace Amib.Threading
1358 _stpStartInfo.MinWorkerThreads = value; 1358 _stpStartInfo.MinWorkerThreads = value;
1359 StartOptimalNumberOfThreads(); 1359 StartOptimalNumberOfThreads();
1360 } 1360 }
1361 } 1361 }
1362 1362
1363 /// <summary> 1363 /// <summary>
1364 /// Get/Set the upper limit of threads in the pool. 1364 /// Get/Set the upper limit of threads in the pool.
1365 /// </summary> 1365 /// </summary>
1366 public int MaxThreads 1366 public int MaxThreads
1367 { 1367 {
1368 get 1368 get
1369 { 1369 {
1370 ValidateNotDisposed(); 1370 ValidateNotDisposed();
1371 return _stpStartInfo.MaxWorkerThreads; 1371 return _stpStartInfo.MaxWorkerThreads;
1372 } 1372 }
1373 1373
1374 set 1374 set
1375 { 1375 {
1376 Debug.Assert(value > 0); 1376 Debug.Assert(value > 0);
1377 Debug.Assert(value >= _stpStartInfo.MinWorkerThreads); 1377 Debug.Assert(value >= _stpStartInfo.MinWorkerThreads);
1378 if (_stpStartInfo.MinWorkerThreads > value) 1378 if (_stpStartInfo.MinWorkerThreads > value)
@@ -1381,32 +1381,32 @@ namespace Amib.Threading
1381 } 1381 }
1382 _stpStartInfo.MaxWorkerThreads = value; 1382 _stpStartInfo.MaxWorkerThreads = value;
1383 StartOptimalNumberOfThreads(); 1383 StartOptimalNumberOfThreads();
1384 } 1384 }
1385 } 1385 }
1386 /// <summary> 1386 /// <summary>
1387 /// Get the number of threads in the thread pool. 1387 /// Get the number of threads in the thread pool.
1388 /// Should be between the lower and the upper limits. 1388 /// Should be between the lower and the upper limits.
1389 /// </summary> 1389 /// </summary>
1390 public int ActiveThreads 1390 public int ActiveThreads
1391 { 1391 {
1392 get 1392 get
1393 { 1393 {
1394 ValidateNotDisposed(); 1394 ValidateNotDisposed();
1395 return _workerThreads.Count; 1395 return _workerThreads.Count;
1396 } 1396 }
1397 } 1397 }
1398 1398
1399 /// <summary> 1399 /// <summary>
1400 /// Get the number of busy (not idle) threads in the thread pool. 1400 /// Get the number of busy (not idle) threads in the thread pool.
1401 /// </summary> 1401 /// </summary>
1402 public int InUseThreads 1402 public int InUseThreads
1403 { 1403 {
1404 get 1404 get
1405 { 1405 {
1406 ValidateNotDisposed(); 1406 ValidateNotDisposed();
1407 return _inUseWorkerThreads; 1407 return _inUseWorkerThreads;
1408 } 1408 }
1409 } 1409 }
1410 1410
1411 /// <summary> 1411 /// <summary>
1412 /// Returns true if the current running work item has been cancelled. 1412 /// Returns true if the current running work item has been cancelled.
@@ -1420,8 +1420,8 @@ namespace Amib.Threading
1420 { 1420 {
1421 return CurrentThreadEntry.CurrentWorkItem.IsCanceled; 1421 return CurrentThreadEntry.CurrentWorkItem.IsCanceled;
1422 } 1422 }
1423 } 1423 }
1424 1424
1425 /// <summary> 1425 /// <summary>
1426 /// Checks if the work item has been cancelled, and if yes then abort the thread. 1426 /// Checks if the work item has been cancelled, and if yes then abort the thread.
1427 /// Can be used with Cancel and timeout 1427 /// Can be used with Cancel and timeout
@@ -1439,16 +1439,16 @@ namespace Amib.Threading
1439 /// </summary> 1439 /// </summary>
1440 public STPStartInfo STPStartInfo 1440 public STPStartInfo STPStartInfo
1441 { 1441 {
1442 get 1442 get
1443 { 1443 {
1444 return _stpStartInfo.AsReadOnly(); 1444 return _stpStartInfo.AsReadOnly();
1445 } 1445 }
1446 } 1446 }
1447 1447
1448 public bool IsShuttingdown 1448 public bool IsShuttingdown
1449 { 1449 {
1450 get { return _shutdown; } 1450 get { return _shutdown; }
1451 } 1451 }
1452 1452
1453 /// <summary> 1453 /// <summary>
1454 /// Return the local calculated performance counters 1454 /// Return the local calculated performance counters
@@ -1478,7 +1478,7 @@ namespace Amib.Threading
1478 _shuttingDownEvent = null; 1478 _shuttingDownEvent = null;
1479 } 1479 }
1480 _workerThreads.Clear(); 1480 _workerThreads.Clear();
1481 1481
1482 if (null != _isIdleWaitHandle) 1482 if (null != _isIdleWaitHandle)
1483 { 1483 {
1484 _isIdleWaitHandle.Close(); 1484 _isIdleWaitHandle.Close();
@@ -1507,22 +1507,22 @@ namespace Amib.Threading
1507 /// Get/Set the maximum number of work items that execute cocurrency on the thread pool 1507 /// Get/Set the maximum number of work items that execute cocurrency on the thread pool
1508 /// </summary> 1508 /// </summary>
1509 public override int Concurrency 1509 public override int Concurrency
1510 { 1510 {
1511 get { return MaxThreads; } 1511 get { return MaxThreads; }
1512 set { MaxThreads = value; } 1512 set { MaxThreads = value; }
1513 } 1513 }
1514 1514
1515 /// <summary> 1515 /// <summary>
1516 /// Get the number of work items in the queue. 1516 /// Get the number of work items in the queue.
1517 /// </summary> 1517 /// </summary>
1518 public override int WaitingCallbacks 1518 public override int WaitingCallbacks
1519 { 1519 {
1520 get 1520 get
1521 { 1521 {
1522 ValidateNotDisposed(); 1522 ValidateNotDisposed();
1523 return _workItemsQueue.Count; 1523 return _workItemsQueue.Count;
1524 } 1524 }
1525 } 1525 }
1526 1526
1527 /// <summary> 1527 /// <summary>
1528 /// Get an array with all the state objects of the currently running items. 1528 /// Get an array with all the state objects of the currently running items.
@@ -1542,7 +1542,7 @@ namespace Amib.Threading
1542 get { return _stpStartInfo.AsReadOnly(); } 1542 get { return _stpStartInfo.AsReadOnly(); }
1543 } 1543 }
1544 1544
1545 /// <summary> 1545 /// <summary>
1546 /// Start the thread pool if it was started suspended. 1546 /// Start the thread pool if it was started suspended.
1547 /// If it is already running, this method is ignored. 1547 /// If it is already running, this method is ignored.
1548 /// </summary> 1548 /// </summary>
@@ -1593,7 +1593,7 @@ namespace Amib.Threading
1593 } 1593 }
1594 } 1594 }
1595 1595
1596 /// <summary> 1596 /// <summary>
1597 /// Wait for the thread pool to be idle 1597 /// Wait for the thread pool to be idle
1598 /// </summary> 1598 /// </summary>
1599 public override bool WaitForIdle(int millisecondsTimeout) 1599 public override bool WaitForIdle(int millisecondsTimeout)
@@ -1622,9 +1622,9 @@ namespace Amib.Threading
1622 } 1622 }
1623 } 1623 }
1624 1624
1625 internal override void PreQueueWorkItem() 1625 internal override void PreQueueWorkItem()
1626 { 1626 {
1627 ValidateNotDisposed(); 1627 ValidateNotDisposed();
1628 } 1628 }
1629 1629
1630 #endregion 1630 #endregion
@@ -1676,7 +1676,7 @@ namespace Amib.Threading
1676 ManualResetEvent anActionCompleted = new ManualResetEvent(false); 1676 ManualResetEvent anActionCompleted = new ManualResetEvent(false);
1677 1677
1678 ChoiceIndex choiceIndex = new ChoiceIndex(); 1678 ChoiceIndex choiceIndex = new ChoiceIndex();
1679 1679
1680 int i = 0; 1680 int i = 0;
1681 foreach (Action action in actions) 1681 foreach (Action action in actions)
1682 { 1682 {
@@ -1685,7 +1685,7 @@ namespace Amib.Threading
1685 workItemsGroup.QueueWorkItem(() => { act(); Interlocked.CompareExchange(ref choiceIndex._index, value, -1); anActionCompleted.Set(); }); 1685 workItemsGroup.QueueWorkItem(() => { act(); Interlocked.CompareExchange(ref choiceIndex._index, value, -1); anActionCompleted.Set(); });
1686 ++i; 1686 ++i;
1687 } 1687 }
1688 workItemsGroup.Start(); 1688 workItemsGroup.Start();
1689 anActionCompleted.WaitOne(); 1689 anActionCompleted.WaitOne();
1690 anActionCompleted.Dispose(); 1690 anActionCompleted.Dispose();
1691 1691
@@ -1698,7 +1698,7 @@ namespace Amib.Threading
1698 /// </summary> 1698 /// </summary>
1699 /// <param name="actions">Actions to execute</param> 1699 /// <param name="actions">Actions to execute</param>
1700 public int Choice(params Action[] actions) 1700 public int Choice(params Action[] actions)
1701 { 1701 {
1702 return Choice((IEnumerable<Action>)actions); 1702 return Choice((IEnumerable<Action>)actions);
1703 } 1703 }
1704 1704
@@ -1732,6 +1732,6 @@ namespace Amib.Threading
1732 Pipe(pipeState, (IEnumerable<Action<T>>)actions); 1732 Pipe(pipeState, (IEnumerable<Action<T>>)actions);
1733 } 1733 }
1734 #endregion 1734 #endregion
1735 } 1735 }
1736 #endregion 1736 #endregion
1737} 1737}
diff --git a/ThirdParty/SmartThreadPool/WIGStartInfo.cs b/ThirdParty/SmartThreadPool/WIGStartInfo.cs
index 8af195b..756ac1f 100644
--- a/ThirdParty/SmartThreadPool/WIGStartInfo.cs
+++ b/ThirdParty/SmartThreadPool/WIGStartInfo.cs
@@ -2,11 +2,11 @@ using System;
2 2
3namespace Amib.Threading 3namespace Amib.Threading
4{ 4{
5 /// <summary> 5 /// <summary>
6 /// Summary description for WIGStartInfo. 6 /// Summary description for WIGStartInfo.
7 /// </summary> 7 /// </summary>
8 public class WIGStartInfo 8 public class WIGStartInfo
9 { 9 {
10 private bool _useCallerCallContext; 10 private bool _useCallerCallContext;
11 private bool _useCallerHttpContext; 11 private bool _useCallerHttpContext;
12 private bool _disposeOfStateObjects; 12 private bool _disposeOfStateObjects;
@@ -18,10 +18,10 @@ namespace Amib.Threading
18 18
19 protected bool _readOnly; 19 protected bool _readOnly;
20 20
21 public WIGStartInfo() 21 public WIGStartInfo()
22 { 22 {
23 _fillStateWithArgs = SmartThreadPool.DefaultFillStateWithArgs; 23 _fillStateWithArgs = SmartThreadPool.DefaultFillStateWithArgs;
24 _workItemPriority = SmartThreadPool.DefaultWorkItemPriority; 24 _workItemPriority = SmartThreadPool.DefaultWorkItemPriority;
25 _startSuspended = SmartThreadPool.DefaultStartSuspended; 25 _startSuspended = SmartThreadPool.DefaultStartSuspended;
26 _postExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; 26 _postExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback;
27 _callToPostExecute = SmartThreadPool.DefaultCallToPostExecute; 27 _callToPostExecute = SmartThreadPool.DefaultCallToPostExecute;
@@ -30,7 +30,7 @@ namespace Amib.Threading
30 _useCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; 30 _useCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext;
31 } 31 }
32 32
33 public WIGStartInfo(WIGStartInfo wigStartInfo) 33 public WIGStartInfo(WIGStartInfo wigStartInfo)
34 { 34 {
35 _useCallerCallContext = wigStartInfo.UseCallerCallContext; 35 _useCallerCallContext = wigStartInfo.UseCallerCallContext;
36 _useCallerHttpContext = wigStartInfo.UseCallerHttpContext; 36 _useCallerHttpContext = wigStartInfo.UseCallerHttpContext;
@@ -50,122 +50,122 @@ namespace Amib.Threading
50 } 50 }
51 } 51 }
52 52
53 /// <summary> 53 /// <summary>
54 /// Get/Set if to use the caller's security context 54 /// Get/Set if to use the caller's security context
55 /// </summary> 55 /// </summary>
56 public virtual bool UseCallerCallContext 56 public virtual bool UseCallerCallContext
57 { 57 {
58 get { return _useCallerCallContext; } 58 get { return _useCallerCallContext; }
59 set 59 set
60 { 60 {
61 ThrowIfReadOnly(); 61 ThrowIfReadOnly();
62 _useCallerCallContext = value; 62 _useCallerCallContext = value;
63 } 63 }
64 } 64 }
65 65
66 66
67 /// <summary> 67 /// <summary>
68 /// Get/Set if to use the caller's HTTP context 68 /// Get/Set if to use the caller's HTTP context
69 /// </summary> 69 /// </summary>
70 public virtual bool UseCallerHttpContext 70 public virtual bool UseCallerHttpContext
71 { 71 {
72 get { return _useCallerHttpContext; } 72 get { return _useCallerHttpContext; }
73 set 73 set
74 { 74 {
75 ThrowIfReadOnly(); 75 ThrowIfReadOnly();
76 _useCallerHttpContext = value; 76 _useCallerHttpContext = value;
77 } 77 }
78 } 78 }
79 79
80 80
81 /// <summary> 81 /// <summary>
82 /// Get/Set if to dispose of the state object of a work item 82 /// Get/Set if to dispose of the state object of a work item
83 /// </summary> 83 /// </summary>
84 public virtual bool DisposeOfStateObjects 84 public virtual bool DisposeOfStateObjects
85 { 85 {
86 get { return _disposeOfStateObjects; } 86 get { return _disposeOfStateObjects; }
87 set 87 set
88 { 88 {
89 ThrowIfReadOnly(); 89 ThrowIfReadOnly();
90 _disposeOfStateObjects = value; 90 _disposeOfStateObjects = value;
91 } 91 }
92 } 92 }
93 93
94 94
95 /// <summary> 95 /// <summary>
96 /// Get/Set the run the post execute options 96 /// Get/Set the run the post execute options
97 /// </summary> 97 /// </summary>
98 public virtual CallToPostExecute CallToPostExecute 98 public virtual CallToPostExecute CallToPostExecute
99 { 99 {
100 get { return _callToPostExecute; } 100 get { return _callToPostExecute; }
101 set 101 set
102 { 102 {
103 ThrowIfReadOnly(); 103 ThrowIfReadOnly();
104 _callToPostExecute = value; 104 _callToPostExecute = value;
105 } 105 }
106 } 106 }
107 107
108 108
109 /// <summary> 109 /// <summary>
110 /// Get/Set the default post execute callback 110 /// Get/Set the default post execute callback
111 /// </summary> 111 /// </summary>
112 public virtual PostExecuteWorkItemCallback PostExecuteWorkItemCallback 112 public virtual PostExecuteWorkItemCallback PostExecuteWorkItemCallback
113 { 113 {
114 get { return _postExecuteWorkItemCallback; } 114 get { return _postExecuteWorkItemCallback; }
115 set 115 set
116 { 116 {
117 ThrowIfReadOnly(); 117 ThrowIfReadOnly();
118 _postExecuteWorkItemCallback = value; 118 _postExecuteWorkItemCallback = value;
119 } 119 }
120 } 120 }
121 121
122 122
123 /// <summary> 123 /// <summary>
124 /// Get/Set if the work items execution should be suspended until the Start() 124 /// Get/Set if the work items execution should be suspended until the Start()
125 /// method is called. 125 /// method is called.
126 /// </summary> 126 /// </summary>
127 public virtual bool StartSuspended 127 public virtual bool StartSuspended
128 { 128 {
129 get { return _startSuspended; } 129 get { return _startSuspended; }
130 set 130 set
131 { 131 {
132 ThrowIfReadOnly(); 132 ThrowIfReadOnly();
133 _startSuspended = value; 133 _startSuspended = value;
134 } 134 }
135 } 135 }
136 136
137 137
138 /// <summary> 138 /// <summary>
139 /// Get/Set the default priority that a work item gets when it is enqueued 139 /// Get/Set the default priority that a work item gets when it is enqueued
140 /// </summary> 140 /// </summary>
141 public virtual WorkItemPriority WorkItemPriority 141 public virtual WorkItemPriority WorkItemPriority
142 { 142 {
143 get { return _workItemPriority; } 143 get { return _workItemPriority; }
144 set { _workItemPriority = value; } 144 set { _workItemPriority = value; }
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 /// Get/Set the if QueueWorkItem of Action&lt;...&gt;/Func&lt;...&gt; fill the 148 /// Get/Set the if QueueWorkItem of Action&lt;...&gt;/Func&lt;...&gt; fill the
149 /// arguments as an object array into the state of the work item. 149 /// arguments as an object array into the state of the work item.
150 /// The arguments can be access later by IWorkItemResult.State. 150 /// The arguments can be access later by IWorkItemResult.State.
151 /// </summary> 151 /// </summary>
152 public virtual bool FillStateWithArgs 152 public virtual bool FillStateWithArgs
153 { 153 {
154 get { return _fillStateWithArgs; } 154 get { return _fillStateWithArgs; }
155 set 155 set
156 { 156 {
157 ThrowIfReadOnly(); 157 ThrowIfReadOnly();
158 _fillStateWithArgs = value; 158 _fillStateWithArgs = value;
159 } 159 }
160 } 160 }
161 161
162 /// <summary> 162 /// <summary>
163 /// Get a readonly version of this WIGStartInfo 163 /// Get a readonly version of this WIGStartInfo
164 /// </summary> 164 /// </summary>
165 /// <returns>Returns a readonly reference to this WIGStartInfoRO</returns> 165 /// <returns>Returns a readonly reference to this WIGStartInfoRO</returns>
166 public WIGStartInfo AsReadOnly() 166 public WIGStartInfo AsReadOnly()
167 { 167 {
168 return new WIGStartInfo(this) { _readOnly = true }; 168 return new WIGStartInfo(this) { _readOnly = true };
169 } 169 }
170 } 170 }
171} 171}
diff --git a/ThirdParty/SmartThreadPool/WorkItem.cs b/ThirdParty/SmartThreadPool/WorkItem.cs
index 185f10c..edb8ac0 100644
--- a/ThirdParty/SmartThreadPool/WorkItem.cs
+++ b/ThirdParty/SmartThreadPool/WorkItem.cs
@@ -88,7 +88,7 @@ namespace Amib.Threading.Internal
88 private ManualResetEvent _workItemCompleted; 88 private ManualResetEvent _workItemCompleted;
89 89
90 /// <summary> 90 /// <summary>
91 /// A reference count to the _workItemCompleted. 91 /// A reference count to the _workItemCompleted.
92 /// When it reaches to zero _workItemCompleted is Closed 92 /// When it reaches to zero _workItemCompleted is Closed
93 /// </summary> 93 /// </summary>
94 private int _workItemCompletedRefCount; 94 private int _workItemCompletedRefCount;
@@ -114,13 +114,13 @@ namespace Amib.Threading.Internal
114 private event WorkItemStateCallback _workItemCompletedEvent; 114 private event WorkItemStateCallback _workItemCompletedEvent;
115 115
116 /// <summary> 116 /// <summary>
117 /// A reference to an object that indicates whatever the 117 /// A reference to an object that indicates whatever the
118 /// WorkItemsGroup has been canceled 118 /// WorkItemsGroup has been canceled
119 /// </summary> 119 /// </summary>
120 private CanceledWorkItemsGroup _canceledWorkItemsGroup = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup; 120 private CanceledWorkItemsGroup _canceledWorkItemsGroup = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup;
121 121
122 /// <summary> 122 /// <summary>
123 /// A reference to an object that indicates whatever the 123 /// A reference to an object that indicates whatever the
124 /// SmartThreadPool has been canceled 124 /// SmartThreadPool has been canceled
125 /// </summary> 125 /// </summary>
126 private CanceledWorkItemsGroup _canceledSmartThreadPool = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup; 126 private CanceledWorkItemsGroup _canceledSmartThreadPool = CanceledWorkItemsGroup.NotCanceledWorkItemsGroup;
@@ -197,7 +197,7 @@ namespace Amib.Threading.Internal
197 /// <param name="workItemInfo">The WorkItemInfo of te workitem</param> 197 /// <param name="workItemInfo">The WorkItemInfo of te workitem</param>
198 /// <param name="callback">Callback delegate for the callback.</param> 198 /// <param name="callback">Callback delegate for the callback.</param>
199 /// <param name="state">State with which to call the callback delegate.</param> 199 /// <param name="state">State with which to call the callback delegate.</param>
200 /// 200 ///
201 /// We assume that the WorkItem object is created within the thread 201 /// We assume that the WorkItem object is created within the thread
202 /// that meant to run the callback 202 /// that meant to run the callback
203 public WorkItem( 203 public WorkItem(
@@ -402,7 +402,7 @@ namespace Amib.Threading.Internal
402 { 402 {
403 tae.GetHashCode(); 403 tae.GetHashCode();
404 // Check if the work item was cancelled 404 // Check if the work item was cancelled
405 // If we got a ThreadAbortException and the STP is not shutting down, it means the 405 // If we got a ThreadAbortException and the STP is not shutting down, it means the
406 // work items was cancelled. 406 // work items was cancelled.
407 if (!SmartThreadPool.CurrentThreadEntry.AssociatedSmartThreadPool.IsShuttingdown) 407 if (!SmartThreadPool.CurrentThreadEntry.AssociatedSmartThreadPool.IsShuttingdown)
408 { 408 {
@@ -471,7 +471,7 @@ namespace Amib.Threading.Internal
471 /// <param name="waitableResults">Array of work item result objects</param> 471 /// <param name="waitableResults">Array of work item result objects</param>
472 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 472 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
473 /// <param name="exitContext"> 473 /// <param name="exitContext">
474 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 474 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
475 /// </param> 475 /// </param>
476 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 476 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
477 /// <returns> 477 /// <returns>
@@ -553,7 +553,7 @@ namespace Amib.Threading.Internal
553 /// <param name="waitableResults">Array of work item result objects</param> 553 /// <param name="waitableResults">Array of work item result objects</param>
554 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param> 554 /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.</param>
555 /// <param name="exitContext"> 555 /// <param name="exitContext">
556 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false. 556 /// true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
557 /// </param> 557 /// </param>
558 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param> 558 /// <param name="cancelWaitHandle">A cancel wait handle to interrupt the wait if needed</param>
559 /// <returns> 559 /// <returns>
@@ -734,7 +734,7 @@ namespace Amib.Threading.Internal
734 // so it already signaled its completion. 734 // so it already signaled its completion.
735 //signalComplete = true; 735 //signalComplete = true;
736 } 736 }
737 } 737 }
738 success = true; 738 success = true;
739 break; 739 break;
740 case WorkItemState.Completed: 740 case WorkItemState.Completed:
@@ -856,7 +856,7 @@ namespace Amib.Threading.Internal
856 { 856 {
857 case 0: 857 case 0:
858 // The work item signaled 858 // The work item signaled
859 // Note that the signal could be also as a result of canceling the 859 // Note that the signal could be also as a result of canceling the
860 // work item (not the get result) 860 // work item (not the get result)
861 break; 861 break;
862 case 1: 862 case 1:
@@ -884,7 +884,7 @@ namespace Amib.Threading.Internal
884 } 884 }
885 885
886 /// <summary> 886 /// <summary>
887 /// A wait handle to wait for completion, cancel, or timeout 887 /// A wait handle to wait for completion, cancel, or timeout
888 /// </summary> 888 /// </summary>
889 private WaitHandle GetWaitHandle() 889 private WaitHandle GetWaitHandle()
890 { 890 {
diff --git a/ThirdParty/SmartThreadPool/WorkItemFactory.cs b/ThirdParty/SmartThreadPool/WorkItemFactory.cs
index 16ccd81..471eb20 100644
--- a/ThirdParty/SmartThreadPool/WorkItemFactory.cs
+++ b/ThirdParty/SmartThreadPool/WorkItemFactory.cs
@@ -2,146 +2,146 @@ using System;
2 2
3namespace Amib.Threading.Internal 3namespace Amib.Threading.Internal
4{ 4{
5 #region WorkItemFactory class 5 #region WorkItemFactory class
6 6
7 public class WorkItemFactory 7 public class WorkItemFactory
8 { 8 {
9 /// <summary> 9 /// <summary>
10 /// Create a new work item 10 /// Create a new work item
11 /// </summary> 11 /// </summary>
12 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param>
13 /// <param name="wigStartInfo">Work item group start information</param>
14 /// <param name="callback">A callback to execute</param>
15 /// <returns>Returns a work item</returns>
16 public static WorkItem CreateWorkItem(
17 IWorkItemsGroup workItemsGroup,
18 WIGStartInfo wigStartInfo,
19 WorkItemCallback callback)
20 {
21 return CreateWorkItem(workItemsGroup, wigStartInfo, callback, null);
22 }
23
24 /// <summary>
25 /// Create a new work item
26 /// </summary>
27 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param> 12 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param>
28 /// <param name="wigStartInfo">Work item group start information</param> 13 /// <param name="wigStartInfo">Work item group start information</param>
29 /// <param name="callback">A callback to execute</param> 14 /// <param name="callback">A callback to execute</param>
30 /// <param name="workItemPriority">The priority of the work item</param> 15 /// <returns>Returns a work item</returns>
31 /// <returns>Returns a work item</returns> 16 public static WorkItem CreateWorkItem(
32 public static WorkItem CreateWorkItem( 17 IWorkItemsGroup workItemsGroup,
33 IWorkItemsGroup workItemsGroup, 18 WIGStartInfo wigStartInfo,
34 WIGStartInfo wigStartInfo, 19 WorkItemCallback callback)
35 WorkItemCallback callback, 20 {
36 WorkItemPriority workItemPriority) 21 return CreateWorkItem(workItemsGroup, wigStartInfo, callback, null);
37 { 22 }
38 return CreateWorkItem(workItemsGroup, wigStartInfo, callback, null, workItemPriority); 23
39 } 24 /// <summary>
40 25 /// Create a new work item
41 /// <summary> 26 /// </summary>
42 /// Create a new work item
43 /// </summary>
44 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param> 27 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param>
45 /// <param name="wigStartInfo">Work item group start information</param> 28 /// <param name="wigStartInfo">Work item group start information</param>
46 /// <param name="workItemInfo">Work item info</param> 29 /// <param name="callback">A callback to execute</param>
47 /// <param name="callback">A callback to execute</param> 30 /// <param name="workItemPriority">The priority of the work item</param>
48 /// <returns>Returns a work item</returns> 31 /// <returns>Returns a work item</returns>
49 public static WorkItem CreateWorkItem( 32 public static WorkItem CreateWorkItem(
50 IWorkItemsGroup workItemsGroup, 33 IWorkItemsGroup workItemsGroup,
51 WIGStartInfo wigStartInfo, 34 WIGStartInfo wigStartInfo,
52 WorkItemInfo workItemInfo, 35 WorkItemCallback callback,
53 WorkItemCallback callback) 36 WorkItemPriority workItemPriority)
54 { 37 {
55 return CreateWorkItem( 38 return CreateWorkItem(workItemsGroup, wigStartInfo, callback, null, workItemPriority);
56 workItemsGroup, 39 }
57 wigStartInfo, 40
58 workItemInfo, 41 /// <summary>
59 callback, 42 /// Create a new work item
60 null); 43 /// </summary>
61 }
62
63 /// <summary>
64 /// Create a new work item
65 /// </summary>
66 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param> 44 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param>
67 /// <param name="wigStartInfo">Work item group start information</param> 45 /// <param name="wigStartInfo">Work item group start information</param>
68 /// <param name="callback">A callback to execute</param> 46 /// <param name="workItemInfo">Work item info</param>
69 /// <param name="state"> 47 /// <param name="callback">A callback to execute</param>
70 /// The context object of the work item. Used for passing arguments to the work item. 48 /// <returns>Returns a work item</returns>
71 /// </param> 49 public static WorkItem CreateWorkItem(
72 /// <returns>Returns a work item</returns> 50 IWorkItemsGroup workItemsGroup,
73 public static WorkItem CreateWorkItem( 51 WIGStartInfo wigStartInfo,
74 IWorkItemsGroup workItemsGroup, 52 WorkItemInfo workItemInfo,
75 WIGStartInfo wigStartInfo, 53 WorkItemCallback callback)
76 WorkItemCallback callback, 54 {
77 object state) 55 return CreateWorkItem(
78 { 56 workItemsGroup,
79 ValidateCallback(callback); 57 wigStartInfo,
80 58 workItemInfo,
81 WorkItemInfo workItemInfo = new WorkItemInfo(); 59 callback,
82 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext; 60 null);
83 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext; 61 }
84 workItemInfo.PostExecuteWorkItemCallback = wigStartInfo.PostExecuteWorkItemCallback; 62
85 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute; 63 /// <summary>
86 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects; 64 /// Create a new work item
65 /// </summary>
66 /// <param name="workItemsGroup">The WorkItemsGroup of this workitem</param>
67 /// <param name="wigStartInfo">Work item group start information</param>
68 /// <param name="callback">A callback to execute</param>
69 /// <param name="state">
70 /// The context object of the work item. Used for passing arguments to the work item.
71 /// </param>
72 /// <returns>Returns a work item</returns>
73 public static WorkItem CreateWorkItem(
74 IWorkItemsGroup workItemsGroup,
75 WIGStartInfo wigStartInfo,
76 WorkItemCallback callback,
77 object state)
78 {
79 ValidateCallback(callback);
80
81 WorkItemInfo workItemInfo = new WorkItemInfo();
82 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
83 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
84 workItemInfo.PostExecuteWorkItemCallback = wigStartInfo.PostExecuteWorkItemCallback;
85 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute;
86 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
87 workItemInfo.WorkItemPriority = wigStartInfo.WorkItemPriority; 87 workItemInfo.WorkItemPriority = wigStartInfo.WorkItemPriority;
88 88
89 WorkItem workItem = new WorkItem( 89 WorkItem workItem = new WorkItem(
90 workItemsGroup, 90 workItemsGroup,
91 workItemInfo, 91 workItemInfo,
92 callback, 92 callback,
93 state); 93 state);
94 return workItem; 94 return workItem;
95 } 95 }
96 96
97 /// <summary> 97 /// <summary>
98 /// Create a new work item 98 /// Create a new work item
99 /// </summary> 99 /// </summary>
100 /// <param name="workItemsGroup">The work items group</param>
101 /// <param name="wigStartInfo">Work item group start information</param>
102 /// <param name="callback">A callback to execute</param>
103 /// <param name="state">
104 /// The context object of the work item. Used for passing arguments to the work item.
105 /// </param>
106 /// <param name="workItemPriority">The work item priority</param>
107 /// <returns>Returns a work item</returns>
108 public static WorkItem CreateWorkItem(
109 IWorkItemsGroup workItemsGroup,
110 WIGStartInfo wigStartInfo,
111 WorkItemCallback callback,
112 object state,
113 WorkItemPriority workItemPriority)
114 {
115 ValidateCallback(callback);
116
117 WorkItemInfo workItemInfo = new WorkItemInfo();
118 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
119 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
120 workItemInfo.PostExecuteWorkItemCallback = wigStartInfo.PostExecuteWorkItemCallback;
121 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute;
122 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
123 workItemInfo.WorkItemPriority = workItemPriority;
124
125 WorkItem workItem = new WorkItem(
126 workItemsGroup,
127 workItemInfo,
128 callback,
129 state);
130
131 return workItem;
132 }
133
134 /// <summary>
135 /// Create a new work item
136 /// </summary>
137 /// <param name="workItemsGroup">The work items group</param> 100 /// <param name="workItemsGroup">The work items group</param>
138 /// <param name="wigStartInfo">Work item group start information</param> 101 /// <param name="wigStartInfo">Work item group start information</param>
139 /// <param name="workItemInfo">Work item information</param> 102 /// <param name="callback">A callback to execute</param>
140 /// <param name="callback">A callback to execute</param> 103 /// <param name="state">
141 /// <param name="state"> 104 /// The context object of the work item. Used for passing arguments to the work item.
142 /// The context object of the work item. Used for passing arguments to the work item. 105 /// </param>
143 /// </param> 106 /// <param name="workItemPriority">The work item priority</param>
144 /// <returns>Returns a work item</returns> 107 /// <returns>Returns a work item</returns>
108 public static WorkItem CreateWorkItem(
109 IWorkItemsGroup workItemsGroup,
110 WIGStartInfo wigStartInfo,
111 WorkItemCallback callback,
112 object state,
113 WorkItemPriority workItemPriority)
114 {
115 ValidateCallback(callback);
116
117 WorkItemInfo workItemInfo = new WorkItemInfo();
118 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
119 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
120 workItemInfo.PostExecuteWorkItemCallback = wigStartInfo.PostExecuteWorkItemCallback;
121 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute;
122 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
123 workItemInfo.WorkItemPriority = workItemPriority;
124
125 WorkItem workItem = new WorkItem(
126 workItemsGroup,
127 workItemInfo,
128 callback,
129 state);
130
131 return workItem;
132 }
133
134 /// <summary>
135 /// Create a new work item
136 /// </summary>
137 /// <param name="workItemsGroup">The work items group</param>
138 /// <param name="wigStartInfo">Work item group start information</param>
139 /// <param name="workItemInfo">Work item information</param>
140 /// <param name="callback">A callback to execute</param>
141 /// <param name="state">
142 /// The context object of the work item. Used for passing arguments to the work item.
143 /// </param>
144 /// <returns>Returns a work item</returns>
145 public static WorkItem CreateWorkItem( 145 public static WorkItem CreateWorkItem(
146 IWorkItemsGroup workItemsGroup, 146 IWorkItemsGroup workItemsGroup,
147 WIGStartInfo wigStartInfo, 147 WIGStartInfo wigStartInfo,
@@ -161,183 +161,183 @@ namespace Amib.Threading.Internal
161 return workItem; 161 return workItem;
162 } 162 }
163 163
164 /// <summary> 164 /// <summary>
165 /// Create a new work item 165 /// Create a new work item
166 /// </summary> 166 /// </summary>
167 /// <param name="workItemsGroup">The work items group</param> 167 /// <param name="workItemsGroup">The work items group</param>
168 /// <param name="wigStartInfo">Work item group start information</param> 168 /// <param name="wigStartInfo">Work item group start information</param>
169 /// <param name="callback">A callback to execute</param> 169 /// <param name="callback">A callback to execute</param>
170 /// <param name="state"> 170 /// <param name="state">
171 /// The context object of the work item. Used for passing arguments to the work item. 171 /// The context object of the work item. Used for passing arguments to the work item.
172 /// </param> 172 /// </param>
173 /// <param name="postExecuteWorkItemCallback"> 173 /// <param name="postExecuteWorkItemCallback">
174 /// A delegate to call after the callback completion 174 /// A delegate to call after the callback completion
175 /// </param> 175 /// </param>
176 /// <returns>Returns a work item</returns> 176 /// <returns>Returns a work item</returns>
177 public static WorkItem CreateWorkItem( 177 public static WorkItem CreateWorkItem(
178 IWorkItemsGroup workItemsGroup, 178 IWorkItemsGroup workItemsGroup,
179 WIGStartInfo wigStartInfo, 179 WIGStartInfo wigStartInfo,
180 WorkItemCallback callback, 180 WorkItemCallback callback,
181 object state, 181 object state,
182 PostExecuteWorkItemCallback postExecuteWorkItemCallback) 182 PostExecuteWorkItemCallback postExecuteWorkItemCallback)
183 { 183 {
184 ValidateCallback(callback); 184 ValidateCallback(callback);
185 ValidateCallback(postExecuteWorkItemCallback); 185 ValidateCallback(postExecuteWorkItemCallback);
186 186
187 WorkItemInfo workItemInfo = new WorkItemInfo(); 187 WorkItemInfo workItemInfo = new WorkItemInfo();
188 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext; 188 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
189 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext; 189 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
190 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback; 190 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback;
191 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute; 191 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute;
192 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects; 192 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
193 workItemInfo.WorkItemPriority = wigStartInfo.WorkItemPriority; 193 workItemInfo.WorkItemPriority = wigStartInfo.WorkItemPriority;
194 194
195 WorkItem workItem = new WorkItem( 195 WorkItem workItem = new WorkItem(
196 workItemsGroup, 196 workItemsGroup,
197 workItemInfo, 197 workItemInfo,
198 callback, 198 callback,
199 state); 199 state);
200 200
201 return workItem; 201 return workItem;
202 } 202 }
203 203
204 /// <summary> 204 /// <summary>
205 /// Create a new work item 205 /// Create a new work item
206 /// </summary> 206 /// </summary>
207 /// <param name="workItemsGroup">The work items group</param> 207 /// <param name="workItemsGroup">The work items group</param>
208 /// <param name="wigStartInfo">Work item group start information</param> 208 /// <param name="wigStartInfo">Work item group start information</param>
209 /// <param name="callback">A callback to execute</param> 209 /// <param name="callback">A callback to execute</param>
210 /// <param name="state"> 210 /// <param name="state">
211 /// The context object of the work item. Used for passing arguments to the work item. 211 /// The context object of the work item. Used for passing arguments to the work item.
212 /// </param> 212 /// </param>
213 /// <param name="postExecuteWorkItemCallback"> 213 /// <param name="postExecuteWorkItemCallback">
214 /// A delegate to call after the callback completion 214 /// A delegate to call after the callback completion
215 /// </param> 215 /// </param>
216 /// <param name="workItemPriority">The work item priority</param> 216 /// <param name="workItemPriority">The work item priority</param>
217 /// <returns>Returns a work item</returns> 217 /// <returns>Returns a work item</returns>
218 public static WorkItem CreateWorkItem( 218 public static WorkItem CreateWorkItem(
219 IWorkItemsGroup workItemsGroup, 219 IWorkItemsGroup workItemsGroup,
220 WIGStartInfo wigStartInfo, 220 WIGStartInfo wigStartInfo,
221 WorkItemCallback callback, 221 WorkItemCallback callback,
222 object state, 222 object state,
223 PostExecuteWorkItemCallback postExecuteWorkItemCallback, 223 PostExecuteWorkItemCallback postExecuteWorkItemCallback,
224 WorkItemPriority workItemPriority) 224 WorkItemPriority workItemPriority)
225 { 225 {
226 ValidateCallback(callback); 226 ValidateCallback(callback);
227 ValidateCallback(postExecuteWorkItemCallback); 227 ValidateCallback(postExecuteWorkItemCallback);
228 228
229 WorkItemInfo workItemInfo = new WorkItemInfo(); 229 WorkItemInfo workItemInfo = new WorkItemInfo();
230 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext; 230 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
231 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext; 231 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
232 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback; 232 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback;
233 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute; 233 workItemInfo.CallToPostExecute = wigStartInfo.CallToPostExecute;
234 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects; 234 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
235 workItemInfo.WorkItemPriority = workItemPriority; 235 workItemInfo.WorkItemPriority = workItemPriority;
236 236
237 WorkItem workItem = new WorkItem( 237 WorkItem workItem = new WorkItem(
238 workItemsGroup, 238 workItemsGroup,
239 workItemInfo, 239 workItemInfo,
240 callback, 240 callback,
241 state); 241 state);
242 242
243 return workItem; 243 return workItem;
244 } 244 }
245 245
246 /// <summary> 246 /// <summary>
247 /// Create a new work item 247 /// Create a new work item
248 /// </summary> 248 /// </summary>
249 /// <param name="workItemsGroup">The work items group</param> 249 /// <param name="workItemsGroup">The work items group</param>
250 /// <param name="wigStartInfo">Work item group start information</param> 250 /// <param name="wigStartInfo">Work item group start information</param>
251 /// <param name="callback">A callback to execute</param> 251 /// <param name="callback">A callback to execute</param>
252 /// <param name="state"> 252 /// <param name="state">
253 /// The context object of the work item. Used for passing arguments to the work item. 253 /// The context object of the work item. Used for passing arguments to the work item.
254 /// </param> 254 /// </param>
255 /// <param name="postExecuteWorkItemCallback"> 255 /// <param name="postExecuteWorkItemCallback">
256 /// A delegate to call after the callback completion 256 /// A delegate to call after the callback completion
257 /// </param> 257 /// </param>
258 /// <param name="callToPostExecute">Indicates on which cases to call to the post execute callback</param> 258 /// <param name="callToPostExecute">Indicates on which cases to call to the post execute callback</param>
259 /// <returns>Returns a work item</returns> 259 /// <returns>Returns a work item</returns>
260 public static WorkItem CreateWorkItem( 260 public static WorkItem CreateWorkItem(
261 IWorkItemsGroup workItemsGroup, 261 IWorkItemsGroup workItemsGroup,
262 WIGStartInfo wigStartInfo, 262 WIGStartInfo wigStartInfo,
263 WorkItemCallback callback, 263 WorkItemCallback callback,
264 object state, 264 object state,
265 PostExecuteWorkItemCallback postExecuteWorkItemCallback, 265 PostExecuteWorkItemCallback postExecuteWorkItemCallback,
266 CallToPostExecute callToPostExecute) 266 CallToPostExecute callToPostExecute)
267 { 267 {
268 ValidateCallback(callback); 268 ValidateCallback(callback);
269 ValidateCallback(postExecuteWorkItemCallback); 269 ValidateCallback(postExecuteWorkItemCallback);
270 270
271 WorkItemInfo workItemInfo = new WorkItemInfo(); 271 WorkItemInfo workItemInfo = new WorkItemInfo();
272 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext; 272 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
273 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext; 273 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
274 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback; 274 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback;
275 workItemInfo.CallToPostExecute = callToPostExecute; 275 workItemInfo.CallToPostExecute = callToPostExecute;
276 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects; 276 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
277 workItemInfo.WorkItemPriority = wigStartInfo.WorkItemPriority; 277 workItemInfo.WorkItemPriority = wigStartInfo.WorkItemPriority;
278 278
279 WorkItem workItem = new WorkItem( 279 WorkItem workItem = new WorkItem(
280 workItemsGroup, 280 workItemsGroup,
281 workItemInfo, 281 workItemInfo,
282 callback, 282 callback,
283 state); 283 state);
284 284
285 return workItem; 285 return workItem;
286 } 286 }
287 287
288 /// <summary> 288 /// <summary>
289 /// Create a new work item 289 /// Create a new work item
290 /// </summary> 290 /// </summary>
291 /// <param name="workItemsGroup">The work items group</param> 291 /// <param name="workItemsGroup">The work items group</param>
292 /// <param name="wigStartInfo">Work item group start information</param> 292 /// <param name="wigStartInfo">Work item group start information</param>
293 /// <param name="callback">A callback to execute</param> 293 /// <param name="callback">A callback to execute</param>
294 /// <param name="state"> 294 /// <param name="state">
295 /// The context object of the work item. Used for passing arguments to the work item. 295 /// The context object of the work item. Used for passing arguments to the work item.
296 /// </param> 296 /// </param>
297 /// <param name="postExecuteWorkItemCallback"> 297 /// <param name="postExecuteWorkItemCallback">
298 /// A delegate to call after the callback completion 298 /// A delegate to call after the callback completion
299 /// </param> 299 /// </param>
300 /// <param name="callToPostExecute">Indicates on which cases to call to the post execute callback</param> 300 /// <param name="callToPostExecute">Indicates on which cases to call to the post execute callback</param>
301 /// <param name="workItemPriority">The work item priority</param> 301 /// <param name="workItemPriority">The work item priority</param>
302 /// <returns>Returns a work item</returns> 302 /// <returns>Returns a work item</returns>
303 public static WorkItem CreateWorkItem( 303 public static WorkItem CreateWorkItem(
304 IWorkItemsGroup workItemsGroup, 304 IWorkItemsGroup workItemsGroup,
305 WIGStartInfo wigStartInfo, 305 WIGStartInfo wigStartInfo,
306 WorkItemCallback callback, 306 WorkItemCallback callback,
307 object state, 307 object state,
308 PostExecuteWorkItemCallback postExecuteWorkItemCallback, 308 PostExecuteWorkItemCallback postExecuteWorkItemCallback,
309 CallToPostExecute callToPostExecute, 309 CallToPostExecute callToPostExecute,
310 WorkItemPriority workItemPriority) 310 WorkItemPriority workItemPriority)
311 { 311 {
312 312
313 ValidateCallback(callback); 313 ValidateCallback(callback);
314 ValidateCallback(postExecuteWorkItemCallback); 314 ValidateCallback(postExecuteWorkItemCallback);
315 315
316 WorkItemInfo workItemInfo = new WorkItemInfo(); 316 WorkItemInfo workItemInfo = new WorkItemInfo();
317 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext; 317 workItemInfo.UseCallerCallContext = wigStartInfo.UseCallerCallContext;
318 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext; 318 workItemInfo.UseCallerHttpContext = wigStartInfo.UseCallerHttpContext;
319 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback; 319 workItemInfo.PostExecuteWorkItemCallback = postExecuteWorkItemCallback;
320 workItemInfo.CallToPostExecute = callToPostExecute; 320 workItemInfo.CallToPostExecute = callToPostExecute;
321 workItemInfo.WorkItemPriority = workItemPriority; 321 workItemInfo.WorkItemPriority = workItemPriority;
322 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects; 322 workItemInfo.DisposeOfStateObjects = wigStartInfo.DisposeOfStateObjects;
323 323
324 WorkItem workItem = new WorkItem( 324 WorkItem workItem = new WorkItem(
325 workItemsGroup, 325 workItemsGroup,
326 workItemInfo, 326 workItemInfo,
327 callback, 327 callback,
328 state); 328 state);
329 329
330 return workItem; 330 return workItem;
331 } 331 }
332 332
333 private static void ValidateCallback(Delegate callback) 333 private static void ValidateCallback(Delegate callback)
334 { 334 {
335 if (callback != null && callback.GetInvocationList().Length > 1) 335 if (callback != null && callback.GetInvocationList().Length > 1)
336 { 336 {
337 throw new NotSupportedException("SmartThreadPool doesn't support delegates chains"); 337 throw new NotSupportedException("SmartThreadPool doesn't support delegates chains");
338 } 338 }
339 } 339 }
340 } 340 }
341 341
342 #endregion 342 #endregion
343} 343}
diff --git a/ThirdParty/SmartThreadPool/WorkItemInfo.cs b/ThirdParty/SmartThreadPool/WorkItemInfo.cs
index 0d7fc85..5be82a2 100644
--- a/ThirdParty/SmartThreadPool/WorkItemInfo.cs
+++ b/ThirdParty/SmartThreadPool/WorkItemInfo.cs
@@ -1,69 +1,69 @@
1namespace Amib.Threading 1namespace Amib.Threading
2{ 2{
3 #region WorkItemInfo class 3 #region WorkItemInfo class
4 4
5 /// <summary> 5 /// <summary>
6 /// Summary description for WorkItemInfo. 6 /// Summary description for WorkItemInfo.
7 /// </summary> 7 /// </summary>
8 public class WorkItemInfo 8 public class WorkItemInfo
9 { 9 {
10 public WorkItemInfo() 10 public WorkItemInfo()
11 { 11 {
12 UseCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; 12 UseCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext;
13 UseCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext; 13 UseCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext;
14 DisposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects; 14 DisposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects;
15 CallToPostExecute = SmartThreadPool.DefaultCallToPostExecute; 15 CallToPostExecute = SmartThreadPool.DefaultCallToPostExecute;
16 PostExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; 16 PostExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback;
17 WorkItemPriority = SmartThreadPool.DefaultWorkItemPriority; 17 WorkItemPriority = SmartThreadPool.DefaultWorkItemPriority;
18 } 18 }
19 19
20 public WorkItemInfo(WorkItemInfo workItemInfo) 20 public WorkItemInfo(WorkItemInfo workItemInfo)
21 { 21 {
22 UseCallerCallContext = workItemInfo.UseCallerCallContext; 22 UseCallerCallContext = workItemInfo.UseCallerCallContext;
23 UseCallerHttpContext = workItemInfo.UseCallerHttpContext; 23 UseCallerHttpContext = workItemInfo.UseCallerHttpContext;
24 DisposeOfStateObjects = workItemInfo.DisposeOfStateObjects; 24 DisposeOfStateObjects = workItemInfo.DisposeOfStateObjects;
25 CallToPostExecute = workItemInfo.CallToPostExecute; 25 CallToPostExecute = workItemInfo.CallToPostExecute;
26 PostExecuteWorkItemCallback = workItemInfo.PostExecuteWorkItemCallback; 26 PostExecuteWorkItemCallback = workItemInfo.PostExecuteWorkItemCallback;
27 WorkItemPriority = workItemInfo.WorkItemPriority; 27 WorkItemPriority = workItemInfo.WorkItemPriority;
28 Timeout = workItemInfo.Timeout; 28 Timeout = workItemInfo.Timeout;
29 } 29 }
30 30
31 /// <summary> 31 /// <summary>
32 /// Get/Set if to use the caller's security context 32 /// Get/Set if to use the caller's security context
33 /// </summary> 33 /// </summary>
34 public bool UseCallerCallContext { get; set; } 34 public bool UseCallerCallContext { get; set; }
35 35
36 /// <summary> 36 /// <summary>
37 /// Get/Set if to use the caller's HTTP context 37 /// Get/Set if to use the caller's HTTP context
38 /// </summary> 38 /// </summary>
39 public bool UseCallerHttpContext { get; set; } 39 public bool UseCallerHttpContext { get; set; }
40 40
41 /// <summary> 41 /// <summary>
42 /// Get/Set if to dispose of the state object of a work item 42 /// Get/Set if to dispose of the state object of a work item
43 /// </summary> 43 /// </summary>
44 public bool DisposeOfStateObjects { get; set; } 44 public bool DisposeOfStateObjects { get; set; }
45 45
46 /// <summary> 46 /// <summary>
47 /// Get/Set the run the post execute options 47 /// Get/Set the run the post execute options
48 /// </summary> 48 /// </summary>
49 public CallToPostExecute CallToPostExecute { get; set; } 49 public CallToPostExecute CallToPostExecute { get; set; }
50 50
51 /// <summary> 51 /// <summary>
52 /// Get/Set the post execute callback 52 /// Get/Set the post execute callback
53 /// </summary> 53 /// </summary>
54 public PostExecuteWorkItemCallback PostExecuteWorkItemCallback { get; set; } 54 public PostExecuteWorkItemCallback PostExecuteWorkItemCallback { get; set; }
55 55
56 /// <summary> 56 /// <summary>
57 /// Get/Set the work item's priority 57 /// Get/Set the work item's priority
58 /// </summary> 58 /// </summary>
59 public WorkItemPriority WorkItemPriority { get; set; } 59 public WorkItemPriority WorkItemPriority { get; set; }
60 60
61 /// <summary> 61 /// <summary>
62 /// Get/Set the work item's timout in milliseconds. 62 /// Get/Set the work item's timout in milliseconds.
63 /// This is a passive timout. When the timout expires the work item won't be actively aborted! 63 /// This is a passive timout. When the timout expires the work item won't be actively aborted!
64 /// </summary> 64 /// </summary>
65 public long Timeout { get; set; } 65 public long Timeout { get; set; }
66 } 66 }
67 67
68 #endregion 68 #endregion
69} 69}
diff --git a/ThirdParty/SmartThreadPool/WorkItemsGroup.cs b/ThirdParty/SmartThreadPool/WorkItemsGroup.cs
index d9d34ac..d429bc6 100644
--- a/ThirdParty/SmartThreadPool/WorkItemsGroup.cs
+++ b/ThirdParty/SmartThreadPool/WorkItemsGroup.cs
@@ -6,107 +6,107 @@ using System.Diagnostics;
6namespace Amib.Threading.Internal 6namespace Amib.Threading.Internal
7{ 7{
8 8
9 #region WorkItemsGroup class 9 #region WorkItemsGroup class
10 10
11 /// <summary> 11 /// <summary>
12 /// Summary description for WorkItemsGroup. 12 /// Summary description for WorkItemsGroup.
13 /// </summary> 13 /// </summary>
14 public class WorkItemsGroup : WorkItemsGroupBase 14 public class WorkItemsGroup : WorkItemsGroupBase
15 { 15 {
16 #region Private members 16 #region Private members
17 17
18 private readonly object _lock = new object(); 18 private readonly object _lock = new object();
19 19
20 /// <summary> 20 /// <summary>
21 /// A reference to the SmartThreadPool instance that created this 21 /// A reference to the SmartThreadPool instance that created this
22 /// WorkItemsGroup. 22 /// WorkItemsGroup.
23 /// </summary> 23 /// </summary>
24 private readonly SmartThreadPool _stp; 24 private readonly SmartThreadPool _stp;
25 25
26 /// <summary> 26 /// <summary>
27 /// The OnIdle event 27 /// The OnIdle event
28 /// </summary> 28 /// </summary>
29 private event WorkItemsGroupIdleHandler _onIdle; 29 private event WorkItemsGroupIdleHandler _onIdle;
30 30
31 /// <summary> 31 /// <summary>
32 /// A flag to indicate if the Work Items Group is now suspended. 32 /// A flag to indicate if the Work Items Group is now suspended.
33 /// </summary> 33 /// </summary>
34 private bool _isSuspended; 34 private bool _isSuspended;
35 35
36 /// <summary> 36 /// <summary>
37 /// Defines how many work items of this WorkItemsGroup can run at once. 37 /// Defines how many work items of this WorkItemsGroup can run at once.
38 /// </summary> 38 /// </summary>
39 private int _concurrency; 39 private int _concurrency;
40 40
41 /// <summary> 41 /// <summary>
42 /// Priority queue to hold work items before they are passed 42 /// Priority queue to hold work items before they are passed
43 /// to the SmartThreadPool. 43 /// to the SmartThreadPool.
44 /// </summary> 44 /// </summary>
45 private readonly PriorityQueue _workItemsQueue; 45 private readonly PriorityQueue _workItemsQueue;
46 46
47 /// <summary> 47 /// <summary>
48 /// Indicate how many work items are waiting in the SmartThreadPool 48 /// Indicate how many work items are waiting in the SmartThreadPool
49 /// queue. 49 /// queue.
50 /// This value is used to apply the concurrency. 50 /// This value is used to apply the concurrency.
51 /// </summary> 51 /// </summary>
52 private int _workItemsInStpQueue; 52 private int _workItemsInStpQueue;
53 53
54 /// <summary> 54 /// <summary>
55 /// Indicate how many work items are currently running in the SmartThreadPool. 55 /// Indicate how many work items are currently running in the SmartThreadPool.
56 /// This value is used with the Cancel, to calculate if we can send new 56 /// This value is used with the Cancel, to calculate if we can send new
57 /// work items to the STP. 57 /// work items to the STP.
58 /// </summary> 58 /// </summary>
59 private int _workItemsExecutingInStp = 0; 59 private int _workItemsExecutingInStp = 0;
60 60
61 /// <summary> 61 /// <summary>
62 /// WorkItemsGroup start information 62 /// WorkItemsGroup start information
63 /// </summary> 63 /// </summary>
64 private readonly WIGStartInfo _workItemsGroupStartInfo; 64 private readonly WIGStartInfo _workItemsGroupStartInfo;
65 65
66 /// <summary> 66 /// <summary>
67 /// Signaled when all of the WorkItemsGroup's work item completed. 67 /// Signaled when all of the WorkItemsGroup's work item completed.
68 /// </summary> 68 /// </summary>
69 //private readonly ManualResetEvent _isIdleWaitHandle = new ManualResetEvent(true); 69 //private readonly ManualResetEvent _isIdleWaitHandle = new ManualResetEvent(true);
70 private readonly ManualResetEvent _isIdleWaitHandle = EventWaitHandleFactory.CreateManualResetEvent(true); 70 private readonly ManualResetEvent _isIdleWaitHandle = EventWaitHandleFactory.CreateManualResetEvent(true);
71 71
72 /// <summary> 72 /// <summary>
73 /// A common object for all the work items that this work items group 73 /// A common object for all the work items that this work items group
74 /// generate so we can mark them to cancel in O(1) 74 /// generate so we can mark them to cancel in O(1)
75 /// </summary> 75 /// </summary>
76 private CanceledWorkItemsGroup _canceledWorkItemsGroup = new CanceledWorkItemsGroup(); 76 private CanceledWorkItemsGroup _canceledWorkItemsGroup = new CanceledWorkItemsGroup();
77 77
78 #endregion 78 #endregion
79 79
80 #region Construction 80 #region Construction
81 81
82 public WorkItemsGroup( 82 public WorkItemsGroup(
83 SmartThreadPool stp, 83 SmartThreadPool stp,
84 int concurrency, 84 int concurrency,
85 WIGStartInfo wigStartInfo) 85 WIGStartInfo wigStartInfo)
86 { 86 {
87 if (concurrency <= 0) 87 if (concurrency <= 0)
88 { 88 {
89 throw new ArgumentOutOfRangeException( 89 throw new ArgumentOutOfRangeException(
90 "concurrency", 90 "concurrency",
91#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE) 91#if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE)
92 concurrency, 92 concurrency,
93#endif 93#endif
94 "concurrency must be greater than zero"); 94 "concurrency must be greater than zero");
95 } 95 }
96 _stp = stp; 96 _stp = stp;
97 _concurrency = concurrency; 97 _concurrency = concurrency;
98 _workItemsGroupStartInfo = new WIGStartInfo(wigStartInfo).AsReadOnly(); 98 _workItemsGroupStartInfo = new WIGStartInfo(wigStartInfo).AsReadOnly();
99 _workItemsQueue = new PriorityQueue(); 99 _workItemsQueue = new PriorityQueue();
100 Name = "WorkItemsGroup"; 100 Name = "WorkItemsGroup";
101 101
102 // The _workItemsInStpQueue gets the number of currently executing work items, 102 // The _workItemsInStpQueue gets the number of currently executing work items,
103 // because once a work item is executing, it cannot be cancelled. 103 // because once a work item is executing, it cannot be cancelled.
104 _workItemsInStpQueue = _workItemsExecutingInStp; 104 _workItemsInStpQueue = _workItemsExecutingInStp;
105 105
106 _isSuspended = _workItemsGroupStartInfo.StartSuspended; 106 _isSuspended = _workItemsGroupStartInfo.StartSuspended;
107 } 107 }
108 108
109 #endregion 109 #endregion
110 110
111 #region WorkItemsGroupBase Overrides 111 #region WorkItemsGroupBase Overrides
112 112
@@ -146,7 +146,7 @@ namespace Amib.Threading.Internal
146 } 146 }
147 } 147 }
148 148
149 /// <summary> 149 /// <summary>
150 /// WorkItemsGroup start information 150 /// WorkItemsGroup start information
151 /// </summary> 151 /// </summary>
152 public override WIGStartInfo WIGStartInfo 152 public override WIGStartInfo WIGStartInfo
@@ -154,38 +154,38 @@ namespace Amib.Threading.Internal
154 get { return _workItemsGroupStartInfo; } 154 get { return _workItemsGroupStartInfo; }
155 } 155 }
156 156
157 /// <summary> 157 /// <summary>
158 /// Start the Work Items Group if it was started suspended 158 /// Start the Work Items Group if it was started suspended
159 /// </summary> 159 /// </summary>
160 public override void Start() 160 public override void Start()
161 { 161 {
162 // If the Work Items Group already started then quit 162 // If the Work Items Group already started then quit
163 if (!_isSuspended) 163 if (!_isSuspended)
164 { 164 {
165 return; 165 return;
166 } 166 }
167 _isSuspended = false; 167 _isSuspended = false;
168 168
169 EnqueueToSTPNextNWorkItem(Math.Min(_workItemsQueue.Count, _concurrency)); 169 EnqueueToSTPNextNWorkItem(Math.Min(_workItemsQueue.Count, _concurrency));
170 } 170 }
171 171
172 public override void Cancel(bool abortExecution) 172 public override void Cancel(bool abortExecution)
173 { 173 {
174 lock (_lock) 174 lock (_lock)
175 { 175 {
176 _canceledWorkItemsGroup.IsCanceled = true; 176 _canceledWorkItemsGroup.IsCanceled = true;
177 _workItemsQueue.Clear(); 177 _workItemsQueue.Clear();
178 _workItemsInStpQueue = 0; 178 _workItemsInStpQueue = 0;
179 _canceledWorkItemsGroup = new CanceledWorkItemsGroup(); 179 _canceledWorkItemsGroup = new CanceledWorkItemsGroup();
180 } 180 }
181 181
182 if (abortExecution) 182 if (abortExecution)
183 { 183 {
184 _stp.CancelAbortWorkItemsGroup(this); 184 _stp.CancelAbortWorkItemsGroup(this);
185 } 185 }
186 } 186 }
187 187
188 /// <summary> 188 /// <summary>
189 /// Wait for the thread pool to be idle 189 /// Wait for the thread pool to be idle
190 /// </summary> 190 /// </summary>
191 public override bool WaitForIdle(int millisecondsTimeout) 191 public override bool WaitForIdle(int millisecondsTimeout)
@@ -194,34 +194,34 @@ namespace Amib.Threading.Internal
194 return STPEventWaitHandle.WaitOne(_isIdleWaitHandle, millisecondsTimeout, false); 194 return STPEventWaitHandle.WaitOne(_isIdleWaitHandle, millisecondsTimeout, false);
195 } 195 }
196 196
197 public override event WorkItemsGroupIdleHandler OnIdle 197 public override event WorkItemsGroupIdleHandler OnIdle
198 { 198 {
199 add { _onIdle += value; } 199 add { _onIdle += value; }
200 remove { _onIdle -= value; } 200 remove { _onIdle -= value; }
201 } 201 }
202 202
203 #endregion 203 #endregion
204 204
205 #region Private methods 205 #region Private methods
206 206
207 private void RegisterToWorkItemCompletion(IWorkItemResult wir) 207 private void RegisterToWorkItemCompletion(IWorkItemResult wir)
208 { 208 {
209 IInternalWorkItemResult iwir = (IInternalWorkItemResult)wir; 209 IInternalWorkItemResult iwir = (IInternalWorkItemResult)wir;
210 iwir.OnWorkItemStarted += OnWorkItemStartedCallback; 210 iwir.OnWorkItemStarted += OnWorkItemStartedCallback;
211 iwir.OnWorkItemCompleted += OnWorkItemCompletedCallback; 211 iwir.OnWorkItemCompleted += OnWorkItemCompletedCallback;
212 } 212 }
213 213
214 public void OnSTPIsStarting() 214 public void OnSTPIsStarting()
215 { 215 {
216 if (_isSuspended) 216 if (_isSuspended)
217 { 217 {
218 return; 218 return;
219 } 219 }
220 220
221 EnqueueToSTPNextNWorkItem(_concurrency); 221 EnqueueToSTPNextNWorkItem(_concurrency);
222 } 222 }
223 223
224 public void EnqueueToSTPNextNWorkItem(int count) 224 public void EnqueueToSTPNextNWorkItem(int count)
225 { 225 {
226 for (int i = 0; i < count; ++i) 226 for (int i = 0; i < count; ++i)
227 { 227 {
@@ -229,115 +229,115 @@ namespace Amib.Threading.Internal
229 } 229 }
230 } 230 }
231 231
232 private object FireOnIdle(object state) 232 private object FireOnIdle(object state)
233 { 233 {
234 FireOnIdleImpl(_onIdle); 234 FireOnIdleImpl(_onIdle);
235 return null; 235 return null;
236 } 236 }
237 237
238 [MethodImpl(MethodImplOptions.NoInlining)] 238 [MethodImpl(MethodImplOptions.NoInlining)]
239 private void FireOnIdleImpl(WorkItemsGroupIdleHandler onIdle) 239 private void FireOnIdleImpl(WorkItemsGroupIdleHandler onIdle)
240 { 240 {
241 if(null == onIdle) 241 if(null == onIdle)
242 { 242 {
243 return; 243 return;
244 } 244 }
245 245
246 Delegate[] delegates = onIdle.GetInvocationList(); 246 Delegate[] delegates = onIdle.GetInvocationList();
247 foreach(WorkItemsGroupIdleHandler eh in delegates) 247 foreach(WorkItemsGroupIdleHandler eh in delegates)
248 { 248 {
249 try 249 try
250 { 250 {
251 eh(this); 251 eh(this);
252 } 252 }
253 catch { } // Suppress exceptions 253 catch { } // Suppress exceptions
254 } 254 }
255 } 255 }
256 256
257 private void OnWorkItemStartedCallback(WorkItem workItem) 257 private void OnWorkItemStartedCallback(WorkItem workItem)
258 { 258 {
259 lock(_lock) 259 lock(_lock)
260 { 260 {
261 ++_workItemsExecutingInStp; 261 ++_workItemsExecutingInStp;
262 } 262 }
263 } 263 }
264 264
265 private void OnWorkItemCompletedCallback(WorkItem workItem) 265 private void OnWorkItemCompletedCallback(WorkItem workItem)
266 { 266 {
267 EnqueueToSTPNextWorkItem(null, true); 267 EnqueueToSTPNextWorkItem(null, true);
268 } 268 }
269 269
270 internal override void Enqueue(WorkItem workItem) 270 internal override void Enqueue(WorkItem workItem)
271 { 271 {
272 EnqueueToSTPNextWorkItem(workItem); 272 EnqueueToSTPNextWorkItem(workItem);
273 } 273 }
274 274
275 private void EnqueueToSTPNextWorkItem(WorkItem workItem) 275 private void EnqueueToSTPNextWorkItem(WorkItem workItem)
276 { 276 {
277 EnqueueToSTPNextWorkItem(workItem, false); 277 EnqueueToSTPNextWorkItem(workItem, false);
278 } 278 }
279 279
280 private void EnqueueToSTPNextWorkItem(WorkItem workItem, bool decrementWorkItemsInStpQueue) 280 private void EnqueueToSTPNextWorkItem(WorkItem workItem, bool decrementWorkItemsInStpQueue)
281 { 281 {
282 lock(_lock) 282 lock(_lock)
283 { 283 {
284 // Got here from OnWorkItemCompletedCallback() 284 // Got here from OnWorkItemCompletedCallback()
285 if (decrementWorkItemsInStpQueue) 285 if (decrementWorkItemsInStpQueue)
286 { 286 {
287 --_workItemsInStpQueue; 287 --_workItemsInStpQueue;
288 288
289 if(_workItemsInStpQueue < 0) 289 if(_workItemsInStpQueue < 0)
290 { 290 {
291 _workItemsInStpQueue = 0; 291 _workItemsInStpQueue = 0;
292 } 292 }
293 293
294 --_workItemsExecutingInStp; 294 --_workItemsExecutingInStp;
295 295
296 if(_workItemsExecutingInStp < 0) 296 if(_workItemsExecutingInStp < 0)
297 { 297 {
298 _workItemsExecutingInStp = 0; 298 _workItemsExecutingInStp = 0;
299 } 299 }
300 } 300 }
301 301
302 // If the work item is not null then enqueue it 302 // If the work item is not null then enqueue it
303 if (null != workItem) 303 if (null != workItem)
304 { 304 {
305 workItem.CanceledWorkItemsGroup = _canceledWorkItemsGroup; 305 workItem.CanceledWorkItemsGroup = _canceledWorkItemsGroup;
306 306
307 RegisterToWorkItemCompletion(workItem.GetWorkItemResult()); 307 RegisterToWorkItemCompletion(workItem.GetWorkItemResult());
308 _workItemsQueue.Enqueue(workItem); 308 _workItemsQueue.Enqueue(workItem);
309 //_stp.IncrementWorkItemsCount(); 309 //_stp.IncrementWorkItemsCount();
310 310
311 if ((1 == _workItemsQueue.Count) && 311 if ((1 == _workItemsQueue.Count) &&
312 (0 == _workItemsInStpQueue)) 312 (0 == _workItemsInStpQueue))
313 { 313 {
314 _stp.RegisterWorkItemsGroup(this); 314 _stp.RegisterWorkItemsGroup(this);
315 IsIdle = false; 315 IsIdle = false;
316 _isIdleWaitHandle.Reset(); 316 _isIdleWaitHandle.Reset();
317 } 317 }
318 } 318 }
319 319
320 // If the work items queue of the group is empty than quit 320 // If the work items queue of the group is empty than quit
321 if (0 == _workItemsQueue.Count) 321 if (0 == _workItemsQueue.Count)
322 { 322 {
323 if (0 == _workItemsInStpQueue) 323 if (0 == _workItemsInStpQueue)
324 { 324 {
325 _stp.UnregisterWorkItemsGroup(this); 325 _stp.UnregisterWorkItemsGroup(this);
326 IsIdle = true; 326 IsIdle = true;
327 _isIdleWaitHandle.Set(); 327 _isIdleWaitHandle.Set();
328 if (decrementWorkItemsInStpQueue && _onIdle != null && _onIdle.GetInvocationList().Length > 0) 328 if (decrementWorkItemsInStpQueue && _onIdle != null && _onIdle.GetInvocationList().Length > 0)
329 { 329 {
330 _stp.QueueWorkItem(new WorkItemCallback(FireOnIdle)); 330 _stp.QueueWorkItem(new WorkItemCallback(FireOnIdle));
331 } 331 }
332 } 332 }
333 return; 333 return;
334 } 334 }
335 335
336 if (!_isSuspended) 336 if (!_isSuspended)
337 { 337 {
338 if (_workItemsInStpQueue < _concurrency) 338 if (_workItemsInStpQueue < _concurrency)
339 { 339 {
340 WorkItem nextWorkItem = _workItemsQueue.Dequeue() as WorkItem; 340 WorkItem nextWorkItem = _workItemsQueue.Dequeue() as WorkItem;
341 try 341 try
342 { 342 {
343 _stp.Enqueue(nextWorkItem); 343 _stp.Enqueue(nextWorkItem);
@@ -348,14 +348,14 @@ namespace Amib.Threading.Internal
348 // The STP has been shutdown 348 // The STP has been shutdown
349 } 349 }
350 350
351 ++_workItemsInStpQueue; 351 ++_workItemsInStpQueue;
352 } 352 }
353 } 353 }
354 } 354 }
355 } 355 }
356 356
357 #endregion 357 #endregion
358 } 358 }
359 359
360 #endregion 360 #endregion
361} 361}
diff --git a/ThirdParty/SmartThreadPool/WorkItemsGroupBase.cs b/ThirdParty/SmartThreadPool/WorkItemsGroupBase.cs
index 27fae5e..3a5dcc6 100644
--- a/ThirdParty/SmartThreadPool/WorkItemsGroupBase.cs
+++ b/ThirdParty/SmartThreadPool/WorkItemsGroupBase.cs
@@ -132,7 +132,7 @@ namespace Amib.Threading.Internal
132 /// </summary> 132 /// </summary>
133 /// <param name="callback">A callback to execute</param> 133 /// <param name="callback">A callback to execute</param>
134 /// <param name="state"> 134 /// <param name="state">
135 /// The context object of the work item. Used for passing arguments to the work item. 135 /// The context object of the work item. Used for passing arguments to the work item.
136 /// </param> 136 /// </param>
137 /// <returns>Returns a work item result</returns> 137 /// <returns>Returns a work item result</returns>
138 public IWorkItemResult QueueWorkItem(WorkItemCallback callback, object state) 138 public IWorkItemResult QueueWorkItem(WorkItemCallback callback, object state)
@@ -147,7 +147,7 @@ namespace Amib.Threading.Internal
147 /// </summary> 147 /// </summary>
148 /// <param name="callback">A callback to execute</param> 148 /// <param name="callback">A callback to execute</param>
149 /// <param name="state"> 149 /// <param name="state">
150 /// The context object of the work item. Used for passing arguments to the work item. 150 /// The context object of the work item. Used for passing arguments to the work item.
151 /// </param> 151 /// </param>
152 /// <param name="workItemPriority">The work item priority</param> 152 /// <param name="workItemPriority">The work item priority</param>
153 /// <returns>Returns a work item result</returns> 153 /// <returns>Returns a work item result</returns>
@@ -165,7 +165,7 @@ namespace Amib.Threading.Internal
165 /// <param name="workItemInfo">Work item information</param> 165 /// <param name="workItemInfo">Work item information</param>
166 /// <param name="callback">A callback to execute</param> 166 /// <param name="callback">A callback to execute</param>
167 /// <param name="state"> 167 /// <param name="state">
168 /// The context object of the work item. Used for passing arguments to the work item. 168 /// The context object of the work item. Used for passing arguments to the work item.
169 /// </param> 169 /// </param>
170 /// <returns>Returns a work item result</returns> 170 /// <returns>Returns a work item result</returns>
171 public IWorkItemResult QueueWorkItem(WorkItemInfo workItemInfo, WorkItemCallback callback, object state) 171 public IWorkItemResult QueueWorkItem(WorkItemInfo workItemInfo, WorkItemCallback callback, object state)
@@ -181,7 +181,7 @@ namespace Amib.Threading.Internal
181 /// </summary> 181 /// </summary>
182 /// <param name="callback">A callback to execute</param> 182 /// <param name="callback">A callback to execute</param>
183 /// <param name="state"> 183 /// <param name="state">
184 /// The context object of the work item. Used for passing arguments to the work item. 184 /// The context object of the work item. Used for passing arguments to the work item.
185 /// </param> 185 /// </param>
186 /// <param name="postExecuteWorkItemCallback"> 186 /// <param name="postExecuteWorkItemCallback">
187 /// A delegate to call after the callback completion 187 /// A delegate to call after the callback completion
@@ -203,7 +203,7 @@ namespace Amib.Threading.Internal
203 /// </summary> 203 /// </summary>
204 /// <param name="callback">A callback to execute</param> 204 /// <param name="callback">A callback to execute</param>
205 /// <param name="state"> 205 /// <param name="state">
206 /// The context object of the work item. Used for passing arguments to the work item. 206 /// The context object of the work item. Used for passing arguments to the work item.
207 /// </param> 207 /// </param>
208 /// <param name="postExecuteWorkItemCallback"> 208 /// <param name="postExecuteWorkItemCallback">
209 /// A delegate to call after the callback completion 209 /// A delegate to call after the callback completion
@@ -227,7 +227,7 @@ namespace Amib.Threading.Internal
227 /// </summary> 227 /// </summary>
228 /// <param name="callback">A callback to execute</param> 228 /// <param name="callback">A callback to execute</param>
229 /// <param name="state"> 229 /// <param name="state">
230 /// The context object of the work item. Used for passing arguments to the work item. 230 /// The context object of the work item. Used for passing arguments to the work item.
231 /// </param> 231 /// </param>
232 /// <param name="postExecuteWorkItemCallback"> 232 /// <param name="postExecuteWorkItemCallback">
233 /// A delegate to call after the callback completion 233 /// A delegate to call after the callback completion
@@ -251,7 +251,7 @@ namespace Amib.Threading.Internal
251 /// </summary> 251 /// </summary>
252 /// <param name="callback">A callback to execute</param> 252 /// <param name="callback">A callback to execute</param>
253 /// <param name="state"> 253 /// <param name="state">
254 /// The context object of the work item. Used for passing arguments to the work item. 254 /// The context object of the work item. Used for passing arguments to the work item.
255 /// </param> 255 /// </param>
256 /// <param name="postExecuteWorkItemCallback"> 256 /// <param name="postExecuteWorkItemCallback">
257 /// A delegate to call after the callback completion 257 /// A delegate to call after the callback completion
diff --git a/ThirdParty/SmartThreadPool/WorkItemsQueue.cs b/ThirdParty/SmartThreadPool/WorkItemsQueue.cs
index 019c0d3..21403a0 100644
--- a/ThirdParty/SmartThreadPool/WorkItemsQueue.cs
+++ b/ThirdParty/SmartThreadPool/WorkItemsQueue.cs
@@ -4,29 +4,29 @@ using System.Threading;
4 4
5namespace Amib.Threading.Internal 5namespace Amib.Threading.Internal
6{ 6{
7 #region WorkItemsQueue class 7 #region WorkItemsQueue class
8 8
9 /// <summary> 9 /// <summary>
10 /// WorkItemsQueue class. 10 /// WorkItemsQueue class.
11 /// </summary> 11 /// </summary>
12 public class WorkItemsQueue : IDisposable 12 public class WorkItemsQueue : IDisposable
13 { 13 {
14 #region Member variables 14 #region Member variables
15 15
16 /// <summary> 16 /// <summary>
17 /// Waiters queue (implemented as stack). 17 /// Waiters queue (implemented as stack).
18 /// </summary> 18 /// </summary>
19 private readonly WaiterEntry _headWaiterEntry = new WaiterEntry(); 19 private readonly WaiterEntry _headWaiterEntry = new WaiterEntry();
20 20
21 /// <summary> 21 /// <summary>
22 /// Waiters count 22 /// Waiters count
23 /// </summary> 23 /// </summary>
24 private int _waitersCount = 0; 24 private int _waitersCount = 0;
25 25
26 /// <summary> 26 /// <summary>
27 /// Work items queue 27 /// Work items queue
28 /// </summary> 28 /// </summary>
29 private readonly PriorityQueue _workItems = new PriorityQueue(); 29 private readonly PriorityQueue _workItems = new PriorityQueue();
30 30
31 /// <summary> 31 /// <summary>
32 /// Indicate that work items are allowed to be queued 32 /// Indicate that work items are allowed to be queued
@@ -34,7 +34,7 @@ namespace Amib.Threading.Internal
34 private bool _isWorkItemsQueueActive = true; 34 private bool _isWorkItemsQueueActive = true;
35 35
36 36
37#if (WINDOWS_PHONE) 37#if (WINDOWS_PHONE)
38 private static readonly Dictionary<int, WaiterEntry> _waiterEntries = new Dictionary<int, WaiterEntry>(); 38 private static readonly Dictionary<int, WaiterEntry> _waiterEntries = new Dictionary<int, WaiterEntry>();
39#elif (_WINDOWS_CE) 39#elif (_WINDOWS_CE)
40 private static LocalDataStoreSlot _waiterEntrySlot = Thread.AllocateDataSlot(); 40 private static LocalDataStoreSlot _waiterEntrySlot = Thread.AllocateDataSlot();
@@ -50,7 +50,7 @@ namespace Amib.Threading.Internal
50 /// </summary> 50 /// </summary>
51 private static WaiterEntry CurrentWaiterEntry 51 private static WaiterEntry CurrentWaiterEntry
52 { 52 {
53#if (WINDOWS_PHONE) 53#if (WINDOWS_PHONE)
54 get 54 get
55 { 55 {
56 lock (_waiterEntries) 56 lock (_waiterEntries)
@@ -92,60 +92,60 @@ namespace Amib.Threading.Internal
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// A flag that indicates if the WorkItemsQueue has been disposed. 95 /// A flag that indicates if the WorkItemsQueue has been disposed.
96 /// </summary> 96 /// </summary>
97 private bool _isDisposed = false; 97 private bool _isDisposed = false;
98 98
99 #endregion 99 #endregion
100 100
101 #region Public properties 101 #region Public properties
102 102
103 /// <summary> 103 /// <summary>
104 /// Returns the current number of work items in the queue 104 /// Returns the current number of work items in the queue
105 /// </summary> 105 /// </summary>
106 public int Count 106 public int Count
107 { 107 {
108 get 108 get
109 { 109 {
110 return _workItems.Count; 110 return _workItems.Count;
111 } 111 }
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Returns the current number of waiters 115 /// Returns the current number of waiters
116 /// </summary> 116 /// </summary>
117 public int WaitersCount 117 public int WaitersCount
118 { 118 {
119 get 119 get
120 { 120 {
121 return _waitersCount; 121 return _waitersCount;
122 } 122 }
123 } 123 }
124 124
125 125
126 #endregion 126 #endregion
127 127
128 #region Public methods 128 #region Public methods
129 129
130 /// <summary> 130 /// <summary>
131 /// Enqueue a work item to the queue. 131 /// Enqueue a work item to the queue.
132 /// </summary> 132 /// </summary>
133 public bool EnqueueWorkItem(WorkItem workItem) 133 public bool EnqueueWorkItem(WorkItem workItem)
134 { 134 {
135 // A work item cannot be null, since null is used in the 135 // A work item cannot be null, since null is used in the
136 // WaitForWorkItem() method to indicate timeout or cancel 136 // WaitForWorkItem() method to indicate timeout or cancel
137 if (null == workItem) 137 if (null == workItem)
138 { 138 {
139 throw new ArgumentNullException("workItem" , "workItem cannot be null"); 139 throw new ArgumentNullException("workItem" , "workItem cannot be null");
140 } 140 }
141 141
142 bool enqueue = true; 142 bool enqueue = true;
143 143
144 // First check if there is a waiter waiting for work item. During 144 // First check if there is a waiter waiting for work item. During
145 // the check, timed out waiters are ignored. If there is no 145 // the check, timed out waiters are ignored. If there is no
146 // waiter then the work item is queued. 146 // waiter then the work item is queued.
147 lock(this) 147 lock(this)
148 { 148 {
149 ValidateNotDisposed(); 149 ValidateNotDisposed();
150 150
151 if (!_isWorkItemsQueueActive) 151 if (!_isWorkItemsQueueActive)
@@ -153,55 +153,55 @@ namespace Amib.Threading.Internal
153 return false; 153 return false;
154 } 154 }
155 155
156 while(_waitersCount > 0) 156 while(_waitersCount > 0)
157 { 157 {
158 // Dequeue a waiter. 158 // Dequeue a waiter.
159 WaiterEntry waiterEntry = PopWaiter(); 159 WaiterEntry waiterEntry = PopWaiter();
160 160
161 // Signal the waiter. On success break the loop 161 // Signal the waiter. On success break the loop
162 if (waiterEntry.Signal(workItem)) 162 if (waiterEntry.Signal(workItem))
163 { 163 {
164 enqueue = false; 164 enqueue = false;
165 break; 165 break;
166 } 166 }
167 } 167 }
168 168
169 if (enqueue) 169 if (enqueue)
170 { 170 {
171 // Enqueue the work item 171 // Enqueue the work item
172 _workItems.Enqueue(workItem); 172 _workItems.Enqueue(workItem);
173 } 173 }
174 } 174 }
175 return true; 175 return true;
176 } 176 }
177 177
178 178
179 /// <summary> 179 /// <summary>
180 /// Waits for a work item or exits on timeout or cancel 180 /// Waits for a work item or exits on timeout or cancel
181 /// </summary> 181 /// </summary>
182 /// <param name="millisecondsTimeout">Timeout in milliseconds</param> 182 /// <param name="millisecondsTimeout">Timeout in milliseconds</param>
183 /// <param name="cancelEvent">Cancel wait handle</param> 183 /// <param name="cancelEvent">Cancel wait handle</param>
184 /// <returns>Returns true if the resource was granted</returns> 184 /// <returns>Returns true if the resource was granted</returns>
185 public WorkItem DequeueWorkItem( 185 public WorkItem DequeueWorkItem(
186 int millisecondsTimeout, 186 int millisecondsTimeout,
187 WaitHandle cancelEvent) 187 WaitHandle cancelEvent)
188 { 188 {
189 // This method cause the caller to wait for a work item. 189 // This method cause the caller to wait for a work item.
190 // If there is at least one waiting work item then the 190 // If there is at least one waiting work item then the
191 // method returns immidiately with it. 191 // method returns immidiately with it.
192 // 192 //
193 // If there are no waiting work items then the caller 193 // If there are no waiting work items then the caller
194 // is queued between other waiters for a work item to arrive. 194 // is queued between other waiters for a work item to arrive.
195 // 195 //
196 // If a work item didn't come within millisecondsTimeout or 196 // If a work item didn't come within millisecondsTimeout or
197 // the user canceled the wait by signaling the cancelEvent 197 // the user canceled the wait by signaling the cancelEvent
198 // then the method returns null to indicate that the caller 198 // then the method returns null to indicate that the caller
199 // didn't get a work item. 199 // didn't get a work item.
200 200
201 WaiterEntry waiterEntry; 201 WaiterEntry waiterEntry;
202 WorkItem workItem = null; 202 WorkItem workItem = null;
203 lock (this) 203 lock (this)
204 { 204 {
205 ValidateNotDisposed(); 205 ValidateNotDisposed();
206 206
207 // If there are waiting work items then take one and return. 207 // If there are waiting work items then take one and return.
@@ -218,68 +218,68 @@ namespace Amib.Threading.Internal
218 218
219 // Put the waiter with the other waiters 219 // Put the waiter with the other waiters
220 PushWaiter(waiterEntry); 220 PushWaiter(waiterEntry);
221 } 221 }
222 222
223 // Prepare array of wait handle for the WaitHandle.WaitAny() 223 // Prepare array of wait handle for the WaitHandle.WaitAny()
224 WaitHandle [] waitHandles = new WaitHandle[] { 224 WaitHandle [] waitHandles = new WaitHandle[] {
225 waiterEntry.WaitHandle, 225 waiterEntry.WaitHandle,
226 cancelEvent }; 226 cancelEvent };
227 227
228 // Wait for an available resource, cancel event, or timeout. 228 // Wait for an available resource, cancel event, or timeout.
229 229
230 // During the wait we are supposes to exit the synchronization 230 // During the wait we are supposes to exit the synchronization
231 // domain. (Placing true as the third argument of the WaitAny()) 231 // domain. (Placing true as the third argument of the WaitAny())
232 // It just doesn't work, I don't know why, so I have two lock(this) 232 // It just doesn't work, I don't know why, so I have two lock(this)
233 // statments instead of one. 233 // statments instead of one.
234 234
235 int index = STPEventWaitHandle.WaitAny( 235 int index = STPEventWaitHandle.WaitAny(
236 waitHandles, 236 waitHandles,
237 millisecondsTimeout, 237 millisecondsTimeout,
238 true); 238 true);
239 239
240 lock(this) 240 lock(this)
241 { 241 {
242 // success is true if it got a work item. 242 // success is true if it got a work item.
243 bool success = (0 == index); 243 bool success = (0 == index);
244 244
245 // The timeout variable is used only for readability. 245 // The timeout variable is used only for readability.
246 // (We treat cancel as timeout) 246 // (We treat cancel as timeout)
247 bool timeout = !success; 247 bool timeout = !success;
248 248
249 // On timeout update the waiterEntry that it is timed out 249 // On timeout update the waiterEntry that it is timed out
250 if (timeout) 250 if (timeout)
251 { 251 {
252 // The Timeout() fails if the waiter has already been signaled 252 // The Timeout() fails if the waiter has already been signaled
253 timeout = waiterEntry.Timeout(); 253 timeout = waiterEntry.Timeout();
254 254
255 // On timeout remove the waiter from the queue. 255 // On timeout remove the waiter from the queue.
256 // Note that the complexity is O(1). 256 // Note that the complexity is O(1).
257 if(timeout) 257 if(timeout)
258 { 258 {
259 RemoveWaiter(waiterEntry, false); 259 RemoveWaiter(waiterEntry, false);
260 } 260 }
261 261
262 // Again readability 262 // Again readability
263 success = !timeout; 263 success = !timeout;
264 } 264 }
265 265
266 // On success return the work item 266 // On success return the work item
267 if (success) 267 if (success)
268 { 268 {
269 workItem = waiterEntry.WorkItem; 269 workItem = waiterEntry.WorkItem;
270 270
271 if (null == workItem) 271 if (null == workItem)
272 { 272 {
273 workItem = _workItems.Dequeue() as WorkItem; 273 workItem = _workItems.Dequeue() as WorkItem;
274 } 274 }
275 } 275 }
276 } 276 }
277 // On failure return null. 277 // On failure return null.
278 return workItem; 278 return workItem;
279 } 279 }
280 280
281 /// <summary> 281 /// <summary>
282 /// Cleanup the work items queue, hence no more work 282 /// Cleanup the work items queue, hence no more work
283 /// items are allowed to be queue 283 /// items are allowed to be queue
284 /// </summary> 284 /// </summary>
285 private void Cleanup() 285 private void Cleanup()
@@ -303,19 +303,19 @@ namespace Amib.Threading.Internal
303 // Clear the work items that are already queued 303 // Clear the work items that are already queued
304 _workItems.Clear(); 304 _workItems.Clear();
305 305
306 // Note: 306 // Note:
307 // I don't iterate over the queue and dispose of work items's states, 307 // I don't iterate over the queue and dispose of work items's states,
308 // since if a work item has a state object that is still in use in the 308 // since if a work item has a state object that is still in use in the
309 // application then I must not dispose it. 309 // application then I must not dispose it.
310 310
311 // Tell the waiters that they were timed out. 311 // Tell the waiters that they were timed out.
312 // It won't signal them to exit, but to ignore their 312 // It won't signal them to exit, but to ignore their
313 // next work item. 313 // next work item.
314 while(_waitersCount > 0) 314 while(_waitersCount > 0)
315 { 315 {
316 WaiterEntry waiterEntry = PopWaiter(); 316 WaiterEntry waiterEntry = PopWaiter();
317 waiterEntry.Timeout(); 317 waiterEntry.Timeout();
318 } 318 }
319 } 319 }
320 } 320 }
321 321
@@ -334,275 +334,275 @@ namespace Amib.Threading.Internal
334 } 334 }
335 } 335 }
336 336
337 #endregion 337 #endregion
338 338
339 #region Private methods 339 #region Private methods
340 340
341 /// <summary> 341 /// <summary>
342 /// Returns the WaiterEntry of the current thread 342 /// Returns the WaiterEntry of the current thread
343 /// </summary> 343 /// </summary>
344 /// <returns></returns> 344 /// <returns></returns>
345 /// In order to avoid creation and destuction of WaiterEntry 345 /// In order to avoid creation and destuction of WaiterEntry
346 /// objects each thread has its own WaiterEntry object. 346 /// objects each thread has its own WaiterEntry object.
347 private static WaiterEntry GetThreadWaiterEntry() 347 private static WaiterEntry GetThreadWaiterEntry()
348 { 348 {
349 if (null == CurrentWaiterEntry) 349 if (null == CurrentWaiterEntry)
350 { 350 {
351 CurrentWaiterEntry = new WaiterEntry(); 351 CurrentWaiterEntry = new WaiterEntry();
352 } 352 }
353 CurrentWaiterEntry.Reset(); 353 CurrentWaiterEntry.Reset();
354 return CurrentWaiterEntry; 354 return CurrentWaiterEntry;
355 } 355 }
356 356
357 #region Waiters stack methods 357 #region Waiters stack methods
358 358
359 /// <summary> 359 /// <summary>
360 /// Push a new waiter into the waiter's stack 360 /// Push a new waiter into the waiter's stack
361 /// </summary> 361 /// </summary>
362 /// <param name="newWaiterEntry">A waiter to put in the stack</param> 362 /// <param name="newWaiterEntry">A waiter to put in the stack</param>
363 public void PushWaiter(WaiterEntry newWaiterEntry) 363 public void PushWaiter(WaiterEntry newWaiterEntry)
364 { 364 {
365 // Remove the waiter if it is already in the stack and 365 // Remove the waiter if it is already in the stack and
366 // update waiter's count as needed 366 // update waiter's count as needed
367 RemoveWaiter(newWaiterEntry, false); 367 RemoveWaiter(newWaiterEntry, false);
368 368
369 // If the stack is empty then newWaiterEntry is the new head of the stack 369 // If the stack is empty then newWaiterEntry is the new head of the stack
370 if (null == _headWaiterEntry._nextWaiterEntry) 370 if (null == _headWaiterEntry._nextWaiterEntry)
371 { 371 {
372 _headWaiterEntry._nextWaiterEntry = newWaiterEntry; 372 _headWaiterEntry._nextWaiterEntry = newWaiterEntry;
373 newWaiterEntry._prevWaiterEntry = _headWaiterEntry; 373 newWaiterEntry._prevWaiterEntry = _headWaiterEntry;
374 374
375 } 375 }
376 // If the stack is not empty then put newWaiterEntry as the new head 376 // If the stack is not empty then put newWaiterEntry as the new head
377 // of the stack. 377 // of the stack.
378 else 378 else
379 { 379 {
380 // Save the old first waiter entry 380 // Save the old first waiter entry
381 WaiterEntry oldFirstWaiterEntry = _headWaiterEntry._nextWaiterEntry; 381 WaiterEntry oldFirstWaiterEntry = _headWaiterEntry._nextWaiterEntry;
382 382
383 // Update the links 383 // Update the links
384 _headWaiterEntry._nextWaiterEntry = newWaiterEntry; 384 _headWaiterEntry._nextWaiterEntry = newWaiterEntry;
385 newWaiterEntry._nextWaiterEntry = oldFirstWaiterEntry; 385 newWaiterEntry._nextWaiterEntry = oldFirstWaiterEntry;
386 newWaiterEntry._prevWaiterEntry = _headWaiterEntry; 386 newWaiterEntry._prevWaiterEntry = _headWaiterEntry;
387 oldFirstWaiterEntry._prevWaiterEntry = newWaiterEntry; 387 oldFirstWaiterEntry._prevWaiterEntry = newWaiterEntry;
388 } 388 }
389 389
390 // Increment the number of waiters 390 // Increment the number of waiters
391 ++_waitersCount; 391 ++_waitersCount;
392 } 392 }
393 393
394 /// <summary> 394 /// <summary>
395 /// Pop a waiter from the waiter's stack 395 /// Pop a waiter from the waiter's stack
396 /// </summary> 396 /// </summary>
397 /// <returns>Returns the first waiter in the stack</returns> 397 /// <returns>Returns the first waiter in the stack</returns>
398 private WaiterEntry PopWaiter() 398 private WaiterEntry PopWaiter()
399 { 399 {
400 // Store the current stack head 400 // Store the current stack head
401 WaiterEntry oldFirstWaiterEntry = _headWaiterEntry._nextWaiterEntry; 401 WaiterEntry oldFirstWaiterEntry = _headWaiterEntry._nextWaiterEntry;
402 402
403 // Store the new stack head 403 // Store the new stack head
404 WaiterEntry newHeadWaiterEntry = oldFirstWaiterEntry._nextWaiterEntry; 404 WaiterEntry newHeadWaiterEntry = oldFirstWaiterEntry._nextWaiterEntry;
405 405
406 // Update the old stack head list links and decrement the number 406 // Update the old stack head list links and decrement the number
407 // waiters. 407 // waiters.
408 RemoveWaiter(oldFirstWaiterEntry, true); 408 RemoveWaiter(oldFirstWaiterEntry, true);
409 409
410 // Update the new stack head 410 // Update the new stack head
411 _headWaiterEntry._nextWaiterEntry = newHeadWaiterEntry; 411 _headWaiterEntry._nextWaiterEntry = newHeadWaiterEntry;
412 if (null != newHeadWaiterEntry) 412 if (null != newHeadWaiterEntry)
413 { 413 {
414 newHeadWaiterEntry._prevWaiterEntry = _headWaiterEntry; 414 newHeadWaiterEntry._prevWaiterEntry = _headWaiterEntry;
415 } 415 }
416 416
417 // Return the old stack head 417 // Return the old stack head
418 return oldFirstWaiterEntry; 418 return oldFirstWaiterEntry;
419 } 419 }
420 420
421 /// <summary> 421 /// <summary>
422 /// Remove a waiter from the stack 422 /// Remove a waiter from the stack
423 /// </summary> 423 /// </summary>
424 /// <param name="waiterEntry">A waiter entry to remove</param> 424 /// <param name="waiterEntry">A waiter entry to remove</param>
425 /// <param name="popDecrement">If true the waiter count is always decremented</param> 425 /// <param name="popDecrement">If true the waiter count is always decremented</param>
426 private void RemoveWaiter(WaiterEntry waiterEntry, bool popDecrement) 426 private void RemoveWaiter(WaiterEntry waiterEntry, bool popDecrement)
427 { 427 {
428 // Store the prev entry in the list 428 // Store the prev entry in the list
429 WaiterEntry prevWaiterEntry = waiterEntry._prevWaiterEntry; 429 WaiterEntry prevWaiterEntry = waiterEntry._prevWaiterEntry;
430 430
431 // Store the next entry in the list 431 // Store the next entry in the list
432 WaiterEntry nextWaiterEntry = waiterEntry._nextWaiterEntry; 432 WaiterEntry nextWaiterEntry = waiterEntry._nextWaiterEntry;
433 433
434 // A flag to indicate if we need to decrement the waiters count. 434 // A flag to indicate if we need to decrement the waiters count.
435 // If we got here from PopWaiter then we must decrement. 435 // If we got here from PopWaiter then we must decrement.
436 // If we got here from PushWaiter then we decrement only if 436 // If we got here from PushWaiter then we decrement only if
437 // the waiter was already in the stack. 437 // the waiter was already in the stack.
438 bool decrementCounter = popDecrement; 438 bool decrementCounter = popDecrement;
439 439
440 // Null the waiter's entry links 440 // Null the waiter's entry links
441 waiterEntry._prevWaiterEntry = null; 441 waiterEntry._prevWaiterEntry = null;
442 waiterEntry._nextWaiterEntry = null; 442 waiterEntry._nextWaiterEntry = null;
443 443
444 // If the waiter entry had a prev link then update it. 444 // If the waiter entry had a prev link then update it.
445 // It also means that the waiter is already in the list and we 445 // It also means that the waiter is already in the list and we
446 // need to decrement the waiters count. 446 // need to decrement the waiters count.
447 if (null != prevWaiterEntry) 447 if (null != prevWaiterEntry)
448 { 448 {
449 prevWaiterEntry._nextWaiterEntry = nextWaiterEntry; 449 prevWaiterEntry._nextWaiterEntry = nextWaiterEntry;
450 decrementCounter = true; 450 decrementCounter = true;
451 } 451 }
452 452
453 // If the waiter entry had a next link then update it. 453 // If the waiter entry had a next link then update it.
454 // It also means that the waiter is already in the list and we 454 // It also means that the waiter is already in the list and we
455 // need to decrement the waiters count. 455 // need to decrement the waiters count.
456 if (null != nextWaiterEntry) 456 if (null != nextWaiterEntry)
457 { 457 {
458 nextWaiterEntry._prevWaiterEntry = prevWaiterEntry; 458 nextWaiterEntry._prevWaiterEntry = prevWaiterEntry;
459 decrementCounter = true; 459 decrementCounter = true;
460 } 460 }
461 461
462 // Decrement the waiters count if needed 462 // Decrement the waiters count if needed
463 if (decrementCounter) 463 if (decrementCounter)
464 { 464 {
465 --_waitersCount; 465 --_waitersCount;
466 } 466 }
467 } 467 }
468 468
469 #endregion 469 #endregion
470 470
471 #endregion 471 #endregion
472 472
473 #region WaiterEntry class 473 #region WaiterEntry class
474 474
475 // A waiter entry in the _waiters queue. 475 // A waiter entry in the _waiters queue.
476 public sealed class WaiterEntry : IDisposable 476 public sealed class WaiterEntry : IDisposable
477 { 477 {
478 #region Member variables 478 #region Member variables
479 479
480 /// <summary> 480 /// <summary>
481 /// Event to signal the waiter that it got the work item. 481 /// Event to signal the waiter that it got the work item.
482 /// </summary> 482 /// </summary>
483 //private AutoResetEvent _waitHandle = new AutoResetEvent(false); 483 //private AutoResetEvent _waitHandle = new AutoResetEvent(false);
484 private AutoResetEvent _waitHandle = EventWaitHandleFactory.CreateAutoResetEvent(); 484 private AutoResetEvent _waitHandle = EventWaitHandleFactory.CreateAutoResetEvent();
485 485
486 /// <summary> 486 /// <summary>
487 /// Flag to know if this waiter already quited from the queue 487 /// Flag to know if this waiter already quited from the queue
488 /// because of a timeout. 488 /// because of a timeout.
489 /// </summary> 489 /// </summary>
490 private bool _isTimedout = false; 490 private bool _isTimedout = false;
491 491
492 /// <summary> 492 /// <summary>
493 /// Flag to know if the waiter was signaled and got a work item. 493 /// Flag to know if the waiter was signaled and got a work item.
494 /// </summary> 494 /// </summary>
495 private bool _isSignaled = false; 495 private bool _isSignaled = false;
496 496
497 /// <summary> 497 /// <summary>
498 /// A work item that passed directly to the waiter withou going 498 /// A work item that passed directly to the waiter withou going
499 /// through the queue 499 /// through the queue
500 /// </summary> 500 /// </summary>
501 private WorkItem _workItem = null; 501 private WorkItem _workItem = null;
502 502
503 private bool _isDisposed = false; 503 private bool _isDisposed = false;
504 504
505 // Linked list members 505 // Linked list members
506 internal WaiterEntry _nextWaiterEntry = null; 506 internal WaiterEntry _nextWaiterEntry = null;
507 internal WaiterEntry _prevWaiterEntry = null; 507 internal WaiterEntry _prevWaiterEntry = null;
508 508
509 #endregion 509 #endregion
510 510
511 #region Construction 511 #region Construction
512 512
513 public WaiterEntry() 513 public WaiterEntry()
514 { 514 {
515 Reset(); 515 Reset();
516 } 516 }
517 517
518 #endregion 518 #endregion
519 519
520 #region Public methods 520 #region Public methods
521 521
522 public WaitHandle WaitHandle 522 public WaitHandle WaitHandle
523 { 523 {
524 get { return _waitHandle; } 524 get { return _waitHandle; }
525 } 525 }
526 526
527 public WorkItem WorkItem 527 public WorkItem WorkItem
528 { 528 {
529 get 529 get
530 { 530 {
531 return _workItem; 531 return _workItem;
532 } 532 }
533 } 533 }
534 534
535 /// <summary> 535 /// <summary>
536 /// Signal the waiter that it got a work item. 536 /// Signal the waiter that it got a work item.
537 /// </summary> 537 /// </summary>
538 /// <returns>Return true on success</returns> 538 /// <returns>Return true on success</returns>
539 /// The method fails if Timeout() preceded its call 539 /// The method fails if Timeout() preceded its call
540 public bool Signal(WorkItem workItem) 540 public bool Signal(WorkItem workItem)
541 { 541 {
542 lock(this) 542 lock(this)
543 { 543 {
544 if (!_isTimedout) 544 if (!_isTimedout)
545 { 545 {
546 _workItem = workItem; 546 _workItem = workItem;
547 _isSignaled = true; 547 _isSignaled = true;
548 _waitHandle.Set(); 548 _waitHandle.Set();
549 return true; 549 return true;
550 } 550 }
551 } 551 }
552 return false; 552 return false;
553 } 553 }
554 554
555 /// <summary> 555 /// <summary>
556 /// Mark the wait entry that it has been timed out 556 /// Mark the wait entry that it has been timed out
557 /// </summary> 557 /// </summary>
558 /// <returns>Return true on success</returns> 558 /// <returns>Return true on success</returns>
559 /// The method fails if Signal() preceded its call 559 /// The method fails if Signal() preceded its call
560 public bool Timeout() 560 public bool Timeout()
561 { 561 {
562 lock(this) 562 lock(this)
563 { 563 {
564 // Time out can happen only if the waiter wasn't marked as 564 // Time out can happen only if the waiter wasn't marked as
565 // signaled 565 // signaled
566 if (!_isSignaled) 566 if (!_isSignaled)
567 { 567 {
568 // We don't remove the waiter from the queue, the DequeueWorkItem 568 // We don't remove the waiter from the queue, the DequeueWorkItem
569 // method skips _waiters that were timed out. 569 // method skips _waiters that were timed out.
570 _isTimedout = true; 570 _isTimedout = true;
571 return true; 571 return true;
572 } 572 }
573 } 573 }
574 return false; 574 return false;
575 } 575 }
576 576
577 /// <summary> 577 /// <summary>
578 /// Reset the wait entry so it can be used again 578 /// Reset the wait entry so it can be used again
579 /// </summary> 579 /// </summary>
580 public void Reset() 580 public void Reset()
581 { 581 {
582 _workItem = null; 582 _workItem = null;
583 _isTimedout = false; 583 _isTimedout = false;
584 _isSignaled = false; 584 _isSignaled = false;
585 _waitHandle.Reset(); 585 _waitHandle.Reset();
586 } 586 }
587 587
588 /// <summary> 588 /// <summary>
589 /// Free resources 589 /// Free resources
590 /// </summary> 590 /// </summary>
591 public void Close() 591 public void Close()
592 { 592 {
593 if (null != _waitHandle) 593 if (null != _waitHandle)
594 { 594 {
595 _waitHandle.Close(); 595 _waitHandle.Close();
596 _waitHandle = null; 596 _waitHandle = null;
597 } 597 }
598 } 598 }
599 599
600 #endregion 600 #endregion
601 601
602 #region IDisposable Members 602 #region IDisposable Members
603 603
604 public void Dispose() 604 public void Dispose()
605 { 605 {
606 lock (this) 606 lock (this)
607 { 607 {
608 if (!_isDisposed) 608 if (!_isDisposed)
@@ -613,10 +613,10 @@ namespace Amib.Threading.Internal
613 } 613 }
614 } 614 }
615 615
616 #endregion 616 #endregion
617 } 617 }
618 618
619 #endregion 619 #endregion
620 620
621 #region IDisposable Members 621 #region IDisposable Members
622 622
@@ -625,7 +625,7 @@ namespace Amib.Threading.Internal
625 if (!_isDisposed) 625 if (!_isDisposed)
626 { 626 {
627 Cleanup(); 627 Cleanup();
628 _headWaiterEntry.Close(); 628 _headWaiterEntry.Close();
629 } 629 }
630 _isDisposed = true; 630 _isDisposed = true;
631 } 631 }
@@ -641,6 +641,6 @@ namespace Amib.Threading.Internal
641 #endregion 641 #endregion
642 } 642 }
643 643
644 #endregion 644 #endregion
645} 645}
646 646