Commit 5ba60f6d550ee69672ed7888030f4ac54d6068f2
1 parent
8877f82b
Exists in
master
Incluindo identificador da sessão durante chamada de função em background
Showing
4 changed files
with
7 additions
and
7 deletions
Show diff stats
latest/src/gtk2/iocallback.c
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | #include "oia.h" |
52 | 52 | |
53 | 53 | #ifdef G_THREADS_ENABLED |
54 | - static int static_CallAndWait(int(*callback)(void *), void *parm); | |
54 | + static int static_CallAndWait(int(*callback)(void *), H3270 *session, void *parm); | |
55 | 55 | #endif |
56 | 56 | |
57 | 57 | static unsigned long static_AddInput(int source, H3270 *session, void (*fn)(H3270 *session)); |
... | ... | @@ -303,7 +303,7 @@ gpointer BgCall(struct bgParameter *p) |
303 | 303 | return 0; |
304 | 304 | } |
305 | 305 | |
306 | -static int static_CallAndWait(int(*callback)(void *), void *parm) | |
306 | +static int static_CallAndWait(int(*callback)(void *), H3270 *session, void *parm) | |
307 | 307 | { |
308 | 308 | struct bgParameter p = { TRUE, -1, callback, parm }; |
309 | 309 | GThread *thread; | ... | ... |
latest/src/include/lib3270/api.h
... | ... | @@ -435,7 +435,7 @@ |
435 | 435 | unsigned long (*AddOutput)(int source, H3270 *session, void (*fn)(H3270 *session)); |
436 | 436 | #endif /*]*/ |
437 | 437 | |
438 | - int (*CallAndWait)(int(*callback)(void *), void *parm); | |
438 | + int (*CallAndWait)(int(*callback)(void *), H3270 *session, void *parm); | |
439 | 439 | |
440 | 440 | int (*Wait)(int seconds); |
441 | 441 | int (*RunPendingEvents)(int wait); |
... | ... | @@ -594,7 +594,7 @@ |
594 | 594 | |
595 | 595 | #define Toggled(ix) lib3270_get_toogle(NULL,ix) |
596 | 596 | |
597 | - LIB3270_EXPORT int CallAndWait(int(*callback)(void *), void *parm); | |
597 | + LIB3270_EXPORT int CallAndWait(int(*callback)(void *), H3270 *session, void *parm); | |
598 | 598 | LIB3270_EXPORT void RunPendingEvents(int wait); |
599 | 599 | LIB3270_EXPORT int Wait(int seconds); |
600 | 600 | ... | ... |
latest/src/lib/XtGlue.c
... | ... | @@ -957,10 +957,10 @@ LIB3270_EXPORT int lib3270_in_e(H3270 *h) |
957 | 957 | return (h->cstate >= CONNECTED_INITIAL_E); |
958 | 958 | } |
959 | 959 | |
960 | -int CallAndWait(int(*callback)(void *),void *parm) | |
960 | +int CallAndWait(int(*callback)(void *), H3270 *session, void *parm) | |
961 | 961 | { |
962 | 962 | if(callbacks->CallAndWait) |
963 | - return callbacks->CallAndWait(callback,parm); | |
963 | + return callbacks->CallAndWait(callback,session,parm); | |
964 | 964 | else |
965 | 965 | return callback(parm); |
966 | 966 | } | ... | ... |
latest/src/lib/resolver.c
... | ... | @@ -183,7 +183,7 @@ int resolve_host_and_port(const char *host, char *portname, unsigned short *ppor |
183 | 183 | |
184 | 184 | Trace("Calling resolver for %s", p.host); |
185 | 185 | |
186 | - rc = CallAndWait((int (*)(void *)) cresolve_host_and_port,&p); | |
186 | + rc = CallAndWait((int (*)(void *)) cresolve_host_and_port,&h3270,&p); | |
187 | 187 | |
188 | 188 | Trace("Calling resolver for %s exits with %d", p.host, rc); |
189 | 189 | ... | ... |