Commit 0437c17825248a389c6ae60f4ccc0d6c9a2ea96a

Authored by Perry Werneck
1 parent 469987e5
Exists in master and in 1 other branch develop

Fixing bug in action object.

client/src/core/actions.cc
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
36 * 36 *
37 */ 37 */
38 38
  39 + #include <ipc-client-internals.h>
39 #include <lib3270/ipc.h> 40 #include <lib3270/ipc.h>
40 #include <lib3270/toggle.h> 41 #include <lib3270/toggle.h>
41 #include <lib3270/properties.h> 42 #include <lib3270/properties.h>
@@ -44,6 +45,7 @@ @@ -44,6 +45,7 @@
44 /*---[ Implement ]----------------------------------------------------------------------------------*/ 45 /*---[ Implement ]----------------------------------------------------------------------------------*/
45 46
46 TN3270::Action::Action(const LIB3270_ACTION *descriptor) { 47 TN3270::Action::Action(const LIB3270_ACTION *descriptor) {
  48 + debug(__FUNCTION__,"(",(void *) descriptor,",",descriptor->name,",",descriptor->summary,")");
47 this->descriptor = descriptor; 49 this->descriptor = descriptor;
48 } 50 }
49 51
@@ -51,10 +53,12 @@ @@ -51,10 +53,12 @@
51 } 53 }
52 54
53 const char * TN3270::Action::getDescription() const noexcept { 55 const char * TN3270::Action::getDescription() const noexcept {
  56 + debug(__FUNCTION__,"(",(void *) descriptor,")");
54 return lib3270_property_get_description((const LIB3270_PROPERTY *) this->descriptor); 57 return lib3270_property_get_description((const LIB3270_PROPERTY *) this->descriptor);
55 } 58 }
56 59
57 const char * TN3270::Action::getSummary() const noexcept { 60 const char * TN3270::Action::getSummary() const noexcept {
  61 + debug(__FUNCTION__,"(",(void *) descriptor,")");
58 return lib3270_property_get_summary((const LIB3270_PROPERTY *) this->descriptor); 62 return lib3270_property_get_summary((const LIB3270_PROPERTY *) this->descriptor);
59 } 63 }
60 64
client/src/session/local/actions.cc
@@ -45,16 +45,19 @@ @@ -45,16 +45,19 @@
45 namespace TN3270 { 45 namespace TN3270 {
46 46
47 Local::Action::Action(Session *session, const LIB3270_ACTION *descriptor) : TN3270::Action(descriptor) { 47 Local::Action::Action(Session *session, const LIB3270_ACTION *descriptor) : TN3270::Action(descriptor) {
  48 + debug(__FUNCTION__,"(",(void *) descriptor,")");
48 this->session = session; 49 this->session = session;
49 } 50 }
50 51
51 bool Local::Action::activatable() const noexcept { 52 bool Local::Action::activatable() const noexcept {
52 std::lock_guard<std::mutex> lock(this->session->sync); 53 std::lock_guard<std::mutex> lock(this->session->sync);
  54 + debug(__FUNCTION__,"(",(void *) descriptor,")");
53 return lib3270_action_is_activatable(this->descriptor,this->session->hSession); 55 return lib3270_action_is_activatable(this->descriptor,this->session->hSession);
54 } 56 }
55 57
56 void Local::Action::activate() { 58 void Local::Action::activate() {
57 std::lock_guard<std::mutex> lock(this->session->sync); 59 std::lock_guard<std::mutex> lock(this->session->sync);
  60 + debug(__FUNCTION__,"(",(void *) descriptor,")");
58 chkResponse(lib3270_action_activate(this->descriptor,this->session->hSession)); 61 chkResponse(lib3270_action_activate(this->descriptor,this->session->hSession));
59 } 62 }
60 63
client/src/session/local/private.h
@@ -59,7 +59,6 @@ @@ -59,7 +59,6 @@
59 class Action : public TN3270::Action { 59 class Action : public TN3270::Action {
60 private: 60 private:
61 Session *session; 61 Session *session;
62 - const LIB3270_ACTION *descriptor;  
63 62
64 public: 63 public:
65 Action(Session *hSession, const LIB3270_ACTION *descriptor); 64 Action(Session *hSession, const LIB3270_ACTION *descriptor);