commit instead of cancel for win; closes #8
This commit is contained in:
12
src/pcsc.hxx
12
src/pcsc.hxx
@@ -180,7 +180,10 @@ namespace pcsc {
|
|||||||
[...]
|
[...]
|
||||||
t.commit(); // commit if we reach this line
|
t.commit(); // commit if we reach this line
|
||||||
} // cancelled, unless commit reaced
|
} // cancelled, unless commit reaced
|
||||||
@endcode */
|
@endcode
|
||||||
|
|
||||||
|
@note Micro$oft QinSCard does not know cancel, therefore
|
||||||
|
on Windoze cancel is replaced by commit. */
|
||||||
class Transaction {
|
class Transaction {
|
||||||
public:
|
public:
|
||||||
//! Begins a transaction.
|
//! Begins a transaction.
|
||||||
@@ -356,8 +359,15 @@ namespace pcsc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! Use scoped transactions with @ref Transaction
|
//! Use scoped transactions with @ref Transaction
|
||||||
|
/*! @note Micro$oft QinSCard does not know cancel, therefore
|
||||||
|
on Windoze cancel is replaced by commit. */
|
||||||
void cancelTransaction() {
|
void cancelTransaction() {
|
||||||
|
#ifdef WIN32
|
||||||
|
check(SCardEndTransaction(_id, SCARD_LEAVE_CARD),
|
||||||
|
"smartcard end transaction");
|
||||||
|
#else
|
||||||
check(SCardCancelTransaction(_id), "smartcard cancel transaction");
|
check(SCardCancelTransaction(_id), "smartcard cancel transaction");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! @throw not_implemented if _protocol is unknown. */
|
/*! @throw not_implemented if _protocol is unknown. */
|
||||||
|
Reference in New Issue
Block a user