aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs26
1 files changed, 17 insertions, 9 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index 9a4a6e7..d2dc804 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -194,18 +194,26 @@ namespace OpenSim.Framework.Data.SQLite
194 using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn)) 194 using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn))
195 { 195 {
196 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); 196 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString()));
197 using (IDataReader reader = cmd.ExecuteReader()) 197
198 try
198 { 199 {
199 while(reader.Read()) 200 using (IDataReader reader = cmd.ExecuteReader())
200 { 201 {
201 FriendListItem user = new FriendListItem(); 202 while (reader.Read())
202 user.FriendListOwner = friendlistowner; 203 {
203 user.Friend = new LLUUID((string)reader[0]); 204 FriendListItem user = new FriendListItem();
204 user.FriendPerms = Convert.ToUInt32(reader[1]); 205 user.FriendListOwner = friendlistowner;
205 user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]); 206 user.Friend = new LLUUID((string)reader[0]);
206 returnlist.Add(user); 207 user.FriendPerms = Convert.ToUInt32(reader[1]);
208 user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]);
209 returnlist.Add(user);
210 }
211 reader.Close();
207 } 212 }
208 reader.Close(); 213 }
214 catch (Exception ex)
215 {
216 MainLog.Instance.Error("USER", "Exception getting friends list for user: " + ex.ToString());
209 } 217 }
210 } 218 }
211 219