Make an exception report more clear. Fix a database access in Presence to
conform to the changes in the generic table handler.slimupdates
parent
b8346e87d8
commit
210649f0d4
|
@ -122,26 +122,33 @@ namespace OpenSim.Data.MySQL
|
||||||
cmd.CommandText = String.Format("select * from {0} where UserID=?UserID", m_Realm);
|
cmd.CommandText = String.Format("select * from {0} where UserID=?UserID", m_Realm);
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("?UserID", userID);
|
cmd.Parameters.AddWithValue("?UserID", userID);
|
||||||
|
;
|
||||||
using (IDataReader reader = cmd.ExecuteReader())
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
{
|
{
|
||||||
|
dbcon.Open();
|
||||||
|
|
||||||
List<UUID> deleteSessions = new List<UUID>();
|
cmd.Connection = dbcon;
|
||||||
int online = 0;
|
|
||||||
|
|
||||||
while(reader.Read())
|
using (IDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
if (bool.Parse(reader["Online"].ToString()))
|
|
||||||
online++;
|
List<UUID> deleteSessions = new List<UUID>();
|
||||||
else
|
int online = 0;
|
||||||
deleteSessions.Add(new UUID(reader["SessionID"].ToString()));
|
|
||||||
|
while(reader.Read())
|
||||||
|
{
|
||||||
|
if (bool.Parse(reader["Online"].ToString()))
|
||||||
|
online++;
|
||||||
|
else
|
||||||
|
deleteSessions.Add(new UUID(reader["SessionID"].ToString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (online == 0 && deleteSessions.Count > 0)
|
||||||
|
deleteSessions.RemoveAt(0);
|
||||||
|
|
||||||
|
foreach (UUID s in deleteSessions)
|
||||||
|
Delete("SessionID", s.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (online == 0 && deleteSessions.Count > 0)
|
|
||||||
deleteSessions.RemoveAt(0);
|
|
||||||
|
|
||||||
foreach (UUID s in deleteSessions)
|
|
||||||
Delete("SessionID", s.ToString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,7 +240,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2}", firstName, lastName, e.StackTrace);
|
m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2}", firstName, lastName, e.ToString());
|
||||||
if (m_PresenceService != null)
|
if (m_PresenceService != null)
|
||||||
m_PresenceService.LogoutAgent(session, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
|
m_PresenceService.LogoutAgent(session, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
|
||||||
return LLFailedLoginResponse.InternalError;
|
return LLFailedLoginResponse.InternalError;
|
||||||
|
|
Loading…
Reference in New Issue