From: Marcus Brinkmann Date: Thu, 10 Jan 2008 13:38:34 +0000 (+0000) Subject: 2008-01-10 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~90 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03c9f8cb3875c1a2dec4ca93b388065a728b1aaf;p=gpgme.git 2008-01-10 Marcus Brinkmann * kdpipeiodevice.cpp: New version from Frank Osterfeld. --- diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 9f5bbe6..60b4e50 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,5 +1,7 @@ 2008-01-10 Marcus Brinkmann + * kdpipeiodevice.cpp: New version from Frank Osterfeld. + * engine-gpgconf.c (gpgconf_config_load_cb2): Handle the flag NO_ARG_DESC. diff --git a/trunk/gpgme/kdpipeiodevice.cpp b/trunk/gpgme/kdpipeiodevice.cpp index 9e0179c..dd2503b 100644 --- a/trunk/gpgme/kdpipeiodevice.cpp +++ b/trunk/gpgme/kdpipeiodevice.cpp @@ -329,11 +329,14 @@ void KDPipeIODevice::Private::emitReadyRead() emit q->readyRead(); if ( !thisPointer ) - return; - qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter ); - synchronized( reader ) { - qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter ); - reader->readyReadSentCondition.wakeAll(); + return; + + if ( reader ) { + qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter ); + synchronized( reader ) { + qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter ); + reader->readyReadSentCondition.wakeAll(); + } } qDebug( "KDPipeIODevice::Private::emitReadyRead %p leaving %d", this, counter ); @@ -704,7 +707,7 @@ void Reader::run() { while ( !cancel && !error && bufferFull() ) { notifyReadyRead(); - if ( bufferFull() ) { + if ( !cancel && bufferFull() ) { qDebug( "%p: Reader::run: buffer is full, going to sleep", this ); bufferNotFullCondition.wait( &mutex ); }