diff --git a/lib/dnssdint.h b/lib/dnssdint.h index ae7e170..e302cdd 100644 --- a/lib/dnssdint.h +++ b/lib/dnssdint.h @@ -1,6 +1,7 @@ #ifndef DNSSDINT_H #define DNSSDINT_H +#include "global.h" #define RAOP_TXTVERS "1" #define RAOP_CH "2" /* Audio channels: 2 */ #define RAOP_CN "0,1,2,3" /* Audio codec: PCM, ALAC, AAC, AAC ELD */ @@ -13,14 +14,14 @@ #define RAOP_DA "true" #define RAOP_SR "44100" /* Sample rate: 44100 */ #define RAOP_SS "16" /* Sample size: 16 */ -#define RAOP_VS "220.68" +#define RAOP_VS GLOBAL_VERSION /* defined in global.h */ #define RAOP_TP "UDP" /* Transport protocol. Possible values: UDP or TCP or TCP,UDP */ #define RAOP_MD "0,1,2" /* Metadata: text, artwork, progress */ #define RAOP_VN "65537" #define RAOP_PK "b07727d6f6cd6e08b58ede525ec3cdeaa252ad9f683feb212ef8a205246554e7" #define AIRPLAY_FEATURES "0x5A7FFEE6" -#define AIRPLAY_SRCVERS "220.68" +#define AIRPLAY_SRCVERS GLOBAL_VERSION /*defined in global.h */ #define AIRPLAY_FLAGS "0x4" #define AIRPLAY_VV "2" #define AIRPLAY_PK "b07727d6f6cd6e08b58ede525ec3cdeaa252ad9f683feb212ef8a205246554e7" diff --git a/lib/global.h b/lib/global.h index 1611ece..d3242ba 100644 --- a/lib/global.h +++ b/lib/global.h @@ -1,11 +1,9 @@ #ifndef GLOBAL_H #define GLOBAL_H -#define GLOBAL_FEATURES 0x7 #define GLOBAL_MODEL "AppleTV3,2" #define GLOBAL_VERSION "220.68" - /* use old protocol for audio AES key if client's User-Agent string is contained in these strings */ /* replace xxx by any new User-Agent string as needed */ #define OLD_PROTOCOL_CLIENT_USER_AGENT_LIST "AirMyPC/2.0;xxx" diff --git a/lib/raop.c b/lib/raop.c index 7928e11..179a088 100644 --- a/lib/raop.c +++ b/lib/raop.c @@ -202,7 +202,7 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) { http_response_add_header(*response, "CSeq", cseq); //http_response_add_header(*response, "Apple-Jack-Status", "connected; type=analog"); - http_response_add_header(*response, "Server", "AirTunes/220.68"); + http_response_add_header(*response, "Server", "AirTunes/"GLOBAL_VERSION); logger_log(conn->raop->logger, LOGGER_DEBUG, "Handling request %s with URL %s", method, url); raop_handler_t handler = NULL; diff --git a/lib/raop_handlers.h b/lib/raop_handlers.h index c4cd890..075ebc3 100644 --- a/lib/raop_handlers.h +++ b/lib/raop_handlers.h @@ -89,7 +89,7 @@ raop_handler_info(raop_conn_t *conn, plist_t keep_alive_low_power_node = plist_new_uint(1); plist_dict_set_item(r_node, "keepAliveLowPower", keep_alive_low_power_node); - plist_t source_version_node = plist_new_string(AIRPLAY_SRCVERS); + plist_t source_version_node = plist_new_string(GLOBAL_VERSION); plist_dict_set_item(r_node, "sourceVersion", source_version_node); plist_t pk_node = plist_new_data(pk, pk_len);