netlink-socket: Consistently log sequence numbers in hexadecimal.
authorBen Pfaff <blp@nicira.com>
Tue, 11 Jan 2011 19:01:08 +0000 (11:01 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 27 Jan 2011 17:26:06 +0000 (09:26 -0800)
nlmsghdr_to_string() wrote sequence numbers in hex, but nl_sock_transact()
wrote them in decimal.  This consistently switches to hexadecimal.

Reviewed by Ethan Jackson <ethan@nicira.com>.

lib/netlink-socket.c

index 8e8c17d..27811d8 100644 (file)
@@ -464,7 +464,7 @@ recv:
     }
     nlmsghdr = nl_msg_nlmsghdr(reply);
     if (seq != nlmsghdr->nlmsg_seq) {
-        VLOG_DBG_RL(&rl, "ignoring seq %"PRIu32" != expected %"PRIu32,
+        VLOG_DBG_RL(&rl, "ignoring seq %#"PRIx32" != expected %#"PRIx32,
                     nl_msg_nlmsghdr(reply)->nlmsg_seq, seq);
         ofpbuf_delete(reply);
         goto recv;
@@ -603,7 +603,7 @@ nl_dump_recv(struct nl_dump *dump, struct ofpbuf **bufferp)
 
     nlmsghdr = nl_msg_nlmsghdr(buffer);
     if (dump->seq != nlmsghdr->nlmsg_seq) {
-        VLOG_DBG_RL(&rl, "ignoring seq %"PRIu32" != expected %"PRIu32,
+        VLOG_DBG_RL(&rl, "ignoring seq %#"PRIx32" != expected %#"PRIx32,
                     nlmsghdr->nlmsg_seq, dump->seq);
         return EAGAIN;
     }