From 0c6b74e9a607cfb3e543a2a0bb2d486b7129385e Mon Sep 17 00:00:00 2001 From: Andreas Nicolai Date: Mon, 20 Jan 2025 08:49:41 +0100 Subject: [PATCH] Fixes test suite (unit-test-client): copy&paste bug, ctx instead of invalid_ctx (closes #791) --- tests/unit-test-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c index a1813b1e..31182440 100644 --- a/tests/unit-test-client.c +++ b/tests/unit-test-client.c @@ -673,7 +673,7 @@ int main(int argc, char *argv[]) // Invalid in TCP or RTU mode... modbus_t *invalid_ctx = modbus_new_tcp("1.2.3.4", 1502); - modbus_set_response_timeout(ctx, 0, 1); + modbus_set_response_timeout(invalid_ctx, 0, 1); rc = modbus_connect(invalid_ctx); printf("8/8 Connection timeout: "); ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");