diff options
author | Werner Koch <wk@gnupg.org> | 2008-12-12 13:01:20 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-12-12 13:01:20 +0100 |
commit | fb12b4fad3b7634cb008b4093ba438c53b37ccda (patch) | |
tree | 9b7335e1fb82041a3b620c9506d5f44ddfc7fa93 /g10/cpr.c | |
parent | Add missing header file. (diff) | |
download | gnupg2-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.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |