goToMain / libosdp

Implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol); provides a C library with support for C++, Rust and Python3
https://libosdp.sidcha.dev
Apache License 2.0
130 stars 69 forks source link

check osdp close file status (according prototype function comments) #124

Closed sgouraud closed 11 months ago

sgouraud commented 1 year ago

could be usefull if any error during file closing

sidcha commented 1 year ago

I conciously chose to ignore this error, here is my reasoning:

On the other hand, we can have the log message. What do you think?

sgouraud commented 1 year ago

File closing error should significate data corruption on PD, which could need a full file data transfert again . By the way, I don't see any error on osdp_FTSTAT reply which should explain this file's closing error back to ACU : -1= abort file transfer -2= unrecognized file contents -3=f ile data unacceptable (malformed)

If you think this error could be ignore, the comments above should be remove : https://github.com/goToMain/libosdp/blob/master/include/osdp.h#L1093