diff --git a/configure.ac b/configure.ac index ff2e8d9..f0ca114 100644 --- a/configure.ac +++ b/configure.ac @@ -519,7 +519,7 @@ AC_DEFINE(LIB3270_SDK_VERSION,$app_cv_sdkversion,[The SDK version number]) AC_SUBST(LIB3270_SDK_VERSION,$app_cv_sdkversion) AC_ARG_WITH([default-host], [AS_HELP_STRING([--with-default-host], [Set lib3270 default host url])], - [ app_default_host="$withval"], + [ app_default_host="\"$withval\""], [ app_default_host=""]) AC_DEFINE_UNQUOTED(LIB3270_DEFAULT_HOST, $app_default_host, ["The default tn3270 host"]) diff --git a/src/core/host.c b/src/core/host.c index 0c66521..95849b3 100644 --- a/src/core/host.c +++ b/src/core/host.c @@ -104,7 +104,11 @@ LIB3270_EXPORT int lib3270_disconnect(H3270 *h) { return host_disconnect(h,0); } +/// @brief Do disconnect. +/// @param hSession Session handle. +/// @param failed Non zero if it was a failure. int host_disconnect(H3270 *hSession, int failed) { + CHECK_SESSION_HANDLE(hSession); debug("%s: connected=%s half connected=%s network=%s", @@ -334,7 +338,7 @@ LIB3270_EXPORT const char * lib3270_get_default_host(const H3270 GNUC_UNUSED(*hS #endif // _WIN32 #ifdef LIB3270_DEFAULT_HOST - return LIB3270_STRINGIZE_VALUE_OF(LIB3270_DEFAULT_HOST); + return LIB3270_DEFAULT_HOST; #else return getenv("LIB3270_DEFAULT_HOST"); #endif // LIB3270_DEFAULT_HOST diff --git a/src/core/telnet.c b/src/core/telnet.c index 12f46ef..6427082 100644 --- a/src/core/telnet.c +++ b/src/core/telnet.c @@ -1479,7 +1479,7 @@ static void net_rawout(H3270 *hSession, unsigned const char *buf, size_t len) { int nw = lib3270_sock_send(hSession,buf,len); if (nw > 0) { - // Data received + // Data sent hSession->ns_bsent += nw; len -= nw; buf += nw; diff --git a/src/network_modules/openssl/context.c b/src/network_modules/openssl/context.c index ece20dc..ffb984a 100644 --- a/src/network_modules/openssl/context.c +++ b/src/network_modules/openssl/context.c @@ -66,8 +66,6 @@ static void info_callback(INFO_CONST SSL *s, int where, int ret) { H3270 *hSession = (H3270 *) SSL_get_ex_data(s,ssl_ex_index); LIB3270_NET_CONTEXT * context = hSession->network.context; - debug("************************ %s where=%d",__FUNCTION__,where); - switch(where) { case SSL_CB_CONNECT_LOOP: trace_ssl(hSession,"SSL_connect: %s %s\n",SSL_state_string(s), SSL_state_string_long(s)); diff --git a/src/testprogram/testprogram.c b/src/testprogram/testprogram.c index 83de3f9..d463242 100644 --- a/src/testprogram/testprogram.c +++ b/src/testprogram/testprogram.c @@ -110,9 +110,11 @@ int main(int argc, char *argv[]) { lib3270_crl_set_preferred_protocol(h,"ldap"); #endif // HAVE_LDAP - //if(lib3270_set_url(h,NULL)) - // lib3270_set_url(h,"tn3270://127.0.0.1"); - lib3270_set_url(h,"tn3270://localhost:3270"); + lib3270_ssl_set_crl_download(h,0); + + if(lib3270_set_url(h,NULL)) + lib3270_set_url(h,"tn3270://127.0.0.1"); + //lib3270_set_url(h,"tn3270://localhost:3270"); int long_index =0; int opt; -- libgit2 0.21.2