summaryrefslogtreecommitdiffstats
path: root/g10/cpr.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-12-12 13:01:20 +0100
committerWerner Koch <wk@gnupg.org>2008-12-12 13:01:20 +0100
commitfb12b4fad3b7634cb008b4093ba438c53b37ccda (patch)
tree9b7335e1fb82041a3b620c9506d5f44ddfc7fa93 /g10/cpr.c
parentAdd missing header file. (diff)
downloadgnupg2-fb12b4fad3b7634cb008b4093ba438c53b37ccda.tar.xz
gnupg2-fb12b4fad3b7634cb008b4093ba438c53b37ccda.zip
Add rmd160.c.
Emit anotehr error code status line.
Diffstat (limited to 'g10/cpr.c')
-rw-r--r--g10/cpr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/g10/cpr.c b/g10/cpr.c
index 6e89d393d..60cc97bf6 100644
--- a/g10/cpr.c
+++ b/g10/cpr.c
@@ -157,6 +157,19 @@ write_status_text ( int no, const char *text)
}
+void
+write_status_error (const char *where, int errcode)
+{
+ if (!statusfp || !status_currently_allowed (STATUS_ERROR))
+ return; /* Not enabled or allowed. */
+
+ fprintf (statusfp, "[GNUPG:] %s %s %u\n",
+ get_status_string (STATUS_ERROR), where, gpg_err_code (errcode));
+ if (fflush (statusfp) && opt.exit_on_status_write_error)
+ g10_exit (0);
+}
+
+
/*
* Write a status line with a buffer using %XX escapes. If WRAP is >
* 0 wrap the line after this length. If STRING is not NULL it will