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 2016/03/19 00:06:39 UTC

[21/50] [abbrv] qpid-dispatch git commit: DISPATCH-179 - Removed references to "label" in connectors/listeners. Use "name" instead.

DISPATCH-179 - Removed references to "label" in connectors/listeners.  Use "name" instead.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/722b0eb7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/722b0eb7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/722b0eb7

Branch: refs/heads/master
Commit: 722b0eb792d19d200ca57274522728e8e09682ff
Parents: 2eee109
Author: Ted Ross <tr...@redhat.com>
Authored: Thu Mar 10 16:20:45 2016 -0500
Committer: Ted Ross <tr...@redhat.com>
Committed: Thu Mar 10 16:20:45 2016 -0500

----------------------------------------------------------------------
 include/qpid/dispatch/server.h                |  4 ++--
 python/qpid_dispatch/management/qdrouter.json |  8 +-------
 src/connection_manager.c                      | 14 +++++++-------
 src/router_node.c                             | 10 +++++-----
 4 files changed, 15 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/722b0eb7/include/qpid/dispatch/server.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/server.h b/include/qpid/dispatch/server.h
index be9d117..e8d92b8 100644
--- a/include/qpid/dispatch/server.h
+++ b/include/qpid/dispatch/server.h
@@ -248,9 +248,9 @@ typedef struct qd_server_config_t {
     char *port;
 
     /**
-     * Connection label, used as a reference from other parts of the configuration.
+     * Connection name, used as a reference from other parts of the configuration.
      */
-    char *label;
+    char *name;
 
     /**
      * Space-separated list of SASL mechanisms to be accepted for the connection.

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/722b0eb7/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index f558ee2..038b161 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -37,12 +37,6 @@
                     "default": "normal",
                     "description": "The role of an established connection. In the normal role, the connection is assumed to be used for AMQP clients that are doing normal message delivery over the connection.  In the inter-router role, the connection is assumed to be to another router in the network.  Inter-router discovery and routing protocols can only be used over inter-router connections.",
                     "create": true
-                },
-                "label": {
-                    "type": "string",
-                    "create": true,
-                    "required": false,
-                    "description": "When the role is 'route-container', this optional label may be used to identify connections for use in routes."
                 }
             }
         },
@@ -860,7 +854,7 @@
                 },
                 "connectors": {
                     "type": "string",
-                    "description": "Comma-separated list of labels associated with the connector leading to the target containers",
+                    "description": "Comma-separated list of names associated with the connector leading to the target containers",
                     "create": true,
                     "required": false
                 },

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/722b0eb7/src/connection_manager.c
----------------------------------------------------------------------
diff --git a/src/connection_manager.c b/src/connection_manager.c
index 31e2fad..794ddee 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -79,7 +79,7 @@ static void qd_server_config_free(qd_server_config_t *cf)
     if (!cf) return;
     free(cf->host);
     free(cf->port);
-    free(cf->label);
+    free(cf->name);
     free(cf->role);
     free(cf->sasl_mechanisms);
     if (cf->ssl_enabled) {
@@ -141,7 +141,7 @@ static qd_error_t load_server_config(qd_dispatch_t *qd, qd_server_config_t *conf
     memset(config, 0, sizeof(*config));
     config->host            = qd_entity_get_string(entity, "addr"); CHECK();
     config->port            = qd_entity_get_string(entity, "port"); CHECK();
-    config->label           = qd_entity_opt_string(entity, "label", 0); CHECK();
+    config->name            = qd_entity_opt_string(entity, "name", 0); CHECK();
     config->role            = qd_entity_get_string(entity, "role"); CHECK();
     config->max_frame_size  = qd_entity_get_long(entity, "maxFrameSize"); CHECK();
     config->idle_timeout_seconds = qd_entity_get_long(entity, "idleTimeoutSeconds"); CHECK();
@@ -209,9 +209,9 @@ qd_error_t qd_dispatch_configure_connector(qd_dispatch_t *qd, qd_entity_t *entit
     DEQ_ITEM_INIT(cc);
     if (strcmp(cc->configuration.role, "route-container") == 0) {
         DEQ_INSERT_TAIL(cm->on_demand_connectors, cc);
-        qd_log(cm->log_source, QD_LOG_INFO, "Configured route-container connector: %s:%s label=%s",
+        qd_log(cm->log_source, QD_LOG_INFO, "Configured route-container connector: %s:%s name=%s",
                cc->configuration.host, cc->configuration.port,
-               cc->configuration.label ? cc->configuration.label : "<none>");
+               cc->configuration.name ? cc->configuration.name : "<none>");
     } else {
         DEQ_INSERT_TAIL(cm->config_connectors, cc);
         qd_log(cm->log_source, QD_LOG_INFO, "Configured Connector: %s:%s role=%s",
@@ -294,7 +294,7 @@ qd_config_connector_t *qd_connection_manager_find_on_demand(qd_dispatch_t *qd, c
     qd_config_connector_t *cc = DEQ_HEAD(qd->connection_manager->on_demand_connectors);
 
     while (cc) {
-        if (strcmp(cc->configuration.label, name) == 0)
+        if (strcmp(cc->configuration.name, name) == 0)
             break;
         cc = DEQ_NEXT(cc);
     }
@@ -320,7 +320,7 @@ void qd_connection_manager_start_on_demand(qd_dispatch_t *qd, qd_config_connecto
 {
     if (cc && cc->connector == 0) {
         qd_log(qd->connection_manager->log_source, QD_LOG_INFO, "Starting on-demand connector: %s",
-               cc->configuration.label);
+               cc->configuration.name);
         cc->connector = qd_server_connect(qd, &cc->configuration, cc);
     }
 }
@@ -345,7 +345,7 @@ void qd_config_connector_set_context(qd_config_connector_t *cc, void *context)
 
 const char *qd_config_connector_name(qd_config_connector_t *cc)
 {
-    return cc ? cc->configuration.label : 0;
+    return cc ? cc->configuration.name : 0;
 }
 
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/722b0eb7/src/router_node.c
----------------------------------------------------------------------
diff --git a/src/router_node.c b/src/router_node.c
index 100e204..5d70cb9 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -44,7 +44,7 @@ static char *node_id;
  */
 static void qd_router_connection_get_config(const qd_connection_t  *conn,
                                             qdr_connection_role_t  *role,
-                                            const char            **label,
+                                            const char            **name,
                                             bool                   *strip_annotations_in,
                                             bool                   *strip_annotations_out)
 {
@@ -64,7 +64,7 @@ static void qd_router_connection_get_config(const qd_connection_t  *conn,
         else
             *role = QDR_ROLE_NORMAL;
 
-        *label = cf->label;
+        *name = cf->name;
     }
 }
 
@@ -455,13 +455,13 @@ static void router_opened_handler(qd_router_t *router, qd_connection_t *conn, bo
     qdr_connection_role_t  role;
     bool                   strip_annotations_in;
     bool                   strip_annotations_out;
-    const char            *label;
+    const char            *name;
     pn_connection_t       *pn_conn = qd_connection_pn(conn);
 
-    qd_router_connection_get_config(conn, &role, &label,
+    qd_router_connection_get_config(conn, &role, &name,
                                     &strip_annotations_in, &strip_annotations_out);
 
-    qdr_connection_t *qdrc = qdr_connection_opened(router->router_core, inbound, role, label,
+    qdr_connection_t *qdrc = qdr_connection_opened(router->router_core, inbound, role, name,
                                                    pn_connection_remote_container(pn_conn),
                                                    strip_annotations_in, strip_annotations_out);
 


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