Merge pull request #2504 from matt335672/check_pcsc_sock_create_err

Don't try to listen on the scard socket if it isn't there
This commit is contained in:
matt335672 2023-01-18 14:37:27 +00:00 committed by GitHub
commit 59f2ae39dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -803,8 +803,7 @@ devredir_proc_client_core_cap_resp(struct stream *s)
case CAP_SMARTCARD_TYPE:
LOG_DEVEL(LOG_LEVEL_DEBUG, "got CAP_SMARTCARD_TYPE");
g_is_smartcard_redir_supported = 1;
scard_init();
g_is_smartcard_redir_supported = (scard_init() == 0);
break;
}
xstream_seek(s, cap_len);

View File

@ -1853,6 +1853,8 @@ scard_pcsc_init(void)
if (g_lis == 0)
{
g_lis = trans_create(2, 8192, 8192);
// TODO: See #2501. Use needs a way to move PCSCLITE_CSOCK_NAME
// to a location not under $HOME.
home = g_getenv("HOME");
disp = g_display_num;
g_snprintf(g_pcsclite_ipc_dir, 255, "%s/.pcsc%d", home, disp);