bring up to date with unstable branch

This commit is contained in:
Mike Brady
2019-01-27 14:25:02 +00:00
5 changed files with 11 additions and 14 deletions
+1
View File
@@ -11,3 +11,4 @@ Shairport Sync runs on Linux and FreeBSD. It does not support AirPlay video or p
This is the very unstable "transit" branch. It is used to move unfinished or untested code between development sites.
To access the stable version, where changes are made after due time, please switch to the "master" branch.
+5 -5
View File
@@ -634,7 +634,7 @@ static int init(int argc, char **argv) {
// set up default values first
alsa_backend_state = abm_disconnected; // startup state
debug(1, "alsa: init() -- alsa_backend_state => abm_disconnected.");
debug(2, "alsa: init() -- alsa_backend_state => abm_disconnected.");
set_period_size_request = 0;
set_buffer_size_request = 0;
config.alsa_use_hardware_mute = 0; // don't use it by default
@@ -1166,7 +1166,7 @@ int do_play(void *buf, int samples) {
}
const uint64_t start_measurement_from_this_frame =
(2 * config.output_rate) / 352; // two seconds of framesÉ
(2 * config.output_rate) / 352; // two seconds of frames
frame_index++;
@@ -1462,14 +1462,14 @@ void *alsa_buffer_monitor_thread_code(__attribute__((unused)) void *arg) {
if ((alsa_backend_state == abm_disconnected) && (config.keep_dac_busy != 0)) {
// open the dac and move to abm_connected mode
if (do_open() == 0)
debug(1, "alsa: alsa_buffer_monitor_thread_code() -- output device opened; alsa_backend_state => abm_connected");
debug(2, "alsa: alsa_buffer_monitor_thread_code() -- output device opened; alsa_backend_state => abm_connected");
} else if ((alsa_backend_state == abm_connected) && (config.keep_dac_busy == 0)) {
stall_monitor_start_time = 0;
frame_index = 0;
measurement_data_is_valid = 0;
debug(1, "alsa: alsa_buffer_monitor_thread_code() -- closing the output device");
debug(2, "alsa: alsa_buffer_monitor_thread_code() -- closing the output device");
do_close();
debug(1, "alsa: alsa_buffer_monitor_thread_code() -- alsa_backend_state => abm_disconnected");
debug(2, "alsa: alsa_buffer_monitor_thread_code() -- alsa_backend_state => abm_disconnected");
}
// now, if the backend is not in the abm_disconnected state
// and config.keep_dac_busy is true (at the present, this has to be the case to be in the
+3 -3
View File
@@ -2,7 +2,7 @@
* Utility routines. This file is part of Shairport.
* Copyright (c) James Laird 2013
* The volume to attenuation function vol2attn copyright (c) Mike Brady 2014
* Further changes (c) Mike Brady 2014 -- 2018
* Further changes and additions (c) Mike Brady 2014 -- 2019
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
@@ -415,7 +415,7 @@ char *base64_enc(uint8_t *input, int length) {
buf[bptr->length - 1] = 0;
}
BIO_free_all(bmem);
BIO_free_all(b64);
pthread_setcancelstate(oldState, NULL);
return buf;
@@ -444,7 +444,6 @@ uint8_t *base64_dec(char *input, int *outlen) {
nread = BIO_read(b64, buf, bufsize);
// BIO_free_all(bmem);
BIO_free_all(b64);
*outlen = nread;
@@ -500,6 +499,7 @@ uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) {
default:
die("bad rsa mode");
}
RSA_free(rsa);
pthread_setcancelstate(oldState, NULL);
return out;
}
+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], [3.3d48], [mikebrady@eircom.net])
AC_INIT([shairport-sync], [3.3d49], [mikebrady@eircom.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
+1 -5
View File
@@ -2,7 +2,7 @@
* Shairport, an Apple Airplay receiver
* Copyright (c) James Laird 2013
* All rights reserved.
* Modifications (c) Mike Brady 2014--2018
* Modifications and additions (c) Mike Brady 2014--2019
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -1602,14 +1602,10 @@ int main(int argc, char **argv) {
uint8_t ap_md5[16];
#ifdef CONFIG_OPENSSL
// can't imagine this is necessary, but here it is anyway
int oldState;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState); // make this un-cancellable
MD5_CTX ctx;
MD5_Init(&ctx);
MD5_Update(&ctx, config.service_name, strlen(config.service_name));
MD5_Final(ap_md5, &ctx);
pthread_setcancelstate(oldState, NULL);
#endif
#ifdef CONFIG_MBEDTLS