aboutsummaryrefslogtreecommitdiff
path: root/src/IO/dpi.c
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-07-29 20:18:14 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-08-07 16:50:51 +0200
commit49ae3fd3edb957a8a2f7c7541c66b9336f25176e (patch)
treef77ceb37f996983fde3c2dc8811e201eaf634c02 /src/IO/dpi.c
parent59c9094781cbf340f11929d497c1465cf45cf90a (diff)
Use portable dUsleep() instead of usleep()
Reviewed-by: dogma
Diffstat (limited to 'src/IO/dpi.c')
-rw-r--r--src/IO/dpi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/IO/dpi.c b/src/IO/dpi.c
index c1786de6..46ddc49e 100644
--- a/src/IO/dpi.c
+++ b/src/IO/dpi.c
@@ -39,6 +39,7 @@
#include "IO.h"
#include "Url.h"
#include "../../dpip/dpip.h"
+#include "dlib/dlib.h"
/* This one is tricky, some sources state it should include the byte
* for the terminating NULL, and others say it shouldn't. */
@@ -504,12 +505,12 @@ static int Dpi_check_dpid(int num_tries)
static int Dpi_blocking_start_dpid(void)
{
int cst, try = 0,
- n_tries = 3; /* 3 seconds */
+ n_tries = 12; /* 3 seconds */
/* test the dpid, and wait a bit for it to start if necessary */
while ((cst = Dpi_check_dpid(n_tries)) == 1) {
MSG("Dpi_blocking_start_dpid: try %d\n", ++try);
- sleep(1);
+ dUsleep(250000UL);
}
return cst;
}