You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2015/01/30 18:09:50 UTC

svn commit: r1656060 - in /qpid/dispatch/trunk: src/router_agent.c tools/qdstat

Author: tross
Date: Fri Jan 30 17:09:49 2015
New Revision: 1656060

URL: http://svn.apache.org/r1656060
Log:
DISPATCH-6 - Updated qdstat to properly handle link-route prefix addresses

Modified:
    qpid/dispatch/trunk/src/router_agent.c
    qpid/dispatch/trunk/tools/qdstat

Modified: qpid/dispatch/trunk/src/router_agent.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_agent.c?rev=1656060&r1=1656059&r2=1656060&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_agent.c (original)
+++ qpid/dispatch/trunk/src/router_agent.c Fri Jan 30 17:09:49 2015
@@ -61,9 +61,12 @@ static const char *address_router_id(qd_
 }
 
 qd_error_t qd_entity_refresh_router_address(qd_entity_t* entity, void *impl) {
-    qd_address_t *addr = (qd_address_t*) impl;
+    qd_address_t *addr     = (qd_address_t*) impl;
+    uint32_t      subCount = DEQ_SIZE(addr->rlinks);
+    if (DEQ_SIZE(addr->lrps) > 0)
+        subCount = DEQ_SIZE(addr->lrps);
     if (qd_entity_set_bool(entity, "inProcess", addr->handler != 0) == 0 &&
-        qd_entity_set_long(entity, "subscriberCount", DEQ_SIZE(addr->rlinks)) == 0 &&
+        qd_entity_set_long(entity, "subscriberCount", subCount) == 0 &&
         qd_entity_set_long(entity, "remoteCount", DEQ_SIZE(addr->rnodes)) == 0 &&
         qd_entity_set_long(entity, "deliveriesIngress", addr->deliveries_ingress) == 0 &&
         qd_entity_set_long(entity, "deliveriesEgress", addr->deliveries_egress) == 0 &&

Modified: qpid/dispatch/trunk/tools/qdstat
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tools/qdstat?rev=1656060&r1=1656059&r2=1656060&view=diff
==============================================================================
--- qpid/dispatch/trunk/tools/qdstat (original)
+++ qpid/dispatch/trunk/tools/qdstat Fri Jan 30 17:09:49 2015
@@ -117,6 +117,7 @@ class BusManager(Node):
         if addr[0] == 'R' : return "router"
         if addr[0] == 'A' : return "area"
         if addr[0] == 'L' : return "local"
+        if addr[0] == 'C' : return "link-route"
         return "unknown: %s" % addr[0]
 
     def _addr_text(self, addr):



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