From: Richard Russon Date: Wed, 15 May 2019 11:25:37 +0000 (+0100) Subject: config: rename listener to observer X-Git-Tag: 2019-10-25~204^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75fe7618bcebb657a43082e66ae5bc0d8150c48c;p=neomutt config: rename listener to observer This fits in with the GoF's subject/observer pattern. --- diff --git a/config/bool.c b/config/bool.c index f583e79af..ec9449ace 100644 --- a/config/bool.c +++ b/config/bool.c @@ -226,7 +226,7 @@ int bool_he_toggle(struct ConfigSet *cs, struct HashElem *he, struct Buffer *err *(char *) var = !value; - cs_notify_listeners(cs, he, he->key.strkey, CE_SET); + cs_notify_observers(cs, he, he->key.strkey, CE_SET); return CSR_SUCCESS; } diff --git a/config/quad.c b/config/quad.c index b0a68bddf..15a69e5da 100644 --- a/config/quad.c +++ b/config/quad.c @@ -242,6 +242,6 @@ int quad_he_toggle(struct ConfigSet *cs, struct HashElem *he, struct Buffer *err *(char *) var = quad_toggle(value); - cs_notify_listeners(cs, he, he->key.strkey, CE_SET); + cs_notify_observers(cs, he, he->key.strkey, CE_SET); return CSR_SUCCESS; } diff --git a/config/set.c b/config/set.c index 051c435fe..4389d753e 100644 --- a/config/set.c +++ b/config/set.c @@ -308,74 +308,74 @@ struct HashElem *cs_inherit_variable(const struct ConfigSet *cs, } /** - * cs_add_listener - Add a listener (callback function) + * cs_add_observer - Add a observer (callback function) * @param cs Config items - * @param fn Listener callback function + * @param fn Observer callback function */ -void cs_add_listener(struct ConfigSet *cs, cs_listener fn) +void cs_add_observer(struct ConfigSet *cs, cs_observer fn) { if (!cs || !fn) return; - for (size_t i = 0; i < mutt_array_size(cs->listeners); i++) + for (size_t i = 0; i < mutt_array_size(cs->observers); i++) { - if (cs->listeners[i] == fn) + if (cs->observers[i] == fn) { - mutt_debug(LL_DEBUG1, "Listener was already registered\n"); + mutt_debug(LL_DEBUG1, "Observer was already registered\n"); return; } } - for (size_t i = 0; i < mutt_array_size(cs->listeners); i++) + for (size_t i = 0; i < mutt_array_size(cs->observers); i++) { - if (!cs->listeners[i]) + if (!cs->observers[i]) { - cs->listeners[i] = fn; + cs->observers[i] = fn; return; } } } /** - * cs_remove_listener - Remove a listener (callback function) + * cs_remove_observer - Remove a observer (callback function) * @param cs Config items - * @param fn Listener callback function + * @param fn Observer callback function */ -void cs_remove_listener(struct ConfigSet *cs, cs_listener fn) +void cs_remove_observer(struct ConfigSet *cs, cs_observer fn) { if (!cs || !fn) return; - for (size_t i = 0; i < mutt_array_size(cs->listeners); i++) + for (size_t i = 0; i < mutt_array_size(cs->observers); i++) { - if (cs->listeners[i] == fn) + if (cs->observers[i] == fn) { - cs->listeners[i] = NULL; + cs->observers[i] = NULL; return; } } - mutt_debug(LL_DEBUG1, "Listener wasn't registered\n"); + mutt_debug(LL_DEBUG1, "Observer wasn't registered\n"); } /** - * cs_notify_listeners - Notify all listeners of an event + * cs_notify_observers - Notify all observers of an event * @param cs Config items * @param he HashElem representing config item * @param name Name of config item * @param ev Type of event */ -void cs_notify_listeners(const struct ConfigSet *cs, struct HashElem *he, +void cs_notify_observers(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) { if (!cs || !he || !name) return; - for (size_t i = 0; i < mutt_array_size(cs->listeners); i++) + for (size_t i = 0; i < mutt_array_size(cs->observers); i++) { - if (!cs->listeners[i]) + if (!cs->observers[i]) return; - cs->listeners[i](cs, he, name, ev); + cs->observers[i](cs, he, name, ev); } } @@ -422,7 +422,7 @@ int cs_he_reset(const struct ConfigSet *cs, struct HashElem *he, struct Buffer * } if ((CSR_RESULT(rc) == CSR_SUCCESS) && !(rc & CSR_SUC_NO_CHANGE)) - cs_notify_listeners(cs, he, he->key.strkey, CE_RESET); + cs_notify_observers(cs, he, he->key.strkey, CE_RESET); return rc; } @@ -485,7 +485,7 @@ int cs_he_initial_set(const struct ConfigSet *cs, struct HashElem *he, if (CSR_RESULT(rc) != CSR_SUCCESS) return rc; - cs_notify_listeners(cs, he, he->key.strkey, CE_INITIAL_SET); + cs_notify_observers(cs, he, he->key.strkey, CE_INITIAL_SET); return CSR_SUCCESS; } @@ -630,7 +630,7 @@ int cs_he_string_set(const struct ConfigSet *cs, struct HashElem *he, he->type = i->parent->type | DT_INHERITED; } if (!(rc & CSR_SUC_NO_CHANGE)) - cs_notify_listeners(cs, he, he->key.strkey, CE_SET); + cs_notify_observers(cs, he, he->key.strkey, CE_SET); return rc; } @@ -772,7 +772,7 @@ int cs_he_native_set(const struct ConfigSet *cs, struct HashElem *he, if (he->type & DT_INHERITED) he->type = cdef->type | DT_INHERITED; if (!(rc & CSR_SUC_NO_CHANGE)) - cs_notify_listeners(cs, he, cdef->name, CE_SET); + cs_notify_observers(cs, he, cdef->name, CE_SET); } return rc; @@ -826,7 +826,7 @@ int cs_str_native_set(const struct ConfigSet *cs, const char *name, if (he->type & DT_INHERITED) he->type = cdef->type | DT_INHERITED; if (!(rc & CSR_SUC_NO_CHANGE)) - cs_notify_listeners(cs, he, cdef->name, CE_SET); + cs_notify_observers(cs, he, cdef->name, CE_SET); } return rc; diff --git a/config/set.h b/config/set.h index 74e07d625..82cc98ad3 100644 --- a/config/set.h +++ b/config/set.h @@ -62,23 +62,23 @@ enum ConfigEvent #define CSR_RESULT(x) ((x) & CSR_RESULT_MASK) /** - * enum CsListenerAction - Config Listener responses + * enum CsObserverAction - Config Observer responses */ -enum CsListenerAction +enum CsObserverAction { - CSLA_CONTINUE = 1, ///< Continue notifying listeners - CSLA_STOP, ///< Stop notifying listeners + CSOA_CONTINUE = 1, ///< Continue notifying observers + CSOA_STOP, ///< Stop notifying observers }; /** - * typedef cs_listener - Listen for config changes + * typedef cs_observer - Listen for config changes * @param cs Config items * @param he HashElem representing config item * @param name Name of the config item * @param ev Event type, e.g. #CE_SET * @retval true Continue notifying */ -typedef bool (*cs_listener) (const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +typedef bool (*cs_observer) (const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); /** * typedef cs_validator - Validate the "charset" config variable * @param cs Config items @@ -197,7 +197,7 @@ struct ConfigSet { struct Hash *hash; /**< HashTable storing the config itesm */ struct ConfigSetType types[18]; /**< All the defined config types */ - cs_listener listeners[8]; /**< Listeners for notifications of changes to config items */ + cs_observer observers[8]; /**< Observers for notifications of changes to config items */ }; struct ConfigSet *cs_new(size_t size); @@ -211,9 +211,9 @@ bool cs_register_type(struct ConfigSet *cs, unsigned int type, const bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], int flags); struct HashElem *cs_inherit_variable(const struct ConfigSet *cs, struct HashElem *parent, const char *name); -void cs_add_listener(struct ConfigSet *cs, cs_listener fn); -void cs_remove_listener(struct ConfigSet *cs, cs_listener fn); -void cs_notify_listeners(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +void cs_add_observer(struct ConfigSet *cs, cs_observer fn); +void cs_remove_observer(struct ConfigSet *cs, cs_observer fn); +void cs_notify_observers(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); int cs_he_initial_get (const struct ConfigSet *cs, struct HashElem *he, struct Buffer *result); int cs_he_initial_set (const struct ConfigSet *cs, struct HashElem *he, const char *value, struct Buffer *err); diff --git a/index.c b/index.c index d87f1e11d..d5b32dd61 100644 --- a/index.c +++ b/index.c @@ -3663,9 +3663,9 @@ void mutt_set_header_color(struct Mailbox *m, struct Email *e) } /** - * mutt_reply_listener - Listen for config changes to "reply_regex" - Implements ::cs_listener() + * mutt_reply_observer - Listen for config changes to "reply_regex" - Implements ::cs_observer() */ -bool mutt_reply_listener(const struct ConfigSet *cs, struct HashElem *he, +bool mutt_reply_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) { if (mutt_str_strcmp(name, "reply_regex") != 0) diff --git a/mailbox.c b/mailbox.c index 062e391c2..787d60814 100644 --- a/mailbox.c +++ b/mailbox.c @@ -552,7 +552,7 @@ void mutt_mailbox_next(struct Mailbox *m_cur, char *s, size_t slen) } /** - * mutt_mailbox_changed - Notify listeners of a change to a Mailbox + * mutt_mailbox_changed - Notify observers of a change to a Mailbox * @param m Mailbox * @param action Change to Mailbox */ diff --git a/main.c b/main.c index 1401c8685..6ab3751e8 100644 --- a/main.c +++ b/main.c @@ -824,10 +824,10 @@ int main(int argc, char *argv[], char *envp[]) goto main_ok; // TEST22: neomutt -B } - cs_add_listener(Config, mutt_hist_listener); - cs_add_listener(Config, mutt_log_listener); - cs_add_listener(Config, mutt_menu_listener); - cs_add_listener(Config, mutt_reply_listener); + cs_add_observer(Config, mutt_hist_observer); + cs_add_observer(Config, mutt_log_observer); + cs_add_observer(Config, mutt_menu_observer); + cs_add_observer(Config, mutt_reply_observer); if (sendflags & SEND_POSTPONED) { diff --git a/menu.c b/menu.c index d1d403029..e25ed375e 100644 --- a/menu.c +++ b/menu.c @@ -1591,9 +1591,9 @@ int mutt_menu_loop(struct Menu *menu) } /** - * mutt_menu_listener - Listen for config changes affecting the menu - Implements ::cs_listener() + * mutt_menu_observer - Listen for config changes affecting the menu - Implements ::cs_observer() */ -bool mutt_menu_listener(const struct ConfigSet *cs, struct HashElem *he, +bool mutt_menu_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) { const struct ConfigDef *cdef = he->data; diff --git a/mutt_history.c b/mutt_history.c index 01c875a0f..38726adf3 100644 --- a/mutt_history.c +++ b/mutt_history.c @@ -144,9 +144,9 @@ void mutt_hist_complete(char *buf, size_t buflen, enum HistoryClass hclass) } /** - * mutt_hist_listener - Listen for config changes affecting the history - Implements ::cs_listener() + * mutt_hist_observer - Listen for config changes affecting the history - Implements ::cs_observer() */ -bool mutt_hist_listener(const struct ConfigSet *cs, struct HashElem *he, +bool mutt_hist_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) { if (mutt_str_strcmp(name, "history") != 0) diff --git a/mutt_history.h b/mutt_history.h index 8f16cf6a6..587a63605 100644 --- a/mutt_history.h +++ b/mutt_history.h @@ -27,6 +27,6 @@ #include "mutt/mutt.h" void mutt_hist_complete(char *buf, size_t buflen, enum HistoryClass hclass); -bool mutt_hist_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +bool mutt_hist_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); #endif /* MUTT_MUTT_HISTORY_H */ diff --git a/mutt_logging.c b/mutt_logging.c index 007aad664..1ffe7637b 100644 --- a/mutt_logging.c +++ b/mutt_logging.c @@ -335,9 +335,9 @@ int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, } /** - * mutt_log_listener - Listen for config changes affecting the log file - Implements ::cs_listener() + * mutt_log_observer - Listen for config changes affecting the log file - Implements ::cs_observer() */ -bool mutt_log_listener(const struct ConfigSet *cs, struct HashElem *he, +bool mutt_log_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) { if (mutt_str_strcmp(name, "debug_file") == 0) diff --git a/mutt_logging.h b/mutt_logging.h index 312ce6af3..ad41a6a50 100644 --- a/mutt_logging.h +++ b/mutt_logging.h @@ -37,7 +37,7 @@ int mutt_log_start(void); void mutt_log_stop(void); int mutt_log_set_level(int level, bool verbose); int mutt_log_set_file(const char *file, bool verbose); -bool mutt_log_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +bool mutt_log_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err); void mutt_clear_error(void); diff --git a/mutt_menu.h b/mutt_menu.h index 1a54a4f1e..7e31805a6 100644 --- a/mutt_menu.h +++ b/mutt_menu.h @@ -189,6 +189,6 @@ void mutt_menu_set_current_redraw(MuttRedrawFlags redraw); void mutt_menu_set_redraw_full(int menu_type); void mutt_menu_set_redraw(int menu_type, MuttRedrawFlags redraw); -bool mutt_menu_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +bool mutt_menu_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); #endif /* MUTT_MENU_H */ diff --git a/protos.h b/protos.h index b51420b3d..29f6e579c 100644 --- a/protos.h +++ b/protos.h @@ -86,7 +86,7 @@ int mutt_is_quote_line(char *buf, regmatch_t *pmatch); int wcscasecmp(const wchar_t *a, const wchar_t *b); #endif -bool mutt_reply_listener(const struct ConfigSet *cs, struct HashElem *he, +bool mutt_reply_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); #endif /* MUTT_PROTOS_H */ diff --git a/test/config/account.c b/test/config/account.c index 7bc823ab5..278aa56ab 100644 --- a/test/config/account.c +++ b/test/config/account.c @@ -60,7 +60,7 @@ void config_account(void) set_list(cs); - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); const char *account = "damaged"; const char *BrokenVarStr[] = { diff --git a/test/config/address.c b/test/config/address.c index 22433aea4..460e871f6 100644 --- a/test/config/address.c +++ b/test/config/address.c @@ -611,7 +611,7 @@ void config_address(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/bool.c b/test/config/bool.c index b52845fbe..8b76ef1c4 100644 --- a/test/config/bool.c +++ b/test/config/bool.c @@ -765,7 +765,7 @@ void config_bool(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/command.c b/test/config/command.c index 2a3ef6e29..9f165e7b3 100644 --- a/test/config/command.c +++ b/test/config/command.c @@ -638,7 +638,7 @@ void config_command(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/common.c b/test/config/common.c index 081b9b91e..5bd26f6de 100644 --- a/test/config/common.c +++ b/test/config/common.c @@ -81,7 +81,7 @@ void short_line(void) TEST_MSG("%s\n", line + 40); } -bool log_listener(const struct ConfigSet *cs, struct HashElem *he, +bool log_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) { struct Buffer result; diff --git a/test/config/common.h b/test/config/common.h index 21029e93b..0321ff2e5 100644 --- a/test/config/common.h +++ b/test/config/common.h @@ -40,7 +40,7 @@ int validator_fail (const struct ConfigSet *cs, const struct ConfigDef *cdef, void log_line(const char *fn); void short_line(void); -bool log_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +bool log_observer(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); void set_list(const struct ConfigSet *cs); void cs_dump_set(const struct ConfigSet *cs); diff --git a/test/config/initial.c b/test/config/initial.c index acb9087e2..0a6379378 100644 --- a/test/config/initial.c +++ b/test/config/initial.c @@ -103,7 +103,7 @@ void config_initial(void) if (!cs_register_variables(cs, Vars, 0)) return; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/long.c b/test/config/long.c index e57313fd0..1ae7f1e0d 100644 --- a/test/config/long.c +++ b/test/config/long.c @@ -589,7 +589,7 @@ void config_long(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/magic.c b/test/config/magic.c index 97701864c..77a18e430 100644 --- a/test/config/magic.c +++ b/test/config/magic.c @@ -576,7 +576,7 @@ void config_magic(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/mbtable.c b/test/config/mbtable.c index e350e3efa..98954cef9 100644 --- a/test/config/mbtable.c +++ b/test/config/mbtable.c @@ -627,7 +627,7 @@ void config_mbtable(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/number.c b/test/config/number.c index 7458c2837..50ea8ce61 100644 --- a/test/config/number.c +++ b/test/config/number.c @@ -608,7 +608,7 @@ void config_number(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/path.c b/test/config/path.c index a63bc8793..1cc586279 100644 --- a/test/config/path.c +++ b/test/config/path.c @@ -638,7 +638,7 @@ void config_path(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/quad.c b/test/config/quad.c index c58f8a61d..9ea9b4618 100644 --- a/test/config/quad.c +++ b/test/config/quad.c @@ -703,7 +703,7 @@ void config_quad(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/regex.c b/test/config/regex.c index 5a38f36c6..f456af8ff 100644 --- a/test/config/regex.c +++ b/test/config/regex.c @@ -687,7 +687,7 @@ void config_regex(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/set.c b/test/config/set.c index 557807ad1..be5611b9f 100644 --- a/test/config/set.c +++ b/test/config/set.c @@ -88,20 +88,20 @@ bool degenerate_tests(struct ConfigSet *cs) TEST_CHECK_(1, "cs_init(NULL, 100)"); cs_free(NULL); TEST_CHECK_(1, "cs_free(NULL)"); - cs_add_listener(cs, NULL); - TEST_CHECK_(1, "cs_add_listener(cs, NULL)"); - cs_add_listener(NULL, log_listener); - TEST_CHECK_(1, "cs_add_listener(NULL, log_listener)"); - cs_remove_listener(cs, NULL); - TEST_CHECK_(1, "cs_remove_listener(cs, NULL)"); - cs_remove_listener(NULL, log_listener); - TEST_CHECK_(1, "cs_remove_listener(NULL, log_listener)"); - cs_notify_listeners(NULL, he, "apple", CE_SET); - TEST_CHECK_(1, "cs_notify_listeners(NULL, he, \"apple\", CE_SET)"); - cs_notify_listeners(cs, NULL, "apple", CE_SET); - TEST_CHECK_(1, "cs_notify_listeners(cs, NULL, \"apple\", CE_SET)"); - cs_notify_listeners(cs, he, NULL, CE_SET); - TEST_CHECK_(1, "cs_notify_listeners(cs, he, NULL, CE_SET)"); + cs_add_observer(cs, NULL); + TEST_CHECK_(1, "cs_add_observer(cs, NULL)"); + cs_add_observer(NULL, log_observer); + TEST_CHECK_(1, "cs_add_observer(NULL, log_observer)"); + cs_remove_observer(cs, NULL); + TEST_CHECK_(1, "cs_remove_observer(cs, NULL)"); + cs_remove_observer(NULL, log_observer); + TEST_CHECK_(1, "cs_remove_observer(NULL, log_observer)"); + cs_notify_observers(NULL, he, "apple", CE_SET); + TEST_CHECK_(1, "cs_notify_observers(NULL, he, \"apple\", CE_SET)"); + cs_notify_observers(cs, NULL, "apple", CE_SET); + TEST_CHECK_(1, "cs_notify_observers(cs, NULL, \"apple\", CE_SET)"); + cs_notify_observers(cs, he, NULL, CE_SET); + TEST_CHECK_(1, "cs_notify_observers(cs, he, NULL, CE_SET)"); if (!TEST_CHECK(cs_register_type(NULL, DT_NUMBER, &cst_dummy) == false)) return false; @@ -229,10 +229,10 @@ void config_set(void) if (!TEST_CHECK(cs != NULL)) return; - cs_add_listener(cs, log_listener); - cs_add_listener(cs, log_listener); /* dupe */ - cs_remove_listener(cs, log_listener); - cs_remove_listener(cs, log_listener); /* non-existant */ + cs_add_observer(cs, log_observer); + cs_add_observer(cs, log_observer); /* dupe */ + cs_remove_observer(cs, log_observer); + cs_remove_observer(cs, log_observer); /* non-existant */ const struct ConfigSetType cst_dummy = { "dummy", NULL, NULL, NULL, NULL, NULL, NULL, diff --git a/test/config/sort.c b/test/config/sort.c index 72d133740..d84439016 100644 --- a/test/config/sort.c +++ b/test/config/sort.c @@ -733,7 +733,7 @@ void config_sort(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/string.c b/test/config/string.c index 9b2e51912..7b529c596 100644 --- a/test/config/string.c +++ b/test/config/string.c @@ -638,7 +638,7 @@ void config_string(void) return; dont_fail = false; - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs); diff --git a/test/config/synonym.c b/test/config/synonym.c index 7ed471e01..6b56017c6 100644 --- a/test/config/synonym.c +++ b/test/config/synonym.c @@ -203,7 +203,7 @@ void config_synonym(void) return; } - cs_add_listener(cs, log_listener); + cs_add_observer(cs, log_observer); set_list(cs);