thermferm/mqtt.c

changeset 616
e2b82881c13e
parent 612
452f79a5ad71
child 628
32082a19912c
equal deleted inserted replaced
615:33a5b63e86d7 616:e2b82881c13e
1476 FILE *f; 1476 FILE *f;
1477 char line[100], *ifname, *c, ip[NI_MAXHOST]; 1477 char line[100], *ifname, *c, ip[NI_MAXHOST];
1478 struct ifaddrs *ifaddr, *ifa; 1478 struct ifaddrs *ifaddr, *ifa;
1479 int family, s; 1479 int family, s;
1480 1480
1481 if (birth && (f = fopen("/proc/net/route" , "r"))) { 1481 if (/*birth && */(f = fopen("/proc/net/route" , "r"))) {
1482 while (fgets(line, 100, f)) { 1482 while (fgets(line, 100, f)) {
1483 ifname = strtok(line , " \t"); 1483 ifname = strtok(line , " \t");
1484 c = strtok(NULL , " \t"); 1484 c = strtok(NULL , " \t");
1485 1485
1486 // Take the entry with destination '00000000' 1486 // Take the entry with destination '00000000'

mercurial