You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2019/05/10 20:54:19 UTC
[qpid-dispatch] branch master updated: DISPATCH-1326 - Additional
fix. Use accessor function to obtain connection role
This is an automated email from the ASF dual-hosted git repository.
gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new 4c9786c DISPATCH-1326 - Additional fix. Use accessor function to obtain connection role
4c9786c is described below
commit 4c9786c000df9ad2e54b81490231100489640604
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Fri May 10 16:54:02 2019 -0400
DISPATCH-1326 - Additional fix. Use accessor function to obtain connection role
---
include/qpid/dispatch/router_core.h | 9 +++++++++
src/router_core/connections.c | 5 +++++
src/router_node.c | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/qpid/dispatch/router_core.h b/include/qpid/dispatch/router_core.h
index faa8f5c..035781f 100644
--- a/include/qpid/dispatch/router_core.h
+++ b/include/qpid/dispatch/router_core.h
@@ -222,6 +222,15 @@ void qdr_connection_set_context(qdr_connection_t *conn, void *context);
*/
void *qdr_connection_get_context(const qdr_connection_t *conn);
+
+/**
+ * qdr_connection_role
+ *
+ * Retrieve the role of the connection object.
+ */
+qdr_connection_role_t qdr_connection_role(const qdr_connection_t *conn);
+
+
/**
* qdr_connection_get_tenant_space
*
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index 1fcff7c..086453c 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -205,6 +205,11 @@ static void qdr_connection_info_free(qdr_connection_info_t *ci)
}
+qdr_connection_role_t qdr_connection_role(const qdr_connection_t *conn)
+{
+ return conn->role;
+}
+
void *qdr_connection_get_context(const qdr_connection_t *conn)
{
return conn ? conn->user_context : NULL;
diff --git a/src/router_node.c b/src/router_node.c
index 959020c..5a2b593 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -1388,7 +1388,7 @@ static void CORE_link_second_attach(void *context, qdr_link_t *link, qdr_terminu
//
// All links on the inter router or edge connection have unbounded q2 limit
//
- if (qdr_conn->role == QDR_ROLE_EDGE_CONNECTION || qdr_conn->role == QDR_ROLE_INTER_ROUTER) {
+ if (qdr_connection_role(qdr_conn) == QDR_ROLE_EDGE_CONNECTION || qdr_connection_role(qdr_conn) == QDR_ROLE_INTER_ROUTER) {
qd_link_set_q2_limit_unbounded(qlink, true);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org