aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs5
-rw-r--r--OpenSim/Region/Application/OpenSim.cs5
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs12
3 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index 45b8d6f..0065702 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -122,9 +122,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
122 Thread.CurrentThread.ManagedThreadId.ToString() + 122 Thread.CurrentThread.ManagedThreadId.ToString() +
123 ")"); 123 ")");
124 124
125 m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); 125 bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
126 m_openSim.CreateRegion(regionsToLoad[i], true, out scene); 126 m_openSim.CreateRegion(regionsToLoad[i], true, out scene);
127 regionsToLoad[i].EstateSettings.Save(); 127 if (changed)
128 regionsToLoad[i].EstateSettings.Save();
128 129
129 if (scene != null) 130 if (scene != null)
130 { 131 {
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e4bd857..daae3e6 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -618,10 +618,11 @@ namespace OpenSim
618 return; 618 return;
619 } 619 }
620 620
621 PopulateRegionEstateInfo(regInfo); 621 bool changed = PopulateRegionEstateInfo(regInfo);
622 IScene scene; 622 IScene scene;
623 CreateRegion(regInfo, true, out scene); 623 CreateRegion(regInfo, true, out scene);
624 regInfo.EstateSettings.Save(); 624 if (changed)
625 regInfo.EstateSettings.Save();
625 } 626 }
626 627
627 /// <summary> 628 /// <summary>
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index a0c9a0a..0adb693 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -1060,13 +1060,13 @@ namespace OpenSim
1060 /// Load the estate information for the provided RegionInfo object. 1060 /// Load the estate information for the provided RegionInfo object.
1061 /// </summary> 1061 /// </summary>
1062 /// <param name="regInfo"></param> 1062 /// <param name="regInfo"></param>
1063 public void PopulateRegionEstateInfo(RegionInfo regInfo) 1063 public bool PopulateRegionEstateInfo(RegionInfo regInfo)
1064 { 1064 {
1065 if (EstateDataService != null) 1065 if (EstateDataService != null)
1066 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false); 1066 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false);
1067 1067
1068 if (regInfo.EstateSettings.EstateID != 0) 1068 if (regInfo.EstateSettings.EstateID != 0)
1069 return; 1069 return false; // estate info in the database did not change
1070 1070
1071 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); 1071 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
1072 1072
@@ -1101,7 +1101,7 @@ namespace OpenSim
1101 } 1101 }
1102 1102
1103 if (defaultEstateJoined) 1103 if (defaultEstateJoined)
1104 return; 1104 return true; // need to update the database
1105 else 1105 else
1106 m_log.ErrorFormat( 1106 m_log.ErrorFormat(
1107 "[OPENSIM BASE]: Joining default estate {0} failed", defaultEstateName); 1107 "[OPENSIM BASE]: Joining default estate {0} failed", defaultEstateName);
@@ -1163,8 +1163,10 @@ namespace OpenSim
1163 MainConsole.Instance.Output("Joining the estate failed. Please try again."); 1163 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
1164 } 1164 }
1165 } 1165 }
1166 } 1166 }
1167 } 1167
1168 return true; // need to update the database
1169 }
1168 } 1170 }
1169 1171
1170 public class OpenSimConfigSource 1172 public class OpenSimConfigSource