Commit d0febb8e755006d73b892c274737883f9c8dd44e

Authored by Perry Werneck
1 parent 01ac0daf
Exists in master and in 1 other branch develop

Fixing conflict with the latest lib3270.

client/src/include/lib3270/ipc.h
... ... @@ -113,16 +113,16 @@
113 113 *
114 114 */
115 115 template<typename T>
116   - class lib3270_auto_cleanup {
  116 + class lib3270_ptr {
117 117 private:
118 118 T *data;
119 119  
120 120 public:
121   - lib3270_auto_cleanup(T *data) {
  121 + lib3270_ptr(T *data) {
122 122 this->data = data;
123 123 }
124 124  
125   - ~lib3270_auto_cleanup() {
  125 + ~lib3270_ptr() {
126 126 lib3270_free((void *) this->data);
127 127 }
128 128  
... ...
client/src/session/local/get.cc
... ... @@ -46,7 +46,7 @@
46 46  
47 47 std::lock_guard<std::recursive_mutex> lock(const_cast<Local::Session *>(this)->sync);
48 48  
49   - lib3270_auto_cleanup<char> text = lib3270_get_string_at_address(hSession, 0, -1, '\n');
  49 + lib3270_ptr<char> text = lib3270_get_string_at_address(hSession, 0, -1, '\n');
50 50  
51 51 if(!text) {
52 52 throw std::runtime_error( _("Can't get screen contents") );
... ... @@ -59,7 +59,7 @@
59 59  
60 60 std::lock_guard<std::recursive_mutex> lock(const_cast<Local::Session *>(this)->sync);
61 61  
62   - lib3270_auto_cleanup<char> text = lib3270_get_string_at_address(hSession, baddr, len, lf);
  62 + lib3270_ptr<char> text = lib3270_get_string_at_address(hSession, baddr, len, lf);
63 63  
64 64 if(!text) {
65 65 throw std::runtime_error( _("Can't get screen contents") );
... ... @@ -72,7 +72,7 @@
72 72  
73 73 std::lock_guard<std::recursive_mutex> lock(const_cast<Local::Session *>(this)->sync);
74 74  
75   - lib3270_auto_cleanup<char> text = lib3270_get_string_at(hSession, row, col, len, lf);
  75 + lib3270_ptr<char> text = lib3270_get_string_at(hSession, row, col, len, lf);
76 76  
77 77 if(!text) {
78 78 throw std::runtime_error( _("Can't get screen contents") );
... ...