Commit f0c6630a authored by Dmitry Frank's avatar Dmitry Frank Committed by Cesanta Bot

BREAKING: Sys config API change

Now apps should use getters and setters instead of accessing struct
fields directly, e.g. instead of `get_cfg()->update.timeout` it should
be `mgos_sys_config_get_update_timeout()` to get the current value, and
`mgos_sys_config_set_update_timeout(123)` to update the value.

For now, the config structs are public, but they will be made private
soon, so use accessors to keep your code working.

PUBLISHED_FROM=f7d582421a8d7e4d1ed50a280f2670d8b62f8d45
parent 1db747da
......@@ -236,7 +236,7 @@ enum cs_log_level {
void cs_log_set_level(enum cs_log_level level);
/* Set log filter. NULL (a default) logs everything. */
void cs_log_set_filter(char *source_file_name);
void cs_log_set_filter(const char *source_file_name);
int cs_log_print_prefix(enum cs_log_level level, const char *func,
const char *filename);
......@@ -316,8 +316,8 @@ double cs_log_ts WEAK;
enum cs_log_level cs_log_cur_msg_level WEAK = LL_NONE;
void cs_log_set_filter(char *str) WEAK;
void cs_log_set_filter(char *str) {
void cs_log_set_filter(const char *str) WEAK;
void cs_log_set_filter(const char *str) {
free(s_filter_pattern);
if (str != NULL) {
s_filter_pattern = strdup(str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment