]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Remove variable delay from non_blocking_write and include it whether metadata is...
authorMike Brady <mikebrady@eircom.net>
Sun, 26 Jun 2016 14:20:09 +0000 (15:20 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 26 Jun 2016 14:20:09 +0000 (15:20 +0100)
.gitignore
INSTALL [deleted file]
common.c
common.h
configure.ac
rtsp.c
shairport.c

index 87e9f1ef2883a627048c335ec336b462a3023d67..9e0559313020df5bb9d13a82cd5359c862d4bbac 100644 (file)
@@ -1,3 +1,4 @@
+/INSTALL
 /shairport-sync
 /shairport-sync.exe
 /*.o
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index 55a5707..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,4 +0,0 @@
-Installation Instructions
-*************************
-
-Please refer to README.md for installation instructions.
index 0dc8a0b7555347677991891315e81d0f00335ab8..bf7212738e03433876c05b235cbeb34b3e9d854e 100644 (file)
--- a/common.c
+++ b/common.c
@@ -513,7 +513,6 @@ uint64_t get_absolute_time_in_fp() {
   return time_now_fp;
 }
 
-#ifdef CONFIG_METADATA
 ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
        void *ibuf = (void *)buf;
        size_t bytes_remaining = count;
@@ -523,7 +522,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
                // check that we can do some writing
                ufds[0].fd = fd;
     ufds[0].events = POLLOUT;
-    rc = poll(ufds, 1, config.metadata_pipe_timeout);
+    rc = poll(ufds, 1, 5000);
     if (rc < 0) {
       // debug(1, "non-blocking write error waiting for pipe to become ready for writing...");
     } else if (rc == 0) {
@@ -546,7 +545,6 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) {
                return rc;
   //  return write(fd,buf,count);
 }
-#endif
 
 /* from http://coding.debuntu.org/c-implementing-str_replace-replace-all-occurrences-substring#comment-722 */
 
index 5924be7996a77e1e8869aeb999942c2d3b89078b..a67f95b4b8a45e3716bd2ef5bda025cd2fd9e7af 100644 (file)
--- a/common.h
+++ b/common.h
@@ -54,7 +54,6 @@ typedef struct {
   char *service_name; // the name for the shairport service, e.g. "Shairport Sync Version %v running on host %h"
 #ifdef CONFIG_METADATA
   int metadata_enabled;
-  int metadata_pipe_timeout; // in milliseconds
   char *metadata_pipename;
   char *metadata_sockaddr;
   int metadata_sockport;
index c08c4574cae8260fbdbf6b9d78ec4022f24d87b8..5ce74af8ba3522ed41399e435c46b4a972f1827e 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.4.1], [mikebrady@eircom.net])
+AC_INIT([shairport-sync], [2.8.4.2], [mikebrady@eircom.net])
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([shairport.c])
 AC_CONFIG_HEADERS([config.h])
diff --git a/rtsp.c b/rtsp.c
index e78456f7e6fc60372dfb4ce501e9bc14ff5513be..cf94c52d6f845a59a4ab725e7562089c450d7c5b 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -1838,7 +1838,6 @@ void rtsp_listen_loop(void) {
       // strerror(errno));
       continue;
     }
-
     ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
 
 #ifdef IPV6_V6ONLY
index 58c1dc546e3b23e002b281f686d82c0e8149fdf8..df577348c4ad4a537eb342caad78adaf30ad4901 100644 (file)
@@ -490,14 +490,6 @@ int parse_options(int argc, char **argv) {
       if (config_lookup_int(config.cfg, "metadata.socket_msglength", &value)) {
         config.metadata_sockmsglength = value < 500 ? 500 : value > 65000 ? 65000 : value;
       }
-      if (config_lookup_int(config.cfg, "metadata.pipe_timeout", &value)) {
-      
-        if ((value < 1) || (value > 150000))
-          die("Invalid timeout range  \"%sd\". It should be in the range 1 to 150,000 milliseconds.",
-              value);
-        else
-          config.metadata_pipe_timeout = value;
-      }
 
   #endif
 
@@ -763,9 +755,6 @@ int main(int argc, char **argv) {
   //snprintf(config.service_name, 20 + 100, "Shairport Sync on %s", hostname);
   set_requested_connection_state_to_output(1); // we expect to be able to connect to the output device
   config.audio_backend_buffer_desired_length = 6615; // 0.15 seconds.
-#ifdef CONFIG_METADATA
-  config.metadata_pipe_timeout = 5000; //milliseconds
-#endif
   config.udp_port_base = 6001;
   config.udp_port_range = 100;