AMSAT-NA / PacSatSW

MIT License
4 stars 1 forks source link

PB only handles the first hole in a list of dir holes. #1

Closed ac2cz closed 1 year ago

ac2cz commented 1 year ago

Example below where there are 5 holes, but the request is removed as soon as the first hole is processed:

PB: G0KLA>VE2TCP-11: Len: 60
Broadcast Request: pid: bd
DIR REQ: flags: 10 BLK_SIZE: f400 - 5 holes: 64222de4 - 7fffffff, 2023-03-28 05:59:32,1901-12-14 02:45:51 64222dd2 - 64222dd2, 2023-03-28 05:59:14,2023-03-28 05:59:14 64222dcb - 64222dcb, DIR FILL REQUEST: flags: 10 BLK_SIZE: 00f4
PB: Request from G0KLA at time: 121 .. Added
Preparing DIR Broadcast for G0KLA
Preparing DIR Broadcast for G0KLA
-> returning: 14
DIR BD Offset 0: Preparing DIR Broadcast for G0KLA
Preparing DIR Broadcast for G0KLA
Preparing DIR Broadcast for G0KLA
Preparing DIR Broadcast for G0KLA
Added last hole for request from G0KLA
PB: Removed G0KLA at time 121

It looks like it runs the routine and prints "Preparing DIR Boradcast for ..." but we don't get results for anything other than one request.

ac2cz commented 1 year ago

Fixed. This was an issue where the next node in the DIR was not reset to NULL. So it was not starting from the head of the list each time it tried to process the list. We don't know the order of the holes, so there is no guarantee we will find a hole if we start from an arbitrary place in the DIR list.

We could require the holes to be in DIR order, but this would be an enhancement to the existing protocols I think.