aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/Resources/006_GridStore.sql5
-rw-r--r--OpenSim/Services/GridService/GridService.cs2
2 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/006_GridStore.sql b/OpenSim/Data/MySQL/Resources/006_GridStore.sql
new file mode 100644
index 0000000..91322d6
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/006_GridStore.sql
@@ -0,0 +1,5 @@
1BEGIN;
2
3ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0;
4
5COMMIT;
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 3ae51e4..9bf986e 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -139,6 +139,7 @@ namespace OpenSim.Services.GridService
139 139
140 try 140 try
141 { 141 {
142 rdata.Data["last_seen"] = Util.UnixTimeSinceEpoch();
142 m_Database.Store(rdata); 143 m_Database.Store(rdata);
143 } 144 }
144 catch (Exception e) 145 catch (Exception e)
@@ -164,6 +165,7 @@ namespace OpenSim.Services.GridService
164 int flags = Convert.ToInt32(region.Data["flags"]); 165 int flags = Convert.ToInt32(region.Data["flags"]);
165 flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline; 166 flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline;
166 region.Data["flags"] = flags.ToString(); 167 region.Data["flags"] = flags.ToString();
168 region.Data["last_seen"] = Util.UnixTimeSinceEpoch();
167 try 169 try
168 { 170 {
169 m_Database.Store(region); 171 m_Database.Store(region);