]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Wait up to 10 seconds for NQPTP to come online at startup.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 20 Jul 2022 17:05:07 +0000 (18:05 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 20 Jul 2022 17:05:07 +0000 (18:05 +0100)
shairport.c

index db89a496bd4517f2725ae8ea5a3b90896082ae7a..bbecc558c3bc92f2ca0b861972e1c995fd67ebc5 100644 (file)
@@ -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?");