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().
This commit is contained in:
Martin Mares 2000-06-04 19:56:06 +00:00
parent 201187c558
commit df49d4e14b
12 changed files with 35 additions and 36 deletions

View file

@ -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;
}
}

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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");
}
};

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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?" );
}
}

View file

@ -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);

View file

@ -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:

View file

@ -348,7 +348,7 @@ nl_parse_addr(struct nlmsghdr *h)
ifi = if_find_by_index(i->ifa_index);
if (!ifi)
{
log(L_ERR "KIF: Received address message for unknown interface %d\n", i->ifa_index);
log(L_ERR "KIF: Received address message for unknown interface %d", i->ifa_index);
return;
}