Commit b75921b8666687b83468768d2f43a2193a9f7888
1 parent
8be6924b
Exists in
master
and in
3 other branches
Corrigindo mensagem de host-not-found, salvando na configuracao quando o widget …
…e criado com um nome de host
Showing
2 changed files
with
11 additions
and
9 deletions
Show diff stats
iocalls.c
| ... | ... | @@ -529,8 +529,7 @@ static int internal_event_dispatcher(H3270 *hSession, int block) |
| 529 | 529 | |
| 530 | 530 | static int internal_callthread(int(*callback)(H3270 *, void *), H3270 *session, void *parm) |
| 531 | 531 | { |
| 532 | - callback(session,parm); | |
| 533 | - return 0; | |
| 532 | + return callback(session,parm); | |
| 534 | 533 | } |
| 535 | 534 | |
| 536 | 535 | static int internal_wait(H3270 *hSession, int seconds) |
| ... | ... | @@ -697,20 +696,18 @@ LIB3270_EXPORT int lib3270_register_handlers(const struct lib3270_callbacks *cbk |
| 697 | 696 | |
| 698 | 697 | LIB3270_EXPORT int lib3270_call_thread(int(*callback)(H3270 *h, void *), H3270 *h, void *parm) |
| 699 | 698 | { |
| 700 | -// int rc; | |
| 699 | + int rc; | |
| 701 | 700 | CHECK_SESSION_HANDLE(h); |
| 702 | 701 | |
| 703 | - if(h->set_timer) | |
| 704 | - h->set_timer(h,1); | |
| 702 | + h->set_timer(h,1); | |
| 705 | 703 | |
| 706 | 704 | lib3270_main_iterate(h,0); |
| 707 | - callthread(callback,h,parm); | |
| 705 | + rc = callthread(callback,h,parm); | |
| 708 | 706 | lib3270_main_iterate(h,0); |
| 709 | 707 | |
| 710 | - if(h->set_timer) | |
| 711 | - h->set_timer(h,0); | |
| 708 | + h->set_timer(h,0); | |
| 712 | 709 | |
| 713 | - return 0; | |
| 710 | + return rc; | |
| 714 | 711 | } |
| 715 | 712 | |
| 716 | 713 | LIB3270_EXPORT void lib3270_main_iterate(H3270 *hSession, int block) | ... | ... |
session.c
| ... | ... | @@ -155,6 +155,10 @@ static void update_ssl(H3270 *session, LIB3270_SSL_STATE state) |
| 155 | 155 | { |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | +static void set_timer(H3270 *session, unsigned char on) | |
| 159 | +{ | |
| 160 | +} | |
| 161 | + | |
| 158 | 162 | static void screen_disp(H3270 *session) |
| 159 | 163 | { |
| 160 | 164 | CHECK_SESSION_HANDLE(session); |
| ... | ... | @@ -198,6 +202,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model) |
| 198 | 202 | hSession->set_width = nop_int; |
| 199 | 203 | hSession->update_status = (void (*)(H3270 *, LIB3270_STATUS)) nop_int; |
| 200 | 204 | hSession->autostart = nop; |
| 205 | + hSession->set_timer = set_timer; | |
| 201 | 206 | |
| 202 | 207 | // Set the defaults. |
| 203 | 208 | hSession->extended = 1; | ... | ... |