aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2010-02-14 22:27:39 +0000
committerMelanie2010-02-14 22:27:39 +0000
commit2084e08ad7a24908a4465108f2b76ee639c91ae6 (patch)
tree1cc1aa8f1c08de402f27036762b9ac2d1eccabfe /OpenSim/Region/CoreModules
parentResolve a merge issue (diff)
parent* SQLite match code casing with regionsettings table field casing (what's wit... (diff)
downloadopensim-SC_OLD-2084e08ad7a24908a4465108f2b76ee639c91ae6.zip
opensim-SC_OLD-2084e08ad7a24908a4465108f2b76ee639c91ae6.tar.gz
opensim-SC_OLD-2084e08ad7a24908a4465108f2b76ee639c91ae6.tar.bz2
opensim-SC_OLD-2084e08ad7a24908a4465108f2b76ee639c91ae6.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetTransactionsManager.cs226
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs3
-rw-r--r--OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs27
-rw-r--r--OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs48
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs25
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs4
8 files changed, 68 insertions, 275 deletions
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 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28//using System.Reflection;
29//using log4net;
30
31namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
32{
33 /*
34 public class AgentAssetTransactionsManager
35 {
36 //private static readonly ILog m_log
37 // = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
38
39 /// <summary>
40 /// Each agent has its own singleton collection of transactions
41 /// </summary>
42 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
43 new Dictionary<UUID, AgentAssetTransactions>();
44
45 /// <summary>
46 /// Should we dump uploaded assets to the filesystem?
47 /// </summary>
48 private bool m_dumpAssetsToFile;
49
50 public Scene MyScene;
51
52 public AgentAssetTransactionsManager(Scene scene, bool dumpAssetsToFile)
53 {
54 MyScene = scene;
55 m_dumpAssetsToFile = dumpAssetsToFile;
56 }
57
58 /// <summary>
59 /// Get the collection of asset transactions for the given user. If one does not already exist, it
60 /// is created.
61 /// </summary>
62 /// <param name="userID"></param>
63 /// <returns></returns>
64 private AgentAssetTransactions GetUserTransactions(UUID userID)
65 {
66 lock (AgentTransactions)
67 {
68 if (!AgentTransactions.ContainsKey(userID))
69 {
70 AgentAssetTransactions transactions = null;
71 //= new AgentAssetTransactions(userID, this, m_dumpAssetsToFile);
72 AgentTransactions.Add(userID, transactions);
73 }
74
75 return AgentTransactions[userID];
76 }
77 }
78
79 /// <summary>
80 /// Remove the given agent asset transactions. This should be called when a client is departing
81 /// from a scene (and hence won't be making any more transactions here).
82 /// </summary>
83 /// <param name="userID"></param>
84 public void RemoveAgentAssetTransactions(UUID userID)
85 {
86 // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID);
87
88 lock (AgentTransactions)
89 {
90 AgentTransactions.Remove(userID);
91 }
92 }
93
94 /// <summary>
95 /// Create an inventory item from data that has been received through a transaction.
96 ///
97 /// This is called when new clothing or body parts are created. It may also be called in other
98 /// situations.
99 /// </summary>
100 /// <param name="remoteClient"></param>
101 /// <param name="transactionID"></param>
102 /// <param name="folderID"></param>
103 /// <param name="callbackID"></param>
104 /// <param name="description"></param>
105 /// <param name="name"></param>
106 /// <param name="invType"></param>
107 /// <param name="type"></param>
108 /// <param name="wearableType"></param>
109 /// <param name="nextOwnerMask"></param>
110 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
111 uint callbackID, string description, string name, sbyte invType,
112 sbyte type, byte wearableType, uint nextOwnerMask)
113 {
114// m_log.DebugFormat(
115// "[TRANSACTIONS MANAGER] Called HandleItemCreationFromTransaction with item {0}", name);
116
117 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
118
119 transactions.RequestCreateInventoryItem(
120 remoteClient, transactionID, folderID, callbackID, description,
121 name, invType, type, wearableType, nextOwnerMask);
122 }
123
124 /// <summary>
125 /// Update an inventory item with data that has been received through a transaction.
126 ///
127 /// This is called when clothing or body parts are updated (for instance, with new textures or
128 /// colours). It may also be called in other situations.
129 /// </summary>
130 /// <param name="remoteClient"></param>
131 /// <param name="transactionID"></param>
132 /// <param name="item"></param>
133 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
134 InventoryItemBase item)
135 {
136// m_log.DebugFormat(
137// "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}",
138// item.Name);
139
140 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
141
142 transactions.RequestUpdateInventoryItem(remoteClient, transactionID, item);
143 }
144
145 /// <summary>
146 /// Update a task inventory item with data that has been received through a transaction.
147 ///
148 /// This is currently called when, for instance, a notecard in a prim is saved. The data is sent
149 /// up through a single AssetUploadRequest. A subsequent UpdateTaskInventory then references the transaction
150 /// and comes through this method.
151 /// </summary>
152 /// <param name="remoteClient"></param>
153 /// <param name="transactionID"></param>
154 /// <param name="item"></param>
155 public void HandleTaskItemUpdateFromTransaction(
156 IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item)
157 {
158// m_log.DebugFormat(
159// "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0}",
160// item.Name);
161
162 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
163
164 transactions.RequestUpdateTaskInventoryItem(remoteClient, part, transactionID, item);
165 }
166
167 /// <summary>
168 /// Request that a client (agent) begin an asset transfer.
169 /// </summary>
170 /// <param name="remoteClient"></param>
171 /// <param name="assetID"></param>
172 /// <param name="transaction"></param>
173 /// <param name="type"></param>
174 /// <param name="data"></param></param>
175 /// <param name="tempFile"></param>
176 public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
177 byte[] data, bool storeLocal, bool tempFile)
178 {
179 //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
180 if (((AssetType)type == AssetType.Texture ||
181 (AssetType)type == AssetType.Sound ||
182 (AssetType)type == AssetType.TextureTGA ||
183 (AssetType)type == AssetType.Animation) &&
184 tempFile == false)
185 {
186 Scene scene = (Scene)remoteClient.Scene;
187 IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>();
188
189 if (mm != null)
190 {
191 if (!mm.UploadCovered(remoteClient))
192 {
193 remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
194 return;
195 }
196 }
197 }
198
199 //m_log.Debug("asset upload of " + assetID);
200 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
201
202 AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
203 if (uploader != null)
204 {
205 uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile);
206 }
207 }
208
209 /// <summary>
210 /// Handle asset transfer data packets received in response to the asset upload request in
211 /// HandleUDPUploadRequest()
212 /// </summary>
213 /// <param name="remoteClient"></param>
214 /// <param name="xferID"></param>
215 /// <param name="packetID"></param>
216 /// <param name="data"></param>
217 public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
218 {
219 //m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
220 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
221
222 transactions.HandleXfer(xferID, packetID, data);
223 }
224 }
225 */
226}
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 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
30using Nini.Config; 32using Nini.Config;
31using OpenMetaverse; 33using OpenMetaverse;
32using OpenSim.Framework; 34using OpenSim.Framework;
@@ -37,6 +39,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
37{ 39{
38 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions 40 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
39 { 41 {
42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
40 private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); 44 private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
41 private bool m_dumpAssetsToFile = false; 45 private bool m_dumpAssetsToFile = false;
42 private Scene m_scene = null; 46 private Scene m_scene = null;
@@ -226,7 +230,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
226 public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, 230 public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
227 byte[] data, bool storeLocal, bool tempFile) 231 byte[] data, bool storeLocal, bool tempFile)
228 { 232 {
229 //m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); 233// m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
234
230 if (((AssetType)type == AssetType.Texture || 235 if (((AssetType)type == AssetType.Texture ||
231 (AssetType)type == AssetType.Sound || 236 (AssetType)type == AssetType.Sound ||
232 (AssetType)type == AssetType.TextureTGA || 237 (AssetType)type == AssetType.TextureTGA ||
@@ -246,7 +251,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
246 } 251 }
247 } 252 }
248 253
249 //m_log.Debug("asset upload of " + assetID);
250 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); 254 AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
251 255
252 AssetXferUploader uploader = transactions.RequestXferUploader(transaction); 256 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
154 m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); 154 m_userTransactions.Manager.MyScene.AssetService.Store(m_asset);
155 } 155 }
156 156
157 m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); 157 m_log.DebugFormat(
158 "[ASSET TRANSACTIONS]: Uploaded asset {0} for transaction {1}", m_asset.FullID, TransactionID);
158 159
159 if (m_dumpAssetToFile) 160 if (m_dumpAssetToFile)
160 { 161 {
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
91 /// </example> 91 /// </example>
92 public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule 92 public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule
93 { 93 {
94 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
95
94 /// <summary> 96 /// <summary>
95 /// Cache's default maximal asset count. 97 /// Cache's default maximal asset count.
96 /// </summary> 98 /// </summary>
@@ -115,12 +117,7 @@ namespace OpenSim.Region.CoreModules.Asset
115 /// Asset's default expiration time in the cache. 117 /// Asset's default expiration time in the cache.
116 /// </summary> 118 /// </summary>
117 public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); 119 public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0);
118 120
119 /// <summary>
120 /// Log manager instance.
121 /// </summary>
122 private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
123
124 /// <summary> 121 /// <summary>
125 /// Cache object. 122 /// Cache object.
126 /// </summary> 123 /// </summary>
@@ -170,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Asset
170 { 167 {
171 if (maximalSize <= 0 || maximalCount <= 0) 168 if (maximalSize <= 0 || maximalCount <= 0)
172 { 169 {
173 //Log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled."); 170 //m_log.Debug("[ASSET CACHE]: Cenome asset cache is not enabled.");
174 m_enabled = false; 171 m_enabled = false;
175 return; 172 return;
176 } 173 }
@@ -186,7 +183,7 @@ namespace OpenSim.Region.CoreModules.Asset
186 CnmSynchronizedCache<string, AssetBase>.Synchronized(new CnmMemoryCache<string, AssetBase>( 183 CnmSynchronizedCache<string, AssetBase>.Synchronized(new CnmMemoryCache<string, AssetBase>(
187 maximalSize, maximalCount, expirationTime)); 184 maximalSize, maximalCount, expirationTime));
188 m_enabled = true; 185 m_enabled = true;
189 Log.DebugFormat( 186 m_log.DebugFormat(
190 "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})", 187 "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = {0} bytes, MaxCount = {1}, ExpirationTime = {2})",
191 maximalSize, 188 maximalSize,
192 maximalCount, 189 maximalCount,
@@ -205,6 +202,8 @@ namespace OpenSim.Region.CoreModules.Asset
205 { 202 {
206 if (asset != null) 203 if (asset != null)
207 { 204 {
205// m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID);
206
208 long size = asset.Data != null ? asset.Data.Length : 1; 207 long size = asset.Data != null ? asset.Data.Length : 1;
209 m_cache.Set(asset.ID, asset, size); 208 m_cache.Set(asset.ID, asset, size);
210 m_cachedCount++; 209 m_cachedCount++;
@@ -255,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Asset
255 254
256 if (m_getCount == m_debugEpoch) 255 if (m_getCount == m_debugEpoch)
257 { 256 {
258 Log.DebugFormat( 257 m_log.DebugFormat(
259 "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes", 258 "[ASSET CACHE]: Cached = {0}, Get = {1}, Hits = {2}%, Size = {3} bytes, Avg. A. Size = {4} bytes",
260 m_cachedCount, 259 m_cachedCount,
261 m_getCount, 260 m_getCount,
@@ -267,6 +266,9 @@ namespace OpenSim.Region.CoreModules.Asset
267 m_cachedCount = 0; 266 m_cachedCount = 0;
268 } 267 }
269 268
269// if (null == assetBase)
270// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id);
271
270 return assetBase; 272 return assetBase;
271 } 273 }
272 274
@@ -325,12 +327,11 @@ namespace OpenSim.Region.CoreModules.Asset
325 return; 327 return;
326 328
327 string name = moduleConfig.GetString("AssetCaching"); 329 string name = moduleConfig.GetString("AssetCaching");
328 //Log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); 330 //m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name);
329 331
330 if (name != Name) 332 if (name != Name)
331 return; 333 return;
332 334
333 // This module is used
334 long maxSize = DefaultMaxSize; 335 long maxSize = DefaultMaxSize;
335 int maxCount = DefaultMaxCount; 336 int maxCount = DefaultMaxCount;
336 TimeSpan expirationTime = DefaultExpirationTime; 337 TimeSpan expirationTime = DefaultExpirationTime;
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
147 m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); 147 m_args[i].ArgumentValue = Int32.Parse(arg.ToString());
148 break; 148 break;
149 case "Double": 149 case "Double":
150 m_args[i].ArgumentValue = Double.Parse(arg.ToString()); 150 m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo);
151 break; 151 break;
152 case "Boolean": 152 case "Boolean":
153 m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); 153 m_args[i].ArgumentValue = Boolean.Parse(arg.ToString());
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;
38 38
39namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset 39namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
40{ 40{
41 public class LocalAssetServicesConnector : 41 public class LocalAssetServicesConnector : ISharedRegionModule, IAssetService
42 ISharedRegionModule, IAssetService
43 { 42 {
44 private static readonly ILog m_log = 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 LogManager.GetLogger(
46 MethodBase.GetCurrentMethod().DeclaringType);
47 44
48 private IImprovedAssetCache m_Cache = null; 45 private IImprovedAssetCache m_Cache = null;
49 46
@@ -72,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
72 IConfig assetConfig = source.Configs["AssetService"]; 69 IConfig assetConfig = source.Configs["AssetService"];
73 if (assetConfig == null) 70 if (assetConfig == null)
74 { 71 {
75 m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini"); 72 m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: AssetService missing from OpenSim.ini");
76 return; 73 return;
77 } 74 }
78 75
@@ -81,22 +78,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
81 78
82 if (serviceDll == String.Empty) 79 if (serviceDll == String.Empty)
83 { 80 {
84 m_log.Error("[ASSET CONNECTOR]: No LocalServiceModule named in section AssetService"); 81 m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: No LocalServiceModule named in section AssetService");
85 return; 82 return;
86 } 83 }
87 84
88 Object[] args = new Object[] { source }; 85 Object[] args = new Object[] { source };
89 m_AssetService = 86 m_AssetService = ServerUtils.LoadPlugin<IAssetService>(serviceDll, args);
90 ServerUtils.LoadPlugin<IAssetService>(serviceDll,
91 args);
92 87
93 if (m_AssetService == null) 88 if (m_AssetService == null)
94 { 89 {
95 m_log.Error("[ASSET CONNECTOR]: Can't load asset service"); 90 m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: Can't load asset service");
96 return; 91 return;
97 } 92 }
98 m_Enabled = true; 93 m_Enabled = true;
99 m_log.Info("[ASSET CONNECTOR]: Local asset connector enabled"); 94 m_log.Info("[LOCAL ASSET SERVICES CONNECTOR]: Local asset connector enabled");
100 } 95 }
101 } 96 }
102 } 97 }
@@ -134,11 +129,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
134 m_Cache = null; 129 m_Cache = null;
135 } 130 }
136 131
137 m_log.InfoFormat("[ASSET CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName); 132 m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled local assets for region {0}", scene.RegionInfo.RegionName);
138 133
139 if (m_Cache != null) 134 if (m_Cache != null)
140 { 135 {
141 m_log.InfoFormat("[ASSET CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName); 136 m_log.InfoFormat("[LOCAL ASSET SERVICES CONNECTOR]: Enabled asset caching for region {0}", scene.RegionInfo.RegionName);
142 } 137 }
143 else 138 else
144 { 139 {
@@ -151,6 +146,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
151 146
152 public AssetBase Get(string id) 147 public AssetBase Get(string id)
153 { 148 {
149// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id);
150
154 AssetBase asset = null; 151 AssetBase asset = null;
155 if (m_Cache != null) 152 if (m_Cache != null)
156 asset = m_Cache.Get(id); 153 asset = m_Cache.Get(id);
@@ -160,7 +157,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
160 asset = m_AssetService.Get(id); 157 asset = m_AssetService.Get(id);
161 if ((m_Cache != null) && (asset != null)) 158 if ((m_Cache != null) && (asset != null))
162 m_Cache.Cache(asset); 159 m_Cache.Cache(asset);
160
161// if (null == asset)
162// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id);
163 } 163 }
164
164 return asset; 165 return asset;
165 } 166 }
166 167
@@ -204,15 +205,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
204 205
205 public bool Get(string id, Object sender, AssetRetrieved handler) 206 public bool Get(string id, Object sender, AssetRetrieved handler)
206 { 207 {
207 AssetBase asset = null; 208// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id);
208 209
209 if (m_Cache != null) 210 if (m_Cache != null)
210 m_Cache.Get(id);
211
212 if (asset != null)
213 { 211 {
214 Util.FireAndForget(delegate { handler(id, sender, asset); }); 212 AssetBase asset = m_Cache.Get(id);
215 return true; 213
214 if (asset != null)
215 {
216 Util.FireAndForget(delegate { handler(id, sender, asset); });
217 return true;
218 }
216 } 219 }
217 220
218 return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) 221 return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a)
@@ -220,6 +223,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
220 if ((a != null) && (m_Cache != null)) 223 if ((a != null) && (m_Cache != null))
221 m_Cache.Cache(a); 224 m_Cache.Cache(a);
222 225
226// if (null == a)
227// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id);
228
223 Util.FireAndForget(delegate { handler(assetID, s, a); }); 229 Util.FireAndForget(delegate { handler(assetID, s, a); });
224 }); 230 });
225 } 231 }
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
73 IConfig inventoryConfig = source.Configs["InventoryService"]; 73 IConfig inventoryConfig = source.Configs["InventoryService"];
74 if (inventoryConfig == null) 74 if (inventoryConfig == null)
75 { 75 {
76 m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); 76 m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: InventoryService missing from OpenSim.ini");
77 return; 77 return;
78 } 78 }
79 79
@@ -81,18 +81,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
81 81
82 if (serviceDll == String.Empty) 82 if (serviceDll == String.Empty)
83 { 83 {
84 m_log.Error("[INVENTORY CONNECTOR]: No LocalServiceModule named in section InventoryService"); 84 m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: No LocalServiceModule named in section InventoryService");
85 return; 85 return;
86 } 86 }
87 87
88 Object[] args = new Object[] { source }; 88 Object[] args = new Object[] { source };
89 m_log.DebugFormat("[INVENTORY CONNECTOR]: Service dll = {0}", serviceDll); 89 m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Service dll = {0}", serviceDll);
90 90
91 m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(serviceDll, args); 91 m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(serviceDll, args);
92 92
93 if (m_InventoryService == null) 93 if (m_InventoryService == null)
94 { 94 {
95 m_log.Error("[INVENTORY CONNECTOR]: Can't load inventory service"); 95 m_log.Error("[LOCAL INVENTORY SERVICES CONNECTOR]: Can't load inventory service");
96 //return; 96 //return;
97 throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); 97 throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
98 } 98 }
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
111 Init(source); 111 Init(source);
112 112
113 m_Enabled = true; 113 m_Enabled = true;
114 m_log.Info("[INVENTORY CONNECTOR]: Local inventory connector enabled"); 114 m_log.Info("[LOCAL INVENTORY SERVICES CONNECTOR]: Local inventory connector enabled");
115 } 115 }
116 } 116 }
117 } 117 }
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
138 } 138 }
139 139
140// m_log.DebugFormat( 140// m_log.DebugFormat(
141// "[INVENTORY CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName); 141// "[LOCAL INVENTORY SERVICES CONNECTOR]: Registering IInventoryService to scene {0}", scene.RegionInfo.RegionName);
142 142
143 scene.RegisterModuleInterface<IInventoryService>(this); 143 scene.RegisterModuleInterface<IInventoryService>(this);
144 m_cache.AddRegion(scene); 144 m_cache.AddRegion(scene);
@@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
158 return; 158 return;
159 159
160 m_log.InfoFormat( 160 m_log.InfoFormat(
161 "[INVENTORY CONNECTOR]: Enabled local invnetory for region {0}", scene.RegionInfo.RegionName); 161 "[LOCAL INVENTORY SERVICES CONNECTOR]: Enabled local inventory for region {0}", scene.RegionInfo.RegionName);
162 } 162 }
163 163
164 #region IInventoryService 164 #region IInventoryService
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
213 return folders; 213 return folders;
214 } 214 }
215 } 215 }
216 m_log.WarnFormat("[INVENTORY CONNECTOR]: System folders for {0} not found", userID); 216 m_log.WarnFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: System folders for {0} not found", userID);
217 return new Dictionary<AssetType, InventoryFolderBase>(); 217 return new Dictionary<AssetType, InventoryFolderBase>();
218 } 218 }
219 219
@@ -312,7 +312,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
312 312
313 public override InventoryItemBase GetItem(InventoryItemBase item) 313 public override InventoryItemBase GetItem(InventoryItemBase item)
314 { 314 {
315 return m_InventoryService.GetItem(item); 315// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID);
316
317 item = m_InventoryService.GetItem(item);
318
319 if (null == item)
320 m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}");
321
322 return item;
316 } 323 }
317 324
318 public override InventoryFolderBase GetFolder(InventoryFolderBase folder) 325 public override InventoryFolderBase GetFolder(InventoryFolderBase folder)
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
974 if (y == -1 || m_scene.RegionInfo.RegionLocY == y) 974 if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
975 { 975 {
976 int corner = int.Parse(num); 976 int corner = int.Parse(num);
977 float lowValue = float.Parse(min); 977 float lowValue = float.Parse(min, Culture.NumberFormatInfo);
978 float highValue = float.Parse(max); 978 float highValue = float.Parse(max, Culture.NumberFormatInfo);
979 979
980 m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + 980 m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName +
981 string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); 981 string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));