Commit 5d07ecbfa8a682f5fe102aacd162f96c0d8e1449

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

Removing URL & timeout for the Host class constructor.

client/src/host/init.cc
... ... @@ -40,17 +40,16 @@
40 40  
41 41 /*---[ Implement ]----------------------------------------------------------------------------------*/
42 42  
43   -TN3270::Host::Host(const char *id, const char *url, time_t timeout, const char *charset) {
  43 +TN3270::Host::Host(const char *id, const char *charset) {
44 44  
45 45 debug("Creating host id=\"", id);
46 46  
47   - this->timeout = timeout;
  47 + this->timeout = 5;
48 48 this->session = Session::getInstance(id, charset);
49   - if(url) {
50   - this->connect(url);
51   - }
  49 +
52 50 }
53 51  
  52 +
54 53 TN3270::Host::~Host() {
55 54 delete this->session;
56 55 this->session = nullptr;
... ...
client/src/include/lib3270/ipc.h
... ... @@ -675,7 +675,8 @@
675 675 */
676 676  
677 677 public:
678   - Host(const char *id = nullptr, const char *url = nullptr, time_t timeout = DEFAULT_TIMEOUT, const char *charset = nullptr);
  678 + Host(const char *id, const char *charset = nullptr);
  679 +
679 680 ~Host();
680 681  
681 682 inline bool operator==(ConnectionState state) const noexcept {
... ...
client/src/testprogram/testprogram.cc
... ... @@ -97,7 +97,7 @@
97 97 // Test Attributes
98 98 static void testAttributes(const char *session) {
99 99  
100   - TN3270::Host host{session,nullptr,10};
  100 + TN3270::Host host{session};
101 101  
102 102 for(auto attribute : host.getAttributes()) {
103 103  
... ... @@ -123,7 +123,7 @@
123 123  
124 124 try {
125 125  
126   - TN3270::Host host{session,nullptr,10};
  126 + TN3270::Host host{session};
127 127  
128 128 cout
129 129 << "Version: " << host["version"]
... ... @@ -204,7 +204,7 @@
204 204 #endif // _WIN32
205 205  
206 206 cout << "Session: " << session << endl;
207   -
  207 +
208 208 testHost(session);
209 209  
210 210  
... ...