Skip to content

Commit

Permalink
netlink: Rename 'dump->seq' to 'dump->nl_seq'
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
joestringer authored and blp committed Jan 23, 2014
1 parent d15ae70 commit 9c8ad49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/netlink-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(). */
Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/netlink-socket.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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. */
};
Expand Down

0 comments on commit 9c8ad49

Please sign in to comment.