diff options
author | Homer Horwitz | 2008-11-25 19:08:52 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-11-25 19:08:52 +0000 |
commit | 4acddb6797547d75959baf14102ca3f033edd3aa (patch) | |
tree | 7e0bf6098c296b77b50773bdea8a8f19018b60e5 /OpenSim | |
parent | Revert the rest of r7468 (diff) | |
download | opensim-SC_OLD-4acddb6797547d75959baf14102ca3f033edd3aa.zip opensim-SC_OLD-4acddb6797547d75959baf14102ca3f033edd3aa.tar.gz opensim-SC_OLD-4acddb6797547d75959baf14102ca3f033edd3aa.tar.bz2 opensim-SC_OLD-4acddb6797547d75959baf14102ca3f033edd3aa.tar.xz |
Mantis#2692: Thanks Diva, for a patch that fixes a bug in HyperGrid.
Diffstat (limited to '')
3 files changed, 19 insertions, 7 deletions
diff --git a/OpenSim/Framework/HGNetworkServersInfo.cs b/OpenSim/Framework/HGNetworkServersInfo.cs index b9bc07a..85fbe35 100644 --- a/OpenSim/Framework/HGNetworkServersInfo.cs +++ b/OpenSim/Framework/HGNetworkServersInfo.cs | |||
@@ -66,6 +66,20 @@ namespace OpenSim.Framework | |||
66 | return ret; | 66 | return ret; |
67 | } | 67 | } |
68 | 68 | ||
69 | public bool IsLocalUser(UserProfileData userData) | ||
70 | { | ||
71 | if (userData != null) | ||
72 | { | ||
73 | if (userData is ForeignUserProfileData) | ||
74 | return IsLocalUser(((ForeignUserProfileData)userData).UserServerURI); | ||
75 | else | ||
76 | return true; | ||
77 | } | ||
78 | else | ||
79 | // Something fishy; ignore it | ||
80 | return true; | ||
81 | } | ||
82 | |||
69 | public static string ServerURI(string uri) | 83 | public static string ServerURI(string uri) |
70 | { | 84 | { |
71 | IPAddress ipaddr1 = null; | 85 | IPAddress ipaddr1 = null; |
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs index 889c77e..928b7c8 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGAssetMapper.cs | |||
@@ -81,15 +81,13 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
81 | return null; | 81 | return null; |
82 | } | 82 | } |
83 | 83 | ||
84 | private bool IsHomeUser(UUID userID) | 84 | private bool IsLocalUser(UUID userID) |
85 | { | 85 | { |
86 | CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); | 86 | CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); |
87 | 87 | ||
88 | if (uinfo != null) | 88 | if (uinfo != null) |
89 | { | 89 | { |
90 | //if ((uinfo.UserProfile.UserAssetURI == null) || (uinfo.UserProfile.UserAssetURI == "") || | 90 | if (HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile)) |
91 | // uinfo.UserProfile.UserAssetURI.Equals(m_scene.CommsManager.NetworkServersInfo.AssetURL)) | ||
92 | if (HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile.UserAssetURI)) | ||
93 | { | 91 | { |
94 | m_log.Debug("[HGScene]: Home user " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName); | 92 | m_log.Debug("[HGScene]: Home user " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName); |
95 | return true; | 93 | return true; |
@@ -285,7 +283,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
285 | 283 | ||
286 | public void Get(UUID itemID, UUID ownerID) | 284 | public void Get(UUID itemID, UUID ownerID) |
287 | { | 285 | { |
288 | if (!IsInAssetMap(itemID) && !IsHomeUser(ownerID)) | 286 | if (!IsInAssetMap(itemID) && !IsLocalUser(ownerID)) |
289 | { | 287 | { |
290 | // Get the item from the remote asset server onto the local AssetCache | 288 | // Get the item from the remote asset server onto the local AssetCache |
291 | // and place an entry in m_assetMap | 289 | // and place an entry in m_assetMap |
@@ -328,7 +326,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
328 | 326 | ||
329 | public void Post(UUID itemID, UUID ownerID) | 327 | public void Post(UUID itemID, UUID ownerID) |
330 | { | 328 | { |
331 | if (!IsHomeUser(ownerID)) | 329 | if (!IsLocalUser(ownerID)) |
332 | { | 330 | { |
333 | // Post the item from the local AssetCache ontp the remote asset server | 331 | // Post the item from the local AssetCache ontp the remote asset server |
334 | // and place an entry in m_assetMap | 332 | // and place an entry in m_assetMap |
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs index 9eb331a..9dd2426 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
118 | CachedUserInfo uinfo = m_commsProvider.UserProfileCacheService.GetUserDetails(avatar.UUID); | 118 | CachedUserInfo uinfo = m_commsProvider.UserProfileCacheService.GetUserDetails(avatar.UUID); |
119 | if (uinfo != null) | 119 | if (uinfo != null) |
120 | { | 120 | { |
121 | isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile.UserAssetURI); | 121 | isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile); |
122 | realHandle = m_hg.FindRegionHandle(regionHandle); | 122 | realHandle = m_hg.FindRegionHandle(regionHandle); |
123 | Console.WriteLine("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString()); | 123 | Console.WriteLine("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString()); |
124 | } | 124 | } |