From 349b6dedb933ad7d87bd0832cd410a22fd66d882 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Mon, 21 Oct 2013 12:56:00 +0200 Subject: [PATCH] Fix bandwidth-server-one (closes #152) --- tests/bandwidth-server-one.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bandwidth-server-one.c b/tests/bandwidth-server-one.c index 9174203..518871e 100644 --- a/tests/bandwidth-server-one.c +++ b/tests/bandwidth-server-one.c @@ -59,7 +59,6 @@ int main(int argc, char *argv[]) if (use_backend == TCP) { ctx = modbus_new_tcp("127.0.0.1", 1502); - modbus_set_debug(ctx, TRUE); s = modbus_tcp_listen(ctx, 1); modbus_tcp_accept(ctx, &s); @@ -69,7 +68,8 @@ int main(int argc, char *argv[]) modbus_connect(ctx); } - mb_mapping = modbus_mapping_new(1000, 1000, 1000, 1000); + mb_mapping = modbus_mapping_new(MODBUS_MAX_READ_BITS, 0, + MODBUS_MAX_READ_REGISTERS, 0); if (mb_mapping == NULL) { fprintf(stderr, "Failed to allocate the mapping: %s\n", modbus_strerror(errno)); -- libgit2 0.21.4