summaryrefslogtreecommitdiffstats
path: root/src/dabInputUdp.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-12-18 11:10:04 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-12-18 11:10:04 +0100
commita8c51a1bbc1493730567ef1c0367cccce34035eb (patch)
tree6604ea3a621bea0cd0d4e8af0cf102d74078eee7 /src/dabInputUdp.cpp
parent246dcc7aec5d4a1c7ffc014f36d4f963831869d3 (diff)
downloaddabmux-a8c51a1bbc1493730567ef1c0367cccce34035eb.tar.gz
dabmux-a8c51a1bbc1493730567ef1c0367cccce34035eb.tar.bz2
dabmux-a8c51a1bbc1493730567ef1c0367cccce34035eb.zip
Fix udp:// syntax for data subchannels
Diffstat (limited to 'src/dabInputUdp.cpp')
-rw-r--r--src/dabInputUdp.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dabInputUdp.cpp b/src/dabInputUdp.cpp
index 29e090d..0765599 100644
--- a/src/dabInputUdp.cpp
+++ b/src/dabInputUdp.cpp
@@ -70,12 +70,19 @@ int dabInputUdpOpen(void* args, const char* inputName)
long port;
dabInputUdpData* input = (dabInputUdpData*)args;
- address = strdup(inputName);
+ // Skip the udp:// part if it is present
+ if (strncmp(inputName, "udp://", 6) == 0) {
+ address = strdup(inputName + 6);
+ }
+ else {
+ address = strdup(inputName);
+ }
+
ptr = strchr(address, ':');
if (ptr == NULL) {
etiLog.log(error,
"\"%s\" is an invalid format for udp address: "
- "should be [address]:port - > aborting\n", address);
+ "should be [udp://][address]:port - > aborting\n", address);
returnCode = -1;
goto udpopen_ptr_null_out;
}