diff options
Diffstat (limited to '')
7 files changed, 171 insertions, 59 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 6fb6497..bba8ff1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -116,6 +116,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
116 | 116 | ||
117 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | 117 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; |
118 | m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps; | 118 | m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps; |
119 | |||
120 | foreach (Thread t in m_workerThreads) | ||
121 | Watchdog.AbortThread(t.ManagedThreadId); | ||
122 | |||
119 | m_scene = null; | 123 | m_scene = null; |
120 | } | 124 | } |
121 | 125 | ||
@@ -165,12 +169,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
165 | 169 | ||
166 | #endregion | 170 | #endregion |
167 | 171 | ||
168 | ~WebFetchInvDescModule() | ||
169 | { | ||
170 | foreach (Thread t in m_workerThreads) | ||
171 | Watchdog.AbortThread(t.ManagedThreadId); | ||
172 | } | ||
173 | |||
174 | private class PollServiceInventoryEventArgs : PollServiceEventArgs | 172 | private class PollServiceInventoryEventArgs : PollServiceEventArgs |
175 | { | 173 | { |
176 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 174 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 322addd..161f160 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -60,8 +60,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
60 | // The pair of Dictionaries are used to handle the switching of classified ads | 60 | // The pair of Dictionaries are used to handle the switching of classified ads |
61 | // by maintaining a cache of classified id to creator id mappings and an interest | 61 | // by maintaining a cache of classified id to creator id mappings and an interest |
62 | // count. The entries are removed when the interest count reaches 0. | 62 | // count. The entries are removed when the interest count reaches 0. |
63 | Dictionary<UUID,UUID> classifiedCache = new Dictionary<UUID, UUID>(); | 63 | Dictionary<UUID, UUID> m_classifiedCache = new Dictionary<UUID, UUID>(); |
64 | Dictionary<UUID,int> classifiedInterest = new Dictionary<UUID, int>(); | 64 | Dictionary<UUID, int> m_classifiedInterest = new Dictionary<UUID, int>(); |
65 | 65 | ||
66 | public Scene Scene | 66 | public Scene Scene |
67 | { | 67 | { |
@@ -102,7 +102,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
102 | 102 | ||
103 | /// <summary> | 103 | /// <summary> |
104 | /// Gets or sets a value indicating whether this | 104 | /// Gets or sets a value indicating whether this |
105 | /// <see cref="BlueWall.SlipStream.ProfileModule.UserProfileModule"/> is enabled. | 105 | /// <see cref="OpenSim.Region.Coremodules.UserProfiles.UserProfileModule"/> is enabled. |
106 | /// </summary> | 106 | /// </summary> |
107 | /// <value> | 107 | /// <value> |
108 | /// <c>true</c> if enabled; otherwise, <c>false</c>. | 108 | /// <c>true</c> if enabled; otherwise, <c>false</c>. |
@@ -331,16 +331,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
331 | 331 | ||
332 | classifieds[cid] = name; | 332 | classifieds[cid] = name; |
333 | 333 | ||
334 | if(!classifiedCache.ContainsKey(cid)) | 334 | lock (m_classifiedCache) |
335 | { | 335 | { |
336 | lock(classifiedCache) | 336 | if (!m_classifiedCache.ContainsKey(cid)) |
337 | classifiedCache.Add(cid,creatorId); | 337 | { |
338 | lock(classifiedInterest) | 338 | m_classifiedCache.Add(cid,creatorId); |
339 | classifiedInterest.Add(cid, 0); | 339 | m_classifiedInterest.Add(cid, 0); |
340 | } | 340 | } |
341 | 341 | ||
342 | lock(classifiedInterest) | 342 | m_classifiedInterest[cid]++; |
343 | classifiedInterest[cid] ++; | 343 | } |
344 | } | 344 | } |
345 | 345 | ||
346 | remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); | 346 | remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); |
@@ -352,19 +352,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
352 | UserClassifiedAdd ad = new UserClassifiedAdd(); | 352 | UserClassifiedAdd ad = new UserClassifiedAdd(); |
353 | ad.ClassifiedId = queryClassifiedID; | 353 | ad.ClassifiedId = queryClassifiedID; |
354 | 354 | ||
355 | if(classifiedCache.ContainsKey(queryClassifiedID)) | 355 | lock (m_classifiedCache) |
356 | { | 356 | { |
357 | target = classifiedCache[queryClassifiedID]; | 357 | if (m_classifiedCache.ContainsKey(queryClassifiedID)) |
358 | { | ||
359 | target = m_classifiedCache[queryClassifiedID]; | ||
358 | 360 | ||
359 | lock(classifiedInterest) | 361 | m_classifiedInterest[queryClassifiedID] --; |
360 | classifiedInterest[queryClassifiedID] --; | ||
361 | 362 | ||
362 | if(classifiedInterest[queryClassifiedID] == 0) | 363 | if (m_classifiedInterest[queryClassifiedID] == 0) |
363 | { | 364 | { |
364 | lock(classifiedInterest) | 365 | m_classifiedInterest.Remove(queryClassifiedID); |
365 | classifiedInterest.Remove(queryClassifiedID); | 366 | m_classifiedCache.Remove(queryClassifiedID); |
366 | lock(classifiedCache) | 367 | } |
367 | classifiedCache.Remove(queryClassifiedID); | ||
368 | } | 368 | } |
369 | } | 369 | } |
370 | 370 | ||
@@ -1339,4 +1339,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1339 | } | 1339 | } |
1340 | #endregion Web Util | 1340 | #endregion Web Util |
1341 | } | 1341 | } |
1342 | } | 1342 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 1e434b9..2fc8ee3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | |||
@@ -1,11 +1,41 @@ | |||
1 | using System; | 1 | /* |
2 | using System.Collections.Generic; | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
3 | 27 | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Threading; | ||
4 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
5 | using OpenMetaverse; | 32 | using OpenMetaverse; |
6 | 33 | ||
7 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 34 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory |
8 | { | 35 | { |
36 | /// <summary> | ||
37 | /// Cache root and system inventory folders to reduce number of potentially remote inventory calls and associated holdups. | ||
38 | /// </summary> | ||
9 | public class InventoryCache | 39 | public class InventoryCache |
10 | { | 40 | { |
11 | private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour | 41 | private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour |
@@ -16,8 +46,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
16 | 46 | ||
17 | public void Cache(UUID userID, InventoryFolderBase root) | 47 | public void Cache(UUID userID, InventoryFolderBase root) |
18 | { | 48 | { |
19 | lock (m_RootFolders) | 49 | m_RootFolders.AddOrUpdate(userID, root, CACHE_EXPIRATION_SECONDS); |
20 | m_RootFolders.AddOrUpdate(userID, root, CACHE_EXPIRATION_SECONDS); | ||
21 | } | 50 | } |
22 | 51 | ||
23 | public InventoryFolderBase GetRootFolder(UUID userID) | 52 | public InventoryFolderBase GetRootFolder(UUID userID) |
@@ -31,14 +60,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
31 | 60 | ||
32 | public void Cache(UUID userID, AssetType type, InventoryFolderBase folder) | 61 | public void Cache(UUID userID, AssetType type, InventoryFolderBase folder) |
33 | { | 62 | { |
34 | lock (m_FolderTypes) | 63 | Dictionary<AssetType, InventoryFolderBase> ff = null; |
64 | if (!m_FolderTypes.TryGetValue(userID, out ff)) | ||
65 | { | ||
66 | ff = new Dictionary<AssetType, InventoryFolderBase>(); | ||
67 | m_FolderTypes.Add(userID, ff, CACHE_EXPIRATION_SECONDS); | ||
68 | } | ||
69 | |||
70 | // We need to lock here since two threads could potentially retrieve the same dictionary | ||
71 | // and try to add a folder for that type simultaneously. Dictionary<>.Add() is not described as thread-safe in the SDK | ||
72 | // even if the folders are identical. | ||
73 | lock (ff) | ||
35 | { | 74 | { |
36 | Dictionary<AssetType, InventoryFolderBase> ff = null; | ||
37 | if (!m_FolderTypes.TryGetValue(userID, out ff)) | ||
38 | { | ||
39 | ff = new Dictionary<AssetType, InventoryFolderBase>(); | ||
40 | m_FolderTypes.Add(userID, ff, CACHE_EXPIRATION_SECONDS); | ||
41 | } | ||
42 | if (!ff.ContainsKey(type)) | 75 | if (!ff.ContainsKey(type)) |
43 | ff.Add(type, folder); | 76 | ff.Add(type, folder); |
44 | } | 77 | } |
@@ -50,8 +83,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
50 | if (m_FolderTypes.TryGetValue(userID, out ff)) | 83 | if (m_FolderTypes.TryGetValue(userID, out ff)) |
51 | { | 84 | { |
52 | InventoryFolderBase f = null; | 85 | InventoryFolderBase f = null; |
53 | if (ff.TryGetValue(type, out f)) | 86 | |
54 | return f; | 87 | lock (ff) |
88 | { | ||
89 | if (ff.TryGetValue(type, out f)) | ||
90 | return f; | ||
91 | } | ||
55 | } | 92 | } |
56 | 93 | ||
57 | return null; | 94 | return null; |
@@ -59,8 +96,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
59 | 96 | ||
60 | public void Cache(UUID userID, InventoryCollection inv) | 97 | public void Cache(UUID userID, InventoryCollection inv) |
61 | { | 98 | { |
62 | lock (m_Inventories) | 99 | m_Inventories.AddOrUpdate(userID, inv, 120); |
63 | m_Inventories.AddOrUpdate(userID, inv, 120); | ||
64 | } | 100 | } |
65 | 101 | ||
66 | public InventoryCollection GetUserInventory(UUID userID) | 102 | public InventoryCollection GetUserInventory(UUID userID) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9744526..d5f14bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1664,6 +1664,75 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1664 | m_host.SetFaceColorAlpha(face, color, null); | 1664 | m_host.SetFaceColorAlpha(face, color, null); |
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | /* | ||
1668 | public void llSetContentType(LSL_Key id, LSL_Integer type) | ||
1669 | { | ||
1670 | m_host.AddScriptLPS(1); | ||
1671 | |||
1672 | if (m_UrlModule == null) | ||
1673 | return; | ||
1674 | |||
1675 | // Make sure the content type is text/plain to start with | ||
1676 | m_UrlModule.HttpContentType(new UUID(id), "text/plain"); | ||
1677 | |||
1678 | // Is the object owner online and in the region | ||
1679 | ScenePresence agent = World.GetScenePresence(m_host.ParentGroup.OwnerID); | ||
1680 | if (agent == null || agent.IsChildAgent) | ||
1681 | return; // Fail if the owner is not in the same region | ||
1682 | |||
1683 | // Is it the embeded browser? | ||
1684 | string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent"); | ||
1685 | if (userAgent.IndexOf("SecondLife") < 0) | ||
1686 | return; // Not the embedded browser. Is this check good enough? | ||
1687 | |||
1688 | // Use the IP address of the client and check against the request | ||
1689 | // seperate logins from the same IP will allow all of them to get non-text/plain as long | ||
1690 | // as the owner is in the region. Same as SL! | ||
1691 | string logonFromIPAddress = agent.ControllingClient.RemoteEndPoint.Address.ToString(); | ||
1692 | string requestFromIPAddress = m_UrlModule.GetHttpHeader(new UUID(id), "remote_addr"); | ||
1693 | //m_log.Debug("IP from header='" + requestFromIPAddress + "' IP from endpoint='" + logonFromIPAddress + "'"); | ||
1694 | if (requestFromIPAddress == null || requestFromIPAddress.Trim() == "") | ||
1695 | return; | ||
1696 | if (logonFromIPAddress == null || logonFromIPAddress.Trim() == "") | ||
1697 | return; | ||
1698 | |||
1699 | // If the request isnt from the same IP address then the request cannot be from the owner | ||
1700 | if (!requestFromIPAddress.Trim().Equals(logonFromIPAddress.Trim())) | ||
1701 | return; | ||
1702 | |||
1703 | switch (type) | ||
1704 | { | ||
1705 | case ScriptBaseClass.CONTENT_TYPE_HTML: | ||
1706 | m_UrlModule.HttpContentType(new UUID(id), "text/html"); | ||
1707 | break; | ||
1708 | case ScriptBaseClass.CONTENT_TYPE_XML: | ||
1709 | m_UrlModule.HttpContentType(new UUID(id), "application/xml"); | ||
1710 | break; | ||
1711 | case ScriptBaseClass.CONTENT_TYPE_XHTML: | ||
1712 | m_UrlModule.HttpContentType(new UUID(id), "application/xhtml+xml"); | ||
1713 | break; | ||
1714 | case ScriptBaseClass.CONTENT_TYPE_ATOM: | ||
1715 | m_UrlModule.HttpContentType(new UUID(id), "application/atom+xml"); | ||
1716 | break; | ||
1717 | case ScriptBaseClass.CONTENT_TYPE_JSON: | ||
1718 | m_UrlModule.HttpContentType(new UUID(id), "application/json"); | ||
1719 | break; | ||
1720 | case ScriptBaseClass.CONTENT_TYPE_LLSD: | ||
1721 | m_UrlModule.HttpContentType(new UUID(id), "application/llsd+xml"); | ||
1722 | break; | ||
1723 | case ScriptBaseClass.CONTENT_TYPE_FORM: | ||
1724 | m_UrlModule.HttpContentType(new UUID(id), "application/x-www-form-urlencoded"); | ||
1725 | break; | ||
1726 | case ScriptBaseClass.CONTENT_TYPE_RSS: | ||
1727 | m_UrlModule.HttpContentType(new UUID(id), "application/rss+xml"); | ||
1728 | break; | ||
1729 | default: | ||
1730 | m_UrlModule.HttpContentType(new UUID(id), "text/plain"); | ||
1731 | break; | ||
1732 | } | ||
1733 | } | ||
1734 | */ | ||
1735 | |||
1667 | public void SetTexGen(SceneObjectPart part, int face,int style) | 1736 | public void SetTexGen(SceneObjectPart part, int face,int style) |
1668 | { | 1737 | { |
1669 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1738 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
@@ -5117,13 +5186,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5117 | return new LSL_Rotation(x,y,z,s); | 5186 | return new LSL_Rotation(x,y,z,s); |
5118 | } | 5187 | } |
5119 | 5188 | ||
5120 | 5189 | /// <summary> | |
5121 | // Xantor 29/apr/2008 | 5190 | /// Returns the axis of rotation for a quaternion |
5122 | // converts a Quaternion to X,Y,Z axis rotations | 5191 | /// </summary> |
5192 | /// <returns></returns> | ||
5193 | /// <param name='rot'></param> | ||
5123 | public LSL_Vector llRot2Axis(LSL_Rotation rot) | 5194 | public LSL_Vector llRot2Axis(LSL_Rotation rot) |
5124 | { | 5195 | { |
5125 | m_host.AddScriptLPS(1); | 5196 | m_host.AddScriptLPS(1); |
5126 | double x, y, z; | ||
5127 | 5197 | ||
5128 | if (Math.Abs(rot.s) > 1) // normalization needed | 5198 | if (Math.Abs(rot.s) > 1) // normalization needed |
5129 | rot.Normalize(); | 5199 | rot.Normalize(); |
@@ -8238,7 +8308,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8238 | return null; | 8308 | return null; |
8239 | 8309 | ||
8240 | string ph = rules.Data[idx++].ToString(); | 8310 | string ph = rules.Data[idx++].ToString(); |
8241 | parentgrp.ScriptSetPhantomStatus(ph.Equals("1")); | 8311 | part.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1")); |
8242 | 8312 | ||
8243 | break; | 8313 | break; |
8244 | 8314 | ||
@@ -8291,7 +8361,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8291 | return null; | 8361 | return null; |
8292 | string temp = rules.Data[idx++].ToString(); | 8362 | string temp = rules.Data[idx++].ToString(); |
8293 | 8363 | ||
8294 | parentgrp.ScriptSetTemporaryStatus(temp.Equals("1")); | 8364 | part.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1")); |
8295 | 8365 | ||
8296 | break; | 8366 | break; |
8297 | 8367 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index daf89e5..2260ec8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -340,6 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
340 | void llSetCameraParams(LSL_List rules); | 340 | void llSetCameraParams(LSL_List rules); |
341 | void llSetClickAction(int action); | 341 | void llSetClickAction(int action); |
342 | void llSetColor(LSL_Vector color, int face); | 342 | void llSetColor(LSL_Vector color, int face); |
343 | void llSetContentType(LSL_Key id, LSL_Integer type); | ||
343 | void llSetDamage(double damage); | 344 | void llSetDamage(double damage); |
344 | void llSetForce(LSL_Vector force, int local); | 345 | void llSetForce(LSL_Vector force, int local); |
345 | void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local); | 346 | void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local); |
@@ -434,6 +435,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
434 | void llSetKeyframedMotion(LSL_List frames, LSL_List options); | 435 | void llSetKeyframedMotion(LSL_List frames, LSL_List options); |
435 | LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); | 436 | LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); |
436 | LSL_List llGetPhysicsMaterial(); | 437 | LSL_List llGetPhysicsMaterial(); |
437 | void llSetContentType(LSL_Key id, LSL_Integer content_type); | ||
438 | } | 438 | } |
439 | } | 439 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 6efa73f..15b21ac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -361,6 +361,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
361 | public const int HTTP_CUSTOM_HEADER = 5; | 361 | public const int HTTP_CUSTOM_HEADER = 5; |
362 | public const int HTTP_PRAGMA_NO_CACHE = 6; | 362 | public const int HTTP_PRAGMA_NO_CACHE = 6; |
363 | 363 | ||
364 | // llSetContentType | ||
365 | public const int CONTENT_TYPE_TEXT = 0; //text/plain | ||
366 | public const int CONTENT_TYPE_HTML = 1; //text/html | ||
367 | public const int CONTENT_TYPE_XML = 2; //application/xml | ||
368 | public const int CONTENT_TYPE_XHTML = 3; //application/xhtml+xml | ||
369 | public const int CONTENT_TYPE_ATOM = 4; //application/atom+xml | ||
370 | public const int CONTENT_TYPE_JSON = 5; //application/json | ||
371 | public const int CONTENT_TYPE_LLSD = 6; //application/llsd+xml | ||
372 | public const int CONTENT_TYPE_FORM = 7; //application/x-www-form-urlencoded | ||
373 | public const int CONTENT_TYPE_RSS = 8; //application/rss+xml | ||
374 | |||
364 | public const int PRIM_MATERIAL = 2; | 375 | public const int PRIM_MATERIAL = 2; |
365 | public const int PRIM_PHYSICS = 3; | 376 | public const int PRIM_PHYSICS = 3; |
366 | public const int PRIM_TEMP_ON_REZ = 4; | 377 | public const int PRIM_TEMP_ON_REZ = 4; |
@@ -772,8 +783,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
772 | /// process message parameter as regex | 783 | /// process message parameter as regex |
773 | /// </summary> | 784 | /// </summary> |
774 | public const int OS_LISTEN_REGEX_MESSAGE = 0x2; | 785 | public const int OS_LISTEN_REGEX_MESSAGE = 0x2; |
775 | |||
776 | public const int CONTENT_TYPE_TEXT = 0; | ||
777 | public const int CONTENT_TYPE_HTML = 1; | ||
778 | } | 786 | } |
779 | } | 787 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 6f3677c..b58686b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -1535,6 +1535,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1535 | m_LSL_Functions.llSetColor(color, face); | 1535 | m_LSL_Functions.llSetColor(color, face); |
1536 | } | 1536 | } |
1537 | 1537 | ||
1538 | public void llSetContentType(LSL_Key id, LSL_Integer type) | ||
1539 | { | ||
1540 | m_LSL_Functions.llSetContentType(id, type); | ||
1541 | } | ||
1542 | |||
1538 | public void llSetDamage(double damage) | 1543 | public void llSetDamage(double damage) |
1539 | { | 1544 | { |
1540 | m_LSL_Functions.llSetDamage(damage); | 1545 | m_LSL_Functions.llSetDamage(damage); |
@@ -2014,10 +2019,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
2014 | { | 2019 | { |
2015 | return m_LSL_Functions.llGetPhysicsMaterial(); | 2020 | return m_LSL_Functions.llGetPhysicsMaterial(); |
2016 | } | 2021 | } |
2017 | |||
2018 | public void llSetContentType(LSL_Key id, LSL_Integer content_type) | ||
2019 | { | ||
2020 | m_LSL_Functions.llSetContentType(id, content_type); | ||
2021 | } | ||
2022 | } | 2022 | } |
2023 | } | 2023 | } |