From db04ac3f34fcd73fd7f68ea6bd11f9ac20a8aabb Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 16 Jan 2019 11:21:49 -0200 Subject: [PATCH] Updating timer calls. --- lib3270.cbp | 1 - src/include/appres.h | 243 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/include/gluec.h | 33 --------------------------------- src/include/lib3270.h | 6 +++--- src/include/utilc.h | 4 ++-- src/lib3270/ctlr.c | 11 ++++++----- src/lib3270/host.c | 5 +++-- src/lib3270/iocalls.c | 35 +++++++++++++++++------------------ src/lib3270/kybd.c | 12 ++++++------ src/lib3270/private.h | 8 ++++---- src/lib3270/screen.c | 18 ++++++++++++++++++ src/lib3270/toggles.c | 2 +- 12 files changed, 60 insertions(+), 318 deletions(-) delete mode 100644 src/include/appres.h delete mode 100644 src/include/gluec.h diff --git a/lib3270.cbp b/lib3270.cbp index a2b0dae..bd88ba5 100644 --- a/lib3270.cbp +++ b/lib3270.cbp @@ -46,7 +46,6 @@ - diff --git a/src/include/appres.h b/src/include/appres.h deleted file mode 100644 index 612996d..0000000 --- a/src/include/appres.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Modifications Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002, - * 2003, 2004, 2005, 2007 by Paul Mattes. - * Copyright 1990 by Jeff Sparkes. - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation. - * - * x3270, c3270, s3270 and tcl3270 are distributed in the hope that they will - * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE - * for more details. - */ - -/* - * appres.h - * Application resource definitions for x3270, c3270, s3270 and - * tcl3270. - */ - -#include "toggle.h" - -/* Toggles */ - -/* -struct toggle { - char value; // toggle value -// char changed; // has the value changed since init -// Widget w[2]; // the menu item widgets -// const char *label[2]; // labels - void (*upcall)(H3270 *, struct toggle *, LIB3270_TOGGLE_TYPE); // change value -// void (*callback)(H3270 *, int, LIB3270_TOGGLE_TYPE); - -}; - -// #define toggle_toggle(t) { (t)->value = !(t)->value; } -*/ - -#error Deprecated - -#define toggled(ix) lib3270_get_toggle(NULL,ix) - -/* Application resources */ - -typedef struct { - /* Basic colors */ -// #if defined(X3270_DISPLAY) /*[*/ -// Pixel foreground; -// Pixel background; -// #endif /*]*/ - - /* Options (not toggles) */ -// char mono; -// char extended; -// char m3279; -// char modified_sel; -// char once; -//#if defined(X3270_DISPLAY) /*[*/ -// char visual_bell; -// char menubar; -// char active_icon; -// char label_icon; -// char invert_kpshift; -// char use_cursor_color; -// char allow_resize; -// char no_other; -// char do_confirms; -// #if !defined(G3270) -// char reconnect; -// #endif -// char visual_select; -// char suppress_host; -// char suppress_font_menu; -//# if defined(X3270_KEYPAD) /*[*/ -// char keypad_on; -//# endif /*]*/ -//#endif /*]*/ -//#if defined(C3270) /*[*/ -// char all_bold_on; -// char curses_keypad; -// char cbreak_mode; -//#endif /*]*/ -// char apl_mode; -// char scripted; -// char numeric_lock; -// char secure; -// char oerr_lock; -// char typeahead; -// char debug_tracing; -// char disconnect_clear; -// char highlight_bold; -// char color8; -// char bsd_tm; -// char unlock_delay; -// #if defined(X3270_SCRIPT) /*[*/ -// char socket; -// #endif /*]*/ -// #if defined(C3270) && defined(_WIN32) /*[*/ -// char highlight_underline; -//#endif /*]*/ - - /* Named resources */ -/* -#if defined(X3270_KEYPAD) - char *keypad; -#endif -*/ -#if defined(X3270_DISPLAY) || defined(C3270) -// char *key_map; -// char *compose_map; -// char *printer_lu; -#endif -/* -#if defined(X3270_DISPLAY) - char *efontname; - char *fixed_size; - char *debug_font; - char *icon_font; - char *icon_label_font; - int save_lines; - char *normal_name; - char *select_name; - char *bold_name; - char *colorbg_name; - char *keypadbg_name; - char *selbg_name; - char *cursor_color_name; - char *color_scheme; - int bell_volume; - char *char_class; - int modified_sel_color; - int visual_select_color; -#if defined(X3270_DBCS) - char *input_method; - char *preedit_type; -#endif -#endif -*/ -//#if defined(X3270_DBCS) -// char *local_encoding; -//#endif - -#if defined(C3270) /*[*/ -// char *meta_escape; -// char *all_bold; -// char *altscreen; -// char *defscreen; -#endif /*]*/ -// char *conf_dir; - char *model; -// char *hostsfile; -// char *port; -// char *charset; -// char *termname; -// char *login_macro; -// char *macros; -#if defined(X3270_TRACE) /*[*/ -//#if !defined(_WIN32) -// char *trace_dir; -//#endif -// char *trace_file; -// char *screentrace_file; -// char *trace_file_size; -/* -#if defined(X3270_DISPLAY) || defined(WC3270) - char trace_monitor; -#endif -*/ - -#endif /*]*/ -// char *oversize; -#if defined(X3270_FT) /*[*/ -// char *ft_command; -// int dft_buffer_size; -#endif /*]*/ -// char *connectfile_name; -// char *idle_command; -// char idle_command_enabled; -// char *idle_timeout; - -/* -#if defined(X3270_SCRIPT) - char *plugin_command; -#endif -*/ - -//#if defined(HAVE_LIBSSL) -// char *cert_file; -//#endif -// char *proxy; - - /* Toggles */ -// struct toggle toggle[N_TOGGLES]; -/* -#if defined(X3270_DISPLAY) - // Simple widget resources - Cursor normal_mcursor; - Cursor wait_mcursor; - Cursor locked_mcursor; -#endif -*/ - -/* -#if defined(X3270_ANSI) - // Line-mode TTY parameters - char icrnl; - char inlcr; - char onlcr; - char *erase; - char *kill; - char *werase; - char *rprnt; - char *lnext; - char *intr; - char *quit; - char *eof; -#endif -*/ - -// #if defined(WC3270) /*[*/ -// char *hostname; -// #endif - -/* -#if defined(WC3270) - char *title; -#endif -*/ - -/* -#if defined(USE_APP_DEFAULTS) - // App-defaults version - char *ad_version; -#endif -*/ - -} AppRes, *AppResptr; - -extern AppRes appres; - -void toggle_rectselect(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt); diff --git a/src/include/gluec.h b/src/include/gluec.h deleted file mode 100644 index f359f30..0000000 --- a/src/include/gluec.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2000 by Paul Mattes. - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation. - * - * c3270, s3270 and tcl3270 are distributed in the hope that they will - * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE - * for more details. - */ - -/* - * gluec.h - * Declarations for glue.c and XtGlue.c - */ - -/* glue.c */ -// extern int parse_command_line(int argc, const char **argv, const char **cl_hostname); -// extern int parse_program_parameters(int argc, const char **argv); -// LIB3270_INTERNAL void parse_xrm(const char *arg, const char *where); -// LIB3270_INTERNAL void notify_ssl_error(H3270 *session, const char *title, const char *msg, const char *state, const char *alert); - -/* XtGlue.c */ -// LIB3270_INTERNAL void (*Warning_redirect)(const char *); - -// #if !defined(_WIN32) -// LIB3270_INTERNAL int select_setup(int *nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, struct timeval **timeout, struct timeval *timebuf); -// #endif - -#error Deprecated diff --git a/src/include/lib3270.h b/src/include/lib3270.h index c1daef2..30a703c 100644 --- a/src/include/lib3270.h +++ b/src/include/lib3270.h @@ -833,8 +833,8 @@ { unsigned short sz; - void * (*AddTimeOut)(H3270 *session, unsigned long interval_ms, void (*proc)(H3270 *session)); - void (*RemoveTimeOut)(H3270 *session, void *timer); + void * (*AddTimer)(H3270 *session, unsigned long interval_ms, int (*proc)(H3270 *session)); + void (*RemoveTimer)(H3270 *session, void *timer); void * (*add_poll)(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*proc)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata); void (*remove_poll)(H3270 *session, void *id); @@ -864,7 +864,7 @@ * @param rm Callback for removing a timeout * */ - LIB3270_EXPORT void lib3270_register_time_handlers(void * (*add)(H3270 *session, unsigned long interval_ms, void (*proc)(H3270 *session)), void (*rm)(H3270 *session, void *timer)); + LIB3270_EXPORT void lib3270_register_timer_handlers(void * (*add)(H3270 *session, unsigned long interval_ms, int (*proc)(H3270 *session)), void (*rm)(H3270 *session, void *timer)); LIB3270_EXPORT void lib3270_register_fd_handlers(void * (*add)(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*proc)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata), void (*rm)(H3270 *, void *id)); diff --git a/src/include/utilc.h b/src/include/utilc.h index 9099c7c..5e737a6 100644 --- a/src/include/utilc.h +++ b/src/include/utilc.h @@ -41,8 +41,8 @@ LIB3270_INTERNAL void * AddOutput(int, H3270 *session, void (*fn)(H3270 *sessio LIB3270_INTERNAL void * AddExcept(int, H3270 *session, void (*fn)(H3270 *session)); LIB3270_INTERNAL void RemoveSource(H3270 *session, void *cookie); -LIB3270_INTERNAL void * AddTimeOut(unsigned long msec, H3270 *session, void (*fn)(H3270 *session)); -LIB3270_INTERNAL void RemoveTimeOut(H3270 *session, void *cookie); +LIB3270_INTERNAL void * AddTimer(unsigned long msec, H3270 *session, int (*fn)(H3270 *session)); +LIB3270_INTERNAL void RemoveTimer(H3270 *session, void *cookie); LIB3270_INTERNAL const char * KeysymToString(KeySym k); diff --git a/src/lib3270/ctlr.c b/src/lib3270/ctlr.c index 4542371..6dc4b16 100644 --- a/src/lib3270/ctlr.c +++ b/src/lib3270/ctlr.c @@ -2809,7 +2809,7 @@ delta_msec(struct timeval *t1, struct timeval *t0) (t1->tv_usec - t0->tv_usec + 500) / 1000; } -static void keep_ticking(H3270 *hSession) +static int keep_ticking(H3270 *hSession) { struct timeval t1; long msec; @@ -2821,8 +2821,9 @@ static void keep_ticking(H3270 *hSession) msec = delta_msec(&hSession->t_want, &t1); } while (msec <= 0); - hSession->tick_id = AddTimeOut(msec, hSession, keep_ticking); status_timing(hSession,&hSession->t_start, &t1); + + return 1; } void ticking_start(H3270 *hSession, Boolean anyway) @@ -2846,10 +2847,10 @@ void ticking_start(H3270 *hSession, Boolean anyway) status_untiming(hSession); if (hSession->ticking) - RemoveTimeOut(hSession, hSession->tick_id); + RemoveTimer(hSession, hSession->tick_id); hSession->ticking = 1; - hSession->tick_id = AddTimeOut(1000, hSession, keep_ticking); + hSession->tick_id = AddTimer(1000, hSession, keep_ticking); hSession->t_want = hSession->t_start; } @@ -2875,7 +2876,7 @@ static void ticking_stop(H3270 *hSession) if (!hSession->ticking) return; - RemoveTimeOut(hSession, hSession->tick_id); + RemoveTimer(hSession, hSession->tick_id); hSession->ticking = 0; status_timing(hSession,&hSession->t_start, &t1); } diff --git a/src/lib3270/host.c b/src/lib3270/host.c index f452901..51650c4 100644 --- a/src/lib3270/host.c +++ b/src/lib3270/host.c @@ -58,11 +58,12 @@ /** * @brief Called from timer to attempt an automatic reconnection. */ -void lib3270_reconnect(H3270 *hSession) +int lib3270_reconnect(H3270 *hSession) { lib3270_write_log(hSession,"3270","Starting auto-reconnect on %s",lib3270_get_url(hSession)); hSession->auto_reconnect_inprogress = 0; lib3270_connect(hSession,0); + return 0; } LIB3270_EXPORT int lib3270_disconnect(H3270 *h) @@ -85,7 +86,7 @@ int host_disconnect(H3270 *hSession, int failed) { /* Schedule an automatic reconnection. */ hSession->auto_reconnect_inprogress = 1; - (void) AddTimeOut(failed ? RECONNECT_ERR_MS : RECONNECT_MS, hSession, lib3270_reconnect); + (void) AddTimer(failed ? RECONNECT_ERR_MS : RECONNECT_MS, hSession, lib3270_reconnect); } /* diff --git a/src/lib3270/iocalls.c b/src/lib3270/iocalls.c index d9018bb..389cbaf 100644 --- a/src/lib3270/iocalls.c +++ b/src/lib3270/iocalls.c @@ -58,8 +58,8 @@ /*---[ Standard calls ]-------------------------------------------------------------------------------------*/ // Timeout calls - static void internal_remove_timeout(H3270 *session, void *timer); - static void * internal_add_timeout(H3270 *session, unsigned long interval_ms, void (*proc)(H3270 *session)); + static void internal_remove_timer(H3270 *session, void *timer); + static void * internal_add_timer(H3270 *session, unsigned long interval_ms, int (*proc)(H3270 *session)); static void * internal_add_poll(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*proc)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata ); static void internal_remove_poll(H3270 *session, void *id); @@ -74,11 +74,11 @@ /*---[ Active callbacks ]-----------------------------------------------------------------------------------*/ - static void * (*add_timeout)(H3270 *session, unsigned long interval_ms, void (*proc)(H3270 *session)) - = internal_add_timeout; + static void * (*add_timer)(H3270 *session, unsigned long interval_ms, int (*proc)(H3270 *session)) + = internal_add_timer; - static void (*remove_timeout)(H3270 *session, void *timer) - = internal_remove_timeout; + static void (*remove_timer)(H3270 *session, void *timer) + = internal_remove_timer; static void * (*add_poll)(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*proc)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata) = internal_add_poll; @@ -124,7 +124,7 @@ static void ms_ts(unsigned long long *u) } #endif -static void * internal_add_timeout(H3270 *session, unsigned long interval_ms, void (*proc)(H3270 *session)) +static void * internal_add_timer(H3270 *session, unsigned long interval_ms, int (*proc)(H3270 *session)) { timeout_t *t_new; timeout_t *t; @@ -184,12 +184,12 @@ static void * internal_add_timeout(H3270 *session, unsigned long interval_ms, vo prev->next = t_new; } - trace("Timeout %p added with value %ld",t_new,interval_ms); + trace("Timer %p added with value %ld",t_new,interval_ms); return t_new; } -static void internal_remove_timeout(H3270 *session, void * timer) +static void internal_remove_timer(H3270 *session, void * timer) { timeout_t *st = (timeout_t *)timer; timeout_t *t; @@ -354,22 +354,21 @@ static void internal_ring_bell(H3270 *session unused) /* External entry points */ -void * AddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session)) +void * AddTimer(unsigned long interval_ms, H3270 *session, int (*proc)(H3270 *session)) { void *timer; CHECK_SESSION_HANDLE(session); - timer = add_timeout(session,interval_ms,proc); + timer = add_timer(session,interval_ms,proc); trace("Timeout %p created with %ld ms",timer,interval_ms); return timer; } -void RemoveTimeOut(H3270 *session, void * timer) +void RemoveTimer(H3270 *session, void * timer) { if(!timer) return; - trace("Removing timeout %p",timer); - return remove_timeout(session, timer); + return remove_timer(session, timer); } void x_except_on(H3270 *h) @@ -410,13 +409,13 @@ void remove_input_calls(H3270 *session) } } -LIB3270_EXPORT void lib3270_register_time_handlers(void * (*add)(H3270 *session, unsigned long interval_ms, void (*proc)(H3270 *session)), void (*rm)(H3270 *session, void *timer)) +LIB3270_EXPORT void lib3270_register_timer_handlers(void * (*add)(H3270 *session, unsigned long interval_ms, int (*proc)(H3270 *session)), void (*rm)(H3270 *session, void *timer)) { if(add) - add_timeout = add; + add_timer = add; if(rm) - remove_timeout = rm; + remove_timer = rm; } @@ -433,7 +432,7 @@ LIB3270_EXPORT int lib3270_register_io_controller(const LIB3270_IO_CONTROLLER *c if(!cbk || cbk->sz != sizeof(LIB3270_IO_CONTROLLER)) return errno = EINVAL; - lib3270_register_time_handlers(cbk->AddTimeOut,cbk->RemoveTimeOut); + lib3270_register_timer_handlers(cbk->AddTimer,cbk->RemoveTimer); lib3270_register_fd_handlers(cbk->add_poll,cbk->remove_poll); if(cbk->Wait) diff --git a/src/lib3270/kybd.c b/src/lib3270/kybd.c index 2aabbea..075bf13 100644 --- a/src/lib3270/kybd.c +++ b/src/lib3270/kybd.c @@ -405,7 +405,7 @@ void kybd_inhibit(H3270 *session, Boolean inhibit) void kybd_connect(H3270 *session, int connected, void *dunno unused) { if (session->kybdlock & KL_DEFERRED_UNLOCK) - RemoveTimeOut(session, session->unlock_id); + RemoveTimer(session, session->unlock_id); lib3270_kybdlock_clear(session, -1); @@ -427,7 +427,7 @@ void kybd_connect(H3270 *session, int connected, void *dunno unused) void kybd_in3270(H3270 *hSession, int in3270 unused, void *dunno unused) { if (hSession->kybdlock & KL_DEFERRED_UNLOCK) - RemoveTimeOut(hSession, hSession->unlock_id); + RemoveTimer(hSession, hSession->unlock_id); lib3270_kybdlock_clear(hSession,~KL_AWAITING_FIRST); @@ -1111,13 +1111,13 @@ LIB3270_EXPORT int lib3270_previousfield(H3270 *hSession) * Deferred keyboard unlock. */ -static void defer_unlock(H3270 *hSession) +static int defer_unlock(H3270 *hSession) { -// trace("%s",__FUNCTION__); lib3270_kybdlock_clear(hSession,KL_DEFERRED_UNLOCK); status_reset(hSession); if(CONNECTED) ps_process(hSession); + return 0; } /** @@ -1152,7 +1152,7 @@ void do_reset(H3270 *hSession, Boolean explicit) * keyboard now, or want to defer further into the future. */ if (hSession->kybdlock & KL_DEFERRED_UNLOCK) - RemoveTimeOut(hSession, hSession->unlock_id); + RemoveTimer(hSession, hSession->unlock_id); /* * If explicit (from the keyboard), unlock the keyboard now. @@ -1169,7 +1169,7 @@ void do_reset(H3270 *hSession, Boolean explicit) if(hSession->unlock_delay_ms) { - hSession->unlock_id = AddTimeOut(hSession->unlock_delay_ms, hSession, defer_unlock); + hSession->unlock_id = AddTimer(hSession->unlock_delay_ms, hSession, defer_unlock); } else { diff --git a/src/lib3270/private.h b/src/lib3270/private.h index 3f6bb22..1c7eccd 100644 --- a/src/lib3270/private.h +++ b/src/lib3270/private.h @@ -265,7 +265,7 @@ typedef struct timeout struct timeval tv; #endif /*]*/ - void (*proc)(H3270 *session); + int (*proc)(H3270 *session); H3270 *session; @@ -301,8 +301,6 @@ struct _h3270 { struct lib3270_session_callbacks cbk; // Callback table - Always the first one. -// unsigned short sz; /**< Struct size */ - // Session info char id; ///< @brief Session Identifier. @@ -601,6 +599,8 @@ struct _h3270 void * except; } xio; + size_t popups; ///< @brief Count open popups. + #ifdef HAVE_LIBSSL /// @brief SSL Data. struct @@ -647,7 +647,7 @@ LIB3270_INTERNAL int lib3270_default_event_dispatcher(H3270 *hSession, int block /** * @brief Called from timer to attempt an automatic reconnection. */ -LIB3270_INTERNAL void lib3270_reconnect(H3270 *hSession); +LIB3270_INTERNAL int lib3270_reconnect(H3270 *hSession); #if defined(DEBUG) #define CHECK_SESSION_HANDLE(x) check_session_handle(&x,__FUNCTION__); diff --git a/src/lib3270/screen.c b/src/lib3270/screen.c index 340e807..bca1855 100644 --- a/src/lib3270/screen.c +++ b/src/lib3270/screen.c @@ -759,7 +759,9 @@ void Error(H3270 *session, const char *fmt, ...) va_start(arg_ptr, fmt); + session->popups++; session->cbk.popup(session,LIB3270_NOTIFY_ERROR, _( "3270 Error" ),NULL,fmt,arg_ptr); + session->popups--; va_end(arg_ptr); @@ -774,7 +776,11 @@ void Warning(H3270 *session, const char *fmt, ...) trace("%s: title=%s fmt=%s",__FUNCTION__,"3270 Warning",fmt); va_start(arg_ptr, fmt); + + session->popups++; session->cbk.popup(session,LIB3270_NOTIFY_WARNING, _( "3270 Warning" ),NULL,fmt,arg_ptr); + session->popups--; + va_end(arg_ptr); } @@ -789,7 +795,11 @@ void popup_an_error(H3270 *session, const char *fmt, ...) trace("%s: title=%s fmt=%s",__FUNCTION__,"3270 Error",fmt); va_start(args, fmt); + + session->popups++; session->cbk.popup(session,LIB3270_NOTIFY_ERROR,_( "3270 Error" ),NULL,fmt,args); + session->popups--; + va_end(args); } @@ -803,7 +813,11 @@ void popup_system_error(H3270 *session, const char *title, const char *message, trace("%s: title=%s msg=%s",__FUNCTION__,"3270 Error",message); va_start(args, fmt); + + session->popups++; session->cbk.popup(session,LIB3270_NOTIFY_ERROR,title ? title : _( "3270 Error" ), message,fmt,args); + session->popups--; + va_end(args); } @@ -924,7 +938,11 @@ LIB3270_EXPORT void lib3270_popup_dialog(H3270 *session, LIB3270_NOTIFY id , con LIB3270_EXPORT void lib3270_popup_va(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, va_list args) { CHECK_SESSION_HANDLE(session); + + session->popups++; session->cbk.popup(session,id,title ? title : _( "3270 Error" ), message,fmt,args); + session->popups--; + } LIB3270_EXPORT int lib3270_is_protected(H3270 *h, unsigned int baddr) diff --git a/src/lib3270/toggles.c b/src/lib3270/toggles.c index c5daabf..9461551 100644 --- a/src/lib3270/toggles.c +++ b/src/lib3270/toggles.c @@ -352,7 +352,7 @@ static void toggle_reconnect(H3270 *hSession, struct lib3270_toggle *t unused, L /* Schedule an automatic reconnection. */ lib3270_write_log(hSession,"toggle","Auto-reconnect toggle was activated when offline, reconnecting"); hSession->auto_reconnect_inprogress = 1; - (void) AddTimeOut(RECONNECT_MS, hSession, lib3270_reconnect); + (void) AddTimer(RECONNECT_MS, hSession, lib3270_reconnect); } } -- libgit2 0.21.2