[svn] GnuPG - r4856 - trunk/scd

svn author marcus cvs at cvs.gnupg.org
Tue Oct 21 15:53:09 CEST 2008


Author: marcus
Date: 2008-10-21 15:53:08 +0200 (Tue, 21 Oct 2008)
New Revision: 4856

Modified:
   trunk/scd/ChangeLog
   trunk/scd/command.c
Log:
2008-10-21  Marcus Brinkmann  <marcus at g10code.com>

	* command.c (open_card): If connect error is SW_HOST_NO_CARD,
	return a more descriptive error.


Modified: trunk/scd/ChangeLog
===================================================================
--- trunk/scd/ChangeLog	2008-10-20 13:53:23 UTC (rev 4855)
+++ trunk/scd/ChangeLog	2008-10-21 13:53:08 UTC (rev 4856)
@@ -1,3 +1,8 @@
+2008-10-21  Marcus Brinkmann  <marcus at g10code.com>
+
+	* command.c (open_card): If connect error is SW_HOST_NO_CARD,
+	return a more descriptive error.
+
 2008-10-20  Werner Koch  <wk at g10code.com>
 
 	* pcsc-wrapper.c (read_32): Use provided arg and not stdin.  Is

Modified: trunk/scd/command.c
===================================================================
--- trunk/scd/command.c	2008-10-20 13:53:23 UTC (rev 4855)
+++ trunk/scd/command.c	2008-10-21 13:53:08 UTC (rev 4856)
@@ -405,7 +405,12 @@
          select_application.  */
       int sw = apdu_connect (slot);
       if (sw && sw != SW_HOST_ALREADY_CONNECTED)
-        err = gpg_error (GPG_ERR_CARD);
+        {
+          if (sw == SW_HOST_NO_CARD)
+            err = gpg_error (GPG_ERR_CARD_NOT_PRESENT);
+          else
+            err = gpg_error (GPG_ERR_CARD);
+	}
       else
         err = select_application (ctrl, slot, apptype, &ctrl->app_ctx);
     }




More information about the Gnupg-commits mailing list