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)
This commit is contained in:
parent
cb0b722bb1
commit
f0c1fdc990
|
|
@ -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=<M2>
|
||||
if(!memcmp(cPair->LTPK,newCont->LTPK,32)){ // requested Controller already exists and LTPK matches
|
||||
|
|
|
|||
Loading…
Reference in New Issue