aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorDiva Canto2014-05-31 11:40:54 -0700
committerJustin Clark-Casey2014-06-10 20:22:18 +0100
commit4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3 (patch)
tree58f8fb00db294c6ca64858dd72aa0945bc92040c /OpenSim/Data
parentAdded missing reference (diff)
downloadopensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.zip
opensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.tar.gz
opensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.tar.bz2
opensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.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