diff --git a/src/config.c b/src/config.c index 1f778ed..2d89992 100644 --- a/src/config.c +++ b/src/config.c @@ -15,6 +15,7 @@ #include #include +#define syslog_info(msg, ...) syslog(LOG_INFO, "%s:%d [" msg "]", __func__, __LINE__, ##__VA_ARGS__) #define syslog_emerg(msg, ...) syslog(LOG_EMERG, "%s:%d [" msg "]", __func__, __LINE__, ##__VA_ARGS__) #define syslog_err(msg, ...) syslog(LOG_ERR, "%s:%d [" msg "]", __func__, __LINE__, ##__VA_ARGS__) @@ -112,6 +113,11 @@ int facilities_config(void* facilities_s) { } } } + if (!facilities->zmq.n_responders) { + syslog_info("[facilities] [config] a valid address to listen to was not found, exiting now"); + rv = 1; + goto cleanup; + } // Fetch [transport] address int index = fetch_target_address(config->transport.zmq.addresses, config->transport.zmq.addresses_len);