[SECNET PATCH 07/14] util: Reorder information in NAK log messages

Ian Jackson ijackson at chiark.greenend.org.uk
Sat Sep 21 17:07:52 BST 2019


In particular, put the supplied reason string last so that it will be
unambiguous.  And putting the message type first seems more natural.

Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
---
 util.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/util.c b/util.c
index 6e2fbed..45e2c93 100644
--- a/util.c
+++ b/util.c
@@ -509,10 +509,11 @@ void send_nak(const struct comm_addr *dest, uint32_t our_index,
     buf_append_uint32(buf,our_index);
     buf_append_uint32(buf,LABEL_NAK);
     if (logwhy)
-	Message(M_INFO,"%s: %08"PRIx32"<-%08"PRIx32": %08"PRIx32":"
-		" %s; sending NAK\n",
+	Message(M_INFO,"%s: sending NAK for"
+		" %08"PRIx32" %08"PRIx32"<-%08"PRIx32":"
+		" %s\n",
 		comm_addr_to_string(dest),
-		our_index, their_index, msgtype, logwhy);
+		msgtype, our_index, their_index, logwhy);
     dest->comm->sendmsg(dest->comm->st, buf, dest, 0);
 }
 
-- 
2.11.0




More information about the sgo-software-discuss mailing list