Repository: qpid-proton Updated Branches: refs/heads/master 38a71ffe5 -> a4e072641
NO-JIRA: [C++ binding] Change credit_topup() from member function to free function Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/18c04d65 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/18c04d65 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/18c04d65 Branch: refs/heads/master Commit: 18c04d65680ba5998c43eedcb693570c29d2a419 Parents: 38a71ff Author: Andrew Stitcher <[email protected]> Authored: Wed Mar 23 18:53:22 2016 -0400 Committer: Andrew Stitcher <[email protected]> Committed: Wed Mar 23 19:01:05 2016 -0400 ---------------------------------------------------------------------- proton-c/bindings/cpp/src/messaging_adapter.cpp | 23 ++++++++++---------- proton-c/bindings/cpp/src/messaging_adapter.hpp | 1 - 2 files changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/18c04d65/proton-c/bindings/cpp/src/messaging_adapter.cpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/messaging_adapter.cpp b/proton-c/bindings/cpp/src/messaging_adapter.cpp index 4bc21af..2822969 100644 --- a/proton-c/bindings/cpp/src/messaging_adapter.cpp +++ b/proton-c/bindings/cpp/src/messaging_adapter.cpp @@ -39,11 +39,22 @@ namespace proton { +namespace { +void credit_topup(pn_link_t *link) { + if (link && pn_link_is_receiver(link)) { + int window = link_context::get(link).credit_window; + if (window) { + int delta = window - pn_link_credit(link); + pn_link_flow(link, delta); + } + } +} +} + messaging_adapter::messaging_adapter(handler &delegate) : delegate_(delegate) {} messaging_adapter::~messaging_adapter(){} - void messaging_adapter::on_reactor_init(proton_event &pe) { messaging_event mevent(messaging_event::START, pe); delegate_.on_start(mevent); @@ -222,14 +233,4 @@ void messaging_adapter::on_timer_task(proton_event& pe) delegate_.on_timer(mevent); } -void messaging_adapter::credit_topup(pn_link_t *link) { - if (link && pn_link_is_receiver(link)) { - int window = link_context::get(link).credit_window; - if (window) { - int delta = window - pn_link_credit(link); - pn_link_flow(link, delta); - } - } -} - } http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/18c04d65/proton-c/bindings/cpp/src/messaging_adapter.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/messaging_adapter.hpp b/proton-c/bindings/cpp/src/messaging_adapter.hpp index 655efb6..1fa4172 100644 --- a/proton-c/bindings/cpp/src/messaging_adapter.hpp +++ b/proton-c/bindings/cpp/src/messaging_adapter.hpp @@ -56,7 +56,6 @@ class messaging_adapter : public proton_handler private: handler &delegate_; // The handler for generated messaging_event's - void credit_topup(pn_link_t*); }; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
