Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F85E106A4 for ; Thu, 19 Dec 2013 21:24:22 +0000 (UTC) Received: (qmail 8149 invoked by uid 500); 19 Dec 2013 21:24:22 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 8121 invoked by uid 500); 19 Dec 2013 21:24:22 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 8114 invoked by uid 99); 19 Dec 2013 21:24:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 21:24:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 21:24:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id ABAFE238888F; Thu, 19 Dec 2013 21:23:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1552437 - in /activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src: main/csharp/ main/csharp/Transport/ main/csharp/Transport/Tcp/ test/csharp/ Date: Thu, 19 Dec 2013 21:23:57 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131219212357.ABAFE238888F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Thu Dec 19 21:23:57 2013 New Revision: 1552437 URL: http://svn.apache.org/r1552437 Log: https://issues.apache.org/jira/browse/AMQNET-458 Working Connect / Disconnect Removed: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/CommonAssemblyInfo.cs activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/CommonAssemblyInfo.cs Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/ResponseCorrelator.cs activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/ConnectionFactoryTest.cs Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/ResponseCorrelator.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/ResponseCorrelator.cs?rev=1552437&r1=1552436&r2=1552437&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/ResponseCorrelator.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/ResponseCorrelator.cs Thu Dec 19 21:23:57 2013 @@ -58,10 +58,9 @@ namespace Apache.NMS.MQTT.Transport public override FutureResponse AsyncRequest(Command command) { - Tracer.DebugFormat("ResponseCorrelator requesting: {0}", command); if (command.IsCONNECT) { - command.CommandId = 1; + command.CommandId = (short) 1; } else { @@ -105,7 +104,7 @@ namespace Apache.NMS.MQTT.Transport if(command.IsResponse) { Response response = (Response) command; - int correlationId = response.CorrelationId; + short correlationId = response.CorrelationId; FutureResponse future = (FutureResponse) requestMap[correlationId]; if(future != null) @@ -115,10 +114,8 @@ namespace Apache.NMS.MQTT.Transport } else { - if(Tracer.IsDebugEnabled) - { - Tracer.Debug("Unknown response ID: " + response.CorrelationId + " for response: " + response); - } + Tracer.DebugFormat("Unknown response ID: {0} for response: {1}", + response.CorrelationId, response); } } else Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs?rev=1552437&r1=1552436&r2=1552437&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs Thu Dec 19 21:23:57 2013 @@ -237,23 +237,23 @@ namespace Apache.NMS.MQTT.Transport.Tcp catch { } + } + } - if(null != readThread) - { - if(Thread.CurrentThread != readThread && readThread.IsAlive) - { - if(!readThread.Join((int) MAX_THREAD_WAIT.TotalMilliseconds)) - { - readThread.Abort(); - } - } + if(null != readThread) + { + if(Thread.CurrentThread != readThread && readThread.IsAlive) + { + if(!readThread.Join((int) MAX_THREAD_WAIT.TotalMilliseconds)) + { + readThread.Abort(); + } + } - readThread = null; - } + readThread = null; + } - started = false; - } - } + started = false; } public void Dispose() Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/ConnectionFactoryTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/ConnectionFactoryTest.cs?rev=1552437&r1=1552436&r2=1552437&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/ConnectionFactoryTest.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/ConnectionFactoryTest.cs Thu Dec 19 21:23:57 2013 @@ -25,6 +25,12 @@ namespace Apache.NMS.MQTT.Test [TestFixture] public class ConnectionFactoryTest { + [SetUp] + public void SetUp() + { + Apache.NMS.Tracer.Trace = new NmsConsoleTracer(); + } + [Test] [TestCase("tcp://${activemqhost}:1883")] // [TestCase("stomp:failover:(tcp://${activemqhost}:1883?keepAlive=false&wireFormat.maxInactivityDuration=1000)")]