1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Use new status printing functions.

* agent/command.c (cmd_geteventcounter): Get rid of static buffers.
* scd/command.c (cmd_serialno, cmd_learn): Simplify by using
print_assuan_status.
This commit is contained in:
Werner Koch 2012-02-07 13:51:47 +01:00
parent e78585cd0f
commit 12ea5c904c
2 changed files with 20 additions and 34 deletions

View file

@ -499,21 +499,13 @@ static gpg_error_t
cmd_geteventcounter (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
char any_counter[25];
char key_counter[25];
char card_counter[25];
(void)line;
snprintf (any_counter, sizeof any_counter, "%u", eventcounter.any);
snprintf (key_counter, sizeof key_counter, "%u", eventcounter.key);
snprintf (card_counter, sizeof card_counter, "%u", eventcounter.card);
return agent_write_status (ctrl, "EVENTCOUNTER",
any_counter,
key_counter,
card_counter,
NULL);
return agent_print_status (ctrl, "EVENTCOUNTER", "%u %u %u",
eventcounter.any,
eventcounter.key,
eventcounter.card);
}