diff --git a/README.md b/README.md index 05129d9d..5895dca9 100644 --- a/README.md +++ b/README.md @@ -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. + diff --git a/audio_alsa.c b/audio_alsa.c index b71d3b6b..e9ac05f9 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -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 diff --git a/common.c b/common.c index 10c9cc9f..87526f46 100644 --- a/common.c +++ b/common.c @@ -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; } diff --git a/configure.ac b/configure.ac index 530bf763..af9268e8 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], [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]) diff --git a/shairport.c b/shairport.c index 292acf25..15f8b9c8 100644 --- a/shairport.c +++ b/shairport.c @@ -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