[Pcsclite-cvs-commit] r6054 - /trunk/PCSC/src/spy/pcsc-spy.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Oct 20 14:54:12 UTC 2011


Author: rousseau
Date: Thu Oct 20 14:54:11 2011
New Revision: 6054

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6054
Log:
log_out_n_str(): add special case for a null string length

Modified:
    trunk/PCSC/src/spy/pcsc-spy.py

Modified: trunk/PCSC/src/spy/pcsc-spy.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy.py?rev=6054&op=diff
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy.py (original)
+++ trunk/PCSC/src/spy/pcsc-spy.py Thu Oct 20 14:54:11 2011
@@ -308,12 +308,17 @@
         self.log_out("%s %s" % (size_name, data))
         size = int(data, 16)
         data_read = 0
-        while data_read < size:
+        if 0 == size:
             data = self.queue.get()
             self.log_out("%s %s" % (field_name, data))
-            if data == 'NULL':
-                break
-            data_read += len(data) + 1
+        else:
+            while data_read < size:
+                data = self.queue.get()
+                print "b", data
+                self.log_out("%s %s" % (field_name, data))
+                if data == 'NULL':
+                    break
+                data_read += len(data) + 1
 
     def log_name(self, name):
         """ log function name """




More information about the Pcsclite-cvs-commit mailing list