mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 10:46:23 +00:00
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:
parent
5fbd6a79ef
commit
6201b97fa3
16
conf.c
16
conf.c
@ -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
4
conf.h
@ -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
2
log.c
@ -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;
|
||||
|
4
server.c
4
server.c
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user