Commit e91b1c1407aca4d1e9490727c405dd0e67ba8dbb

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

Updating keyboard lock calls.

client/src/core/linux/request.cc
... ... @@ -144,6 +144,51 @@
144 144 return *this;
145 145 }
146 146  
  147 + static int getUIntValue(DBusMessageIter &iter) {
  148 +
  149 + if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT32) {
  150 +
  151 + dbus_uint32_t rc = 0;
  152 + dbus_message_iter_get_basic(&iter, &rc);
  153 + return (int) rc;
  154 +
  155 + } else if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT16) {
  156 +
  157 + dbus_uint16_t rc = 0;
  158 + dbus_message_iter_get_basic(&iter, &rc);
  159 + return (int) rc;
  160 +
  161 + } else if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_VARIANT) {
  162 +
  163 + DBusMessageIter sub;
  164 + int current_type;
  165 +
  166 + dbus_message_iter_recurse(&iter, &sub);
  167 +
  168 + while ((current_type = dbus_message_iter_get_arg_type(&sub)) != DBUS_TYPE_INVALID) {
  169 +
  170 + if (current_type == DBUS_TYPE_UINT32) {
  171 +
  172 + dbus_uint32_t rc = 0;
  173 + dbus_message_iter_get_basic(&sub, &rc);
  174 + return (int) rc;
  175 +
  176 + } else if (current_type == DBUS_TYPE_UINT16) {
  177 + dbus_uint16_t rc = 0;
  178 + dbus_message_iter_get_basic(&sub, &rc);
  179 + return (int) rc;
  180 +
  181 + }
  182 + dbus_message_iter_next(&sub);
  183 + }
  184 +
  185 + }
  186 +
  187 + debug("Argument type is ", ((char) dbus_message_iter_get_arg_type(&iter)) );
  188 + throw std::runtime_error("Expected an integer data type");
  189 +
  190 + }
  191 +
147 192 static int getIntValue(DBusMessageIter &iter) {
148 193  
149 194 if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_INT32) {
... ... @@ -199,6 +244,16 @@
199 244  
200 245 }
201 246  
  247 + IPC::Request & IPC::Request::Request::pop(unsigned int &value) {
  248 +
  249 + value = getUIntValue(msg.iter);
  250 + dbus_message_iter_next(&msg.iter);
  251 + debug(__FUNCTION__,"= \"",value,"\"");
  252 +
  253 + return *this;
  254 +
  255 + }
  256 +
202 257 }
203 258  
204 259  
... ...
client/src/core/session.cc
... ... @@ -81,7 +81,7 @@
81 81 // Wait for unlock, ignore errors.
82 82 sz = (size_t) (ptr-text);
83 83 if(sz) {
84   - if( (rc = waitForUnlock()) != 0) {
  84 + if( (rc = waitForKeyboardUnlock()) != 0) {
85 85 return rc;
86 86 }
87 87 push(text,sz);
... ... @@ -94,7 +94,7 @@
94 94  
95 95 case 'E': // Enter
96 96 push(ENTER);
97   - rc = waitForUnlock();
  97 + rc = waitForKeyboardUnlock();
98 98 break;
99 99  
100 100 case 'F': // Erase EOF
... ... @@ -103,122 +103,122 @@
103 103  
104 104 case '1': // PF1
105 105 push(PF_1);
106   - rc = waitForUnlock();
  106 + rc = waitForKeyboardUnlock();
107 107 break;
108 108  
109 109 case '2': // PF2
110 110 push(PF_2);
111   - rc = waitForUnlock();
  111 + rc = waitForKeyboardUnlock();
112 112 break;
113 113  
114 114 case '3': // PF3
115 115 push(PF_3);
116   - rc = waitForUnlock();
  116 + rc = waitForKeyboardUnlock();
117 117 break;
118 118  
119 119 case '4': // PF4
120 120 push(PF_4);
121   - rc = waitForUnlock();
  121 + rc = waitForKeyboardUnlock();
122 122 break;
123 123  
124 124 case '5': // PF5
125 125 push(PF_5);
126   - rc = waitForUnlock();
  126 + rc = waitForKeyboardUnlock();
127 127 break;
128 128  
129 129 case '6': // PF6
130 130 push(PF_6);
131   - rc = waitForUnlock();
  131 + rc = waitForKeyboardUnlock();
132 132 break;
133 133  
134 134 case '7': // PF7
135 135 push(PF_7);
136   - rc = waitForUnlock();
  136 + rc = waitForKeyboardUnlock();
137 137 break;
138 138  
139 139 case '8': // PF8
140 140 push(PF_8);
141   - rc = waitForUnlock();
  141 + rc = waitForKeyboardUnlock();
142 142 break;
143 143  
144 144 case '9': // PF9
145 145 push(PF_9);
146   - rc = waitForUnlock();
  146 + rc = waitForKeyboardUnlock();
147 147 break;
148 148  
149 149 case 'a': // PF10
150 150 push(PF_10);
151   - rc = waitForUnlock();
  151 + rc = waitForKeyboardUnlock();
152 152 break;
153 153  
154 154 case 'b': // PF11
155 155 push(PF_11);
156   - rc = waitForUnlock();
  156 + rc = waitForKeyboardUnlock();
157 157 break;
158 158  
159 159 case 'c': // PF12
160 160 push(PF_12);
161   - rc = waitForUnlock();
  161 + rc = waitForKeyboardUnlock();
162 162 break;
163 163  
164 164 case 'd': // PF13
165 165 push(PF_13);
166   - rc = waitForUnlock();
  166 + rc = waitForKeyboardUnlock();
167 167 break;
168 168  
169 169 case 'e': // PF14
170 170 push(PF_14);
171   - rc = waitForUnlock();
  171 + rc = waitForKeyboardUnlock();
172 172 break;
173 173  
174 174 case 'f': // PF15
175 175 push(PF_15);
176   - rc = waitForUnlock();
  176 + rc = waitForKeyboardUnlock();
177 177 break;
178 178  
179 179 case 'g': // PF16
180 180 push(PF_16);
181   - rc = waitForUnlock();
  181 + rc = waitForKeyboardUnlock();
182 182 break;
183 183  
184 184 case 'h': // PF17
185 185 push(PF_17);
186   - rc = waitForUnlock();
  186 + rc = waitForKeyboardUnlock();
187 187 break;
188 188  
189 189 case 'i': // PF18
190 190 push(PF_18);
191   - rc = waitForUnlock();
  191 + rc = waitForKeyboardUnlock();
192 192 break;
193 193  
194 194 case 'j': // PF19
195 195 push(PF_19);
196   - rc = waitForUnlock();
  196 + rc = waitForKeyboardUnlock();
197 197 break;
198 198  
199 199 case 'k': // PF20
200 200 push(PF_20);
201   - rc = waitForUnlock();
  201 + rc = waitForKeyboardUnlock();
202 202 break;
203 203  
204 204 case 'l': // PF21
205 205 push(PF_21);
206   - rc = waitForUnlock();
  206 + rc = waitForKeyboardUnlock();
207 207 break;
208 208  
209 209 case 'm': // PF22
210 210 push(PF_22);
211   - rc = waitForUnlock();
  211 + rc = waitForKeyboardUnlock();
212 212 break;
213 213  
214 214 case 'n': // PF23
215 215 push(PF_23);
216   - rc = waitForUnlock();
  216 + rc = waitForKeyboardUnlock();
217 217 break;
218 218  
219 219 case 'o': // PF24
220 220 push(PF_24);
221   - rc = waitForUnlock();
  221 + rc = waitForKeyboardUnlock();
222 222 break;
223 223  
224 224 case '@': // Send '@' character
... ... @@ -227,17 +227,17 @@
227 227  
228 228 case 'x': // PA1
229 229 push(PA_1);
230   - rc = waitForUnlock();
  230 + rc = waitForKeyboardUnlock();
231 231 break;
232 232  
233 233 case 'y': // PA2
234 234 push(PA_2);
235   - rc = waitForUnlock();
  235 + rc = waitForKeyboardUnlock();
236 236 break;
237 237  
238 238 case 'z': // PA3
239 239 push(PA_3);
240   - rc = waitForUnlock();
  240 + rc = waitForKeyboardUnlock();
241 241 break;
242 242  
243 243 case 'B': // PC_LEFTTAB = "@B"
... ... @@ -356,8 +356,9 @@
356 356  
357 357 sz = strlen(text);
358 358 if(sz) {
359   - waitForUnlock();
360   - push(text,sz);
  359 + rc = waitForKeyboardUnlock();
  360 + if(!rc)
  361 + push(text,sz);
361 362 }
362 363  
363 364 return rc;
... ...
client/src/core/windows/request.cc
... ... @@ -146,6 +146,33 @@
146 146 return *this;
147 147 }
148 148  
  149 + IPC::Request & IPC::Request::Request::pop(unsigned int &value) {
  150 +
  151 + DataBlock * block = getNextBlock();
  152 +
  153 + switch(block->type) {
  154 + case IPC::Request::UInt16:
  155 + value = * ((uint16_t *) (block+1));
  156 + in.current += sizeof(uint16_t) + sizeof(DataBlock);
  157 + break;
  158 +
  159 + case IPC::Request::UInt32:
  160 + value = * ((uint32_t *) (block+1));
  161 + in.current += sizeof(uint32_t) + sizeof(DataBlock);
  162 + break;
  163 +
  164 + case IPC::Request::UInt64:
  165 + value = * ((uint64_t *) (block+1));
  166 + in.current += sizeof(uint64_t) + sizeof(DataBlock);
  167 + break;
  168 +
  169 + default:
  170 + throw std::runtime_error("Invalid format");
  171 + }
  172 +
  173 + return *this;
  174 + }
  175 +
149 176 IPC::Request & IPC::Request::call() {
150 177  
151 178 #ifdef DEBUG
... ...
client/src/host/actions.cc
... ... @@ -55,8 +55,8 @@ TN3270::Host & TN3270::Host::waitForReady(time_t timeout) {
55 55 return *this;
56 56 }
57 57  
58   -TN3270::Host & TN3270::Host::waitForUnlock(time_t timeout) {
59   - this->session->waitForUnlock(timeout);
  58 +TN3270::Host & TN3270::Host::waitForKeyboardUnlock(time_t timeout) {
  59 + this->session->waitForKeyboardUnlock(timeout);
60 60 return *this;
61 61 }
62 62  
... ...
client/src/include/ipc-client-internals.h
... ... @@ -258,6 +258,7 @@
258 258 // Pop values
259 259 Request & pop(std::string &value);
260 260 Request & pop(int &value);
  261 + Request & pop(unsigned int &value);
261 262  
262 263 };
263 264  
... ...
client/src/session/local/actions.cc
... ... @@ -73,10 +73,10 @@
73 73 chkResponse(lib3270_wait_for_ready(this->hSession, timeout));
74 74 }
75 75  
76   - LIB3270_KEYBOARD_LOCK_STATE Local::Session::waitForUnlock(time_t timeout) const {
  76 + LIB3270_KEYBOARD_LOCK_STATE Local::Session::waitForKeyboardUnlock(time_t timeout) const {
77 77  
78 78 std::lock_guard<std::mutex> lock(const_cast<Local::Session *>(this)->sync);
79   - return lib3270_wait_for_unlock(this->hSession, timeout);
  79 + return lib3270_wait_for_keyboard_unlock(this->hSession, timeout);
80 80 }
81 81  
82 82 void Local::Session::waitForChange(time_t seconds) const {
... ...
client/src/session/local/get.cc
... ... @@ -103,6 +103,11 @@
103 103  
104 104 }
105 105  
  106 + LIB3270_KEYBOARD_LOCK_STATE Local::Session::getKeyboardUnlock() const {
  107 + std::lock_guard<std::mutex> lock(const_cast<Local::Session *>(this)->sync);
  108 + return lib3270_get_keyboard_lock_state(hSession);
  109 + }
  110 +
106 111  
107 112 }
108 113  
... ...
client/src/session/local/private.h
... ... @@ -103,7 +103,7 @@
103 103 void wait(time_t seconds) const override;
104 104 void waitForReady(time_t timeout) const override;
105 105 void waitForChange(time_t timeout) const override;
106   - LIB3270_KEYBOARD_LOCK_STATE waitForUnlock(time_t seconds) const override;
  106 + LIB3270_KEYBOARD_LOCK_STATE waitForKeyboardUnlock(time_t seconds) const override;
107 107  
108 108 // States
109 109 ProgramMessage getProgramMessage() const override;
... ... @@ -112,6 +112,7 @@
112 112  
113 113 // Properties.
114 114 void getProperty(const char *name, int &value) const override;
  115 + void getProperty(const char *name, unsigned int &value) const override;
115 116 void getProperty(const char *name, std::string &value) const override;
116 117 void getProperty(const char *name, bool &value) const override;
117 118 void setProperty(const char *name, const int value) override;
... ... @@ -120,6 +121,7 @@
120 121 std::string getVersion() const override;
121 122 std::string getRevision() const override;
122 123 std::string getLUName() const override;
  124 + LIB3270_KEYBOARD_LOCK_STATE getKeyboardUnlock() const override;
123 125  
124 126 std::string getHostURL() const override;
125 127 void setHostURL(const char *url) override;
... ...
client/src/session/local/properties.cc
... ... @@ -68,6 +68,29 @@
68 68 throw std::system_error(ENOENT, std::system_category());
69 69 }
70 70  
  71 + void Local::Session::getProperty(const char *name, unsigned int &value) const {
  72 +
  73 + const LIB3270_UINT_PROPERTY * intprop = lib3270_get_unsigned_properties_list();
  74 + for(size_t ix = 0; intprop[ix].name; ix++) {
  75 +
  76 + if(!strcasecmp(name,intprop[ix].name)) {
  77 +
  78 + std::lock_guard<std::mutex> lock(const_cast<Local::Session *>(this)->sync);
  79 +
  80 + value = intprop[ix].get(hSession);
  81 +
  82 + if(value < 0 && errno != 0) {
  83 + throw std::system_error(errno, std::system_category());
  84 + }
  85 +
  86 +
  87 + }
  88 +
  89 + }
  90 +
  91 + throw std::system_error(ENOENT, std::system_category());
  92 + }
  93 +
