Commit b3e32ca60c4af24bea2d456c0c65572edfaec7fd
1 parent
911ed54f
Exists in
master
and in
3 other branches
Fixing "locked" signal on disconnect.
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
src/core/host.c
| ... | ... | @@ -49,6 +49,7 @@ |
| 49 | 49 | #include "utilc.h" |
| 50 | 50 | #include "xioc.h" |
| 51 | 51 | #include "../ssl/crl.h" |
| 52 | +#include "screenc.h" | |
| 52 | 53 | |
| 53 | 54 | #include <errno.h> |
| 54 | 55 | #include <lib3270/internals.h> |
| ... | ... | @@ -182,6 +183,8 @@ void lib3270_set_disconnected(H3270 *hSession) |
| 182 | 183 | CHECK_SESSION_HANDLE(hSession); |
| 183 | 184 | |
| 184 | 185 | lib3270_set_cstate(hSession,LIB3270_NOT_CONNECTED); |
| 186 | + mcursor_set(hSession,LIB3270_POINTER_LOCKED); | |
| 187 | + | |
| 185 | 188 | hSession->starting = 0; |
| 186 | 189 | |
| 187 | 190 | #if defined(HAVE_LIBSSL) | ... | ... |
src/core/state.c
| ... | ... | @@ -88,7 +88,7 @@ LIB3270_EXPORT int lib3270_in_e(const H3270 *h) |
| 88 | 88 | |
| 89 | 89 | LIB3270_EXPORT int lib3270_is_unlocked(const H3270 *h) |
| 90 | 90 | { |
| 91 | - return h->pointer == LIB3270_POINTER_UNLOCKED; | |
| 91 | + return (h->pointer == LIB3270_POINTER_UNLOCKED) && lib3270_is_connected(h); | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | ... | ... |