Commit e085bf6f authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor changes to remove hardwired boss node name.

parent 5c02231f
......@@ -13,7 +13,7 @@ all: tmcd tmcc tmcd.restart findif
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -O -g -DUDP -DTBDBNAME='"$(TBDBNAME)"' -I/usr/local/include \
-DFSNODE='"$(FSNODE)"'
-DFSNODE='"$(FSNODE)"' -DBOSSNODE='"$(BOSSNODE)"'
tmcd: tmcd.o
$(CC) $(CFLAGS) -o tmcd tmcd.o \
......
......@@ -2,11 +2,5 @@
* Insert Copyright Here.
*/
#ifdef LBS
#define MASTERNODE "192.168.1.25"
#else
#define MASTERNODE "boss.emulab.net"
#endif
#define TBSERVER_PORT 7777
#define MYBUFSIZE 1024
......@@ -81,17 +81,13 @@ main(int argc, char **argv)
}
#endif
#ifdef LBS
inet_aton(MASTERNODE, &serverip);
#else
he = gethostbyname(MASTERNODE);
he = gethostbyname(BOSSNODE);
if (he)
memcpy((char *)&serverip, he->h_addr, he->h_length);
else {
fprintf(stderr, "gethostbyname(%s) failed\n", MASTERNODE);
fprintf(stderr, "gethostbyname(%s) failed\n", BOSSNODE);
exit(1);
}
#endif
while (1) {
/* Create socket from which to read. */
......@@ -221,17 +217,13 @@ doudp(int argc, char **argv)
struct in_addr serverip;
char buf[MYBUFSIZE], *bp, *response = "";
#ifdef LBS
inet_aton(MASTERNODE, &serverip);
#else
he = gethostbyname(MASTERNODE);
he = gethostbyname(BOSSNODE);
if (he)
memcpy((char *)&serverip, he->h_addr, he->h_length);
else {
fprintf(stderr, "gethostbyname(%s) failed\n", MASTERNODE);
fprintf(stderr, "gethostbyname(%s) failed\n", BOSSNODE);
exit(1);
}
#endif
/* Create socket from which to read. */
sock = socket(AF_INET, SOCK_DGRAM, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment