[Pcsclite-git-commit] [PCSC] 01/06: ContextThread(): minor code reformat
Ludovic Rousseau
rousseau at moszumanska.debian.org
Fri Jan 27 20:40:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository PCSC.
commit ed741436fd6ce048b73b0d3e1b343c7aea7691cc
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Fri Jan 27 09:34:44 2017 +0100
ContextThread(): minor code reformat
Set SCARD_E_INVALID_HANDLE as a default return value for SCARD_CANCEL.
This change will be needed later in the next commits.
---
src/winscard_svc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/winscard_svc.c b/src/winscard_svc.c
index 95bb264..d65550e 100644
--- a/src/winscard_svc.c
+++ b/src/winscard_svc.c
@@ -580,6 +580,7 @@ static void ContextThread(LPVOID newContext)
{
struct cancel_struct caStr;
SCONTEXT * psTargetContext = NULL;
+
READ_BODY(caStr);
/* find the client */
@@ -587,6 +588,10 @@ static void ContextThread(LPVOID newContext)
psTargetContext = (SCONTEXT *) list_seek(&contextsList,
&caStr.hContext);
(void)pthread_mutex_unlock(&contextsList_lock);
+
+ /* default value = error */
+ caStr.rv = SCARD_E_INVALID_HANDLE;
+
if (psTargetContext != NULL)
{
uint32_t fd = psTargetContext->dwClientID;
@@ -596,8 +601,6 @@ static void ContextThread(LPVOID newContext)
* notification now the waiting has been cancelled */
EHUnregisterClientForEvent(fd);
}
- else
- caStr.rv = SCARD_E_INVALID_HANDLE;
WRITE_BODY(caStr);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git
More information about the Pcsclite-cvs-commit
mailing list