From a05c67bebb8a504858706619335c035948907158 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 30 Oct 2009 00:08:41 -0700 Subject: * Fixes issue #4329 "llDialog fails silently" by updating OpenMetaverse.dll * Prints a warning for any future packet splitting failures --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 12 ++++++------ OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 8 ++++---- OpenSim/TestSuite/PhysicsBot.cs | 19 +++++++++++-------- OpenSim/Tools/pCampBot/PhysicsBot.cs | 19 +++++++++++-------- 4 files changed, 32 insertions(+), 26 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1ff18d4..992d06f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4329,11 +4329,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected virtual void RegisterLocalPacketHandlers() { - AddLocalPacketHandler(PacketType.LogoutRequest, Logout); + AddLocalPacketHandler(PacketType.LogoutRequest, HandleLogout); AddLocalPacketHandler(PacketType.AgentUpdate, HandleAgentUpdate); AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect); - AddLocalPacketHandler(PacketType.AgentCachedTexture, AgentTextureCached); - AddLocalPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjUpdate); + AddLocalPacketHandler(PacketType.AgentCachedTexture, HandleAgentTextureCached); + AddLocalPacketHandler(PacketType.MultipleObjectUpdate, HandleMultipleObjUpdate); AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest); AddLocalPacketHandler(PacketType.ParcelBuy, HandleParcelBuyRequest); AddLocalPacketHandler(PacketType.UUIDGroupNameRequest, HandleUUIDGroupNameRequest); @@ -4602,7 +4602,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// /// - protected virtual bool Logout(IClientAPI client, Packet packet) + protected virtual bool HandleLogout(IClientAPI client, Packet packet) { if (packet.Type == PacketType.LogoutRequest) { @@ -4640,7 +4640,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// /// - protected bool AgentTextureCached(IClientAPI simclient, Packet packet) + protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet) { //m_log.Debug("texture cached: " + packet.ToString()); AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet; @@ -4670,7 +4670,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - protected bool MultipleObjUpdate(IClientAPI simClient, Packet packet) + protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet) { MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; if (multipleupdate.AgentData.SessionID != SessionId) return false; diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index a211508..9792bcd 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -256,8 +256,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP byte[][] datas = packet.ToBytesMultiple(); int packetCount = datas.Length; - //if (packetCount > 1) - // m_log.Debug("[LLUDPSERVER]: Split " + packet.Type + " packet into " + packetCount + " packets"); + if (packetCount < 1) + m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length); for (int i = 0; i < packetCount; i++) { @@ -295,8 +295,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP byte[][] datas = packet.ToBytesMultiple(); int packetCount = datas.Length; - //if (packetCount > 1) - // m_log.Debug("[LLUDPSERVER]: Split " + packet.Type + " packet into " + packetCount + " packets"); + if (packetCount < 1) + m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length); for (int i = 0; i < packetCount; i++) { diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index 9c9c1ea..fac4275 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs @@ -130,9 +130,9 @@ namespace OpenSim.TestSuite public void startup() { client.Settings.LOGIN_SERVER = loginURI; - client.Network.OnConnected += new NetworkManager.ConnectedCallback(this.Network_OnConnected); - client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); - client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); + client.Network.LoginProgress += this.Network_LoginProgress; + client.Network.SimConnected += this.Network_SimConnected; + client.Network.Disconnected += this.Network_OnDisconnected; if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) { @@ -155,19 +155,22 @@ namespace OpenSim.TestSuite } } - public void Network_OnConnected(object sender) + public void Network_LoginProgress(object sender, LoginProgressEventArgs args) { - if (OnConnected != null) + if (args.Status == LoginStatus.Success) { - OnConnected(this, EventType.CONNECTED); + if (OnConnected != null) + { + OnConnected(this, EventType.CONNECTED); + } } } - public void Simulator_Connected(object sender) + public void Network_SimConnected(object sender, SimConnectedEventArgs args) { } - public void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message) + public void Network_OnDisconnected(object sender, DisconnectedEventArgs args) { if (OnDisconnected != null) { diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 38986a2..5d4af31 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -151,9 +151,9 @@ namespace pCampBot client.Throttle.Texture = 100000; client.Throttle.Wind = 100000; client.Throttle.Total = 400000; - client.Network.OnConnected += new NetworkManager.ConnectedCallback(this.Network_OnConnected); - client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); - client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); + client.Network.LoginProgress += this.Network_LoginProgress; + client.Network.SimConnected += this.Network_SimConnected; + client.Network.Disconnected += this.Network_OnDisconnected; client.Objects.ObjectUpdate += Objects_NewPrim; //client.Assets.OnAssetReceived += Asset_ReceivedCallback; if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) @@ -349,19 +349,22 @@ namespace pCampBot return clothfolder; } - public void Network_OnConnected(object sender) + public void Network_LoginProgress(object sender, LoginProgressEventArgs args) { - if (OnConnected != null) + if (args.Status == LoginStatus.Success) { - OnConnected(this, EventType.CONNECTED); + if (OnConnected != null) + { + OnConnected(this, EventType.CONNECTED); + } } } - public void Simulator_Connected(object sender) + public void Network_SimConnected(object sender, SimConnectedEventArgs args) { } - public void Network_OnDisconnected(NetworkManager.DisconnectType reason, string message) + public void Network_OnDisconnected(object sender, DisconnectedEventArgs args) { if (OnDisconnected != null) { -- cgit v1.1