diff --git a/host.c b/host.c index 3707c2b..41cad48 100644 --- a/host.c +++ b/host.c @@ -208,7 +208,7 @@ static void update_host(H3270 *h) h->host.srvc )); - trace("hosturl=[%s]",h->host.full); + trace("hosturl=[%s] ssl=%s",h->host.full,(h->options&LIB3270_OPTION_SSL) ? "yes" : "no"); } diff --git a/options.c b/options.c index fdd0df0..06e54de 100644 --- a/options.c +++ b/options.c @@ -83,6 +83,15 @@ LIB3270_EXPORT void lib3270_set_options(H3270 *hSession, LIB3270_OPTION opt) { CHECK_SESSION_HANDLE(hSession); hSession->options = opt; + + Replace(hSession->host.full, + lib3270_strdup_printf( + "%s%s:%s", + hSession->options&LIB3270_OPTION_SSL ? "tn3270s://" : "tn3270://", + hSession->host.current, + hSession->host.srvc + )); + } LIB3270_EXPORT unsigned short lib3270_get_color_type(H3270 *hSession) -- libgit2 0.21.2