From 7c0703b2a547d65ce1921ec3adeb6cb277f5f35a Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Mon, 11 Dec 2000 21:21:19 +0000 Subject: proper logging. --- sbin/photurisd/api.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sbin/photurisd/api.c') diff --git a/sbin/photurisd/api.c b/sbin/photurisd/api.c index 3e324e17543..6ebd67e2b1f 100644 --- a/sbin/photurisd/api.c +++ b/sbin/photurisd/api.c @@ -37,7 +37,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: api.c,v 1.2 2000/12/11 02:16:50 provos Exp $"; +static char rcsid[] = "$Id: api.c,v 1.3 2000/12/11 21:21:17 provos Exp $"; #endif #define _API_C_ @@ -55,7 +55,7 @@ static char rcsid[] = "$Id: api.c,v 1.2 2000/12/11 02:16:50 provos Exp $"; #include "photuris.h" #include "config.h" #include "api.h" -#include "errlog.h" +#include "log.h" #include "buffer.h" #include "schedule.h" #include "server.h" @@ -80,7 +80,7 @@ process_api(int fd, int sendsock) bzero(buffer, BUFFER_SIZE); if ((sz = read(fd, buffer, BUFFER_SIZE)) == -1) - crit_error(1, "read() in process_api()"); + log_fatal("read() in process_api()"); buffer[sz >= BUFFER_SIZE ? BUFFER_SIZE -1 : sz] = 0; @@ -89,7 +89,7 @@ process_api(int fd, int sendsock) /* Set up a new state object */ if ((st = state_new()) == NULL) { - log_error(1, "state_new() in process_api()"); + log_error("state_new() in process_api()"); return; } @@ -102,7 +102,7 @@ process_api(int fd, int sendsock) continue; if (!strcmp(addresses[i], st->address)) { /* XXX Code to notify kernel of failure here */ - log_error(0, "discarded request to initiate KES with localhost"); + log_print("discarded request to initiate KES with localhost"); state_value_reset(st); free(st); return; @@ -136,7 +136,7 @@ start_exchange(int sd, struct stateob *st, char *address, int port) packet_size = PACKET_BUFFER_SIZE; if (photuris_cookie_request(st, packet_buffer, &packet_size) == -1) { - log_error(0, "photuris_cookie_request() in start_exchange() " + log_print("photuris_cookie_request() in start_exchange() " "for %s:%d", st->address, st->port); return -1; } @@ -147,7 +147,7 @@ start_exchange(int sd, struct stateob *st, char *address, int port) if (sendto(sd, packet_buffer, packet_size, 0, (struct sockaddr *) &sin, sizeof(sin)) != packet_size) { /* XXX Code to notify kernel of failure */ - log_error(1, "sendto() in start_exchange() for %s:%d", + log_error("sendto() in start_exchange() for %s:%d", st->address, st->port); return -1; } -- cgit v1.2.3