aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-23 05:16:07 +0000
committerMelanie Thielker2008-11-23 05:16:07 +0000
commitcbd02218704287640ba5c7b564440a6590e038cf (patch)
treee600fd4868bce3e3d007d6d1894dd814d948692a /OpenSim/Data
parentMantis#2660. Thank you kindly, Ruud Lathrop for a patch that: (diff)
downloadopensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.zip
opensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.tar.gz
opensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.tar.bz2
opensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.tar.xz
Plumb in the presence notifications and region shutdown/restart messages
from the presence module to the message server, through the user server and on into the database. This should fix the "Already logged in" issue that grids see after a sim crashes, or a user crashes out of a sim. Not yet a 100% solution for friends, but getting there.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs26
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs4
-rw-r--r--OpenSim/Data/UserDataBase.cs2
5 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index 0afe47c..5185659 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -732,6 +732,10 @@ namespace OpenSim.Data.MSSQL
732 } 732 }
733 } 733 }
734 734
735 override public void LogoutUsers(UUID regionID)
736 {
737 }
738
735 #endregion 739 #endregion
736 740
737 #region Other public methods 741 #region Other public methods
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 288ca86..f203a66 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -891,5 +891,31 @@ namespace OpenSim.Data.MySQL
891 dbm.Release(); 891 dbm.Release();
892 } 892 }
893 } 893 }
894
895 public override void LogoutUsers(UUID regionID)
896 {
897 Dictionary<string, string> param = new Dictionary<string, string>();
898 param["?regionID"] = regionID.ToString();
899
900 MySQLSuperManager dbm = GetLockedConnection("LogoutUsers");
901
902 try
903 {
904 dbm.Manager.ExecuteParameterizedSql(
905 "update " + m_agentsTableName + " SET agentOnline = 0 " +
906 "where currentRegion = ?regionID",
907 param);
908 }
909 catch (Exception e)
910 {
911 dbm.Manager.Reconnect();
912 m_log.Error(e.ToString());
913 return;
914 }
915 finally
916 {
917 dbm.Release();
918 }
919 }
894 } 920 }
895} 921}
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 5ef48c8..1bb2b14 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -308,6 +308,10 @@ namespace OpenSim.Data.NHibernate
308 { 308 {
309 } 309 }
310 310
311 public override void LogoutUsers(UUID regionID)
312 {
313 }
314
311 public override string Name { 315 public override string Name {
312 get { return "NHibernate"; } 316 get { return "NHibernate"; }
313 } 317 }
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index 369fc51..b8f1a68 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -1037,5 +1037,9 @@ namespace OpenSim.Data.SQLite
1037 override public void ResetAttachments(UUID userID) 1037 override public void ResetAttachments(UUID userID)
1038 { 1038 {
1039 } 1039 }
1040
1041 override public void LogoutUsers(UUID regionID)
1042 {
1043 }
1040 } 1044 }
1041} 1045}
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index a5fc8c8..c1b320b 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -75,6 +75,8 @@ namespace OpenSim.Data
75 // } 75 // }
76 public abstract void ResetAttachments(UUID userID); 76 public abstract void ResetAttachments(UUID userID);
77 77
78 public abstract void LogoutUsers(UUID regionID);
79
78 public abstract string Version {get;} 80 public abstract string Version {get;}
79 public abstract string Name {get;} 81 public abstract string Name {get;}
80 public abstract void Initialise(string connect); 82 public abstract void Initialise(string connect);