]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Fix bug caused by regtype not being initialised under some circumetances.
authorMike Brady <mike@debian>
Sun, 24 Apr 2016 09:15:25 +0000 (10:15 +0100)
committerMike Brady <mike@debian>
Sun, 24 Apr 2016 09:15:25 +0000 (10:15 +0100)
configure.ac
shairport.c

index 3bf6e80dadef279eb5d9ad481ec72f921688c131..fe28922ebd0f3d6c9dae9b28471fee50bc633d0e 100644 (file)
@@ -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])
index 931c270b61f4eaacbe1ff3b42312a22090eccad6..7b492dabe32146f9eef2c2a46e8799b7a98aab81 100644 (file)
@@ -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;