Skip to content

Commit

Permalink
Fix log and add slight clarification (project-chip#8225)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-apple authored Jul 9, 2021
1 parent 6628298 commit 2374d80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern size_t const CHIPSizeThreadPSKc;
*/
@property (nonatomic, readwrite) uint16_t channel;
/**
* The Thread PAN ID
* A uint16_t stored as 2-bytes in host order representing the Thread PAN ID
*/
@property (nonatomic, nullable, readwrite) NSData * panID;

Expand All @@ -62,7 +62,9 @@ extern size_t const CHIPSizeThreadPSKc;

/**
* Create a Thread Operational Dataset object with the individual network fields.
* This initializer will return nil if any of the NSData fields are smaller than expected.
* This initializer will return nil if any of the NSData fields don't match the expected size.
*
* Note: The panID is expected to be a uint16_t stored as 2-bytes in host order
*/
- (nullable instancetype)initWithNetworkName:(NSString *)networkName
extendedPANID:(NSData *)extendedPANID
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.mm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ - (BOOL)_populateCppOperationalDataset
- (BOOL)_checkDataLength:(NSData *)data expectedLength:(size_t)expectedLength
{
if (data.length != expectedLength) {
CHIP_LOG_ERROR("Length Check Failed. Length:%tu is too short, must be at least %tu", data.length, expectedLength);
CHIP_LOG_ERROR("Length Check Failed. Length:%tu is incorrect, must be %tu", data.length, expectedLength);
return NO;
}
return YES;
Expand Down

0 comments on commit 2374d80

Please sign in to comment.