goto cleanup; \
} while (0)
+#define EXIT_WITH_PERROR \
+do { \
+ fr_perror("%s", program); \
+ EXIT_WITH_FAILURE; \
+} while (0)
+
static fr_timer_t *fr_time_sync_ev = NULL;
static void fr_time_sync_event(fr_timer_list_t *tl, UNUSED fr_time_t now, UNUSED void *uctx)
* Mismatch between the binary and the libraries it depends on.
*/
if (fr_check_lib_magic(RADIUSD_MAGIC_NUMBER) < 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
if (rad_check_lib_magic(RADIUSD_MAGIC_NUMBER) < 0) EXIT_WITH_FAILURE;
* So we can't run with a null context and threads.
*/
if (talloc_config_set(config) != 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
/*
* the protocols.
*/
if (!fr_dict_global_ctx_init(NULL, true, config->dict_dir)) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
#ifdef WITH_TLS
if (fr_tls_dict_init() < 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
#endif
* Setup the global structures for module lists
*/
if (modules_rlm_init() < 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
if (virtual_servers_init() < 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
/*
* for requests.
*/
if (request_global_init() < 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
/*
case 1:
default: /* All other errors */
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
}
* Call this again now we've loaded the configuration. Yes I know...
*/
if (talloc_config_set(config) < 0) {
- fr_perror("%s", program);
- EXIT_WITH_FAILURE;
+ EXIT_WITH_PERROR;
}
/*