From: Guus Sliepen Date: Sun, 25 Jun 2000 16:20:27 +0000 (+0000) Subject: Hostlookup() is actually being called now. X-Git-Tag: release-1.0pre3~184 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f1f901112e44beaecd3037dae27407ea83edd86e;p=oweals%2Ftinc.git Hostlookup() is actually being called now. --- diff --git a/src/net.c b/src/net.c index f1c1590..57c61cc 100644 --- a/src/net.c +++ b/src/net.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c,v 1.35.4.4 2000/06/25 16:01:11 guus Exp $ + $Id: net.c,v 1.35.4.5 2000/06/25 16:20:27 guus Exp $ */ #include "config.h" @@ -754,14 +754,15 @@ cp } p->real_ip = ntohl(ci.sin_addr.s_addr); + p->hostname = hostlookup(ci.sin_addr.s_addr); p->meta_socket = sfd; p->status.meta = 1; p->buflen = 0; p->last_ping_time = time(NULL); p->want_ping = 0; - syslog(LOG_NOTICE, _("Connection from " IP_ADDR_S ":%d"), - IP_ADDR_V(p->real_ip), htons(ci.sin_port)); + syslog(LOG_NOTICE, _("Connection from %s port %d"), + p->hostname, htons(ci.sin_port)); if(send_basic_info(p) < 0) { diff --git a/src/protocol.c b/src/protocol.c index e772d04..e34ee40 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.4 2000/06/25 16:01:12 guus Exp $ + $Id: protocol.c,v 1.28.4.5 2000/06/25 16:20:27 guus Exp $ */ #include "config.h" @@ -230,7 +230,7 @@ int send_basic_info(conn_list_t *cl) { cp if(debug_lvl > 1) - syslog(LOG_DEBUG, _("Sending BASIC_INFO to " IP_ADDR_S), + syslog(LOG_DEBUG, _("Sending BASIC_INFO to %s"), cl->hostname); buflen = snprintf(buffer, MAXBUFSIZE, "%d %d %lx/%lx:%x %d\n", BASIC_INFO, PROT_CURRENT, myself->vpn_ip, myself->vpn_mask, myself->port, myself->flags); @@ -396,7 +396,7 @@ int basic_info_h(conn_list_t *cl) { cp if(debug_lvl > 1) - syslog(LOG_DEBUG, _("Got BASIC_INFO from " IP_ADDR_S), cl->hostname); + syslog(LOG_DEBUG, _("Got BASIC_INFO from %s"), cl->hostname); if(sscanf(cl->buffer, "%*d %d %lx/%lx:%hx %d", &cl->protocol_version, &cl->vpn_ip, &cl->vpn_mask, &cl->port, &cl->flags) != 5) {