Commit e68a04bc88e0c6f97c1334af56532e2e2fc68cea

Authored by Perry Werneck
1 parent 54b2a73c

Fixing multi-thread issues.

src/lib3270/iocalls.c
... ... @@ -289,8 +289,11 @@ LIB3270_EXPORT void lib3270_remove_poll(H3270 *session, void *id)
289 289  
290 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 299 LIB3270_EXPORT void lib3270_remove_poll_fd(H3270 *session, int fd)
... ... @@ -582,7 +585,7 @@ int non_blocking(H3270 *hSession, Boolean on)
582 585 lib3270_set_poll_state(hSession,hSession->xio.write, on);
583 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 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 286 hSession->ssl.host = 0;
287 287  
288 288 #if defined(HAVE_LIBSSL)
  289 + debug("** SSL init %s","begins");
289 290 if(hSession->ssl.enabled)
290 291 {
291 292 hSession->ssl.host = 1;
292 293 ssl_init(hSession);
293 294 }
  295 + debug("** SSL init %s","ends");
294 296 #endif // HAVE_LIBSSL
295 297  
296 298 // set options for inline out-of-band data and keepalives
... ...