aboutsummaryrefslogtreecommitdiffstats
path: root/sm/server.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-07-03 16:03:22 +0000
committerWerner Koch <[email protected]>2002-07-03 16:03:22 +0000
commitf48b2851f63b047718d8944f9de7dbdea8041d65 (patch)
treeb8867a68d7b810877dcfb1f47083d68aa8c33074 /sm/server.c
parent* configure.ac: Allow setting USE_EXEC_PATH to lock the exec-path to a (diff)
downloadgnupg-f48b2851f63b047718d8944f9de7dbdea8041d65.tar.gz
gnupg-f48b2851f63b047718d8944f9de7dbdea8041d65.zip
* server.c (gpgsm_status2): Insert a blank between all optional
arguments when using assuan. * server.c (cmd_recipient): No more need for extra blank in constants. * import.c (print_imported_status): Ditto. * gpgsm.c (main): Ditto.
Diffstat (limited to 'sm/server.c')
-rw-r--r--sm/server.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/sm/server.c b/sm/server.c
index 4a8a8c40a..5f490b5a9 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -243,14 +243,14 @@ cmd_recipient (ASSUAN_CONTEXT ctx, char *line)
if (rc)
gpgsm_status2 (ctrl, STATUS_INV_RECP,
rc == -1? "1":
- rc == GNUPG_Ambiguous_Name? "2 ":
- rc == GNUPG_Wrong_Key_Usage? "3 ":
- rc == GNUPG_Certificate_Revoked? "4 ":
- rc == GNUPG_Certificate_Expired? "5 ":
- rc == GNUPG_No_CRL_Known? "6 ":
- rc == GNUPG_CRL_Too_Old? "8 ":
- rc == GNUPG_No_Policy_Match? "8 ":
- "0 ",
+ rc == GNUPG_Ambiguous_Name? "2":
+ rc == GNUPG_Wrong_Key_Usage? "3":
+ rc == GNUPG_Certificate_Revoked? "4":
+ rc == GNUPG_Certificate_Expired? "5":
+ rc == GNUPG_No_CRL_Known? "6":
+ rc == GNUPG_CRL_Too_Old? "7":
+ rc == GNUPG_No_Policy_Match? "8":
+ "0",
line, NULL);
return map_to_assuan_status (rc);
@@ -873,7 +873,12 @@ gpgsm_status2 (CTRL ctrl, int no, ...)
n = 0;
while ( (text = va_arg (arg_ptr, const char *)) )
{
- for ( ; *text && n < DIM (buf)-1; n++)
+ if (n)
+ {
+ *p++ = ' ';
+ n++;
+ }
+ for ( ; *text && n < DIM (buf)-2; n++)
*p++ = *text++;
}
*p = 0;