diff options
author | Melanie Thielker | 2008-11-23 21:03:54 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-23 21:03:54 +0000 |
commit | 95fec142015fed4449a827155bcb12e019aaa7a2 (patch) | |
tree | fa1d94c2f93d31064ed35abe07b63db8a23bba73 | |
parent | Don't serve texture preview from other people's objects if you (diff) | |
download | opensim-SC_OLD-95fec142015fed4449a827155bcb12e019aaa7a2.zip opensim-SC_OLD-95fec142015fed4449a827155bcb12e019aaa7a2.tar.gz opensim-SC_OLD-95fec142015fed4449a827155bcb12e019aaa7a2.tar.bz2 opensim-SC_OLD-95fec142015fed4449a827155bcb12e019aaa7a2.tar.xz |
Remove code from an experimantal patch that wasn't supposed to be committed
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 52 |
1 files changed, 13 insertions, 39 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index f57d485..2e36123 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -141,14 +141,6 @@ namespace OpenSim.Data.MySQL | |||
141 | Migration m = new Migration(m_connection, assem, "RegionStore"); | 141 | Migration m = new Migration(m_connection, assem, "RegionStore"); |
142 | m.Update(); | 142 | m.Update(); |
143 | 143 | ||
144 | PrepareConnection(); | ||
145 | } | ||
146 | |||
147 | public void Dispose() {} | ||
148 | |||
149 | private void PrepareConnection() | ||
150 | { | ||
151 | GetWaitTimeout(); | ||
152 | 144 | ||
153 | MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection); | 145 | MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection); |
154 | m_primDataAdapter = new MySqlDataAdapter(primSelectCmd); | 146 | m_primDataAdapter = new MySqlDataAdapter(primSelectCmd); |
@@ -211,6 +203,8 @@ namespace OpenSim.Data.MySQL | |||
211 | } | 203 | } |
212 | } | 204 | } |
213 | 205 | ||
206 | public void Dispose() {} | ||
207 | |||
214 | /// <summary> | 208 | /// <summary> |
215 | /// Get the wait_timeout value for our connection | 209 | /// Get the wait_timeout value for our connection |
216 | /// </summary> | 210 | /// </summary> |
@@ -260,8 +254,6 @@ namespace OpenSim.Data.MySQL | |||
260 | m_connection.Close(); | 254 | m_connection.Close(); |
261 | m_connection = new MySqlConnection(m_connectionString); | 255 | m_connection = new MySqlConnection(m_connectionString); |
262 | m_connection.Open(); | 256 | m_connection.Open(); |
263 | |||
264 | PrepareConnection(); | ||
265 | } | 257 | } |
266 | } | 258 | } |
267 | 259 | ||
@@ -316,40 +308,22 @@ namespace OpenSim.Data.MySQL | |||
316 | /// <param name="regionUUID">The region UUID</param> | 308 | /// <param name="regionUUID">The region UUID</param> |
317 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) | 309 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) |
318 | { | 310 | { |
319 | int tries = 3; | 311 | lock (m_dataSet) |
320 | while (tries > 0) | ||
321 | { | 312 | { |
322 | tries--; | 313 | foreach (SceneObjectPart prim in obj.Children.Values) |
323 | |||
324 | try | ||
325 | { | 314 | { |
326 | lock (m_dataSet) | 315 | if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 |
316 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) | ||
327 | { | 317 | { |
328 | foreach (SceneObjectPart prim in obj.Children.Values) | 318 | //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
329 | { | 319 | addPrim(prim, obj.UUID, regionUUID); |
330 | if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 | 320 | } |
331 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) | 321 | else |
332 | { | 322 | { |
333 | //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 323 | // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); |
334 | addPrim(prim, obj.UUID, regionUUID); | ||
335 | } | ||
336 | else | ||
337 | { | ||
338 | // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); | ||
339 | } | ||
340 | } | ||
341 | Commit(); | ||
342 | return; | ||
343 | } | 324 | } |
344 | } | 325 | } |
345 | catch(MySqlException) | 326 | Commit(); |
346 | { | ||
347 | m_connection.Close(); | ||
348 | m_connection = new MySqlConnection(m_connectionString); | ||
349 | m_connection.Open(); | ||
350 | |||
351 | PrepareConnection(); | ||
352 | } | ||
353 | } | 327 | } |
354 | } | 328 | } |
355 | 329 | ||