Author: tabish
Date: Thu Dec 10 15:56:44 2009
New Revision: 889306
URL: http://svn.apache.org/viewvc?rev=889306&view=rev
Log:
Fix missing newline in Frame, add some debugging code for use in testing
(remove most later)
Modified:
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
Modified:
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs?rev=889306&r1=889305&r2=889306&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompFrame.cs
Thu Dec 10 15:56:44 2009
@@ -130,6 +130,7 @@
builder.Append(NEWLINE);
}
+ builder.Append(NEWLINE);
dataOut.Write(this.encoding.GetBytes(builder.ToString()));
if(this.Content != null)
@@ -152,9 +153,11 @@
string command;
do
{
+ Tracer.Debug("Attempting to read in new Command");
command = ReadLine(dataIn);
}
while(command == "");
+ Tracer.Debug("Read new Command: " + command);
}
private void ReadHeaders(BinaryReader dataIn)
@@ -219,12 +222,14 @@
while(true)
{
int nextChar = dataIn.Read();
+ Tracer.Debug( "Value read: " + ((Int32)nextChar).ToString());
if(nextChar < 0)
{
throw new IOException("Peer closed the stream.");
}
if(nextChar == 10)
{
+ Tracer.Debug("Read The end of Line");
break;
}
ms.WriteByte((byte)nextChar);
Modified:
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs?rev=889306&r1=889305&r2=889306&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
Thu Dec 10 15:56:44 2009
@@ -104,6 +104,8 @@
public Object Unmarshal(BinaryReader dataIn)
{
+ Tracer.Debug("StompWireFormat - Command Read in Progress...");
+
StompFrame frame = new StompFrame();
frame.FromStream(dataIn);
@@ -249,9 +251,9 @@
StompFrame frame = new StompFrame("CONNECT");
frame.SetProperty("client-id", command.ClientId);
- frame.SetProperty("login", command.UserName);
- frame.SetProperty("passcode", command.Password);
- frame.SetProperty("request-id", command.CommandId);
+ //frame.SetProperty("login", command.UserName);
+ //frame.SetProperty("passcode", command.Password);
+ //frame.SetProperty("request-id", command.CommandId);
frame.ToStream(dataOut);
}