Remove variable delay from non_blocking_write and include it whether metadata is enabled or not. Remove the INSTALL file and ignroe it in git.

This commit is contained in:
Mike Brady
2016-06-26 15:20:09 +01:00
parent 967ed5bbc1
commit 1fe705cf5f
7 changed files with 3 additions and 21 deletions
+1
View File
@@ -1,3 +1,4 @@
/INSTALL
/shairport-sync
/shairport-sync.exe
/*.o
-4
View File
@@ -1,4 +0,0 @@
Installation Instructions
*************************
Please refer to README.md for installation instructions.
+1 -3
View File
@@ -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 */
-1
View File
@@ -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;
+1 -1
View 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])
-1
View File
@@ -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
-11
View 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;