Commit 951034541828097f01346125a3947e58386abbf0
1 parent
360ce571
Exists in
master
and in
1 other branch
Fixing action object.
Showing
3 changed files
with
9 additions
and
7 deletions
Show diff stats
client/src/include/lib3270/ipc/action.h
... | ... | @@ -54,7 +54,8 @@ |
54 | 54 | |
55 | 55 | public: |
56 | 56 | virtual bool activatable() const noexcept = 0; |
57 | - virtual void activate(time_t seconds = 0) = 0; | |
57 | + virtual void activate() = 0; | |
58 | + virtual void wait(time_t seconds = 0) = 0; | |
58 | 59 | virtual ~Action(); |
59 | 60 | |
60 | 61 | inline operator bool() const noexcept { | ... | ... |
client/src/session/local/actions.cc
... | ... | @@ -55,16 +55,16 @@ |
55 | 55 | return lib3270_action_is_activatable(this->descriptor,this->session->hSession); |
56 | 56 | } |
57 | 57 | |
58 | - void Local::Action::activate(time_t seconds) { | |
58 | + void Local::Action::activate() { | |
59 | 59 | std::lock_guard<std::mutex> lock(this->session->sync); |
60 | 60 | |
61 | - debug(__FUNCTION__,"(",(void *) descriptor,")"); | |
62 | - | |
63 | 61 | chkResponse(lib3270_action_activate(this->descriptor,this->session->hSession)); |
64 | 62 | |
65 | - if(seconds) | |
66 | - chkResponse(lib3270_wait_for_ready(this->session->hSession,seconds)); | |
63 | + } | |
67 | 64 | |
65 | + void Local::Action::wait(time_t seconds) { | |
66 | + std::lock_guard<std::mutex> lock(this->session->sync); | |
67 | + chkResponse(lib3270_wait_for_ready(this->session->hSession,seconds)); | |
68 | 68 | } |
69 | 69 | |
70 | 70 | TN3270::Action * Local::Session::getAction(const LIB3270_ACTION *descriptor) { | ... | ... |
client/src/session/local/private.h
... | ... | @@ -63,7 +63,8 @@ |
63 | 63 | public: |
64 | 64 | Action(Session *hSession, const LIB3270_ACTION *descriptor); |
65 | 65 | bool activatable() const noexcept override; |
66 | - void activate(time_t seconds) override; | |
66 | + void activate() override; | |
67 | + void wait(time_t seconds) override; | |
67 | 68 | |
68 | 69 | }; |
69 | 70 | ... | ... |