along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: conf.c,v 1.9.4.8 2000/08/09 14:02:15 guus Exp $
+ $Id: conf.c,v 1.9.4.9 2000/09/06 11:49:03 guus Exp $
*/
cp
if((fp = fopen (fname, "r")) == NULL)
{
- fprintf(stderr, _("Could not open %s: %s\n"), fname, sys_errlist[errno]);
+ fprintf(stderr, _("Could not open %s: %s\n"), fname, strerror(errno));
return 1;
}
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"
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;
}
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;
}
}
}
+ if(cl->buflen >= MAXBUFSIZE)
+ {
+ syslog(LOG_ERR, _("Metadata read buffer overflow!"));
+ return -1;
+ }
+
cl->last_ping_time = time(NULL);
cl->want_ping = 0;
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;
}
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: netutl.c,v 1.12.4.7 2000/08/17 16:51:07 guus Exp $
+ $Id: netutl.c,v 1.12.4.8 2000/09/06 11:49:05 guus Exp $
*/
#include "config.h"
#include <utils.h>
#include <xalloc.h>
+#include "errno.h"
#include "conf.h"
#include "encr.h"
#include "net.h"
if(!(h = gethostbyname(p)))
{
- fprintf(stderr, _("Error looking up `%s': %s\n"), p, sys_errlist[h_errno]);
+ fprintf(stderr, _("Error looking up `%s': %s\n"), p, strerror(errno));
return NULL;
}
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: tincd.c,v 1.10.4.8 2000/08/17 16:51:08 guus Exp $
+ $Id: tincd.c,v 1.10.4.9 2000/09/06 11:49:05 guus Exp $
*/
#include "config.h"
#include <sys/types.h>
#include <syslog.h>
#include <unistd.h>
+#include <signal.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
sighuh(int a)
{
if(cp_file)
- syslog(LOG_NOTICE, _("Got unexpected signal %d after %s line %d"),
- a, cp_file, cp_line);
+ syslog(LOG_NOTICE, _("Got unexpected %s after %s line %d"),
+ strsignal(a), cp_file, cp_line);
else
- syslog(LOG_NOTICE, _("Got unexpected signal %d"), a);
+ syslog(LOG_NOTICE, _("Got unexpected %s"), strsignal(a));
}
void