activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
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 GMT
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)")]



Mime
View raw message