RDKCOM-5543: RDKBWIFI-364 : Generalizing bus abstraction functions for retrieving and setting bus data property types.#969
Merged
gsathish86 merged 1 commit intordkcentral:developfrom Mar 24, 2026
Conversation
Contributor
Author
|
Depends on. |
Aniket0606
reviewed
Mar 12, 2026
Contributor
Aniket0606
left a comment
There was a problem hiding this comment.
The changes look good. Please make sure all platform builds pass and ask QA to perform a sanity test.
This was referenced Mar 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the bus abstraction to use bus_data_prop_t (property-list style) instead of raw_data_t for RBUS method/event payloads, so bus object data can carry typed named properties more consistently across get/set/invoke flows.
Changes:
- Added RBUS object/value →
bus_data_prop_tconversion and updated RBUS method/event handlers to consume/producebus_data_prop_t. - Updated various OneWiFi event/method callbacks to use
bus_data_prop_t->valueaccessors instead ofraw_data_t. - Hardened
bus_release_data_propto safely handleNULLnum_prop/p_data_prop.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| source/platform/rdkb/bus.c | Adds conversion helper and switches RBUS method/event marshalling to bus_data_prop_t. |
| source/platform/common/data_model/wfa/wfa_data_model.c | Updates table sync handler signatures to new method handler type. |
| source/platform/common/bus_common.h | Changes method/subscription callback typedefs to bus_data_prop_t*. |
| source/platform/common/bus_common.c | Makes bus_release_data_prop robust to NULL args. |
| source/dml/dml_webconfig/dml_onewifi_api.c | Updates webconfig event handler to read from bus_data_prop_t->value. |
| source/db/wifi_db_apis.c | Updates subscription handler signature to bus_data_prop_t*. |
| source/core/wifi_ctrl_rbus_handlers.c | Updates several bus event handlers and one method handler to use bus_data_prop_t. |
| source/apps/sm/wifi_sm.c | Updates SM app subscription handler to use bus_data_prop_t. |
| source/apps/csi/wifi_csi_analytics.c | Updates no-op handler signature for new subscription callback type. |
Comments suppressed due to low confidence (1)
source/apps/sm/wifi_sm.c:842
sm_app_enable_handleris registered viabus_event_subs_fnand will be invoked fromrbus_sub_handleras abus_event_sub_handler_t(3 parameters, includinguserData). This handler currently only takes 2 parameters, which is a function-pointer signature mismatch and can lead to undefined behavior/crashes when the callback is invoked. Update the handler signature to include thevoid *userDataparameter (and ignore it if unused) so it matches the bus subscription callback type.
static void sm_app_enable_handler(char *event_name, bus_data_prop_t *p_data)
{
bool sm_app_enable;
wifi_util_dbg_print(WIFI_SM, "%s:%d recvd event\n", __func__, __LINE__);
if ((strcmp(event_name, BUS_SM_APP_ENABLE) != 0) ||
(p_data->value.data_type != bus_data_type_boolean)) {
wifi_util_error_print(WIFI_SM, "%s:%d invalid event received,%s:%x\n", __func__, __LINE__,
event_name, p_data->value.data_type);
return;
}
sm_app_enable = p_data->value.raw_data.b;
push_event_to_ctrl_queue(&sm_app_enable, sizeof(sm_app_enable), wifi_event_type_command,
wifi_event_type_sm_app_enable, NULL);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8e32c48 to
43d7969
Compare
amarnathhullur
approved these changes
Mar 23, 2026
narendradandu
approved these changes
Mar 23, 2026
…and setting bus data property types. Reason for change : Converted the generic raw_data type to bus_data_prop_t. Risks: Medium Priority:P0 Test Procedure: Flash the image and verify that all OneWifi-related features work properly.
gsathish86
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change : Converted the generic raw_data type to bus_data_prop_t. Risks: Medium
Priority:P0
Test Procedure: Flash the image and verify that all OneWifi-related features work properly.