From 8ad426f329299ecb702189b1d56ffe7be186bd58 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 21 Mar 2012 08:08:43 -0700 Subject: Removed extraneous debug message --- OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs index ca566f2..e0876cd 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs @@ -197,7 +197,6 @@ namespace OpenSim.Server.Handlers.Hypergrid string message = string.Empty; string name = string.Empty; - m_log.DebugFormat("[HGFRIENDS HANDLER]: Friendship offered"); if (!request.ContainsKey("FromID") || !request.ContainsKey("ToID")) return BoolResult(false); -- cgit v1.1 From 4a9ca3ca8ff18f4fcf05c3983db5e6b1d49c97ee Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 21 Mar 2012 10:35:06 -0700 Subject: HG Friends: reroute the status notifications to the HGFriends service, so that they can scale better. They were previously being handled by the UAS; that is still there, but it's now obsolete and will be removed in a future release. --- .../Hypergrid/HGFriendsServerPostHandler.cs | 56 ++++++++++++++++++++++ .../Handlers/Hypergrid/UserAgentServerConnector.cs | 1 + 2 files changed, 57 insertions(+) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs index e0876cd..8ef03e7 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs @@ -105,6 +105,9 @@ namespace OpenSim.Server.Handlers.Hypergrid case "validate_friendship_offered": return ValidateFriendshipOffered(request); + + case "statusnotification": + return StatusNotification(request); /* case "friendship_approved": return FriendshipApproved(request); @@ -228,6 +231,59 @@ namespace OpenSim.Server.Handlers.Hypergrid return BoolResult(success); } + byte[] StatusNotification(Dictionary request) + { + UUID principalID = UUID.Zero; + if (request.ContainsKey("userID")) + UUID.TryParse(request["userID"].ToString(), out principalID); + else + { + m_log.WarnFormat("[HGFRIENDS HANDLER]: no userID in request to notify"); + return FailureResult(); + } + + bool online = true; + if (request.ContainsKey("online")) + Boolean.TryParse(request["online"].ToString(), out online); + else + { + m_log.WarnFormat("[HGFRIENDS HANDLER]: no online in request to notify"); + return FailureResult(); + } + + List friends = new List(); + int i = 0; + foreach (KeyValuePair kvp in request) + { + if (kvp.Key.Equals("friend_" + i.ToString())) + { + friends.Add(kvp.Value.ToString()); + i++; + } + } + + List onlineFriends = m_TheService.StatusNotification(friends, principalID, online); + + Dictionary result = new Dictionary(); + if ((onlineFriends == null) || ((onlineFriends != null) && (onlineFriends.Count == 0))) + result["RESULT"] = "NULL"; + else + { + i = 0; + foreach (UUID f in onlineFriends) + { + result["friend_" + i] = f.ToString(); + i++; + } + } + + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); + + } + #endregion diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index 9a0e27e..db62aaa 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs @@ -222,6 +222,7 @@ namespace OpenSim.Server.Handlers.Hypergrid } + [Obsolete] public XmlRpcResponse StatusNotification(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable hash = new Hashtable(); -- cgit v1.1 From c4b2d24f337eeaf8c7d8e643c3491d491d584cde Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Mar 2012 22:17:07 +0000 Subject: Add llGiveInventory() test from object to object where both objects are owned by the same user. --- OpenSim/Server/Handlers/Login/LLLoginHandlers.cs | 12 ++++++++++++ OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs index 8048f86..ed62f95 100644 --- a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs +++ b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs @@ -73,6 +73,18 @@ namespace OpenSim.Server.Handlers.Login if (requestData != null) { + foreach (string key in requestData.Keys) + { + object value = requestData[key]; + Console.WriteLine("{0}:{1}", key, value); + if (value is ArrayList) + { + ICollection col = value as ICollection; + foreach (object item in col) + Console.WriteLine(" {0}", item); + } + } + if (requestData.ContainsKey("first") && requestData["first"] != null && requestData.ContainsKey("last") && requestData["last"] != null && ( (requestData.ContainsKey("passwd") && requestData["passwd"] != null) || diff --git a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs index 16c93c8..9a7ad34 100644 --- a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs @@ -94,6 +94,5 @@ namespace OpenSim.Server.Handlers.Login server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false); server.SetDefaultLLSDHandler(loginHandlers.HandleLLSDLogin); } - } } -- cgit v1.1