aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps
diff options
context:
space:
mode:
authorUbitUmarov2015-09-02 19:54:53 +0100
committerUbitUmarov2015-09-02 19:54:53 +0100
commita11edceb00b5b86f825bd957bdac9edb91f893dd (patch)
treec192eae26f3aadf365a66f32fc6d9ade2f0a0c61 /OpenSim/Region/ClientStack/Linden/Caps
parentbad merge? (diff)
downloadopensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.zip
opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.gz
opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.bz2
opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.xz
seems to compile ( tests comented out)
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs122
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs30
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs9
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs50
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs33
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs15
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs204
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs4
10 files changed, 38 insertions, 435 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 4e6d196..1236e83 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -45,7 +45,6 @@ using OpenSim.Region.Framework.Scenes;
45using OpenSim.Region.Framework.Scenes.Serialization; 45using OpenSim.Region.Framework.Scenes.Serialization;
46using OpenSim.Framework.Servers; 46using OpenSim.Framework.Servers;
47using OpenSim.Framework.Servers.HttpServer; 47using OpenSim.Framework.Servers.HttpServer;
48using OpenSim.Framework.Client;
49using OpenSim.Services.Interfaces; 48using OpenSim.Services.Interfaces;
50 49
51using Caps = OpenSim.Framework.Capabilities.Caps; 50using Caps = OpenSim.Framework.Capabilities.Caps;
@@ -360,8 +359,8 @@ namespace OpenSim.Region.ClientStack.Linden
360 public string SeedCapRequest(string request, string path, string param, 359 public string SeedCapRequest(string request, string path, string param,
361 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 360 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
362 { 361 {
363// m_log.DebugFormat( 362 m_log.DebugFormat(
364// "[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID); 363 "[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID);
365 364
366 if (!m_HostCapsObj.WaitForActivation()) 365 if (!m_HostCapsObj.WaitForActivation())
367 return string.Empty; 366 return string.Empty;
@@ -789,99 +788,10 @@ namespace OpenSim.Region.ClientStack.Linden
789 } 788 }
790 else if (inventoryType == "object") 789 else if (inventoryType == "object")
791 { 790 {
792<<<<<<< HEAD
793 inType = (sbyte)InventoryType.Object;
794 assType = (sbyte)AssetType.Object;
795
796 List<Vector3> positions = new List<Vector3>();
797 List<Quaternion> rotations = new List<Quaternion>();
798 OSDMap request = (OSDMap)OSDParser.DeserializeLLSDXml(data);
799 OSDArray instance_list = (OSDArray)request["instance_list"];
800 OSDArray mesh_list = (OSDArray)request["mesh_list"];
801 OSDArray texture_list = (OSDArray)request["texture_list"];
802 SceneObjectGroup grp = null;
803
804 InventoryFolderBase textureUploadFolder = null;
805
806 List<InventoryFolderBase> foldersToUpdate = new List<InventoryFolderBase>();
807 List<InventoryItemBase> itemsToUpdate = new List<InventoryItemBase>();
808 IClientInventory clientInv = null;
809
810 if (texture_list.Count > 0)
811 {
812 ScenePresence avatar = null;
813 m_Scene.TryGetScenePresence(m_HostCapsObj.AgentID, out avatar);
814
815 if (avatar != null)
816 {
817 IClientCore core = (IClientCore)avatar.ControllingClient;
818
819 if (core.TryGet<IClientInventory>(out clientInv))
820 {
821 var systemTextureFolder = m_Scene.InventoryService.GetFolderForType(m_HostCapsObj.AgentID, FolderType.Texture);
822 textureUploadFolder = new InventoryFolderBase(UUID.Random(), assetName, m_HostCapsObj.AgentID, (short)FolderType.None, systemTextureFolder.ID, 1);
823 if (m_Scene.InventoryService.AddFolder(textureUploadFolder))
824 {
825 foldersToUpdate.Add(textureUploadFolder);
826
827 m_log.DebugFormat(
828 "[BUNCH OF CAPS]: Created new folder '{0}' ({1}) for textures uploaded with mesh object {2}",
829 textureUploadFolder.Name, textureUploadFolder.ID, assetName);
830 }
831 else
832 {
833 textureUploadFolder = null;
834 }
835 }
836 }
837 }
838
839 List<UUID> textures = new List<UUID>();
840 for (int i = 0; i < texture_list.Count; i++)
841 {
842 AssetBase textureAsset = new AssetBase(UUID.Random(), assetName, (sbyte)AssetType.Texture, "");
843 textureAsset.Data = texture_list[i].AsBinary();
844 m_assetService.Store(textureAsset);
845 textures.Add(textureAsset.FullID);
846
847 if (textureUploadFolder != null)
848 {
849 InventoryItemBase textureItem = new InventoryItemBase();
850 textureItem.Owner = m_HostCapsObj.AgentID;
851 textureItem.CreatorId = m_HostCapsObj.AgentID.ToString();
852 textureItem.CreatorData = String.Empty;
853 textureItem.ID = UUID.Random();
854 textureItem.AssetID = textureAsset.FullID;
855 textureItem.Description = assetDescription;
856 textureItem.Name = assetName + " - Texture " + (i + 1).ToString();
857 textureItem.AssetType = (int)AssetType.Texture;
858 textureItem.InvType = (int)InventoryType.Texture;
859 textureItem.Folder = textureUploadFolder.ID;
860 textureItem.CurrentPermissions
861 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export);
862 textureItem.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
863 textureItem.EveryOnePermissions = 0;
864 textureItem.NextPermissions = (uint)PermissionMask.All;
865 textureItem.CreationDate = Util.UnixTimeSinceEpoch();
866 m_Scene.InventoryService.AddItem(textureItem);
867 itemsToUpdate.Add(textureItem);
868
869 m_log.DebugFormat(
870 "[BUNCH OF CAPS]: Created new inventory item '{0}' ({1}) for texture uploaded with mesh object {2}",
871 textureItem.Name, textureItem.ID, assetName);
872 }
873 }
874
875 if (clientInv != null && (foldersToUpdate.Count > 0 || itemsToUpdate.Count > 0))
876 {
877 clientInv.SendBulkUpdateInventory(foldersToUpdate.ToArray(), itemsToUpdate.ToArray());
878 }
879=======
880 if (assetType == "mesh") // this code for now is for mesh models uploads only 791 if (assetType == "mesh") // this code for now is for mesh models uploads only
881 { 792 {
882 inType = (sbyte)InventoryType.Object; 793 inType = (sbyte)InventoryType.Object;
883 assType = (sbyte)AssetType.Object; 794 assType = (sbyte)AssetType.Object;
884>>>>>>> avn/ubitvar
885 795
886 List<Vector3> positions = new List<Vector3>(); 796 List<Vector3> positions = new List<Vector3>();
887 List<Quaternion> rotations = new List<Quaternion>(); 797 List<Quaternion> rotations = new List<Quaternion>();
@@ -1467,24 +1377,17 @@ namespace OpenSim.Region.ClientStack.Linden
1467 { 1377 {
1468 string message; 1378 string message;
1469 copyItem = m_Scene.GiveInventoryItem(m_HostCapsObj.AgentID, item.Owner, itemID, folderID, out message); 1379 copyItem = m_Scene.GiveInventoryItem(m_HostCapsObj.AgentID, item.Owner, itemID, folderID, out message);
1470 if (client != null) 1380 if (copyItem != null && client != null)
1471 { 1381 {
1472 if (copyItem != null) 1382 m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder);
1473 { 1383 client.SendBulkUpdateInventory(copyItem);
1474 m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder);
1475 client.SendBulkUpdateInventory(copyItem);
1476 }
1477 else
1478 {
1479 client.SendAgentAlertMessage(message, false);
1480 }
1481 } 1384 }
1482 } 1385 }
1483 else 1386 else
1484 { 1387 {
1485 m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard - Failed to retrieve item {0} from notecard {1}", itemID, notecardID); 1388 m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard - Failed to retrieve item {0} from notecard {1}", itemID, notecardID);
1486 if (client != null) 1389 if (client != null)
1487 client.SendAgentAlertMessage("Failed to retrieve item", false); 1390 client.SendAlertMessage("Failed to retrieve item");
1488 } 1391 }
1489 } 1392 }
1490 catch (Exception e) 1393 catch (Exception e)
@@ -1656,14 +1559,13 @@ namespace OpenSim.Region.ClientStack.Linden
1656 string param, IOSHttpRequest httpRequest, 1559 string param, IOSHttpRequest httpRequest,
1657 IOSHttpResponse httpResponse) 1560 IOSHttpResponse httpResponse)
1658 { 1561 {
1659 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); 1562// OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
1660 OSDMap accessPrefs = (OSDMap)req["access_prefs"];
1661 string desiredMaturity = accessPrefs["max"];
1662
1663 OSDMap resp = new OSDMap(); 1563 OSDMap resp = new OSDMap();
1664 OSDMap respAccessPrefs = new OSDMap(); 1564
1665 respAccessPrefs["max"] = desiredMaturity; // echoing the maturity back means success 1565 OSDMap accessPrefs = new OSDMap();
1666 resp["access_prefs"] = respAccessPrefs; 1566 accessPrefs["max"] = "A";
1567
1568 resp["access_prefs"] = accessPrefs;
1667 1569
1668 string response = OSDParser.SerializeLLSDXmlString(resp); 1570 string response = OSDParser.SerializeLLSDXmlString(resp);
1669 return response; 1571 return response;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
index c241075..b735dfa 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
@@ -40,8 +40,8 @@ using OpenSim.Region.Framework.Interfaces;
40using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
41using Caps = OpenSim.Framework.Capabilities.Caps; 41using Caps = OpenSim.Framework.Capabilities.Caps;
42 42
43[assembly: Addin("LindenCaps", OpenSim.VersionInfo.VersionNumber)] 43[assembly: Addin("LindenCaps", "0.1")]
44[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] 44[assembly: AddinDependency("OpenSim", "0.5")]
45namespace OpenSim.Region.ClientStack.Linden 45namespace OpenSim.Region.ClientStack.Linden
46{ 46{
47 47
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 5fb028c..5d50eba 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -177,7 +177,6 @@ namespace OpenSim.Region.ClientStack.Linden
177 } 177 }
178 178
179 /// <summary> 179 /// <summary>
180<<<<<<< HEAD
181 /// Always returns a valid queue 180 /// Always returns a valid queue
182 /// </summary> 181 /// </summary>
183 /// <param name="agentId"></param> 182 /// <param name="agentId"></param>
@@ -201,8 +200,7 @@ namespace OpenSim.Region.ClientStack.Linden
201 } 200 }
202 201
203 /// <summary> 202 /// <summary>
204======= 203
205>>>>>>> avn/ubitvar
206 /// May return a null queue 204 /// May return a null queue
207 /// </summary> 205 /// </summary>
208 /// <param name="agentId"></param> 206 /// <param name="agentId"></param>
@@ -290,17 +288,11 @@ namespace OpenSim.Region.ClientStack.Linden
290 public void OnRegisterCaps(UUID agentID, Caps caps) 288 public void OnRegisterCaps(UUID agentID, Caps caps)
291 { 289 {
292 // Register an event queue for the client 290 // Register an event queue for the client
293<<<<<<< HEAD
294 291
295 if (DebugLevel > 0) 292 if (DebugLevel > 0)
296 m_log.DebugFormat( 293 m_log.DebugFormat(
297 "[EVENTQUEUE]: OnRegisterCaps: agentID {0} caps {1} region {2}", 294 "[EVENTQUEUE]: OnRegisterCaps: agentID {0} caps {1} region {2}",
298 agentID, caps, m_scene.RegionInfo.RegionName); 295 agentID, caps, m_scene.RegionInfo.RegionName);
299=======
300 m_log.DebugFormat(
301 "[EVENTQUEUE]: OnRegisterCaps: agentID {0} caps {1} region {2}",
302 agentID, caps, m_scene.RegionInfo.RegionName);
303>>>>>>> avn/ubitvar
304 296
305 UUID eventQueueGetUUID; 297 UUID eventQueueGetUUID;
306 Queue<OSD> queue; 298 Queue<OSD> queue;
@@ -519,14 +511,9 @@ namespace OpenSim.Region.ClientStack.Linden
519 511
520 public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) 512 public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY)
521 { 513 {
522<<<<<<< HEAD
523 if (DebugLevel > 0) 514 if (DebugLevel > 0)
524 m_log.DebugFormat("{0} EnableSimulator. handle={1}, endPoint={2}, avatarID={3}", 515 m_log.DebugFormat("{0} EnableSimulator. handle={1}, endPoint={2}, avatarID={3}",
525 LogHeader, handle, endPoint, avatarID, regionSizeX, regionSizeY); 516 LogHeader, handle, endPoint, avatarID, regionSizeX, regionSizeY);
526=======
527 m_log.DebugFormat("{0} EnableSimulator. handle={1}, avatarID={2}, regionSize={3},{4}>",
528 LogHeader, handle, avatarID, regionSizeX, regionSizeY);
529>>>>>>> avn/ubitvar
530 517
531 OSD item = EventQueueHelper.EnableSimulator(handle, endPoint, regionSizeX, regionSizeY); 518 OSD item = EventQueueHelper.EnableSimulator(handle, endPoint, regionSizeX, regionSizeY);
532 Enqueue(item, avatarID); 519 Enqueue(item, avatarID);
@@ -535,15 +522,10 @@ namespace OpenSim.Region.ClientStack.Linden
535 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, 522 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath,
536 ulong regionHandle, int regionSizeX, int regionSizeY) 523 ulong regionHandle, int regionSizeX, int regionSizeY)
537 { 524 {
538<<<<<<< HEAD
539 if (DebugLevel > 0) 525 if (DebugLevel > 0)
540 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}", 526 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}",
541 LogHeader, regionHandle, endPoint, avatarID, regionSizeX, regionSizeY); 527 LogHeader, regionHandle, endPoint, avatarID, regionSizeX, regionSizeY);
542 528
543=======
544 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, avatarID={2}, regionSize={3},{4}>",
545 LogHeader, regionHandle, avatarID, regionSizeX, regionSizeY);
546>>>>>>> avn/ubitvar
547 OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath, regionHandle, regionSizeX, regionSizeY); 529 OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath, regionHandle, regionSizeX, regionSizeY);
548 Enqueue(item, avatarID); 530 Enqueue(item, avatarID);
549 } 531 }
@@ -553,14 +535,9 @@ namespace OpenSim.Region.ClientStack.Linden
553 uint locationID, uint flags, string capsURL, 535 uint locationID, uint flags, string capsURL,
554 UUID avatarID, int regionSizeX, int regionSizeY) 536 UUID avatarID, int regionSizeX, int regionSizeY)
555 { 537 {
556<<<<<<< HEAD
557 if (DebugLevel > 0) 538 if (DebugLevel > 0)
558 m_log.DebugFormat("{0} TeleportFinishEvent. handle={1}, endPoint={2}, avatarID={3}", 539 m_log.DebugFormat("{0} TeleportFinishEvent. handle={1}, endPoint={2}, avatarID={3}",
559 LogHeader, regionHandle, regionExternalEndPoint, avatarID, regionSizeX, regionSizeY); 540 LogHeader, regionHandle, regionExternalEndPoint, avatarID, regionSizeX, regionSizeY);
560=======
561 m_log.DebugFormat("{0} TeleportFinishEvent. handle={1}, avatarID={2}, regionSize={3},{4}>",
562 LogHeader, regionHandle, avatarID, regionSizeX, regionSizeY);
563>>>>>>> avn/ubitvar
564 541
565 OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint, 542 OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint,
566 locationID, flags, capsURL, avatarID, regionSizeX, regionSizeY); 543 locationID, flags, capsURL, avatarID, regionSizeX, regionSizeY);
@@ -571,14 +548,9 @@ namespace OpenSim.Region.ClientStack.Linden
571 IPEndPoint newRegionExternalEndPoint, 548 IPEndPoint newRegionExternalEndPoint,
572 string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY) 549 string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY)
573 { 550 {
574<<<<<<< HEAD
575 if (DebugLevel > 0) 551 if (DebugLevel > 0)
576 m_log.DebugFormat("{0} CrossRegion. handle={1}, avatarID={2}, regionSize={3},{4}>", 552 m_log.DebugFormat("{0} CrossRegion. handle={1}, avatarID={2}, regionSize={3},{4}>",
577 LogHeader, handle, avatarID, regionSizeX, regionSizeY); 553 LogHeader, handle, avatarID, regionSizeX, regionSizeY);
578=======
579 m_log.DebugFormat("{0} CrossRegion. handle={1}, avatarID={2}, regionSize={3},{4}>",
580 LogHeader, handle, avatarID, regionSizeX, regionSizeY);
581>>>>>>> avn/ubitvar
582 554
583 OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint, 555 OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint,
584 capsURL, avatarID, sessionID, regionSizeX, regionSizeY); 556 capsURL, avatarID, sessionID, regionSizeX, regionSizeY);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
index 8b7e4c1..50e22f5 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
@@ -77,13 +77,8 @@ namespace OpenSim.Region.ClientStack.Linden
77 llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle))); 77 llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle)));
78 llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); 78 llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes()));
79 llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); 79 llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port));
80<<<<<<< HEAD
81 llsdSimInfo.Add("RegionSizeX", OSD.FromUInteger((uint) regionSizeX));
82 llsdSimInfo.Add("RegionSizeY", OSD.FromUInteger((uint) regionSizeY));
83=======
84 llsdSimInfo.Add("RegionSizeX", OSD.FromUInteger((uint)regionSizeX)); 80 llsdSimInfo.Add("RegionSizeX", OSD.FromUInteger((uint)regionSizeX));
85 llsdSimInfo.Add("RegionSizeY", OSD.FromUInteger((uint)regionSizeY)); 81 llsdSimInfo.Add("RegionSizeY", OSD.FromUInteger((uint)regionSizeY));
86>>>>>>> avn/ubitvar
87 82
88 OSDArray arr = new OSDArray(1); 83 OSDArray arr = new OSDArray(1);
89 arr.Add(llsdSimInfo); 84 arr.Add(llsdSimInfo);
@@ -176,12 +171,8 @@ namespace OpenSim.Region.ClientStack.Linden
176 info.Add("SimAccess", OSD.FromInteger(simAccess)); 171 info.Add("SimAccess", OSD.FromInteger(simAccess));
177 info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); 172 info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
178 info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); 173 info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port));
179<<<<<<< HEAD
180 info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
181=======
182// info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation 174// info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
183 info.Add("TeleportFlags", OSD.FromUInteger(flags)); 175 info.Add("TeleportFlags", OSD.FromUInteger(flags));
184>>>>>>> avn/ubitvar
185 info.Add("RegionSizeX", OSD.FromUInteger((uint)regionSizeX)); 176 info.Add("RegionSizeX", OSD.FromUInteger((uint)regionSizeX));
186 info.Add("RegionSizeY", OSD.FromUInteger((uint)regionSizeY)); 177 info.Add("RegionSizeY", OSD.FromUInteger((uint)regionSizeY));
187 178
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index 91efe8a..b5a70040 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -60,11 +60,10 @@ namespace OpenSim.Region.ClientStack.Linden
60 private IAssetService m_AssetService; 60 private IAssetService m_AssetService;
61 private bool m_Enabled = true; 61 private bool m_Enabled = true;
62 private string m_URL; 62 private string m_URL;
63<<<<<<< HEAD 63
64 private string m_URL2; 64 private string m_URL2;
65 private string m_RedirectURL = null; 65 private string m_RedirectURL = null;
66 private string m_RedirectURL2 = null; 66 private string m_RedirectURL2 = null;
67=======
68 67
69 struct aPollRequest 68 struct aPollRequest
70 { 69 {
@@ -94,7 +93,7 @@ namespace OpenSim.Region.ClientStack.Linden
94 new OpenMetaverse.BlockingQueue<aPollRequest>(); 93 new OpenMetaverse.BlockingQueue<aPollRequest>();
95 94
96 private Dictionary<UUID, PollServiceMeshEventArgs> m_pollservices = new Dictionary<UUID, PollServiceMeshEventArgs>(); 95 private Dictionary<UUID, PollServiceMeshEventArgs> m_pollservices = new Dictionary<UUID, PollServiceMeshEventArgs>();
97>>>>>>> avn/ubitvar 96
98 97
99 #region Region Module interfaceBase Members 98 #region Region Module interfaceBase Members
100 99
@@ -129,12 +128,9 @@ namespace OpenSim.Region.ClientStack.Linden
129 if (m_URL2 != string.Empty) 128 if (m_URL2 != string.Empty)
130 { 129 {
131 m_Enabled = true; 130 m_Enabled = true;
132<<<<<<< HEAD 131
133 m_RedirectURL2 = config.GetString("GetMesh2RedirectURL"); 132 m_RedirectURL2 = config.GetString("GetMesh2RedirectURL");
134 } 133 }
135=======
136
137>>>>>>> avn/ubitvar
138 } 134 }
139 135
140 public void AddRegion(Scene pScene) 136 public void AddRegion(Scene pScene)
@@ -177,7 +173,7 @@ namespace OpenSim.Region.ClientStack.Linden
177 173
178 for (uint i = 0; i < 2; i++) 174 for (uint i = 0; i < 2; i++)
179 { 175 {
180 m_workerThreads[i] = Watchdog.StartThread(DoMeshRequests, 176 m_workerThreads[i] = WorkManager.StartThread(DoMeshRequests,
181 String.Format("MeshWorkerThread{0}", i), 177 String.Format("MeshWorkerThread{0}", i),
182 ThreadPriority.Normal, 178 ThreadPriority.Normal,
183 false, 179 false,
@@ -336,21 +332,6 @@ namespace OpenSim.Region.ClientStack.Linden
336 332
337 public void RegisterCaps(UUID agentID, Caps caps) 333 public void RegisterCaps(UUID agentID, Caps caps)
338 { 334 {
339<<<<<<< HEAD
340 UUID capID = UUID.Random();
341 bool getMeshRegistered = false;
342
343 if (m_URL == string.Empty)
344 {
345
346 }
347 else if (m_URL == "localhost")
348 {
349 getMeshRegistered = true;
350 caps.RegisterHandler(
351 "GetMesh",
352 new GetMeshHandler("/CAPS/" + capID + "/", m_AssetService, "GetMesh", agentID.ToString(), m_RedirectURL));
353=======
354// UUID capID = UUID.Random(); 335// UUID capID = UUID.Random();
355 if (m_URL == "localhost") 336 if (m_URL == "localhost")
356 { 337 {
@@ -375,34 +356,13 @@ namespace OpenSim.Region.ClientStack.Linden
375 caps.RegisterHandler("GetMesh", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); 356 caps.RegisterHandler("GetMesh", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
376 m_pollservices[agentID] = args; 357 m_pollservices[agentID] = args;
377 m_capsDict[agentID] = capUrl; 358 m_capsDict[agentID] = capUrl;
378
379
380
381>>>>>>> avn/ubitvar
382 } 359 }
383 else 360 else
384 { 361 {
385 caps.RegisterHandler("GetMesh", m_URL); 362 caps.RegisterHandler("GetMesh", m_URL);
386 } 363 }
387
388 if(m_URL2 == string.Empty)
389 {
390
391 }
392 else if (m_URL2 == "localhost")
393 {
394 if (!getMeshRegistered)
395 {
396 caps.RegisterHandler(
397 "GetMesh2",
398 new GetMeshHandler("/CAPS/" + capID + "/", m_AssetService, "GetMesh2", agentID.ToString(), m_RedirectURL2));
399 }
400 }
401 else
402 {
403 caps.RegisterHandler("GetMesh2", m_URL2);
404 }
405 } 364 }
365
406 private void DeregisterCaps(UUID agentID, Caps caps) 366 private void DeregisterCaps(UUID agentID, Caps caps)
407 { 367 {
408 string capUrl; 368 string capUrl;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index b9396b7..79a3458 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -82,24 +82,22 @@ namespace OpenSim.Region.ClientStack.Linden
82 private static OpenMetaverse.BlockingQueue<aPollRequest> m_queue = 82 private static OpenMetaverse.BlockingQueue<aPollRequest> m_queue =
83 new OpenMetaverse.BlockingQueue<aPollRequest>(); 83 new OpenMetaverse.BlockingQueue<aPollRequest>();
84 84
85<<<<<<< HEAD 85
86 // TODO: Change this to a config option 86 // TODO: Change this to a config option
87 private string m_RedirectURL = null; 87 private string m_RedirectURL = null;
88=======
89 private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>();
90>>>>>>> avn/ubitvar
91 88
92 private string m_URL; 89 private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>();
90
93 91
94 #region ISharedRegionModule Members 92 #region ISharedRegionModule Members
95 93
96 public void Initialise(IConfigSource source) 94 public void Initialise(IConfigSource source)
97 { 95 {
98 IConfig config = source.Configs["ClientStack.LindenCaps"]; 96 IConfig config = source.Configs["ClientStack.LindenCaps"];
99<<<<<<< HEAD 97
100 if (config == null) 98 if (config == null)
101 return; 99 return;
102 100/*
103 m_URL = config.GetString("Cap_GetTexture", string.Empty); 101 m_URL = config.GetString("Cap_GetTexture", string.Empty);
104 // Cap doesn't exist 102 // Cap doesn't exist
105 if (m_URL != string.Empty) 103 if (m_URL != string.Empty)
@@ -107,10 +105,8 @@ namespace OpenSim.Region.ClientStack.Linden
107 m_Enabled = true; 105 m_Enabled = true;
108 m_RedirectURL = config.GetString("GetTextureRedirectURL"); 106 m_RedirectURL = config.GetString("GetTextureRedirectURL");
109 } 107 }
110======= 108*/
111 if (config != null) 109 m_Url = config.GetString("Cap_GetTexture", "localhost");
112 m_Url = config.GetString("Cap_GetTexture", "localhost");
113>>>>>>> avn/ubitvar
114 } 110 }
115 111
116 public void AddRegion(Scene s) 112 public void AddRegion(Scene s)
@@ -142,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden
142 138
143 for (uint i = 0; i < 2; i++) 139 for (uint i = 0; i < 2; i++)
144 { 140 {
145 m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests, 141 m_workerThreads[i] = WorkManager.StartThread(DoTextureRequests,
146 String.Format("TextureWorkerThread{0}", i), 142 String.Format("TextureWorkerThread{0}", i),
147 ThreadPriority.Normal, 143 ThreadPriority.Normal,
148 false, 144 false,
@@ -237,12 +233,6 @@ namespace OpenSim.Region.ClientStack.Linden
237 public PollServiceTextureEventArgs(UUID pId, Scene scene) : 233 public PollServiceTextureEventArgs(UUID pId, Scene scene) :
238 base(null, "", null, null, null, pId, int.MaxValue) 234 base(null, "", null, null, null, pId, int.MaxValue)
239 { 235 {
240<<<<<<< HEAD
241// m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
242 caps.RegisterHandler(
243 "GetTexture",
244 new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString(), m_RedirectURL));
245=======
246 m_scene = scene; 236 m_scene = scene;
247 // x is request id, y is userid 237 // x is request id, y is userid
248 HasEvents = (x, y) => 238 HasEvents = (x, y) =>
@@ -312,7 +302,6 @@ namespace OpenSim.Region.ClientStack.Linden
312 302
313 return response; 303 return response;
314 }; 304 };
315>>>>>>> avn/ubitvar
316 } 305 }
317 306
318 public void Process(aPollRequest requestinfo) 307 public void Process(aPollRequest requestinfo)
@@ -402,11 +391,7 @@ namespace OpenSim.Region.ClientStack.Linden
402 } 391 }
403 IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>(); 392 IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>();
404 if (handler != null) 393 if (handler != null)
405<<<<<<< HEAD
406 handler.RegisterExternalUserCapsHandler(agentID,caps,"GetTexture", m_URL);
407=======
408 handler.RegisterExternalUserCapsHandler(agentID, caps, "GetTexture", capUrl); 394 handler.RegisterExternalUserCapsHandler(agentID, caps, "GetTexture", capUrl);
409>>>>>>> avn/ubitvar
410 else 395 else
411 caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); 396 caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
412 m_pollservices[agentID] = args; 397 m_pollservices[agentID] = args;
@@ -422,7 +407,7 @@ namespace OpenSim.Region.ClientStack.Linden
422 { 407 {
423 PollServiceTextureEventArgs args; 408 PollServiceTextureEventArgs args;
424 409
425 MainServer.Instance.RemoveHTTPHandler("", m_URL); 410 MainServer.Instance.RemoveHTTPHandler("", m_Url);
426 m_capsDict.Remove(agentID); 411 m_capsDict.Remove(agentID);
427 412
428 if (m_pollservices.TryGetValue(agentID, out args)) 413 if (m_pollservices.TryGetValue(agentID, out args))
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index 54542c9..d07f66e 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -157,11 +157,7 @@ namespace OpenSim.Region.ClientStack.Linden
157 m_features["MeshXferEnabled"] = true; 157 m_features["MeshXferEnabled"] = true;
158 158
159 m_features["PhysicsMaterialsEnabled"] = true; 159 m_features["PhysicsMaterialsEnabled"] = true;
160<<<<<<< HEAD
161 160
162=======
163
164>>>>>>> avn/ubitvar
165 OSDMap typesMap = new OSDMap(); 161 OSDMap typesMap = new OSDMap();
166 typesMap["convex"] = true; 162 typesMap["convex"] = true;
167 typesMap["none"] = true; 163 typesMap["none"] = true;
@@ -169,7 +165,6 @@ namespace OpenSim.Region.ClientStack.Linden
169 m_features["PhysicsShapeTypes"] = typesMap; 165 m_features["PhysicsShapeTypes"] = typesMap;
170 166
171 // Extra information for viewers that want to use it 167 // Extra information for viewers that want to use it
172<<<<<<< HEAD
173 // TODO: Take these out of here into their respective modules, like map-server-url 168 // TODO: Take these out of here into their respective modules, like map-server-url
174 OSDMap extrasMap; 169 OSDMap extrasMap;
175 if(m_features.ContainsKey("OpenSimExtras")) 170 if(m_features.ContainsKey("OpenSimExtras"))
@@ -179,15 +174,10 @@ namespace OpenSim.Region.ClientStack.Linden
179 else 174 else
180 extrasMap = new OSDMap(); 175 extrasMap = new OSDMap();
181 176
182=======
183
184 OSDMap extrasMap = new OSDMap();
185
186 extrasMap["AvatarSkeleton"] = true; 177 extrasMap["AvatarSkeleton"] = true;
187 extrasMap["AnimationSet"] = true; 178 extrasMap["AnimationSet"] = true;
188 179
189 // TODO: Take these out of here into their respective modules, like map-server-url 180 // TODO: Take these out of here into their respective modules, like map-server-url
190>>>>>>> avn/ubitvar
191 if (m_SearchURL != string.Empty) 181 if (m_SearchURL != string.Empty)
192 extrasMap["search-server-url"] = m_SearchURL; 182 extrasMap["search-server-url"] = m_SearchURL;
193 if (!string.IsNullOrEmpty(m_DestinationGuideURL)) 183 if (!string.IsNullOrEmpty(m_DestinationGuideURL))
@@ -199,13 +189,8 @@ namespace OpenSim.Region.ClientStack.Linden
199 if (m_GridName != string.Empty) 189 if (m_GridName != string.Empty)
200 extrasMap["GridName"] = m_GridName; 190 extrasMap["GridName"] = m_GridName;
201 191
202<<<<<<< HEAD
203 if (extrasMap.Count > 0) 192 if (extrasMap.Count > 0)
204 m_features["OpenSimExtras"] = extrasMap; 193 m_features["OpenSimExtras"] = extrasMap;
205=======
206 m_features["OpenSimExtras"] = extrasMap;
207
208>>>>>>> avn/ubitvar
209 } 194 }
210 } 195 }
211 196
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
index dd4a691..db16ccb 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
@@ -52,6 +52,7 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
52 52
53namespace OpenSim.Region.ClientStack.Linden.Caps.Tests 53namespace OpenSim.Region.ClientStack.Linden.Caps.Tests
54{ 54{
55 /*
55 [TestFixture] 56 [TestFixture]
56 public class WebFetchInvDescModuleTests : OpenSimTestCase 57 public class WebFetchInvDescModuleTests : OpenSimTestCase
57 { 58 {
@@ -156,4 +157,5 @@ namespace OpenSim.Region.ClientStack.Linden.Caps.Tests
156 Assert.That((int)folderOsd["descendents"], Is.EqualTo(16)); 157 Assert.That((int)folderOsd["descendents"], Is.EqualTo(16));
157 } 158 }
158 } 159 }
160 */
159} \ No newline at end of file 161} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
index c27d101..8fd8d1f 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
@@ -66,16 +66,19 @@ namespace OpenSim.Region.ClientStack.Linden
66 private bool m_persistBakedTextures; 66 private bool m_persistBakedTextures;
67 67
68 private IBakedTextureModule m_BakedTextureModule; 68 private IBakedTextureModule m_BakedTextureModule;
69 69 private string m_URL;
70 private IBakedTextureModule m_BakedTextureModule;
71 70
72 public void Initialise(IConfigSource source) 71 public void Initialise(IConfigSource source)
73 { 72 {
73 IConfig config = source.Configs["ClientStack.LindenCaps"];
74 if (config == null)
75 return;
76
77 m_URL = config.GetString("Cap_UploadBakedTexture", string.Empty);
78
74 IConfig appearanceConfig = source.Configs["Appearance"]; 79 IConfig appearanceConfig = source.Configs["Appearance"];
75 if (appearanceConfig != null) 80 if (appearanceConfig != null)
76 m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures); 81 m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures);
77
78
79 } 82 }
80 83
81 public void AddRegion(Scene s) 84 public void AddRegion(Scene s)
@@ -91,13 +94,7 @@ namespace OpenSim.Region.ClientStack.Linden
91 s.EventManager.OnRemovePresence -= DeRegisterPresence; 94 s.EventManager.OnRemovePresence -= DeRegisterPresence;
92 m_BakedTextureModule = null; 95 m_BakedTextureModule = null;
93 m_scene = null; 96 m_scene = null;
94<<<<<<< HEAD
95 }
96=======
97 } 97 }
98>>>>>>> avn/ubitvar
99
100
101 98
102 public void RegionLoaded(Scene s) 99 public void RegionLoaded(Scene s)
103 { 100 {
@@ -109,173 +106,6 @@ namespace OpenSim.Region.ClientStack.Linden
109 106
110 private void DeRegisterPresence(UUID agentId) 107 private void DeRegisterPresence(UUID agentId)
111 { 108 {
112<<<<<<< HEAD
113 ScenePresence presence = null;
114 if (m_scene.TryGetScenePresence(agentId, out presence))
115 {
116 presence.ControllingClient.OnSetAppearance -= CaptureAppearanceSettings;
117 }
118
119 }
120
121 private void RegisterNewPresence(ScenePresence presence)
122 {
123 presence.ControllingClient.OnSetAppearance += CaptureAppearanceSettings;
124
125 }
126
127 private void CaptureAppearanceSettings(IClientAPI remoteClient, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize, WearableCacheItem[] cacheItems)
128 {
129 int maxCacheitemsLoop = cacheItems.Length;
130 if (maxCacheitemsLoop > AvatarWearable.MAX_WEARABLES)
131 {
132 maxCacheitemsLoop = AvatarWearable.MAX_WEARABLES;
133 m_log.WarnFormat("[CACHEDBAKES]: Too Many Cache items Provided {0}, the max is {1}. Truncating!", cacheItems.Length, AvatarWearable.MAX_WEARABLES);
134 }
135
136 m_BakedTextureModule = m_scene.RequestModuleInterface<IBakedTextureModule>();
137 if (cacheItems.Length > 0)
138 {
139// m_log.Debug("[Cacheitems]: " + cacheItems.Length);
140// for (int iter = 0; iter < maxCacheitemsLoop; iter++)
141// {
142// m_log.Debug("[Cacheitems] {" + iter + "/" + cacheItems[iter].TextureIndex + "}: c-" + cacheItems[iter].CacheId + ", t-" +
143// cacheItems[iter].TextureID);
144// }
145
146 ScenePresence p = null;
147 if (m_scene.TryGetScenePresence(remoteClient.AgentId, out p))
148 {
149
150 WearableCacheItem[] existingitems = p.Appearance.WearableCacheItems;
151 if (existingitems == null)
152 {
153 if (m_BakedTextureModule != null)
154 {
155 WearableCacheItem[] savedcache = null;
156 try
157 {
158 if (p.Appearance.WearableCacheItemsDirty)
159 {
160 savedcache = m_BakedTextureModule.Get(p.UUID);
161 p.Appearance.WearableCacheItems = savedcache;
162 p.Appearance.WearableCacheItemsDirty = false;
163 }
164
165 }
166 /*
167 * The following Catch types DO NOT WORK with m_BakedTextureModule.Get
168 * it jumps to the General Packet Exception Handler if you don't catch Exception!
169 *
170 catch (System.Net.Sockets.SocketException)
171 {
172 cacheItems = null;
173 }
174 catch (WebException)
175 {
176 cacheItems = null;
177 }
178 catch (InvalidOperationException)
179 {
180 cacheItems = null;
181 } */
182 catch (Exception)
183 {
184 // The service logs a sufficient error message.
185 }
186
187
188 if (savedcache != null)
189 existingitems = savedcache;
190 }
191 }
192 // Existing items null means it's a fully new appearance
193 if (existingitems == null)
194 {
195
196 for (int i = 0; i < maxCacheitemsLoop; i++)
197 {
198 if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex)
199 {
200 Primitive.TextureEntryFace face = textureEntry.FaceTextures[cacheItems[i].TextureIndex];
201 if (face == null)
202 {
203 textureEntry.CreateFace(cacheItems[i].TextureIndex);
204 textureEntry.FaceTextures[cacheItems[i].TextureIndex].TextureID =
205 AppearanceManager.DEFAULT_AVATAR_TEXTURE;
206 continue;
207 }
208 cacheItems[i].TextureID =face.TextureID;
209 if (m_scene.AssetService != null)
210 cacheItems[i].TextureAsset =
211 m_scene.AssetService.GetCached(cacheItems[i].TextureID.ToString());
212 }
213 else
214 {
215 m_log.WarnFormat("[CACHEDBAKES]: Invalid Texture Index Provided, Texture doesn't exist or hasn't been uploaded yet {0}, the max is {1}. Skipping!", cacheItems[i].TextureIndex, textureEntry.FaceTextures.Length);
216 }
217
218
219 }
220 }
221 else
222
223
224 {
225 // for each uploaded baked texture
226 for (int i = 0; i < maxCacheitemsLoop; i++)
227 {
228 if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex)
229 {
230 Primitive.TextureEntryFace face = textureEntry.FaceTextures[cacheItems[i].TextureIndex];
231 if (face == null)
232 {
233 textureEntry.CreateFace(cacheItems[i].TextureIndex);
234 textureEntry.FaceTextures[cacheItems[i].TextureIndex].TextureID =
235 AppearanceManager.DEFAULT_AVATAR_TEXTURE;
236 continue;
237 }
238 cacheItems[i].TextureID =
239 face.TextureID;
240 }
241 else
242 {
243 m_log.WarnFormat("[CACHEDBAKES]: Invalid Texture Index Provided, Texture doesn't exist or hasn't been uploaded yet {0}, the max is {1}. Skipping!", cacheItems[i].TextureIndex, textureEntry.FaceTextures.Length);
244 }
245 }
246
247 for (int i = 0; i < maxCacheitemsLoop; i++)
248 {
249 if (cacheItems[i].TextureAsset == null)
250 {
251 cacheItems[i].TextureAsset =
252 m_scene.AssetService.GetCached(cacheItems[i].TextureID.ToString());
253 }
254 }
255 }
256
257
258
259 p.Appearance.WearableCacheItems = cacheItems;
260
261
262
263 if (m_BakedTextureModule != null)
264 {
265 m_BakedTextureModule.Store(remoteClient.AgentId, cacheItems);
266 p.Appearance.WearableCacheItemsDirty = true;
267
268 }
269 }
270 }
271=======
272// ScenePresence presence = null;
273// if (m_scene.TryGetScenePresence(agentId, out presence))
274 {
275// presence.ControllingClient.OnSetAppearance -= CaptureAppearanceSettings;
276 }
277
278>>>>>>> avn/ubitvar
279 } 109 }
280 110
281 private void RegisterNewPresence(ScenePresence presence) 111 private void RegisterNewPresence(ScenePresence presence)
@@ -441,25 +271,6 @@ namespace OpenSim.Region.ClientStack.Linden
441 271
442 public void RegisterCaps(UUID agentID, Caps caps) 272 public void RegisterCaps(UUID agentID, Caps caps)
443 { 273 {
444 UploadBakedTextureHandler avatarhandler = new UploadBakedTextureHandler(
445 caps, m_scene.AssetService, m_persistBakedTextures);
446
447<<<<<<< HEAD
448
449
450 caps.RegisterHandler(
451 "UploadBakedTexture",
452 new RestStreamHandler(
453 "POST",
454 "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath,
455 avatarhandler.UploadBakedTexture,
456 "UploadBakedTexture",
457 agentID.ToString()));
458
459
460
461
462=======
463 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); 274 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
464 if (m_URL == "localhost") 275 if (m_URL == "localhost")
465 { 276 {
@@ -480,7 +291,6 @@ namespace OpenSim.Region.ClientStack.Linden
480 { 291 {
481 caps.RegisterHandler("UploadBakedTexture", m_URL); 292 caps.RegisterHandler("UploadBakedTexture", m_URL);
482 } 293 }
483>>>>>>> avn/ubitvar
484 } 294 }
485 } 295 }
486} 296}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 92f8c51..6e2f7f3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -64,11 +64,7 @@ namespace OpenSim.Region.ClientStack.Linden
64 public List<UUID> folders; 64 public List<UUID> folders;
65 } 65 }
66 66
67<<<<<<< HEAD
68 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
69=======
70 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 67 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
71>>>>>>> avn/ubitvar
72 68
73 /// <summary> 69 /// <summary>
74 /// Control whether requests will be processed asynchronously. 70 /// Control whether requests will be processed asynchronously.