aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Caps.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.Region/Caps.cs')
-rw-r--r--OpenSim/OpenSim.Region/Caps.cs14
1 files changed, 7 insertions, 7 deletions
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
86 /// <returns></returns> 86 /// <returns></returns>
87 public string MapLayer(string request, string path, string param) 87 public string MapLayer(string request, string path, string param)
88 { 88 {
89
90 string res = "<llsd><map><key>AgentData</key><map><key>Flags</key><integer>0</integer></map><key>LayerData</key><array>"; 89 string res = "<llsd><map><key>AgentData</key><map><key>Flags</key><integer>0</integer></map><key>LayerData</key><array>";
91 res += this.BuildLLSDMapLayerResponse(); 90 res += this.BuildLLSDMapLayerResponse();
92 res += "</array></map></llsd>"; 91 res += "</array></map></llsd>";
@@ -119,12 +118,12 @@ namespace OpenSim.Region
119 118
120 public string NewAgentInventory(string request, string path, string param) 119 public string NewAgentInventory(string request, string path, string param)
121 { 120 {
122
123 //Console.WriteLine("received upload request:"+ request); 121 //Console.WriteLine("received upload request:"+ request);
124 string res = ""; 122 string res = "";
125 LLUUID newAsset = LLUUID.Random(); 123 LLUUID newAsset = LLUUID.Random();
126 string uploaderPath = capsObjectPath + Util.RandomClass.Next(5000, 7000).ToString("0000"); 124 LLUUID newInvItem = LLUUID.Random();
127 AssetUploader uploader = new AssetUploader(newAsset, uploaderPath, this.httpListener); 125 string uploaderPath = capsObjectPath + Util.RandomClass.Next(5000, 8000).ToString("0000");
126 AssetUploader uploader = new AssetUploader(newAsset,newInvItem, uploaderPath, this.httpListener);
128 httpListener.AddRestHandler("POST", "/CAPS/" + uploaderPath, uploader.uploaderCaps); 127 httpListener.AddRestHandler("POST", "/CAPS/" + uploaderPath, uploader.uploaderCaps);
129 string uploaderURL = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + uploaderPath; 128 string uploaderURL = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + uploaderPath;
130 Console.WriteLine("uploader url is " + uploaderURL); 129 Console.WriteLine("uploader url is " + uploaderURL);
@@ -157,11 +156,12 @@ namespace OpenSim.Region
157 156
158 private string uploaderPath = ""; 157 private string uploaderPath = "";
159 private LLUUID newAssetID; 158 private LLUUID newAssetID;
160 //private LLUUID inventoryItemID; 159 private LLUUID inventoryItemID;
161 private BaseHttpServer httpListener; 160 private BaseHttpServer httpListener;
162 public AssetUploader(LLUUID assetID, string path,BaseHttpServer httpServer) 161 public AssetUploader(LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer)
163 { 162 {
164 newAssetID = assetID; 163 newAssetID = assetID;
164 inventoryItemID = inventoryItem;
165 uploaderPath = path; 165 uploaderPath = path;
166 httpListener = httpServer; 166 httpListener = httpServer;
167 167
@@ -172,7 +172,7 @@ namespace OpenSim.Region
172 Encoding _enc = System.Text.Encoding.UTF8; 172 Encoding _enc = System.Text.Encoding.UTF8;
173 byte[] data = _enc.GetBytes(request); 173 byte[] data = _enc.GetBytes(request);
174 //Console.WriteLine("recieved upload " + Util.FieldToString(data)); 174 //Console.WriteLine("recieved upload " + Util.FieldToString(data));
175 LLUUID inv = LLUUID.Random(); 175 LLUUID inv = this.inventoryItemID;
176 string res = ""; 176 string res = "";
177 res += "<llsd><map>"; 177 res += "<llsd><map>";
178 res += "<key>new_asset</key><string>" + newAssetID.ToStringHyphenated() + "</string>"; 178 res += "<key>new_asset</key><string>" + newAssetID.ToStringHyphenated() + "</string>";