diff options
author | Melanie | 2012-10-20 02:33:24 +0100 |
---|---|---|
committer | Melanie | 2012-10-20 02:33:24 +0100 |
commit | 6ad8d3c43f130dfb80a7543e139ffa4dacb840ad (patch) | |
tree | 24baeecab6becf3bb30c26046ea95b75e6bbdc0f /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | minor: Rename assetCache constructor param in UUIDGatherer to assetService wh... (diff) | |
download | opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.zip opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.tar.gz opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.tar.bz2 opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 27 insertions, 32 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 11db18a..f1903c3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Linq; | ||
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using System.Threading; | 33 | using System.Threading; |
33 | using log4net; | 34 | using log4net; |
@@ -495,42 +496,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
495 | 496 | ||
496 | protected virtual void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) | 497 | protected virtual void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) |
497 | { | 498 | { |
498 | foreach (FriendInfo friend in friendList) | 499 | List<string> friendStringIds = friendList.ConvertAll<string>(friend => friend.Friend); |
500 | List<string> remoteFriendStringIds = new List<string>(); | ||
501 | foreach (string friendStringId in friendStringIds) | ||
499 | { | 502 | { |
500 | UUID friendID; | 503 | UUID friendUuid; |
501 | if (UUID.TryParse(friend.Friend, out friendID)) | 504 | if (UUID.TryParse(friendStringId, out friendUuid)) |
502 | { | 505 | { |
503 | // Try local | 506 | if (LocalStatusNotification(userID, friendUuid, online)) |
504 | if (LocalStatusNotification(userID, friendID, online)) | ||
505 | continue; | 507 | continue; |
506 | 508 | ||
507 | // The friend is not here [as root]. Let's forward. | 509 | remoteFriendStringIds.Add(friendStringId); |
508 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); | ||
509 | if (friendSessions != null && friendSessions.Length > 0) | ||
510 | { | ||
511 | PresenceInfo friendSession = null; | ||
512 | foreach (PresenceInfo pinfo in friendSessions) | ||
513 | { | ||
514 | if (pinfo.RegionID != UUID.Zero) // let's guard against sessions-gone-bad | ||
515 | { | ||
516 | friendSession = pinfo; | ||
517 | break; | ||
518 | } | ||
519 | } | ||
520 | |||
521 | if (friendSession != null) | ||
522 | { | ||
523 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | ||
524 | //m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); | ||
525 | m_FriendsSimConnector.StatusNotify(region, userID, friendID, online); | ||
526 | } | ||
527 | } | ||
528 | |||
529 | // Friend is not online. Ignore. | ||
530 | } | 510 | } |
531 | else | 511 | else |
532 | { | 512 | { |
533 | m_log.WarnFormat("[FRIENDS]: Error parsing friend ID {0}", friend.Friend); | 513 | m_log.WarnFormat("[FRIENDS]: Error parsing friend ID {0}", friendStringId); |
514 | } | ||
515 | } | ||
516 | |||
517 | // We do this regrouping so that we can efficiently send a single request rather than one for each | ||
518 | // friend in what may be a very large friends list. | ||
519 | PresenceInfo[] friendSessions = PresenceService.GetAgents(remoteFriendStringIds.ToArray()); | ||
520 | |||
521 | foreach (PresenceInfo friendSession in friendSessions) | ||
522 | { | ||
523 | // let's guard against sessions-gone-bad | ||
524 | if (friendSession.RegionID != UUID.Zero) | ||
525 | { | ||
526 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | ||
527 | //m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); | ||
528 | m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); | ||
534 | } | 529 | } |
535 | } | 530 | } |
536 | } | 531 | } |
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 1f340df..93a045e 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
42 | { | 42 | { |
43 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager | 43 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private const int ALL_SIDES = -1; | 47 | private const int ALL_SIDES = -1; |
48 | 48 | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 2127f4d..ade5e76 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -290,7 +290,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
290 | 290 | ||
291 | foreach (DearchiveContext sceneContext in sceneContexts.Values) | 291 | foreach (DearchiveContext sceneContext in sceneContexts.Values) |
292 | { | 292 | { |
293 | m_log.InfoFormat("[ARCHIVER:] Loading region {0}", sceneContext.Scene.RegionInfo.RegionName); | 293 | m_log.InfoFormat("[ARCHIVER]: Loading region {0}", sceneContext.Scene.RegionInfo.RegionName); |
294 | 294 | ||
295 | if (!m_merge) | 295 | if (!m_merge) |
296 | { | 296 | { |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
324 | Util.FireAndForget(delegate(object o) | 324 | Util.FireAndForget(delegate(object o) |
325 | { | 325 | { |
326 | Thread.Sleep(15000); | 326 | Thread.Sleep(15000); |
327 | m_log.Info("Starting scripts in scene objects"); | 327 | m_log.Info("[ARCHIVER]: Starting scripts in scene objects"); |
328 | 328 | ||
329 | foreach (DearchiveContext sceneContext in sceneContexts.Values) | 329 | foreach (DearchiveContext sceneContext in sceneContexts.Values) |
330 | { | 330 | { |