Skip to content

Conversation

RamseyTI
Copy link
Contributor

@RamseyTI RamseyTI commented Aug 4, 2020

In eRPC, when multiple callbacks are defined, callbacks are stored
in an array on both the client and server. When a callback is register,
only the index of the callback in this array is sent over the transport.
In C++, the array index is encoded as a unit8, where as in Python it is
encoded as a uint32. So, a Python client will not be aligned with a C++
server, leading to wrong information being decoded by the server. This
fix aligns both to be a uint8 type for the callback index.

@RamseyTI
Copy link
Contributor Author

RamseyTI commented Aug 4, 2020

Looks like the build failed because the build server is missing the file /usr/local/opt/bison/bin/bison. How can this be resolved? Thanks.

@MichalPrincNXP
Copy link
Member

Hi @RamseyTI , thanks for providing this bugfix. I am going to integrate it. As for the Travis build issue, it has just been solved on the develop branch. Could you please rebase your PR to trigger the Travis again with correct/updated config? Thank you.

@MichalPrincNXP MichalPrincNXP self-requested a review August 5, 2020 09:58
@MichalPrincNXP MichalPrincNXP self-assigned this Aug 5, 2020
When multiple callbacks are defined, callbacks are stored in
an array on both the client and server. When a callback is
registered, only the index of the callback in this array is
sent over the transport. In C++, the array index is encoded as
a uint8, where as in Python it is encoded as a uint32. So, a
Python client will not be aligned with a C++ server, leading
to wrong information being decoded by the server. This fix
aligns both to be a uint8 type for the callback index.
@RamseyTI
Copy link
Contributor Author

RamseyTI commented Aug 5, 2020

Looks like the build passed. Thanks.

Copy link
Member

@MichalPrincNXP MichalPrincNXP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @RamseyTI for the effort!

@MichalPrincNXP MichalPrincNXP merged commit 5f3a4bf into EmbeddedRPC:develop Aug 5, 2020
@RamseyTI RamseyTI deleted the ramsey-fix branch August 5, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants