aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs12
-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
5 files changed, 36 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
index bf24030..2bb24ae 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
@@ -57,6 +57,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
57 57
58 public void Initialise(IConfigSource config) 58 public void Initialise(IConfigSource config)
59 { 59 {
60 if(config.Configs["UserProfiles"] != null)
61 return;
62
60 m_log.DebugFormat("[PROFILE MODULE]: Basic Profile Module enabled"); 63 m_log.DebugFormat("[PROFILE MODULE]: Basic Profile Module enabled");
61 m_Enabled = true; 64 m_Enabled = true;
62 } 65 }
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index a97c9b4..322addd 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -130,6 +130,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
130 130
131 if (profileConfig == null) 131 if (profileConfig == null)
132 { 132 {
133 m_log.Debug("[PROFILES]: UserProfiles disabled, no configuration");
133 Enabled = false; 134 Enabled = false;
134 return; 135 return;
135 } 136 }
@@ -1316,7 +1317,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
1316 Stream rstream = webResponse.GetResponseStream(); 1317 Stream rstream = webResponse.GetResponseStream();
1317 1318
1318 OSDMap response = new OSDMap(); 1319 OSDMap response = new OSDMap();
1319 response = (OSDMap)OSDParser.DeserializeJson(rstream); 1320 try
1321 {
1322 response = (OSDMap)OSDParser.DeserializeJson(rstream);
1323 }
1324 catch (Exception e)
1325 {
1326 m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message);
1327 return false;
1328 }
1329
1320 if(response.ContainsKey("error")) 1330 if(response.ContainsKey("error"))
1321 { 1331 {
1322 data = response["error"]; 1332 data = response["error"];
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