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/go1 Commit: b9d64d66c2851e005279fa78f770eed75407536d Parents: 174747c Author: Chuck Rolke <[email protected]> Authored: Thu Oct 12 10:53:33 2017 -0400 Committer: Chuck Rolke <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
