+ // Warn about any streams servers we've lost.
+ for (const string &url : expecting_urls) {
+ log(WARNING, "stream '%s' disappeared from the configuration file. "
+ "It will not be deleted, but clients will not get any new inputs. "
+ "If you really meant to delete it, set src=delete and reload.",
+ url.c_str());
+ }
+
+ // UDP streams.
+ for (const UDPStreamConfig &udpstream_config : config.udpstreams) {
+ int stream_index = servers->add_udpstream(
+ udpstream_config.dst,
+ udpstream_config.pacing_rate,
+ udpstream_config.ttl,
+ udpstream_config.multicast_iface_index);
+
+ string src = udpstream_config.src;
+ if (!src.empty()) {
+ auto input_it = inputs->find(make_pair(src, Input::INPUT_ENCODING_RAW));
+ assert(input_it != inputs->end());
+ input_it->second.input->add_destination(stream_index);
+ ++input_it->second.refcount;
+ }
+ }
+
+ // HTTP gen204 endpoints.
+ for (const Gen204Config &ping_config : config.pings) {
+ servers->add_gen204(ping_config.url, ping_config.allow_origin);
+ }
+}
+
+void open_logs(const vector<LogConfig> &log_destinations)
+{
+ for (const LogConfig &log_destination : log_destinations) {
+ if (log_destination.type == LogConfig::LOG_TYPE_FILE) {
+ add_log_destination_file(log_destination.filename);
+ } else if (log_destination.type == LogConfig::LOG_TYPE_CONSOLE) {
+ add_log_destination_console();
+ } else if (log_destination.type == LogConfig::LOG_TYPE_SYSLOG) {
+ add_log_destination_syslog();
+ } else {
+ assert(false);
+ }
+ }
+ start_logging();
+}
+
+bool dry_run_config(const string &argv0, const string &config_filename)