aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-18 18:48:59 +0000
committerMelanie Thielker2009-02-18 18:48:59 +0000
commit2d7c15c5606a3349eb38c60866ff48b8c01827a0 (patch)
treefe9e38b9c6dc93eb09c9358fef3a687470348e67 /OpenSim
parentRestoring method 2 of linking regions in HG, which was commented out for some... (diff)
downloadopensim-SC_OLD-2d7c15c5606a3349eb38c60866ff48b8c01827a0.zip
opensim-SC_OLD-2d7c15c5606a3349eb38c60866ff48b8c01827a0.tar.gz
opensim-SC_OLD-2d7c15c5606a3349eb38c60866ff48b8c01827a0.tar.bz2
opensim-SC_OLD-2d7c15c5606a3349eb38c60866ff48b8c01827a0.tar.xz
Fix estate ban list persistence in MySQL and reenable tests
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs2
-rw-r--r--OpenSim/Data/Tests/BasicEstateTest.cs15
2 files changed, 1 insertions, 16 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 8e8c88f..0db624d 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -335,7 +335,7 @@ namespace OpenSim.Data.MySQL
335 335
336 cmd.Parameters.Clear(); 336 cmd.Parameters.Clear();
337 337
338 cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( ?EstateID, ?bannedUUID )"; 338 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( ?EstateID, ?bannedUUID, '', '', '' )";
339 339
340 foreach (EstateBan b in es.EstateBans) 340 foreach (EstateBan b in es.EstateBans)
341 { 341 {
diff --git a/OpenSim/Data/Tests/BasicEstateTest.cs b/OpenSim/Data/Tests/BasicEstateTest.cs
index 04ff8ec..b37a392 100644
--- a/OpenSim/Data/Tests/BasicEstateTest.cs
+++ b/OpenSim/Data/Tests/BasicEstateTest.cs
@@ -219,22 +219,13 @@ namespace OpenSim.Data.Tests
219 [Test] 219 [Test]
220 public void T022_EstateSettingsBanList() 220 public void T022_EstateSettingsBanList()
221 { 221 {
222 // This is not working on native MySQL so ignoring.
223 Assert.Ignore();
224
225 // Letting estate store generate rows to database for us 222 // Letting estate store generate rows to database for us
226 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); 223 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID);
227 224
228 EstateBan estateBan1 = new EstateBan(); 225 EstateBan estateBan1 = new EstateBan();
229 estateBan1.bannedIP = DataTestUtil.STRING_MIN;
230 estateBan1.bannedIPHostMask = DataTestUtil.STRING_MIN;
231 estateBan1.bannedNameMask = DataTestUtil.STRING_MIN;
232 estateBan1.bannedUUID = DataTestUtil.UUID_MIN; 226 estateBan1.bannedUUID = DataTestUtil.UUID_MIN;
233 227
234 EstateBan estateBan2 = new EstateBan(); 228 EstateBan estateBan2 = new EstateBan();
235 estateBan2.bannedIP = DataTestUtil.STRING_MAX(16);
236 estateBan2.bannedIPHostMask = DataTestUtil.STRING_MAX(16);
237 estateBan2.bannedNameMask = DataTestUtil.STRING_MAX(64);
238 estateBan2.bannedUUID = DataTestUtil.UUID_MAX; 229 estateBan2.bannedUUID = DataTestUtil.UUID_MAX;
239 230
240 originalSettings.EstateBans = new EstateBan[] { estateBan1, estateBan2 }; 231 originalSettings.EstateBans = new EstateBan[] { estateBan1, estateBan2 };
@@ -246,14 +237,8 @@ namespace OpenSim.Data.Tests
246 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); 237 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID);
247 238
248 Assert.AreEqual(2, loadedSettings.EstateBans.Length); 239 Assert.AreEqual(2, loadedSettings.EstateBans.Length);
249 Assert.AreEqual(DataTestUtil.STRING_MIN, loadedSettings.EstateBans[0].bannedIP);
250 Assert.AreEqual(DataTestUtil.STRING_MIN, loadedSettings.EstateBans[0].bannedIPHostMask);
251 Assert.AreEqual(DataTestUtil.STRING_MIN, loadedSettings.EstateBans[0].bannedNameMask);
252 Assert.AreEqual(DataTestUtil.UUID_MIN, loadedSettings.EstateBans[0].bannedUUID); 240 Assert.AreEqual(DataTestUtil.UUID_MIN, loadedSettings.EstateBans[0].bannedUUID);
253 241
254 Assert.AreEqual(DataTestUtil.STRING_MAX(16), loadedSettings.EstateBans[1].bannedIP);
255 Assert.AreEqual(DataTestUtil.STRING_MAX(16), loadedSettings.EstateBans[1].bannedIPHostMask);
256 Assert.AreEqual(DataTestUtil.STRING_MAX(64), loadedSettings.EstateBans[1].bannedNameMask);
257 Assert.AreEqual(DataTestUtil.UUID_MAX, loadedSettings.EstateBans[1].bannedUUID); 242 Assert.AreEqual(DataTestUtil.UUID_MAX, loadedSettings.EstateBans[1].bannedUUID);
258 243
259 } 244 }