summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2007-01-04 21:30:39 +0000
committerKim van der Riet <kpvdr@apache.org>2007-01-04 21:30:39 +0000
commit077caff939a3647e7538c309863a012c92f1c767 (patch)
tree0be71c5c4fbf83c289cb7db19e05fce116f25a5b /java
parent9fae14cc56a6608cce8f398319a76ff8b7cb48be (diff)
downloadqpid-python-077caff939a3647e7538c309863a012c92f1c767.tar.gz
Fixed C++ client sending protocol version 0-0 over the wire. Minor fixes and tidy-up in related code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@492756 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java11
-rw-r--r--java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java12
2 files changed, 4 insertions, 19 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java b/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
index 9ff6b96690..831117d2c6 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
@@ -165,17 +165,14 @@ public class AMQMinaProtocolSession implements AMQProtocolSession,
_minor = pi.protocolMinor;
String mechanisms = ApplicationRegistry.getInstance().getAuthenticationManager().getMechanisms();
String locales = "en_US";
- // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
- // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
- // Be aware of possible changes to parameter order as versions change.
+ // Interfacing with generated code - be aware of possible changes to parameter order as versions change.
AMQFrame response = ConnectionStartBody.createAMQFrame((short) 0,
- (byte)8, (byte)0, // AMQP version (major, minor)
+ _major, _minor, // AMQP version (major, minor)
locales.getBytes(), // locales
mechanisms.getBytes(), // mechanisms
null, // serverProperties
- (short)8, // versionMajor
- (short)0 // versionMinor
- );
+ (short)_major, // versionMajor
+ (short)_minor); // versionMinor
_minaProtocolSession.write(response);
}
catch (AMQException e)
diff --git a/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java b/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
index f0d5489527..f2d1a70cdc 100644
--- a/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
+++ b/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
@@ -146,18 +146,6 @@ public class ProtocolInitiation extends AMQDataBlock implements EncodableAMQData
throw new AMQProtocolInstanceException("Protocol instance " + CURRENT_PROTOCOL_INSTANCE + " was expected; received " +
protocolInstance);
}
- /*
- if (protocolMajor != CURRENT_PROTOCOL_VERSION_MAJOR)
- {
- throw new AMQProtocolVersionException("Protocol major version " + CURRENT_PROTOCOL_VERSION_MAJOR +
- " was expected; received " + protocolMajor);
- }
- if (protocolMinor != CURRENT_PROTOCOL_VERSION_MINOR)
- {
- throw new AMQProtocolVersionException("Protocol minor version " + CURRENT_PROTOCOL_VERSION_MINOR +
- " was expected; received " + protocolMinor);
- }
- */
/* Look through list of available protocol versions */
boolean found = false;