Commit e68a04bc88e0c6f97c1334af56532e2e2fc68cea
1 parent
54b2a73c
Exists in
master
and in
3 other branches
Fixing multi-thread issues.
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
src/lib3270/iocalls.c
| @@ -289,8 +289,11 @@ LIB3270_EXPORT void lib3270_remove_poll(H3270 *session, void *id) | @@ -289,8 +289,11 @@ LIB3270_EXPORT void lib3270_remove_poll(H3270 *session, void *id) | ||
| 289 | 289 | ||
| 290 | LIB3270_EXPORT void lib3270_set_poll_state(H3270 *session, void *id, int enabled) | 290 | LIB3270_EXPORT void lib3270_set_poll_state(H3270 *session, void *id, int enabled) |
| 291 | { | 291 | { |
| 292 | - debug("%s(%d,%p,%d)",__FUNCTION__,session->sock,id,enabled); | ||
| 293 | - set_poll_state(session, id, enabled); | 292 | + if(id) |
| 293 | + { | ||
| 294 | + debug("%s: Polling on %d (%p) is %s",__FUNCTION__,session->sock,id,(enabled ? "enabled" : "disabled")); | ||
| 295 | + set_poll_state(session, id, enabled); | ||
| 296 | + } | ||
| 294 | } | 297 | } |
| 295 | 298 | ||
| 296 | LIB3270_EXPORT void lib3270_remove_poll_fd(H3270 *session, int fd) | 299 | LIB3270_EXPORT void lib3270_remove_poll_fd(H3270 *session, int fd) |
| @@ -582,7 +585,7 @@ int non_blocking(H3270 *hSession, Boolean on) | @@ -582,7 +585,7 @@ int non_blocking(H3270 *hSession, Boolean on) | ||
| 582 | lib3270_set_poll_state(hSession,hSession->xio.write, on); | 585 | lib3270_set_poll_state(hSession,hSession->xio.write, on); |
| 583 | lib3270_set_poll_state(hSession,hSession->xio.except, on); | 586 | lib3270_set_poll_state(hSession,hSession->xio.except, on); |
| 584 | 587 | ||
| 585 | - trace("Socket %d is %s",hSession->sock, on ? "non-blocking" : "blocking"); | 588 | + trace("******** Socket %d is %s",hSession->sock, on ? "non-blocking" : "blocking"); |
| 586 | 589 | ||
| 587 | return 0; | 590 | return 0; |
| 588 | } | 591 | } |
src/lib3270/linux/connect.c
| @@ -286,11 +286,13 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u | @@ -286,11 +286,13 @@ static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag u | ||
| 286 | hSession->ssl.host = 0; | 286 | hSession->ssl.host = 0; |
| 287 | 287 | ||
| 288 | #if defined(HAVE_LIBSSL) | 288 | #if defined(HAVE_LIBSSL) |
| 289 | + debug("** SSL init %s","begins"); | ||
| 289 | if(hSession->ssl.enabled) | 290 | if(hSession->ssl.enabled) |
| 290 | { | 291 | { |
| 291 | hSession->ssl.host = 1; | 292 | hSession->ssl.host = 1; |
| 292 | ssl_init(hSession); | 293 | ssl_init(hSession); |
| 293 | } | 294 | } |
| 295 | + debug("** SSL init %s","ends"); | ||
| 294 | #endif // HAVE_LIBSSL | 296 | #endif // HAVE_LIBSSL |
| 295 | 297 | ||
| 296 | // set options for inline out-of-band data and keepalives | 298 | // set options for inline out-of-band data and keepalives |