From 802a969267da9ed2780ea66c736c3d531e336dfa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 21:32:03 +0000 Subject: Fix http://opensimulator.org/mantis/view.php?id=4224 This resolves the problem where eyes and hair would turn white on standalone configurations When a client receives body part information, for some insane reason or other it always ends up uploading this back to the server and then immediately re-requesting it. This should have been okay since we stored that asset in cache. However, the standalone asset service connector was not checking this cache properly, so every time the client made the request for the asset it has just loaded it would get a big fat null back in the face, causing it to make clothes and hair white. This bug did not affect grids since they use a different service connector. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 6 +-- .../AssetTransaction/AssetTransactionModule.cs | 8 +++- .../Agent/AssetTransaction/AssetXferUploader.cs | 3 +- .../Region/CoreModules/Asset/CenomeAssetCache.cs | 27 ++++++------ .../Asset/LocalAssetServiceConnector.cs | 48 ++++++++++++---------- .../Inventory/LocalInventoryServiceConnector.cs | 25 +++++++---- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 + 8 files changed, 70 insertions(+), 50 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6dc6f01..e38232c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3301,9 +3301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP awb.ItemID = wearables[i].ItemID; aw.WearableData[i] = awb; - // m_log.DebugFormat( - // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", - // awb.ItemID, awb.AssetID, i, Name); +// m_log.DebugFormat( +// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", +// awb.ItemID, awb.AssetID, i, Name); } OutPacket(aw, ThrottleOutPacketType.Task); diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 1077f4a..7e08ecf 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs @@ -27,6 +27,8 @@ using System; using System.Collections.Generic; +using System.Reflection; +using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,6 +39,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction { public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions { +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private readonly Dictionary RegisteredScenes = new Dictionary(); private bool m_dumpAssetsToFile = false; private Scene m_scene = null; @@ -226,7 +230,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile) { - //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); +// m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); + if (((AssetType)type == AssetType.Texture || (AssetType)type == AssetType.Sound || (AssetType)type == AssetType.TextureTGA || @@ -246,7 +251,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction } } - //m_log.Debug("asset upload of " + assetID); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); AssetXferUploader uploader = transactions.RequestXferUploader(transaction); diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index f698ea1..fa92fe8 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs @@ -154,7 +154,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); } - m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); + m_log.DebugFormat( + "[ASSET TRANSACTIONS]: Uploaded asset {0} for transaction {1}", m_asset.FullID, TransactionID); if (m_dumpAssetToFile) { diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index 1add0ab..1903eb9 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs @@ -91,6 +91,8 @@ namespace OpenSim.Region.CoreModules.Asset /// public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// /// Cache's default maximal asset count. /// @@ -115,12 +117,7 @@ namespace OpenSim.Region.CoreModules.Asset /// Asset's default expiration time in the cache. /// public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); - - /// - /// Log manager instance. - /// - private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + /// /// Cache object. /// @@ -170,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Asset { if (maximalSize <= 0 || maximalCount <= 0) { - //Log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); + //m_log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); m_enabled = false; return; } @@ -186,7 +183,7 @@ namespace OpenSim.Region.CoreModules.Asset CnmSynchronizedCache.Synchronized(new CnmMemoryCache( maximalSize, maximalCount, expirationTime)); m_enabled = true; - Log.DebugFormat( + m_log.DebugFormat( "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})", maximalSize, maximalCount, @@ -205,6 +202,8 @@ namespace OpenSim.Region.CoreModules.Asset { if (asset != null) { +// m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); + long size = asset.Data != null ? asset.Data.Length : 1; m_cache.Set(asset.ID, asset, size); m_cachedCount++; @@ -255,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Asset if (m_getCount == m_debugEpoch) { - Log.DebugFormat( + m_log.DebugFormat( "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes", m_cachedCount, m_getCount, @@ -267,6 +266,9 @@ namespace OpenSim.Region.CoreModules.Asset m_cachedCount = 0; } +// if (null == assetBase) +// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); + return assetBase; } @@ -325,12 +327,11 @@ namespace OpenSim.Region.CoreModules.Asset return; string name = moduleConfig.GetString("AssetCaching"); - //Log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); + //m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); if (name != Name) - return; - - // This module is used + return; + long maxSize = DefaultMaxSize; int maxCount = DefaultMaxCount; TimeSpan expirationTime = DefaultExpirationTime; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index fd3aaf4..2f21e6d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs @@ -38,12 +38,9 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset { - public class LocalAssetServicesConnector : - ISharedRegionModule, IAssetService + public class LocalAssetServicesConnector : ISharedRegionModule, IAssetService { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IImprovedAssetCache m_Cache = null; @@ -72,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset IConfig assetConfig = source.Configs["AssetService"]; if (assetConfig == null) { - m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); + m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: AssetService missing from OpenSim.ini"); return; } @@ -81,22 +78,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset if (serviceDll == String.Empty) { - m_log.Error("[ASSET CONNECTOR]: No LocalServiceModule named in section AssetService"); + m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: No LocalServiceModule named in section AssetService"); return; } Object[] args = new Object[] { source }; - m_AssetService = - ServerUtils.LoadPlugin(serviceDll, - args); + m_AssetService = ServerUtils.LoadPlugin(serviceDll, args); if (m_AssetService == null) { - m_log.Error("[ASSET CONNECTOR]: Can't load asset service"); + m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: Can't load asset service"); return; } m_Enabled = true; - m_log.Info("[ASSET CONNECTOR]: Local asset connector enabled"); + m_log.Info("[LOCAL ASSET SERVICES CONNECTOR]: Local asset connector enabled"); } } } @@ -134,11 +129,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset m_Cache = null; } - m_log.InfoFormat("[ASSET CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); + m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); if (m_Cache != null) { - m_log.InfoFormat("[ASSET CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); + m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); } else { @@ -151,6 +146,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset public AssetBase Get(string id) { +// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id); + AssetBase asset = null; if (m_Cache != null) asset = m_Cache.Get(id); @@ -160,7 +157,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset asset = m_AssetService.Get(id); if ((m_Cache != null) && (asset != null)) m_Cache.Cache(asset); + +// if (null == asset) +// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id); } + return asset; } @@ -204,15 +205,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset public bool Get(string id, Object sender, AssetRetrieved handler) { - AssetBase asset = null; - +// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id); + if (m_Cache != null) - m_Cache.Get(id); - - if (asset != null) { - Util.FireAndForget(delegate { handler(id, sender, asset); }); - return true; + AssetBase asset = m_Cache.Get(id); + + if (asset != null) + { + Util.FireAndForget(delegate { handler(id, sender, asset); }); + return true; + } } return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) @@ -220,6 +223,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset if ((a != null) && (m_Cache != null)) m_Cache.Cache(a); +// if (null == a) +// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id); + Util.FireAndForget(delegate { handler(assetID, s, a); }); }); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 66d11dd..3883dc6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory IConfig inventoryConfig = source.Configs["InventoryService"]; if (inventoryConfig == null) { - m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); + m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: InventoryService missing from OpenSim.ini"); return; } @@ -81,18 +81,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory if (serviceDll == String.Empty) { - m_log.Error("[INVENTORY CONNECTOR]: No LocalServiceModule named in section InventoryService"); + m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: No LocalServiceModule named in section InventoryService"); return; } Object[] args = new Object[] { source }; - m_log.DebugFormat("[INVENTORY CONNECTOR]: Service dll = {0}", serviceDll); + m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Service dll = {0}", serviceDll); m_InventoryService = ServerUtils.LoadPlugin(serviceDll, args); if (m_InventoryService == null) { - m_log.Error("[INVENTORY CONNECTOR]: Can't load inventory service"); + m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service"); //return; throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } @@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory Init(source); m_Enabled = true; - m_log.Info("[INVENTORY CONNECTOR]: Local inventory connector enabled"); + m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled"); } } } @@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } // m_log.DebugFormat( -// "[INVENTORY CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); +// "[LOCAL INVENTORY SERVICES CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); scene.RegisterModuleInterface(this); m_cache.AddRegion(scene); @@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return; m_log.InfoFormat( - "[INVENTORY CONNECTOR]: Enabled local invnetory for region {0}", scene.RegionInfo.RegionName); + "[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName); } #region IInventoryService @@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return folders; } } - m_log.WarnFormat("[INVENTORY CONNECTOR]: System folders for {0} not found", userID); + m_log.WarnFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: System folders for {0} not found", userID); return new Dictionary(); } @@ -312,7 +312,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public override InventoryItemBase GetItem(InventoryItemBase item) { - return m_InventoryService.GetItem(item); +// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); + + item = m_InventoryService.GetItem(item); + + if (null == item) + m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}"); + + return item; } public override InventoryFolderBase GetFolder(InventoryFolderBase folder) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ddebd0b..2909311 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3120,7 +3120,6 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); appearance = new AvatarAppearance(client.AgentId); } - } /// diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6b95624..9c7559b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2505,6 +2505,8 @@ namespace OpenSim.Region.Framework.Scenes /// public void SendWearables() { + m_log.DebugFormat("[SCENE]: Received request for wearables of {0}", Name); + ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); } -- cgit v1.1 From aad95fcff5e03a48dbc1586b86d51b4b0ed88290 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 22:45:59 +0000 Subject: minor: remove completely commented out and unused class --- .../AgentAssetTransactionsManager.cs | 226 --------------------- 1 file changed, 226 deletions(-) delete mode 100644 OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs deleted file mode 100644 index 9c646b6..0000000 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -//using System.Reflection; -//using log4net; - -namespace OpenSim.Region.CoreModules.Agent.AssetTransaction -{ - /* - public class AgentAssetTransactionsManager - { - //private static readonly ILog m_log - // = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - /// - /// Each agent has its own singleton collection of transactions - /// - private Dictionary AgentTransactions = - new Dictionary(); - - /// - /// Should we dump uploaded assets to the filesystem? - /// - private bool m_dumpAssetsToFile; - - public Scene MyScene; - - public AgentAssetTransactionsManager(Scene scene, bool dumpAssetsToFile) - { - MyScene = scene; - m_dumpAssetsToFile = dumpAssetsToFile; - } - - /// - /// Get the collection of asset transactions for the given user. If one does not already exist, it - /// is created. - /// - /// - /// - private AgentAssetTransactions GetUserTransactions(UUID userID) - { - lock (AgentTransactions) - { - if (!AgentTransactions.ContainsKey(userID)) - { - AgentAssetTransactions transactions = null; - //= new AgentAssetTransactions(userID, this, m_dumpAssetsToFile); - AgentTransactions.Add(userID, transactions); - } - - return AgentTransactions[userID]; - } - } - - /// - /// Remove the given agent asset transactions. This should be called when a client is departing - /// from a scene (and hence won't be making any more transactions here). - /// - /// - public void RemoveAgentAssetTransactions(UUID userID) - { - // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); - - lock (AgentTransactions) - { - AgentTransactions.Remove(userID); - } - } - - /// - /// Create an inventory item from data that has been received through a transaction. - /// - /// This is called when new clothing or body parts are created. It may also be called in other - /// situations. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, - uint callbackID, string description, string name, sbyte invType, - sbyte type, byte wearableType, uint nextOwnerMask) - { -// m_log.DebugFormat( -// "[TRANSACTIONS MANAGER] Called HandleItemCreationFromTransaction with item {0}", name); - - AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); - - transactions.RequestCreateInventoryItem( - remoteClient, transactionID, folderID, callbackID, description, - name, invType, type, wearableType, nextOwnerMask); - } - - /// - /// Update an inventory item with data that has been received through a transaction. - /// - /// This is called when clothing or body parts are updated (for instance, with new textures or - /// colours). It may also be called in other situations. - /// - /// - /// - /// - public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, - InventoryItemBase item) - { -// m_log.DebugFormat( -// "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}", -// item.Name); - - AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); - - transactions.RequestUpdateInventoryItem(remoteClient, transactionID, item); - } - - /// - /// Update a task inventory item with data that has been received through a transaction. - /// - /// This is currently called when, for instance, a notecard in a prim is saved. The data is sent - /// up through a single AssetUploadRequest. A subsequent UpdateTaskInventory then references the transaction - /// and comes through this method. - /// - /// - /// - /// - public void HandleTaskItemUpdateFromTransaction( - IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item) - { -// m_log.DebugFormat( -// "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0}", -// item.Name); - - AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); - - transactions.RequestUpdateTaskInventoryItem(remoteClient, part, transactionID, item); - } - - /// - /// Request that a client (agent) begin an asset transfer. - /// - /// - /// - /// - /// - /// - /// - public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, - byte[] data, bool storeLocal, bool tempFile) - { - //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); - if (((AssetType)type == AssetType.Texture || - (AssetType)type == AssetType.Sound || - (AssetType)type == AssetType.TextureTGA || - (AssetType)type == AssetType.Animation) && - tempFile == false) - { - Scene scene = (Scene)remoteClient.Scene; - IMoneyModule mm = scene.RequestModuleInterface(); - - if (mm != null) - { - if (!mm.UploadCovered(remoteClient)) - { - remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); - return; - } - } - } - - //m_log.Debug("asset upload of " + assetID); - AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); - - AssetXferUploader uploader = transactions.RequestXferUploader(transaction); - if (uploader != null) - { - uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); - } - } - - /// - /// Handle asset transfer data packets received in response to the asset upload request in - /// HandleUDPUploadRequest() - /// - /// - /// - /// - /// - public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) - { - //m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!"); - AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); - - transactions.HandleXfer(xferID, packetID, data); - } - } - */ -} -- cgit v1.1 From 00800c59d35662d65aeb61a17de0d56fa6196509 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 23:13:35 +0000 Subject: Apply last two patches from http://opensimulator.org/mantis/view.php?id=3522 These patch should allow people using systems that do not have their locale set to En_US or similar to use OpenSim without suffering effects such as being a million miles up in the air on login. The problem was caused by parsing strings without forcing that parse to be En_US (hence different decimal and digit group symbols were causing problems). Thanks very much to VikingErik for doing the legwork on this fix and phacelia for spotting it in the first place. --- OpenSim/Region/Application/OpenSim.cs | 6 ++-- .../Region/ClientStack/LindenUDP/LLClientView.cs | 36 +++++++++++----------- .../Communications/OGS1/OGS1UserDataPlugin.cs | 12 ++++---- .../Framework/InterfaceCommander/Command.cs | 2 +- .../World/Estate/EstateManagementModule.cs | 4 +-- .../World/TreePopulator/TreePopulatorModule.cs | 6 ++-- .../Shared/Instance/ScriptSerializer.cs | 2 +- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 32 +++++++++---------- 8 files changed, 50 insertions(+), 50 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index eccd276..a86a831 100755 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1183,14 +1183,14 @@ namespace OpenSim } if (cmdparams.Length > 4) { - loadOffset.X = (float) Convert.ToDecimal(cmdparams[4]); + loadOffset.X = (float)Convert.ToDecimal(cmdparams[4], Culture.NumberFormatInfo); if (cmdparams.Length > 5) { - loadOffset.Y = (float) Convert.ToDecimal(cmdparams[5]); + loadOffset.Y = (float)Convert.ToDecimal(cmdparams[5], Culture.NumberFormatInfo); } if (cmdparams.Length > 6) { - loadOffset.Z = (float) Convert.ToDecimal(cmdparams[6]); + loadOffset.Z = (float)Convert.ToDecimal(cmdparams[6], Culture.NumberFormatInfo); } MainConsole.Instance.Output(String.Format("loadOffsets = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e38232c..e39323f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -8307,8 +8307,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), - Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), - (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), + Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), + (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); } @@ -8356,8 +8356,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (splitField.Length == 3) { Int16 corner = Convert.ToInt16(splitField[0]); - float lowValue = (float)Convert.ToDecimal(splitField[1]); - float highValue = (float)Convert.ToDecimal(splitField[2]); + float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); + float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); } @@ -8380,19 +8380,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP { string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); if (!tmp.Contains(".")) tmp += ".00"; - float WaterHeight = (float)Convert.ToDecimal(tmp); + float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); if (!tmp.Contains(".")) tmp += ".00"; - float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); + float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); if (!tmp.Contains(".")) tmp += ".00"; - float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); + float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); - float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); + float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); - float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); + float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); @@ -13924,8 +13924,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), - Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), - (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), + Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), + (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); } @@ -13973,8 +13973,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (splitField.Length == 3) { Int16 corner = Convert.ToInt16(splitField[0]); - float lowValue = (float)Convert.ToDecimal(splitField[1]); - float highValue = (float)Convert.ToDecimal(splitField[2]); + float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); + float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); } @@ -13997,19 +13997,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP { string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); if (!tmp.Contains(".")) tmp += ".00"; - float WaterHeight = (float)Convert.ToDecimal(tmp); + float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); if (!tmp.Contains(".")) tmp += ".00"; - float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); + float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); if (!tmp.Contains(".")) tmp += ".00"; - float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); + float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); - float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); + float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); - float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); + float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs index 776d5d1..cb1766a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs @@ -673,13 +673,13 @@ namespace OpenSim.Region.Communications.OGS1 else userData.HomeRegionID = UUID.Zero; userData.HomeLocation = - new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), - (float)Convert.ToDecimal((string)data["home_coordinates_y"]), - (float)Convert.ToDecimal((string)data["home_coordinates_z"])); + new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_coordinates_y"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_coordinates_z"], Culture.NumberFormatInfo)); userData.HomeLookAt = - new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]), - (float)Convert.ToDecimal((string)data["home_look_y"]), - (float)Convert.ToDecimal((string)data["home_look_z"])); + new Vector3((float)Convert.ToDecimal((string)data["home_look_x"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_look_y"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_look_z"], Culture.NumberFormatInfo)); if (data.Contains("user_flags")) userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); if (data.Contains("god_level")) diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs index 9fe669a..4004135 100644 --- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs +++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs @@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); break; case "Double": - m_args[i].ArgumentValue = Double.Parse(arg.ToString()); + m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo); break; case "Boolean": m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 695cced..03da269 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -974,8 +974,8 @@ namespace OpenSim.Region.CoreModules.World.Estate if (y == -1 || m_scene.RegionInfo.RegionLocY == y) { int corner = int.Parse(num); - float lowValue = float.Parse(min); - float highValue = float.Parse(max); + float lowValue = float.Parse(min, Culture.NumberFormatInfo); + float highValue = float.Parse(max, Culture.NumberFormatInfo); m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index e3fbb6e..c8e6e4b 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -104,9 +104,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator this.m_name = field[1].Trim(); this.m_frozen = (copsedef[0] == 'F'); this.m_tree_quantity = int.Parse(field[2]); - this.m_treeline_high = float.Parse(field[3]); - this.m_treeline_low = float.Parse(field[4]); - this.m_range = double.Parse(field[5]); + this.m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo); + this.m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo); + this.m_range = double.Parse(field[5], Culture.NumberFormatInfo); this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); this.m_seed_point = Vector3.Parse(field[7]); this.m_initial_scale = Vector3.Parse(field[8]); diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs index bf3d335..bcdc7bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs @@ -389,7 +389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance break; case "MinEventDelay": double minEventDelay = 0.0; - double.TryParse(part.InnerText, out minEventDelay); + double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay); instance.MinEventDelay = minEventDelay; break; } diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index faf9c40..e87b1f4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared return; } bool res; - res = Double.TryParse(tmps[0], out x); - res = res & Double.TryParse(tmps[1], out y); - res = res & Double.TryParse(tmps[2], out z); + res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); + res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); + res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); } #endregion @@ -309,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared return; } bool res; - res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x); - res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y); - res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z); - res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s); + res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); + res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); + res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); + res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s); if (x == 0 && y == 0 && z == 0 && s == 0) s = 1; } @@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared double entry; for (int i = 0; i < Data.Length; i++) { - if (double.TryParse(Data[i].ToString(), out entry)) + if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) { if (entry < minimum) minimum = entry; } @@ -1029,7 +1029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared double entry; for (int i = 0; i < Data.Length; i++) { - if (double.TryParse(Data[i].ToString(), out entry)) + if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) { if (entry > maximum) maximum = entry; } @@ -1048,7 +1048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared double entry; for (int i = 0; i < Data.Length; i++) { - if (double.TryParse(Data[i].ToString(), out entry)) + if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) { count++; } @@ -1062,7 +1062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared double entry; for (int i = 0; i < src.Data.Length - 1; i++) { - if (double.TryParse(src.Data[i].ToString(), out entry)) + if (double.TryParse(src.Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) { ret.Add(entry); } @@ -1076,7 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared double entry; for (int i = 0; i < Data.Length; i++) { - if (double.TryParse(Data[i].ToString(), out entry)) + if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) { sum = sum + entry; } @@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.Shared double entry; for (int i = 0; i < Data.Length; i++) { - if (double.TryParse(Data[i].ToString(), out entry)) + if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) { sum = sum + Math.Pow(entry, 2); } @@ -1213,11 +1213,11 @@ namespace OpenSim.Region.ScriptEngine.Shared { double a; double b; - if (!double.TryParse(x.ToString(), out a)) + if (!double.TryParse(x.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out a)) { a = 0.0; } - if (!double.TryParse(y.ToString(), out b)) + if (!double.TryParse(y.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out b)) { b = 0.0; } @@ -1857,7 +1857,7 @@ namespace OpenSim.Region.ScriptEngine.Shared else if (v.EndsWith(".")) v = v + "0"; - this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider); + this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.NumberFormatInfo); } #endregion -- cgit v1.1