Skip to content

Commit

Permalink
Merge pull request FreeRDP#6140 from akallabeth/smartcard_silence
Browse files Browse the repository at this point in the history
Silence SCARD_E_TIMEOUT warnings
  • Loading branch information
bmiklautz authored May 5, 2020
2 parents 3e89574 + e80316c commit ecc9f12
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions channels/smartcard/client/smartcard_operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,19 @@
static LONG log_status_error(const char* tag, const char* what, LONG status)
{
if (status != SCARD_S_SUCCESS)
WLog_ERR(tag, "%s failed with error %s [%" PRId32 "]", what, SCardGetErrorString(status),
status);
{
DWORD level = WLOG_ERROR;
switch (status)
{
case SCARD_E_TIMEOUT:
level = WLOG_DEBUG;
break;
default:
break;
}
WLog_Print(WLog_Get(tag), level, "%s failed with error %s [%" PRId32 "]", what,
SCardGetErrorString(status), status);
}
return status;
}

Expand Down

0 comments on commit ecc9f12

Please sign in to comment.