Stop generating an airplay_device_id dynamically. Base it on a fixed MAC address (not necessarily the active one).

This commit is contained in:
Mike Brady
2021-12-24 10:13:25 +00:00
parent b413a29da6
commit 1e588a2e2c
+1 -3
View File
@@ -1547,8 +1547,6 @@ int main(int argc, char **argv) {
// get a device id -- the first non-local MAC address
get_device_id((uint8_t *)&config.hw_addr, 6);
// hack add the PID to get something unique
config.hw_addr[5] += pid & 0xff;
// get the endianness
union {
@@ -1835,7 +1833,7 @@ int main(int argc, char **argv) {
// use the start of the config.hw_addr and the PID to generate the airplay_device_id
uint64_t apid = nctoh64(config.hw_addr);
apid = apid >> 16; // we only use the first 6 bytes but have imported 8.
apid = apid + pid;
// apid = apid + pid;
char apids[6*2+5+1]; // six pairs of digits, 5 colons and a NUL
apids[6*2+5] = 0; // NUL termination
int i;