diff options
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index f68e751..3e3ab71 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | |||
@@ -253,7 +253,10 @@ namespace OpenSim.Framework.Data.SQLite | |||
253 | { | 253 | { |
254 | fillUserRow(row, user); | 254 | fillUserRow(row, user); |
255 | } | 255 | } |
256 | 256 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the | |
257 | // useragents table once the useragent is null | ||
258 | // | ||
259 | // A database guy should look at this and figure out the best way to clear the useragents table. | ||
257 | if (user.currentAgent != null) | 260 | if (user.currentAgent != null) |
258 | { | 261 | { |
259 | DataTable ua = ds.Tables["useragents"]; | 262 | DataTable ua = ds.Tables["useragents"]; |
@@ -269,6 +272,23 @@ namespace OpenSim.Framework.Data.SQLite | |||
269 | fillUserAgentRow(row, user.currentAgent); | 272 | fillUserAgentRow(row, user.currentAgent); |
270 | } | 273 | } |
271 | } | 274 | } |
275 | else | ||
276 | { | ||
277 | // I just added this to help the standalone login situation. | ||
278 | //It still needs to be looked at by a Database guy | ||
279 | if (row == null) | ||
280 | { | ||
281 | // do nothing | ||
282 | } | ||
283 | else | ||
284 | { | ||
285 | DataTable ua = ds.Tables["useragents"]; | ||
286 | row = ua.Rows.Find(user.UUID); | ||
287 | row.Delete(); | ||
288 | ua.AcceptChanges(); | ||
289 | } | ||
290 | } | ||
291 | |||
272 | MainLog.Instance.Verbose("SQLITE", | 292 | MainLog.Instance.Verbose("SQLITE", |
273 | "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); | 293 | "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); |
274 | // save changes off to disk | 294 | // save changes off to disk |