diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 16:21:00 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 16:21:00 +0000 |
commit | 4f44db979ad33b647bb035c55fff7e4a2c89409c (patch) | |
tree | d4b2794ffda8541d9d59ac44db62a5dd38c45f82 /usr.sbin/ldpd/lde.c | |
parent | 9b77d13163cce652826e4446edc864a88be2e9e1 (diff) |
Standardize some log messages and fix some inconsistencies.
We were using several different names for the same thing in our log
messages: neighbor, neighbor ID, nbr ID and LSR ID.
Standardize to always use "lsr-id" to refer to a neighbor.
Also:
* Use log_warnx() instead of log_warn() when appropriate;
* Use fatal(x) instead of err(x) when appropriate;
* Fix some inconsistent log messages.
Diffstat (limited to 'usr.sbin/ldpd/lde.c')
-rw-r--r-- | usr.sbin/ldpd/lde.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ldpd/lde.c b/usr.sbin/ldpd/lde.c index c1b3f0b26ce..0174c0f0f17 100644 --- a/usr.sbin/ldpd/lde.c +++ b/usr.sbin/ldpd/lde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.c,v 1.44 2016/05/23 16:14:36 renato Exp $ */ +/* $OpenBSD: lde.c,v 1.45 2016/05/23 16:20:59 renato Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -248,7 +248,7 @@ lde_dispatch_imsg(int fd, short event, void *bula) case IMSG_LABEL_WITHDRAW: case IMSG_LABEL_ABORT: if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(map)) - fatalx("invalid size of OE request"); + fatalx("lde_dispatch_imsg: wrong imsg len"); memcpy(&map, imsg.data, sizeof(map)); ln = lde_nbr_find(imsg.hdr.peerid); @@ -284,7 +284,7 @@ lde_dispatch_imsg(int fd, short event, void *bula) break; case IMSG_ADDRESS_ADD: if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(addr)) - fatalx("invalid size of OE request"); + fatalx("lde_dispatch_imsg: wrong imsg len"); memcpy(&addr, imsg.data, sizeof(addr)); nbr = lde_nbr_find(imsg.hdr.peerid); @@ -303,7 +303,7 @@ lde_dispatch_imsg(int fd, short event, void *bula) break; case IMSG_ADDRESS_DEL: if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(addr)) - fatalx("invalid size of OE request"); + fatalx("lde_dispatch_imsg: wrong imsg len"); memcpy(&addr, imsg.data, sizeof(addr)); nbr = lde_nbr_find(imsg.hdr.peerid); @@ -315,14 +315,14 @@ lde_dispatch_imsg(int fd, short event, void *bula) if (lde_address_del(nbr, &addr) < 0) { log_debug("%s: cannot delete address %s, it " - "does not exists", __func__, + "does not exist", __func__, inet_ntoa(addr)); } break; case IMSG_NOTIFICATION: if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(nm)) - fatalx("invalid size of OE request"); + fatalx("lde_dispatch_imsg: wrong imsg len"); memcpy(&nm, imsg.data, sizeof(nm)); ln = lde_nbr_find(imsg.hdr.peerid); @@ -342,7 +342,7 @@ lde_dispatch_imsg(int fd, short event, void *bula) break; case IMSG_NEIGHBOR_UP: if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(addr)) - fatalx("invalid size of OE request"); + fatalx("lde_dispatch_imsg: wrong imsg len"); memcpy(&addr, imsg.data, sizeof(addr)); if (lde_nbr_find(imsg.hdr.peerid)) |