summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-21 02:50:39 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-21 02:50:39 +0200
commit84c5357cf31b9b04e794f474ad3ab47cc55f61a1 (patch)
tree295b79be87567b79b56f62f0ad514c92656aa07b
parentacb5481246ea97bff64cc3eba1fa4255fc1ccd72 (diff)
Reasonable punctuation given the spacing
-rw-r--r--peer.go4
-rw-r--r--receive.go12
-rw-r--r--send.go28
3 files changed, 22 insertions, 22 deletions
diff --git a/peer.go b/peer.go
index 172676a..a279d96 100644
--- a/peer.go
+++ b/peer.go
@@ -171,7 +171,7 @@ func (peer *Peer) Start() {
}
device := peer.device
- device.log.Debug.Println(peer, ": Starting...")
+ device.log.Debug.Println(peer, "- Starting...")
// reset routine state
@@ -241,7 +241,7 @@ func (peer *Peer) Stop() {
peer.routines.mutex.Lock()
defer peer.routines.mutex.Unlock()
- peer.device.log.Debug.Println(peer, ": Stopping...")
+ peer.device.log.Debug.Println(peer, "- Stopping...")
peer.timersStop()
diff --git a/receive.go b/receive.go
index 56e65e7..3d9710c 100644
--- a/receive.go
+++ b/receive.go
@@ -445,7 +445,7 @@ func (device *Device) RoutineHandshake() {
peer.endpoint = elem.endpoint
peer.mutex.Unlock()
- logDebug.Println(peer, ": Received handshake initiation")
+ logDebug.Println(peer, "- Received handshake initiation")
peer.SendHandshakeResponse()
@@ -478,7 +478,7 @@ func (device *Device) RoutineHandshake() {
peer.endpoint = elem.endpoint
peer.mutex.Unlock()
- logDebug.Println(peer, ": Received handshake response")
+ logDebug.Println(peer, "- Received handshake response")
// update timers
@@ -490,7 +490,7 @@ func (device *Device) RoutineHandshake() {
err = peer.BeginSymmetricSession()
if err != nil {
- logError.Println(peer, ": Failed to derive keypair:", err)
+ logError.Println(peer, "- Failed to derive keypair:", err)
continue
}
@@ -513,11 +513,11 @@ func (peer *Peer) RoutineSequentialReceiver() {
logDebug := device.log.Debug
defer func() {
- logDebug.Println(peer, ": Routine: sequential receiver - stopped")
+ logDebug.Println(peer, "- Routine: sequential receiver - stopped")
peer.routines.stopping.Done()
}()
- logDebug.Println(peer, ": Routine: sequential receiver - started")
+ logDebug.Println(peer, "- Routine: sequential receiver - started")
peer.routines.starting.Done()
@@ -570,7 +570,7 @@ func (peer *Peer) RoutineSequentialReceiver() {
// check for keepalive
if len(elem.packet) == 0 {
- logDebug.Println(peer, ": Receiving keepalive packet")
+ logDebug.Println(peer, "- Receiving keepalive packet")
continue
}
peer.timersDataReceived()
diff --git a/send.go b/send.go
index 299274d..5c12589 100644
--- a/send.go
+++ b/send.go
@@ -115,7 +115,7 @@ func (peer *Peer) SendKeepalive() bool {
elem.packet = nil
select {
case peer.queue.nonce <- elem:
- peer.device.log.Debug.Println(peer, ": Sending keepalive packet")
+ peer.device.log.Debug.Println(peer, "- Sending keepalive packet")
return true
default:
return false
@@ -142,11 +142,11 @@ func (peer *Peer) SendHandshakeInitiation(isRetry bool) error {
peer.handshake.lastSentHandshake = time.Now()
peer.handshake.mutex.Unlock()
- peer.device.log.Debug.Println(peer, ": Sending handshake initiation")
+ peer.device.log.Debug.Println(peer, "- Sending handshake initiation")
msg, err := peer.device.CreateMessageInitiation(peer)
if err != nil {
- peer.device.log.Error.Println(peer, ": Failed to create initiation message:", err)
+ peer.device.log.Error.Println(peer, "- Failed to create initiation message:", err)
return err
}
@@ -161,7 +161,7 @@ func (peer *Peer) SendHandshakeInitiation(isRetry bool) error {
err = peer.SendBuffer(packet)
if err != nil {
- peer.device.log.Error.Println(peer, ": Failed to send handshake initiation", err)
+ peer.device.log.Error.Println(peer, "- Failed to send handshake initiation", err)
}
peer.timersHandshakeInitiated()
@@ -173,11 +173,11 @@ func (peer *Peer) SendHandshakeResponse() error {
peer.handshake.lastSentHandshake = time.Now()
peer.handshake.mutex.Unlock()
- peer.device.log.Debug.Println(peer, ": Sending handshake response")
+ peer.device.log.Debug.Println(peer, "- Sending handshake response")
response, err := peer.device.CreateMessageResponse(peer)
if err != nil {
- peer.device.log.Error.Println(peer, ": Failed to create response message:", err)
+ peer.device.log.Error.Println(peer, "- Failed to create response message:", err)
return err
}
@@ -189,7 +189,7 @@ func (peer *Peer) SendHandshakeResponse() error {
err = peer.BeginSymmetricSession()
if err != nil {
- peer.device.log.Error.Println(peer, ": Failed to derive keypair:", err)
+ peer.device.log.Error.Println(peer, "- Failed to derive keypair:", err)
return err
}
@@ -199,7 +199,7 @@ func (peer *Peer) SendHandshakeResponse() error {
err = peer.SendBuffer(packet)
if err != nil {
- peer.device.log.Error.Println(peer, ": Failed to send handshake response", err)
+ peer.device.log.Error.Println(peer, "- Failed to send handshake response", err)
}
return err
}
@@ -333,7 +333,7 @@ func (peer *Peer) RoutineNonce() {
logDebug := device.log.Debug
defer func() {
- logDebug.Println(peer, ": Routine: nonce worker - stopped")
+ logDebug.Println(peer, "- Routine: nonce worker - stopped")
peer.queue.packetInNonceQueueIsAwaitingKey.Set(false)
peer.routines.stopping.Done()
}()
@@ -349,7 +349,7 @@ func (peer *Peer) RoutineNonce() {
}
peer.routines.starting.Done()
- logDebug.Println(peer, ": Routine: nonce worker - started")
+ logDebug.Println(peer, "- Routine: nonce worker - started")
for {
NextPacket:
@@ -394,11 +394,11 @@ func (peer *Peer) RoutineNonce() {
// wait for key to be established
- logDebug.Println(peer, ": Awaiting keypair")
+ logDebug.Println(peer, "- Awaiting keypair")
select {
case <-peer.signals.newKeypairArrived:
- logDebug.Println(peer, ": Obtained awaited keypair")
+ logDebug.Println(peer, "- Obtained awaited keypair")
case <-peer.signals.flushNonceQueue:
flush()
@@ -521,11 +521,11 @@ func (peer *Peer) RoutineSequentialSender() {
logDebug := device.log.Debug
defer func() {
- logDebug.Println(peer, ": Routine: sequential sender - stopped")
+ logDebug.Println(peer, "- Routine: sequential sender - stopped")
peer.routines.stopping.Done()
}()
- logDebug.Println(peer, ": Routine: sequential sender - started")
+ logDebug.Println(peer, "- Routine: sequential sender - started")
peer.routines.starting.Done()