From df8663655e1d156cef98b16eb4f05a803a07dcce Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:41:30 +0100 Subject: [PATCH] Fix compilation bug in classic mode -- don't look for config.airplay_device_id. --- mqtt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mqtt.c b/mqtt.c index addf04f6..105928fd 100644 --- a/mqtt.c +++ b/mqtt.c @@ -100,7 +100,11 @@ void on_connect(struct mosquitto *mosq, __attribute__((unused)) void *userdata, // function to send autodiscovery messages for Home Assistant void send_autodiscovery_messages(struct mosquitto *mosq) { const char *device_name = config.service_name; +#ifdef CONFIG_AIRPLAY_2 const char *device_id = config.airplay_device_id ? config.airplay_device_id : config.service_name; +#else + const char *device_id = config.service_name; +#endif const char *device_id_no_colons = str_replace(device_id, ":", ""); const char *sw_version = get_version_string(); const char *model = "shairport-sync"; -- 2.47.2