upstream: Add upstream list parameter to upstream_get()

to abstract it from the concrete list in the config struct.
Now upstream.c does not use any reference to config any more.

Michael
This commit is contained in:
Michael Adam committed 2009-12-07 00:22:36 +01:00
1 parent 22fba83df2
commit 4a8ea0d23b
3 files changed
+3 -6

No files matched your search

+1 -4
View File
@@ -26,7 +26,6 @@
#include "upstream.h"
#include "heap.h"
#include "main.h"
#include "log.h"
#ifdef UPSTREAM_SUPPORT
@@ -165,10 +164,8 @@ upstream_cleanup:
/*
* Check if a host is in the upstream list
*/
struct upstream *upstream_get (char *host)
struct upstream *upstream_get (char *host, struct upstream *up)
{
struct upstream *up = config.upstream_list;
in_addr_t my_ip = INADDR_NONE;
while (up) {