diff options
author | Werner Koch <[email protected]> | 2010-06-29 17:11:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-06-29 17:11:03 +0000 |
commit | 4b46af9e571f5dad8fec24c7fa30c31231a59e6f (patch) | |
tree | 7507d88580939041259e182d1538dbca10ebff47 /src/gpgcedev.c | |
parent | 2010-06-11 Marcus Brinkmann <[email protected]> (diff) | |
download | libassuan-4b46af9e571f5dad8fec24c7fa30c31231a59e6f.tar.gz libassuan-4b46af9e571f5dad8fec24c7fa30c31231a59e6f.zip |
Handle NOTIFY event.
Diffstat (limited to 'src/gpgcedev.c')
-rw-r--r-- | src/gpgcedev.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gpgcedev.c b/src/gpgcedev.c index c0feda9..88013d6 100644 --- a/src/gpgcedev.c +++ b/src/gpgcedev.c @@ -25,7 +25,7 @@ #include <winioctl.h> #define ENABLE_DEBUG -#warning Cancel and caller process termination not handled. +#warning Cancel not handled. /* Missing IOCTLs in the current mingw32ce. */ @@ -826,8 +826,15 @@ GPG_IOControl (DWORD opnctx_arg, DWORD code, void *inbuf, DWORD inbuflen, break; case IOCTL_PSL_NOTIFY: + /* This notification is received if the application's main + thread exits and the application has other threads running + and the application has open handles for this device. What + we do is to unblock them all simialr to an explicit unblock + call. */ log_debug ("GPG_IOControl (ctx=0x%p): code: NOTIFY\n", (void*)opnctx); - /* Unexpected process termination. */ + + if (unblock_call (opnctx)) + result = TRUE; break; default: |