From 1b8b75d80ae5d61fcbac60602cf9af6cef2c4003 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 24 Jun 2007 16:19:53 +0000 Subject: A bit more work on the AssetCache. --- OpenSim/OpenSim.Region/Caps.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/OpenSim.Region/Caps.cs') diff --git a/OpenSim/OpenSim.Region/Caps.cs b/OpenSim/OpenSim.Region/Caps.cs index 5be481e..59f24e3 100644 --- a/OpenSim/OpenSim.Region/Caps.cs +++ b/OpenSim/OpenSim.Region/Caps.cs @@ -86,7 +86,6 @@ namespace OpenSim.Region /// public string MapLayer(string request, string path, string param) { - string res = "AgentDataFlags0LayerData"; res += this.BuildLLSDMapLayerResponse(); res += ""; @@ -119,12 +118,12 @@ namespace OpenSim.Region public string NewAgentInventory(string request, string path, string param) { - //Console.WriteLine("received upload request:"+ request); string res = ""; LLUUID newAsset = LLUUID.Random(); - string uploaderPath = capsObjectPath + Util.RandomClass.Next(5000, 7000).ToString("0000"); - AssetUploader uploader = new AssetUploader(newAsset, uploaderPath, this.httpListener); + LLUUID newInvItem = LLUUID.Random(); + string uploaderPath = capsObjectPath + Util.RandomClass.Next(5000, 8000).ToString("0000"); + AssetUploader uploader = new AssetUploader(newAsset,newInvItem, uploaderPath, this.httpListener); httpListener.AddRestHandler("POST", "/CAPS/" + uploaderPath, uploader.uploaderCaps); string uploaderURL = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + uploaderPath; Console.WriteLine("uploader url is " + uploaderURL); @@ -157,11 +156,12 @@ namespace OpenSim.Region private string uploaderPath = ""; private LLUUID newAssetID; - //private LLUUID inventoryItemID; + private LLUUID inventoryItemID; private BaseHttpServer httpListener; - public AssetUploader(LLUUID assetID, string path,BaseHttpServer httpServer) + public AssetUploader(LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer) { newAssetID = assetID; + inventoryItemID = inventoryItem; uploaderPath = path; httpListener = httpServer; @@ -172,7 +172,7 @@ namespace OpenSim.Region Encoding _enc = System.Text.Encoding.UTF8; byte[] data = _enc.GetBytes(request); //Console.WriteLine("recieved upload " + Util.FieldToString(data)); - LLUUID inv = LLUUID.Random(); + LLUUID inv = this.inventoryItemID; string res = ""; res += ""; res += "new_asset" + newAssetID.ToStringHyphenated() + ""; -- cgit v1.1