Commit 856f6f8f932a5f3df9cdb59ee23902ac56bf54b4
1 parent
3c622f36
Exists in
master
and in
3 other branches
Fixing bug in the "wait-for-connect" process.
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/core/linux/connect.c
| ... | ... | @@ -32,6 +32,7 @@ |
| 32 | 32 | #include <errno.h> |
| 33 | 33 | #include <lib3270/trace.h> |
| 34 | 34 | #include <lib3270/toggle.h> |
| 35 | +#include "kybdc.h" | |
| 35 | 36 | |
| 36 | 37 | #include <sys/types.h> |
| 37 | 38 | #include <sys/socket.h> |
| ... | ... | @@ -282,13 +283,16 @@ static void net_connected(H3270 *hSession, int GNUC_UNUSED(fd), LIB3270_IO_FLAG |
| 282 | 283 | case LIB3270_CONNECTED_INITIAL_E: |
| 283 | 284 | case LIB3270_CONNECTED_NVT: |
| 284 | 285 | case LIB3270_CONNECTED_SSCP: |
| 286 | + case LIB3270_RESOLVING: | |
| 285 | 287 | break; |
| 286 | 288 | |
| 287 | 289 | case LIB3270_NOT_CONNECTED: |
| 288 | 290 | return errno = ENOTCONN; |
| 289 | 291 | |
| 290 | 292 | case LIB3270_CONNECTED_TN3270E: |
| 291 | - return 0; | |
| 293 | + if(!hSession->starting) | |
| 294 | + return 0; | |
| 295 | + break; | |
| 292 | 296 | |
| 293 | 297 | default: |
| 294 | 298 | lib3270_write_log(hSession,"connect", "%s: State changed to unexpected state %d",__FUNCTION__,hSession->cstate); | ... | ... |