Commit 19acc0779f0569bee41c1eb91419fcee004fdcb9
1 parent
cec20ff7
Exists in
master
and in
3 other branches
Melhorando compatibilidade com a libwebsockets
Showing
1 changed file
with
37 additions
and
0 deletions
Show diff stats
iocalls.c
| ... | ... | @@ -285,6 +285,43 @@ LIB3270_EXPORT void lib3270_remove_poll(void *id) { |
| 285 | 285 | remove_poll(id); |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | +LIB3270_EXPORT void lib3270_remove_poll_fd(int fd) | |
| 289 | +{ | |
| 290 | + | |
| 291 | + input_t *ip; | |
| 292 | + | |
| 293 | + for (ip = inputs; ip != (input_t *)NULL; ip = ip->next) | |
| 294 | + { | |
| 295 | + if(ip->fd == fd) | |
| 296 | + { | |
| 297 | + remove_poll(ip); | |
| 298 | + return; | |
| 299 | + } | |
| 300 | + } | |
| 301 | + | |
| 302 | + lib3270_write_log(NULL,"iocalls","Invalid or unexpected FD on %s(%d)",__FUNCTION__,fd); | |
| 303 | + | |
| 304 | +} | |
| 305 | + | |
| 306 | +LIB3270_EXPORT void lib3270_update_poll_fd(int fd, LIB3270_IO_FLAG flag) | |
| 307 | +{ | |
| 308 | + | |
| 309 | + input_t *ip; | |
| 310 | + | |
| 311 | + for (ip = inputs; ip != (input_t *)NULL; ip = ip->next) | |
| 312 | + { | |
| 313 | + if(ip->fd == fd) | |
| 314 | + { | |
| 315 | + ip->flag = flag; | |
| 316 | + return; | |
| 317 | + } | |
| 318 | + } | |
| 319 | + | |
| 320 | + lib3270_write_log(NULL,"iocalls","Invalid or unexpected FD on %s(%d)",__FUNCTION__,fd); | |
| 321 | + | |
| 322 | +} | |
| 323 | + | |
| 324 | + | |
| 288 | 325 | LIB3270_EXPORT void * lib3270_add_poll_fd(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*call)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata ) { |
| 289 | 326 | return add_poll(session,fd,flag,call,userdata); |
| 290 | 327 | } | ... | ... |