diff --git a/src/lib3270/host.c b/src/lib3270/host.c index 254553a..53d5f5b 100644 --- a/src/lib3270/host.c +++ b/src/lib3270/host.c @@ -69,9 +69,9 @@ int lib3270_check_for_auto_reconnect(H3270 *hSession) if(hSession->auto_reconnect_inprogress) { lib3270_write_log(hSession,"3270","Starting auto-reconnect on %s",lib3270_get_url(hSession)); - hSession->auto_reconnect_inprogress = 0; // Reset "in-progress" to allow reconnection. if(lib3270_reconnect(hSession,0)) lib3270_write_log(hSession,"3270","Auto-reconnect fails: %s",strerror(errno)); + hSession->auto_reconnect_inprogress = 0; // Reset "in-progress" to allow reconnection. } return 0; diff --git a/src/lib3270/toggles.c b/src/lib3270/toggles.c index 1e58224..111d252 100644 --- a/src/lib3270/toggles.c +++ b/src/lib3270/toggles.c @@ -340,6 +340,7 @@ static void toggle_keepalive(H3270 *session, struct lib3270_toggle *t unused, LI } } +/* static void toggle_reconnect(H3270 *hSession, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE type ) { @@ -349,13 +350,14 @@ static void toggle_reconnect(H3270 *hSession, struct lib3270_toggle *t unused, L if(t->value && !hSession->auto_reconnect_inprogress) { - /* Schedule an automatic reconnection. */ + // Schedule an automatic reconnection. lib3270_write_log(hSession,"toggle","Auto-reconnect toggle was activated when offline, reconnecting"); hSession->auto_reconnect_inprogress = 1; (void) AddTimer(RECONNECT_MS, hSession, lib3270_check_for_auto_reconnect); } } +*/ /** * @brief Called from system initialization code to handle initial toggle settings. @@ -372,7 +374,7 @@ void initialize_toggles(H3270 *session) session->toggle[LIB3270_TOGGLE_UNDERLINE].upcall = toggle_redraw; session->toggle[LIB3270_TOGGLE_ALTSCREEN].upcall = toggle_altscreen; session->toggle[LIB3270_TOGGLE_KEEP_ALIVE].upcall = toggle_keepalive; - session->toggle[LIB3270_TOGGLE_RECONNECT].upcall = toggle_reconnect; +// session->toggle[LIB3270_TOGGLE_RECONNECT].upcall = toggle_reconnect; for(f=0;f