]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
radioberry must work with localhost
authorpa3gsb <pa3gsb@gmail.com>
Sat, 26 May 2018 12:00:52 +0000 (14:00 +0200)
committerpa3gsb <pa3gsb@gmail.com>
Sat, 26 May 2018 12:00:52 +0000 (14:00 +0200)
discovered.h
old_discovery.c

index cc0ac108fe4616281b50bc0ffab3f2296508b632..1eab59484cd2e63b14aa7982ab46e793dd6d2f7a 100644 (file)
@@ -34,6 +34,7 @@
 #define DEVICE_ANGELIA 4
 #define DEVICE_ORION 5
 #define DEVICE_HERMES_LITE 6
+#define DEVICE_RADIOBERRY 7
 // 8000DLE uses 10 as the device type in old protocol
 #define DEVICE_ORION2 10 
 
index 87992da38037ee42efa45d177c2cef4e73542a64..57ea09e3ce80e86716d8e5870d11b1dc7d2273c7 100644 (file)
@@ -178,7 +178,11 @@ fprintf(stderr,"discover_receive_thread\n");
                             strcpy(discovered[devices].name,"Orion");
                             break;
                         case DEVICE_HERMES_LITE:
-                            strcpy(discovered[devices].name,"Hermes Lite");
+                                                       #ifdef RADIOBERRY
+                                                               strcpy(discovered[devices].name,"Radioberry");
+                                                       #else
+                                                               strcpy(discovered[devices].name,"Hermes Lite");         
+                                                       #endif
                             break;
                         case DEVICE_ORION2:
                             strcpy(discovered[devices].name,"Orion 2");
@@ -229,11 +233,18 @@ fprintf(stderr,"old_discovery\n");
     while (ifa) {
         g_main_context_iteration(NULL, 0);
         if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) {
+                       #ifdef RADIOBERRY
+                       if((ifa->ifa_flags&IFF_UP)==IFF_UP
+                && (ifa->ifa_flags&IFF_RUNNING)==IFF_RUNNING) {
+                               discover(ifa);
+                       }
+                       #else
             if((ifa->ifa_flags&IFF_UP)==IFF_UP
                 && (ifa->ifa_flags&IFF_RUNNING)==IFF_RUNNING
                 && (ifa->ifa_flags&IFF_LOOPBACK)!=IFF_LOOPBACK) {
                 discover(ifa);
             }
+                       #endif 
         }
         ifa = ifa->ifa_next;
     }