diff options
Diffstat (limited to 'OpenSim')
9 files changed, 26 insertions, 103 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 6d73c64..2aea641 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -264,12 +264,7 @@ namespace OpenSim.Data.MSSQL | |||
264 | regionprofile.regionUserURI = (string)reader["regionUserURI"]; | 264 | regionprofile.regionUserURI = (string)reader["regionUserURI"]; |
265 | regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; | 265 | regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; |
266 | regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; | 266 | regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; |
267 | try | 267 | regionprofile.owner_uuid = new LLUUID((string) reader["owner_uuid"]); |
268 | { | ||
269 | regionprofile.owner_uuid = new LLUUID((string)reader["owner_uuid"]); | ||
270 | } | ||
271 | catch(Exception) | ||
272 | {} | ||
273 | // World Map Addition | 268 | // World Map Addition |
274 | string tempRegionMap = reader["regionMapTexture"].ToString(); | 269 | string tempRegionMap = reader["regionMapTexture"].ToString(); |
275 | if (tempRegionMap != String.Empty) | 270 | if (tempRegionMap != String.Empty) |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index c62cfa7..1f95aad 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -253,13 +253,7 @@ namespace OpenSim.Data.MySQL | |||
253 | lock (dbcon) | 253 | lock (dbcon) |
254 | { | 254 | { |
255 | // Close the DB connection | 255 | // Close the DB connection |
256 | try | 256 | dbcon.Close(); |
257 | { | ||
258 | dbcon.Close(); | ||
259 | } | ||
260 | catch | ||
261 | { | ||
262 | } | ||
263 | 257 | ||
264 | // Try to reopen it | 258 | // Try to reopen it |
265 | try | 259 | try |
@@ -269,7 +263,7 @@ namespace OpenSim.Data.MySQL | |||
269 | } | 263 | } |
270 | catch (Exception e) | 264 | catch (Exception e) |
271 | { | 265 | { |
272 | m_log.Error("Unable to reconnect to database " + e.ToString()); | 266 | m_log.Error("Unable to reconnect to database " + e); |
273 | } | 267 | } |
274 | 268 | ||
275 | // Run the query again | 269 | // Run the query again |
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 4f21ab6..272cf2b 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -188,8 +188,7 @@ namespace OpenSim.Framework | |||
188 | } | 188 | } |
189 | packet.Effect = effectBlock.ToArray(); | 189 | packet.Effect = effectBlock.ToArray(); |
190 | 190 | ||
191 | // Wasteful, I know | 191 | IClientAPI[] LocalClients; |
192 | IClientAPI[] LocalClients = new IClientAPI[0]; | ||
193 | lock (m_clients) | 192 | lock (m_clients) |
194 | { | 193 | { |
195 | LocalClients = new IClientAPI[m_clients.Count]; | 194 | LocalClients = new IClientAPI[m_clients.Count]; |
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 69e0437..fddf01d 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -334,18 +334,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
334 | /// <param name="asset"></param> | 334 | /// <param name="asset"></param> |
335 | public void AddAsset(AssetBase asset) | 335 | public void AddAsset(AssetBase asset) |
336 | { | 336 | { |
337 | string temporary = asset.Temporary ? "temporary" : String.Empty; | ||
338 | string type = asset.Type == 0 ? "texture" : "asset"; | ||
339 | |||
340 | string result = "Ignored"; | ||
341 | |||
342 | if (asset.Type == 0) | 337 | if (asset.Type == 0) |
343 | { | 338 | { |
344 | if (Textures.ContainsKey(asset.FullID)) | 339 | if (!Textures.ContainsKey(asset.FullID)) |
345 | { | ||
346 | result = "Duplicate ignored."; | ||
347 | } | ||
348 | else | ||
349 | { | 340 | { |
350 | TextureImage textur = new TextureImage(asset); | 341 | TextureImage textur = new TextureImage(asset); |
351 | Textures.Add(textur.FullID, textur); | 342 | Textures.Add(textur.FullID, textur); |
@@ -353,24 +344,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
353 | if (StatsManager.SimExtraStats != null) | 344 | if (StatsManager.SimExtraStats != null) |
354 | StatsManager.SimExtraStats.AddTexture(textur); | 345 | StatsManager.SimExtraStats.AddTexture(textur); |
355 | 346 | ||
356 | if (asset.Temporary) | 347 | if (!asset.Temporary) |
357 | { | ||
358 | result = "Added to cache"; | ||
359 | } | ||
360 | else | ||
361 | { | 348 | { |
362 | m_assetServer.StoreAndCommitAsset(asset); | 349 | m_assetServer.StoreAndCommitAsset(asset); |
363 | result = "Added to server"; | ||
364 | } | 350 | } |
365 | } | 351 | } |
366 | } | 352 | } |
367 | else | 353 | else |
368 | { | 354 | { |
369 | if (Assets.ContainsKey(asset.FullID)) | 355 | if (!Assets.ContainsKey(asset.FullID)) |
370 | { | ||
371 | result = "Duplicate ignored."; | ||
372 | } | ||
373 | else | ||
374 | { | 356 | { |
375 | AssetInfo assetInf = new AssetInfo(asset); | 357 | AssetInfo assetInf = new AssetInfo(asset); |
376 | Assets.Add(assetInf.FullID, assetInf); | 358 | Assets.Add(assetInf.FullID, assetInf); |
@@ -378,29 +360,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
378 | if (StatsManager.SimExtraStats != null) | 360 | if (StatsManager.SimExtraStats != null) |
379 | StatsManager.SimExtraStats.AddAsset(assetInf); | 361 | StatsManager.SimExtraStats.AddAsset(assetInf); |
380 | 362 | ||
381 | if (asset.Temporary) | 363 | if (!asset.Temporary) |
382 | { | ||
383 | result = "Added to cache"; | ||
384 | } | ||
385 | else | ||
386 | { | 364 | { |
387 | m_assetServer.StoreAndCommitAsset(asset); | 365 | m_assetServer.StoreAndCommitAsset(asset); |
388 | result = "Added to server"; | ||
389 | } | 366 | } |
390 | } | 367 | } |
391 | } | 368 | } |
392 | #if DEBUG | ||
393 | //m_log.DebugFormat("[ASSET CACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); | ||
394 | #endif | ||
395 | } | 369 | } |
396 | 370 | ||
397 | // See IAssetReceiver | 371 | // See IAssetReceiver |
398 | public void AssetReceived(AssetBase asset, bool IsTexture) | 372 | public void AssetReceived(AssetBase asset, bool IsTexture) |
399 | { | 373 | { |
400 | #if DEBUG | ||
401 | //m_log.DebugFormat("[ASSET CACHE]: Received {0} [{1}]", IsTexture ? "texture" : "asset", asset.FullID); | ||
402 | #endif | ||
403 | |||
404 | if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server | 374 | if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server |
405 | { | 375 | { |
406 | //check if it is a texture or not | 376 | //check if it is a texture or not |
@@ -411,13 +381,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
411 | if (IsTexture) | 381 | if (IsTexture) |
412 | { | 382 | { |
413 | TextureImage image = new TextureImage(asset); | 383 | TextureImage image = new TextureImage(asset); |
414 | if (Textures.ContainsKey(image.FullID)) | 384 | if (!Textures.ContainsKey(image.FullID)) |
415 | { | ||
416 | #if DEBUG | ||
417 | //m_log.DebugFormat("[ASSET CACHE]: There's already an texture {0} in memory. Skipping.", asset.FullID); | ||
418 | #endif | ||
419 | } | ||
420 | else | ||
421 | { | 385 | { |
422 | Textures.Add(image.FullID, image); | 386 | Textures.Add(image.FullID, image); |
423 | 387 | ||
@@ -430,13 +394,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
430 | else | 394 | else |
431 | { | 395 | { |
432 | AssetInfo assetInf = new AssetInfo(asset); | 396 | AssetInfo assetInf = new AssetInfo(asset); |
433 | if (Assets.ContainsKey(assetInf.FullID)) | 397 | if (!Assets.ContainsKey(assetInf.FullID)) |
434 | { | ||
435 | #if DEBUG | ||
436 | //m_log.DebugFormat("[ASSET CACHE]: There's already an asset {0} in memory. Skipping.", asset.FullID); | ||
437 | #endif | ||
438 | } | ||
439 | else | ||
440 | { | 398 | { |
441 | Assets.Add(assetInf.FullID, assetInf); | 399 | Assets.Add(assetInf.FullID, assetInf); |
442 | 400 | ||
@@ -446,18 +404,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
446 | } | 404 | } |
447 | 405 | ||
448 | if (RequestedAssets.ContainsKey(assetInf.FullID)) | 406 | if (RequestedAssets.ContainsKey(assetInf.FullID)) |
449 | { | 407 | { |
450 | #if DEBUG | 408 | AssetRequest req = RequestedAssets[assetInf.FullID]; |
451 | //m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID); | 409 | req.AssetInf = assetInf; |
452 | #endif | 410 | req.NumPackets = CalculateNumPackets(assetInf.Data); |
453 | 411 | ||
454 | AssetRequest req = RequestedAssets[assetInf.FullID]; | 412 | RequestedAssets.Remove(assetInf.FullID); |
455 | req.AssetInf = assetInf; | 413 | AssetRequests.Add(req); |
456 | req.NumPackets = CalculateNumPackets(assetInf.Data); | 414 | } |
457 | |||
458 | RequestedAssets.Remove(assetInf.FullID); | ||
459 | AssetRequests.Add(req); | ||
460 | } | ||
461 | } | 415 | } |
462 | } | 416 | } |
463 | 417 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0ea7e0a..aa27fdd 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3279,6 +3279,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3279 | m_needAck.Add(Pack.Header.Sequence, Pack); | 3279 | m_needAck.Add(Pack.Header.Sequence, Pack); |
3280 | m_unAckedBytes += Pack.ToBytes().Length; | 3280 | m_unAckedBytes += Pack.ToBytes().Length; |
3281 | } | 3281 | } |
3282 | //BUG: severity=major - This looks like a framework bug!? | ||
3282 | catch (Exception) // HACKY | 3283 | catch (Exception) // HACKY |
3283 | { | 3284 | { |
3284 | // Ignore | 3285 | // Ignore |
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index a53bfcd..a150164 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -64,11 +64,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
64 | PendingDownloads = 19, | 64 | PendingDownloads = 19, |
65 | PendingUploads = 20, | 65 | PendingUploads = 20, |
66 | UnAckedBytes = 24, | 66 | UnAckedBytes = 24, |
67 | |||
68 | // Havok4 related... May or may not be in upcoming LLclients | ||
69 | // (kelly added them sometime late in January 2008) | ||
70 | NumRCCSLODReduced = 25, | ||
71 | NumRCCSFixed = 26 | ||
72 | } | 67 | } |
73 | 68 | ||
74 | // Sending a stats update every 3 seconds | 69 | // Sending a stats update every 3 seconds |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 1f23d00..74494d9 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -531,13 +531,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
531 | { | 531 | { |
532 | m_host.AddScriptLPS(1); | 532 | m_host.AddScriptLPS(1); |
533 | LLUUID keyID = LLUUID.Zero; | 533 | LLUUID keyID = LLUUID.Zero; |
534 | try | 534 | LLUUID.TryParse(id, out keyID); |
535 | { | 535 | |
536 | if (id.Length > 0) keyID = new LLUUID(id); | ||
537 | } | ||
538 | catch | ||
539 | { | ||
540 | } | ||
541 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); | 536 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); |
542 | 537 | ||
543 | return; | 538 | return; |
@@ -547,13 +542,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
547 | { | 542 | { |
548 | m_host.AddScriptLPS(1); | 543 | m_host.AddScriptLPS(1); |
549 | LLUUID keyID = LLUUID.Zero; | 544 | LLUUID keyID = LLUUID.Zero; |
550 | try | 545 | LLUUID.TryParse(id, out keyID); |
551 | { | ||
552 | if (id.Length > 0) keyID = new LLUUID(id); | ||
553 | } | ||
554 | catch | ||
555 | { | ||
556 | } | ||
557 | 546 | ||
558 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); | 547 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); |
559 | return; | 548 | return; |
@@ -2252,8 +2241,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2252 | 2241 | ||
2253 | m_host.AddScriptLPS(1); | 2242 | m_host.AddScriptLPS(1); |
2254 | 2243 | ||
2255 | bool attachment=false; // Attachments not implemented yet. TODO: reflect real attachemnt state | ||
2256 | |||
2257 | if (m_host.ParentGroup.RootPart.m_IsAttachment && agent == m_host.ParentGroup.RootPart.m_attachedAvatar) | 2244 | if (m_host.ParentGroup.RootPart.m_IsAttachment && agent == m_host.ParentGroup.RootPart.m_attachedAvatar) |
2258 | { | 2245 | { |
2259 | // When attached, certain permissions are implicit if requested from owner | 2246 | // When attached, certain permissions are implicit if requested from owner |
@@ -3181,7 +3168,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3181 | { | 3168 | { |
3182 | return Convert.ToInt32(src.Data[index]); | 3169 | return Convert.ToInt32(src.Data[index]); |
3183 | } | 3170 | } |
3184 | catch (FormatException e) | 3171 | catch (FormatException) |
3185 | { | 3172 | { |
3186 | return 0; | 3173 | return 0; |
3187 | } | 3174 | } |
@@ -3216,7 +3203,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3216 | { | 3203 | { |
3217 | return Convert.ToDouble(src.Data[index]); | 3204 | return Convert.ToDouble(src.Data[index]); |
3218 | } | 3205 | } |
3219 | catch (FormatException e) | 3206 | catch (FormatException) |
3220 | { | 3207 | { |
3221 | return 0.0; | 3208 | return 0.0; |
3222 | } | 3209 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 3e9fc65..3320ddb 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -218,7 +218,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
218 | //} | 218 | //} |
219 | } | 219 | } |
220 | } | 220 | } |
221 | catch(ThreadAbortException ex) | 221 | catch(ThreadAbortException) |
222 | { | 222 | { |
223 | m_log.Error("Thread aborted in MaintenanceLoopThread. If this is during shutdown, please ignore"); | 223 | m_log.Error("Thread aborted in MaintenanceLoopThread. If this is during shutdown, please ignore"); |
224 | } | 224 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 9d1cd6c..da30535 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -335,10 +335,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
335 | ExecutorBase.scriptEvents evflags = Script.Exec.GetStateEventFlags(); | 335 | ExecutorBase.scriptEvents evflags = Script.Exec.GetStateEventFlags(); |
336 | return (int)evflags; | 336 | return (int)evflags; |
337 | } | 337 | } |
338 | catch (Exception e) | 338 | catch (Exception) |
339 | { | 339 | { |
340 | // Console.WriteLine("Failed to get script reference for <" + localID + "," + itemID + ">"); | ||
341 | // Console.WriteLine(e.ToString()); | ||
342 | } | 340 | } |
343 | 341 | ||
344 | return 0; | 342 | return 0; |