From b2074743b23d6e47c2cf6cc7200515404b8f73e9 Mon Sep 17 00:00:00 2001 From: okir Date: Tue, 16 Dec 2003 14:31:12 +0000 Subject: [PATCH] - reduced sc_lock/unlock debug messages even more git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1677 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libopensc/card.c b/src/libopensc/card.c index 1fda38d7..d33485e6 100644 --- a/src/libopensc/card.c +++ b/src/libopensc/card.c @@ -415,9 +415,9 @@ int sc_lock(struct sc_card *card) int r = 0; assert(card != NULL); - SC_FUNC_CALLED(card->ctx, 7); sc_mutex_lock(card->mutex); - if (card->lock_count == 0) { + 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) @@ -426,7 +426,7 @@ int sc_lock(struct sc_card *card) if (r == 0) card->lock_count++; sc_mutex_unlock(card->mutex); - SC_FUNC_RETURN(card->ctx, 7, r); + return r; } int sc_unlock(struct sc_card *card) @@ -434,10 +434,10 @@ int sc_unlock(struct sc_card *card) int r = 0; assert(card != NULL); - SC_FUNC_CALLED(card->ctx, 7); sc_mutex_lock(card->mutex); assert(card->lock_count >= 1); if (card->lock_count == 1) { + SC_FUNC_CALLED(card->ctx, 3); memset(&card->cache, 0, sizeof(card->cache)); card->cache_valid = 0; if (card->ops->logout != NULL) { @@ -455,7 +455,7 @@ int sc_unlock(struct sc_card *card) } card->lock_count--; sc_mutex_unlock(card->mutex); - SC_FUNC_RETURN(card->ctx, 7, r); + return r; } int sc_list_files(struct sc_card *card, u8 *buf, size_t buflen)