From e2de5e2bcc516de9959b604c6c3519c397b9f48f Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Thu, 4 Apr 2013 12:10:02 +0000 Subject: [PATCH] Incluindo metodo "test" no rexx, pequenos ajustes na biblioteca --- screen.c | 2 +- state.c | 6 ++++++ telnet.c | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/screen.c b/screen.c index 2e9cf24..8e8bf2f 100644 --- a/screen.c +++ b/screen.c @@ -536,7 +536,7 @@ LIB3270_EXPORT LIB3270_STATUS lib3270_get_program_message(H3270 *session) * @return 0 if the terminal is ready (no message, keyboard unlocked), LIB3270_MESSAGE if not * */ -LIB3270_EXPORT int lib3270_lock_status(H3270 *hSession) +LIB3270_EXPORT LIB3270_MESSAGE lib3270_lock_status(H3270 *hSession) { CHECK_SESSION_HANDLE(hSession); diff --git a/state.c b/state.c index 8522b6c..ed42b06 100644 --- a/state.c +++ b/state.c @@ -92,6 +92,12 @@ LIB3270_EXPORT int lib3270_in_tn3270e(H3270 *h) return (h->cstate == CONNECTED_TN3270E); } +LIB3270_EXPORT int lib3270_is_connected(H3270 *h) +{ + CHECK_SESSION_HANDLE(h); + return (h->cstate == CONNECTED_TN3270E); +} + LIB3270_EXPORT int lib3270_in_e(H3270 *h) { CHECK_SESSION_HANDLE(h); diff --git a/telnet.c b/telnet.c index cbfd520..423e510 100644 --- a/telnet.c +++ b/telnet.c @@ -3276,6 +3276,11 @@ LIB3270_EXPORT LIB3270_SSL_STATE lib3270_get_secure(H3270 *session) return session->secure; } +LIB3270_EXPORT int lib3270_is_secure(H3270 *hSession) +{ + return lib3270_get_secure(hSession) == LIB3270_SSL_SECURE; +} + LIB3270_EXPORT long lib3270_get_SSL_verify_result(H3270 *hSession) { CHECK_SESSION_HANDLE(hSession); -- libgit2 0.21.2