From a56a17fab20e1ef94e70dbf6648ebb2f437de364 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 9 Aug 2007 12:59:42 +0000 Subject: Making sure my local working copy is in sync with svn before I start the job of enabling the new SceneObject classes. --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 8 +++++--- OpenSim/Framework/Communications/Capabilities/Caps.cs | 2 +- OpenSim/Framework/General/Interfaces/IClientAPI.cs | 4 ++-- OpenSim/Framework/General/NullClientAPI.cs | 4 ++-- OpenSim/Region/Application/OpenSimMain.cs | 2 +- OpenSim/Region/ClientStack/ClientView.API.cs | 18 +++++------------- OpenSim/Region/Environment/Scenes/Scene.cs | 11 +++++++++-- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 5 ++++- OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 4 ++-- 9 files changed, 31 insertions(+), 27 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index acdd593..3866e21 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -224,7 +224,7 @@ namespace OpenSim.Framework.Communications.Caches lock (this.SendingTextures) { this.SendingTextures.Remove(sender.request.ImageInfo.FullID); - this.AvatarRecievedTextures[sender.request.RequestUser.AgentId].Add(sender.request.ImageInfo.FullID); + // this.AvatarRecievedTextures[sender.request.RequestUser.AgentId].Add(sender.request.ImageInfo.FullID); } } } @@ -634,7 +634,8 @@ namespace OpenSim.Framework.Communications.Caches public class TextureSender { public AssetRequest request; - + private int counter = 0; + public TextureSender(AssetRequest req) { request = req; @@ -644,8 +645,9 @@ namespace OpenSim.Framework.Communications.Caches public bool SendTexture() { SendPacket(); + counter++; - if ((request.PacketCounter > request.NumPackets) |(request.NumPackets ==1)) + if ((request.PacketCounter > request.NumPackets) | (counter >120) |(request.NumPackets ==1)) { return true; } diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 82ef08d..d56cf6f 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -304,7 +304,7 @@ namespace OpenSim.Region.Capabilities private LLUUID newAssetID; private LLUUID inventoryItemID; private BaseHttpServer httpListener; - private bool SaveAssets = false; + private bool SaveAssets = true; private string m_assetName = ""; /// diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index da4e03b..fa323ba 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs @@ -187,10 +187,10 @@ namespace OpenSim.Framework.Interfaces void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint ); AgentCircuitData RequestClientInfo(); - void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint ); + void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL ); void SendMapBlock(List mapBlocks); void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); - void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags); + void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL); void SendTeleportCancel(); void SendTeleportLocationStart(); void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); diff --git a/OpenSim/Framework/General/NullClientAPI.cs b/OpenSim/Framework/General/NullClientAPI.cs index bc98cc1..459e12b 100644 --- a/OpenSim/Framework/General/NullClientAPI.cs +++ b/OpenSim/Framework/General/NullClientAPI.cs @@ -118,10 +118,10 @@ namespace OpenSim.Framework public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look){} public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint){} public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); } - public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint){} + public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL){} public virtual void SendMapBlock(List mapBlocks){} public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags){} - public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags){} + public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL){} public virtual void SendTeleportCancel(){} public virtual void SendTeleportLocationStart(){} public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance){} diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 248bd42..8e3f558 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -83,7 +83,7 @@ namespace OpenSim { startupSource = new IniConfigSource(iniFilePath); - //enable follow line, if we want the original config source(normally commandline args) merged with ini file settings. + //enable following line, if we want the original config source(normally commandline args) merged with ini file settings. //in this case we have it so that if both sources have the same named setting, the command line value will overwrite the ini file value. //(as if someone has bothered to enter a command line arg, we should take notice of it) //startupSource.Merge(configSource); diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index a4b0af1..8a2db98 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs @@ -383,11 +383,11 @@ namespace OpenSim.Region.ClientStack agentData.child = false; agentData.firstname = this.firstName; agentData.lastname = this.lastName; - agentData.CapsPath=m_authenticateSessionsHandler.AgentCircuits[this.CircuitCode].CapsPath; + agentData.CapsPath = ""; return agentData; } - public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint externalIPEndPoint) + public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint externalIPEndPoint, string capsURL) { LLVector3 look = new LLVector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10); @@ -407,14 +407,9 @@ namespace OpenSim.Region.ClientStack newSimPack.RegionData.SimIP += (uint)byteIP[0]; newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; //newSimPack.RegionData.SeedCapability = new byte[0]; - - string capsPath = "http://" + externalIPEndPoint.Address.ToString() + ":9000/CAPS/" + m_authenticateSessionsHandler.AgentCircuits[this.CircuitCode].CapsPath +"0000/"; - System.Text.ASCIIEncoding enc=new System.Text.ASCIIEncoding(); - newSimPack.RegionData.SeedCapability = enc.GetBytes(capsPath); - + newSimPack.RegionData.SeedCapability = Helpers.StringToField(capsURL); this.OutPacket(newSimPack); - //this.DowngradeClient(); } public void SendMapBlock(List mapBlocks) @@ -450,17 +445,14 @@ namespace OpenSim.Region.ClientStack OutPacket(tpLocal); } - public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint newRegionEndPoint, uint locationID, uint flags) + public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint newRegionEndPoint, uint locationID, uint flags, string capsURL) { TeleportFinishPacket teleport = new TeleportFinishPacket(); teleport.Info.AgentID = this.AgentID; teleport.Info.RegionHandle = regionHandle; teleport.Info.SimAccess = simAccess; - string capsPath = "http://" + newRegionEndPoint.Address.ToString() + ":9000/CAPS/" + m_authenticateSessionsHandler.AgentCircuits[this.CircuitCode].CapsPath + "0000/"; - System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); - teleport.Info.SeedCapability = enc.GetBytes(capsPath); - + teleport.Info.SeedCapability = Helpers.StringToField(capsURL); //teleport.Info.SeedCapability = new byte[0]; IPAddress oIP = newRegionEndPoint.Address; diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 19fd075..813308b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -75,6 +75,10 @@ namespace OpenSim.Region.Environment.Scenes #region Properties + public AgentCircuitManager AuthenticateHandler + { + get { return this.authenticateHandler; } + } /// /// /// @@ -600,7 +604,7 @@ namespace OpenSim.Region.Environment.Scenes client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); - // client.OnCreateNewInventoryItem += CreateNewInventoryItem; + //client.OnCreateNewInventoryItem += CreateNewInventoryItem; //client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder; client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents; client.OnRequestTaskInventory += RequestTaskInventory; @@ -922,7 +926,10 @@ namespace OpenSim.Region.Environment.Scenes commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent); commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position, false); - remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4)); + //TODO: following line is hard coded to port 9000, really need to change this as soon as possible + AgentCircuitData circuitdata = remoteClient.RequestClientInfo(); + string capsPath = "http://" + reg.ExternalEndPoint.Address.ToString() + ":9000/CAPS/" + this.AuthenticateHandler.AgentCircuits[circuitdata.circuitcode].CapsPath + "0000/"; + remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath); } } } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 17c1b3a..b021b44 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -620,7 +620,10 @@ namespace OpenSim.Region.Environment.Scenes bool res = this.m_scene.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos, this._physActor.Flying); if (res) { - this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint); + //TODO: following line is hard coded to port 9000, really need to change this as soon as possible + AgentCircuitData circuitdata = this.ControllingClient.RequestClientInfo(); + string capsPath = "http://" + neighbourRegion.ExternalEndPoint.Address.ToString() + ":9000/CAPS/" +this.m_scene.AuthenticateHandler.AgentCircuits[circuitdata.circuitcode].CapsPath + "0000/"; + this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, capsPath); this.MakeChildAgent(); } } diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index 367ee67..3e9b669 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs @@ -132,10 +132,10 @@ namespace SimpleApp public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) { } public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) { } public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); } - public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint) { } + public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) { } public virtual void SendMapBlock(List mapBlocks) { } public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) { } - public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags) { } + public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) { } public virtual void SendTeleportCancel() { } public virtual void SendTeleportLocationStart() { } public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) { } -- cgit v1.1