diff options
author | cbdev <cb@cbcdn.com> | 2019-12-08 02:52:02 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-12-08 02:52:02 +0100 |
commit | ac4aa9935bfb6406c71ea5ed14a68bd41617b701 (patch) | |
tree | f2aa863a8a3a8a41591da84d3df1ca904245f4f8 /backends/sacn.c | |
parent | 99d31eabf4a3afa4fd54782cc1d7cd92fbdae084 (diff) | |
parent | 4ca0acff460c1c02a11cb9f246fb755cd4f4f792 (diff) | |
download | midimonster-ac4aa9935bfb6406c71ea5ed14a68bd41617b701.tar.gz midimonster-ac4aa9935bfb6406c71ea5ed14a68bd41617b701.tar.bz2 midimonster-ac4aa9935bfb6406c71ea5ed14a68bd41617b701.zip |
Merge branch 'master' into rtpmidi
Diffstat (limited to 'backends/sacn.c')
-rw-r--r-- | backends/sacn.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/backends/sacn.c b/backends/sacn.c index 2229b8a..edb648d 100644 --- a/backends/sacn.c +++ b/backends/sacn.c @@ -111,16 +111,13 @@ static int sacn_configure(char* option, char* value){ } else if(!strcmp(option, "bind")){ mmbackend_parse_hostspec(value, &host, &port); - if(!port){ - port = SACN_PORT; - } if(!host){ fprintf(stderr, "No valid sACN bind address provided\n"); return 1; } - if(sacn_listener(host, port, flags)){ + if(sacn_listener(host, port ? port : SACN_PORT, flags)){ fprintf(stderr, "Failed to bind sACN descriptor: %s\n", value); return 1; } @@ -155,16 +152,13 @@ static int sacn_configure_instance(instance* inst, char* option, char* value){ } else if(!strcmp(option, "destination")){ mmbackend_parse_hostspec(value, &host, &port); - if(!port){ - port = SACN_PORT; - } if(!host){ fprintf(stderr, "No valid sACN destination for instance %s\n", inst->name); return 1; } - return mmbackend_parse_sockaddr(host, port, &data->dest_addr, &data->dest_len); + return mmbackend_parse_sockaddr(host, port ? port : SACN_PORT, &data->dest_addr, &data->dest_len); } else if(!strcmp(option, "from")){ next = value; |