El mié, 09-03-2011 a las 10:29 +0100, Viktor TARASOV escribió: > Hello, > > > On 09.03.2011 09:39, jons...@terra.es wrote: > > Trying to optimize DNIe card driver, I'd like to cache current df to avoid > > extra select_file()'s [...] > > Also, I've noticed that sc_(un)lock() clears sc_card_cache. Is this > > correct?. I cannot see > > the reason on this behaviour > Afais, it's not true. In sc_lock() cache is invalidated after the > SC_ERROR_CARD_RESET and SC_ERROR_READER_REATTACHED errors. > In sc_ulock() cache invalidation is disabled by the non-defined 'define' > macro.
You're right. Perhaps I need something better than "grep" to study code... :-) > > Any ideas?. Actually I'm working wiht cache code from card-flex.c, > but unsure if there is a better approach for "my" card > As for me, the current_df/ef is more general solution, > but if you don't need to cache FCI -- the current_path is more simple. Finally I've developed my own handling of "current_path" approach by tracking DNIe file->id data... Result is up to 3 times faster than uncached code Thanks for your tips. Current code (LGPL - what about ticket #205? -) is available at: https://forja.cenatic.es/plugins/scmsvn/viewcvs.php/opensc-opendnie/trunk/?root=opendnie > > BTW: Martin: We are working in a "DNIe hackfest meeting" next month, and > > would like > > to invite some people from OpenSC team to come to Spain to get a roadmap > > for DNIe > > integration into OpenSC mainstream I've been busy in get code as close to opensc style as possible: "doxygenize", "indent -linux", document and cleanup... IMO it's allmost ready for integration... but still need to decide a common way to integrate Secure Messaging cards Juan Antonio _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel