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/10/04 14:48:45 UTC
[1/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
181418 (Unreachable code removed)
Repository: qpid-dispatch
Updated Branches:
refs/heads/master e69478a4e -> 3f5c3aa9c
DISPATCH-847 - Fixed Coverity issue 181418 (Unreachable code removed)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/9556f587
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/9556f587
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/9556f587
Branch: refs/heads/master
Commit: 9556f5871545bac99594d31acf0257cc24a9f809
Parents: e69478a
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 09:39:05 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 09:39:05 2017 -0400
----------------------------------------------------------------------
src/router_core/transfer.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9556f587/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index ac8044d..e4cbaae 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -129,16 +129,16 @@ qdr_delivery_t *qdr_deliver_continue(qdr_delivery_t *in_dlv)
int qdr_link_process_deliveries(qdr_core_t *core, qdr_link_t *link, int credit)
{
+ printf("qdr_link_process_deliveries - credit: %d\n", credit);
qdr_connection_t *conn = link->conn;
qdr_delivery_t *dlv;
- bool drained = false;
int offer = -1;
bool settled = false;
bool send_complete = false;
int num_deliveries_completed = 0;
if (link->link_direction == QD_OUTGOING) {
- while (credit > 0 && !drained) {
+ while (credit > 0) {
sys_mutex_lock(conn->work_lock);
dlv = DEQ_HEAD(link->undelivered);
sys_mutex_unlock(conn->work_lock);
@@ -176,27 +176,27 @@ int qdr_link_process_deliveries(qdr_core_t *core, qdr_link_t *link, int credit)
//
// The message is still being received/sent.
// 1. We cannot remove the delivery from the undelivered list.
- // This delivery needs to stay at the head of the undelivered list until the entire message has been sent out i.e other deliveries in the
- // undelivered list have to wait before this entire large delivery is sent out
+ // This delivery needs to stay at the head of the undelivered list until the entire message
+ // has been sent out i.e other deliveries in the undelivered list have to wait before this
+ // entire large delivery is sent out
// 2. We need to call deliver_handler so any newly arrived bytes can be pushed out
- // 3. We need to break out of this loop otherwise a thread will keep spinning in here until the entire message has been sent out.
+ // 3. We need to break out of this loop otherwise a thread will keep spinning in here until
+ // the entire message has been sent out.
//
sys_mutex_unlock(conn->work_lock);
//
- // Note here that we are not incrementing num_deliveries_processed. Since this delivery is still coming in or still being sent out,
- // we cannot consider this delivery as fully processed.
+ // Note here that we are not incrementing num_deliveries_processed. Since this delivery is
+ // still coming in or still being sent out, we cannot consider this delivery as fully processed.
//
return num_deliveries_completed;
}
sys_mutex_unlock(conn->work_lock);
-
- }
+ } else
+ break;
}
- if (drained)
- core->drained_handler(core->user_context, link);
- else if (offer != -1)
+ if (offer != -1)
core->offer_handler(core->user_context, link, offer);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[3/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
181416 (Use after free)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 181416 (Use after free)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/f293015b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/f293015b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/f293015b
Branch: refs/heads/master
Commit: f293015b3f3a41a1791fe39a500bd1d5e43461f1
Parents: d0dcac4
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 09:59:40 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 09:59:40 2017 -0400
----------------------------------------------------------------------
src/router_core/transfer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f293015b/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index 373e439..dcd7563 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -1108,8 +1108,8 @@ static void qdr_deliver_continue_CT(qdr_core_t *core, qdr_action_t *action, bool
// Remove the delivery from the settled list and decref the in_dlv.
in_dlv->where = QDR_DELIVERY_NOWHERE;
- qdr_delivery_decref_CT(core, in_dlv); // This decref is for removing the delivery from the settled list.
DEQ_REMOVE(in_dlv->link->settled, in_dlv);
+ qdr_delivery_decref_CT(core, in_dlv); // This decref is for removing the delivery from the settled list.
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[9/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
126591 (Improper omission of brackets)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 126591 (Improper omission of brackets)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/3f5c3aa9
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/3f5c3aa9
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/3f5c3aa9
Branch: refs/heads/master
Commit: 3f5c3aa9cf5369f2259886ae262e6486487fea24
Parents: abc1db8
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 10:42:34 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 10:42:34 2017 -0400
----------------------------------------------------------------------
src/connection_manager.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3f5c3aa9/src/connection_manager.c
----------------------------------------------------------------------
diff --git a/src/connection_manager.c b/src/connection_manager.c
index 9a9d61d..40db56a 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -309,8 +309,9 @@ static qd_error_t load_server_config(qd_dispatch_t *qd, qd_server_config_t *conf
config->max_sessions = qd_entity_get_long(entity, "maxSessions"); CHECK();
uint64_t ssn_frames = qd_entity_opt_long(entity, "maxSessionFrames", 0); CHECK();
config->idle_timeout_seconds = qd_entity_get_long(entity, "idleTimeoutSeconds"); CHECK();
- if (is_listener)
+ if (is_listener) {
config->initial_handshake_timeout_seconds = qd_entity_get_long(entity, "initialHandshakeTimeoutSeconds"); CHECK();
+ }
config->sasl_username = qd_entity_opt_string(entity, "saslUsername", 0); CHECK();
config->sasl_password = qd_entity_opt_string(entity, "saslPassword", 0); CHECK();
config->sasl_mechanisms = qd_entity_opt_string(entity, "saslMechanisms", 0); CHECK();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
181417 (Use after free)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 181417 (Use after free)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/d0dcac4d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/d0dcac4d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/d0dcac4d
Branch: refs/heads/master
Commit: d0dcac4d9dd76f959b74fb8b17d4cef54bb2f1d5
Parents: 9556f58
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 09:50:57 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 09:50:57 2017 -0400
----------------------------------------------------------------------
src/router_core/transfer.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d0dcac4d/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index e4cbaae..373e439 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -576,19 +576,19 @@ void qdr_delivery_unlink_peers_CT(qdr_core_t *core, qdr_delivery_t *dlv, qdr_del
// The dlv has more than one peer. We are going to find the peer of dlv that match with the passed in peer
// and delete that peer.
//
- qdr_delivery_ref_t *dlv_ref = DEQ_HEAD(dlv->peers);
- while (dlv_ref) {
- qdr_delivery_t * peer_dlv = dlv_ref->dlv;
+ qdr_delivery_ref_t *peer_ref = DEQ_HEAD(dlv->peers);
+ while (peer_ref) {
+ qdr_delivery_t *peer_dlv = peer_ref->dlv;
if (peer_dlv == peer) {
- if (peer->peer) {
+ qdr_del_delivery_ref(&dlv->peers, peer_ref);
+ if (peer->peer == dlv) {
peer->peer = 0;
qdr_delivery_decref_CT(core, dlv);
}
- qdr_del_delivery_ref(&dlv->peers, dlv_ref);
qdr_delivery_decref_CT(core, peer);
break;
}
- dlv_ref = DEQ_NEXT(dlv_ref);
+ peer_ref = DEQ_NEXT(peer_ref);
}
}
}
@@ -606,13 +606,13 @@ qdr_delivery_t *qdr_delivery_first_peer_CT(qdr_delivery_t *dlv)
}
else {
// The delivery has more than one peer.
- qdr_delivery_ref_t *dlv_ref = DEQ_HEAD(dlv->peers);
+ qdr_delivery_ref_t *peer_ref = DEQ_HEAD(dlv->peers);
// Save the next peer to dlv->next_peer_ref so we can use it when somebody calls qdr_delivery_next_peer_CT
- dlv->next_peer_ref = DEQ_NEXT(dlv_ref);
+ dlv->next_peer_ref = DEQ_NEXT(peer_ref);
// Return the first peer.
- return dlv_ref->dlv;
+ return peer_ref->dlv;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[4/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
181413 (Null-check after dereference)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 181413 (Null-check after dereference)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/938cdfaf
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/938cdfaf
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/938cdfaf
Branch: refs/heads/master
Commit: 938cdfafa291388d9fc29e8050bb3723ca742d35
Parents: f293015
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 10:03:48 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 10:03:48 2017 -0400
----------------------------------------------------------------------
src/router_core/transfer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/938cdfaf/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index dcd7563..baaec53 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -1072,7 +1072,6 @@ static void qdr_deliver_continue_CT(qdr_core_t *core, qdr_action_t *action, bool
qdr_deliver_continue_peers_CT(core, in_dlv);
-
if (qd_message_receive_complete(qdr_delivery_message(in_dlv))) {
//
// The entire message has now been received. Check to see if there are in process subscriptions that need to
@@ -1081,7 +1080,7 @@ static void qdr_deliver_continue_CT(qdr_core_t *core, qdr_action_t *action, bool
qdr_subscription_t *sub = DEQ_HEAD(in_dlv->subscriptions);
while (sub) {
DEQ_REMOVE_HEAD(in_dlv->subscriptions);
- qdr_forward_on_message_CT(core, sub, in_dlv ? in_dlv->link : 0, in_dlv->msg);
+ qdr_forward_on_message_CT(core, sub, in_dlv->link, in_dlv->msg);
sub = DEQ_HEAD(in_dlv->subscriptions);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[8/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
162685 (Dereference null pointer)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 162685 (Dereference null pointer)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/abc1db84
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/abc1db84
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/abc1db84
Branch: refs/heads/master
Commit: abc1db841855f4758de3d4d93352e1638151a956
Parents: eb877c8
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 10:38:04 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 10:38:04 2017 -0400
----------------------------------------------------------------------
src/container.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/abc1db84/src/container.c
----------------------------------------------------------------------
diff --git a/src/container.c b/src/container.c
index c44d397..d6b7ced 100644
--- a/src/container.c
+++ b/src/container.c
@@ -323,7 +323,11 @@ static void writable_handler(qd_container_t *container, pn_connection_t *conn, q
void qd_container_handle_event(qd_container_t *container, pn_event_t *event)
{
pn_connection_t *conn = pn_event_connection(event);
- qd_connection_t *qd_conn = conn ? pn_connection_get_context(conn) : NULL;
+
+ if (!conn)
+ return;
+
+ qd_connection_t *qd_conn = pn_connection_get_context(conn);
pn_session_t *ssn = NULL;
pn_link_t *pn_link = NULL;
qd_link_t *qd_link = NULL;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[6/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
162698 (Memory leak)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 162698 (Memory leak)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/d55ef962
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/d55ef962
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/d55ef962
Branch: refs/heads/master
Commit: d55ef962d7f6c8e8eacb051b5381c39884b2aef8
Parents: 0ed04a2
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 10:18:51 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 10:18:51 2017 -0400
----------------------------------------------------------------------
src/parse.c | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d55ef962/src/parse.c
----------------------------------------------------------------------
diff --git a/src/parse.c b/src/parse.c
index c19455d..b0685fb 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -228,6 +228,7 @@ const char *qd_parse_turbo(qd_iterator_t *iter,
parse_error = get_type_info(iter, &turbo->tag, &turbo->size, &turbo->count,
&turbo->length_of_size, &turbo->length_of_count);
if (parse_error) {
+ free_qd_parsed_turbo_t(turbo);
return parse_error;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[5/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
162701 (Dereference null pointer)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 162701 (Dereference null pointer)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/0ed04a2c
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/0ed04a2c
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/0ed04a2c
Branch: refs/heads/master
Commit: 0ed04a2c335b59b580e35943d02b8112d0540ea2
Parents: 938cdfa
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 10:15:30 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 10:15:30 2017 -0400
----------------------------------------------------------------------
src/server.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/0ed04a2c/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index 5f9a51e..e9cdcc3 100644
--- a/src/server.c
+++ b/src/server.c
@@ -665,6 +665,9 @@ static void on_connection_bound(qd_server_t *server, pn_event_t *e) {
static void invoke_deferred_calls(qd_connection_t *conn, bool discard)
{
+ if (!conn)
+ return;
+
// Lock access to deferred_calls, other threads may concurrently add to it. Invoke
// the calls outside of the critical section.
//
@@ -822,7 +825,7 @@ static bool handle(qd_server_t *qd_server, pn_event_t *e) {
qdr_handle_authentication_service_connection_event(e);
return true;
}
- qd_connection_t *ctx = pn_conn ? (qd_connection_t*) pn_connection_get_context(pn_conn) : NULL;
+ qd_connection_t *ctx = pn_conn ? (qd_connection_t*) pn_connection_get_context(pn_conn) : NULL;
switch (pn_event_type(e)) {
@@ -857,9 +860,9 @@ static bool handle(qd_server_t *qd_server, pn_event_t *e) {
case PN_CONNECTION_REMOTE_OPEN:
// If we are transitioning to the open state, notify the client via callback.
- if (ctx->timer)
+ if (ctx && ctx->timer)
qd_timer_free(ctx->timer);
- if (!ctx->opened) {
+ if (ctx && !ctx->opened) {
ctx->opened = true;
if (ctx->connector) {
ctx->connector->delay = 2000; // Delay re-connect in case there is a recurring error
@@ -1235,6 +1238,9 @@ const qd_server_config_t *qd_connection_config(const qd_connection_t *conn)
void qd_connection_invoke_deferred(qd_connection_t *conn, qd_deferred_t call, void *context)
{
+ if (!conn)
+ return;
+
qd_deferred_call_t *dc = new_qd_deferred_call_t();
DEQ_ITEM_INIT(dc);
dc->call = call;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[7/9] qpid-dispatch git commit: DISPATCH-847 - Fixed Coverity issue
162688 (Null check after dereference)
Posted by tr...@apache.org.
DISPATCH-847 - Fixed Coverity issue 162688 (Null check after dereference)
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/eb877c8b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/eb877c8b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/eb877c8b
Branch: refs/heads/master
Commit: eb877c8b246ce7807b3636a79a050eef41c565c2
Parents: d55ef96
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Oct 4 10:27:46 2017 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Oct 4 10:27:46 2017 -0400
----------------------------------------------------------------------
src/server.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/eb877c8b/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index e9cdcc3..1c4478b 100644
--- a/src/server.c
+++ b/src/server.c
@@ -771,8 +771,7 @@ void qd_connection_free(qd_connection_t *ctx)
}
invoke_deferred_calls(ctx, true); // Discard any pending deferred calls
- if (ctx->deferred_call_lock)
- sys_mutex_free(ctx->deferred_call_lock);
+ sys_mutex_free(ctx->deferred_call_lock);
if (ctx->policy_settings) {
if (ctx->policy_settings->sources)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org