diff options
author | Tedd Hansen | 2008-01-11 15:46:43 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-01-11 15:46:43 +0000 |
commit | 7f071dd193b5f34ebcd0e6cdfc3020ffe1b77206 (patch) | |
tree | b1b4c497969f8b4beb64915d22f1ad1dd0950c46 /OpenSim/Framework/Data.SQLite | |
parent | * returnin LLUUID.Zero rather than LLUUID.Random on webkey null (diff) | |
download | opensim-SC_OLD-7f071dd193b5f34ebcd0e6cdfc3020ffe1b77206.zip opensim-SC_OLD-7f071dd193b5f34ebcd0e6cdfc3020ffe1b77206.tar.gz opensim-SC_OLD-7f071dd193b5f34ebcd0e6cdfc3020ffe1b77206.tar.bz2 opensim-SC_OLD-7f071dd193b5f34ebcd0e6cdfc3020ffe1b77206.tar.xz |
Log instead of crash (User login, getting friends list)
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 26 |
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 | ||