modbus: copy trans_id & proto_id to response header
Copy Transaction and Protocol Identifiers to response header. Signed-off-by: Luc Viala <luc.viala19@gmail.com>
This commit is contained in:
parent
2f38c522fd
commit
19c519eb05
1 changed files with 2 additions and 0 deletions
|
@ -950,6 +950,8 @@ bool modbus_server_handler(struct modbus_context *ctx)
|
|||
}
|
||||
|
||||
/* Prepare response header */
|
||||
ctx->tx_adu.trans_id = ctx->rx_adu.trans_id;
|
||||
ctx->tx_adu.proto_id = ctx->rx_adu.proto_id;
|
||||
ctx->tx_adu.unit_id = addr;
|
||||
ctx->tx_adu.fc = fc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue