From 279470bc07c541cc6af04350f7fe50f234a3b081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Wed, 26 May 2021 03:23:19 +0200 Subject: [PATCH] pulse-server: native-protocol-tcp: do not hardcode port Use `PW_PROTOCOL_PULSE_DEFAULT_PORT` from pulse-server.h instead of hard-coding the default port. --- .../modules/module-native-protocol-tcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c b/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c index 16ace6290..45ec6f0e9 100644 --- a/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c +++ b/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c @@ -25,6 +25,7 @@ #include #include "../module.h" +#include "../pulse-server.h" #include "registry.h" #define ERROR_RETURN(str) \ @@ -99,7 +100,8 @@ struct module *create_module_native_protocol_tcp(struct impl *impl, const char * module_args_add_props(props, argument); if ((port = pw_properties_get(props, "port")) == NULL) - port = "4713"; + port = SPA_STRINGIFY(PW_PROTOCOL_PULSE_DEFAULT_PORT); + listen = pw_properties_get(props, "listen"); pw_properties_setf(props, "pulse.tcp", "tcp:%s%s%s",