Fix offline icon if update_online repeatedly called when carrier and online
authorRoy Marples <roy@marples.name>
Fri, 12 Aug 2016 19:00:59 +0000 (19:00 +0000)
committerRoy Marples <roy@marples.name>
Fri, 12 Aug 2016 19:00:59 +0000 (19:00 +0000)
are both false.
Thanks to Simon Long.

src/dhcpcd-gtk/main.c

index 88de9e13d6deefdfab3c9fea0145267f8f076780..00e18d8368b518e084e879ade3b226d2b6f76f10 100644 (file)
@@ -215,7 +215,7 @@ update_online(DHCPCD_CONNECTION *con, bool showif)
                        g_message("%s: %s", i->ifname, i->reason);
        }
 
-       if (online != ison || carrier != iscarrier) {
+       if (online != ison || carrier != iscarrier || (!online && !carrier)) {
                online = ison;
                carrier = iscarrier;
                if (ani_timer != 0) {