mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
bonjour-publish: Return ports in network byteorder
For DNS-SD (Bonjour) discovery, all ports should be set in network byteorder instead of host byteorder. Without this, all ports on little-endian systems (intel) are incorrect. Documentation: https://developer.apple.com/library/mac/documentation/networking/Reference/DNSServiceDiscovery_CRef/Reference/reference.html#//apple_ref/c/func/DNSServiceRegister
This commit is contained in:
parent
3d425a3315
commit
2ff195aaa4
1 changed files with 2 additions and 2 deletions
|
|
@ -183,13 +183,13 @@ static uint16_t compute_port(struct userdata *u) {
|
|||
a.port > 0) {
|
||||
|
||||
pa_xfree(a.path_or_host);
|
||||
return a.port;
|
||||
return htons(a.port);
|
||||
}
|
||||
|
||||
pa_xfree(a.path_or_host);
|
||||
}
|
||||
|
||||
return PA_NATIVE_DEFAULT_PORT;
|
||||
return htons(PA_NATIVE_DEFAULT_PORT);
|
||||
}
|
||||
|
||||
static int publish_service(struct service *s) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue