From: Mike Brady Date: Sun, 24 Apr 2016 09:15:25 +0000 (+0100) Subject: Fix bug caused by regtype not being initialised under some circumetances. X-Git-Tag: 2.8.3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=223fba3818130fea81910fb395cedfbafc061c2f;p=thirdparty%2Fshairport-sync.git Fix bug caused by regtype not being initialised under some circumetances. --- diff --git a/configure.ac b/configure.ac index 3bf6e80d..fe28922e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [2.8.2], [mikebrady@eircom.net]) +AC_INIT([shairport-sync], [2.8.3], [mikebrady@eircom.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/shairport.c b/shairport.c index 931c270b..7b492dab 100644 --- a/shairport.c +++ b/shairport.c @@ -414,8 +414,6 @@ int parse_options(int argc, char **argv) { /* Get the regtype -- the service type and protocol, separated by a dot. Default is "_raop._tcp" */ if (config_lookup_string(config.cfg, "general.regtype", &str)) config.regtype = strdup(str); - else - config.regtype = strdup("_raop._tcp"); /* Get the volume range, in dB, that should be used If not set, it means you just use the range set by the mixer. */ @@ -575,6 +573,9 @@ int parse_options(int argc, char **argv) { config.metadata_pipename=strdup("/tmp/shairport-sync-metadata"); #endif +/* if the regtype hasn't been set, do it now */ + if (config.regtype==NULL) + config.regtype = strdup("_raop._tcp"); if (tdebuglev!=0) debuglev = tdebuglev;