summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-22 19:35:24 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-22 19:35:24 +0000
commit08077cc9e113c2a9c7b1ff14bab38d7648d759a0 (patch)
tree169d0ec6ca461c514f185a9419a301cdfb751c82 /src
parent1953348c90d5b361dbad6c50d392fa14815419ea (diff)
downloadtinyproxy-08077cc9e113c2a9c7b1ff14bab38d7648d759a0.tar.gz
tinyproxy-08077cc9e113c2a9c7b1ff14bab38d7648d759a0.zip
The "Bind" directive sets a binding address which the outgoing connections
will use.
Diffstat (limited to '')
-rw-r--r--src/sock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sock.c b/src/sock.c
index ab65528..b38446e 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -1,4 +1,4 @@
-/* $Id: sock.c,v 1.31 2002-04-18 21:54:50 rjkaes Exp $
+/* $Id: sock.c,v 1.32 2002-04-22 19:35:24 rjkaes Exp $
*
* Sockets are created and destroyed here. When a new connection comes in from
* a client, we need to copy the socket and the create a second socket to the
@@ -111,15 +111,15 @@ opensock(char *ip_addr, uint16_t port)
}
/* Bind to our listening address*/
- if (config.ipAddr) {
+ if (bind_address) {
memset(&bind_addr, 0, sizeof(bind_addr));
bind_addr.sin_family = AF_INET;
- bind_addr.sin_addr.s_addr = inet_addr(config.ipAddr);
+ bind_addr.sin_addr.s_addr = inet_addr(bind_address);
ret = bind(sock_fd, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
if (ret < 0) {
log_message(LOG_ERR, "Could not bind local address \"%\" because of %s",
- config.ipAddr,
+ bind_address,
strerror(errno));
return -1;
}