From: Fl0-0 Date: Sun, 17 Feb 2019 13:43:40 +0000 (+0100) Subject: Fix for USB uart slowness since PR #720 (#787) X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/7afa751a9673c0427d75116eac14dce2d19adedb?hp=53fb848a0ad6bb8315c1ba5c382bf30ef4998007 Fix for USB uart slowness since PR #720 (#787) --- diff --git a/uart/uart_posix.c b/uart/uart_posix.c index 1db375b2..214cb56a 100644 --- a/uart/uart_posix.c +++ b/uart/uart_posix.c @@ -69,9 +69,9 @@ typedef struct { } serial_port_unix; // Set time-out on 30 miliseconds -const struct timeval timeout = { +struct timeval timeout = { .tv_sec = 0, // 0 second - .tv_usec = 300000 // 300000 micro seconds + .tv_usec = 30000 // 30000 micro seconds }; serial_port uart_open(const char* pcPortName) @@ -88,6 +88,10 @@ serial_port uart_open(const char* pcPortName) } char *colon = strrchr(addrstr, ':'); char *portstr; + + // Set time-out to 300 miliseconds only for TCP port + timeout.tv_usec = 300000; + if (colon) { portstr = colon + 1; *colon = '\0';