Log instead of crash (User login, getting friends list)
parent
cdd378a2c2
commit
7f071dd193
|
@ -194,18 +194,26 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn))
|
using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString()));
|
||||||
using (IDataReader reader = cmd.ExecuteReader())
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
while(reader.Read())
|
using (IDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
FriendListItem user = new FriendListItem();
|
while (reader.Read())
|
||||||
user.FriendListOwner = friendlistowner;
|
{
|
||||||
user.Friend = new LLUUID((string)reader[0]);
|
FriendListItem user = new FriendListItem();
|
||||||
user.FriendPerms = Convert.ToUInt32(reader[1]);
|
user.FriendListOwner = friendlistowner;
|
||||||
user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]);
|
user.Friend = new LLUUID((string)reader[0]);
|
||||||
returnlist.Add(user);
|
user.FriendPerms = Convert.ToUInt32(reader[1]);
|
||||||
|
user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]);
|
||||||
|
returnlist.Add(user);
|
||||||
|
}
|
||||||
|
reader.Close();
|
||||||
}
|
}
|
||||||
reader.Close();
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MainLog.Instance.Error("USER", "Exception getting friends list for user: " + ex.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue