In LocalFriendshipTerminated, send the original client's agentId to the friend being removed instead of the friend's own id.

cpu-performance
Donnie Roberts 2013-06-05 19:55:18 -04:00 committed by Justin Clark-Casey (justincc)
parent 25fa647a74
commit 045c26f626
2 changed files with 4 additions and 4 deletions

View File

@ -685,7 +685,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
//
// Try local
if (LocalFriendshipTerminated(exfriendID))
if (LocalFriendshipTerminated(client.AgentId, exfriendID))
return;
PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { exfriendID.ToString() });
@ -827,13 +827,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
return false;
}
public bool LocalFriendshipTerminated(UUID exfriendID)
public bool LocalFriendshipTerminated(UUID userID, UUID exfriendID)
{
IClientAPI friendClient = LocateClientObject(exfriendID);
if (friendClient != null)
{
// the friend in this sim as root agent
friendClient.SendTerminateFriend(exfriendID);
friendClient.SendTerminateFriend(userID);
// update local cache
RecacheFriends(friendClient);
// we're done

View File

@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
if (!UUID.TryParse(request["ToID"].ToString(), out toID))
return FailureResult();
if (m_FriendsModule.LocalFriendshipTerminated(toID))
if (m_FriendsModule.LocalFriendshipTerminated(fromID, toID))
return SuccessResult();
return FailureResult();