Skip to content
Snippets Groups Projects
Commit 1c7173a8 authored by Timo Sirainen's avatar Timo Sirainen Committed by aki.tuomi
Browse files

global: Adjust to settings-parser API changes

parent 0605bd02
No related branches found
No related tags found
No related merge requests found
...@@ -60,12 +60,12 @@ struct service_settings managesieve_login_settings_service_settings = { ...@@ -60,12 +60,12 @@ struct service_settings managesieve_login_settings_service_settings = {
#undef DEF #undef DEF
#define DEF(type, name) \ #define DEF(type, name) \
{ type, #name, offsetof(struct managesieve_login_settings, name), NULL } SETTING_DEFINE_STRUCT_##type(#name, name, struct managesieve_login_settings)
static const struct setting_define managesieve_login_setting_defines[] = { static const struct setting_define managesieve_login_setting_defines[] = {
DEF(SET_STR, managesieve_implementation_string), DEF(STR, managesieve_implementation_string),
DEF(SET_STR, managesieve_sieve_capability), DEF(STR, managesieve_sieve_capability),
DEF(SET_STR, managesieve_notify_capability), DEF(STR, managesieve_notify_capability),
SETTING_DEFINE_LIST_END SETTING_DEFINE_LIST_END
}; };
......
...@@ -27,13 +27,9 @@ struct plugin_settings { ...@@ -27,13 +27,9 @@ struct plugin_settings {
static const struct setting_parser_info **plugin_set_roots; static const struct setting_parser_info **plugin_set_roots;
#undef DEF
#define DEF(type, name) \
{ type, #name, offsetof(struct plugin_settings, name), NULL }
static const struct setting_define plugin_setting_defines[] = { static const struct setting_define plugin_setting_defines[] = {
{ SET_STRLIST, "plugin", { .type = SET_STRLIST, .key = "plugin",
offsetof(struct plugin_settings, plugin_envs), NULL }, .offset = offsetof(struct plugin_settings, plugin_envs) },
SETTING_DEFINE_LIST_END SETTING_DEFINE_LIST_END
}; };
......
...@@ -56,23 +56,19 @@ struct service_settings managesieve_settings_service_settings = { ...@@ -56,23 +56,19 @@ struct service_settings managesieve_settings_service_settings = {
}; };
#undef DEF #undef DEF
#undef DEFLIST
#define DEF(type, name) \ #define DEF(type, name) \
{ type, #name, offsetof(struct managesieve_settings, name), NULL } SETTING_DEFINE_STRUCT_##type(#name, name, struct managesieve_settings)
#define DEFLIST(field, name, defines) \
{ SET_DEFLIST, name, \
offsetof(struct managesieve_settings, field), defines }
static struct setting_define managesieve_setting_defines[] = { static struct setting_define managesieve_setting_defines[] = {
DEF(SET_BOOL, mail_debug), DEF(BOOL, mail_debug),
DEF(SET_BOOL, verbose_proctitle), DEF(BOOL, verbose_proctitle),
DEF(SET_STR_VARS, rawlog_dir), DEF(STR_VARS, rawlog_dir),
DEF(SET_SIZE, managesieve_max_line_length), DEF(SIZE, managesieve_max_line_length),
DEF(SET_STR, managesieve_implementation_string), DEF(STR, managesieve_implementation_string),
DEF(SET_STR, managesieve_client_workarounds), DEF(STR, managesieve_client_workarounds),
DEF(SET_STR, managesieve_logout_format), DEF(STR, managesieve_logout_format),
DEF(SET_UINT, managesieve_max_compile_errors), DEF(UINT, managesieve_max_compile_errors),
SETTING_DEFINE_LIST_END SETTING_DEFINE_LIST_END
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.