From 79c37f7d094d03ff8faa15fd1292f921ce2a349d Mon Sep 17 00:00:00 2001 From: skarg Date: Thu, 21 Feb 2013 23:10:23 +0000 Subject: [PATCH] Added a note to MS/TP FindNewSuccessor transition after BTL CR: if NS=TS-1, this node could send PFM to self! --- bacnet-stack/ports/at91sam7s/dlmstp.c | 1 + bacnet-stack/ports/atmega168/dlmstp.c | 1 + bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c | 1 + bacnet-stack/ports/dos/dlmstp.c | 1 + bacnet-stack/ports/pic18f6720/mstp.c | 3 ++- bacnet-stack/ports/rtos32/mstp.c | 1 + bacnet-stack/ports/stm32f10x/dlmstp.c | 1 + bacnet-stack/src/mstp.c | 1 + 8 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bacnet-stack/ports/at91sam7s/dlmstp.c b/bacnet-stack/ports/at91sam7s/dlmstp.c index e7a96cea..2b3d5a70 100644 --- a/bacnet-stack/ports/at91sam7s/dlmstp.c +++ b/bacnet-stack/ports/at91sam7s/dlmstp.c @@ -965,6 +965,7 @@ static bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Send_Frame(FRAME_TYPE_POLL_FOR_MASTER, Poll_Station, diff --git a/bacnet-stack/ports/atmega168/dlmstp.c b/bacnet-stack/ports/atmega168/dlmstp.c index 5db8e949..c2bea1fc 100644 --- a/bacnet-stack/ports/atmega168/dlmstp.c +++ b/bacnet-stack/ports/atmega168/dlmstp.c @@ -808,6 +808,7 @@ static bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Send_Frame(FRAME_TYPE_POLL_FOR_MASTER, Poll_Station, diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c b/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c index 67d4f2d1..c00454fe 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/dlmstp.c @@ -979,6 +979,7 @@ static bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Send_Frame(FRAME_TYPE_POLL_FOR_MASTER, Poll_Station, diff --git a/bacnet-stack/ports/dos/dlmstp.c b/bacnet-stack/ports/dos/dlmstp.c index cce00c60..abb518ee 100644 --- a/bacnet-stack/ports/dos/dlmstp.c +++ b/bacnet-stack/ports/dos/dlmstp.c @@ -978,6 +978,7 @@ static bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Send_Frame(FRAME_TYPE_POLL_FOR_MASTER, Poll_Station, diff --git a/bacnet-stack/ports/pic18f6720/mstp.c b/bacnet-stack/ports/pic18f6720/mstp.c index f15f7126..b685e201 100644 --- a/bacnet-stack/ports/pic18f6720/mstp.c +++ b/bacnet-stack/ports/pic18f6720/mstp.c @@ -916,7 +916,7 @@ bool MSTP_Master_Node_FSM( should be sent is unknown - so PollForMaster */ mstp_port->Poll_Station = next_this_station; MSTP_Create_And_Send_Frame(mstp_port, - FRAME_TYPE_POLL_FOR_MASTER, + FRAME_TYPE_POLL_FOR_MASTER, mstp_port->Poll_Station, mstp_port->This_Station, NULL, 0); mstp_port->RetryCount = 0; @@ -1010,6 +1010,7 @@ bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ mstp_port->Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Create_And_Send_Frame(mstp_port, diff --git a/bacnet-stack/ports/rtos32/mstp.c b/bacnet-stack/ports/rtos32/mstp.c index 3ef1038c..e6420f8e 100644 --- a/bacnet-stack/ports/rtos32/mstp.c +++ b/bacnet-stack/ports/rtos32/mstp.c @@ -1038,6 +1038,7 @@ bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ mstp_port->Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Create_And_Send_Frame(mstp_port, diff --git a/bacnet-stack/ports/stm32f10x/dlmstp.c b/bacnet-stack/ports/stm32f10x/dlmstp.c index 5cfe54ad..a8811273 100644 --- a/bacnet-stack/ports/stm32f10x/dlmstp.c +++ b/bacnet-stack/ports/stm32f10x/dlmstp.c @@ -1067,6 +1067,7 @@ static bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Send_Frame(FRAME_TYPE_POLL_FOR_MASTER, Poll_Station, diff --git a/bacnet-stack/src/mstp.c b/bacnet-stack/src/mstp.c index 10234056..7eab6417 100644 --- a/bacnet-stack/src/mstp.c +++ b/bacnet-stack/src/mstp.c @@ -889,6 +889,7 @@ bool MSTP_Master_Node_FSM( } else { /* FindNewSuccessor */ /* Assume that NS has failed. */ + /* note: if NS=TS-1, this node could send PFM to self! */ mstp_port->Poll_Station = next_next_station; /* Transmit a Poll For Master frame to PS. */ MSTP_Create_And_Send_Frame(mstp_port,