File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
- check #######################################
1
+ #######################################
2
2
# Syntax Coloring Map For OpenThread
3
3
#######################################
4
4
Original file line number Diff line number Diff line change @@ -393,8 +393,8 @@ const uint8_t *OpenThread::getNetworkKey() const {
393
393
return nullptr ;
394
394
}
395
395
static otNetworkKey networkKey; // Static storage to persist after function return
396
- otError error = otThreadGetNetworkKey (mInstance , &networkKey);
397
- return (error == OT_ERROR_NONE) ? networkKey.m8 : nullptr ;
396
+ otThreadGetNetworkKey (mInstance , &networkKey);
397
+ return networkKey.m8 ;
398
398
}
399
399
400
400
// Get the Node Channel
@@ -492,8 +492,9 @@ IPAddress OpenThread::getLeaderRloc() const {
492
492
log_w (" Error: OpenThread instance not initialized" );
493
493
return IPAddress (IPv6); // Return empty IPv6 address
494
494
}
495
- const otIp6Address *otAddr = otThreadGetLeaderRloc (mInstance );
496
- if (!otAddr) {
495
+ otIp6Address otAddr;
496
+ otError error = otThreadGetLeaderRloc (mInstance , &otAddr);
497
+ if (error != OT_ERROR_NONE) {
497
498
log_w (" Failed to get Leader RLOC" );
498
499
return IPAddress (IPv6);
499
500
}
You can’t perform that action at this time.
0 commit comments