Commit ce5435c4aee443d81c1700a04f282eedca9b0e06
1 parent
39ccdf32
Change the nb of registers sent by the server to avoid a duplicate
With the previous value UT_REGISTERS_NB, the server sent two consecutives and identical responses to the client. These requests could be confusing for the human reader!
Showing
1 changed file
with
1 additions
and
1 deletions
tests/unit-test-server.c
| ... | ... | @@ -127,7 +127,7 @@ int main(int argc, char*argv[]) |
| 127 | 127 | == UT_REGISTERS_NB_SPECIAL) { |
| 128 | 128 | printf("Set an incorrect number of values\n"); |
| 129 | 129 | MODBUS_SET_INT16_TO_INT8(query, header_length + 3, |
| 130 | - UT_REGISTERS_NB); | |
| 130 | + UT_REGISTERS_NB_SPECIAL - 1); | |
| 131 | 131 | } else if (MODBUS_GET_INT16_FROM_INT8(query, header_length + 1) |
| 132 | 132 | == UT_REGISTERS_ADDRESS_SPECIAL) { |
| 133 | 133 | printf("Reply to this special register address by an exception\n"); | ... | ... |