71 94 void Local::Session::getProperty(const char *name, std::string &value) const {
72 95  
73 96 const LIB3270_STRING_PROPERTY * strprop = lib3270_get_string_properties_list();
... ...
client/src/session/remote/actions.cc
... ... @@ -128,7 +128,7 @@
128 128  
129 129 }
130 130  
131   - LIB3270_KEYBOARD_LOCK_STATE IPC::Session::waitForUnlock(time_t timeout) const {
  131 + LIB3270_KEYBOARD_LOCK_STATE IPC::Session::waitForKeyboardUnlock(time_t timeout) const {
132 132  
133 133 int rc;
134 134  
... ... @@ -136,9 +136,9 @@
136 136  
137 137 while(time(nullptr) < end) {
138 138  
139   - debug("Running waitForUnlock request...");
  139 + debug("Running waitForKeyboardUnlock request...");
140 140  
141   - Request(*this,"waitForUnlock")
  141 + Request(*this,"waitForKeyboardUnlock")
142 142 .push((uint32_t) 1)
143 143 .call()
144 144 .pop(rc);
... ...
client/src/session/remote/get.cc
... ... @@ -109,6 +109,12 @@
109 109  
110 110 }
111 111  
  112 + LIB3270_KEYBOARD_LOCK_STATE IPC::Session::getKeyboardUnlock() const {
  113 + unsigned int value;
  114 + getProperty("kybdlock",value);
  115 + return (LIB3270_KEYBOARD_LOCK_STATE) value;
  116 + }
  117 +
112 118  
113 119 }
114 120  
... ...
client/src/session/remote/private.h
... ... @@ -101,7 +101,7 @@
101 101 void wait(time_t seconds) const override;
102 102 void waitForReady(time_t timeout) const override;
103 103 void waitForChange(time_t timeout) const override;
104   - LIB3270_KEYBOARD_LOCK_STATE waitForUnlock(time_t seconds) const override;
  104 + LIB3270_KEYBOARD_LOCK_STATE waitForKeyboardUnlock(time_t seconds) const override;
105 105  
106 106 // States
107 107 ProgramMessage getProgramMessage() const override;
... ... @@ -110,6 +110,7 @@
110 110  
111 111 // Properties.
112 112 void getProperty(const char *name, int &value) const override;
  113 + void getProperty(const char *name, unsigned int &value) const override;
113 114 void getProperty(const char *name, std::string &value) const override;
114 115 void getProperty(const char *name, bool &value) const override;
115 116 void setProperty(const char *name, const int value) override;
... ... @@ -118,6 +119,7 @@
118 119 std::string getVersion() const override;
119 120 std::string getRevision() const override;
120 121 std::string getLUName() const override;
  122 + LIB3270_KEYBOARD_LOCK_STATE getKeyboardUnlock() const override;
121 123  
122 124 std::string getHostURL() const override;
123 125 void setHostURL(const char *url) override;
... ...
client/src/session/remote/properties.cc
... ... @@ -53,6 +53,14 @@
53 53  
54 54 }
55 55  
  56 + void IPC::Session::getProperty(const char *name, unsigned int &value) const {
  57 +
  58 + Request(*this,false,name)
  59 + .call()
  60 + .pop(value);
  61 +
  62 + }
  63 +
