Skip to content

Commit

Permalink
removed debug print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Apr 1, 2016
1 parent 33c952f commit d7c31b5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Sources/BluetoothLinux/ATTConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public final class ATTConnection {
/// Performs the actual IO for recieving data.
public func read() throws {

print("Will read")
//print("Will read")

let recievedData = try socket.recieve(maximumTransmissionUnit)

print("Recieved data")
//print("Recieved data")

// valid PDU data length
guard recievedData.byteValue.count >= ATT.MinimumPDULength
Expand All @@ -92,7 +92,7 @@ public final class ATTConnection {
guard let opcode = ATT.Opcode(rawValue: opcodeByte)
else { throw Error.GarbageResponse(recievedData) }

print("Recieved opcode \(opcode)")
// print("Recieved opcode \(opcode)")

// Act on the received PDU based on the opcode type
switch opcode.type {
Expand All @@ -119,20 +119,20 @@ public final class ATTConnection {
/// Performs the actual IO for sending data.
public func write() throws -> Bool {

print("Will write")
//print("Will write")

guard let sendOpcode = pickNextSendOpcode()
else { return false }

assert(sendOpcode.data.count <= maximumTransmissionUnit, "Trying to send \(sendOpcode.data.count) bytes when MTU is \(maximumTransmissionUnit)")

print("Sending data... (\(sendOpcode.data.count) bytes)")
//print("Sending data... (\(sendOpcode.data.count) bytes)")

try socket.send(Data(byteValue: sendOpcode.data))

let opcode = sendOpcode.dynamicType.PDUType.attributeOpcode

print("Did write \(opcode)")
//print("Did write \(opcode)")

/* Based on the operation type, set either the pending request or the
* pending indication. If it came from the write queue, then there is
Expand Down Expand Up @@ -269,7 +269,7 @@ public final class ATTConnection {
// actual PDU length
let length = data.count

print("\(length) encoded bytes")
//print("\(length) encoded bytes")

/// MTU must be large enough to hold PDU.
guard length <= maximumTransmissionUnit else { return nil }
Expand Down

0 comments on commit d7c31b5

Please sign in to comment.