dovecot-2.2: lib: Added i_get_failure_prefix()
dovecot at dovecot.org
dovecot at dovecot.org
Fri Feb 6 15:06:45 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/89c42f824f84
changeset: 18222:89c42f824f84
user: Timo Sirainen <tss at iki.fi>
date: Fri Feb 06 17:04:52 2015 +0200
description:
lib: Added i_get_failure_prefix()
diffstat:
src/lib/failures.c | 5 +++++
src/lib/failures.h | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diffs (27 lines):
diff -r d7defdcfe039 -r 89c42f824f84 src/lib/failures.c
--- a/src/lib/failures.c Thu Feb 05 19:40:25 2015 +0200
+++ b/src/lib/failures.c Fri Feb 06 17:04:52 2015 +0200
@@ -547,6 +547,11 @@
log_prefix_sent = FALSE;
}
+const char *i_get_failure_prefix(void)
+{
+ return log_prefix != NULL ? log_prefix : "";
+}
+
static int internal_send_split(string_t *full_str, unsigned int prefix_len)
{
string_t *str;
diff -r d7defdcfe039 -r 89c42f824f84 src/lib/failures.h
--- a/src/lib/failures.h Thu Feb 05 19:40:25 2015 +0200
+++ b/src/lib/failures.h Fri Feb 06 17:04:52 2015 +0200
@@ -115,6 +115,8 @@
void i_set_failure_prefix(const char *prefix_fmt, ...) ATTR_FORMAT(1, 2);
/* Set prefix to "". */
void i_unset_failure_prefix(void);
+/* Returns the current failure prefix (never NULL). */
+const char *i_get_failure_prefix(void);
/* Prefix failures with a timestamp. fmt is in strftime() format. */
void i_set_failure_timestamp_format(const char *fmt);
/* When logging with internal error protocol, update the process's current
More information about the dovecot-cvs
mailing list