summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsc2000-12-22 09:44:24 +0000
committersc2000-12-22 09:44:24 +0000
commit04c5bd4b1f00da9219c08038237c714ac9536d5e (patch)
tree72ce0297572457ee1063282157113ada92eda1b7
parentada4054083347b3aad09b62b66820ffab4b681fe (diff)
downloadivy-league-04c5bd4b1f00da9219c08038237c714ac9536d5e.zip
ivy-league-04c5bd4b1f00da9219c08038237c714ac9536d5e.tar.gz
ivy-league-04c5bd4b1f00da9219c08038237c714ac9536d5e.tar.bz2
ivy-league-04c5bd4b1f00da9219c08038237c714ac9536d5e.tar.xz
Debug message now prints network address in decimal form
-rw-r--r--comm/BusAccess.cc8
1 files changed, 6 insertions, 2 deletions
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"