-
Notifications
You must be signed in to change notification settings - Fork 244
Fixed empty list parsing. #72
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
Fixed empty list parsing. #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @burgerkingorama
your PR looks good but several changes are required before the merge. Except of changes in c_coders.template file itself, the erpc_basic_codec.cpp needs to be modified to avoid BasicCodec::writeBinary causing kErpcStatus_MemoryError error (due to null pointer in value). It should be changed like this:
Also note that I have changed the base branch of this pull request to "develop".
As for list and binary unit tests update (proposed by @Hadatko ) this will be done by me after the PR merge.
Thank you for the effort.
{% endif %} | ||
uint8_t * {$info.dataTemp}; | ||
codec->readBinary(&{$info.sizeTemp}, &{$info.dataTemp}); | ||
if({$info.sizeTemp}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- if statements should have one space char between "if" and "("
- the added 2 lines should be moved 3 lines bellow (attaching the expected content)
c_coders.zip
I would rather update writeData to use if condition inside, not in writeBinary |
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
@MichalPrincNXP What do you think about my current changes? |
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After mine changes i thing it is ready for merge.
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Dusan, looks good but I would also prefer to have execution tests updates to cover this particular case (not only the erpcgen test). Could you please update them yet (binary and lists I guess)? |
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
We cannot add test for binary type (we have restriction to use out and inout type in one application for list, binary,... types). But i created test for in and out for list type. We could do probably same for binary but the test would be present in other test scope than test_binary |
Thank you very much! |
See #66.
Sorry for recreating the pull request but the first one was started from the wrong branch.