diff options
author | Sean McNamara | 2011-04-23 18:33:08 -0400 |
---|---|---|
committer | Sean McNamara | 2011-04-23 18:33:08 -0400 |
commit | d287e0ac683acb0cab51bf0dbbc9d1fd08bd6bc9 (patch) | |
tree | 30a24bf66050c66ebe74b68745c4f1764fe09181 /OpenSim/Region/CoreModules/Avatar/Assets | |
parent | AutoBackup: Removed unneeded imports. (diff) | |
parent | Added MaxAgents configuration option to RegionConfig.ini allowing region host... (diff) | |
download | opensim-SC_OLD-d287e0ac683acb0cab51bf0dbbc9d1fd08bd6bc9.zip opensim-SC_OLD-d287e0ac683acb0cab51bf0dbbc9d1fd08bd6bc9.tar.gz opensim-SC_OLD-d287e0ac683acb0cab51bf0dbbc9d1fd08bd6bc9.tar.bz2 opensim-SC_OLD-d287e0ac683acb0cab51bf0dbbc9d1fd08bd6bc9.tar.xz |
Merge git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Assets')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs | 10 |
2 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs index 878242a..fc1ddef 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
54 | 54 | ||
55 | private Scene m_scene; | 55 | private Scene m_scene; |
56 | private IAssetService m_assetService; | 56 | private IAssetService m_assetService; |
57 | private bool m_enabled = true; | ||
57 | 58 | ||
58 | #region IRegionModuleBase Members | 59 | #region IRegionModuleBase Members |
59 | 60 | ||
@@ -65,7 +66,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
65 | 66 | ||
66 | public void Initialise(IConfigSource source) | 67 | public void Initialise(IConfigSource source) |
67 | { | 68 | { |
68 | 69 | IConfig meshConfig = source.Configs["Mesh"]; | |
70 | if (meshConfig == null) | ||
71 | return; | ||
72 | |||
73 | m_enabled = meshConfig.GetBoolean("AllowMeshUpload", true); | ||
69 | } | 74 | } |
70 | 75 | ||
71 | public void AddRegion(Scene pScene) | 76 | public void AddRegion(Scene pScene) |
@@ -101,16 +106,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
101 | 106 | ||
102 | public void RegisterCaps(UUID agentID, Caps caps) | 107 | public void RegisterCaps(UUID agentID, Caps caps) |
103 | { | 108 | { |
109 | if(!m_enabled) | ||
110 | return; | ||
111 | |||
104 | UUID capID = UUID.Random(); | 112 | UUID capID = UUID.Random(); |
105 | 113 | ||
106 | // m_log.Info("[GETMESH]: /CAPS/" + capID); | 114 | // m_log.Info("[GETMESH]: /CAPS/" + capID); |
115 | |||
107 | caps.RegisterHandler("GetMesh", | 116 | caps.RegisterHandler("GetMesh", |
108 | new RestHTTPHandler("GET", "/CAPS/" + capID, | 117 | new RestHTTPHandler("GET", "/CAPS/" + capID, |
109 | delegate(Hashtable m_dhttpMethod) | 118 | delegate(Hashtable m_dhttpMethod) |
110 | { | 119 | { |
111 | return ProcessGetMesh(m_dhttpMethod, agentID, caps); | 120 | return ProcessGetMesh(m_dhttpMethod, agentID, caps); |
112 | })); | 121 | })); |
113 | |||
114 | } | 122 | } |
115 | 123 | ||
116 | #endregion | 124 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs index 4a42c93..3d4c7b7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
56 | private Scene m_scene; | 56 | private Scene m_scene; |
57 | // private IAssetService m_assetService; | 57 | // private IAssetService m_assetService; |
58 | private bool m_dumpAssetsToFile = false; | 58 | private bool m_dumpAssetsToFile = false; |
59 | private bool m_enabled = true; | ||
59 | 60 | ||
60 | #region IRegionModuleBase Members | 61 | #region IRegionModuleBase Members |
61 | 62 | ||
@@ -67,7 +68,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
67 | 68 | ||
68 | public void Initialise(IConfigSource source) | 69 | public void Initialise(IConfigSource source) |
69 | { | 70 | { |
70 | 71 | IConfig meshConfig = source.Configs["Mesh"]; | |
72 | if (meshConfig == null) | ||
73 | return; | ||
74 | |||
75 | m_enabled = meshConfig.GetBoolean("AllowMeshUpload", true); | ||
71 | } | 76 | } |
72 | 77 | ||
73 | public void AddRegion(Scene pScene) | 78 | public void AddRegion(Scene pScene) |
@@ -103,6 +108,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
103 | 108 | ||
104 | public void RegisterCaps(UUID agentID, Caps caps) | 109 | public void RegisterCaps(UUID agentID, Caps caps) |
105 | { | 110 | { |
111 | if(!m_enabled) | ||
112 | return; | ||
113 | |||
106 | UUID capID = UUID.Random(); | 114 | UUID capID = UUID.Random(); |
107 | 115 | ||
108 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); | 116 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); |