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,6 +49,7 @@ | ||
| 49 | #include "utilc.h" | 49 | #include "utilc.h" |
| 50 | #include "xioc.h" | 50 | #include "xioc.h" |
| 51 | #include "../ssl/crl.h" | 51 | #include "../ssl/crl.h" |
| 52 | +#include "screenc.h" | ||
| 52 | 53 | ||
| 53 | #include <errno.h> | 54 | #include <errno.h> |
| 54 | #include <lib3270/internals.h> | 55 | #include <lib3270/internals.h> |
| @@ -182,6 +183,8 @@ void lib3270_set_disconnected(H3270 *hSession) | @@ -182,6 +183,8 @@ void lib3270_set_disconnected(H3270 *hSession) | ||
| 182 | CHECK_SESSION_HANDLE(hSession); | 183 | CHECK_SESSION_HANDLE(hSession); |
| 183 | 184 | ||
| 184 | lib3270_set_cstate(hSession,LIB3270_NOT_CONNECTED); | 185 | lib3270_set_cstate(hSession,LIB3270_NOT_CONNECTED); |
| 186 | + mcursor_set(hSession,LIB3270_POINTER_LOCKED); | ||
| 187 | + | ||
| 185 | hSession->starting = 0; | 188 | hSession->starting = 0; |
| 186 | 189 | ||
| 187 | #if defined(HAVE_LIBSSL) | 190 | #if defined(HAVE_LIBSSL) |
src/core/state.c
| @@ -88,7 +88,7 @@ LIB3270_EXPORT int lib3270_in_e(const H3270 *h) | @@ -88,7 +88,7 @@ LIB3270_EXPORT int lib3270_in_e(const H3270 *h) | ||
| 88 | 88 | ||
| 89 | LIB3270_EXPORT int lib3270_is_unlocked(const H3270 *h) | 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 |