mirror of
https://github.com/espressif/esp-modbus.git
synced 2025-07-29 18:07:17 +02:00
fix crash if incorrect state on collisions v1
This commit is contained in:
@ -245,7 +245,9 @@ xMBRTUReceiveFSM( void )
|
|||||||
BOOL xStatus = FALSE;
|
BOOL xStatus = FALSE;
|
||||||
UCHAR ucByte;
|
UCHAR ucByte;
|
||||||
|
|
||||||
assert( eSndState == STATE_TX_IDLE );
|
if ( eSndState != STATE_TX_IDLE ) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Always read the character. */
|
/* Always read the character. */
|
||||||
xStatus = xMBPortSerialGetByte( ( CHAR * ) & ucByte );
|
xStatus = xMBPortSerialGetByte( ( CHAR * ) & ucByte );
|
||||||
@ -307,7 +309,9 @@ xMBRTUTransmitFSM( void )
|
|||||||
{
|
{
|
||||||
BOOL xNeedPoll = TRUE;
|
BOOL xNeedPoll = TRUE;
|
||||||
|
|
||||||
assert( eRcvState == STATE_RX_IDLE );
|
if ( eRcvState != STATE_RX_IDLE ) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
switch ( eSndState )
|
switch ( eSndState )
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: "1.0.17"
|
version: "1.0.18"
|
||||||
description: ESP-MODBUS is the official Modbus library for Espressif SoCs.
|
description: ESP-MODBUS is the official Modbus library for Espressif SoCs.
|
||||||
url: https://github.com/espressif/esp-modbus
|
url: https://github.com/espressif/esp-modbus
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Reference in New Issue
Block a user