Commit 5167705057b94751624fae6b76db137b86811c4b
1 parent
78dea1e8
Exists in
master
and in
3 other branches
Updating background tasks API.
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
src/include/lib3270.h
... | ... | @@ -827,7 +827,7 @@ |
827 | 827 | int (*Wait)(H3270 *hSession, int seconds); |
828 | 828 | int (*event_dispatcher)(H3270 *session, int wait); |
829 | 829 | void (*ring_bell)(H3270 *session); |
830 | - int (*run_task)(int(*callback)(H3270 *, void *), H3270 *session, void *parm); | |
830 | + int (*run_task)(H3270 *session, int(*callback)(H3270 *, void *), void *parm); | |
831 | 831 | |
832 | 832 | } LIB3270_IO_CONTROLLER; |
833 | 833 | ... | ... |
src/lib3270/iocalls.c
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | |
56 | 56 | static void internal_ring_bell(H3270 *session); |
57 | 57 | |
58 | - static int internal_run_task(int(*callback)(H3270 *, void *), H3270 *session, void *parm); | |
58 | + static int internal_run_task(H3270 *session, int(*callback)(H3270 *, void *), void *parm); | |
59 | 59 | |
60 | 60 | /*---[ Active callbacks ]-----------------------------------------------------------------------------------*/ |
61 | 61 | |
... | ... | @@ -210,7 +210,7 @@ static void * internal_add_poll(H3270 *session, int fd, LIB3270_IO_FLAG flag, vo |
210 | 210 | ip->userdata = userdata; |
211 | 211 | ip->call = call; |
212 | 212 | |
213 | - ip->next = (input_t *) session->inputs; | |
213 | + ip->next = session->inputs; | |
214 | 214 | |
215 | 215 | session->inputs = ip; |
216 | 216 | session->inputs_changed = 1; |
... | ... | @@ -449,8 +449,8 @@ LIB3270_EXPORT void lib3270_ring_bell(H3270 *session) |
449 | 449 | ring_bell(session); |
450 | 450 | } |
451 | 451 | |
452 | -int internal_run_task(int(*callback)(H3270 *, void *), H3270 *session, void *parm) { | |
453 | - return callback(session,parm); | |
452 | +int internal_run_task(H3270 *hSession, int(*callback)(H3270 *, void *), void *parm) { | |
453 | + return callback(hSession,parm); | |
454 | 454 | } |
455 | 455 | |
456 | 456 | /** |
... | ... | @@ -471,7 +471,7 @@ LIB3270_EXPORT int lib3270_run_task(H3270 *hSession, int(*callback)(H3270 *h, vo |
471 | 471 | CHECK_SESSION_HANDLE(hSession); |
472 | 472 | |
473 | 473 | hSession->cbk.set_timer(hSession,1); |
474 | - rc = run_task(callback,hSession,parm); | |
474 | + rc = run_task(hSession,callback,parm); | |
475 | 475 | hSession->cbk.set_timer(hSession,0); |
476 | 476 | |
477 | 477 | return rc; | ... | ... |