From 5d70c83a8579294fea7fb5785076f4c69302c479 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 24 Jul 2019 15:59:15 -0300 Subject: [PATCH] Fixing debug messages. --- client/lib3270++.cbp | 4 ++++ client/src/core/host.cc | 3 +++ client/src/core/session.cc | 2 ++ client/src/core/windows/session.cc | 2 +- client/src/testprogram/testprogram.cc | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/lib3270++.cbp b/client/lib3270++.cbp index af2ae33..1571488 100644 --- a/client/lib3270++.cbp +++ b/client/lib3270++.cbp @@ -47,6 +47,10 @@ + + + + diff --git a/client/src/core/host.cc b/client/src/core/host.cc index 6e6b89b..0bb6d47 100644 --- a/client/src/core/host.cc +++ b/client/src/core/host.cc @@ -43,6 +43,9 @@ namespace TN3270 { Host::Host(const char *id, const char *url, time_t timeout) { + + debug("Creating host id=\"", id); + this->timeout = timeout; this->session = Session::create(id); if(url) { diff --git a/client/src/core/session.cc b/client/src/core/session.cc index 6651155..49e9d58 100644 --- a/client/src/core/session.cc +++ b/client/src/core/session.cc @@ -46,6 +46,8 @@ /// @brief Create a tn3270 session. Session * Session::create(const char *id) { + debug("Creating session with ID \"",id,"\""); + if(!id) { return new Local::Session(); } diff --git a/client/src/core/windows/session.cc b/client/src/core/windows/session.cc index 125ade6..c477d36 100644 --- a/client/src/core/windows/session.cc +++ b/client/src/core/windows/session.cc @@ -62,7 +62,7 @@ std::transform(pipename.begin(), pipename.end(), pipename.begin(), ::tolower); - debug("pipename: \"%s\"",pipename.c_str()); + debug("id: \"", id, "\" pipename: \"", pipename , "\""); this->hPipe = CreateFile( TEXT(pipename.c_str()), // pipe name diff --git a/client/src/testprogram/testprogram.cc b/client/src/testprogram/testprogram.cc index a6764fd..02b6ef2 100644 --- a/client/src/testprogram/testprogram.cc +++ b/client/src/testprogram/testprogram.cc @@ -70,6 +70,8 @@ } + cout << "Session: " << session << endl; + TN3270::Host host{session}; try { -- libgit2 0.21.2