diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
6 files changed, 80 insertions, 33 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 41ea2a2..6d4c65d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -498,6 +498,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
498 | 498 | ||
499 | protected virtual void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) | 499 | protected virtual void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) |
500 | { | 500 | { |
501 | m_log.DebugFormat("[FRIENDS]: Entering StatusNotify for {0}", userID); | ||
502 | |||
501 | List<string> friendStringIds = friendList.ConvertAll<string>(friend => friend.Friend); | 503 | List<string> friendStringIds = friendList.ConvertAll<string>(friend => friend.Friend); |
502 | List<string> remoteFriendStringIds = new List<string>(); | 504 | List<string> remoteFriendStringIds = new List<string>(); |
503 | foreach (string friendStringId in friendStringIds) | 505 | foreach (string friendStringId in friendStringIds) |
@@ -523,12 +525,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
523 | foreach (PresenceInfo friendSession in friendSessions) | 525 | foreach (PresenceInfo friendSession in friendSessions) |
524 | { | 526 | { |
525 | // let's guard against sessions-gone-bad | 527 | // let's guard against sessions-gone-bad |
526 | if (friendSession.RegionID != UUID.Zero) | 528 | if (friendSession != null && friendSession.RegionID != UUID.Zero) |
527 | { | 529 | { |
530 | m_log.DebugFormat("[FRIENDS]: Get region {0}", friendSession.RegionID); | ||
528 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | 531 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
529 | //m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); | 532 | if (region != null) |
530 | m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); | 533 | { |
534 | m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); | ||
535 | } | ||
531 | } | 536 | } |
537 | else | ||
538 | m_log.DebugFormat("[FRIENDS]: friend session is null or the region is UUID.Zero"); | ||
532 | } | 539 | } |
533 | } | 540 | } |
534 | 541 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index ae45b99..a456009 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | |||
@@ -252,7 +252,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
252 | 252 | ||
253 | protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) | 253 | protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) |
254 | { | 254 | { |
255 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); | 255 | m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); |
256 | 256 | ||
257 | // First, let's divide the friends on a per-domain basis | 257 | // First, let's divide the friends on a per-domain basis |
258 | Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); | 258 | Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); |
@@ -348,31 +348,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
348 | return null; | 348 | return null; |
349 | } | 349 | } |
350 | 350 | ||
351 | // public override FriendInfo[] GetFriendsFromService(IClientAPI client) | 351 | public override FriendInfo[] GetFriendsFromService(IClientAPI client) |
352 | // { | 352 | { |
353 | //// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); | 353 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); |
354 | // Boolean agentIsLocal = true; | 354 | Boolean agentIsLocal = true; |
355 | // if (UserManagementModule != null) | 355 | if (UserManagementModule != null) |
356 | // agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); | 356 | agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); |
357 | |||
358 | // if (agentIsLocal) | ||
359 | // return base.GetFriendsFromService(client); | ||
360 | 357 | ||
361 | // FriendInfo[] finfos = new FriendInfo[0]; | 358 | if (agentIsLocal) |
362 | // // Foreigner | 359 | return base.GetFriendsFromService(client); |
363 | // AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); | ||
364 | // if (agentClientCircuit != null) | ||
365 | // { | ||
366 | // //[XXX] string agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit); | ||
367 | 360 | ||
368 | // finfos = FriendsService.GetFriends(client.AgentId.ToString()); | 361 | FriendInfo[] finfos = new FriendInfo[0]; |
369 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); | 362 | // Foreigner |
370 | // } | 363 | AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); |
364 | if (agentClientCircuit != null) | ||
365 | { | ||
366 | // Note that this is calling a different interface than base; this one calls with a string param! | ||
367 | finfos = FriendsService.GetFriends(client.AgentId.ToString()); | ||
368 | m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); | ||
369 | } | ||
371 | 370 | ||
372 | //// m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); | 371 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); |
373 | 372 | ||
374 | // return finfos; | 373 | return finfos; |
375 | // } | 374 | } |
376 | 375 | ||
377 | protected override bool StoreRights(UUID agentID, UUID friendID, int rights) | 376 | protected override bool StoreRights(UUID agentID, UUID friendID, int rights) |
378 | { | 377 | { |
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..1eae0ac 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -244,7 +244,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
244 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | 244 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, |
245 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) | 245 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) |
246 | { | 246 | { |
247 | m_log.DebugFormat("[HGScene] RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID); | 247 | m_log.DebugFormat("[HGScene]: RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID); |
248 | 248 | ||
249 | //if (fromTaskID.Equals(UUID.Zero)) | 249 | //if (fromTaskID.Equals(UUID.Zero)) |
250 | //{ | 250 | //{ |
@@ -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[] { '/' }); |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 194b591..a7cbc8f 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -135,7 +135,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
135 | s.ForEachSOG(delegate(SceneObjectGroup sog) { CacheCreators(sog); }); | 135 | s.ForEachSOG(delegate(SceneObjectGroup sog) { CacheCreators(sog); }); |
136 | } | 136 | } |
137 | 137 | ||
138 | |||
139 | void EventManager_OnNewClient(IClientAPI client) | 138 | void EventManager_OnNewClient(IClientAPI client) |
140 | { | 139 | { |
141 | client.OnConnectionClosed += new Action<IClientAPI>(HandleConnectionClosed); | 140 | client.OnConnectionClosed += new Action<IClientAPI>(HandleConnectionClosed); |
@@ -151,6 +150,10 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
151 | 150 | ||
152 | void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) | 151 | void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) |
153 | { | 152 | { |
153 | // m_log.DebugFormat( | ||
154 | // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", | ||
155 | // uuid, remote_client.Name); | ||
156 | |||
154 | if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) | 157 | if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) |
155 | { | 158 | { |
156 | remote_client.SendNameReply(uuid, "Mr", "OpenSim"); | 159 | remote_client.SendNameReply(uuid, "Mr", "OpenSim"); |
@@ -319,8 +322,34 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
319 | } | 322 | } |
320 | else | 323 | else |
321 | { | 324 | { |
325 | // Let's try the GridUser service | ||
326 | GridUserInfo uInfo = m_Scenes[0].GridUserService.GetGridUserInfo(uuid.ToString()); | ||
327 | if (uInfo != null) | ||
328 | { | ||
329 | string url, first, last, tmp; | ||
330 | UUID u; | ||
331 | if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out u, out url, out first, out last, out tmp)) | ||
332 | { | ||
333 | AddUser(uuid, first, last, url); | ||
334 | |||
335 | if (m_UserCache.ContainsKey(uuid)) | ||
336 | { | ||
337 | names[0] = m_UserCache[uuid].FirstName; | ||
338 | names[1] = m_UserCache[uuid].LastName; | ||
339 | |||
340 | return true; | ||
341 | } | ||
342 | } | ||
343 | else | ||
344 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI {0}", uInfo.UserID); | ||
345 | } | ||
346 | else | ||
347 | { | ||
348 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found for {0}", uuid); | ||
349 | } | ||
350 | |||
322 | names[0] = "Unknown"; | 351 | names[0] = "Unknown"; |
323 | names[1] = "UserUMMTGUN3"; | 352 | names[1] = "UserUMMTGUN7"; |
324 | 353 | ||
325 | return false; | 354 | return false; |
326 | } | 355 | } |
@@ -474,7 +503,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
474 | //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); | 503 | //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); |
475 | 504 | ||
476 | UserData oldUser; | 505 | UserData oldUser; |
477 | //lock the whole block - prevent concurrent update | ||
478 | lock (m_UserCache) | 506 | lock (m_UserCache) |
479 | m_UserCache.TryGetValue(id, out oldUser); | 507 | m_UserCache.TryGetValue(id, out oldUser); |
480 | 508 | ||
@@ -512,7 +540,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
512 | UserData user = new UserData(); | 540 | UserData user = new UserData(); |
513 | user.Id = id; | 541 | user.Id = id; |
514 | 542 | ||
515 | if (creatorData != null && creatorData != string.Empty) | 543 | if (!string.IsNullOrEmpty(creatorData)) |
516 | { | 544 | { |
517 | //creatorData = <endpoint>;<name> | 545 | //creatorData = <endpoint>;<name> |
518 | 546 | ||
@@ -536,8 +564,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
536 | } | 564 | } |
537 | else | 565 | else |
538 | { | 566 | { |
567 | // Temporarily add unknown user entries of this type into the cache so that we can distinguish | ||
568 | // this source from other recent (hopefully resolved) bugs that fail to retrieve a user name binding | ||
569 | // TODO: Can be removed when GUN* unknown users have definitely dropped significantly or | ||
570 | // disappeared. | ||
539 | user.FirstName = "Unknown"; | 571 | user.FirstName = "Unknown"; |
540 | user.LastName = "UserUMMAU"; | 572 | user.LastName = "UserUMMAU3"; |
541 | } | 573 | } |
542 | 574 | ||
543 | AddUserInternal(user); | 575 | AddUserInternal(user); |
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index e434b2e..0e79733 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | |||
@@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
546 | { | 546 | { |
547 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | 547 | ConsoleDisplayList cdl = new ConsoleDisplayList(); |
548 | cdl.AddRow("Name", so.Name); | 548 | cdl.AddRow("Name", so.Name); |
549 | cdl.AddRow("Descrition", so.Description); | 549 | cdl.AddRow("Description", so.Description); |
550 | cdl.AddRow("Local ID", so.LocalId); | 550 | cdl.AddRow("Local ID", so.LocalId); |
551 | cdl.AddRow("UUID", so.UUID); | 551 | cdl.AddRow("UUID", so.UUID); |
552 | cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name)); | 552 | cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name)); |