#
1a6b1c2b |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I28d013e312a5f3f7d5d3331e4c98feee86b514f5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
40efe672 |
| 24-Jul-2024 |
Andrew Geissler <geissonator@yahoo.com> |
fix new gcc compile warnings about unused variables
The latest yocto has brought in a new gcc which is causing building of this repo due to fails like this:
``` slpd-lite/sock_channel.cpp:27:23: er
fix new gcc compile warnings about unused variables
The latest yocto has brought in a new gcc which is causing building of this repo due to fails like this:
``` slpd-lite/sock_channel.cpp:27:23: error: value computed is not used [-Werror=unused-value] | 27 | buffer outBuffer(0); | | ```
Fix this by just using the default vector constructor with no arguments (resulting in a empty container to start with).
Change-Id: If06dfccd2aa234956e124c11bd268198be569e6d Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
6f01edce |
| 24-May-2024 |
Andrew Geissler <geissonator@yahoo.com> |
Do not use input header for error responses
When parsing of the input header fails, it could be for a variety of issues, including an overflow of the language tag length. We should not utilize any v
Do not use input header for error responses
When parsing of the input header fails, it could be for a variety of issues, including an overflow of the language tag length. We should not utilize any variable aspects of the header in our response and instead just send back a default of all 0's with the static fields set along with error the code.
Utilize std::bitset to get the function ID properly written to cout/cerr.
Tested: - Verified when sending in an invalid header, it no longer can cause unexpected error paths in parseHeader function
Change-Id: I17a8a013bcd90e083b1156f794f059fc1b830a63 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
eebd0815 |
| 24-May-2024 |
Andrew Geissler <geissonator@yahoo.com> |
Only allow a maximum packet size of 255 bytes
This code was written with an assumption that the input/output buffer sizes would not exceed 255 bytes. The assumption can be seen throughout the code w
Only allow a maximum packet size of 255 bytes
This code was written with an assumption that the input/output buffer sizes would not exceed 255 bytes. The assumption can be seen throughout the code where it is using a "uint8_t" for size calculations when doing offsets into the data buffers.
As this application was written for OpenBMC and the service list provided by OpenBMC is very minimal, supporting a maximum request buffer of 255 bytes is a fine assumption. Just need to enforce it.
Without this change, very unexpected things can happen with uint8_t overflow issues when a packet size greater then 255 bytes is passed in or created internally.
Tested: - Verified a request with a packet size over 255 bytes is rejected
Change-Id: Icec15fe100d6514a3309fa89e9f79d565de05553 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
edf88cb2 |
| 04-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
error: fix handling of error codes
GCC correctly warning as follows:
``` inlined from ‘slp::buffer slp::handler::processError(const slp::Message&, uint8_t)’ at slp_message_handler.cpp:363:16: /
error: fix handling of error codes
GCC correctly warning as follows:
``` inlined from ‘slp::buffer slp::handler::processError(const slp::Message&, uint8_t)’ at slp_message_handler.cpp:363:16: /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_algobase.h:431:30: warning: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ reading 2 bytes from a region of size 1 [-Wstringop-overread] 431 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ slp_message_handler.cpp: In function ‘slp::buffer slp::handler::processError(const slp::Message&, uint8_t)’: slp_message_handler.cpp:358:49: note: source object ‘err’ of size 1 ```
We were taking the address of a `uint8_t` and copying two bytes of it.
The original code was not correct anyhow because it used a static OFFSET_ERROR constant. The location of errors is not constant because it depends on the length of the language tag. Modify the code to correctly place the 1 byte error type into the 2nd byte of the error field, which is calculated as immediately after the language tag.
Change-Id: I1bee6bdb1b6301403cf1dff319641587c683f799 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
f93142e8 |
| 04-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
configure: make SERVICE_DIR static
There is really no value in making this a configuration option since nobody modifies it anywhere. Remove the configuration to simplify.
Change-Id: Ia36d5b45a7942
configure: make SERVICE_DIR static
There is really no value in making this a configuration option since nobody modifies it anywhere. Remove the configuration to simplify.
Change-Id: Ia36d5b45a7942c2f26f039b194f10fa5d08aa13c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
aa902c6e |
| 04-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Change-Id: I9550e13176264c875ac6bb52b18c70cc7e52197a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
#
537ff140 |
| 01-Nov-2018 |
Patrick Venture <venture@google.com> |
add clang-format to repo for style
Add .clang-format to repo for style.
Change-Id: I286b3b245550d6a736d7df797f0ce21b51d7a235 Signed-off-by: Patrick Venture <venture@google.com>
|
#
1f12e380 |
| 13-Jun-2018 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I2a2cf
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I2a2cf8b85dc24b4f109e05ed176d1e24bc8717cc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
b5e632a1 |
| 23-Feb-2018 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Fix switch-unreachable bug
Move a debug print out of a switch statement body to avoid [-Wswitch-unreachable] compiler warnings.
Change-Id: Idab511a24c7a53a3f5de5fdd685bd440db864b8a Signed-off-by: B
Fix switch-unreachable bug
Move a debug print out of a switch statement body to avoid [-Wswitch-unreachable] compiler warnings.
Change-Id: Idab511a24c7a53a3f5de5fdd685bd440db864b8a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
0d3e9e33 |
| 10-Feb-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Reduced excessive logging to the journal.
Fixes openbmc/openbmc#983
Change-Id: If52055feca8f965162948bd7af710da3ea9257d2 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
#
ead7a3ca |
| 05-Jan-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Read the slp service info.
Read the info from the services file which are in the services dir.
Change-Id: If31b98af8eea55d75356d895afa42bf6c3cb6493 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
#
07c462ac |
| 13-Dec-2016 |
Ratan Gupta <ratagupt@in.ibm.com> |
SLP Parser
Contains SLP Parser and SLP Message Handler for the following messages: -findsrvtypes. -findsrvs.
Change-Id: I24234b63a8a1226b5c4bb3f6ac0c9aa799987ffc Signed-off-by: Ratan Gupta <ratag
SLP Parser
Contains SLP Parser and SLP Message Handler for the following messages: -findsrvtypes. -findsrvs.
Change-Id: I24234b63a8a1226b5c4bb3f6ac0c9aa799987ffc Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|