diff options
author | diva | 2009-05-15 05:00:25 +0000 |
---|---|---|
committer | diva | 2009-05-15 05:00:25 +0000 |
commit | 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d (patch) | |
tree | 497076db68193be2d14fc3788c1d80c74d8c977d /OpenSim/Region/CoreModules/Agent | |
parent | some sculpted prim geometry accuracy and meshing speed improvements (diff) | |
download | opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.zip opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.gz opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.bz2 opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.xz |
Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.
This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing.
Known problems:
* HG asset transfers are borked for now
* missing texture is missing
* 3 unit tests commented out for now
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent')
4 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index eefcfe8..94140fc 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -32,6 +32,7 @@ using OpenMetaverse; | |||
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications.Cache; | 33 | using OpenSim.Framework.Communications.Cache; |
34 | using OpenSim.Region.Framework.Scenes; | 34 | using OpenSim.Region.Framework.Scenes; |
35 | using OpenSim.Services.Interfaces; | ||
35 | 36 | ||
36 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | 37 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction |
37 | { | 38 | { |
@@ -177,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
177 | asset.Type = (sbyte)item.Type; | 178 | asset.Type = (sbyte)item.Type; |
178 | item.AssetID = asset.FullID; | 179 | item.AssetID = asset.FullID; |
179 | 180 | ||
180 | Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); | 181 | Manager.MyScene.AssetService.Store(asset); |
181 | 182 | ||
182 | if (part.Inventory.UpdateInventoryItem(item)) | 183 | if (part.Inventory.UpdateInventoryItem(item)) |
183 | part.GetProperties(remoteClient); | 184 | part.GetProperties(remoteClient); |
@@ -198,9 +199,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
198 | { | 199 | { |
199 | UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); | 200 | UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); |
200 | 201 | ||
201 | AssetBase asset | 202 | AssetBase asset = Manager.MyScene.AssetService.Get(assetID.ToString()); |
202 | = Manager.MyScene.CommsManager.AssetCache.GetAsset( | ||
203 | assetID, (item.AssetType == (int)AssetType.Texture ? true : false)); | ||
204 | 203 | ||
205 | if (asset == null) | 204 | if (asset == null) |
206 | { | 205 | { |
@@ -216,7 +215,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
216 | asset.Type = (sbyte)item.AssetType; | 215 | asset.Type = (sbyte)item.AssetType; |
217 | item.AssetID = asset.FullID; | 216 | item.AssetID = asset.FullID; |
218 | 217 | ||
219 | Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); | 218 | Manager.MyScene.AssetService.Store(asset); |
220 | } | 219 | } |
221 | 220 | ||
222 | userInfo.UpdateItem(item); | 221 | userInfo.UpdateItem(item); |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index a8e5ae3..6044949 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -153,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
153 | } | 153 | } |
154 | else if (m_storeLocal) | 154 | else if (m_storeLocal) |
155 | { | 155 | { |
156 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); | 156 | m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); |
157 | } | 157 | } |
158 | 158 | ||
159 | m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); | 159 | m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); |
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
213 | 213 | ||
214 | private void DoCreateItem(uint callbackID) | 214 | private void DoCreateItem(uint callbackID) |
215 | { | 215 | { |
216 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); | 216 | m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); |
217 | CachedUserInfo userInfo = | 217 | CachedUserInfo userInfo = |
218 | m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails( | 218 | m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails( |
219 | ourClient.AgentId); | 219 | ourClient.AgentId); |
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs index 39dd84f..dbd5104 100644 --- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities | |||
86 | 86 | ||
87 | Caps caps | 87 | Caps caps |
88 | = new Caps( | 88 | = new Caps( |
89 | m_scene.CommsManager.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, | 89 | m_scene.AssetService, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, |
90 | m_scene.CommsManager.HttpServer.Port, | 90 | m_scene.CommsManager.HttpServer.Port, |
91 | capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); | 91 | capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); |
92 | 92 | ||
diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs index e4a2b21..9c8d294 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | using log4net; | 31 | using log4net; |
@@ -152,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload | |||
152 | TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); | 153 | TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); |
153 | m_textureSenders.Add(e.RequestedAssetID, requestHandler); | 154 | m_textureSenders.Add(e.RequestedAssetID, requestHandler); |
154 | 155 | ||
155 | m_scene.CommsManager.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); | 156 | m_scene.AssetService.Get(e.RequestedAssetID.ToString(), this, TextureReceived); |
156 | } | 157 | } |
157 | } | 158 | } |
158 | } | 159 | } |
@@ -168,6 +169,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload | |||
168 | } | 169 | } |
169 | } | 170 | } |
170 | 171 | ||
172 | protected void TextureReceived(string id, Object sender, AssetBase asset) | ||
173 | { | ||
174 | if (asset != null) | ||
175 | TextureCallback(asset.FullID, asset); | ||
176 | } | ||
177 | |||
171 | /// <summary> | 178 | /// <summary> |
172 | /// The callback for the asset cache when a texture has been retrieved. This method queues the | 179 | /// The callback for the asset cache when a texture has been retrieved. This method queues the |
173 | /// texture sender for processing. | 180 | /// texture sender for processing. |