Commit 565bf6b645c1e407e760893b1dd85beb9bec3db1
1 parent
58b3a2e8
Exists in
master
Atualizando indicador de SSL para usar a estrutura de sessao na função exportada pela API
Showing
5 changed files
with
19 additions
and
7 deletions
Show diff stats
latest/src/include/lib3270.h
... | ... | @@ -252,11 +252,23 @@ |
252 | 252 | */ |
253 | 253 | LIB3270_EXPORT unsigned char lib3270_get_toogle(H3270 *h, LIB3270_TOGGLE ix); |
254 | 254 | |
255 | + /** | |
256 | + * Check if the active connection is secure. | |
257 | + * | |
258 | + * @param h Session handle. | |
259 | + * | |
260 | + * @return Non 0 if the connection is SSL secured, 0 if not. | |
261 | + */ | |
262 | + LIB3270_EXPORT int lib3270_get_ssl_state(H3270 *h); | |
263 | + | |
264 | + | |
265 | + | |
255 | 266 | LIB3270_EXPORT STATUS_CODE lib3270_get_oia_status(H3270 *h); |
256 | 267 | LIB3270_EXPORT const char * lib3270_get_luname(H3270 *h); |
257 | 268 | LIB3270_EXPORT const char * lib3270_get_host(H3270 *h); |
258 | 269 | |
259 | 270 | #define lib3270_has_printer_session(h) (h->oia_flag[LIB3270_FLAG_PRINTER] != 0) |
260 | 271 | #define lib3270_has_active_script(h) (h->oia_flag[LIB3270_FLAG_SCRIPT] != 0) |
272 | + #define lib3270_get_typeahead(h) (h->oia_flag[LIB3270_FLAG_TYPEAHEAD] != 0) | |
261 | 273 | |
262 | 274 | #endif // LIB3270_H_INCLUDED | ... | ... |
latest/src/include/lib3270/api.h
... | ... | @@ -551,8 +551,8 @@ |
551 | 551 | LIB3270_EXPORT int screen_read(char *dest, int baddr, int count); |
552 | 552 | LIB3270_EXPORT void Input_String(const unsigned char *str); |
553 | 553 | LIB3270_EXPORT void screen_size(int *rows, int *cols); |
554 | - LIB3270_EXPORT int query_secure_connection(H3270 *h); | |
555 | 554 | |
555 | + #define query_secure_connection(h) lib3270_get_ssl_state(h) | |
556 | 556 | #define lib3270_paste_string(str) lib3270_set_string(NULL,str) |
557 | 557 | #define get_3270_terminal_size(h,r,c) lib3270_get_screen_size(h,r,c) |
558 | 558 | ... | ... |
latest/src/lib/telnet.c
... | ... | @@ -3414,12 +3414,12 @@ net_proxy_port(void) |
3414 | 3414 | return NULL; |
3415 | 3415 | } |
3416 | 3416 | |
3417 | -int query_secure_connection(H3270 *h) | |
3417 | +LIB3270_EXPORT int lib3270_get_ssl_state(H3270 *h) | |
3418 | 3418 | { |
3419 | + CHECK_SESSION_HANDLE(h); | |
3420 | + | |
3419 | 3421 | #if defined(HAVE_LIBSSL) |
3420 | - if(h) | |
3421 | - return h->secure_connection; | |
3422 | - return h3270.secure_connection; | |
3422 | + return (h->secure_connection != 0); | |
3423 | 3423 | #else |
3424 | 3424 | return 0; |
3425 | 3425 | #endif | ... | ... |
latest/src/plugins/java/j3270plugin.c
latest/src/plugins/rexx/rx3270.h