Skip to content

Commit

Permalink
lib-storage: added settings updating function for the mail_storage_se…
Browse files Browse the repository at this point in the history
…rvice user
  • Loading branch information
Sergey-Kitov authored and Timo Sirainen committed Aug 7, 2017
1 parent 0a2511b commit 24ff040
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib-storage/mail-storage-service.c
Expand Up @@ -1706,3 +1706,13 @@ void *mail_storage_service_get_settings(struct master_service *service)
} T_END;
return set;
}

int mail_storage_service_user_set_setting(struct mail_storage_service_user *user,
const char *key,
const char *value,
const char **error_r)
{
int ret = settings_parse_keyvalue(user->set_parser, key, value);
*error_r = settings_parser_get_error(user->set_parser);
return ret;
}
5 changes: 5 additions & 0 deletions src/lib-storage/mail-storage-service.h
Expand Up @@ -160,5 +160,10 @@ const char *mail_storage_service_fields_var_expand(const char *data,
const char *const *fields);
/* Return the settings pointed to by set_root parameter in _init() */
void *mail_storage_service_get_settings(struct master_service *service);
/* Updates settings for storage service user, forwards return value of settings_parse_keyvalue() */
int mail_storage_service_user_set_setting(struct mail_storage_service_user *user,
const char *key,
const char *value,
const char **error_r);

#endif

0 comments on commit 24ff040

Please sign in to comment.