From: Ramakrishnan Muthukrishnan Date: Fri, 28 Oct 2022 09:09:41 +0000 (+0530) Subject: speed up discovery for radioberry X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/$top_link?a=commitdiff_plain;h=1757d6dbc8136c0a31952e2a16cfe4a01f1c2ca0;p=pihpsdr.git speed up discovery for radioberry Do not look at TCP Port, only look at localhost --- diff --git a/old_discovery.c b/old_discovery.c index 748b8ab..7f27ee7 100644 --- a/old_discovery.c +++ b/old_discovery.c @@ -252,7 +252,7 @@ int stemlab_get_info(int id) { int optval,i; // Allow RP app to come up - sleep(2); + //sleep(2); devices=id; @@ -523,8 +523,8 @@ fprintf(stderr,"old_discovery\n"); g_main_context_iteration(NULL, 0); if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) { if((ifa->ifa_flags&IFF_UP)==IFF_UP - && (ifa->ifa_flags&IFF_RUNNING)==IFF_RUNNING) { - //&& (ifa->ifa_flags&IFF_LOOPBACK)!=IFF_LOOPBACK) { + && (ifa->ifa_flags&IFF_RUNNING)==IFF_RUNNING + && (ifa->ifa_flags&IFF_LOOPBACK)==IFF_LOOPBACK) { discover(ifa); } } @@ -533,7 +533,7 @@ fprintf(stderr,"old_discovery\n"); freeifaddrs(addrs); // Do one additional "discover" for a fixed TCP address - discover(NULL); + // discover(NULL); fprintf(stderr, "discovery found %d devices\n",devices);