From 243e4662e154f7034c8b143c32433352630a8379 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 6 Dec 2013 13:30:44 +0000 Subject: [PATCH] Ajustes em função do novo método de conexão --- api.h | 1 - host.c | 6 +++--- macros.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api.h b/api.h index 0578389..c6beed4 100644 --- a/api.h +++ b/api.h @@ -319,7 +319,6 @@ /* Get connection info */ #define get_connected_lu(h) lib3270_get_luname(h) -// #define get_current_host(h) lib3270_get_host(h) LOCAL_EXTERN SCRIPT_STATE status_script(SCRIPT_STATE state); diff --git a/host.c b/host.c index 3e03990..1bcce31 100644 --- a/host.c +++ b/host.c @@ -714,7 +714,7 @@ LIB3270_EXPORT const char * lib3270_set_host(H3270 *h, const char *n) Replace(h->host.full, lib3270_strdup_printf( "%s%s:%s%s%s", - h->host.opt&LIB3270_CONNECT_OPTION_SSL ? "L:" : "", + h->host.opt&LIB3270_CONNECT_OPTION_SSL ? "tn3270s://" : "", hostname, srvc, *query ? "?" : "", @@ -727,10 +727,10 @@ LIB3270_EXPORT const char * lib3270_set_host(H3270 *h, const char *n) return h->host.current; } -LIB3270_EXPORT const char * lib3270_get_host(H3270 *h) +LIB3270_EXPORT const char * lib3270_get_hostname(H3270 *h) { CHECK_SESSION_HANDLE(h); - return h->host.full; + return h->host.current; } LIB3270_EXPORT int lib3270_reconnect(H3270 *hSession,int wait) diff --git a/macros.c b/macros.c index 30112dc..f92929a 100644 --- a/macros.c +++ b/macros.c @@ -183,7 +183,7 @@ { const char * luname = (const char *) lib3270_get_luname(hSession); const char * state = get_state(hSession); - const char * host = (const char *) lib3270_get_host(hSession); + const char * host = (const char *) lib3270_get_hostname(hSession); char * rsp; size_t sz; -- libgit2 0.21.2