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

[BUG] When enabling ERPC_MESSAGE_LOGGING, results in compilation failure #436

Open
2 tasks done
rbrune-polaris opened this issue Oct 25, 2024 · 2 comments
Open
2 tasks done
Labels

Comments

@rbrune-polaris
Copy link

Describe the bug

I attempted to enable ERPC_MESSAGE_LOGGING in hopes to isolate what wasn't working. When I went to compile, however, I would get compilation errors, such as:

...erpc_c/infra/erpc_client_manager.cpp:98:59: error: cannot convert 'erpc::MessageBuffer' to 'erpc::MessageBuffer*'
| 98 | err = logMessage(request.getCodec()->getBuffer());
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
| | |
| | erpc::MessageBuffer

It appears the logMessage() accepts a pointer, but the getBuffer() returns a direct MessageBuffer.

To Reproduce

Expected behavior

Enable ERPC_MESSAGE_LOGGING in the erpc_config.h file.

Screenshots

Desktop (please complete the following information)

  • OS: Building for FreeRTOS on Linux
  • eRPC Version: 1.13.0

Steps you didn't forgot to do

  • I checked if there is no related issue opened/closed.
  • I checked that there doesn't exist opened PR which is solving this issue.

Additional context

@Hadatko
Copy link
Member

Hadatko commented Oct 27, 2024

Hi @rbrune-polaris , i see. This part of code was not tested. Could you provide fix? I guess you need change line to provide address to the logMessage function.
something like: err = logMessage(&(request.getCodec()->getBuffer()));

@rbrune-polaris
Copy link
Author

Hi @rbrune-polaris , i see. This part of code was not tested. Could you provide fix? I guess you need change line to provide address to the logMessage function. something like: err = logMessage(&(request.getCodec()->getBuffer()));

I can look into it if I get a moment. You're right that the fix should be easy...just have to change every instance of this.

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

No branches or pull requests

2 participants