Check-in [170e3dfda4]
Overview
Comment:Added more debugging for failed realloc()s

Added ifdefs to support more versions of PCSC in debug mode

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:170e3dfda4aff224766f578d7748183a41a02b34
User & Date: rkeene on 2010-05-23 07:07:11
Other Links: manifest | tags
Context
2010-05-26
15:58
Corrected issue with sending wrong APDU for selecting applet, failing on older cards check-in: 68ed2268aa user: rkeene tags: trunk
2010-05-23
07:07
Added more debugging for failed realloc()s

Added ifdefs to support more versions of PCSC in debug mode check-in: 170e3dfda4 user: rkeene tags: trunk

05:36
Updated to strip library more on Linux, and work on Solaris

Updated to try to support more protocols check-in: 5ba02cbd65 user: rkeene tags: trunk

Changes

Modified cackey.c from [5e1ae9e427] to [c8c7e5c610].

   193    193   		fprintf(stderr, "%s():%i: ", func, line);
   194    194   		fprintf(stderr, "REALLOC(%p) = %p", ptr, retval);
   195    195   		fprintf(stderr, "\n");
   196    196   		fflush(stderr);
   197    197   	}
   198    198   
   199    199   	if (retval == NULL) {
   200         -		CACKEY_DEBUG_PRINTF(" *** ERROR *** realloc returned NULL");
          200  +		CACKEY_DEBUG_PRINTF(" *** ERROR *** realloc returned NULL (size = %lu)", (unsigned long) size);
   201    201   	}
   202    202   
   203    203   	return(retval);
   204    204   }
   205    205   
   206    206   static char *CACKEY_DEBUG_FUNC_STRDUP(const char *ptr, const char *func, int line) {
   207    207   	char *retval;
................................................................................
   385    385   			return("SCARD_E_DUPLICATE_READER");
   386    386   		case SCARD_E_CARD_UNSUPPORTED:
   387    387   			return("SCARD_E_CARD_UNSUPPORTED");
   388    388   		case SCARD_E_NO_SERVICE:
   389    389   			return("SCARD_E_NO_SERVICE");
   390    390   		case SCARD_E_SERVICE_STOPPED:
   391    391   			return("SCARD_E_SERVICE_STOPPED");
   392         -		case SCARD_W_INSERTED_CARD:
   393         -			return("SCARD_W_INSERTED_CARD");
   394    392   		case SCARD_E_UNSUPPORTED_FEATURE:
   395    393   			return("SCARD_E_UNSUPPORTED_FEATURE");
          394  +#ifdef SCARD_W_INSERTED_CARD
          395  +		case SCARD_W_INSERTED_CARD:
          396  +			return("SCARD_W_INSERTED_CARD");
          397  +#endif
   396    398   #ifdef SCARD_E_NO_READERS_AVAILABLE
   397    399   		case SCARD_E_NO_READERS_AVAILABLE:
   398    400   			return("SCARD_E_NO_READERS_AVAILABLE");
   399    401   #endif
   400    402   	}
   401    403   
   402    404   	return("UNKNOWN");