summaryrefslogtreecommitdiffhomepage
path: root/src/receive.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-10 17:20:43 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-10 17:20:43 +0200
commit9c4acb9f358f576479975f7baaf6b4ed5ec932a8 (patch)
tree0e84e42b8e67a3c2bfa5fd46b2951711a6ca5901 /src/receive.go
parent44c98968838e1724d1ee77f086c4498f2a3f7643 (diff)
Fixed incomming initiation bug
Diffstat (limited to 'src/receive.go')
-rw-r--r--src/receive.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/receive.go b/src/receive.go
index 6530c47..e9c14f5 100644
--- a/src/receive.go
+++ b/src/receive.go
@@ -358,11 +358,13 @@ func (device *Device) RoutineHandshake() {
return
}
+ logDebug.Println("Creating response...")
+
outElem := device.NewOutboundElement()
writer := bytes.NewBuffer(outElem.data[:0])
binary.Write(writer, binary.LittleEndian, response)
- elem.packet = writer.Bytes()
- peer.mac.AddMacs(elem.packet)
+ outElem.packet = writer.Bytes()
+ peer.mac.AddMacs(outElem.packet)
addToOutboundQueue(peer.queue.outbound, outElem)
case MessageResponseType: