agent: Defer calling assuan_release when it's still in use.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 26 Nov 2018 02:05:28 +0000 (11:05 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 26 Nov 2018 02:35:22 +0000 (11:35 +0900)
commit9fb3f0f3f79e74166cce8e0781e97043f25890cc
treef699d512073b613aecb500b03309ea3be1a13aba
parentf45d6124696cc92ccdec09841b8182679c377997
agent: Defer calling assuan_release when it's still in use.

* agent/call-scd.c (struct scd_local_s): Remove LOCK, introduce IN_USE
and INVALID flags.
(unlock_scd): Call assuan_release when CTX is invalid.
(start_scd): Set IN_USE.
(agent_scd_check_aliveness): Don't call assuan_release when it's in use.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
agent/call-scd.c