@@ -124,6 +124,7 @@ public interface IQsoSequencerCallbacks
124
124
private bool haveLoggedReport = false ;
125
125
private bool haveSentReport = false ;
126
126
private bool haveSentGrid = false ;
127
+ private bool haveReceivedQsl = false ;
127
128
private bool haveReceivedWrongExchange = false ;
128
129
private string ackOfAckGrid ;
129
130
private int AckMoreAcks = 0 ;
@@ -183,7 +184,7 @@ public void OnReceived(bool directlyToMe, CallQsled callQsled, XDpack77.Pack77Me
183
184
if ( ! String . IsNullOrEmpty ( gs ) )
184
185
{ // received a grid
185
186
haveGrid = true ;
186
- if ( ! msgHasR )
187
+ if ( ! msgHasR && ! directlyToMe && ! haveReceivedQsl )
187
188
eToSend = ( ) => cb . SendExchange ( ExchangeTypes . GRID_SQUARE , haveGrid & haveReport , ( ) =>
188
189
{ haveSentGrid = true ; } ) ;
189
190
}
@@ -192,7 +193,7 @@ public void OnReceived(bool directlyToMe, CallQsled callQsled, XDpack77.Pack77Me
192
193
if ( rp > XDpack77 . Pack77Message . Message . NO_DB )
193
194
{ // received a dB report
194
195
haveReport = true ;
195
- if ( ! msgHasR )
196
+ if ( ! msgHasR && ! haveReceivedQsl )
196
197
eToSend = ( ) => cb . SendExchange ( ExchangeTypes . DB_REPORT , haveReport & haveGrid , ( ) =>
197
198
{ haveSentReport = true ; } ) ;
198
199
}
@@ -214,10 +215,10 @@ public void OnReceived(bool directlyToMe, CallQsled callQsled, XDpack77.Pack77Me
214
215
if ( eToSend == null && ! haveReceivedWrongExchange )
215
216
{
216
217
if ( ! haveReport )
217
- eToSend = ( ) => cb . SendExchange ( ExchangeTypes . DB_REPORT , haveReport , ( ) =>
218
+ eToSend = ( ) => cb . SendExchange ( ExchangeTypes . DB_REPORT , haveReport & haveGrid , ( ) =>
218
219
{ haveSentReport = true ; } ) ;
219
220
else if ( ! haveGrid )
220
- eToSend = ( ) => cb . SendExchange ( ExchangeTypes . GRID_SQUARE , haveGrid , ( ) =>
221
+ eToSend = ( ) => cb . SendExchange ( ExchangeTypes . GRID_SQUARE , haveReport & haveGrid , ( ) =>
221
222
{ haveSentGrid = true ; } ) ;
222
223
else if ( directlyToMe && haveSentReport )
223
224
{
@@ -231,10 +232,12 @@ public void OnReceived(bool directlyToMe, CallQsled callQsled, XDpack77.Pack77Me
231
232
} ;
232
233
}
233
234
}
235
+ if ( msgHasR )
236
+ haveReceivedQsl = true ;
234
237
bool isMe = callQsled == CallQsled . IsMe || directlyToMe ;
235
238
XDpack77 . Pack77Message . QSL qsl = msg as XDpack77 . Pack77Message . QSL ;
236
239
// is this message a QSL to end the QSO?
237
- if ( callQsled != CallQsled . None )
240
+ if ( callQsled != CallQsled . None || haveReceivedQsl )
238
241
{
239
242
if ( haveReceivedWrongExchange )
240
243
return ;
@@ -261,6 +264,7 @@ public void OnReceived(bool directlyToMe, CallQsled callQsled, XDpack77.Pack77Me
261
264
return ;
262
265
}
263
266
} ;
267
+ haveReceivedQsl = true ;
264
268
// do it now? or wait to see if multi-streaming partner sends a message directlyToMe
265
269
if ( isMe )
266
270
toDoOnAck ( ) ;
0 commit comments