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.22 2002/02/10 21:57:54 guus Exp $
+ $Id: meta.c,v 1.1.2.25 2002/03/01 14:09:31 guus Exp $
*/
#include "config.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 <sys/types.h>
#include <sys/socket.h>
#include <openssl/evp.h>
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
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;
}
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;
}
- c->last_ping_time = time(NULL);
+ c->last_ping_time = now;
cp
return 0;
}