diff --git a/client/src/include/lib3270/ipc.h b/client/src/include/lib3270/ipc.h index 99d4bf3..0fe2771 100644 --- a/client/src/include/lib3270/ipc.h +++ b/client/src/include/lib3270/ipc.h @@ -635,7 +635,6 @@ Host & push(unsigned short row, unsigned short col, const std::string &text); Host & push(const std::string &text); - Host & push(const char *text); Host & push(int baddr, const char *str, int len = -1); Host & push(unsigned short row, unsigned short col, const char *str, int len = -1); Host & push(const char *str, int len = -1); diff --git a/client/src/session/local/set.cc b/client/src/session/local/set.cc index 374f9c5..020bed0 100644 --- a/client/src/session/local/set.cc +++ b/client/src/session/local/set.cc @@ -44,14 +44,17 @@ void Local::Session::set(const std::string &str) { - std::lock_guard lock(const_cast(this)->sync); - chkResponse(lib3270_input_string(hSession,(unsigned char *) str.c_str(),str.length())); + std::lock_guard lock(this->sync); + + int rc = lib3270_set_field(hSession,str.c_str(),str.length()); + if(rc < 0) + chkResponse(-rc); } void Local::Session::set(int baddr, const std::string &str) { - std::lock_guard lock(const_cast(this)->sync); + std::lock_guard lock(this->sync); int rc = lib3270_set_string_at_address(hSession,baddr,(unsigned char *) str.c_str(),str.length()); if(rc < 0) @@ -61,7 +64,7 @@ void Local::Session::set(int row, int col, const std::string &str) { - std::lock_guard lock(const_cast(this)->sync); + std::lock_guard lock(this->sync); int rc = lib3270_set_string_at(hSession,row,col,(unsigned char *) str.c_str(),str.length()); if(rc < 0) diff --git a/client/src/session/remote/set.cc b/client/src/session/remote/set.cc index 4bf2257..de649be 100644 --- a/client/src/session/remote/set.cc +++ b/client/src/session/remote/set.cc @@ -46,7 +46,7 @@ int rc; - Request(*this,"setString") + Request(*this,"setField") .push(str.c_str()) .call() .pop(rc); -- libgit2 0.21.2