summaryrefslogtreecommitdiffstats
path: root/libtdenetwork/gpgmepp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-04-28 16:44:42 -0500
committerTimothy Pearson <[email protected]>2013-04-28 16:44:42 -0500
commit7bd54f5a796f6f1276bbd310deaf1f2ac673954d (patch)
tree734f820f207e48208ae734b36ca12a8b90b9790b /libtdenetwork/gpgmepp
parent8e5a6176843c174bd8dc1bc740518692bd0ab61d (diff)
downloadtdepim-7bd54f5a796f6f1276bbd310deaf1f2ac673954d.tar.gz
tdepim-7bd54f5a796f6f1276bbd310deaf1f2ac673954d.zip
Fix retriggering of GPGMe socket notifiers in nested event loops
This resolves Bug 825 Add missing GPGMe feature checks to CMake
Diffstat (limited to 'libtdenetwork/gpgmepp')
-rw-r--r--libtdenetwork/gpgmepp/callbacks.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libtdenetwork/gpgmepp/callbacks.cpp b/libtdenetwork/gpgmepp/callbacks.cpp
index ba9c30bf0..23cc55e82 100644
--- a/libtdenetwork/gpgmepp/callbacks.cpp
+++ b/libtdenetwork/gpgmepp/callbacks.cpp
@@ -64,9 +64,10 @@ gpgme_error_t passphrase_callback( void * opaque, const char * uid_hint, const c
bool canceled = false;
gpgme_error_t err = GPG_ERR_NO_ERROR;
char * passphrase = provider ? provider->getPassphrase( uid_hint, desc, prev_was_bad, canceled ) : 0 ;
- if ( canceled )
+ if ( canceled ) {
err = makeError( GPG_ERR_CANCELED );
- else
+ }
+ else {
if ( passphrase && *passphrase ) {
size_t passphrase_length = strlen( passphrase );
size_t written = 0;
@@ -79,7 +80,7 @@ gpgme_error_t passphrase_callback( void * opaque, const char * uid_hint, const c
written += now_written;
} while ( written < passphrase_length );
}
-
+ }
if ( passphrase && *passphrase )
wipe( passphrase, strlen( passphrase ) );
free( passphrase );