From 952029380a6a038e382dd3b2c312b3e16ff08625 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Jun 2010 10:59:59 -0700 Subject: Fixed a couple of buglets in Friendship offers / acceptance / decline when avies are in different sims. --- OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs | 2 +- OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Connectors/Friends') diff --git a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs index baefebd..d7a5731 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs @@ -196,7 +196,7 @@ namespace OpenSim.Services.Connectors { Dictionary sendData = new Dictionary(); sendData["PRINCIPALID"] = PrincipalID.ToString(); - sendData["FRIENDS"] = Friend; + sendData["FRIEND"] = Friend; sendData["METHOD"] = "deletefriend"; string reqString = ServerUtils.BuildQueryString(sendData); diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index d7cb015..0a7b277 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs @@ -74,6 +74,9 @@ namespace OpenSim.Services.Connectors.Friends public bool FriendshipDenied(GridRegion region, UUID userID, string userName, UUID friendID) { + if (region == null) + return false; + Dictionary sendData = new Dictionary(); //sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); //sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); @@ -131,7 +134,11 @@ namespace OpenSim.Services.Connectors.Friends private bool Call(GridRegion region, Dictionary sendData) { string reqString = ServerUtils.BuildQueryString(sendData); - // m_log.DebugFormat("[FRIENDS CONNECTOR]: queryString = {0}", reqString); + //m_log.DebugFormat("[FRIENDS CONNECTOR]: queryString = {0}", reqString); + if (region == null) + return false; + + m_log.DebugFormat("[FRIENDS CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort); try { string url = "http://" + region.ExternalHostName + ":" + region.HttpPort; -- cgit v1.1