From e0b13829cd35800d51817208bede638f66bc1ba1 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 23 May 2024 14:24:30 +0100 Subject: [PATCH] Reverse changes made in PR 1831 (https://github.com/mikebrady/shairport-sync/pull/1831/files) -- issue identified in Issue 1856 (https://github.com/mikebrady/shairport-sync/issues/1856). --- mdns.h | 6 +++--- rtsp.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mdns.h b/mdns.h index e81fda487..d07afc6cd 100644 --- a/mdns.h +++ b/mdns.h @@ -33,13 +33,13 @@ typedef struct { /* #define MDNS_RECORD_WITH_METADATA \ - "tp=UDP", "sm=false", "ek=1", "et=0,1", "ch=2", METADATA_EXPRESSION, "ss=16", \ + "tp=UDP", "sm=false", "ek=1", "et=0,1", "cn=0,1", "ch=2", METADATA_EXPRESSION, "ss=16", \ "sr=44100", "vn=3", "txtvers=1", config.password ? "pw=true" : "pw=false" */ #define MDNS_RECORD_WITH_METADATA \ "sf=0x4", "fv=76400.10", "am=ShairportSync", "vs=105.1", "tp=TCP,UDP", "vn=65537", \ METADATA_EXPRESSION, "ss=16", "sr=44100", "da=true", "sv=false", "et=0,1", "ek=1", \ - "ch=2", "txtvers=1", config.password ? "pw=true" : "pw=false" + "cn=0,1", "ch=2", "txtvers=1", config.password ? "pw=true" : "pw=false" #endif @@ -52,7 +52,7 @@ typedef struct { #define MDNS_RECORD_WITHOUT_METADATA \ "sf=0x4", "fv=76400.10", "am=ShairportSync", "vs=105.1", "tp=TCP,UDP", "vn=65537", "ss=16", \ - "sr=44100", "da=true", "sv=false", "et=0,1", "ek=1", "ch=2", "txtvers=1", \ + "sr=44100", "da=true", "sv=false", "et=0,1", "ek=1", "cn=0,1", "ch=2", "txtvers=1", \ config.password ? "pw=true" : "pw=false" #endif // _MDNS_H diff --git a/rtsp.c b/rtsp.c index 3cbde4ff8..c1c387922 100644 --- a/rtsp.c +++ b/rtsp.c @@ -271,7 +271,7 @@ void build_bonjour_strings(__attribute((unused)) rtsp_conn_info *conn) { snprintf(pkString, sizeof(pkString), "pk="); pkString_make(pkString + strlen("pk="), sizeof(pkString) - strlen("pk="), config.airplay_device_id); - + txt_records[entry_number++] = "cn=0,1"; txt_records[entry_number++] = "da=true"; txt_records[entry_number++] = "et=0,1"; txt_records[entry_number++] = ap1_featuresString; @@ -310,6 +310,7 @@ void build_bonjour_strings(__attribute((unused)) rtsp_conn_info *conn) { txt_records[entry_number++] = "sv=false"; txt_records[entry_number++] = "et=0,1"; txt_records[entry_number++] = "ek=1"; + txt_records[entry_number++] = "cn=0,1"; txt_records[entry_number++] = "ch=2"; txt_records[entry_number++] = "txtvers=1"; if (config.password == 0)