diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-06 15:53:58 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-06 15:53:58 +0100 |
commit | 5c60297a1eaab7b10d6f584ba329493a41b812d0 (patch) | |
tree | ec1eef1d6adb859ef94e5aeeff8f190d35e63215 /lib/peer.c | |
parent | 7636505962a348d9564e53922834dc6df1274653 (diff) |
Restructure code, moving most code out of packet.c
Also, move copyright notice out of COPYING and into every file.
Diffstat (limited to 'lib/peer.c')
-rw-r--r-- | lib/peer.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,4 +1,6 @@ -/* See the file COPYING for licensing information. */ +/* Copyright 2010, 2011 NORDUnet A/S. All rights reserved. + See the file COPYING for licensing information. */ + #if defined HAVE_CONFIG_H #include <config.h> #endif @@ -6,7 +8,22 @@ #include <assert.h> #include <radsec/radsec.h> #include <radsec/radsec-impl.h> +#include "peer.h" + +struct rs_peer * +peer_pick_peer (struct rs_connection *conn) +{ + assert (conn); + + if (conn->active_peer) + conn->active_peer = conn->active_peer->next; /* Next. */ + if (!conn->active_peer) + conn->active_peer = conn->peers; /* From the top. */ + + return conn->active_peer; +} +/* Public functions. */ int rs_peer_create (struct rs_connection *conn, struct rs_peer **peer_out) { |