Commit 6bb7f883 authored by Chengzhao Li's avatar Chengzhao Li
Browse files

- remove useless code

parent 98493069
......@@ -296,7 +296,6 @@ void(^myInvitationHandler)(BOOL, NCMCSession*, NCMCPeerID*) = ^(BOOL accept, NCM
{
// assign peripheral info to peripheral
NCMCDeviceInfo* newPeripheralDevice = [self decodeDeviceInfo:dataMsg fromPeer:identifier];
newPeripheralDevice.identifier = identifier;
newPeripheralDevice.uniqueID = (char)[self.connectedDevices count] + 1; // id 0 is reserved for central
NSData* newDeviceData = [self encodeDeviceInfo:newPeripheralDevice];
......@@ -339,10 +338,6 @@ void(^myInvitationHandler)(BOOL, NCMCSession*, NCMCPeerID*) = ^(BOOL accept, NCM
NCMCDeviceInfo* centralDevice = [self decodeDeviceInfo:dataMsg fromPeer:identifier];
if (centralDevice.uniqueID == 0) {
centralDevice.identifier = identifier; // set with its real identifier
}
// save central device
[self.connectedDevices addObject:centralDevice];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment