From: Timo Sirainen Date: Thu, 8 Dec 2011 03:54:23 +0000 (+0200) Subject: Added i_set_failure_send_prefix() and renamed i_set_failure_ip() to _send_ip(). X-Git-Tag: 2.1.rc2~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=986ca1cb9eedc1b5c91dbbd6ccd8d81fb468673c;p=thirdparty%2Fdovecot%2Fcore.git Added i_set_failure_send_prefix() and renamed i_set_failure_ip() to _send_ip(). --- diff --git a/src/lib/failures.c b/src/lib/failures.c index 45d45d090a..dba1c9d401 100644 --- a/src/lib/failures.c +++ b/src/lib/failures.c @@ -694,11 +694,16 @@ void i_set_failure_timestamp_format(const char *fmt) 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 --git a/src/lib/failures.h b/src/lib/failures.h index 9cc99e3d24..ada8775590 100644 --- a/src/lib/failures.h +++ b/src/lib/failures.h @@ -114,9 +114,10 @@ void i_set_failure_prefix(const char *prefix); /* 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));