summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Shaw <steshaw@apache.org>2006-11-28 21:43:07 +0000
committerSteven Shaw <steshaw@apache.org>2006-11-28 21:43:07 +0000
commit383a2c3ba7afb9f3c49b6980b3b64439e9e8e6ae (patch)
treec5b74e36996a959b666363cfd5cba568617e9077
parent9e3b387e4b2c0f1101270c993f7b7cafbb88f2e9 (diff)
downloadqpid-python-383a2c3ba7afb9f3c49b6980b3b64439e9e8e6ae.tar.gz
Fix compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480221 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs2
-rw-r--r--dotnet/Qpid.Client/Client/AMQConnection.cs2
-rw-r--r--dotnet/Qpid.Client/Client/AmqBrokerInfo.cs47
-rw-r--r--dotnet/Qpid.Client/Client/AmqChannel.cs2
-rw-r--r--dotnet/Qpid.Client/Client/BasicMessageConsumer.cs8
-rw-r--r--dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs2
-rw-r--r--dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs4
7 files changed, 29 insertions, 38 deletions
diff --git a/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs b/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
index d165e33467..c2732a0ce1 100644
--- a/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
+++ b/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
@@ -53,7 +53,7 @@ namespace Qpid.Client.Transport.Socket.Blocking
{
_socket = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- IPHostEntry ipHostInfo = Dns.Resolve(_host);
+ IPHostEntry ipHostInfo = Dns.Resolve(_host); // Note: don't fix this warning. We do this for .NET 1.1 compatibility.
IPAddress ipAddress = ipHostInfo.AddressList[0];
IPEndPoint ipe = new IPEndPoint(ipAddress, _port);
diff --git a/dotnet/Qpid.Client/Client/AMQConnection.cs b/dotnet/Qpid.Client/Client/AMQConnection.cs
index a0ca8b7bcf..a19b46c40a 100644
--- a/dotnet/Qpid.Client/Client/AMQConnection.cs
+++ b/dotnet/Qpid.Client/Client/AMQConnection.cs
@@ -430,7 +430,7 @@ namespace Qpid.Client
_log.Info("Closing channel " + channel);
if (cause != null)
{
- channel.Closed(cause);
+ channel.ClosedWithException(cause);
}
else
{
diff --git a/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs b/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
index c00a427494..88569b4fc0 100644
--- a/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
+++ b/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
@@ -27,17 +27,16 @@ namespace Qpid.Client
{
public class AmqBrokerInfo : BrokerInfo
{
- private string _host = "localhost";
- private int _port = 5672;
- private string _transport = "amqp";
-
public readonly string URL_FORMAT_EXAMPLE =
"<transport>://<hostname>[:<port Default=\""+BrokerDetailsConstants.DEFAULT_PORT+"\">][?<option>='<value>'[,<option>='<value>']]";
public const long DEFAULT_CONNECT_TIMEOUT = 30000L;
+ private string _host = "localhost";
+ private int _port = 5672;
+ private string _transport = "amqp";
private Hashtable _options = new Hashtable();
-
+
public AmqBrokerInfo()
{
}
@@ -204,7 +203,7 @@ namespace Qpid.Client
{
return long.Parse((string)_options[BrokerDetailsConstants.OPTIONS_CONNECT_TIMEOUT]);
}
- catch (FormatException nfe)
+ catch (FormatException)
{
//Do nothing as we will use the default below.
}
@@ -238,24 +237,24 @@ namespace Qpid.Client
return sb.ToString();
}
-
- public override bool Equals(object o)
- {
- if (!(o is BrokerInfo))
- {
- return false;
- }
-
- BrokerInfo bd = (BrokerInfo) o;
-
- return StringEqualsIgnoreCase(_host, bd.getHost()) &&
- (_port == bd.getPort()) &&
- StringEqualsIgnoreCase(_transport, bd.getTransport()) &&
- (useSSL() == bd.useSSL());
-
- //todo do we need to compare all the options as well?
- }
+ public override bool Equals(object obj)
+ {
+ if (!(obj is BrokerInfo))
+ {
+ return false;
+ }
+
+ BrokerInfo bd = (BrokerInfo) obj;
+ return StringEqualsIgnoreCase(_host, bd.getHost()) &&
+ _port == bd.getPort();
+ }
+
+ public override int GetHashCode()
+ {
+ return _host.ToLower().GetHashCode() ^ _port.GetHashCode();
+ }
+
// TODO: move to util class.
private bool StringEqualsIgnoreCase(string one, string two)
{
@@ -310,4 +309,4 @@ namespace Qpid.Client
setOption(BrokerDetailsConstants.OPTIONS_SSL, ssl.ToString());
}
}
-} \ No newline at end of file
+}
diff --git a/dotnet/Qpid.Client/Client/AmqChannel.cs b/dotnet/Qpid.Client/Client/AmqChannel.cs
index fb4498d531..6b1ee204b5 100644
--- a/dotnet/Qpid.Client/Client/AmqChannel.cs
+++ b/dotnet/Qpid.Client/Client/AmqChannel.cs
@@ -377,7 +377,7 @@ namespace Qpid.Client
* unilaterally.
* @param e the exception that caused this session to be closed. Null causes the
*/
- public void Closed(Exception e)
+ public void ClosedWithException(Exception e)
{
lock (_connection.FailoverMutex)
{
diff --git a/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs b/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
index f0603b6e8a..d0e0473b14 100644
--- a/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
+++ b/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
@@ -34,14 +34,6 @@ namespace Qpid.Client
private bool _noLocal;
- /// We need to store the "raw" field table so that we can resubscribe in the event of failover being required.
-// private FieldTable _rawSelectorFieldTable;
-//
-// public FieldTable RawSelectorFieldTable
-// {
-// get { return _rawSelectorFieldTable; }
-// }
-
/**
* We store the exclusive field in order to be able to reuse it when resubscribing in the event of failover
*/
diff --git a/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs b/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
index 65aca0d942..15696f38c5 100644
--- a/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
+++ b/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
@@ -232,7 +232,7 @@ namespace Qpid.Client.Protocol
{
_closingChannels.Remove(channelId);
AmqChannel channel = (AmqChannel) _channelId2SessionMap[channelId];
- channel.Closed(new AMQException(_logger, code, text));
+ channel.ClosedWithException(new AMQException(_logger, code, text));
return true;
}
else
diff --git a/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs b/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
index f077f75fdf..60e4c24987 100644
--- a/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
+++ b/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
@@ -112,7 +112,7 @@ namespace Qpid.Client.qms.failover
{
_retries = int.Parse(retries);
}
- catch (FormatException nfe)
+ catch (FormatException)
{
_retries = DEFAULT_SERVER_RETRIES;
}
@@ -144,4 +144,4 @@ namespace Qpid.Client.qms.failover
}
}
-} \ No newline at end of file
+}