56 64 void IPC::Session::getProperty(const char *name, std::string &value) const {
57 65  
58 66 Request(*this,false,name)
... ...
client/src/testprogram/testprogram.cc
... ... @@ -99,7 +99,7 @@
99 99 host.connect(nullptr);
100 100  
101 101 cout
102   - << "Wait for unlock returns " << host.waitForUnlock() << std::endl
  102 + << "Wait for unlock returns " << host.getKeyboardUnlock() << std::endl
103 103 << "Connection state is " << toCharString(host.getConnectionState()) << std::endl
104 104 << "Program message is " << toCharString(host.getProgramMessage()) << std::endl
105 105 << "Luname is " << host.getLUName() << std::endl
... ...
common/src/include/lib3270/ipc.h
... ... @@ -288,6 +288,7 @@
288 288  
289 289 // Properties.
290 290 virtual void getProperty(const char *name, int &value) const = 0;
  291 + virtual void getProperty(const char *name, unsigned int &value) const = 0;
291 292 virtual void getProperty(const char *name, std::string &value) const = 0;
292 293 virtual void getProperty(const char *name, bool &value) const = 0;
293 294 virtual void setProperty(const char *name, const int value) = 0;
... ... @@ -296,6 +297,7 @@
296 297 virtual std::string getVersion() const = 0;
297 298 virtual std::string getRevision() const = 0;
298 299 virtual std::string getLUName() const = 0;
  300 + virtual LIB3270_KEYBOARD_LOCK_STATE getKeyboardUnlock() const = 0;
299 301  
300 302 virtual std::string getHostURL() const = 0;
301 303 virtual void setHostURL(const char *url) = 0;
... ... @@ -337,7 +339,7 @@
337 339 virtual void waitForChange(time_t seconds = DEFAULT_TIMEOUT) const = 0;
338 340  
339 341 /// @brief Wait for screen changes.
340   - virtual LIB3270_KEYBOARD_LOCK_STATE waitForUnlock(time_t seconds = DEFAULT_TIMEOUT) const = 0;
  342 + virtual LIB3270_KEYBOARD_LOCK_STATE waitForKeyboardUnlock(time_t seconds = DEFAULT_TIMEOUT) const = 0;
341 343  
342 344 /// @brief Send PF.
343 345 virtual void pfkey(unsigned short value) = 0;
... ... @@ -424,8 +426,8 @@
424 426  
425 427 template<typename T>
426 428 Host & push(T value) {
427   - session->push(value);
428 429 sync();
  430 + session->push(value);
429 431 return *this;
430 432 }
431 433  
... ... @@ -440,7 +442,7 @@
440 442 Host & connect(const char *url = nullptr);
441 443 Host & disconnect();
442 444 Host & waitForReady(time_t timeout = DEFAULT_TIMEOUT);
443   - Host & waitForUnlock(time_t timeout = DEFAULT_TIMEOUT);
  445 + Host & waitForKeyboardUnlock(time_t timeout = DEFAULT_TIMEOUT);
444 446  
445 447 /// @brief Execute action by name.
446 448 inline Host & action(const char *action_name) {
... ... @@ -511,6 +513,10 @@
511 513 return session->getLUName();
512 514 }
513 515  
  516 + inline LIB3270_KEYBOARD_LOCK_STATE getKeyboardUnlock() const {
  517 + return session->getKeyboardUnlock();
  518 + }
  519 +
514 520 // Actions
515 521  
516 522 /// @brief Send PF.
... ...
server/src/core/linux/gobject.c
... ... @@ -155,7 +155,7 @@ void ipc3270_add_terminal_introspection(GString *introspection) {
155 155 " <arg type='u' name='seconds' direction='in' />" \
156 156 " <arg type='i' name='result' direction='out' />" \
157 157 " </method>" \
158   - " <method name= 'waitForUnlock'>" \
  158 + " <method name= 'waitForKeyboardUnlock'>" \
159 159 " <arg type='u' name='seconds' direction='in' />" \
160 160 " <arg type='i' name='result' direction='out' />" \
161 161 " </method>" \
... ...
server/src/core/methods/methods.c
... ... @@ -46,22 +46,22 @@ int ipc3270_method_call(GObject *object, const gchar *method_name, GVariant *req
46 46 { "connect", ipc3270_method_connect },
47 47 { "disconnect", ipc3270_method_disconnect },
48 48  
49   - { "wait", ipc3270_method_wait },
50   - { "waitforready", ipc3270_method_wait_for_ready },
51   - { "waitforupdate", ipc3270_method_wait_for_update },
52   - { "waitforunlock", ipc3270_method_wait_for_unlock },
53   -
54   - { "getString", ipc3270_method_get_string },
55   - { "getStringAt", ipc3270_method_get_string },
56   - { "getStringAtAddress", ipc3270_method_get_string },
57   -
58   - { "setString", ipc3270_method_set_string },
59   - { "setStringAt", ipc3270_method_set_string },
60   - { "setStringAtAddress", ipc3270_method_set_string },
61   -
62   - { "getFieldAttribute", ipc3270_method_get_field_attribute },
63   - { "getFieldAttributeAt", ipc3270_method_get_field_attribute },
64   - { "getFieldAttributeAtAddress", ipc3270_method_get_field_attribute },
  49 + { "wait", ipc3270_method_wait },
  50 + { "waitforready", ipc3270_method_wait_for_ready },
  51 + { "waitforupdate", ipc3270_method_wait_for_update },
  52 + { "waitforkeyboardunlock", ipc3270_method_wait_for_keyboard_unlock },
  53 +
  54 + { "getString", ipc3270_method_get_string },
  55 + { "getStringAt", ipc3270_method_get_string },
  56 + { "getStringAtAddress", ipc3270_method_get_string },
  57 +
  58 + { "setString", ipc3270_method_set_string },
  59 + { "setStringAt", ipc3270_method_set_string },
  60 + { "setStringAtAddress", ipc3270_method_set_string },
  61 +
  62 + { "getFieldAttribute", ipc3270_method_get_field_attribute },
  63 + { "getFieldAttributeAt", ipc3270_method_get_field_attribute },
  64 + { "getFieldAttributeAtAddress", ipc3270_method_get_field_attribute },
65 65  
66 66 };
67 67  
... ...
server/src/core/methods/private.h
... ... @@ -50,7 +50,7 @@
50 50 G_GNUC_INTERNAL int ipc3270_method_wait(GObject *session, GVariant *request, GObject *response, GError **error);
51 51 G_GNUC_INTERNAL int ipc3270_method_wait_for_ready(GObject *session, GVariant *request, GObject *response, GError **error);
52 52 G_GNUC_INTERNAL int ipc3270_method_wait_for_update(GObject *session, GVariant *request, GObject *response, GError **error);
53   - G_GNUC_INTERNAL int ipc3270_method_wait_for_unlock(GObject *session, GVariant *request, GObject *response, GError **error);
  53 + G_GNUC_INTERNAL int ipc3270_method_wait_for_keyboard_unlock(GObject *session, GVariant *request, GObject *response, GError **error);
54 54  
55 55 G_GNUC_INTERNAL int ipc3270_method_get_field_attribute(GObject *session, GVariant *request, GObject *response, GError **error);
56 56  
... ...
server/src/core/methods/wait.c
... ... @@ -57,11 +57,11 @@ int ipc3270_method_wait_for_update(GObject *session, GVariant *request, GObject
57 57  
58 58 }
59 59  
60   -int ipc3270_method_wait_for_unlock(GObject *session, GVariant *request, GObject *response, GError G_GNUC_UNUSED(**error)) {
  60 +int ipc3270_method_wait_for_keyboard_unlock(GObject *session, GVariant *request, GObject *response, GError G_GNUC_UNUSED(**error)) {
61 61  
62 62 guint seconds = 1;
63 63 g_variant_get(request, "(u)", &seconds);
64   - ipc3270_response_append_int32(response, (int32_t) lib3270_wait_for_unlock(ipc3270_get_session(session),seconds));
  64 + ipc3270_response_append_int32(response, (int32_t) lib3270_wait_for_keyboard_unlock(ipc3270_get_session(session),seconds));
65 65 return 0;
66 66  
67 67 }
... ...