summaryrefslogtreecommitdiff
path: root/src/sock.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-07 04:21:07 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-07 04:21:07 +0000
commit1a9dc4e7e8951fd74a41959a1b6946a2563472cf (patch)
treeccf6960470b4e43a3877826457b6801cb17a9ce4 /src/sock.c
parentf5b9bdb93d076d6fff8e8cb99cc668e107e9c364 (diff)
downloadtinyproxy-1a9dc4e7e8951fd74a41959a1b6946a2563472cf.tar.gz
tinyproxy-1a9dc4e7e8951fd74a41959a1b6946a2563472cf.zip
Error message cleanup.
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 05d1587..bea3bad 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -1,4 +1,4 @@
-/* $Id: sock.c,v 1.6 2001-08-29 04:00:22 rjkaes Exp $
+/* $Id: sock.c,v 1.7 2001-09-07 04:18:26 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
@@ -66,19 +66,19 @@ int opensock(char *ip_addr, uint16_t port)
ret = dnscache(&port_info.sin_addr, ip_addr);
if (ret < 0) {
- log_message(LOG_ERR, "opensock: Could not lookup address: %s", ip_addr);
+ log_message(LOG_ERR, "Could not lookup address [%s].", ip_addr);
return -1;
}
port_info.sin_port = htons(port);
if ((sock_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
- log_message(LOG_ERR, "opensock: socket (%s)", strerror(errno));
+ log_message(LOG_ERR, "Could not create socket because of '%s'.", strerror(errno));
return -1;
}
if (connect(sock_fd, (struct sockaddr*)&port_info, sizeof(port_info)) < 0) {
- log_message(LOG_ERR, "connecting socket");
+ log_message(LOG_ERR, "Could not connect socket because of '%s'", strerror(errno));
return -1;
}