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 2017/03/13 15:17:13 UTC

qpid-dispatch git commit: DISPATCH-611 - Exit, don't crash, if there is no router id specified. Patch from Ganesh Murthy This closes #148

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master d72f2278f -> 1a59f1fca


DISPATCH-611 - Exit, don't crash, if there is no router id specified.
Patch from Ganesh Murthy
This closes #148


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

Branch: refs/heads/master
Commit: 1a59f1fcab5a5e83cfb33eac9c8c273c9edd32c8
Parents: d72f227
Author: Ted Ross <tr...@redhat.com>
Authored: Mon Mar 13 11:02:09 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Mon Mar 13 11:04:26 2017 -0400

----------------------------------------------------------------------
 python/qpid_dispatch/management/qdrouter.json | 2 +-
 src/dispatch.c                                | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1a59f1fc/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index 8bd284a..035c577 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -369,7 +369,7 @@
         },
 
         "router": {
-            "description":"Tracks peer routers and computes routes to destinations.",
+            "description":"Tracks peer routers and computes routes to destinations. This entity is mandatory. The router will not start without this entity.",
             "extends": "configurationEntity",
             "singleton": true,
             "attributes": {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1a59f1fc/src/dispatch.c
----------------------------------------------------------------------
diff --git a/src/dispatch.c b/src/dispatch.c
index 6e5600d..25b1dcf 100644
--- a/src/dispatch.c
+++ b/src/dispatch.c
@@ -170,7 +170,12 @@ qd_error_t qd_dispatch_configure_router(qd_dispatch_t *qd, qd_entity_t *entity)
     if (! qd->router_id) {
         qd_dispatch_set_router_id(qd, qd_entity_opt_string(entity, "id", 0)); QD_ERROR_RET();
     }
-    assert(qd->router_id);
+    if (!qd->router_id) {
+        qd_log_source_t *router_log = qd_log_source("ROUTER");
+        qd_log(router_log, QD_LOG_CRITICAL, "Router Id not specified - process exiting");
+        exit(1);
+    }
+
     qd->router_mode = qd_entity_get_long(entity, "mode"); QD_ERROR_RET();
     qd->thread_count = qd_entity_opt_long(entity, "workerThreads", 4); QD_ERROR_RET();
 


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