Commit e496981ffc7b9620903b515fb770ed3750737d5e

Authored by Perry Werneck
1 parent 55f587fb

Fixing hang on multiple connect/disconnect operations

src/lib3270/linux/connect.c
... ... @@ -30,6 +30,7 @@
30 30 #include <config.h>
31 31 #include "../private.h"
32 32 #include <errno.h>
  33 +#include <lib3270/trace.h>
33 34  
34 35 #include <sys/types.h>
35 36 #include <sys/socket.h>
... ... @@ -187,8 +188,6 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u
187 188 CHECK_SESSION_HANDLE(hSession);
188 189 memset(&host,0,sizeof(host));
189 190  
190   - lib3270_main_iterate(hSession,0);
191   -
192 191 if(hSession->auto_reconnect_inprogress)
193 192 return errno = EAGAIN;
194 193  
... ... @@ -211,6 +210,8 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u
211 210  
212 211 snprintf(hSession->full_model_name,LIB3270_FULL_MODEL_NAME_LENGTH,"IBM-327%c-%d",hSession->m3279 ? '9' : '8', hSession->model_num);
213 212  
  213 + lib3270_trace_event(hSession,"Reconnecting to %s\n",lib3270_get_url(hSession));
  214 +
214 215 hSession->ever_3270 = False;
215 216 hSession->cstate = LIB3270_RESOLVING;
216 217  
... ...
src/lib3270/windows/connect.c
... ... @@ -225,8 +225,6 @@ int lib3270_reconnect(H3270 *hSession, int seconds)
225 225  
226 226 memset(&host,0,sizeof(host));
227 227  
228   - lib3270_main_iterate(hSession,0);
229   -
230 228 if(hSession->auto_reconnect_inprogress)
231 229 return errno = EAGAIN;
232 230  
... ...