From a1a115bf69eda1bbd90e0a0b2b6e7f0373fc2937 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Wed, 29 Apr 2015 00:47:49 +0000 Subject: [PATCH] Atualizando interface libreoffice --- connect.c | 8 +++++--- iocalls.c | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/connect.c b/connect.c index cb17e7d..59f32c5 100644 --- a/connect.c +++ b/connect.c @@ -82,9 +82,11 @@ static void net_connected(H3270 *hSession, int fd, LIB3270_IO_FLAG flag, void *d int err; socklen_t len = sizeof(err); - trace("%s write=%p",__FUNCTION__,hSession->ns_write_id); - lib3270_remove_poll(hSession->ns_write_id); - hSession->ns_write_id = NULL; + if(hSession->ns_write_id) { + trace("%s write=%p",__FUNCTION__,hSession->ns_write_id); + lib3270_remove_poll(hSession->ns_write_id); + hSession->ns_write_id = NULL; + } if(getsockopt(hSession->sock, SOL_SOCKET, SO_ERROR, (char *) &err, &len) < 0) { diff --git a/iocalls.c b/iocalls.c index e4ae777..c9124e3 100644 --- a/iocalls.c +++ b/iocalls.c @@ -628,6 +628,7 @@ void x_except_on(H3270 *h) { int reading = (h->ns_read_id != NULL); + debug("%s",__FUNCTION__); if(h->ns_exception_id) return; @@ -638,6 +639,7 @@ void x_except_on(H3270 *h) if(reading) h->ns_read_id = lib3270_add_poll_fd(h,h->sock,LIB3270_IO_FLAG_READ,net_input,0); + debug("%s",__FUNCTION__); } -- libgit2 0.21.2