dovecot-2.1: Added i_set_failure_send_prefix() and renamed i_set...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Dec 8 05:55:33 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/618d3937f511
changeset: 13817:618d3937f511
user: Timo Sirainen <tss at iki.fi>
date: Thu Dec 08 05:54:23 2011 +0200
description:
Added i_set_failure_send_prefix() and renamed i_set_failure_ip() to _send_ip().
diffstat:
src/lib/failures.c | 7 ++++++-
src/lib/failures.h | 7 ++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r e534d2bfda7f -r 618d3937f511 src/lib/failures.c
--- a/src/lib/failures.c Thu Dec 08 05:53:55 2011 +0200
+++ b/src/lib/failures.c Thu Dec 08 05:54:23 2011 +0200
@@ -694,11 +694,16 @@
log_stamp_format = i_strdup(fmt);
}
-void i_set_failure_ip(const struct ip_addr *ip)
+void i_set_failure_send_ip(const struct ip_addr *ip)
{
i_failure_send_option("ip", net_ip2addr(ip));
}
+void i_set_failure_send_prefix(const char *prefix)
+{
+ i_failure_send_option("prefix", prefix);
+}
+
void i_set_failure_exit_callback(void (*callback)(int *status))
{
failure_exit_callback = callback;
diff -r e534d2bfda7f -r 618d3937f511 src/lib/failures.h
--- a/src/lib/failures.h Thu Dec 08 05:53:55 2011 +0200
+++ b/src/lib/failures.h Thu Dec 08 05:54:23 2011 +0200
@@ -114,9 +114,10 @@
/* 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
- IP address. This is mainly used by the master process to log some IP
- address if the process crash. */
-void i_set_failure_ip(const struct ip_addr *ip);
+ IP address / log prefix by sending it to log process. This is mainly used to
+ improve the error message if the process crashes. */
+void i_set_failure_send_ip(const struct ip_addr *ip);
+void i_set_failure_send_prefix(const char *prefix);
/* Call the callback before exit()ing. The callback may update the status. */
void i_set_failure_exit_callback(void (*callback)(int *status));
More information about the dovecot-cvs
mailing list