summaryrefslogtreecommitdiff
path: root/lib/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/peer.c')
-rw-r--r--lib/peer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/peer.c b/lib/peer.c
index b6ec167..bbc3bf5 100644
--- a/lib/peer.c
+++ b/lib/peer.c
@@ -20,12 +20,12 @@ peer_pick_peer (struct rs_connection *conn)
{
assert (conn);
- if (conn->base_.active_peer)
- conn->base_.active_peer = conn->base_.active_peer->next; /* Next. */
- if (!conn->base_.active_peer)
- conn->base_.active_peer = conn->base_.peers; /* From the top. */
+ if (conn->active_peer)
+ conn->active_peer = conn->active_peer->next; /* Next. */
+ if (conn->active_peer == NULL)
+ conn->active_peer = TO_BASE_CONN (conn)->peers; /* From the top. */
- return conn->base_.active_peer;
+ return conn->active_peer;
}
struct rs_peer *