activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r507675 - in /activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport: Stomp/StompWireFormat.cs Tcp/TcpTransportFactory.cs
Date Wed, 14 Feb 2007 20:14:34 GMT
Author: jstrachan
Date: Wed Feb 14 12:14:34 2007
New Revision: 507675

URL: http://svn.apache.org/viewvc?view=rev&rev=507675
Log:
Attempt to fix compile errors on .Net

Modified:
    activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Stomp/StompWireFormat.cs
    activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransportFactory.cs

Modified: activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Stomp/StompWireFormat.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Stomp/StompWireFormat.cs?view=diff&rev=507675&r1=507674&r2=507675
==============================================================================
--- activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Stomp/StompWireFormat.cs
(original)
+++ activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Stomp/StompWireFormat.cs
Wed Feb 14 12:14:34 2007
@@ -81,8 +81,17 @@
 			string line;
 			while((line = socketReader.ReadLine()) != "") 
 			{
-				string[] split = line.Split(new char[] {':'}, 2);
-				headers[split[0]] = split[1];
+				int idx = line.IndexOf(':');
+				if (idx > 0) 
+				{
+					string key = line.Substring(0, idx);
+					string value = line.Substring(idx + 1);
+					headers[key] = value;
+				}
+				else 
+				{
+					// lets ignore this bad header!
+				}
 			}
 
 			byte[] content = null;

Modified: activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransportFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransportFactory.cs?view=diff&rev=507675&r1=507674&r2=507675
==============================================================================
--- activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransportFactory.cs
(original)
+++ activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransportFactory.cs
Wed Feb 14 12:14:34 2007
@@ -66,7 +66,7 @@
                 {
                         // Looping through the AddressList allows different type of connections
to be tried
                         // (IPv4, IPv6 and whatever else may be available).
-                        IPHostEntry hostEntry = Dns.Resolve(host);
+                        IPHostEntry hostEntry = Dns.GetHostByName(host);
                         foreach (IPAddress address in hostEntry.AddressList)
                         {
                                 Socket socket = new Socket(address.AddressFamily, SocketType.Stream,
ProtocolType.Tcp);



Mime
View raw message