mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
rough sketch.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
091d346e9b
commit
20a5cc93b5
@ -2163,6 +2163,27 @@ cmd_list_device (assuan_context_t ctx, char *line)
|
|||||||
if ((err = open_card (ctrl)))
|
if ((err = open_card (ctrl)))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
if (watch)
|
||||||
|
{
|
||||||
|
ctrl->server_local->watching_status = 1;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
sigset_t sigmask;
|
||||||
|
int sig;
|
||||||
|
|
||||||
|
/* FIXME: sigwait OK?, what about Windows? */
|
||||||
|
sigemptyset (&sigmask);
|
||||||
|
sigaddset (&sigmask, SIGCONT);
|
||||||
|
npth_sigwait (&sigmask, &sig);
|
||||||
|
/**/
|
||||||
|
if (ctrl->server_local->card_removed)
|
||||||
|
{
|
||||||
|
ctrl->server_local->watching_status = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX: Actively try to open devices available. */
|
/* XXX: Actively try to open devices available. */
|
||||||
return gpg_error (GPG_ERR_NOT_FOUND);
|
return gpg_error (GPG_ERR_NOT_FOUND);
|
||||||
return 0;
|
return 0;
|
||||||
@ -2729,6 +2750,9 @@ send_client_notifications (card_t card, int removal)
|
|||||||
card_unref_locked (card);
|
card_unref_locked (card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sl->watching_status)
|
||||||
|
assuan_write_status (sl->assuan_ctx, "FIXME: change", "something");
|
||||||
|
|
||||||
if (!sl->event_signal || !sl->assuan_ctx)
|
if (!sl->event_signal || !sl->assuan_ctx)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user