aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorDiva Canto2014-05-31 11:40:54 -0700
committerDiva Canto2014-05-31 11:40:54 -0700
commiteaf595c008998047eaa754696f8b1bec70faa65c (patch)
treefa7bce4befb6c0fb9f99870b61282e90a92d47f8 /OpenSim/Data
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-eaf595c008998047eaa754696f8b1bec70faa65c.zip
opensim-SC_OLD-eaf595c008998047eaa754696f8b1bec70faa65c.tar.gz
opensim-SC_OLD-eaf595c008998047eaa754696f8b1bec70faa65c.tar.bz2
opensim-SC_OLD-eaf595c008998047eaa754696f8b1bec70faa65c.tar.xz
Fix a bug where estate not found would result in a dummy estate record with erroneous information.
Also, added conversion of EstateSettings from/to key-value pairs in preparation for robust net work connectors.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 3dd46cb..69c89d4 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -145,7 +145,11 @@ namespace OpenSim.Data.MySQL
145 cmd.CommandText = sql; 145 cmd.CommandText = sql;
146 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString()); 146 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
147 147
148 return DoLoad(cmd, regionID, create); 148 EstateSettings e = DoLoad(cmd, regionID, create);
149 if (!create && e.EstateID == 0) // Not found
150 return null;
151
152 return e;
149 } 153 }
150 } 154 }
151 155
@@ -427,7 +431,10 @@ namespace OpenSim.Data.MySQL
427 cmd.CommandText = sql; 431 cmd.CommandText = sql;
428 cmd.Parameters.AddWithValue("?EstateID", estateID); 432 cmd.Parameters.AddWithValue("?EstateID", estateID);
429 433
430 return DoLoad(cmd, UUID.Zero, false); 434 EstateSettings e = DoLoad(cmd, UUID.Zero, false);
435 if (e.EstateID != estateID)
436 return null;
437 return e;
431 } 438 }
432 } 439 }
433 440