Skip to content

Commit

Permalink
[thread] make Joiner Provisioning URL independently optional (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtdkp authored Jun 24, 2024
1 parent 5223d71 commit c643e21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/library/joiner_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,12 @@ void JoinerSession::HandleJoinFin(const coap::Request &aJoinFin)

if (auto provisioningUrlTlv = tlvSet[tlv::Type::kProvisioningURL])
{
auto vendorDataTlv = tlvSet[tlv::Type::kVendorData];
VerifyOrExit(vendorDataTlv != nullptr, error = ERROR_BAD_FORMAT("no valid Vendor Data TLV found"));

provisioningUrl = provisioningUrlTlv->GetValueAsString();
vendorData = vendorDataTlv->GetValue();
}

if (auto vendorDataTlv = tlvSet[tlv::Type::kVendorData])
{
vendorData = vendorDataTlv->GetValue();
}

LOG_INFO(LOG_REGION_JOINER_SESSION,
Expand Down

0 comments on commit c643e21

Please sign in to comment.