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

[TW#20352] Error Code Comments Off By One #1845

Closed
semireg opened this issue Apr 11, 2018 · 2 comments
Closed

[TW#20352] Error Code Comments Off By One #1845

semireg opened this issue Apr 11, 2018 · 2 comments

Comments

@semireg
Copy link

semireg commented Apr 11, 2018

Starting on this line the value of the error codes in the comments are one too few.

#define SMP_XTRANS_DERIVE_NOT_ALLOW 0x0E
#define SMP_MAX_FAIL_RSN_PER_SPEC   SMP_XTRANS_DERIVE_NOT_ALLOW

/* self defined error code */
#define SMP_PAIR_INTERNAL_ERR       (SMP_MAX_FAIL_RSN_PER_SPEC + 0x01) /* 0x0E */

/* 0x0F unknown IO capability, unable to decide association model */
#define SMP_UNKNOWN_IO_CAP          (SMP_MAX_FAIL_RSN_PER_SPEC + 0x02) /* 0x0F */

#define SMP_INIT_FAIL               (SMP_MAX_FAIL_RSN_PER_SPEC + 0x03) /* 0x10 */
#define SMP_CONFIRM_FAIL            (SMP_MAX_FAIL_RSN_PER_SPEC + 0x04) /* 0x11 */
#define SMP_BUSY                    (SMP_MAX_FAIL_RSN_PER_SPEC + 0x05) /* 0x12 */
#define SMP_ENC_FAIL                (SMP_MAX_FAIL_RSN_PER_SPEC + 0x06) /* 0x13 */
#define SMP_STARTED                 (SMP_MAX_FAIL_RSN_PER_SPEC + 0x07) /* 0x14 */
#define SMP_RSP_TIMEOUT             (SMP_MAX_FAIL_RSN_PER_SPEC + 0x08) /* 0x15 */
#define SMP_DIV_NOT_AVAIL           (SMP_MAX_FAIL_RSN_PER_SPEC + 0x09) /* 0x16 */

SMP_PAIR_INTERNAL_ERR is equal to 0x0F, because 0x0E + 0x01 = 0x0F.

@FayeY FayeY changed the title Error Code Comments Off By One [TW#20352] Error Code Comments Off By One Apr 16, 2018
@mahavirj
Copy link
Member

@semireg Thanks for reporting. Fix for this is in progress, should be merged soon.

@semireg
Copy link
Author

semireg commented Apr 18, 2018

@mahavirj, Great. Quick question: how would I escalate another issue? #1851

@igrr igrr closed this as completed in 60ab582 Apr 19, 2018
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
(removed quotes from last line, and fixed indentation, no text changes)
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