aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/EventManager.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs4
4 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
index 618e6b5..bba7eed 100644
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ b/OpenSim/Region/Environment/Scenes/EventManager.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Environment.Scenes
52 52
53 public event OnTerrainTickDelegate OnTerrainTick; 53 public event OnTerrainTickDelegate OnTerrainTick;
54 54
55 public delegate void OnBackupDelegate(IRegionDataStore datastore); 55 public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup);
56 56
57 public event OnBackupDelegate OnBackup; 57 public event OnBackupDelegate OnBackup;
58 58
@@ -504,7 +504,7 @@ namespace OpenSim.Region.Environment.Scenes
504 handlerBackup = OnBackup; 504 handlerBackup = OnBackup;
505 if (handlerBackup != null) 505 if (handlerBackup != null)
506 { 506 {
507 handlerBackup(dstore); 507 handlerBackup(dstore, false);
508 } 508 }
509 } 509 }
510 510
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index cb9aee2..bc80d56 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1686,6 +1686,10 @@ namespace OpenSim.Region.Environment.Scenes
1686 1686
1687 SceneObjectGroup grp = part.ParentGroup; 1687 SceneObjectGroup grp = part.ParentGroup;
1688 1688
1689 //force a database backup/update on this SceneObjectGroup
1690 //So that we know the database is upto date, for when deleting the object from it
1691 ForceSceneObjectBackup(grp);
1692
1689 bool permissionToTake = false; 1693 bool permissionToTake = false;
1690 bool permissionToDelete = false; 1694 bool permissionToDelete = false;
1691 1695
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 32bd9aa..194d782 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -728,7 +728,7 @@ namespace OpenSim.Region.Environment.Scenes
728 { 728 {
729 if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged) 729 if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged)
730 { 730 {
731 ((SceneObjectGroup)entity).ProcessBackup(m_storageManager.DataStore); 731 ((SceneObjectGroup)entity).ProcessBackup(m_storageManager.DataStore, false);
732 } 732 }
733 } 733 }
734 734
@@ -1052,6 +1052,14 @@ namespace OpenSim.Region.Environment.Scenes
1052 } 1052 }
1053 } 1053 }
1054 1054
1055 public void ForceSceneObjectBackup(SceneObjectGroup group)
1056 {
1057 if (group != null)
1058 {
1059 group.ProcessBackup(m_storageManager.DataStore, true);
1060 }
1061 }
1062
1055 public void AddReturn(UUID agentID, string objectName, Vector3 location, string reason) 1063 public void AddReturn(UUID agentID, string objectName, Vector3 location, string reason)
1056 { 1064 {
1057 lock (m_returns) 1065 lock (m_returns)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 9c29338..5ae95ee 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1222,7 +1222,7 @@ namespace OpenSim.Region.Environment.Scenes
1222 /// Processes backup. 1222 /// Processes backup.
1223 /// </summary> 1223 /// </summary>
1224 /// <param name="datastore"></param> 1224 /// <param name="datastore"></param>
1225 public void ProcessBackup(IRegionDataStore datastore) 1225 public void ProcessBackup(IRegionDataStore datastore, bool forcedBackup)
1226 { 1226 {
1227 if (!m_isBackedUp) 1227 if (!m_isBackedUp)
1228 return; 1228 return;
@@ -1265,7 +1265,7 @@ namespace OpenSim.Region.Environment.Scenes
1265 if (HasGroupChanged) 1265 if (HasGroupChanged)
1266 { 1266 {
1267 // don't backup while it's selected or you're asking for changes mid stream. 1267 // don't backup while it's selected or you're asking for changes mid stream.
1268 if (isTimeToPersist()) 1268 if ((isTimeToPersist()) || (forcedBackup))
1269 { 1269 {
1270 m_log.DebugFormat( 1270 m_log.DebugFormat(
1271 "[SCENE]: Storing {0}, {1} in {2}", 1271 "[SCENE]: Storing {0}, {1} in {2}",