aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs7
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs56
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs4
6 files changed, 71 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 1da9d5e..5a2c45c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1612,14 +1612,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1612 currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]); 1612 currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]);
1613 else 1613 else
1614 { 1614 {
1615// m_log.DebugFormat(
1616// "[LLCLIENTVIEW]: Sending inventory folder details packet to {0} for folder {1}", Name, folderID);
1615 OutPacket(currentPacket, ThrottleOutPacketType.Asset, false); 1617 OutPacket(currentPacket, ThrottleOutPacketType.Asset, false);
1616 currentPacket = null; 1618 currentPacket = null;
1617 } 1619 }
1618
1619 } 1620 }
1620 1621
1621 if (currentPacket != null) 1622 if (currentPacket != null)
1623 {
1624// m_log.DebugFormat(
1625// "[LLCLIENTVIEW]: Sending inventory folder details packet to {0} for folder {1}", Name, folderID);
1622 OutPacket(currentPacket, ThrottleOutPacketType.Asset, false); 1626 OutPacket(currentPacket, ThrottleOutPacketType.Asset, false);
1627 }
1623 } 1628 }
1624 1629
1625 private InventoryDescendentsPacket.FolderDataBlock CreateFolderDataBlock(InventoryFolderBase folder) 1630 private InventoryDescendentsPacket.FolderDataBlock CreateFolderDataBlock(InventoryFolderBase folder)
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 919ea33..321b38b 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -178,6 +178,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
178 List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>( 178 List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>(
179 "POST", m_RestURL + "/RetrieveMessages/", client.AgentId); 179 "POST", m_RestURL + "/RetrieveMessages/", client.AgentId);
180 180
181 if (msglist == null)
182 m_log.WarnFormat("[OFFLINE MESSAGING]: WARNING null message list.");
183
181 foreach (GridInstantMessage im in msglist) 184 foreach (GridInstantMessage im in msglist)
182 { 185 {
183 // client.SendInstantMessage(im); 186 // client.SendInstantMessage(im);
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
index a0ccdc7..5ab334f 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -62,8 +62,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid
62 { 62 {
63 List<MapBlockData> mapBlocks = new List<MapBlockData>(); 63 List<MapBlockData> mapBlocks = new List<MapBlockData>();
64 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, 64 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
65 (minX - 4) * (int)Constants.RegionSize, (maxX + 4) * (int)Constants.RegionSize, 65 minX * (int)Constants.RegionSize, maxX * (int)Constants.RegionSize,
66 (minY - 4) * (int)Constants.RegionSize, (maxY + 4) * (int)Constants.RegionSize); 66 minY * (int)Constants.RegionSize, maxY * (int)Constants.RegionSize);
67 67
68 foreach (GridRegion r in regions) 68 foreach (GridRegion r in regions)
69 { 69 {
@@ -76,7 +76,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
76 FillInMap(mapBlocks, minX, minY, maxX, maxY); 76 FillInMap(mapBlocks, minX, minY, maxX, maxY);
77 // 77 //
78 78
79 remoteClient.SendMapBlock(mapBlocks, flag); 79 remoteClient.SendMapBlock(mapBlocks, 0);
80 } 80 }
81 81
82 82
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
93 mblock.X = (ushort)x; 93 mblock.X = (ushort)x;
94 mblock.Y = (ushort)y; 94 mblock.Y = (ushort)y;
95 mblock.Name = ""; 95 mblock.Name = "";
96 mblock.Access = 254; // not here??? 96 mblock.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's
97 mblock.MapImageId = UUID.Zero; 97 mblock.MapImageId = UUID.Zero;
98 mapBlocks.Add(mblock); 98 mapBlocks.Add(mblock);
99 } 99 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 8073f2d..0cacf2d 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -820,7 +820,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
820 MapBlockData block = new MapBlockData(); 820 MapBlockData block = new MapBlockData();
821 block.X = (ushort)minX; 821 block.X = (ushort)minX;
822 block.Y = (ushort)minY; 822 block.Y = (ushort)minY;
823 block.Access = 254; // == not there 823 block.Access = 254; // means 'simulator is offline'
824 response.Add(block); 824 response.Add(block);
825 } 825 }
826 remoteClient.SendMapBlock(response, 0); 826 remoteClient.SendMapBlock(response, 0);
@@ -846,7 +846,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
846 MapBlockFromGridRegion(block, r); 846 MapBlockFromGridRegion(block, r);
847 mapBlocks.Add(block); 847 mapBlocks.Add(block);
848 } 848 }
849 remoteClient.SendMapBlock(mapBlocks, flag); 849 remoteClient.SendMapBlock(mapBlocks, 0);
850 } 850 }
851 851
852 protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r) 852 protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index cd01a05..3bf2c2b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -904,11 +904,29 @@ namespace OpenSim.Region.Framework.Scenes
904 } 904 }
905 } 905 }
906 906
907 /// <summary>
908 /// Link an inventory item to an existing item.
909 /// </summary>
910 /// <remarks>
911 /// The linkee item id is placed in the asset id slot. This appears to be what the viewer expects when
912 /// it receives inventory information.
913 /// </remarks>
914 /// <param name="remoteClient"></param>
915 /// <param name="transActionID"></param>
916 /// <param name="folderID"></param>
917 /// <param name="callbackID"></param>
918 /// <param name="description"></param>
919 /// <param name="name"></param>
920 /// <param name="invType"></param>
921 /// <param name="type">/param>
922 /// <param name="olditemID"></param>
907 private void HandleLinkInventoryItem(IClientAPI remoteClient, UUID transActionID, UUID folderID, 923 private void HandleLinkInventoryItem(IClientAPI remoteClient, UUID transActionID, UUID folderID,
908 uint callbackID, string description, string name, 924 uint callbackID, string description, string name,
909 sbyte invType, sbyte type, UUID olditemID) 925 sbyte invType, sbyte type, UUID olditemID)
910 { 926 {
911 m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item link {0} in folder {1} pointing to {2}", name, folderID, olditemID); 927 m_log.DebugFormat(
928 "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}",
929 remoteClient.Name, name, folderID, olditemID);
912 930
913 if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) 931 if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
914 return; 932 return;
@@ -916,7 +934,20 @@ namespace OpenSim.Region.Framework.Scenes
916 ScenePresence presence; 934 ScenePresence presence;
917 if (TryGetScenePresence(remoteClient.AgentId, out presence)) 935 if (TryGetScenePresence(remoteClient.AgentId, out presence))
918 { 936 {
919// byte[] data = null; 937 bool linkAlreadyExists = false;
938 List<InventoryItemBase> existingItems = InventoryService.GetFolderItems(remoteClient.AgentId, folderID);
939 foreach (InventoryItemBase item in existingItems)
940 if (item.AssetID == olditemID)
941 linkAlreadyExists = true;
942
943 if (linkAlreadyExists)
944 {
945 m_log.WarnFormat(
946 "[AGENT INVENTORY]: Ignoring request from {0} to create item link {1} in folder {2} pointing to {3} since a link already exists",
947 remoteClient.Name, name, folderID, olditemID);
948
949 return;
950 }
920 951
921 AssetBase asset = new AssetBase(); 952 AssetBase asset = new AssetBase();
922 asset.FullID = olditemID; 953 asset.FullID = olditemID;
@@ -1351,11 +1382,28 @@ namespace OpenSim.Region.Framework.Scenes
1351 InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId); 1382 InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId);
1352 containingFolder = InventoryService.GetFolder(containingFolder); 1383 containingFolder = InventoryService.GetFolder(containingFolder);
1353 1384
1354 //m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", 1385// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}",
1355 // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); 1386// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName);
1356 1387
1357 if (containingFolder != null && containingFolder != null) 1388 if (containingFolder != null && containingFolder != null)
1389 {
1390 // If the folder requested contains links, then we need to send those folders first, otherwise the links
1391 // will be broken in the viewer.
1392 HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
1393 foreach (InventoryItemBase item in contents.Items)
1394 {
1395 if (item.AssetType == (int)AssetType.Link)
1396 {
1397 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID));
1398 linkedItemFolderIdsToSend.Add(linkedItem.Folder);
1399 }
1400 }
1401
1402 foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
1403 SendInventoryUpdate(client, new InventoryFolderBase(linkedItemFolderId), false, true);
1404
1358 client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); 1405 client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems);
1406 }
1359 } 1407 }
1360 1408
1361 /// <summary> 1409 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index ab567fb..e2d7208 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -499,6 +499,10 @@ namespace OpenSim.Region.Framework.Scenes
499 public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID, 499 public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID,
500 bool fetchFolders, bool fetchItems, int sortOrder) 500 bool fetchFolders, bool fetchItems, int sortOrder)
501 { 501 {
502// m_log.DebugFormat(
503// "[USER INVENTORY]: HandleFetchInventoryDescendents() for {0}, folder={1}, fetchFolders={2}, fetchItems={3}, sortOrder={4}",
504// remoteClient.Name, folderID, fetchFolders, fetchItems, sortOrder);
505
502 if (folderID == UUID.Zero) 506 if (folderID == UUID.Zero)
503 return; 507 return;
504 508