Undocumented: adl_fcmSendData minimum block size

Reference: ADL User Guide for Open At v3.03, Rev 001, Dec 2005.

Just a little Gotcha! here:

The maximum block size is documented, but no minimum size is mentioned.

In fact, ADL_RET_ERR_PARAM (-2) is returned if the block size is zero.

Hmmm, why would you call a function to send data without anything to send?

Off topic: I guess that’s like starting a timer with interval 0. I did that once in an older version of OpenAT and sure enough it did crash the program :frowning: which is worse than receiving an error :slight_smile:

Best Regards,

That’s why I called it, “Just a little Gotcha!”

It’s a general case for sending strings - and, in the most general case, an empty string must be considered…

Of course, it’s easy enough to check the length first, and only call adl_fcmSendData if there’s >0 bytes to send.

One might hope that adl_fcmSendData would do that internally, but hey - there are far more pressing issues that need attention!

Just thought I’d note it here for reference.

Hi awneil,

I guess you are right… And it really should be documented clearly what the function does / returns on the possible inputs. Since the data is passed via pointer it should also be mentioned what the function will do / what the error code is if a NULL pointer is passed…

Best Regards,

This should be the benchmark for all documentation!

Ooo-Errr - I haven’t tried that one…! :open_mouth: