From 9c8ad495ec332a29b4e101c00b0b0341631a4d20 Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Tue, 21 Jan 2014 11:29:26 -0800 Subject: [PATCH] netlink: Rename 'dump->seq' to 'dump->nl_seq' An upcoming patch will introduce another, completely unrelated seq to 'struct nl_dump'. Giving this one a better name should reduce confusion. Signed-off-by: Joe Stringer Signed-off-by: Ben Pfaff --- lib/netlink-socket.c | 6 +++--- lib/netlink-socket.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 1463ff008..8cb1b8eef 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -699,7 +699,7 @@ nl_dump_start(struct nl_dump *dump, int protocol, const struct ofpbuf *request) nl_msg_nlmsghdr(request)->nlmsg_flags |= NLM_F_DUMP | NLM_F_ACK; dump->status = nl_sock_send__(dump->sock, request, nl_sock_allocate_seq(dump->sock, 1), true); - dump->seq = nl_msg_nlmsghdr(request)->nlmsg_seq; + dump->nl_seq = nl_msg_nlmsghdr(request)->nlmsg_seq; } /* Helper function for nl_dump_next(). */ @@ -715,9 +715,9 @@ nl_dump_recv(struct nl_dump *dump) } nlmsghdr = nl_msg_nlmsghdr(&dump->buffer); - if (dump->seq != nlmsghdr->nlmsg_seq) { + if (dump->nl_seq != nlmsghdr->nlmsg_seq) { VLOG_DBG_RL(&rl, "ignoring seq %#"PRIx32" != expected %#"PRIx32, - nlmsghdr->nlmsg_seq, dump->seq); + nlmsghdr->nlmsg_seq, dump->nl_seq); return EAGAIN; } diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index 18db417b0..5fedfe957 100644 --- a/lib/netlink-socket.h +++ b/lib/netlink-socket.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +98,7 @@ void nl_transact_multiple(int protocol, struct nl_transaction **, size_t n); /* Table dumping. */ struct nl_dump { struct nl_sock *sock; /* Socket being dumped. */ - uint32_t seq; /* Expected nlmsg_seq for replies. */ + uint32_t nl_seq; /* Expected nlmsg_seq for replies. */ struct ofpbuf buffer; /* Receive buffer currently being iterated. */ int status; /* 0=OK, EOF=done, or positive errno value. */ }; -- 2.43.0