Shorten trigger names for OS X

Trigger names cannot exceed 11 characters on OS X, so the new "config_change" trigger
has been renamed to "conf_change" and the "config_change_log" trigger has been renamed
to "conf_log".
This commit is contained in:
Andrew Bettison 2016-10-24 16:09:37 +10:30
parent 5fbd6a79ef
commit 6201b97fa3
4 changed files with 13 additions and 13 deletions

16
conf.c
View File

@ -236,23 +236,23 @@ static int reload_and_parse(int permissive, int strict)
cf_limbo = 0; // let log messages out
logFlush();
if (changed) {
CALL_TRIGGER(config_change_log);
CALL_TRIGGER(config_change);
CALL_TRIGGER(conf_log);
CALL_TRIGGER(conf_change);
}
return ret;
}
// Put a dummy no-op trigger callback into the "config_change" and "config_change_log" trigger
// sections, otherwise if no other object provides one, the link will fail with errors like:
// Put a dummy no-op trigger callback into the "config_change" and "config_log" trigger sections,
// otherwise if no other object provides one, the link will fail with errors like:
// undefined reference to `__start_tr_config_change'
// undefined reference to `__stop_tr_config_change'
static void __dummy_on_config_change_log();
DEFINE_TRIGGER(config_change_log, __dummy_on_config_change_log);
static void __dummy_on_config_change_log() {}
static void __dummy_on_config_log();
DEFINE_TRIGGER(conf_log, __dummy_on_config_log);
static void __dummy_on_config_log() {}
static void __dummy_on_config_change();
DEFINE_TRIGGER(config_change, __dummy_on_config_change);
DEFINE_TRIGGER(conf_change, __dummy_on_config_change);
static void __dummy_on_config_change() {}
// The configuration API entry points.

4
conf.h
View File

@ -714,7 +714,7 @@ int cf_reload(void);
int cf_reload_strict(void);
int cf_reload_permissive(void);
DECLARE_TRIGGER(config_change_log);
DECLARE_TRIGGER(config_change);
DECLARE_TRIGGER(conf_log);
DECLARE_TRIGGER(conf_change);
#endif //__SERVAL_DNA__CONF_H

2
log.c
View File

@ -671,7 +671,7 @@ void vlogMessage(int level, struct __sourceloc whence, const char *fmt, va_list
}
static void logConfigChanged();
DEFINE_TRIGGER(config_change_log, logConfigChanged);
DEFINE_TRIGGER(conf_log, logConfigChanged);
static void logConfigChanged()
{
_log_iterator it;

View File

@ -303,7 +303,7 @@ int server_bind()
void server_loop(time_ms_t (*waiting)(time_ms_t, time_ms_t, time_ms_t), void (*wokeup)())
{
CALL_TRIGGER(config_change);
CALL_TRIGGER(conf_change);
// This log message is used by tests to wait for the server to start.
INFOF("Server initialised, entering main loop");
@ -596,7 +596,7 @@ void rhizome_clean_db(struct sched_ent *alarm)
static void server_on_config_change();
DEFINE_TRIGGER(config_change, server_on_config_change);
DEFINE_TRIGGER(conf_change, server_on_config_change);
static void server_on_config_change()
{