| ++found; | ||
| last = i; | ||
| if (strlen(values[i]) == len) | ||
| return i; /* exact macth no need to check more */ | ||
| } | ||
| } | ||
| *p++ = data->data.mf.header[14]; | ||
| /* if sm is required use combined mode */ | ||
| if (file->acl[SC_AC_OP_CREATE] && (sc_file_get_acl_entry(file, SC_AC_OP_CREATE))->method & SC_AC_PRO) | ||
| tmp = 0x03; /* combinde mode */ | ||
| else | ||
| tmp = 0x00; /* no sm */ | ||
| *p++ = tmp; /* use the same sm mode for all ops */ | ||
| LOG_FUNC_RETURN(reader->ctx, SC_SUCCESS); | ||
| } | ||
| /* the system could not detect the reader. It means, the prevoiusly attached reader is disconnected. */ | ||
| if (rv == (LONG)SCARD_E_UNKNOWN_READER | ||
| #ifdef SCARD_E_NO_READERS_AVAILABLE | ||
| || rv == (LONG)SCARD_E_NO_READERS_AVAILABLE | ||
| else { | ||
| rgReaderStates = (SCARD_READERSTATE *)(*reader_states); | ||
| for (num_watch = 0; rgReaderStates[num_watch].szReader; num_watch++) | ||
| sc_log(ctx, "re-use reader '%s'", rgReaderStates[num_watch].szReader); | ||
| } | ||
| #ifndef _WIN32 | ||
| /* Establish a new context, assuming that it is called from a different thread with pcsc-lite */ | ||
| priv->ec_curves = ec_curves_openpgp; | ||
| } | ||
| /* change file path to MF for re-use in MF */ | ||
| sc_format_path("3f00", &file->path); | ||
| /* set up the root of our fake file tree */ | ||