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 2016/05/17 14:07:33 UTC

qpid-dispatch git commit: DISPATCH-245 - Fixed latest round of 2 errors reported by coverity

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 8346bf37b -> bab8a2b8c


DISPATCH-245 - Fixed latest round of 2 errors reported by coverity


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

Branch: refs/heads/master
Commit: bab8a2b8c781c931495dca99e145cb9c3f1cecfe
Parents: 8346bf3
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Tue May 17 10:07:01 2016 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Tue May 17 10:07:01 2016 -0400

----------------------------------------------------------------------
 src/connection_manager.c    | 5 +++--
 src/router_core/forwarder.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bab8a2b8/src/connection_manager.c
----------------------------------------------------------------------
diff --git a/src/connection_manager.c b/src/connection_manager.c
index 459ea7f..e208246 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -149,9 +149,10 @@ static qd_error_t load_server_config(qd_dispatch_t *qd, qd_server_config_t *conf
     config->link_capacity        = qd_entity_opt_long(entity, "linkCapacity", 0);     CHECK();
     config->ssl_enabled          = has_attrs(entity, ssl_attributes, ssl_attributes_count);
     config->link_capacity        = qd_entity_opt_long(entity, "linkCapacity", 0);     CHECK();
-    config->host                 = qd_entity_opt_string(entity, "host", 0); QD_ERROR_RET();
-    if (! config->host)
+    config->host                 = qd_entity_opt_string(entity, "host", 0);           CHECK();
+    if (! config->host) {
         config->host             = qd_entity_opt_string(entity, "addr", 0);           CHECK();
+    }
     assert(config->host);
 
     //

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bab8a2b8/src/router_core/forwarder.c
----------------------------------------------------------------------
diff --git a/src/router_core/forwarder.c b/src/router_core/forwarder.c
index 35d2f55..4890e78 100644
--- a/src/router_core/forwarder.c
+++ b/src/router_core/forwarder.c
@@ -538,7 +538,7 @@ int qdr_forward_balanced_CT(qdr_core_t      *core,
         //
         // If the delivery is unsettled and the link is inter-router, account for the outstanding delivery.
         //
-        if (!in_delivery->settled && chosen_link_bit >= 0) {
+        if (in_delivery && !in_delivery->settled && chosen_link_bit >= 0) {
             addr->outstanding_deliveries[chosen_link_bit]++;
             out_delivery->tracking_addr = addr;
             addr->tracked_deliveries++;


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