Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: Move failure handler structs and typedefs to failures-private.h
Also change the function typedefs to be non-pointers, like they usually are in Dovecot code.
- Loading branch information
1 parent
4576851
commit 7ebce77
Showing
3 changed files
with
28 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef FAILURES_PRIVATE_H | ||
#define FAILURES_PRIVATE_H | ||
|
||
typedef int | ||
failure_write_to_file_t(enum log_type type, string_t *data, size_t prefix_len); | ||
typedef string_t * | ||
failure_format_str_t(const struct failure_context *ctx, size_t *prefix_len_r, | ||
const char *format, va_list args); | ||
typedef void failure_on_handler_failure_t(const struct failure_context *ctx); | ||
typedef void failure_post_handler_t(const struct failure_context *ctx); | ||
|
||
struct failure_handler_vfuncs { | ||
failure_write_to_file_t *write; | ||
failure_format_str_t *format; | ||
failure_on_handler_failure_t *on_handler_failure; | ||
failure_post_handler_t *post_handler; | ||
}; | ||
|
||
struct failure_handler_config { | ||
int fatal_err_reset; | ||
struct failure_handler_vfuncs *v; | ||
}; | ||
|
||
extern struct failure_handler_config failure_handler; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters