You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2007/01/05 14:08:50 UTC
svn commit: r493020 - in /incubator/qpid/branches/qpid.0-9: cpp/lib/common/
cpp/lib/common/framing/ gentools/src/org/apache/qpid/gentools/
gentools/templ.cpp/
java/broker/src/main/java/org/apache/qpid/server/protocol/
java/common/src/main/java/org/apac...
Author: kpvdr
Date: Fri Jan 5 05:08:49 2007
New Revision: 493020
URL: http://svn.apache.org/viewvc?view=rev&rev=493020
Log:
Merged changes from trunk to fix C++ client version 0-0 bug. Changes to cpp/lib/common/Makefile.am, so bootstrap, configure required to remake Makefiels.
Added:
incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.h.tmpl
- copied, changed from r493002, incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl
Removed:
incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/AMQP_HighestVersion.h
incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl
Modified:
incubator/qpid/branches/qpid.0-9/cpp/lib/common/Makefile.am
incubator/qpid/branches/qpid.0-9/gentools/src/org/apache/qpid/gentools/Main.java
incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl
incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl
incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl
incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/common/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/common/Makefile.am?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/common/Makefile.am (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/common/Makefile.am Fri Jan 5 05:08:49 2007
@@ -72,7 +72,7 @@
$(framing)/ProtocolVersionException.cpp \
$(framing)/Value.cpp \
$(gen)/AMQP_ClientProxy.cpp \
- $(gen)/AMQP_HighestVersion.cpp \
+ $(gen)/AMQP_HighestVersion.h \
$(gen)/AMQP_MethodVersionMap.cpp \
$(gen)/AMQP_ServerProxy.cpp \
Exception.cpp \
@@ -105,7 +105,6 @@
$(framing)/Value.h \
$(framing)/amqp_framing.h \
$(framing)/amqp_types.h \
- $(framing)/AMQP_HighestVersion.h \
Exception.h \
ExceptionHolder.h \
QpidError.h \
Modified: incubator/qpid/branches/qpid.0-9/gentools/src/org/apache/qpid/gentools/Main.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/src/org/apache/qpid/gentools/Main.java?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/src/org/apache/qpid/gentools/Main.java (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/src/org/apache/qpid/gentools/Main.java Fri Jan 5 05:08:49 2007
@@ -202,7 +202,7 @@
new File(tmplDir + Utils.fileSeparator + "AMQP_Constants.h.tmpl"),
new File(tmplDir + Utils.fileSeparator + "AMQP_MethodVersionMap.h.tmpl"),
new File(tmplDir + Utils.fileSeparator + "AMQP_MethodVersionMap.cpp.tmpl"),
- new File(tmplDir + Utils.fileSeparator + "AMQP_HighestVersion.cpp.tmpl")
+ new File(tmplDir + Utils.fileSeparator + "AMQP_HighestVersion.h.tmpl")
};
methodTemplateFiles = new File[]
{
Modified: incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl Fri Jan 5 05:08:49 2007
@@ -32,6 +32,7 @@
#define _AMQP_ClientOperations_
#include <FieldTable.h>
+#include <FramingContent.h>
#include <ProtocolVersion.h>
#include <ProtocolVersionException.h>
Modified: incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ClientProxy.h.tmpl Fri Jan 5 05:08:49 2007
@@ -31,6 +31,7 @@
#include <AMQP_ClientOperations.h>
#include <FieldTable.h>
+#include <FramingContent.h>
#include <OutputHandler.h>
namespace qpid {
Copied: incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.h.tmpl (from r493002, incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl)
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.h.tmpl?view=diff&rev=493020&p1=incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl&r1=493002&p2=incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.h.tmpl&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_HighestVersion.h.tmpl Fri Jan 5 05:08:49 2007
@@ -1,4 +1,4 @@
-&{AMQP_HighestVersion.cpp}
+&{AMQP_HighestVersion.h}
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -25,7 +25,18 @@
* Supported AMQP versions:
%{VLIST} * ${major}-${minor}
*/
+#ifndef _AMQP_HighestVersion_
+#define _AMQP_HighestVersion_
-#include <AMQP_HighestVersion.h>
+#include <ProtocolVersion.h>
-qpid::framing::ProtocolVersion highestProtocolVersion(${hv_latest_major}, ${hv_latest_minor});
+
+namespace qpid {
+namespace framing {
+
+static ProtocolVersion highestProtocolVersion(${hv_latest_major}, ${hv_latest_minor});
+
+} /* namespace framing */
+} /* namespace qpid */
+
+#endif
Modified: incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl Fri Jan 5 05:08:49 2007
@@ -32,6 +32,7 @@
#include <sstream>
#include <FieldTable.h>
+#include <FramingContent.h>
#include <ProtocolVersion.h>
#include <ProtocolVersionException.h>
Modified: incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/templ.cpp/AMQP_ServerProxy.h.tmpl Fri Jan 5 05:08:49 2007
@@ -31,6 +31,7 @@
#include <AMQP_ServerOperations.h>
#include <FieldTable.h>
+#include <FramingContent.h>
#include <OutputHandler.h>
namespace qpid {
Modified: incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java Fri Jan 5 05:08:49 2007
@@ -165,17 +165,14 @@
_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)
+ (byte)_major, (byte)_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)
Modified: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java?view=diff&rev=493020&r1=493019&r2=493020
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java Fri Jan 5 05:08:49 2007
@@ -146,18 +146,6 @@
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;