aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorJohn Hurliman2009-11-05 13:10:58 -0800
committerJohn Hurliman2009-11-05 13:10:58 -0800
commitafef1ac191d32e9c1514c294b17e404b1d4ae217 (patch)
treec390ef81c9c30922c2e95e32844832919884fd9c /OpenSim/Region/ScriptEngine/Shared
parentApplying #4332, optional packet statistics logging (diff)
downloadopensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.zip
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.gz
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.bz2
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.xz
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index f1ceb80..f7ee3d9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1483,12 +1483,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1483 m_host.AddScriptLPS(1); 1483 m_host.AddScriptLPS(1);
1484 1484
1485 // Create new asset 1485 // Create new asset
1486 AssetBase asset = new AssetBase(); 1486 AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard);
1487 asset.Name = notecardName;
1488 asset.Description = "Script Generated Notecard"; 1487 asset.Description = "Script Generated Notecard";
1489 asset.Type = 7; 1488 string notecardData = String.Empty;
1490 asset.FullID = UUID.Random();
1491 string notecardData = "";
1492 1489
1493 for (int i = 0; i < contents.Length; i++) { 1490 for (int i = 0; i < contents.Length; i++) {
1494 notecardData += contents.GetLSLStringItem(i) + "\n"; 1491 notecardData += contents.GetLSLStringItem(i) + "\n";