qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r1618265 - in /qpid/dispatch/trunk: include/qpid/dispatch/amqp.h src/amqp.c src/server.c
Date Fri, 15 Aug 2014 19:41:20 GMT
Author: tross
Date: Fri Aug 15 19:41:19 2014
New Revision: 1618265

URL: http://svn.apache.org/r1618265
Log:
DISPATCH-69 - Router now lists ANONYMOUS-RELAY in its offered-capabilities.

Modified:
    qpid/dispatch/trunk/include/qpid/dispatch/amqp.h
    qpid/dispatch/trunk/src/amqp.c
    qpid/dispatch/trunk/src/server.c

Modified: qpid/dispatch/trunk/include/qpid/dispatch/amqp.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/amqp.h?rev=1618265&r1=1618264&r2=1618265&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/amqp.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/amqp.h Fri Aug 15 19:41:19 2014
@@ -94,6 +94,11 @@ const char * const QD_MA_TO;       ///< 
 const char * const QD_MA_CLASS;    ///< Message-Class
 /// @}
 
+/** @name Container Capabilities */
+/// @{
+const char * const QD_CAPABILITY_ANONYMOUS_RELAY;
+/// @}
+
 /** @name Link Terminus Capabilities */
 /// @{
 const char * const QD_CAPABILITY_ROUTER;

Modified: qpid/dispatch/trunk/src/amqp.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/amqp.c?rev=1618265&r1=1618264&r2=1618265&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/amqp.c (original)
+++ qpid/dispatch/trunk/src/amqp.c Fri Aug 15 19:41:19 2014
@@ -24,7 +24,8 @@ const char * const QD_MA_TRACE   = "x-op
 const char * const QD_MA_TO      = "x-opt-qd.to";
 const char * const QD_MA_CLASS   = "x-opt-qd.class";
 
-const char * const QD_CAPABILITY_ROUTER = "qd.router";
+const char * const QD_CAPABILITY_ROUTER          = "qd.router";
+const char * const QD_CAPABILITY_ANONYMOUS_RELAY = "ANONYMOUS-RELAY";
 
 const char * const QD_INTERNODE_LINK_NAME_1 = "qd.internode.1";
 const char * const QD_INTERNODE_LINK_NAME_2 = "qd.internode.2";

Modified: qpid/dispatch/trunk/src/server.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/server.c?rev=1618265&r1=1618264&r2=1618265&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/server.c (original)
+++ qpid/dispatch/trunk/src/server.c Fri Aug 15 19:41:19 2014
@@ -20,6 +20,7 @@
 #include <qpid/dispatch/ctools.h>
 #include <qpid/dispatch/threading.h>
 #include <qpid/dispatch/log.h>
+#include <qpid/dispatch/amqp.h>
 #include "dispatch_private.h"
 #include "server_private.h"
 #include "timer_private.h"
@@ -80,10 +81,12 @@ static void thread_process_listeners(qd_
         ctx->link_context = 0;
         ctx->ufd          = 0;
 
+        size_t clen = strlen(QD_CAPABILITY_ANONYMOUS_RELAY);
         pn_connection_t *conn = pn_connection();
         ctx->collector = pn_collector();
         pn_connection_collect(conn, ctx->collector);
         pn_connection_set_container(conn, qd_server->container_name);
+        pn_data_put_symbol(pn_connection_offered_capabilities(conn), pn_bytes(clen, (char*)
QD_CAPABILITY_ANONYMOUS_RELAY));
         pn_connector_set_connection(cxtr, conn);
         pn_connection_set_context(conn, ctx);
         ctx->pn_conn = conn;
@@ -208,10 +211,12 @@ static int process_connector(qd_server_t
                 break;
             }
 
+            size_t clen = strlen(QD_CAPABILITY_ANONYMOUS_RELAY);
             pn_connection_t *conn = pn_connection();
             ctx->collector = pn_collector();
             pn_connection_collect(conn, ctx->collector);
             pn_connection_set_container(conn, qd_server->container_name);
+            pn_data_put_symbol(pn_connection_offered_capabilities(conn), pn_bytes(clen, (char*)
QD_CAPABILITY_ANONYMOUS_RELAY));
             pn_connector_set_connection(cxtr, conn);
             pn_connection_set_context(conn, ctx);
             ctx->pn_conn = conn;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message