Skip to content

Commit

Permalink
[Thread] make Joiner Provisioning URL independently optional
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtdkp committed Jun 24, 2024
1 parent 86e37dd commit 5ad4fbc
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 5ad4fbc

Please sign in to comment.