Have equal number of sc_lock and sc_unlock loglines to aid debugging locking.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3064 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
66f3d64e5a
commit
ff5f55417f
|
@ -282,13 +282,14 @@ int sc_lock(sc_card_t *card)
|
|||
{
|
||||
int r = 0, r2 = 0;
|
||||
|
||||
SC_FUNC_CALLED(card->ctx, 3);
|
||||
|
||||
if (card == NULL)
|
||||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
r = sc_mutex_lock(card->ctx, card->mutex);
|
||||
if (r != SC_SUCCESS)
|
||||
return r;
|
||||
if (card->lock_count == 0) {
|
||||
SC_FUNC_CALLED(card->ctx, 3);
|
||||
if (card->reader->ops->lock != NULL)
|
||||
r = card->reader->ops->lock(card->reader, card->slot);
|
||||
if (r == 0)
|
||||
|
|
Loading…
Reference in New Issue