From 06077f775faeb02047afb0888c4d5e530e88fdc4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 25 Dec 2010 08:28:42 -0800 Subject: Fixes mantis #5279 --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index e3ba190..f9d28b9 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -148,7 +148,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); regionimage = regionimage.Replace("-", ""); - m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/index.php?method=" + regionimage); + m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "index.php?method=" + regionimage); MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage); MainServer.Instance.AddLLSDHandler( -- cgit v1.1 From b16173e3e884407bbb5ea686a2cf3294572add0e Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 27 Dec 2010 12:43:54 -0800 Subject: Drop the static from default wearables. It isn't static. --- OpenSim/Framework/AvatarWearable.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 0809ab6..8e27596 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs @@ -88,8 +88,6 @@ namespace OpenSim.Framework // public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1"); // public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007"); - private static AvatarWearable[] defaultWearables = null; - protected Dictionary m_items = new Dictionary(); protected List m_ids = new List(); @@ -221,7 +219,7 @@ namespace OpenSim.Framework { get { - defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these + AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these for (int i = 0; i < MAX_WEARABLES; i++) { defaultWearables[i] = new AvatarWearable(); -- cgit v1.1 From f801d50a8a2df43b3b4d99ebf32de603e4cfa226 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 27 Dec 2010 15:25:08 -0800 Subject: WARNING: simulator config var change! This affects only system-facing configs. Nothing to do if you follow the rules of not messing with Grid.ini and GridHypergrid.ini. Change the remote Grid region module so that it takes the network connector as a config variable. This allows the region plugin to be reused for both Robust and Simian network connectors. --- .../Grid/RemoteGridServiceConnector.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index dfba0d6..33cc838 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs @@ -36,6 +36,7 @@ using OpenSim.Framework; using OpenSim.Services.Connectors; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Server.Base; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; @@ -97,9 +98,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return; } + string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty); + if (networkConnector == string.Empty) + { + m_log.Error("[REMOTE GRID CONNECTOR]: Please specify a network connector under [GridService]"); + return; + } + + Object[] args = new Object[] { source }; + m_RemoteGridService = ServerUtils.LoadPlugin(networkConnector, args); + m_LocalGridService = new LocalGridServicesConnector(source); - m_RemoteGridService = new GridServicesConnector(source); - } + } public void PostInitialise() { -- cgit v1.1 From 6386dfd362991eef4b799b85085a02b80dd439b8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 27 Dec 2010 16:26:29 -0800 Subject: No need for these methods to be virtual now. --- .../Services/Connectors/Grid/GridServiceConnector.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index 80f0d2d..5092d74 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors #region IGridService - public virtual string RegisterRegion(UUID scopeID, GridRegion regionInfo) + public string RegisterRegion(UUID scopeID, GridRegion regionInfo) { Dictionary rinfo = regionInfo.ToKeyValuePairs(); Dictionary sendData = new Dictionary(); @@ -140,7 +140,7 @@ namespace OpenSim.Services.Connectors return "Error communicating with grid service"; } - public virtual bool DeregisterRegion(UUID regionID) + public bool DeregisterRegion(UUID regionID) { Dictionary sendData = new Dictionary(); @@ -172,7 +172,7 @@ namespace OpenSim.Services.Connectors return false; } - public virtual List GetNeighbours(UUID scopeID, UUID regionID) + public List GetNeighbours(UUID scopeID, UUID regionID) { Dictionary sendData = new Dictionary(); @@ -219,7 +219,7 @@ namespace OpenSim.Services.Connectors return rinfos; } - public virtual GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) + public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) { Dictionary sendData = new Dictionary(); @@ -265,7 +265,7 @@ namespace OpenSim.Services.Connectors return rinfo; } - public virtual GridRegion GetRegionByPosition(UUID scopeID, int x, int y) + public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) { Dictionary sendData = new Dictionary(); @@ -310,7 +310,7 @@ namespace OpenSim.Services.Connectors return rinfo; } - public virtual GridRegion GetRegionByName(UUID scopeID, string regionName) + public GridRegion GetRegionByName(UUID scopeID, string regionName) { Dictionary sendData = new Dictionary(); @@ -351,7 +351,7 @@ namespace OpenSim.Services.Connectors return rinfo; } - public virtual List GetRegionsByName(UUID scopeID, string name, int maxNumber) + public List GetRegionsByName(UUID scopeID, string name, int maxNumber) { Dictionary sendData = new Dictionary(); @@ -400,7 +400,7 @@ namespace OpenSim.Services.Connectors return rinfos; } - public virtual List GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax) + public List GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax) { Dictionary sendData = new Dictionary(); @@ -606,7 +606,7 @@ namespace OpenSim.Services.Connectors return rinfos; } - public virtual int GetRegionFlags(UUID scopeID, UUID regionID) + public int GetRegionFlags(UUID scopeID, UUID regionID) { Dictionary sendData = new Dictionary(); -- cgit v1.1 From 94ed69b1daaf4ea3e9431cb739b79dce808573d0 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 27 Dec 2010 17:18:49 -0800 Subject: Update SimianGridServicesConnector to work more like a connector so we can take advantage of the logic in RemoteGridServicesConnector. --- .../SimianGrid/SimianGridServiceConnector.cs | 118 +++++++++------------ 1 file changed, 50 insertions(+), 68 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 8076fab..2f61538 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -51,51 +51,21 @@ namespace OpenSim.Services.Connectors.SimianGrid /// Connects region registration and neighbor lookups to the SimianGrid /// backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class SimianGridServiceConnector : IGridService, ISharedRegionModule + public class SimianGridServiceConnector : IGridService { private static readonly ILog m_log = LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); - private string m_serverUrl = String.Empty; - private Dictionary m_scenes = new Dictionary(); + private string m_ServerURI = String.Empty; private bool m_Enabled = false; - #region ISharedRegionModule - - public Type ReplaceableInterface { get { return null; } } - public void RegionLoaded(Scene scene) { } - public void PostInitialise() { } - public void Close() { } - public SimianGridServiceConnector() { } - public string Name { get { return "SimianGridServiceConnector"; } } - public void AddRegion(Scene scene) - { - if (!m_Enabled) - return; - - // Every shared region module has to maintain an indepedent list of - // currently running regions - lock (m_scenes) - m_scenes[scene.RegionInfo.RegionID] = scene; - - scene.RegisterModuleInterface(this); - } - public void RemoveRegion(Scene scene) + public SimianGridServiceConnector(string serverURI) { - if (!m_Enabled) - return; - - lock (m_scenes) - m_scenes.Remove(scene.RegionInfo.RegionID); - - scene.UnregisterModuleInterface(this); + m_ServerURI = serverURI.TrimEnd('/'); } - #endregion ISharedRegionModule - public SimianGridServiceConnector(IConfigSource source) { CommonInit(source); @@ -103,32 +73,29 @@ namespace OpenSim.Services.Connectors.SimianGrid public void Initialise(IConfigSource source) { - IConfig moduleConfig = source.Configs["Modules"]; - if (moduleConfig != null) - { - string name = moduleConfig.GetString("GridServices", ""); - if (name == Name) - CommonInit(source); - } + CommonInit(source); } private void CommonInit(IConfigSource source) { IConfig gridConfig = source.Configs["GridService"]; - if (gridConfig != null) + if (gridConfig == null) { - string serviceUrl = gridConfig.GetString("GridServerURI"); - if (!String.IsNullOrEmpty(serviceUrl)) - { - if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) - serviceUrl = serviceUrl + '/'; - m_serverUrl = serviceUrl; - m_Enabled = true; - } + m_log.Error("[SIMIAN GRID CONNECTOR]: GridService missing from OpenSim.ini"); + throw new Exception("Grid connector init error"); } - if (String.IsNullOrEmpty(m_serverUrl)) - m_log.Info("[SIMIAN GRID CONNECTOR]: No GridServerURI specified, disabling connector"); + string serviceUrl = gridConfig.GetString("GridServerURI"); + if (String.IsNullOrEmpty(serviceUrl)) + { + m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService"); + throw new Exception("Grid connector init error"); + } + + if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) + serviceUrl = serviceUrl + '/'; + m_ServerURI = serviceUrl; + m_Enabled = true; } #region IGridService @@ -136,11 +103,11 @@ namespace OpenSim.Services.Connectors.SimianGrid public string RegisterRegion(UUID scopeID, GridRegion regionInfo) { // Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service - Scene scene; - if (m_scenes.TryGetValue(regionInfo.RegionID, out scene)) - UploadMapTile(scene); - else - m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking"); +// Scene scene; +// if (m_scenes.TryGetValue(regionInfo.RegionID, out scene)) +// UploadMapTile(scene); +// else +// m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking"); Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); @@ -171,7 +138,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { "ExtraData", OSDParser.SerializeJsonString(extraData) } }; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) return String.Empty; else @@ -187,7 +154,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { "Enabled", "0" } }; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); bool success = response["Success"].AsBoolean(); if (!success) @@ -232,9 +199,12 @@ namespace OpenSim.Services.Connectors.SimianGrid { "SceneID", regionID.ToString() } }; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region with uuid {0}",regionID.ToString()); + + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] uuid request successful {0}",response["Name"].AsString()); return ResponseToGridRegion(response); } else @@ -257,15 +227,18 @@ namespace OpenSim.Services.Connectors.SimianGrid { "Enabled", "1" } }; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString()); + + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] position request successful {0}",response["Name"].AsString()); return ResponseToGridRegion(response); } else { - //m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}", - // x / Constants.RegionSize, y / Constants.RegionSize); + // m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}", + // x / Constants.RegionSize, y / Constants.RegionSize); return null; } } @@ -295,9 +268,13 @@ namespace OpenSim.Services.Connectors.SimianGrid if (maxNumber > 0) requestArgs["MaxNumber"] = maxNumber.ToString(); - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions with name {0}",name); + + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] found regions with name {0}",name); + OSDArray array = response["Scenes"] as OSDArray; if (array != null) { @@ -328,7 +305,10 @@ namespace OpenSim.Services.Connectors.SimianGrid { "Enabled", "1" } }; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + m_log.WarnFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString()); + + + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { OSDArray array = response["Scenes"] as OSDArray; @@ -384,7 +364,9 @@ namespace OpenSim.Services.Connectors.SimianGrid { "SceneID", regionID.ToString() } }; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString()); + + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0; @@ -430,7 +412,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // Make the remote storage request try { - HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl); + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); HttpWebResponse response = MultipartForm.Post(request, postParameters); using (Stream responseStream = response.GetResponseStream()) @@ -486,7 +468,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (onlyEnabled) requestArgs["Enabled"] = "1"; - OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { return ResponseToGridRegion(response); -- cgit v1.1 From 915c0b17b0638342a3e2de8b4f9d2505014561fd Mon Sep 17 00:00:00 2001 From: Myan Thor Date: Wed, 29 Dec 2010 13:40:47 +0100 Subject: fixes a problem with ending slashes in GatekeeperService to verify session-addresses --- OpenSim/Services/HypergridService/GatekeeperService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 4419201..bbddd87 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -330,10 +330,12 @@ namespace OpenSim.Services.HypergridService if (parts.Length < 2) return false; - string addressee = parts[0]; - m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, m_ExternalName); + char[] trailing_slash = new char[] { '/' }; + string addressee = parts[0].TrimEnd(trailing_slash); + string externalname = m_ExternalName.TrimEnd(trailing_slash); + m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname); - return string.Equals(addressee, m_ExternalName, StringComparison.OrdinalIgnoreCase); + return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase); } #endregion -- cgit v1.1 From d42e0c39fcaa03e101b8270e083690f2004c6776 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 29 Dec 2010 07:36:39 -0800 Subject: Bug fix in neighbors: serverURI now always has a trailing '/'... neighbors were not getting notified. --- OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++-- OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs index 6c89ac8..9172536 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs @@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return; m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}", - m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY); + m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX / Constants.RegionSize, otherRegion.RegionLocY / Constants.RegionSize); m_neighbours[otherRegion.RegionHandle] = otherRegion; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c4bd028..e27b2ba 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -810,8 +810,8 @@ namespace OpenSim.Region.Framework.Scenes { uint xcell = (uint)((int)otherRegion.RegionLocX / (int)Constants.RegionSize); uint ycell = (uint)((int)otherRegion.RegionLocY / (int)Constants.RegionSize); - m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}", - RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell); + //m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}", + // RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell); if (RegionInfo.RegionHandle != otherRegion.RegionHandle) { diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs index 9c57a40..93da10e 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs @@ -87,7 +87,7 @@ namespace OpenSim.Services.Connectors public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion) { - string uri = region.ServerURI + "/region/" + thisRegion.RegionID + "/"; + string uri = region.ServerURI + "region/" + thisRegion.RegionID + "/"; //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri); WebRequest HelloNeighbourRequest = WebRequest.Create(uri); -- cgit v1.1 From a32f80b9e3a84852558150c3b30722b6755a1ff0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 30 Dec 2010 00:31:59 +0100 Subject: Implement SendPlacesReply --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 4 ++ .../Client/VWoHTTP/ClientStack/VWHClientView.cs | 4 ++ OpenSim/Framework/IClientAPI.cs | 19 ++++++++ .../Region/ClientStack/LindenUDP/LLClientView.cs | 54 ++++++++++++++++++++++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 ++ .../Server/IRCClientView.cs | 4 ++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++ OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++ 8 files changed, 97 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index a66caab..1d93382 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -1720,5 +1720,9 @@ namespace OpenSim.Client.MXP.ClientStack public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index c8eca9f..f2b58d3 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -1223,5 +1223,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 21ffa9a..a6be157 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -584,6 +584,23 @@ namespace OpenSim.Framework } } + public class PlacesReplyData + { + public UUID OwnerID; + public string Name; + public string Desc; + public int ActualArea; + public int BillableArea; + public byte Flags; + public uint GlobalX; + public uint GlobalY; + public uint GlobalZ; + public string SimName; + public UUID SnapshotID; + public uint Dwell; + public int Price; + } + /// /// Specifies the fields that have been changed when sending a prim or /// avatar update @@ -1316,5 +1333,7 @@ namespace OpenSim.Framework void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId); void StopFlying(ISceneEntity presence); + + void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data); } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d63b719..ee4f04e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -11997,7 +11997,61 @@ namespace OpenSim.Region.ClientStack.LindenUDP //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); + } + + public void SendPlacesReply(UUID queryID, UUID transactionID, + PlacesReplyData[] data) + { + PlacesReplyPacket reply = null; + PlacesReplyPacket.QueryDataBlock[] dataBlocks = + new PlacesReplyPacket.QueryDataBlock[0]; + + for (int i = 0 ; i < data.Length ; i++) + { + PlacesReplyPacket.QueryDataBlock block = + new PlacesReplyPacket.QueryDataBlock(); + + block.OwnerID = data[i].OwnerID; + block.Name = Util.StringToBytes256(data[i].Name); + block.Desc = Util.StringToBytes1024(data[i].Desc); + block.ActualArea = data[i].ActualArea; + block.BillableArea = data[i].BillableArea; + block.Flags = data[i].Flags; + block.GlobalX = data[i].GlobalX; + block.GlobalY = data[i].GlobalY; + block.GlobalZ = data[i].GlobalZ; + block.SimName = Util.StringToBytes256(data[i].SimName); + block.SnapshotID = data[i].SnapshotID; + block.Dwell = data[i].Dwell; + block.Price = data[i].Price; + + if (reply != null && reply.Length + block.Length > 1400) + { + OutPacket(reply, ThrottleOutPacketType.Task); + reply = null; + dataBlocks = new PlacesReplyPacket.QueryDataBlock[0]; + } + + if (reply == null) + { + reply = (PlacesReplyPacket)PacketPool.Instance.GetPacket(PacketType.PlacesReply); + reply.AgentData = new PlacesReplyPacket.AgentDataBlock(); + reply.AgentData.AgentID = AgentId; + reply.AgentData.QueryID = queryID; + + reply.TransactionData = new PlacesReplyPacket.TransactionDataBlock(); + reply.TransactionData.TransactionID = transactionID; + + reply.QueryData = dataBlocks; + } + + Array.Resize(ref dataBlocks, dataBlocks.Length + 1); + dataBlocks[dataBlocks.Length - 1] = block; + reply.QueryData = dataBlocks; + } + if (reply != null) + OutPacket(reply, ThrottleOutPacketType.Task); } } } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 311352c..41d6628 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -1165,5 +1165,9 @@ namespace OpenSim.Region.Examples.SimpleModule public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 20870aa..49382f0 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1686,5 +1686,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 0c43c8a..5d44aa1 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1170,5 +1170,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 3f3845c..dc0d4de 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -1225,5 +1225,9 @@ namespace OpenSim.Tests.Common.Mock public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } -- cgit v1.1