Commit 349b6dedb933ad7d87bd0832cd410a22fd66d882
1 parent
d928314a
Fix bandwidth-server-one (closes #152)
Showing
1 changed file
with
2 additions
and
2 deletions
tests/bandwidth-server-one.c
| ... | ... | @@ -59,7 +59,6 @@ int main(int argc, char *argv[]) |
| 59 | 59 | |
| 60 | 60 | if (use_backend == TCP) { |
| 61 | 61 | ctx = modbus_new_tcp("127.0.0.1", 1502); |
| 62 | - modbus_set_debug(ctx, TRUE); | |
| 63 | 62 | s = modbus_tcp_listen(ctx, 1); |
| 64 | 63 | modbus_tcp_accept(ctx, &s); |
| 65 | 64 | |
| ... | ... | @@ -69,7 +68,8 @@ int main(int argc, char *argv[]) |
| 69 | 68 | modbus_connect(ctx); |
| 70 | 69 | } |
| 71 | 70 | |
| 72 | - mb_mapping = modbus_mapping_new(1000, 1000, 1000, 1000); | |
| 71 | + mb_mapping = modbus_mapping_new(MODBUS_MAX_READ_BITS, 0, | |
| 72 | + MODBUS_MAX_READ_REGISTERS, 0); | |
| 73 | 73 | if (mb_mapping == NULL) { |
| 74 | 74 | fprintf(stderr, "Failed to allocate the mapping: %s\n", |
| 75 | 75 | modbus_strerror(errno)); | ... | ... |