projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s/sliepen.warande.net/sliepen.eu.org/g
[tinc]
/
src
/
meta.c
diff --git
a/src/meta.c
b/src/meta.c
index
786d56a
..
8d6b0a8
100644
(file)
--- a/
src/meta.c
+++ b/
src/meta.c
@@
-1,7
+1,7
@@
/*
meta.c -- handle the meta communication
/*
meta.c -- handle the meta communication
- Copyright (C) 2000
,2001 Guus Sliepen <guus@sliepen.warande.net
>,
- 2000
,2001 Ivo Timmermans <itimmermans@bigfoot.com
>
+ Copyright (C) 2000
-2002 Guus Sliepen <guus@sliepen.eu.org
>,
+ 2000
-2002 Ivo Timmermans <ivo@o2w.nl
>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: meta.c,v 1.1.2.2
1 2001/10/27 12:13:17
guus Exp $
+ $Id: meta.c,v 1.1.2.2
6 2002/06/21 10:11:12
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-26,10
+26,10
@@
#include <errno.h>
#include <syslog.h>
#include <errno.h>
#include <syslog.h>
-#include <sys/signal.h>
#include <unistd.h>
#include <string.h>
/* This line must be below the rest for FreeBSD */
#include <unistd.h>
#include <string.h>
/* This line must be below the rest for FreeBSD */
+#include <sys/types.h>
#include <sys/socket.h>
#include <openssl/evp.h>
#include <sys/socket.h>
#include <openssl/evp.h>
@@
-60,7
+60,7
@@
cp
if(write(c->socket, bufp, length) < 0)
{
if(write(c->socket, bufp, length) < 0)
{
- syslog(LOG_ERR, _("Sending meta data to %s (%s) failed: %
m"), c->name, c->hostname
);
+ syslog(LOG_ERR, _("Sending meta data to %s (%s) failed: %
s"), c->name, c->hostname, strerror(errno)
);
return -1;
}
cp
return -1;
}
cp
@@
-91,7
+91,7
@@
int receive_meta(connection_t *c)
cp
if(getsockopt(c->socket, SOL_SOCKET, SO_ERROR, &x, &l) < 0)
{
cp
if(getsockopt(c->socket, SOL_SOCKET, SO_ERROR, &x, &l) < 0)
{
- syslog(LOG_ERR, _("This is a bug: %s:%d: %d:%
m %s (%s)"), __FILE__, __LINE__, c->socket
,
+ syslog(LOG_ERR, _("This is a bug: %s:%d: %d:%
s %s (%s)"), __FILE__, __LINE__, c->socket, strerror(errno)
,
c->name, c->hostname);
return -1;
}
c->name, c->hostname);
return -1;
}
@@
-125,8
+125,8
@@
cp
if(errno==EINTR)
return 0;
else
if(errno==EINTR)
return 0;
else
- syslog(LOG_ERR, _("Metadata socket read error for %s (%s): %
m
"),
- c->name, c->hostname);
+ syslog(LOG_ERR, _("Metadata socket read error for %s (%s): %
s
"),
+ c->name, c->hostname
, strerror(errno)
);
return -1;
}
return -1;
}
@@
-204,7
+204,7
@@
cp
return -1;
}
return -1;
}
- c->last_ping_time =
time(NULL)
;
+ c->last_ping_time =
now
;
cp
return 0;
}
cp
return 0;
}