From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 26 Feb 2022 08:27:45 +0000 (+0000) Subject: Open the SHM instrface atstartup and close it on shutdown. X-Git-Tag: 4.1-rc1~24^2~281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6fd0fbfdb93b776dd41f1519951c8f8d94bf4f5;p=thirdparty%2Fshairport-sync.git Open the SHM instrface atstartup and close it on shutdown. --- diff --git a/shairport.c b/shairport.c index e9fdd8d2..ea7b0b95 100644 --- a/shairport.c +++ b/shairport.c @@ -47,6 +47,7 @@ #include #include #include +#include "ptp-utilities.h" #endif #ifdef CONFIG_MBEDTLS @@ -1541,6 +1542,7 @@ void exit_function() { free(config.airplay_pin); if (config.airplay_pi) free(config.airplay_pi); + ptp_shm_interface_close(); // close it if it's open #endif #ifdef CONFIG_LIBDAEMON @@ -2208,6 +2210,10 @@ int main(int argc, char **argv) { } #endif +#ifdef CONFIG_AIRPLAY_2 + ptp_shm_interface_open(); +#endif + activity_monitor_start(); // not yet for AP2 pthread_create(&rtsp_listener_thread, NULL, &rtsp_listen_loop, NULL); atexit(exit_rtsp_listener);