You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2017/09/13 20:19:00 UTC
[2/2] qpid-dispatch git commit: DISPATCH-825: get rid of poorly
conceived EOS assert
DISPATCH-825: get rid of poorly conceived EOS assert
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/fa2a4632
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/fa2a4632
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/fa2a4632
Branch: refs/heads/master
Commit: fa2a4632db9804f574af4e4763677f11ae50c1af
Parents: b6e1066
Author: Chuck Rolke <cr...@redhat.com>
Authored: Wed Sep 13 16:11:16 2017 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Wed Sep 13 16:11:16 2017 -0400
----------------------------------------------------------------------
src/message.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fa2a4632/src/message.c
----------------------------------------------------------------------
diff --git a/src/message.c b/src/message.c
index 97cb382..6074ebb 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1155,7 +1155,7 @@ qd_message_t *qd_message_receive(pn_delivery_t *delivery)
// Loop until msg is complete, error seen, or incoming bytes are consumed
- bool recv_error = false;
+ bool recv_error_or_eos = false;
while (1) {
//
// handle EOS and clean up after pn receive errors
@@ -1163,7 +1163,7 @@ qd_message_t *qd_message_receive(pn_delivery_t *delivery)
bool at_eos = (pn_delivery_partial(delivery) == false) &&
(pn_delivery_pending(delivery) == 0);
- if (at_eos || recv_error) {
+ if (at_eos || recv_error_or_eos) {
// Message is complete
sys_mutex_lock(msg->content->lock);
{
@@ -1217,11 +1217,9 @@ qd_message_t *qd_message_receive(pn_delivery_t *delivery)
(char*) qd_buffer_cursor(msg->content->pending),
qd_buffer_capacity(msg->content->pending));
- assert (rc != PN_EOS); // Just checked for this moments ago
-
if (rc < 0) {
- // error seen. next pass breaks out of loop
- recv_error = true;
+ // error or eos seen. next pass breaks out of loop
+ recv_error_or_eos = true;
} else if (rc > 0) {
//
// We have received a positive number of bytes for the message. Advance
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org