diff options
Diffstat (limited to 'games/hunt/huntd')
-rw-r--r-- | games/hunt/huntd/answer.c | 12 | ||||
-rw-r--r-- | games/hunt/huntd/conf.c | 4 | ||||
-rw-r--r-- | games/hunt/huntd/driver.c | 34 | ||||
-rw-r--r-- | games/hunt/huntd/execute.c | 4 | ||||
-rw-r--r-- | games/hunt/huntd/expl.c | 6 | ||||
-rw-r--r-- | games/hunt/huntd/server.h | 4 | ||||
-rw-r--r-- | games/hunt/huntd/shots.c | 4 | ||||
-rw-r--r-- | games/hunt/huntd/terminal.c | 4 |
8 files changed, 36 insertions, 36 deletions
diff --git a/games/hunt/huntd/answer.c b/games/hunt/huntd/answer.c index 61ed07a3b9a..ef959ba0c68 100644 --- a/games/hunt/huntd/answer.c +++ b/games/hunt/huntd/answer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: answer.c,v 1.9 2003/06/11 08:45:33 pjanzen Exp $ */ +/* $OpenBSD: answer.c,v 1.10 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: answer.c,v 1.3 1997/10/10 16:32:50 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -74,7 +74,7 @@ answer_first() socklen = sizeof sockstruct; newsock = accept(Socket, (struct sockaddr *) &sockstruct, &socklen); if (newsock < 0) { - log(LOG_ERR, "accept"); + logit(LOG_ERR, "accept"); return; } @@ -90,7 +90,7 @@ answer_first() /* Remember this spawning connection: */ sp = (struct spawn *)malloc(sizeof *sp); if (sp == NULL) { - log(LOG_ERR, "malloc"); + logit(LOG_ERR, "malloc"); close(newsock); return; } @@ -271,7 +271,7 @@ answer_next(sp) error: if (len < 0) - log(LOG_WARNING, "read"); + logit(LOG_WARNING, "read"); else logx(LOG_WARNING, "lost connection to new client"); @@ -499,7 +499,7 @@ get_ident(sa, salen, uid, name, team) /* Alloc new entry -- it is released in clear_scores() */ ip = (IDENT *) malloc(sizeof (IDENT)); if (ip == NULL) { - log(LOG_ERR, "malloc"); + logit(LOG_ERR, "malloc"); /* Fourth down, time to punt */ ip = &punt; } @@ -548,7 +548,7 @@ answer_info(fp) sa = (struct sockaddr_in *)&sp->source; bf = inet_ntop(AF_INET, &sa->sin_addr, buf, sizeof buf); if (!bf) { - log(LOG_WARNING, "inet_ntop"); + logit(LOG_WARNING, "inet_ntop"); bf = "?"; } fprintf(fp, "fd %d: state %d, from %s:%d\n", diff --git a/games/hunt/huntd/conf.c b/games/hunt/huntd/conf.c index 20f98854850..84f83c547af 100644 --- a/games/hunt/huntd/conf.c +++ b/games/hunt/huntd/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.5 2001/02/13 11:55:09 pjanzen Exp $ */ +/* $OpenBSD: conf.c,v 1.6 2004/01/16 00:13:19 espie Exp $ */ /* David Leonard <d@openbsd.org>, 1999. Public domain. */ #include <stdio.h> @@ -309,7 +309,7 @@ config() fclose(f); } else if (errno != ENOENT) - log(LOG_WARNING, "%s", nm); + logit(LOG_WARNING, "%s", nm); } } diff --git a/games/hunt/huntd/driver.c b/games/hunt/huntd/driver.c index 6f98d6b1350..1a0bdf9601e 100644 --- a/games/hunt/huntd/driver.c +++ b/games/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: driver.c,v 1.15 2003/06/11 08:45:33 pjanzen Exp $ */ +/* $OpenBSD: driver.c,v 1.16 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -144,7 +144,7 @@ again: nready = select(Num_fds, &read_fds, NULL, NULL, &timeout); if (nready < 0 && errno != EINTR) { - log(LOG_ERR, "select"); + logit(LOG_ERR, "select"); cleanup(1); } } while (nready < 0); @@ -177,7 +177,7 @@ again: nready = select(Num_fds, &read_fds, NULL, NULL, to); if (nready < 0 && errno != EINTR) { - log(LOG_ERR, "select"); + logit(LOG_ERR, "select"); cleanup(1); } } while (nready < 0); @@ -282,7 +282,7 @@ again: linger.tv_sec = conf_linger; while ((ret = select(Num_fds, &read_fds, NULL, NULL, &linger)) < 0) { if (errno != EINTR) { - log(LOG_WARNING, "select"); + logit(LOG_WARNING, "select"); break; } read_fds = Fds_mask; @@ -367,17 +367,17 @@ init() Status = socket(AF_INET, SOCK_STREAM, 0); if (bind(Status, (struct sockaddr *) &addr, sizeof addr) < 0) { - log(LOG_ERR, "bind"); + logit(LOG_ERR, "bind"); cleanup(1); } if (listen(Status, 5) == -1) { - log(LOG_ERR, "listen"); + logit(LOG_ERR, "listen"); cleanup(1); } len = sizeof (struct sockaddr_in); if (getsockname(Status, (struct sockaddr *) &addr, &len) < 0) { - log(LOG_ERR, "getsockname"); + logit(LOG_ERR, "getsockname"); cleanup(1); } stat_port = ntohs(addr.sin_port); @@ -390,17 +390,17 @@ init() Socket = socket(AF_INET, SOCK_STREAM, 0); if (bind(Socket, (struct sockaddr *) &addr, sizeof addr) < 0) { - log(LOG_ERR, "bind"); + logit(LOG_ERR, "bind"); cleanup(1); } if (listen(Socket, 5) == -1) { - log(LOG_ERR, "listen"); + logit(LOG_ERR, "listen"); cleanup(1); } len = sizeof (struct sockaddr_in); if (getsockname(Socket, (struct sockaddr *) &addr, &len) < 0) { - log(LOG_ERR, "getsockname"); + logit(LOG_ERR, "getsockname"); cleanup(1); } sock_port = ntohs(addr.sin_port); @@ -442,11 +442,11 @@ init() /* Permit multiple huntd's on the same port. */ if (setsockopt(Server_socket, SOL_SOCKET, SO_REUSEPORT, &true, sizeof true) < 0) - log(LOG_ERR, "setsockopt SO_REUSEADDR"); + logit(LOG_ERR, "setsockopt SO_REUSEADDR"); if (bind(Server_socket, (struct sockaddr *) &test_port, sizeof test_port) < 0) { - log(LOG_ERR, "bind port %d", Server_port); + logit(LOG_ERR, "bind port %d", Server_port); cleanup(1); } @@ -947,7 +947,7 @@ check_again: #endif return FALSE; } - log(LOG_INFO, "read"); + logit(LOG_INFO, "read"); } if (ret > 0) { /* Got some data */ @@ -1033,7 +1033,7 @@ send_stats() fp = fdopen(s, "w"); if (fp == NULL) { - log(LOG_ERR, "fdopen"); + logit(LOG_ERR, "fdopen"); (void) close(s); return; } @@ -1156,7 +1156,7 @@ handle_wkport(fd) fromlen = sizeof fromaddr; if (recvfrom(fd, &query, sizeof query, 0, &fromaddr, &fromlen) == -1) { - log(LOG_WARNING, "recvfrom"); + logit(LOG_WARNING, "recvfrom"); return; } @@ -1200,12 +1200,12 @@ handle_wkport(fd) response = sock_port; break; default: - log(LOG_INFO, "unknown udp query %d", query); + logit(LOG_INFO, "unknown udp query %d", query); return; } response = ntohs(response); if (sendto(fd, &response, sizeof response, 0, &fromaddr, sizeof fromaddr) == -1) - log(LOG_WARNING, "sendto"); + logit(LOG_WARNING, "sendto"); } diff --git a/games/hunt/huntd/execute.c b/games/hunt/huntd/execute.c index ea1807f7890..c5ad00eba31 100644 --- a/games/hunt/huntd/execute.c +++ b/games/hunt/huntd/execute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: execute.c,v 1.7 2003/06/11 08:45:33 pjanzen Exp $ */ +/* $OpenBSD: execute.c,v 1.8 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: execute.c,v 1.2 1997/10/10 16:33:13 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -518,7 +518,7 @@ create_shot(type, y, x, face, charge, size, owner, score, expl, over) bp = (BULLET *) malloc(sizeof (BULLET)); /* NOSTRICT */ if (bp == NULL) { - log(LOG_ERR, "malloc"); + logit(LOG_ERR, "malloc"); if (owner != NULL) message(owner, "Out of memory"); return NULL; diff --git a/games/hunt/huntd/expl.c b/games/hunt/huntd/expl.c index f46cf170e6c..cb8890d9799 100644 --- a/games/hunt/huntd/expl.c +++ b/games/hunt/huntd/expl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expl.c,v 1.7 2003/06/11 08:45:33 pjanzen Exp $ */ +/* $OpenBSD: expl.c,v 1.8 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: expl.c,v 1.2 1997/10/10 16:33:18 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -60,7 +60,7 @@ showexpl(y, x, type) return; ep = (EXPL *) malloc(sizeof (EXPL)); /* NOSTRICT */ if (ep == NULL) { - log(LOG_ERR, "malloc"); + logit(LOG_ERR, "malloc"); return; } ep->e_y = y; @@ -156,7 +156,7 @@ init_removed() { rem_index = removed = malloc(conf_maxremove * sizeof(REGEN)); if (rem_index == NULL) { - log(LOG_ERR, "malloc"); + logit(LOG_ERR, "malloc"); cleanup(1); } } diff --git a/games/hunt/huntd/server.h b/games/hunt/huntd/server.h index e70bce43144..001e01fa4d6 100644 --- a/games/hunt/huntd/server.h +++ b/games/hunt/huntd/server.h @@ -1,4 +1,4 @@ -/* $OpenBSD: server.h,v 1.8 2003/06/11 08:45:33 pjanzen Exp $ */ +/* $OpenBSD: server.h,v 1.9 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: hunt.h,v 1.5 1998/09/13 15:27:28 hubertf Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -268,7 +268,7 @@ void clrscr(PLAYER *); void ce(PLAYER *); void sendcom(PLAYER *, int, ...); void flush(PLAYER *); -void log(int, const char *, ...) +void logit(int, const char *, ...) __attribute__((format (printf, 2, 3))); void logx(int, const char *, ...) __attribute__((format (printf, 2, 3))); diff --git a/games/hunt/huntd/shots.c b/games/hunt/huntd/shots.c index 14f3e170829..03ffa8991e6 100644 --- a/games/hunt/huntd/shots.c +++ b/games/hunt/huntd/shots.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shots.c,v 1.7 2003/06/11 08:45:33 pjanzen Exp $ */ +/* $OpenBSD: shots.c,v 1.8 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: shots.c,v 1.3 1997/10/11 08:13:50 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -877,7 +877,7 @@ chkslime(bp, next) /* Duplicate the unit of slime: */ nbp = (BULLET *) malloc(sizeof (BULLET)); if (nbp == NULL) { - log(LOG_ERR, "malloc"); + logit(LOG_ERR, "malloc"); return; } *nbp = *bp; diff --git a/games/hunt/huntd/terminal.c b/games/hunt/huntd/terminal.c index fccd219e36d..1dc69b807ea 100644 --- a/games/hunt/huntd/terminal.c +++ b/games/hunt/huntd/terminal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: terminal.c,v 1.7 2003/12/28 01:09:49 espie Exp $ */ +/* $OpenBSD: terminal.c,v 1.8 2004/01/16 00:13:19 espie Exp $ */ /* $NetBSD: terminal.c,v 1.2 1997/10/10 16:34:05 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -251,7 +251,7 @@ logx(prio, fmt) } void -log(prio, fmt) +logit(prio, fmt) int prio; const char *fmt; { |