From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 20 Jul 2022 17:05:07 +0000 (+0100) Subject: Wait up to 10 seconds for NQPTP to come online at startup. X-Git-Tag: 4.1-rc1~24^2~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4729e325e044eb83eba3974d7aaf79a4e204cd3c;p=thirdparty%2Fshairport-sync.git Wait up to 10 seconds for NQPTP to come online at startup. --- diff --git a/shairport.c b/shairport.c index db89a496..bbecc558 100644 --- a/shairport.c +++ b/shairport.c @@ -2323,12 +2323,12 @@ int main(int argc, char **argv) { ptp_send_control_message_string("T"); // get nqptp to create the named shm interface int ptp_check_times = 0; const int ptp_wait_interval_us = 5000; - // wait for up to two seconds for NQPTP to come online + // wait for up to ten seconds for NQPTP to come online do { ptp_send_control_message_string("T"); // get nqptp to create the named shm interface usleep(ptp_wait_interval_us); ptp_check_times++; - } while ((ptp_shm_interface_open() != 0) && (ptp_check_times < (2000000 / ptp_wait_interval_us))); + } while ((ptp_shm_interface_open() != 0) && (ptp_check_times < (10000000 / ptp_wait_interval_us))); if (ptp_shm_interface_open() != 0) { die("Can't access NQPTP! Is it installed and running?");