Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of CMD_ID, CMD_CAP #210

Open
AlexNCoder opened this issue Dec 26, 2024 · 1 comment
Open

Handling of CMD_ID, CMD_CAP #210

AlexNCoder opened this issue Dec 26, 2024 · 1 comment

Comments

@AlexNCoder
Copy link

AlexNCoder commented Dec 26, 2024

Handling of CMD_ID, CMD_CAP

Hello everyone! I found that CMD_ID handling on PD is insufficient, maybe (func pd_decode_command, case CMD_ID). It sets ret to OSDP_PD_ERR_GENERIC when osdp-message from the CP (physical device, not libosdp) can be without data-bytes. By the way, real card reader (physical device) can handle such messages. Am I wrong?

Maybe we can change that condition from “if (len != CMD_ID_DATA_LEN)” to “if (len > CMD_ID_DATA_LEN)”
It's all the same about CMD_CAP ?

I've created a pull request

@sidcha
Copy link
Member

sidcha commented Jan 9, 2025

[..] when osdp-message from the CP (physical device, not libosdp) can be without data-bytes.

What makes you think so? Can you cite the specification please.

By the way, real card reader (physical device) can handle such messages.

Not sure what you mean by "real" card reader here.. I thought they were all real :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants