From 04c5bd4b1f00da9219c08038237c714ac9536d5e Mon Sep 17 00:00:00 2001 From: sc Date: Fri, 22 Dec 2000 09:44:24 +0000 Subject: Debug message now prints network address in decimal form --- comm/BusAccess.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'comm/BusAccess.cc') diff --git a/comm/BusAccess.cc b/comm/BusAccess.cc index 10bdb54..a0bc928 100644 --- a/comm/BusAccess.cc +++ b/comm/BusAccess.cc @@ -409,7 +409,7 @@ IvlBusAgent :: Emit (int id, const char* fmt, ...) IvlBusAccess :: IvlBusAccess (const char* name, const char* bus) : IvlDatagram (), - IvlBaseScheduledHandler (*IvlScd, SigInt), + IvlBaseScheduledHandler (*IvlScd, SigInt), // FIXME: should not be IvlScd Name (name), ListenPort (0), BroadcastPort (0), @@ -497,15 +497,19 @@ IvlBusAccess :: IvlBusAccess (const char* name, const char* bus) /* ... terminated by a point, a comma or a colon, or the end of string */ } else if (!error && (*bus == '.' || *bus == ',' || *bus == ':' || *bus == '\0')) { + if (numelem == 0) + printf ("Broadcasting on network "); + printf ("%d", elem); mask = (mask ^ (0xff << (8*(3-numelem)))) | (elem << (8*(3-numelem))); /* after a point, expect next address element */ if (*bus == '.') { + printf ("."); numelem++; /* addresses are terminated by a comma or end of string */ } else { - printf ("Broadcasting on network %lx, port %d\n", mask, BroadcastPort); + printf (", port %d\n", BroadcastPort); IvlInetAddress ba (mask, BroadcastPort); if (Send ((byte*)handshake, strlen (handshake), ba) < 0) { cerr << "Ivy warning. Broadcast to 0x" -- cgit v1.1