Skip to content

Commit

Permalink
disable otBorderAgentState field causing build error in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzi committed Feb 25, 2025
1 parent 328f2a5 commit 5627bd7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/rest/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,10 @@ cJSON *Node2Json(const NodeInfo &aNode, std::set<std::string> aFieldset)
{
cJSON_AddItemToObject(node, KEY_BORDERAGENTID, Bytes2HexJson(aNode.mBaId.mId, sizeof(aNode.mBaId)));
}
if (hasKey(aFieldset, KEY_BORDERAGENTSTATE))
{
cJSON_AddItemToObject(node, KEY_BORDERAGENTSTATE, cJSON_CreateNumber(aNode.mBaState));
}
// if (hasKey(aFieldset, KEY_BORDERAGENTSTATE))
// {
// cJSON_AddItemToObject(node, KEY_BORDERAGENTSTATE, cJSON_CreateNumber(aNode.mBaState));
// }
if (hasKey(aFieldset, KEY_STATE))
{
cJSON_AddItemToObject(node, KEY_STATE, cJSON_CreateString(aNode.mRole.c_str()));
Expand Down
8 changes: 4 additions & 4 deletions src/rest/network_diag_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,10 @@ void NetworkDiagHandler::UpdateNodeItem(ThisThreadDevice *thisItem)
otDeviceRole role;

error = otBorderAgentGetId(mInstance, &thisItem->mNodeInfo.mBaId);
if (error == OT_ERROR_NONE)
{
thisItem->mNodeInfo.mBaState = otBorderAgentGetState(mInstance);
}
// if (error == OT_ERROR_NONE)
// {
// thisItem->mNodeInfo.mBaState = otBorderAgentGetState(mInstance);
// }
error = otThreadGetLeaderData(mInstance, &thisItem->mNodeInfo.mLeaderData);
if (error != OT_ERROR_NONE)
{
Expand Down
20 changes: 10 additions & 10 deletions src/rest/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ enum class ConnectionState : std::uint8_t
};
struct NodeInfo
{
otBorderAgentId mBaId;
otBorderAgentState mBaState;
std::string mRole;
uint32_t mNumOfRouter;
uint16_t mRloc16;
const uint8_t *mExtPanId;
const uint8_t *mExtAddress;
otIp6Address mRlocAddress;
otLeaderData mLeaderData;
std::string mNetworkName;
otBorderAgentId mBaId;
// otBorderAgentState mBaState; // Why does this line cause build error in github actions?
std::string mRole;
uint32_t mNumOfRouter;
uint16_t mRloc16;
const uint8_t *mExtPanId;
const uint8_t *mExtAddress;
otIp6Address mRlocAddress;
otLeaderData mLeaderData;
std::string mNetworkName;
};

typedef struct EnergyReport
Expand Down

0 comments on commit 5627bd7

Please sign in to comment.