diff options
author | Melanie Thielker | 2017-02-01 16:34:49 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-02-01 16:34:49 +0000 |
commit | 202fcc7d6fb94622cec208b9165e4effda60501c (patch) | |
tree | d224c59768dad96e2b524bc3a1c3c0078816e046 /OpenSim/Region/CoreModules | |
parent | update parcel select or sat on stats on sit and stand (diff) | |
parent | Refactor part II (diff) | |
download | opensim-SC-202fcc7d6fb94622cec208b9165e4effda60501c.zip opensim-SC-202fcc7d6fb94622cec208b9165e4effda60501c.tar.gz opensim-SC-202fcc7d6fb94622cec208b9165e4effda60501c.tar.bz2 opensim-SC-202fcc7d6fb94622cec208b9165e4effda60501c.tar.xz |
Merge branch 'melanie'
Diffstat (limited to 'OpenSim/Region/CoreModules')
12 files changed, 101 insertions, 79 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 2242e42..6e4a710 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -369,7 +369,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
369 | else if (Cache != null) | 369 | else if (Cache != null) |
370 | { | 370 | { |
371 | string assetName = "j2kCache_" + AssetId.ToString(); | 371 | string assetName = "j2kCache_" + AssetId.ToString(); |
372 | AssetBase layerDecodeAsset = Cache.Get(assetName); | 372 | AssetBase layerDecodeAsset; |
373 | Cache.Get(assetName, out layerDecodeAsset); | ||
373 | 374 | ||
374 | if (layerDecodeAsset != null) | 375 | if (layerDecodeAsset != null) |
375 | { | 376 | { |
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index 23c1f03..403236c 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | |||
@@ -260,10 +260,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
260 | /// Cache doesn't guarantee in any situation that asset is stored to it. | 260 | /// Cache doesn't guarantee in any situation that asset is stored to it. |
261 | /// </para> | 261 | /// </para> |
262 | /// </remarks> | 262 | /// </remarks> |
263 | public AssetBase Get(string id) | 263 | public bool Get(string id, out AssetBase assetBase) |
264 | { | 264 | { |
265 | m_getCount++; | 265 | m_getCount++; |
266 | AssetBase assetBase; | ||
267 | if (m_cache.TryGetValue(id, out assetBase)) | 266 | if (m_cache.TryGetValue(id, out assetBase)) |
268 | m_hitCount++; | 267 | m_hitCount++; |
269 | 268 | ||
@@ -284,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
284 | // if (null == assetBase) | 283 | // if (null == assetBase) |
285 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); | 284 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); |
286 | 285 | ||
287 | return assetBase; | 286 | return true; |
288 | } | 287 | } |
289 | 288 | ||
290 | #endregion | 289 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index 51fc3d1..10c0e85 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | |||
@@ -115,7 +115,10 @@ namespace OpenSim.Region.CoreModules.Asset | |||
115 | public bool Check(string id) | 115 | public bool Check(string id) |
116 | { | 116 | { |
117 | // XXX This is probably not an efficient implementation. | 117 | // XXX This is probably not an efficient implementation. |
118 | return Get(id) != null; | 118 | AssetBase asset; |
119 | if (!Get(id, out asset)) | ||
120 | return false; | ||
121 | return asset != null; | ||
119 | } | 122 | } |
120 | 123 | ||
121 | public void Cache(AssetBase asset) | 124 | public void Cache(AssetBase asset) |
@@ -129,9 +132,10 @@ namespace OpenSim.Region.CoreModules.Asset | |||
129 | // We don't do negative caching | 132 | // We don't do negative caching |
130 | } | 133 | } |
131 | 134 | ||
132 | public AssetBase Get(string id) | 135 | public bool Get(string id, out AssetBase asset) |
133 | { | 136 | { |
134 | return (AssetBase)m_Cache.Get(id); | 137 | asset = (AssetBase)m_Cache.Get(id); |
138 | return true; | ||
135 | } | 139 | } |
136 | 140 | ||
137 | public void Expire(string id) | 141 | public void Expire(string id) |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 187f090..f8a4461 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -474,6 +474,8 @@ namespace OpenSim.Region.CoreModules.Asset | |||
474 | { | 474 | { |
475 | using (FileStream stream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) | 475 | using (FileStream stream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) |
476 | { | 476 | { |
477 | if (stream.Length == 0) // Empty file will trigger exception below | ||
478 | return null; | ||
477 | BinaryFormatter bformatter = new BinaryFormatter(); | 479 | BinaryFormatter bformatter = new BinaryFormatter(); |
478 | 480 | ||
479 | asset = (AssetBase)bformatter.Deserialize(stream); | 481 | asset = (AssetBase)bformatter.Deserialize(stream); |
@@ -531,15 +533,26 @@ namespace OpenSim.Region.CoreModules.Asset | |||
531 | return found; | 533 | return found; |
532 | } | 534 | } |
533 | 535 | ||
536 | // For IAssetService | ||
534 | public AssetBase Get(string id) | 537 | public AssetBase Get(string id) |
535 | { | 538 | { |
539 | AssetBase asset; | ||
540 | Get(id, out asset); | ||
541 | return asset; | ||
542 | } | ||
543 | |||
544 | public bool Get(string id, out AssetBase asset) | ||
545 | { | ||
546 | asset = null; | ||
547 | |||
536 | m_Requests++; | 548 | m_Requests++; |
537 | 549 | ||
538 | object dummy; | 550 | object dummy; |
539 | if (m_negativeCache.TryGetValue(id, out dummy)) | 551 | if (m_negativeCache.TryGetValue(id, out dummy)) |
540 | return null; | 552 | { |
553 | return false; | ||
554 | } | ||
541 | 555 | ||
542 | AssetBase asset = null; | ||
543 | asset = GetFromWeakReference(id); | 556 | asset = GetFromWeakReference(id); |
544 | if (asset != null && m_updateFileTimeOnCacheHit) | 557 | if (asset != null && m_updateFileTimeOnCacheHit) |
545 | { | 558 | { |
@@ -578,13 +591,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
578 | GenerateCacheHitReport().ForEach(l => m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0}", l)); | 591 | GenerateCacheHitReport().ForEach(l => m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0}", l)); |
579 | } | 592 | } |
580 | 593 | ||
581 | if(asset == null) | 594 | return true; |
582 | { | ||
583 | |||
584 | |||
585 | } | ||
586 | |||
587 | return asset; | ||
588 | } | 595 | } |
589 | 596 | ||
590 | public bool Check(string id) | 597 | public bool Check(string id) |
@@ -599,7 +606,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
599 | 606 | ||
600 | public AssetBase GetCached(string id) | 607 | public AssetBase GetCached(string id) |
601 | { | 608 | { |
602 | return Get(id); | 609 | AssetBase asset; |
610 | Get(id, out asset); | ||
611 | return asset; | ||
603 | } | 612 | } |
604 | 613 | ||
605 | public void Expire(string id) | 614 | public void Expire(string id) |
@@ -1227,19 +1236,23 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1227 | 1236 | ||
1228 | public AssetMetadata GetMetadata(string id) | 1237 | public AssetMetadata GetMetadata(string id) |
1229 | { | 1238 | { |
1230 | AssetBase asset = Get(id); | 1239 | AssetBase asset; |
1240 | Get(id, out asset); | ||
1231 | return asset.Metadata; | 1241 | return asset.Metadata; |
1232 | } | 1242 | } |
1233 | 1243 | ||
1234 | public byte[] GetData(string id) | 1244 | public byte[] GetData(string id) |
1235 | { | 1245 | { |
1236 | AssetBase asset = Get(id); | 1246 | AssetBase asset; |
1247 | Get(id, out asset); | ||
1237 | return asset.Data; | 1248 | return asset.Data; |
1238 | } | 1249 | } |
1239 | 1250 | ||
1240 | public bool Get(string id, object sender, AssetRetrieved handler) | 1251 | public bool Get(string id, object sender, AssetRetrieved handler) |
1241 | { | 1252 | { |
1242 | AssetBase asset = Get(id); | 1253 | AssetBase asset; |
1254 | if (!Get(id, out asset)) | ||
1255 | return false; | ||
1243 | handler(id, sender, asset); | 1256 | handler(id, sender, asset); |
1244 | return true; | 1257 | return true; |
1245 | } | 1258 | } |
@@ -1270,7 +1283,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1270 | 1283 | ||
1271 | public bool UpdateContent(string id, byte[] data) | 1284 | public bool UpdateContent(string id, byte[] data) |
1272 | { | 1285 | { |
1273 | AssetBase asset = Get(id); | 1286 | AssetBase asset; |
1287 | if (!Get(id, out asset)) | ||
1288 | return false; | ||
1274 | asset.Data = data; | 1289 | asset.Data = data; |
1275 | Cache(asset); | 1290 | Cache(asset); |
1276 | return true; | 1291 | return true; |
diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs index 208963d..abe9b23 100644 --- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs | |||
@@ -131,14 +131,15 @@ namespace OpenSim.Region.CoreModules.Asset | |||
131 | // We don't do negative caching | 131 | // We don't do negative caching |
132 | } | 132 | } |
133 | 133 | ||
134 | public AssetBase Get(string id) | 134 | public bool Get(string id, out AssetBase asset) |
135 | { | 135 | { |
136 | Object asset = null; | 136 | Object a = null; |
137 | m_Cache.TryGet(id, out asset); | 137 | m_Cache.TryGet(id, out a); |
138 | 138 | ||
139 | Debug(asset); | 139 | Debug(a); |
140 | 140 | ||
141 | return (AssetBase)asset; | 141 | asset = (AssetBase)a; |
142 | return true; | ||
142 | } | 143 | } |
143 | 144 | ||
144 | public void Expire(string id) | 145 | public void Expire(string id) |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index fb408a4..535d946 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -299,7 +299,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
299 | if (bakedTextureFace == null) | 299 | if (bakedTextureFace == null) |
300 | continue; | 300 | continue; |
301 | 301 | ||
302 | AssetBase asset = cache.Get(bakedTextureFace.TextureID.ToString()); | 302 | AssetBase asset; |
303 | cache.Get(bakedTextureFace.TextureID.ToString(), out asset); | ||
303 | 304 | ||
304 | if (asset != null && asset.Local) | 305 | if (asset != null && asset.Local) |
305 | { | 306 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index d1f6054..297346a 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -248,22 +248,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
248 | if (scene == null) | 248 | if (scene == null) |
249 | scene = m_SceneList[0]; | 249 | scene = m_SceneList[0]; |
250 | 250 | ||
251 | // Avination new code | 251 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
252 | // SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( | 252 | "POST", m_RestURL+"/SaveMessage/?scope=" + |
253 | // "POST", m_RestURL+"/SaveMessage/?scope=" + | 253 | scene.RegionInfo.ScopeID.ToString(), im); |
254 | // scene.RegionInfo.ScopeID.ToString(), im); | ||
255 | |||
256 | // current opensim and osgrid compatible | ||
257 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | ||
258 | "POST", m_RestURL+"/SaveMessage/", im, 10000); | ||
259 | // current opensim and osgrid compatible end | ||
260 | 254 | ||
261 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 255 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) |
262 | { | 256 | { |
263 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | 257 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); |
264 | if (client == null) | 258 | if (client == null) |
265 | return; | 259 | return; |
266 | /* Avination new code | 260 | |
267 | if (reply.Message == String.Empty) | 261 | if (reply.Message == String.Empty) |
268 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); | 262 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); |
269 | 263 | ||
@@ -296,16 +290,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
296 | reply.Message, | 290 | reply.Message, |
297 | false, new Vector3())); | 291 | false, new Vector3())); |
298 | } | 292 | } |
299 | */ | ||
300 | // current opensim and osgrid compatible | ||
301 | client.SendInstantMessage(new GridInstantMessage( | ||
302 | null, new UUID(im.toAgentID), | ||
303 | "System", new UUID(im.fromAgentID), | ||
304 | (byte)InstantMessageDialog.MessageFromAgent, | ||
305 | "User is not logged in. "+ | ||
306 | (success ? "Message saved." : "Message not saved"), | ||
307 | false, new Vector3())); | ||
308 | // current opensim and osgrid compatible end | ||
309 | } | 293 | } |
310 | } | 294 | } |
311 | } | 295 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index bc8aeca..89e3020 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
149 | 149 | ||
150 | if (profileConfig == null) | 150 | if (profileConfig == null) |
151 | { | 151 | { |
152 | m_log.Debug("[PROFILES]: UserProfiles disabled, no configuration"); | 152 | //m_log.Debug("[PROFILES]: UserProfiles disabled, no configuration"); |
153 | Enabled = false; | 153 | Enabled = false; |
154 | return; | 154 | return; |
155 | } | 155 | } |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index bb80a88..311deab 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -83,17 +83,17 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
83 | LogManager.GetLogger( | 83 | LogManager.GetLogger( |
84 | MethodBase.GetCurrentMethod().DeclaringType); | 84 | MethodBase.GetCurrentMethod().DeclaringType); |
85 | 85 | ||
86 | private Dictionary<UUID, UrlData> m_RequestMap = | 86 | protected Dictionary<UUID, UrlData> m_RequestMap = |
87 | new Dictionary<UUID, UrlData>(); | 87 | new Dictionary<UUID, UrlData>(); |
88 | 88 | ||
89 | private Dictionary<string, UrlData> m_UrlMap = | 89 | protected Dictionary<string, UrlData> m_UrlMap = |
90 | new Dictionary<string, UrlData>(); | 90 | new Dictionary<string, UrlData>(); |
91 | 91 | ||
92 | private uint m_HttpsPort = 0; | 92 | protected uint m_HttpsPort = 0; |
93 | private IHttpServer m_HttpServer = null; | 93 | protected IHttpServer m_HttpServer = null; |
94 | private IHttpServer m_HttpsServer = null; | 94 | protected IHttpServer m_HttpsServer = null; |
95 | 95 | ||
96 | public string ExternalHostNameForLSL { get; private set; } | 96 | public string ExternalHostNameForLSL { get; protected set; } |
97 | 97 | ||
98 | /// <summary> | 98 | /// <summary> |
99 | /// The default maximum number of urls | 99 | /// The default maximum number of urls |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
107 | 107 | ||
108 | public Type ReplaceableInterface | 108 | public Type ReplaceableInterface |
109 | { | 109 | { |
110 | get { return null; } | 110 | get { return typeof(IUrlModule); } |
111 | } | 111 | } |
112 | 112 | ||
113 | public string Name | 113 | public string Name |
@@ -453,7 +453,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
453 | } | 453 | } |
454 | 454 | ||
455 | 455 | ||
456 | private void RemoveUrl(UrlData data) | 456 | protected void RemoveUrl(UrlData data) |
457 | { | 457 | { |
458 | if (data.isSsl) | 458 | if (data.isSsl) |
459 | m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/"); | 459 | m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/"); |
@@ -461,7 +461,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
461 | m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); | 461 | m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); |
462 | } | 462 | } |
463 | 463 | ||
464 | private Hashtable NoEvents(UUID requestID, UUID sessionID) | 464 | protected Hashtable NoEvents(UUID requestID, UUID sessionID) |
465 | { | 465 | { |
466 | Hashtable response = new Hashtable(); | 466 | Hashtable response = new Hashtable(); |
467 | UrlData url; | 467 | UrlData url; |
@@ -499,7 +499,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
499 | return response; | 499 | return response; |
500 | } | 500 | } |
501 | 501 | ||
502 | private bool HasEvents(UUID requestID, UUID sessionID) | 502 | protected bool HasEvents(UUID requestID, UUID sessionID) |
503 | { | 503 | { |
504 | UrlData url=null; | 504 | UrlData url=null; |
505 | 505 | ||
@@ -530,7 +530,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
530 | } | 530 | } |
531 | } | 531 | } |
532 | } | 532 | } |
533 | private Hashtable GetEvents(UUID requestID, UUID sessionID) | 533 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) |
534 | { | 534 | { |
535 | UrlData url = null; | 535 | UrlData url = null; |
536 | RequestData requestData = null; | 536 | RequestData requestData = null; |
@@ -735,7 +735,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
735 | } | 735 | } |
736 | } | 736 | } |
737 | 737 | ||
738 | private void OnScriptReset(uint localID, UUID itemID) | 738 | protected void OnScriptReset(uint localID, UUID itemID) |
739 | { | 739 | { |
740 | ScriptRemoved(itemID); | 740 | ScriptRemoved(itemID); |
741 | } | 741 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs index 9e75ee2..2e6f472 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs | |||
@@ -85,12 +85,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
85 | 85 | ||
86 | public LocalUserProfilesServicesConnector() | 86 | public LocalUserProfilesServicesConnector() |
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."); |
94 | InitialiseService(source); | 94 | InitialiseService(source); |
95 | } | 95 | } |
96 | 96 | ||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
104 | IConfig config = source.Configs[ConfigName]; | 104 | IConfig config = source.Configs[ConfigName]; |
105 | if (config == null) | 105 | if (config == null) |
106 | { | 106 | { |
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 | ||
@@ -225,4 +225,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
225 | } | 225 | } |
226 | #endregion | 226 | #endregion |
227 | } | 227 | } |
228 | } \ No newline at end of file | 228 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index f5aa971..bf9327c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs | |||
@@ -209,7 +209,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
209 | 209 | ||
210 | if (m_Cache != null) | 210 | if (m_Cache != null) |
211 | { | 211 | { |
212 | asset = m_Cache.Get(id); | 212 | if (!m_Cache.Get(id, out asset)) |
213 | return null; | ||
213 | 214 | ||
214 | if (asset != null) | 215 | if (asset != null) |
215 | return asset; | 216 | return asset; |
@@ -238,8 +239,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
238 | 239 | ||
239 | public AssetBase GetCached(string id) | 240 | public AssetBase GetCached(string id) |
240 | { | 241 | { |
242 | AssetBase asset = null; | ||
241 | if (m_Cache != null) | 243 | if (m_Cache != null) |
242 | return m_Cache.Get(id); | 244 | m_Cache.Get(id, out asset); |
243 | 245 | ||
244 | return null; | 246 | return null; |
245 | } | 247 | } |
@@ -250,8 +252,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
250 | 252 | ||
251 | if (m_Cache != null) | 253 | if (m_Cache != null) |
252 | { | 254 | { |
253 | if (m_Cache != null) | 255 | if (!m_Cache.Get(id, out asset)) |
254 | m_Cache.Get(id); | 256 | return null; |
255 | 257 | ||
256 | if (asset != null) | 258 | if (asset != null) |
257 | return asset.Metadata; | 259 | return asset.Metadata; |
@@ -273,8 +275,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
273 | 275 | ||
274 | if (m_Cache != null) | 276 | if (m_Cache != null) |
275 | { | 277 | { |
276 | if (m_Cache != null) | 278 | if (!m_Cache.Get(id, out asset)) |
277 | m_Cache.Get(id); | 279 | return null; |
278 | 280 | ||
279 | if (asset != null) | 281 | if (asset != null) |
280 | return asset.Data; | 282 | return asset.Data; |
@@ -292,7 +294,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
292 | AssetBase asset = null; | 294 | AssetBase asset = null; |
293 | 295 | ||
294 | if (m_Cache != null) | 296 | if (m_Cache != null) |
295 | asset = m_Cache.Get(id); | 297 | { |
298 | if (!m_Cache.Get(id, out asset)) | ||
299 | return false; | ||
300 | } | ||
296 | 301 | ||
297 | if (asset != null) | 302 | if (asset != null) |
298 | { | 303 | { |
@@ -382,7 +387,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
382 | AssetBase asset = null; | 387 | AssetBase asset = null; |
383 | 388 | ||
384 | if (m_Cache != null) | 389 | if (m_Cache != null) |
385 | asset = m_Cache.Get(id); | 390 | m_Cache.Get(id, out asset); |
386 | 391 | ||
387 | if (asset != null) | 392 | if (asset != null) |
388 | { | 393 | { |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index 7190aa0..37a48bb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -158,7 +158,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
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 | { |
162 | if (!m_Cache.Get(id, out asset)) | ||
163 | return null; | ||
164 | } | ||
162 | 165 | ||
163 | if (asset == null) | 166 | if (asset == null) |
164 | { | 167 | { |
@@ -177,17 +180,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
177 | { | 180 | { |
178 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); | 181 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); |
179 | 182 | ||
183 | AssetBase asset = null; | ||
180 | if (m_Cache != null) | 184 | if (m_Cache != null) |
181 | return m_Cache.Get(id); | 185 | m_Cache.Get(id, out asset); |
182 | 186 | ||
183 | return null; | 187 | return asset; |
184 | } | 188 | } |
185 | 189 | ||
186 | public AssetMetadata GetMetadata(string id) | 190 | public AssetMetadata GetMetadata(string id) |
187 | { | 191 | { |
188 | AssetBase asset = null; | 192 | AssetBase asset = null; |
189 | if (m_Cache != null) | 193 | if (m_Cache != null) |
190 | asset = m_Cache.Get(id); | 194 | { |
195 | if (!m_Cache.Get(id, out asset)) | ||
196 | return null; | ||
197 | } | ||
191 | 198 | ||
192 | if (asset != null) | 199 | if (asset != null) |
193 | return asset.Metadata; | 200 | return asset.Metadata; |
@@ -210,7 +217,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
210 | AssetBase asset = null; | 217 | AssetBase asset = null; |
211 | 218 | ||
212 | if (m_Cache != null) | 219 | if (m_Cache != null) |
213 | asset = m_Cache.Get(id); | 220 | { |
221 | if (!m_Cache.Get(id, out asset)) | ||
222 | return null; | ||
223 | } | ||
214 | 224 | ||
215 | if (asset != null) | 225 | if (asset != null) |
216 | return asset.Data; | 226 | return asset.Data; |
@@ -232,7 +242,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
232 | 242 | ||
233 | if (m_Cache != null) | 243 | if (m_Cache != null) |
234 | { | 244 | { |
235 | AssetBase asset = m_Cache.Get(id); | 245 | AssetBase asset; |
246 | if (!m_Cache.Get(id, out asset)) | ||
247 | return false; | ||
236 | 248 | ||
237 | if (asset != null) | 249 | if (asset != null) |
238 | { | 250 | { |
@@ -287,7 +299,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
287 | { | 299 | { |
288 | AssetBase asset = null; | 300 | AssetBase asset = null; |
289 | if (m_Cache != null) | 301 | if (m_Cache != null) |
290 | m_Cache.Get(id); | 302 | m_Cache.Get(id, out asset); |
291 | if (asset != null) | 303 | if (asset != null) |
292 | { | 304 | { |
293 | asset.Data = data; | 305 | asset.Data = data; |