From 9c4acb9f358f576479975f7baaf6b4ed5ec932a8 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Mon, 10 Jul 2017 17:20:43 +0200 Subject: Fixed incomming initiation bug --- src/receive.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/receive.go') 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: -- cgit v1.2.3