aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.Region')
-rw-r--r--OpenSim/OpenSim.Region/Caps.cs14
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs5
2 files changed, 7 insertions, 12 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>";
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index 07b1ee4..ad6d336 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -422,10 +422,6 @@ namespace OpenSim.Region.Scenes
422 float[] map = this.localStorage.LoadWorld(); 422 float[] map = this.localStorage.LoadWorld();
423 if (map == null) 423 if (map == null)
424 { 424 {
425 // Console.WriteLine("creating new terrain");
426 // this.Terrain.hills();
427
428 // this.localStorage.SaveMap(this.Terrain.getHeights1D());
429 if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile)) 425 if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile))
430 { 426 {
431 Console.WriteLine("No default terrain, procedurally generating..."); 427 Console.WriteLine("No default terrain, procedurally generating...");
@@ -795,7 +791,6 @@ namespace OpenSim.Region.Scenes
795 { 791 {
796 List<MapBlockData> mapBlocks; 792 List<MapBlockData> mapBlocks;
797 mapBlocks = this.commsManager.GridServer.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); 793 mapBlocks = this.commsManager.GridServer.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
798 Console.WriteLine("number of mapblocks " + mapBlocks.Count +" in "+ minX +" , " + minY + " , "+ maxX + " , "+ maxY);
799 remoteClient.SendMapBlock(mapBlocks); 794 remoteClient.SendMapBlock(mapBlocks);
800 } 795 }
801 796