aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2013-07-02 13:29:44 -0700
committerDiva Canto2013-07-02 13:29:44 -0700
commitccca0059695e0321ae1aa223c9e8b89cc141b58f (patch)
treec98e90afa1b931f01729d0b9feccb1dc861def45 /OpenSim
parentUpdate debug unknown user name UserUMMTGUN3 to UserUMMTGUN4 and UserUMMAU -> ... (diff)
downloadopensim-SC_OLD-ccca0059695e0321ae1aa223c9e8b89cc141b58f.zip
opensim-SC_OLD-ccca0059695e0321ae1aa223c9e8b89cc141b58f.tar.gz
opensim-SC_OLD-ccca0059695e0321ae1aa223c9e8b89cc141b58f.tar.bz2
opensim-SC_OLD-ccca0059695e0321ae1aa223c9e8b89cc141b58f.tar.xz
HG: close a loophole by which if something was wrong with the ServiceURLs it resulted in never ending asset requests
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs9
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs2
3 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
index a168bfe..4d0568d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
@@ -421,7 +421,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
421 // foreign user is visiting, we need to try again after the first fail to the local 421 // foreign user is visiting, we need to try again after the first fail to the local
422 // asset service. 422 // asset service.
423 string assetServerURL = string.Empty; 423 string assetServerURL = string.Empty;
424 if (InventoryAccessModule.IsForeignUser(AgentID, out assetServerURL)) 424 if (InventoryAccessModule.IsForeignUser(AgentID, out assetServerURL) && !string.IsNullOrEmpty(assetServerURL))
425 { 425 {
426 if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("=")) 426 if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("="))
427 assetServerURL = assetServerURL + "/"; 427 assetServerURL = assetServerURL + "/";
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index 7871eda..144895c 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -73,6 +73,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
73 73
74 private AssetMetadata FetchMetadata(string url, UUID assetID) 74 private AssetMetadata FetchMetadata(string url, UUID assetID)
75 { 75 {
76 if (string.IsNullOrEmpty(url))
77 return null;
78
76 if (!url.EndsWith("/") && !url.EndsWith("=")) 79 if (!url.EndsWith("/") && !url.EndsWith("="))
77 url = url + "/"; 80 url = url + "/";
78 81
@@ -92,6 +95,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
92 AssetBase asset = m_scene.AssetService.Get(assetID.ToString()); 95 AssetBase asset = m_scene.AssetService.Get(assetID.ToString());
93 if (asset == null) 96 if (asset == null)
94 { 97 {
98 if (string.IsNullOrEmpty(url))
99 return null;
100
95 if (!url.EndsWith("/") && !url.EndsWith("=")) 101 if (!url.EndsWith("/") && !url.EndsWith("="))
96 url = url + "/"; 102 url = url + "/";
97 103
@@ -109,6 +115,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
109 115
110 public bool PostAsset(string url, AssetBase asset) 116 public bool PostAsset(string url, AssetBase asset)
111 { 117 {
118 if (string.IsNullOrEmpty(url))
119 return false;
120
112 if (asset != null) 121 if (asset != null)
113 { 122 {
114 if (!url.EndsWith("/") && !url.EndsWith("=")) 123 if (!url.EndsWith("/") && !url.EndsWith("="))
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index b2b628d..64d5f61 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
297 if (m_Scene.TryGetScenePresence(userID, out sp)) 297 if (m_Scene.TryGetScenePresence(userID, out sp))
298 { 298 {
299 AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 299 AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
300 if (aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) 300 if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
301 { 301 {
302 assetServerURL = aCircuit.ServiceURLs["AssetServerURI"].ToString(); 302 assetServerURL = aCircuit.ServiceURLs["AssetServerURI"].ToString();
303 assetServerURL = assetServerURL.Trim(new char[] { '/' }); 303 assetServerURL = assetServerURL.Trim(new char[] { '/' });