X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=72c1b5e115ea56fcfcd69f97925d301b1e039683;hp=7d780608d6f9b64d276fd407355c938629fd5b35;hb=4dde583bc91985c3ff19ac1d1f1bc791b50658ff;hpb=66e535a729dd5a9e45600ab74dc19c2b4062ee96 diff --git a/src/net.c b/src/net.c index 7d780608..72c1b5e1 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.26 2000/08/09 14:02:16 guus Exp $ + $Id: net.c,v 1.35.4.27 2000/09/06 11:49:03 guus Exp $ */ #include "config.h" @@ -934,7 +934,7 @@ cp if(x) { syslog(LOG_ERR, _("Incoming data socket error for %s (%s): %s"), - cl->vpn_hostname, cl->real_hostname, sys_errlist[x]); + cl->vpn_hostname, cl->real_hostname, strerror(x)); return -1; } @@ -1132,13 +1132,7 @@ cp if(x) { syslog(LOG_ERR, _("Metadata socket error for %s (%s): %s"), - cl->vpn_hostname, cl->real_hostname, sys_errlist[x]); - return -1; - } - - if(cl->buflen >= MAXBUFSIZE) - { - syslog(LOG_ERR, _("Metadata read buffer overflow!")); + cl->vpn_hostname, cl->real_hostname, strerror(x)); return -1; } @@ -1233,6 +1227,12 @@ cp } } + if(cl->buflen >= MAXBUFSIZE) + { + syslog(LOG_ERR, _("Metadata read buffer overflow!")); + return -1; + } + cl->last_ping_time = time(NULL); cl->want_ping = 0; cp @@ -1264,7 +1264,7 @@ cp */ getsockopt(p->socket, SOL_SOCKET, SO_ERROR, &x, &l); syslog(LOG_ERR, _("Outgoing data socket error for %s (%s): %s"), - p->vpn_hostname, p->real_hostname, sys_errlist[x]); + p->vpn_hostname, p->real_hostname, strerror(x)); terminate_connection(p); return; }