From f0c1fdc99078f44797bfab513b87684923da1c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Skowro=C5=84ski?= Date: Wed, 26 Oct 2022 21:39:52 +0200 Subject: [PATCH] postPairingsURL - fix controller update ensure updating existing controller set up proper permissions by actually reading the request (previous "fix" was getting it from the caller controller data) --- src/HAP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HAP.cpp b/src/HAP.cpp index 3aa98ab..59cf662 100644 --- a/src/HAP.cpp +++ b/src/HAP.cpp @@ -931,7 +931,7 @@ int HAPClient::postPairingsURL(){ } if((newCont=findController(tlv8.buf(kTLVType_Identifier)))){ - int originalPermissions=tlv8.val(kTLVType_Permissions); + int originalPermissions=*tlv8.buf(kTLVType_Permissions); tlv8.clear(); // clear TLV records tlv8.val(kTLVType_State,pairState_M2); // set State= if(!memcmp(cPair->LTPK,newCont->LTPK,32)){ // requested Controller already exists and LTPK matches