bankd: Log more clearly if we fail to open a PC/SC reader

Related: SYS#5950
Change-Id: I424f585a8a37f21806898e59e350201119645a21
This commit is contained in:
Harald Welte 2022-05-05 19:08:13 +02:00
parent a04ff860c1
commit 7f8bce4f06
1 changed files with 7 additions and 1 deletions

View File

@ -237,13 +237,19 @@ static int pcsc_connect_slot_regex(struct bankd_worker *worker)
&dwActiveProtocol);
if (rc == SCARD_S_SUCCESS)
result = 0;
else
else {
LOGW_PCSC_ERROR(worker, rc, "SCardConnect");
goto out_readerfree;
}
break;
}
p += strlen(p) + 1;
}
if (result < 0)
LOGW(worker, "Error: Cannot find PC/SC reader/slot matching using regex '%s'\n", worker->reader.name);
out_readerfree:
SCardFreeMemory(worker->reader.pcsc.hContext, mszReaders);
out_regfree: