Skip to content

Conversation

Copy link

Copilot AI commented Nov 10, 2025

Addresses code safety and observability issues in PR rdkcentral#66's WAN Manager RBUS integration.

Changes

NULL Pointer Safety (cosa_rbus_handler_apis.c)

Added defensive checks preventing crashes when RBUS returns NULL:

rbusValue_t value = rbusObject_GetValue(event->data, NULL);
if (value != NULL) {
    const char* statusStr = rbusValue_GetString(value, NULL);
    if (statusStr != NULL) {
        // Safe to use statusStr
    } else {
        CcspTraceError(("%s %d : FAILED , rbusValue_GetString returned NULL\n",__FUNCTION__, __LINE__));
        return;
    }
}

Code Quality

  • Removed redundant initialization of rc variable (immediately overwritten)

Logging Enhancement (network_response.sh)

Added Hotspot interface status to diagnostic output:

echo_t "... Interface_Available_Status: $Interface_Available_Status  HS_Interface_Available_Status: $HS_Interface_Available_Status"
Original prompt

Can you review this PR rdkcentral#66


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pradeeptakdas <[email protected]>
Copilot AI changed the title [WIP] Fix null pointer exception in provisioning process Fix NULL pointer dereferences and logging in WAN status event handler Nov 10, 2025
Copilot AI requested a review from pradeeptakdas November 10, 2025 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants