diff options
author | Diva Canto | 2011-05-21 16:48:00 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-21 16:48:00 -0700 |
commit | 58c53c41de2cae0bb041a2e8121792e136d1edb2 (patch) | |
tree | b792158cd178f88234f86ab4d72c4224b45fe6ba /OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-58c53c41de2cae0bb041a2e8121792e136d1edb2.zip opensim-SC-58c53c41de2cae0bb041a2e8121792e136d1edb2.tar.gz opensim-SC-58c53c41de2cae0bb041a2e8121792e136d1edb2.tar.bz2 opensim-SC-58c53c41de2cae0bb041a2e8121792e136d1edb2.tar.xz |
Fixed permissions bug related to friends in PermissionsModule. Added FriendsData[] GetFriends(string principalID) to IFriendsData and FriendInfo[] GetFriends(string PrincipalID) to IFriendsService. Refactored some more in the FriendsModule. Made client get notification of local friends permissions upon HGLogin. HG Friends object permissions work.
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index f61ab29..b1c34dd 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | |||
@@ -78,6 +78,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
78 | 78 | ||
79 | public FriendInfo[] GetFriends(UUID principalID) | 79 | public FriendInfo[] GetFriends(UUID principalID) |
80 | { | 80 | { |
81 | return GetFriends(principalID.ToString()); | ||
82 | } | ||
83 | |||
84 | public FriendInfo[] GetFriends(string principalID) | ||
85 | { | ||
81 | if (String.IsNullOrEmpty(m_serverUrl)) | 86 | if (String.IsNullOrEmpty(m_serverUrl)) |
82 | return new FriendInfo[0]; | 87 | return new FriendInfo[0]; |
83 | 88 | ||
@@ -95,7 +100,14 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
95 | UUID friendID = friendEntry["Key"].AsUUID(); | 100 | UUID friendID = friendEntry["Key"].AsUUID(); |
96 | 101 | ||
97 | FriendInfo friend = new FriendInfo(); | 102 | FriendInfo friend = new FriendInfo(); |
98 | friend.PrincipalID = principalID; | 103 | if (!UUID.TryParse(principalID, out friend.PrincipalID)) |
104 | { | ||
105 | string tmp = string.Empty; | ||
106 | if (!Util.ParseUniversalUserIdentifier(principalID, out friend.PrincipalID, out tmp, out tmp, out tmp)) | ||
107 | // bad record. ignore this entry | ||
108 | continue; | ||
109 | } | ||
110 | |||
99 | friend.Friend = friendID.ToString(); | 111 | friend.Friend = friendID.ToString(); |
100 | friend.MyFlags = friendEntry["Value"].AsInteger(); | 112 | friend.MyFlags = friendEntry["Value"].AsInteger(); |
101 | friend.TheirFlags = -1; | 113 | friend.TheirFlags = -1; |
@@ -174,7 +186,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
174 | 186 | ||
175 | #endregion IFriendsService | 187 | #endregion IFriendsService |
176 | 188 | ||
177 | private OSDArray GetFriended(UUID ownerID) | 189 | private OSDArray GetFriended(string ownerID) |
178 | { | 190 | { |
179 | NameValueCollection requestArgs = new NameValueCollection | 191 | NameValueCollection requestArgs = new NameValueCollection |
180 | { | 192 | { |
@@ -195,7 +207,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
195 | } | 207 | } |
196 | } | 208 | } |
197 | 209 | ||
198 | private OSDArray GetFriendedBy(UUID ownerID) | 210 | private OSDArray GetFriendedBy(string ownerID) |
199 | { | 211 | { |
200 | NameValueCollection requestArgs = new NameValueCollection | 212 | NameValueCollection requestArgs = new NameValueCollection |
201 | { | 213 | { |