]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Added i_set_failure_send_prefix() and renamed i_set_failure_ip() to _send_ip().
authorTimo Sirainen <tss@iki.fi>
Thu, 8 Dec 2011 03:54:23 +0000 (05:54 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 8 Dec 2011 03:54:23 +0000 (05:54 +0200)
src/lib/failures.c
src/lib/failures.h

index 45d45d090a3b3b12b551b33098f8a3d522d815ef..dba1c9d401cd55f1f723bfdfa4cc098577cb06d9 100644 (file)
@@ -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;
index 9cc99e3d24e022729ce0b0cfbbf8910420ee391f..ada8775590001c2ea304cfb5f51597b1e8682dce 100644 (file)
@@ -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));