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/10/12 14:53:41 UTC

qpid-proton git commit: PROTON-1625: flush received data from aborted messages

Repository: qpid-proton
Updated Branches:
  refs/heads/master 174747c03 -> b9d64d66c


PROTON-1625: flush received data from aborted messages


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

Branch: refs/heads/master
Commit: b9d64d66c2851e005279fa78f770eed75407536d
Parents: 174747c
Author: Chuck Rolke <cr...@redhat.com>
Authored: Thu Oct 12 10:53:33 2017 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Thu Oct 12 10:53:33 2017 -0400

----------------------------------------------------------------------
 examples/c/receive.c | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b9d64d66/examples/c/receive.c
----------------------------------------------------------------------
diff --git a/examples/c/receive.c b/examples/c/receive.c
index e77ef27..2a50166 100644
--- a/examples/c/receive.c
+++ b/examples/c/receive.c
@@ -109,6 +109,7 @@ static bool handle(app_data_t* app, pn_event_t* event) {
          m->size = 0;           /* Forget the data we accumulated */
          pn_delivery_settle(d); /* Free the delivery so we can receive the next message */
          pn_link_flow(l, 1);    /* Replace credit for aborted message */
+         *m = pn_rwbytes_null;  /* Reset the buffer for the next message*/
        } else if (recv < 0 && recv != PN_EOS) {        /* Unexpected error */
          pn_condition_format(pn_link_condition(l), "broker", "PN_DELIVERY error: %s", pn_code(recv));
          pn_link_close(l);               /* Unexpected error, close the link */


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