Commit b13018e681ef852ac6238a1ad82442c618206519
1 parent
70ad251f
Exists in
master
Implementando atualizacao das flags da OIA e temporizador atraves da estrutura de controle de sessao
Showing
3 changed files
with
15 additions
and
6 deletions
Show diff stats
latest/src/include/lib3270/api.h
... | ... | @@ -273,7 +273,7 @@ |
273 | 273 | void (*configure)(H3270 *session, unsigned short rows, unsigned short cols); |
274 | 274 | void (*update)(H3270 *session, int baddr, unsigned char c, unsigned short attr); |
275 | 275 | void (*update_cursor)(H3270 *session, unsigned short row, unsigned short col); |
276 | - void (*set_oia)(H3270 *session, OIA_FLAG id, unsigned char on); | |
276 | + void (*update_oia)(H3270 *session, OIA_FLAG id, unsigned char on); | |
277 | 277 | void (*set_timer)(H3270 *session, unsigned char on); |
278 | 278 | void (*update_luname)(H3270 *session, const char *name); |
279 | 279 | void (*update_status)(H3270 *session, LIB3270_STATUS id); | ... | ... |
latest/src/lib/XtGlue.c
... | ... | @@ -959,12 +959,21 @@ LIB3270_EXPORT int lib3270_in_e(H3270 *h) |
959 | 959 | |
960 | 960 | LIB3270_EXPORT int lib3270_call_thread(int(*callback)(H3270 *h, void *), H3270 *h, void *parm) |
961 | 961 | { |
962 | + int rc; | |
962 | 963 | CHECK_SESSION_HANDLE(h); |
963 | 964 | |
965 | + if(h->set_timer) | |
966 | + h->set_timer(h,1); | |
967 | + | |
964 | 968 | if(callbacks->callthread) |
965 | - return callbacks->callthread(callback,h,parm); | |
969 | + rc = callbacks->callthread(callback,h,parm); | |
966 | 970 | else |
967 | - return callback(h,parm); | |
971 | + rc = callback(h,parm); | |
972 | + | |
973 | + if(h->set_timer) | |
974 | + h->set_timer(h,0); | |
975 | + | |
976 | + return rc; | |
968 | 977 | } |
969 | 978 | |
970 | 979 | void RunPendingEvents(int wait) | ... | ... |
latest/src/lib/screen.c
... | ... | @@ -133,7 +133,7 @@ int screen_init(H3270 *session) |
133 | 133 | session->update_cursor = callbacks->move_cursor; |
134 | 134 | |
135 | 135 | if(callbacks->set_oia) |
136 | - session->set_oia = callbacks->set_oia; | |
136 | + session->update_oia = callbacks->set_oia; | |
137 | 137 | |
138 | 138 | if(callbacks->set_viewsize) |
139 | 139 | session->configure = callbacks->set_viewsize; |
... | ... | @@ -496,8 +496,8 @@ void set_status(H3270 *session, LIB3270_FLAG id, Boolean on) |
496 | 496 | { |
497 | 497 | session->oia_flag[id] = (on != 0); |
498 | 498 | |
499 | - if(session->set_oia) | |
500 | - session->set_oia(session,id,on); | |
499 | + if(session->update_oia) | |
500 | + session->update_oia(session,id,session->oia_flag[id]); | |
501 | 501 | } |
502 | 502 | |
503 | 503 | } | ... | ... |