comparison src/java.smartcardio/share/native/libj2pcsc/pcsc.c @ 59067:6e321004dde1

fix on test ListModuleDeps.java
author vromero
date Tue, 03 Dec 2019 23:45:06 -0500
parents dccdf51b10dd
children
comparison
equal deleted inserted replaced
1:3c960dcb51bb 2:ddb4a3f3d31a
1 /* 1 /*
2 * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
179 JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReaders 179 JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReaders
180 (JNIEnv *env, jclass thisClass, jlong jContext) 180 (JNIEnv *env, jclass thisClass, jlong jContext)
181 { 181 {
182 SCARDCONTEXT context = (SCARDCONTEXT)jContext; 182 SCARDCONTEXT context = (SCARDCONTEXT)jContext;
183 LONG rv; 183 LONG rv;
184 LPTSTR mszReaders = NULL; 184 LPSTR mszReaders = NULL;
185 DWORD size = 0; 185 DWORD size = 0;
186 jobjectArray result; 186 jobjectArray result;
187 187
188 dprintf1("-context: %x\n", context); 188 dprintf1("-context: %x\n", context);
189 rv = CALL_SCardListReaders(context, NULL, NULL, &size); 189 rv = CALL_SCardListReaders(context, NULL, NULL, &size);
218 (JNIEnv *env, jclass thisClass, jlong jContext, jstring jReaderName, 218 (JNIEnv *env, jclass thisClass, jlong jContext, jstring jReaderName,
219 jint jShareMode, jint jPreferredProtocols) 219 jint jShareMode, jint jPreferredProtocols)
220 { 220 {
221 SCARDCONTEXT context = (SCARDCONTEXT)jContext; 221 SCARDCONTEXT context = (SCARDCONTEXT)jContext;
222 LONG rv; 222 LONG rv;
223 LPCTSTR readerName; 223 LPCSTR readerName;
224 SCARDHANDLE card = 0; 224 SCARDHANDLE card = 0;
225 DWORD proto = 0; 225 DWORD proto = 0;
226 226
227 readerName = (*env)->GetStringUTFChars(env, jReaderName, NULL); 227 readerName = (*env)->GetStringUTFChars(env, jReaderName, NULL);
228 if (readerName == NULL) { 228 if (readerName == NULL) {