Merge pull request #2127 from wh201906/local_tcp_timeout

Reduce latency in local TCP connection
This commit is contained in:
Iceman 2023-10-14 09:50:57 +02:00 committed by GitHub
commit 8f62e80100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -16,6 +16,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
- Added `hf iclass creditepurse` command to allow crediting the epurse debit value (@nvx) - Added `hf iclass creditepurse` command to allow crediting the epurse debit value (@nvx)
- Modified `hf iclass configcard` to only support online mode @ATK - Modified `hf iclass configcard` to only support online mode @ATK
- Modified `hf iclass configcard` command to generate config cards without a cardhelper module by porting the contents of blocks 7 & 7 from nfc-iclass @ATK - Modified `hf iclass configcard` command to generate config cards without a cardhelper module by porting the contents of blocks 7 & 7 from nfc-iclass @ATK
- Changed the timeout of local TCP connections (@wh201906)
## [Raccoon.4.17140][2023-09-09] ## [Raccoon.4.17140][2023-09-09]
- Changed text and adjust pm3_test case for mf_aes_brute (@doegox) - Changed text and adjust pm3_test case for mf_aes_brute (@doegox)

View file

@ -678,7 +678,16 @@ int TestProxmark(pm3_device_t *dev) {
if (g_conn.send_via_fpc_usart) { if (g_conn.send_via_fpc_usart) {
PrintAndLogEx(INFO, "PM3 UART serial baudrate: " _YELLOW_("%u") "\n", g_conn.uart_speed); PrintAndLogEx(INFO, "PM3 UART serial baudrate: " _YELLOW_("%u") "\n", g_conn.uart_speed);
} else { } else {
int res = uart_reconfigure_timeouts(is_tcp_conn ? UART_TCP_CLIENT_RX_TIMEOUT_MS : UART_USB_CLIENT_RX_TIMEOUT_MS); int res;
if (is_tcp_conn) {
if (memcmp(g_conn.serial_port_name + 4, "localhost", 9) == 0 || memcmp(g_conn.serial_port_name + 4, "127.0.0.1", 9) == 0) {
res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS * 2);
} else {
res = uart_reconfigure_timeouts(UART_TCP_CLIENT_RX_TIMEOUT_MS);
}
} else {
res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS);
}
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
return res; return res;
} }