summaryrefslogtreecommitdiff
path: root/sbin/photurisd/api.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-12-11 21:21:19 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-12-11 21:21:19 +0000
commit7c0703b2a547d65ce1921ec3adeb6cb277f5f35a (patch)
treeee72ca9953ddcde25be632639bb3242cac086577 /sbin/photurisd/api.c
parentcd40f5ad40cd4912648f1cb155bf3167202ddc89 (diff)
proper logging.
Diffstat (limited to 'sbin/photurisd/api.c')
-rw-r--r--sbin/photurisd/api.c14
1 files changed, 7 insertions, 7 deletions
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;
}