diff --git a/client/src/host/init.cc b/client/src/host/init.cc index 0bcb2d9..8d22fd7 100644 --- a/client/src/host/init.cc +++ b/client/src/host/init.cc @@ -40,17 +40,16 @@ /*---[ Implement ]----------------------------------------------------------------------------------*/ -TN3270::Host::Host(const char *id, const char *url, time_t timeout, const char *charset) { +TN3270::Host::Host(const char *id, const char *charset) { debug("Creating host id=\"", id); - this->timeout = timeout; + this->timeout = 5; this->session = Session::getInstance(id, charset); - if(url) { - this->connect(url); - } + } + TN3270::Host::~Host() { delete this->session; this->session = nullptr; diff --git a/client/src/include/lib3270/ipc.h b/client/src/include/lib3270/ipc.h index bdc5dd0..694466c 100644 --- a/client/src/include/lib3270/ipc.h +++ b/client/src/include/lib3270/ipc.h @@ -675,7 +675,8 @@ */ public: - Host(const char *id = nullptr, const char *url = nullptr, time_t timeout = DEFAULT_TIMEOUT, const char *charset = nullptr); + Host(const char *id, const char *charset = nullptr); + ~Host(); inline bool operator==(ConnectionState state) const noexcept { diff --git a/client/src/testprogram/testprogram.cc b/client/src/testprogram/testprogram.cc index ef9f486..74da6b5 100644 --- a/client/src/testprogram/testprogram.cc +++ b/client/src/testprogram/testprogram.cc @@ -97,7 +97,7 @@ // Test Attributes static void testAttributes(const char *session) { - TN3270::Host host{session,nullptr,10}; + TN3270::Host host{session}; for(auto attribute : host.getAttributes()) { @@ -123,7 +123,7 @@ try { - TN3270::Host host{session,nullptr,10}; + TN3270::Host host{session}; cout << "Version: " << host["version"] @@ -204,7 +204,7 @@ #endif // _WIN32 cout << "Session: " << session << endl; - + testHost(session); -- libgit2 0.21.2