aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorMelanie2013-06-11 01:03:15 +0100
committerMelanie2013-06-11 01:03:15 +0100
commita022ee576639c1bbceb5c4ba8de3cbd82e538bb3 (patch)
treefb0d2ee165b7c87e814fc35c6551a26c2c6a488a /OpenSim/Region/CoreModules/ServiceConnectorsOut
parentMerge branch 'master' into careminster (diff)
parentCheck For NaN and Infinity in llRot2Axis/Angle Fixes mantis #6669 (diff)
downloadopensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.zip
opensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.gz
opensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.bz2
opensim-SC_OLD-a022ee576639c1bbceb5c4ba8de3cbd82e538bb3.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs20
3 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
index d221d68..9f58175 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
322 // a copy of the local asset. 322 // a copy of the local asset.
323 m_Cache.Cache(asset); 323 m_Cache.Cache(asset);
324 324
325 if (asset.Temporary || asset.Local) 325 if (asset.Local)
326 { 326 {
327 if (m_Cache != null) 327 if (m_Cache != null)
328 m_Cache.Cache(asset); 328 m_Cache.Cache(asset);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index 480cd69..52b1039 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
@@ -258,7 +258,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
258 if (m_Cache != null) 258 if (m_Cache != null)
259 m_Cache.Cache(asset); 259 m_Cache.Cache(asset);
260 260
261 if (asset.Temporary || asset.Local) 261 if (asset.Local)
262 { 262 {
263// m_log.DebugFormat( 263// m_log.DebugFormat(
264// "[LOCAL ASSET SERVICE CONNECTOR]: Returning asset {0} {1} without querying database since status Temporary = {2}, Local = {3}", 264// "[LOCAL ASSET SERVICE CONNECTOR]: Returning asset {0} {1} without querying database since status Temporary = {2}, Local = {3}",
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
index 1982473..7073433 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
@@ -93,7 +93,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
93 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector(); 93 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
94 lasc.Initialise(config); 94 lasc.Initialise(config);
95 95
96 // If it is local, it should not be stored
96 AssetBase a1 = AssetHelpers.CreateNotecardAsset(); 97 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
98 a1.Local = true;
97 a1.Temporary = true; 99 a1.Temporary = true;
98 100
99 lasc.Store(a1); 101 lasc.Store(a1);
@@ -102,6 +104,24 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
102 Assert.That(lasc.GetData(a1.ID), Is.Null); 104 Assert.That(lasc.GetData(a1.ID), Is.Null);
103 Assert.That(lasc.GetMetadata(a1.ID), Is.Null); 105 Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
104 106
107 // If it is remote, it should be stored
108 // AssetBase a2 = AssetHelpers.CreateNotecardAsset();
109 // a2.Local = false;
110 // a2.Temporary = true;
111
112 // lasc.Store(a2);
113
114 // AssetBase retreivedA2 = lasc.Get(a2.ID);
115 // Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
116 // Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
117 // Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
118
119 // AssetMetadata retrievedA2Metadata = lasc.GetMetadata(a2.ID);
120 // Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
121
122 // byte[] retrievedA2Data = lasc.GetData(a2.ID);
123 // Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
124
105 // TODO: Add cache and check that this does receive a copy of the asset 125 // TODO: Add cache and check that this does receive a copy of the asset
106 } 126 }
107 127