From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:33:19 +0000 (+0100) Subject: update to correspond with the move of principal_conn_lock to a pthread_rwlock. X-Git-Tag: 4.3.2^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed22e415439fa140b31bf642d3e078b8c4ab9c9;p=thirdparty%2Fshairport-sync.git update to correspond with the move of principal_conn_lock to a pthread_rwlock. --- diff --git a/dbus-service.c b/dbus-service.c index a25d9962..8acf2392 100644 --- a/dbus-service.c +++ b/dbus-service.c @@ -635,7 +635,8 @@ gboolean notify_volume_callback(ShairportSync *skeleton, if (((iv >= -30.0) && (iv <= 0.0)) || (iv == -144.0)) { debug(2, ">> setting volume to %7.4f.", iv); - pthread_cleanup_debug_mutex_lock(&principal_conn_lock, 100000, 1); + pthread_rwlock_rdlock(&principal_conn_lock); // don't let the principal_conn be changed + pthread_cleanup_push(rwlock_unlock,(void *)&principal_conn_lock); if (principal_conn != NULL) { player_volume(iv, principal_conn);