[svn] gpgme - r1275 - trunk/gpgme

svn author marcus cvs at cvs.gnupg.org
Thu Oct 11 15:04:09 CEST 2007


Author: marcus
Date: 2007-10-11 15:03:59 +0200 (Thu, 11 Oct 2007)
New Revision: 1275

Modified:
   trunk/gpgme/ChangeLog
   trunk/gpgme/kdpipeiodevice.cpp
Log:
2007-10-11  Marcus Brinkmann  <marcus at g10code.de>

	* kdpipeiodevice.cpp: New version from Frank Osterfeld.


Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog	2007-10-09 21:23:50 UTC (rev 1274)
+++ trunk/gpgme/ChangeLog	2007-10-11 13:03:59 UTC (rev 1275)
@@ -1,3 +1,7 @@
+2007-10-11  Marcus Brinkmann  <marcus at g10code.de>
+
+	* kdpipeiodevice.cpp: New version from Frank Osterfeld.
+
 2007-10-09  Marcus Brinkmann  <marcus at g10code.de>
 
 	* kdpipeiodevice.cpp: New version from Frank Osterfeld and Marc

Modified: trunk/gpgme/kdpipeiodevice.cpp
===================================================================
--- trunk/gpgme/kdpipeiodevice.cpp	2007-10-09 21:23:50 UTC (rev 1274)
+++ trunk/gpgme/kdpipeiodevice.cpp	2007-10-11 13:03:59 UTC (rev 1275)
@@ -728,7 +728,12 @@
             DWORD numRead;
 	    const bool ok = ReadFile( handle, buffer + wptr, numBytes, &numRead, 0 );
 	    mutex.lock();
-	    if ( !ok ) {
+	    if ( ok ) {
+                if ( numRead == 0 ) {
+                    qDebug( "%p: Reader::run: got eof (numRead==0)", this );
+                    eof = true;
+                } 
+            } else { // !ok
 	        errorCode = static_cast<int>( GetLastError() );
 	        if ( errorCode == ERROR_BROKEN_PIPE ) {
                     assert( numRead == 0 );
@@ -758,7 +763,7 @@
             }
 #endif
 	    qDebug( "%p: Reader::run: read %ld bytes", this, static_cast<long>(numRead) );
-	    qDebug( "%p (fd=%d): KDPipeIODevice::readData: %s", this, fd, buffer );
+	    qDebug( "%p: Reader::run(fd=%d): %s", this, fd, buffer );
 
 	    if ( numRead > 0 ) {
 	        qDebug( "%p: Reader::run: buffer before: rptr=%4d, wptr=%4d", this, rptr, wptr );




More information about the Gnupg-commits mailing list