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
194
195
196
197
198
199
200

201
202
203
204
205
206
207
193
194
195
196
197
198
199

200
201
202
203
204
205
206
207







-
+







		fprintf(stderr, "%s():%i: ", func, line);
		fprintf(stderr, "REALLOC(%p) = %p", ptr, retval);
		fprintf(stderr, "\n");
		fflush(stderr);
	}

	if (retval == NULL) {
		CACKEY_DEBUG_PRINTF(" *** ERROR *** realloc returned NULL");
		CACKEY_DEBUG_PRINTF(" *** ERROR *** realloc returned NULL (size = %lu)", (unsigned long) size);
	}

	return(retval);
}

static char *CACKEY_DEBUG_FUNC_STRDUP(const char *ptr, const char *func, int line) {
	char *retval;
385
386
387
388
389
390
391
392
393
394
395




396
397
398
399
400
401
402
385
386
387
388
389
390
391


392
393
394
395
396
397
398
399
400
401
402
403
404







-
-


+
+
+
+







			return("SCARD_E_DUPLICATE_READER");
		case SCARD_E_CARD_UNSUPPORTED:
			return("SCARD_E_CARD_UNSUPPORTED");
		case SCARD_E_NO_SERVICE:
			return("SCARD_E_NO_SERVICE");
		case SCARD_E_SERVICE_STOPPED:
			return("SCARD_E_SERVICE_STOPPED");
		case SCARD_W_INSERTED_CARD:
			return("SCARD_W_INSERTED_CARD");
		case SCARD_E_UNSUPPORTED_FEATURE:
			return("SCARD_E_UNSUPPORTED_FEATURE");
#ifdef SCARD_W_INSERTED_CARD
		case SCARD_W_INSERTED_CARD:
			return("SCARD_W_INSERTED_CARD");
#endif
#ifdef SCARD_E_NO_READERS_AVAILABLE
		case SCARD_E_NO_READERS_AVAILABLE:
			return("SCARD_E_NO_READERS_AVAILABLE");
#endif
	}

	return("UNKNOWN");