diff --git a/OpenSim/Framework/IAssetCache.cs b/OpenSim/Framework/IAssetCache.cs
index 8477116403..2df9199a26 100644
--- a/OpenSim/Framework/IAssetCache.cs
+++ b/OpenSim/Framework/IAssetCache.cs
@@ -47,8 +47,9 @@ namespace OpenSim.Framework
/// Get an asset by its id.
///
///
- /// null if the asset does not exist.
- AssetBase Get(string id);
+ /// Will be set to null if no asset was found
+ /// False if the asset has been negative-cached
+ bool Get(string id, out AssetBase asset);
///
/// Check whether an asset with the specified id exists in the cache.
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 55c327656a..a6b341f21c 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -47,6 +47,8 @@ namespace OpenSim.Framework.Monitoring
// Subcommand used to list other stats.
public const string ListSubCommand = "list";
+ public static string StatsPassword { get; set; }
+
// All subcommands
public static HashSet SubCommands = new HashSet { AllSubCommand, ListSubCommand };
@@ -302,6 +304,17 @@ namespace OpenSim.Framework.Monitoring
int response_code = 200;
string contenttype = "text/json";
+ if (StatsPassword != String.Empty && (!request.ContainsKey("pass") || request["pass"].ToString() != StatsPassword))
+ {
+ responsedata["int_response_code"] = response_code;
+ responsedata["content_type"] = "text/plain";
+ responsedata["keepalive"] = false;
+ responsedata["str_response_string"] = "Access denied";
+ responsedata["access_control_allow_origin"] = "*";
+
+ return responsedata;
+ }
+
string pCategoryName = StatsManager.AllSubCommand;
string pContainerName = StatsManager.AllSubCommand;
string pStatName = StatsManager.AllSubCommand;
diff --git a/OpenSim/Framework/WearableCacheItem.cs b/OpenSim/Framework/WearableCacheItem.cs
index ccaf69edfd..427e149f69 100644
--- a/OpenSim/Framework/WearableCacheItem.cs
+++ b/OpenSim/Framework/WearableCacheItem.cs
@@ -113,7 +113,8 @@ namespace OpenSim.Framework
{
if (dataCache.Check(item.TextureID.ToString()))
{
- AssetBase assetItem = dataCache.Get(item.TextureID.ToString());
+ AssetBase assetItem;
+ dataCache.Get(item.TextureID.ToString(), out assetItem);
if (assetItem != null)
{
itemmap.Add("assetdata", OSD.FromBinary(assetItem.Data));
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 8022b1e587..58178bcf50 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -211,6 +211,7 @@ namespace OpenSim
if (managedStatsURI != String.Empty)
{
string urlBase = String.Format("/{0}/", managedStatsURI);
+ StatsManager.StatsPassword = managedStatsPassword;
MainServer.Instance.AddHTTPHandler(urlBase, StatsManager.HandleStatsRequest);
m_log.InfoFormat("[OPENSIM] Enabling remote managed stats fetch. URL = {0}", urlBase);
}
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 8a0536a9ce..168836c1e9 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -88,6 +88,7 @@ namespace OpenSim
public string userStatsURI = String.Empty;
public string managedStatsURI = String.Empty;
+ public string managedStatsPassword = String.Empty;
protected bool m_autoCreateClientStack = true;
@@ -239,6 +240,7 @@ namespace OpenSim
m_permsModules = new List(permissionModules.Split(','));
managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty);
+ managedStatsPassword = startupConfig.GetString("ManagedStatsRemoteFetchPassword", String.Empty);
}
// Load the simulation data service
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 2242e421c4..6e4a710bf9 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
else if (Cache != null)
{
string assetName = "j2kCache_" + AssetId.ToString();
- AssetBase layerDecodeAsset = Cache.Get(assetName);
+ AssetBase layerDecodeAsset;
+ Cache.Get(assetName, out layerDecodeAsset);
if (layerDecodeAsset != null)
{
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
index 23c1f035b8..403236c170 100644
--- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
@@ -260,10 +260,9 @@ namespace OpenSim.Region.CoreModules.Asset
/// Cache doesn't guarantee in any situation that asset is stored to it.
///
///
- public AssetBase Get(string id)
+ public bool Get(string id, out AssetBase assetBase)
{
m_getCount++;
- AssetBase assetBase;
if (m_cache.TryGetValue(id, out assetBase))
m_hitCount++;
@@ -284,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset
// if (null == assetBase)
// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id);
- return assetBase;
+ return true;
}
#endregion
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
index 51fc3d1d7b..10c0e85175 100644
--- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
@@ -115,7 +115,10 @@ namespace OpenSim.Region.CoreModules.Asset
public bool Check(string id)
{
// XXX This is probably not an efficient implementation.
- return Get(id) != null;
+ AssetBase asset;
+ if (!Get(id, out asset))
+ return false;
+ return asset != null;
}
public void Cache(AssetBase asset)
@@ -129,9 +132,10 @@ namespace OpenSim.Region.CoreModules.Asset
// We don't do negative caching
}
- public AssetBase Get(string id)
+ public bool Get(string id, out AssetBase asset)
{
- return (AssetBase)m_Cache.Get(id);
+ asset = (AssetBase)m_Cache.Get(id);
+ return true;
}
public void Expire(string id)
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 187f090ec5..f8a4461226 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -474,6 +474,8 @@ namespace OpenSim.Region.CoreModules.Asset
{
using (FileStream stream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read))
{
+ if (stream.Length == 0) // Empty file will trigger exception below
+ return null;
BinaryFormatter bformatter = new BinaryFormatter();
asset = (AssetBase)bformatter.Deserialize(stream);
@@ -531,15 +533,26 @@ namespace OpenSim.Region.CoreModules.Asset
return found;
}
+ // For IAssetService
public AssetBase Get(string id)
{
+ AssetBase asset;
+ Get(id, out asset);
+ return asset;
+ }
+
+ public bool Get(string id, out AssetBase asset)
+ {
+ asset = null;
+
m_Requests++;
object dummy;
if (m_negativeCache.TryGetValue(id, out dummy))
- return null;
+ {
+ return false;
+ }
- AssetBase asset = null;
asset = GetFromWeakReference(id);
if (asset != null && m_updateFileTimeOnCacheHit)
{
@@ -578,13 +591,7 @@ namespace OpenSim.Region.CoreModules.Asset
GenerateCacheHitReport().ForEach(l => m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0}", l));
}
- if(asset == null)
- {
-
-
- }
-
- return asset;
+ return true;
}
public bool Check(string id)
@@ -599,7 +606,9 @@ namespace OpenSim.Region.CoreModules.Asset
public AssetBase GetCached(string id)
{
- return Get(id);
+ AssetBase asset;
+ Get(id, out asset);
+ return asset;
}
public void Expire(string id)
@@ -1227,19 +1236,23 @@ namespace OpenSim.Region.CoreModules.Asset
public AssetMetadata GetMetadata(string id)
{
- AssetBase asset = Get(id);
+ AssetBase asset;
+ Get(id, out asset);
return asset.Metadata;
}
public byte[] GetData(string id)
{
- AssetBase asset = Get(id);
+ AssetBase asset;
+ Get(id, out asset);
return asset.Data;
}
public bool Get(string id, object sender, AssetRetrieved handler)
{
- AssetBase asset = Get(id);
+ AssetBase asset;
+ if (!Get(id, out asset))
+ return false;
handler(id, sender, asset);
return true;
}
@@ -1270,7 +1283,9 @@ namespace OpenSim.Region.CoreModules.Asset
public bool UpdateContent(string id, byte[] data)
{
- AssetBase asset = Get(id);
+ AssetBase asset;
+ if (!Get(id, out asset))
+ return false;
asset.Data = data;
Cache(asset);
return true;
diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
index 208963d1f4..abe9b23770 100644
--- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
@@ -131,14 +131,15 @@ namespace OpenSim.Region.CoreModules.Asset
// We don't do negative caching
}
- public AssetBase Get(string id)
+ public bool Get(string id, out AssetBase asset)
{
- Object asset = null;
- m_Cache.TryGet(id, out asset);
+ Object a = null;
+ m_Cache.TryGet(id, out a);
- Debug(asset);
+ Debug(a);
- return (AssetBase)asset;
+ asset = (AssetBase)a;
+ return true;
}
public void Expire(string id)
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index fb408a402d..535d946710 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
if (bakedTextureFace == null)
continue;
- AssetBase asset = cache.Get(bakedTextureFace.TextureID.ToString());
+ AssetBase asset;
+ cache.Get(bakedTextureFace.TextureID.ToString(), out asset);
if (asset != null && asset.Local)
{
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index d1f6054106..297346a9bc 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
if (scene == null)
scene = m_SceneList[0];
-// Avination new code
-// SendReply reply = SynchronousRestObjectRequester.MakeRequest(
-// "POST", m_RestURL+"/SaveMessage/?scope=" +
-// scene.RegionInfo.ScopeID.ToString(), im);
-
-// current opensim and osgrid compatible
- bool success = SynchronousRestObjectRequester.MakeRequest(
- "POST", m_RestURL+"/SaveMessage/", im, 10000);
-// current opensim and osgrid compatible end
+ SendReply reply = SynchronousRestObjectRequester.MakeRequest(
+ "POST", m_RestURL+"/SaveMessage/?scope=" +
+ scene.RegionInfo.ScopeID.ToString(), im);
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
{
IClientAPI client = FindClient(new UUID(im.fromAgentID));
if (client == null)
return;
-/* Avination new code
+
if (reply.Message == String.Empty)
reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved");
@@ -296,16 +290,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
reply.Message,
false, new Vector3()));
}
-*/
-// current opensim and osgrid compatible
- client.SendInstantMessage(new GridInstantMessage(
- null, new UUID(im.toAgentID),
- "System", new UUID(im.fromAgentID),
- (byte)InstantMessageDialog.MessageFromAgent,
- "User is not logged in. "+
- (success ? "Message saved." : "Message not saved"),
- false, new Vector3()));
-// current opensim and osgrid compatible end
}
}
}
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index bc8aeca002..89e30206f1 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
if (profileConfig == null)
{
- m_log.Debug("[PROFILES]: UserProfiles disabled, no configuration");
+ //m_log.Debug("[PROFILES]: UserProfiles disabled, no configuration");
Enabled = false;
return;
}
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index bb80a88298..311deabe76 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
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
- private Dictionary m_RequestMap =
+ protected Dictionary m_RequestMap =
new Dictionary();
- private Dictionary m_UrlMap =
+ protected Dictionary m_UrlMap =
new Dictionary();
- private uint m_HttpsPort = 0;
- private IHttpServer m_HttpServer = null;
- private IHttpServer m_HttpsServer = null;
+ protected uint m_HttpsPort = 0;
+ protected IHttpServer m_HttpServer = null;
+ protected IHttpServer m_HttpsServer = null;
- public string ExternalHostNameForLSL { get; private set; }
+ public string ExternalHostNameForLSL { get; protected set; }
///
/// The default maximum number of urls
@@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
public Type ReplaceableInterface
{
- get { return null; }
+ get { return typeof(IUrlModule); }
}
public string Name
@@ -453,7 +453,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
}
- private void RemoveUrl(UrlData data)
+ protected void RemoveUrl(UrlData data)
{
if (data.isSsl)
m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/");
@@ -461,7 +461,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/");
}
- private Hashtable NoEvents(UUID requestID, UUID sessionID)
+ protected Hashtable NoEvents(UUID requestID, UUID sessionID)
{
Hashtable response = new Hashtable();
UrlData url;
@@ -499,7 +499,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
return response;
}
- private bool HasEvents(UUID requestID, UUID sessionID)
+ protected bool HasEvents(UUID requestID, UUID sessionID)
{
UrlData url=null;
@@ -530,7 +530,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
}
}
}
- private Hashtable GetEvents(UUID requestID, UUID sessionID)
+ protected Hashtable GetEvents(UUID requestID, UUID sessionID)
{
UrlData url = null;
RequestData requestData = null;
@@ -735,7 +735,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
}
}
- private void OnScriptReset(uint localID, UUID itemID)
+ protected void OnScriptReset(uint localID, UUID itemID)
{
ScriptRemoved(itemID);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
index 9e75ee2259..2e6f472399 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
public LocalUserProfilesServicesConnector()
{
- m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params");
+ //m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params");
}
public LocalUserProfilesServicesConnector(IConfigSource source)
{
- m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly.");
+ //m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly.");
InitialiseService(source);
}
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
IConfig config = source.Configs[ConfigName];
if (config == null)
{
- m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini");
+ //m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini");
return;
}
@@ -225,4 +225,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
}
#endregion
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
index f5aa9716d9..bf9327c09d 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
if (m_Cache != null)
{
- asset = m_Cache.Get(id);
+ if (!m_Cache.Get(id, out asset))
+ return null;
if (asset != null)
return asset;
@@ -238,8 +239,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
public AssetBase GetCached(string id)
{
+ AssetBase asset = null;
if (m_Cache != null)
- return m_Cache.Get(id);
+ m_Cache.Get(id, out asset);
return null;
}
@@ -250,8 +252,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null)
{
- if (m_Cache != null)
- m_Cache.Get(id);
+ if (!m_Cache.Get(id, out asset))
+ return null;
if (asset != null)
return asset.Metadata;
@@ -273,8 +275,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null)
{
- if (m_Cache != null)
- m_Cache.Get(id);
+ if (!m_Cache.Get(id, out asset))
+ return null;
if (asset != null)
return asset.Data;
@@ -292,7 +294,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ {
+ if (!m_Cache.Get(id, out asset))
+ return false;
+ }
if (asset != null)
{
@@ -382,7 +387,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ m_Cache.Get(id, out asset);
if (asset != null)
{
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index 7190aa09ed..37a48bb752 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
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ {
+ if (!m_Cache.Get(id, out asset))
+ return null;
+ }
if (asset == null)
{
@@ -177,17 +180,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
{
// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id);
+ AssetBase asset = null;
if (m_Cache != null)
- return m_Cache.Get(id);
+ m_Cache.Get(id, out asset);
- return null;
+ return asset;
}
public AssetMetadata GetMetadata(string id)
{
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ {
+ if (!m_Cache.Get(id, out asset))
+ return null;
+ }
if (asset != null)
return asset.Metadata;
@@ -210,7 +217,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ {
+ if (!m_Cache.Get(id, out asset))
+ return null;
+ }
if (asset != null)
return asset.Data;
@@ -232,7 +242,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null)
{
- AssetBase asset = m_Cache.Get(id);
+ AssetBase asset;
+ if (!m_Cache.Get(id, out asset))
+ return false;
if (asset != null)
{
@@ -287,7 +299,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
{
AssetBase asset = null;
if (m_Cache != null)
- m_Cache.Get(id);
+ m_Cache.Get(id, out asset);
if (asset != null)
{
asset.Data = data;
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
index 52fa908d4a..e8cb052263 100644
--- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
+++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
@@ -329,7 +329,7 @@ namespace OpenSim.Region.OptionalModules.Materials
AssetBase matAsset = m_scene.AssetService.Get(id.ToString());
if (matAsset == null || matAsset.Data == null || matAsset.Data.Length == 0 )
{
- m_log.WarnFormat("[Materials]: Prim \"{0}\" ({1}) contains unknown material ID {2}", part.Name, part.UUID, id);
+ //m_log.WarnFormat("[Materials]: Prim \"{0}\" ({1}) contains unknown material ID {2}", part.Name, part.UUID, id);
return;
}
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 163f43928a..0117800b96 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -454,7 +454,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
if (physicsParms == null)
{
- m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName);
+ //m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName);
return false;
}
@@ -712,7 +712,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
else
{
// if neither mesh or decomposition present, warn and use convex
- m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName);
+ //m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName);
}
}
vs.Clear();
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 3fa8b54d73..810da2f7cc 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -243,8 +243,12 @@ namespace OpenSim.Services.Connectors
string uri = MapServer(id) + "/assets/" + id;
AssetBase asset = null;
+
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ {
+ if (!m_Cache.Get(id, out asset))
+ return null;
+ }
if (asset == null || asset.Data == null || asset.Data.Length == 0)
{
@@ -275,17 +279,22 @@ namespace OpenSim.Services.Connectors
{
// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Cache request for {0}", id);
+ AssetBase asset = null;
if (m_Cache != null)
- return m_Cache.Get(id);
+ {
+ m_Cache.Get(id, out asset);
+ }
- return null;
+ return asset;
}
public AssetMetadata GetMetadata(string id)
{
if (m_Cache != null)
{
- AssetBase fullAsset = m_Cache.Get(id);
+ AssetBase fullAsset;
+ if (!m_Cache.Get(id, out fullAsset))
+ return null;
if (fullAsset != null)
return fullAsset.Metadata;
@@ -301,7 +310,9 @@ namespace OpenSim.Services.Connectors
{
if (m_Cache != null)
{
- AssetBase fullAsset = m_Cache.Get(id);
+ AssetBase fullAsset;
+ if (!m_Cache.Get(id, out fullAsset))
+ return null;
if (fullAsset != null)
return fullAsset.Data;
@@ -389,7 +400,10 @@ namespace OpenSim.Services.Connectors
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ {
+ if (!m_Cache.Get(id, out asset))
+ return false;
+ }
if (asset == null || asset.Data == null || asset.Data.Length == 0)
{
@@ -590,7 +604,7 @@ namespace OpenSim.Services.Connectors
AssetBase asset = null;
if (m_Cache != null)
- asset = m_Cache.Get(id);
+ m_Cache.Get(id, out asset);
if (asset == null)
{
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 121e8636e4..953bc2af1b 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -136,7 +136,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
// Cache fetch
if (m_cache != null)
{
- AssetBase asset = m_cache.Get(id);
+ AssetBase asset;
+ if (!m_cache.Get(id, out asset))
+ return null;
if (asset != null)
return asset;
}
@@ -147,8 +149,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
public AssetBase GetCached(string id)
{
+ AssetBase asset;
if (m_cache != null)
- return m_cache.Get(id);
+ m_cache.Get(id, out asset);
return null;
}
@@ -169,7 +172,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
// Cache fetch
if (m_cache != null)
{
- AssetBase asset = m_cache.Get(id);
+ AssetBase asset;
+ if (!m_cache.Get(id, out asset))
+ return null;
if (asset != null)
return asset.Metadata;
}
@@ -212,7 +217,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
// Cache fetch
if (m_cache != null)
{
- AssetBase asset = m_cache.Get(id);
+ AssetBase asset;
+ if (!m_cache.Get(id, out asset))
+ return false;
+
if (asset != null)
{
handler(id, sender, asset);