Skip to content

Commit

Permalink
Revert "Merge pull request #4 from hnnajh/rotating-id-test"
Browse files Browse the repository at this point in the history
This reverts commit 0235d05, reversing
changes made to 3e1a4b9.
  • Loading branch information
hnnajh committed Dec 10, 2020
1 parent 0235d05 commit 9d74100
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 698 deletions.
3 changes: 1 addition & 2 deletions examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ executable("chip-tool") {
"commands/common/NetworkCommand.cpp",
"commands/echo/EchoCommand.cpp",
"commands/pairing/PairingCommand.cpp",
"commands/payload/QRCodeParseCommand.cpp",
"commands/payload/AdditionalDataParseCommand.cpp",
"commands/payload/ParseCommand.cpp",
"config/PersistentStorage.cpp",
"main.cpp",
]
Expand Down
37 changes: 0 additions & 37 deletions examples/chip-tool/commands/payload/AdditionalDataParseCommand.cpp

This file was deleted.

31 changes: 0 additions & 31 deletions examples/chip-tool/commands/payload/AdditionalDataParseCommand.h

This file was deleted.

6 changes: 2 additions & 4 deletions examples/chip-tool/commands/payload/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@

#pragma once

#include "QRCodeParseCommand.h"
#include "AdditionalDataParseCommand.h"
#include "ParseCommand.h"

void registerCommandsPayload(Commands & commands)
{
const char * clusterName = "Payload";
commands_list clusterCommands = {
make_unique<QRCodeParseCommand>(),
make_unique<AdditionalDataParseCommand>()
make_unique<ParseCommand>(),
};

commands.Register(clusterName, clusterCommands);
Expand Down
104 changes: 0 additions & 104 deletions examples/chip-tool/commands/payload/QRCodeParseCommand.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions examples/chip-tool/commands/payload/QRCodeParseCommand.h

This file was deleted.

7 changes: 0 additions & 7 deletions src/ble/BLEEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,6 @@ void BLEEndPoint::FinalizeClose(uint8_t oldState, uint8_t flags, BLE_ERROR err)
// If unsubscribe fails, release BLE connection and free end point immediately.
Free();
}
if (!mBle->mPlatformDelegate->UnsubscribeCharacteristic(mConnObj, &CHIP_BLE_SVC_ID, &mBle->CHIP_BLE_CHAR_3_ID))
{
ChipLogError(Ble, "BtpEngine unsub failed");

// If unsubscribe fails, release BLE connection and free end point immediately.
Free();
}
else if (mConnObj != BLE_CONNECTION_UNINITIALIZED)
{
// Unsubscribe request was sent successfully, and a confirmation wasn't spontaneously generated or
Expand Down
12 changes: 4 additions & 8 deletions src/ble/BleLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ const ChipBleUUID BleLayer::CHIP_BLE_CHAR_2_ID = { { // 18EE2EF5-263D-4559-959F-
0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42,
0x9F, 0x9D, 0x12 } };

const ChipBleUUID BleLayer::CHIP_BLE_CHAR_3_ID = { { // 18EE2EF5-263D-4559-959F-4F9C429F9D13
0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42,
0x9F, 0x9D, 0x13 } };

void BleLayerObject::Release()
{
// Decrement the ref count. When it reaches zero, NULL out the pointer to the chip::System::Layer
Expand Down Expand Up @@ -604,7 +600,7 @@ bool BleLayer::HandleSubscribeReceived(BLE_CONNECTION_OBJECT connObj, const Chip
return false;
}

if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId) || UUIDsMatch(&CHIP_BLE_CHAR_3_ID, charId))
if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId))
{
// Find end point already associated with BLE connection, if any.
BLEEndPoint * endPoint = sBLEEndPointPool.Find(connObj);
Expand All @@ -629,7 +625,7 @@ bool BleLayer::HandleSubscribeComplete(BLE_CONNECTION_OBJECT connObj, const Chip
return false;
}

if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId) || UUIDsMatch(&CHIP_BLE_CHAR_3_ID, charId))
if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId))
{
BLEEndPoint * endPoint = sBLEEndPointPool.Find(connObj);

Expand All @@ -653,7 +649,7 @@ bool BleLayer::HandleUnsubscribeReceived(BLE_CONNECTION_OBJECT connObj, const Ch
return false;
}

if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId) || UUIDsMatch(&CHIP_BLE_CHAR_3_ID, charId))
if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId))
{
// Find end point already associated with BLE connection, if any.
BLEEndPoint * endPoint = sBLEEndPointPool.Find(connObj);
Expand All @@ -678,7 +674,7 @@ bool BleLayer::HandleUnsubscribeComplete(BLE_CONNECTION_OBJECT connObj, const Ch
return false;
}

if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId) || UUIDsMatch(&CHIP_BLE_CHAR_3_ID, charId))
if (UUIDsMatch(&CHIP_BLE_CHAR_2_ID, charId))
{
// Find end point already associated with BLE connection, if any.
BLEEndPoint * endPoint = sBLEEndPointPool.Find(connObj);
Expand Down
2 changes: 0 additions & 2 deletions src/ble/BleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ class DLL_EXPORT BleLayer
static const ChipBleUUID CHIP_BLE_CHAR_1_ID;
// UUID of CHIP service characteristic used for peripheral indications.
static const ChipBleUUID CHIP_BLE_CHAR_2_ID;
// UUID of CHIP service charadteristic used for additional data
static const ChipBleUUID CHIP_BLE_CHAR_3_ID;

BleConnectionDelegate * mConnectionDelegate;
BlePlatformDelegate * mPlatformDelegate;
Expand Down
7 changes: 3 additions & 4 deletions src/lib/core/CHIPTLVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@ CHIP_ERROR TLVReader::ReadElement()
mElemLenOrVal = LittleEndian::Read64(p);
break;
}

return VerifyElement();
}

Expand All @@ -1367,15 +1368,13 @@ CHIP_ERROR TLVReader::VerifyElement()
}
else
{
if (mElemTag == UnknownImplicitTag) {
if (mElemTag == UnknownImplicitTag)
return CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG;
}
switch (mContainerType)
{
case kTLVType_NotSpecified:
if (IsContextTag(mElemTag)) {
if (IsContextTag(mElemTag))
return CHIP_ERROR_INVALID_TLV_TAG;
}
break;
case kTLVType_Structure:
if (mElemTag == AnonymousTag)
Expand Down
8 changes: 1 addition & 7 deletions src/lib/mdns/DiscoveryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ CHIP_ERROR DiscoveryManager::PublishUnprovisionedDevice(chip::Inet::IPAddressTyp
char discriminatorBuf[5]; // hex representation of 16-bit discriminator
char vendorProductBuf[10]; // "FFFF+FFFF"
// TODO: The text entry will be updated in the spec, update accordingly.
TextEntry entries[3] = {
TextEntry entries[2] = {
{ "D", nullptr, 0 },
{ "VP", nullptr, 0 },
{ "RI", nullptr, 0}
};

VerifyOrExit(mMdnsInitialized, error = CHIP_ERROR_INCORRECT_STATE);
Expand All @@ -190,11 +189,6 @@ CHIP_ERROR DiscoveryManager::PublishUnprovisionedDevice(chip::Inet::IPAddressTyp
entries[0].mDataSize = strnlen(discriminatorBuf, sizeof(discriminatorBuf));
entries[1].mData = reinterpret_cast<const uint8_t *>(vendorProductBuf);
entries[1].mDataSize = strnlen(discriminatorBuf, sizeof(vendorProductBuf));
// Rotating Device ID
entries[2].mData = reinterpret_cast<const uint8_t *>("112233445566");
entries[2].mDataSize = strnlen("112233445566", sizeof("112233445566"));


service.mTextEntryies = entries;
service.mTextEntrySize = sizeof(entries) / sizeof(TextEntry);
service.mPort = CHIP_PORT;
Expand Down
1 change: 0 additions & 1 deletion src/lib/support/logging/CHIPLogging.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ enum LogModule
kLogModule_Shell,
kLogModule_DeviceLayer,
kLogModule_SetupPayload,
kLogModule_AdditionalDataPayload,
kLogModule_AppServer,
kLogModule_Discovery,

Expand Down
Loading

0 comments on commit 9d74100

Please sign in to comment.