aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-15 15:57:53 +0000
committerJustin Clark-Casey (justincc)2011-11-15 15:57:53 +0000
commit50803dfe2ca8818f438d740e788762e1faf1078c (patch)
tree17b06e2666f45748399539994d41d4c400f2e09f /OpenSim/Region/Framework
parentrefactor: Don't create a new UUID for passing uuids to client - UUIDs are str... (diff)
downloadopensim-SC_OLD-50803dfe2ca8818f438d740e788762e1faf1078c.zip
opensim-SC_OLD-50803dfe2ca8818f438d740e788762e1faf1078c.tar.gz
opensim-SC_OLD-50803dfe2ca8818f438d740e788762e1faf1078c.tar.bz2
opensim-SC_OLD-50803dfe2ca8818f438d740e788762e1faf1078c.tar.xz
For clients that are entering a simulator from initial login, stop executing FriendsModule.FetchFriendslist() asychronously.
Executing this asynchronously allows a race condition where subsequent friends fetches hit a cache that FetchFriendsList() had not yet populated. Changing this to synchronous may improve issues where a user does not see friends as online even though they are. I don't believe synchronous is a problem here, but if it is, then a more complicated signalling mechanism is required. Locking the cache isn't sufficient.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 96da2c3..bf9ad65 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -73,8 +73,10 @@ namespace OpenSim.Region.Framework.Scenes
73 /// </summary> 73 /// </summary>
74 public event OnNewClientDelegate OnNewClient; 74 public event OnNewClientDelegate OnNewClient;
75 75
76 public delegate void OnClientLoginDelegate(IClientAPI client); 76 /// <summary>
77 public event OnClientLoginDelegate OnClientLogin; 77 /// Fired if the client entering this sim is doing so as a new login
78 /// </summary>
79 public event Action<IClientAPI> OnClientLogin;
78 80
79 public delegate void OnNewPresenceDelegate(ScenePresence presence); 81 public delegate void OnNewPresenceDelegate(ScenePresence presence);
80 82
@@ -651,10 +653,10 @@ namespace OpenSim.Region.Framework.Scenes
651 653
652 public void TriggerOnClientLogin(IClientAPI client) 654 public void TriggerOnClientLogin(IClientAPI client)
653 { 655 {
654 OnClientLoginDelegate handlerClientLogin = OnClientLogin; 656 Action<IClientAPI> handlerClientLogin = OnClientLogin;
655 if (handlerClientLogin != null) 657 if (handlerClientLogin != null)
656 { 658 {
657 foreach (OnClientLoginDelegate d in handlerClientLogin.GetInvocationList()) 659 foreach (Action<IClientAPI> d in handlerClientLogin.GetInvocationList())
658 { 660 {
659 try 661 try
660 { 662 {