diff options
author | Martin Mares <mj@ucw.cz> | 2000-06-04 21:56:06 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-06-04 21:56:06 +0200 |
commit | df49d4e14b7c24f8ca958870fd1e9ddc84df1f1b (patch) | |
tree | cb5c1211db86aae3848564814fb048c101960d82 /proto | |
parent | 201187c55837587d8f88775cd957d9c8e423c254 (diff) | |
download | bird-df49d4e14b7c24f8ca958870fd1e9ddc84df1f1b.tar bird-df49d4e14b7c24f8ca958870fd1e9ddc84df1f1b.zip |
Removed lots of trailing newlines in log messages.
Please note that the only calls which don't add newlines automatically
(i.e., don't print a full line of output) are debug() and DBG().
Diffstat (limited to 'proto')
-rw-r--r-- | proto/ospf/dbdes.c | 4 | ||||
-rw-r--r-- | proto/ospf/hello.c | 10 | ||||
-rw-r--r-- | proto/ospf/iface.c | 4 | ||||
-rw-r--r-- | proto/ospf/lsack.c | 2 | ||||
-rw-r--r-- | proto/ospf/lsalib.c | 4 | ||||
-rw-r--r-- | proto/ospf/lsupd.c | 12 | ||||
-rw-r--r-- | proto/ospf/neighbor.c | 6 | ||||
-rw-r--r-- | proto/ospf/rt.c | 4 | ||||
-rw-r--r-- | proto/rip/auth.c | 19 | ||||
-rw-r--r-- | proto/rip/rip.h | 2 | ||||
-rw-r--r-- | proto/static/static.c | 2 |
11 files changed, 34 insertions, 35 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 44fc459..ef297be 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -133,7 +133,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n) break; default: /* Ignore it */ - die("Bug in dbdes sending\n"); + die("Bug in dbdes sending"); break; } } @@ -358,7 +358,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, } break; defaut: - die("%s: Received dbdes from %I in unknown state.\n", p->name, n->ip); + die("%s: Received dbdes from %I in unknown state.", p->name, n->ip); break; } } diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c index 18e1561..3e4bfff 100644 --- a/proto/ospf/hello.c +++ b/proto/ospf/hello.c @@ -62,32 +62,32 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p, if((unsigned)ipa_mklen(ipa_ntoh(ps->netmask))!=ifa->iface->addr->pxlen) { - log("%s%s%I%s%Ibad netmask %I.\n", p->name, beg, nrid, rec, + log("%s%s%I%s%Ibad netmask %I.", p->name, beg, nrid, rec, ipa_ntoh(ps->netmask)); return; } if(ntohs(ps->helloint)!=ifa->helloint) { - log("%s%s%I%shello interval mismatch.\n", p->name, beg, faddr, rec); + log("%s%s%I%shello interval mismatch.", p->name, beg, faddr, rec); return; } if(ntohl(ps->deadint)!=ifa->helloint*ifa->deadc) { - log("%s%s%I%sdead interval mismatch.\n", p->name, beg, faddr, rec); + log("%s%s%I%sdead interval mismatch.", p->name, beg, faddr, rec); return; } if(ps->options!=ifa->options) { - log("%s%s%I%soptions mismatch.\n", p->name, beg, faddr, rec); + log("%s%s%I%soptions mismatch.", p->name, beg, faddr, rec); return; } if((n=find_neigh(ifa, nrid))==NULL) { - debug("%s: New neighbor found: %I on %s.\n", p->name,faddr, + debug("%s: New neighbor found: %I on %s.", p->name,faddr, ifa->iface->name); n=mb_allocz(p->pool, sizeof(struct ospf_neighbor)); add_tail(&ifa->neigh_list, NODE n); diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 011fd4b..f7be7eb 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -362,7 +362,7 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *iface) log("%s: Huh? could not open mc socket on interface %s?", p->name, iface->name); mb_free(ifa); - log("%s: Ignoring this interface\n", p->name); + log("%s: Ignoring this interface.", p->name); return; } ifa->dr_sk=NULL; @@ -372,7 +372,7 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *iface) log("%s: Huh? could not open ip socket on interface %s?", p->name, iface->name); mb_free(ifa); - log("%s: Ignoring this interface\n", p->name); + log("%s: Ignoring this interface", p->name); return; } diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c index 16166db..a9853f4 100644 --- a/proto/ospf/lsack.c +++ b/proto/ospf/lsack.c @@ -178,7 +178,7 @@ ospf_lsack_rx(struct ospf_lsack_packet *ps, struct proto *p, if((nolsa<1)||((lenn-sizeof(struct ospf_lsack_packet))!= (nolsa*sizeof(struct ospf_lsa_header)))) { - log("%s: Received corrupted LS ack from %I\n", p->name, n->ip); + log("%s: Received corrupted LS ack from %I", p->name, n->ip); return; } diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index 9cfddc0..14ad099 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -172,7 +172,7 @@ htonlsab(void *h, void *n, u8 type, u16 len) } break; } - default: die("(hton): Unknown LSA\n"); + default: die("(hton): Unknown LSA"); } }; @@ -269,7 +269,7 @@ ntohlsab(void *n, void *h, u8 type, u16 len) } break; } - default: die("(ntoh): Unknown LSA\n"); + default: die("(ntoh): Unknown LSA"); } }; diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 90a7b7d..ad64eed 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -64,7 +64,7 @@ flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn, ospf_hash_delete(nn->lsrqh,en); if(EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE); break; - default: bug("Bug in lsa_comp?\n"); + default: bug("Bug in lsa_comp?"); } } } @@ -279,32 +279,32 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, if(((diff+sizeof(struct ospf_lsa_header))>=size) || ((ntohs(lsa->length)+diff)>size)) - log("%s: Received lsupd from %I is too short.\n", p->name,n->ip); + log("%s: Received lsupd from %I is too short.", p->name,n->ip); lenn=ntohs(lsa->length); if((lenn<=sizeof(struct ospf_lsa_header))||(lenn!=(4*(lenn/4)))) { - log("Received LSA with bad length\n"); + log("Received LSA with bad length"); ospf_neigh_sm(n,INM_BADLSREQ); break; } /* pg 143 (1) */ if(lsa->checksum!=lsasum_check(lsa,NULL,po)) { - log("Received bad lsa checksum from %I\n",n->rid); + log("Received bad lsa checksum from %I",n->rid); continue; } /* pg 143 (2) */ if((lsa->type<LSA_T_RT)||(lsa->type>LSA_T_EXT)) { - log("Unknown LSA type from %I\n",n->rid); + log("Unknown LSA type from %I",n->rid); continue; } /* pg 143 (3) */ if((lsa->type==LSA_T_EXT)&&oa->stub) { - log("Received External LSA in stub area from %I\n",n->rid); + log("Received External LSA in stub area from %I",n->rid); continue; } ntohlsah(lsa,&lsatmp); diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 3590504..9e04bac 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -249,7 +249,7 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event) tm_start(n->lsrr_timer,n->ifa->rxmtint); tm_start(n->ackd_timer,n->ifa->rxmtint/2); } - else die("NEGDONE and I'm not in EXSTART?\n"); + else die("NEGDONE and I'm not in EXSTART?"); break; case INM_EXDONE: neigh_chstate(n,NEIGHBOR_LOADING); @@ -358,7 +358,7 @@ bdr_election(struct ospf_iface *ifa, struct proto *p) else { if((tmp=find_neigh(ifa,ndrid))==NULL) - die("Error in DR election.\n"); + die("Error in DR election."); ifa->drid=ndrid; ifa->drip=tmp->ip; } @@ -371,7 +371,7 @@ bdr_election(struct ospf_iface *ifa, struct proto *p) else { if((tmp=find_neigh(ifa,nbdrid))==NULL) - die("Error in BDR election.\n"); + die("Error in BDR election."); ifa->bdrid=nbdrid; ifa->bdrip=tmp->ip; } diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index d9e7094..86379e4 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -127,7 +127,7 @@ ospf_rt_spfa(struct ospf_area *oa) DBG("PTP searched.\n"); break; default: - log("Unknown link type in router lsa.\n"); + log("Unknown link type in router lsa."); break; } add_cand(&oa->cand,tmp,act,act->dist+rtl->metric,oa); @@ -287,7 +287,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */ mlen=ipa_mklen(le->netmask); if((mlen<0)||(mlen>32)) { - log("%s: Invalid mask in LSA.\nID: %I, RT: %I, Type: %u, Mask %I", + log("%s: Invalid mask in LSA. ID: %I, RT: %I, Type: %u, Mask %I", p->name,en->lsa.id,en->lsa.rt,en->lsa.type,le->netmask); continue; } diff --git a/proto/rip/auth.c b/proto/rip/auth.c index 89a9af9..994021e 100644 --- a/proto/rip/auth.c +++ b/proto/rip/auth.c @@ -4,7 +4,6 @@ * Copyright (c) 1999 Pavel Machek <pavel@ucw.cz> * * Can be freely distributed and used under the terms of the GNU GPL. - * */ #define LOCAL_DEBUG @@ -38,11 +37,11 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru struct password_item *passwd = get_best_password( P_CF->passwords, 0 ); DBG( "Plaintext passwd" ); if (!passwd) { - log( L_AUTH "no passwords set and password authentication came\n" ); + log( L_AUTH "No passwords set and password authentication came" ); return 1; } if (strncmp( (char *) (&block->packetlen), passwd->password, 16)) { - log( L_AUTH "Passwd authentication failed!\n" ); + log( L_AUTH "Passwd authentication failed!" ); DBG( "Expected %s, got %s\n", passwd->password, &block->packetlen ); return 1; } @@ -55,13 +54,13 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru struct rip_md5_tail *tail; if (block->packetlen != PACKETLEN(num)) { - log( L_ERR "packetlen in md5 does not match computed value\n" ); + log( L_ERR "Packet length in MD5 does not match computed value" ); return 1; } tail = (struct rip_md5_tail *) ((char *) packet + (block->packetlen - sizeof(struct rip_block_auth))); if ((tail->mustbeFFFF != 0xffff) || (tail->mustbe0001 != 0x0001)) { - log( L_ERR "md5 tail signature is not there\n" ); + log( L_ERR "MD5 tail signature is not there" ); return 1; } @@ -73,10 +72,10 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru if (block->seq) { struct neighbor *neigh = neigh_find(p, &whotoldme, 0); if (!neigh) { - log( L_AUTH "Non-neighbour md5 checksummed packet?\n" ); + log( L_AUTH "Non-neighbour MD5 checksummed packet?" ); } else { if (neigh->aux > block->seq) { - log( L_AUTH "md5 prottected packet with lower numbers\n" ); + log( L_AUTH "MD5 protected packet with lower numbers" ); return 0; } neigh->aux = block->seq; @@ -120,7 +119,7 @@ rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, stru DBG( "Outgoing authentication: " ); if (!passwd) { - log( L_ERR "no suitable password found for authentication\n" ); + log( L_ERR "No suitable password found for authentication" ); return PACKETLEN(num); } @@ -137,7 +136,7 @@ rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, stru static int sequence = 0; if (num > PACKET_MD5_MAX) - bug( "we can not add MD5 authentication to this long packet\n" ); + bug( "We can not add MD5 authentication to this long packet" ); block->keyid = passwd->id; block->authlen = 20; @@ -157,6 +156,6 @@ rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, stru return PACKETLEN(num) + block->authlen; } default: - bug( "Uknown authtype in outgoing authentication?\n" ); + bug( "Unknown authtype in outgoing authentication?" ); } } diff --git a/proto/rip/rip.h b/proto/rip/rip.h index 9a07040..67fd5b0 100644 --- a/proto/rip/rip.h +++ b/proto/rip/rip.h @@ -152,7 +152,7 @@ struct rip_proto { #define RIP_MAGIC 81861253 -#define CHK_MAGIC do { if (P->magic != RIP_MAGIC) bug( "Not enough magic\n" ); } while (0) +#define CHK_MAGIC do { if (P->magic != RIP_MAGIC) bug( "Not enough magic" ); } while (0) void rip_init_instance(struct proto *p); void rip_init_config(struct rip_proto_config *c); diff --git a/proto/static/static.c b/proto/static/static.c index de061e8..beb5a1b 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -98,7 +98,7 @@ static_add(struct proto *p, struct static_route *r) static_install(p, r, n->iface); } else - log(L_ERR "Static route destination %I is invalid. Ignoring.\n", r->via); + log(L_ERR "Static route destination %I is invalid. Ignoring.", r->via); break; } case RTD_DEVICE: |