From f2f30a78908c93e1397be52e476da9fb5c44282d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 2 Jun 2011 07:26:40 -0700 Subject: HG Friends bug fix: connector was shrinking principalID to UUID. --- .../Handlers/Friends/FriendsServerPostHandler.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs index 9969086..fc97d8c 100644 --- a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs @@ -160,9 +160,9 @@ namespace OpenSim.Server.Handlers.Friends byte[] StoreFriend(Dictionary request) { - FriendInfo friend = new FriendInfo(request); - - bool success = m_FriendsService.StoreFriend(friend.PrincipalID.ToString(), friend.Friend, friend.MyFlags); + string principalID = string.Empty, friend = string.Empty; int flags = 0; + FromKeyValuePairs(request, out principalID, out friend, out flags); + bool success = m_FriendsService.StoreFriend(principalID, friend, flags); if (success) return SuccessResult(); @@ -275,6 +275,19 @@ namespace OpenSim.Server.Handlers.Friends return ms.ToArray(); } + void FromKeyValuePairs(Dictionary kvp, out string principalID, out string friend, out int flags) + { + principalID = string.Empty; + if (kvp.ContainsKey("PrincipalID") && kvp["PrincipalID"] != null) + principalID = kvp["PrincipalID"].ToString(); + friend = string.Empty; + if (kvp.ContainsKey("Friend") && kvp["Friend"] != null) + friend = kvp["Friend"].ToString(); + flags = 0; + if (kvp.ContainsKey("MyFlags") && kvp["MyFlags"] != null) + Int32.TryParse(kvp["MyFlags"].ToString(), out flags); + } + #endregion } } -- cgit v1.1 From 65c71050cceb1a823fad682b906e0f8250f244c2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 2 Jun 2011 09:39:29 -0700 Subject: Extra debug message --- OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs index 74b7422..514793d 100644 --- a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs @@ -72,6 +72,7 @@ namespace OpenSim.Server.Handlers.Hypergrid if (m_IMService == null) throw new Exception("InstantMessage server connector cannot proceed because of missing service"); + m_log.DebugFormat("[XXX] IM Server Connector is ON"); MainServer.Instance.AddXmlRPCHandler("grid_instant_message", ProcessInstantMessage, false); } -- cgit v1.1 From 6312eea459e6c64b6b5fafe06c9b8e6617bb03c3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 2 Jun 2011 10:14:26 -0700 Subject: HG IM bug fix: grid_instant_message was being placed in the default port instead of the specified one. --- OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs index 514793d..80eb5d2 100644 --- a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs @@ -72,8 +72,7 @@ namespace OpenSim.Server.Handlers.Hypergrid if (m_IMService == null) throw new Exception("InstantMessage server connector cannot proceed because of missing service"); - m_log.DebugFormat("[XXX] IM Server Connector is ON"); - MainServer.Instance.AddXmlRPCHandler("grid_instant_message", ProcessInstantMessage, false); + server.AddXmlRPCHandler("grid_instant_message", ProcessInstantMessage, false); } -- cgit v1.1