]> the.earth.li Git - mqtt-arp.git/commitdiff
Fix MAC address command line parsing
authorJonathan McDowell <noodles@earth.li>
Wed, 30 May 2018 17:28:38 +0000 (18:28 +0100)
committerJonathan McDowell <noodles@earth.li>
Wed, 30 May 2018 17:28:38 +0000 (18:28 +0100)
We weren't setting valid to true + incrementing our count when we saw
a MAC address on the command line.

mqtt-arp.c

index 6c83ccacf87b107f0fe6503a83c5ff71f070056e..2badfac8eda176fb95ff2a978163101a5f1655a2 100644 (file)
@@ -329,6 +329,8 @@ int main(int argc, char *argv[])
                                &config.macs[macs].mac[3],
                                &config.macs[macs].mac[4],
                                &config.macs[macs].mac[5]);
+                       config.macs[macs].valid = true;
+                       macs++;
                        break;
                case 'p':
                        config.mqtt_port = atoi(optarg);