Skip to content

Commit c9b54fa

Browse files
committed
- CS101 link layer: fixed bugs in test function handlings
1 parent 7b0efa7 commit c9b54fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib60870/LinkLayer/PrimaryLinkLayerBalanced.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ public override void HandleMessage(FunctionCodeSecondary fcs, bool dir, bool dfc
126126
}
127127
else if (primaryState == PrimaryLinkLayerState.EXECUTE_SERVICE_SEND_CONFIRM) {
128128

129-
if (sendLinkLayerTestFunction) {
130-
nextFcb = !nextFcb;
129+
if (sendLinkLayerTestFunction)
131130
sendLinkLayerTestFunction = false;
132-
}
133131

134132
newState = PrimaryLinkLayerState.LINK_LAYERS_AVAILABLE;
135133
SetNewState(LinkLayerState.AVAILABLE);
@@ -181,6 +179,10 @@ public override void HandleMessage(FunctionCodeSecondary fcs, bool dir, bool dfc
181179
case FunctionCodeSecondary.LINK_SERVICE_NOT_FUNCTIONING:
182180
case FunctionCodeSecondary.LINK_SERVICE_NOT_IMPLEMENTED:
183181
DebugLog ("PLL - link layer service not functioning/not implemented in secondary station");
182+
183+
if (sendLinkLayerTestFunction)
184+
sendLinkLayerTestFunction = false;
185+
184186
if (primaryState == PrimaryLinkLayerState.EXECUTE_SERVICE_SEND_CONFIRM) {
185187
newState = PrimaryLinkLayerState.LINK_LAYERS_AVAILABLE;
186188
SetNewState(LinkLayerState.AVAILABLE);

0 commit comments

Comments
 (0)