diff options
Diffstat (limited to 'comm')
-rw-r--r-- | comm/BusAccess.cc | 8 |
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" |