nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Maximum bundle length (MAX_LENGTH) inconsistently applied #5

Closed jpswinski closed 4 years ago

jpswinski commented 5 years ago

When attempting to store a bundle, the max bundle length configuration parameter is used to check the size of the payload being stored, but if successful, the final bundle that includes that payload is larger since it includes the primary and extension blocks.

If the parameter is called maximum bundle length, then the final bundle length is what needs to be checked. If the payload is the only thing that should be checked, then the parameter should be renamed to maximum payload length.

The problem with checking the payload is that a receiver needs to buffer the whole bundle and therefore needs to know how large a buffer to allocate.

jpswinski commented 4 years ago

Fixed - now the max_length attribute applies to the entire bundle

da11c87