diff options
| author | Roy Marples <roy@marples.name> | 2012-02-06 15:35:04 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2012-02-06 15:35:04 +0000 |
| commit | 23dc84bcd7ae4b638c8ca65bdf60f2ed0d4636c4 (patch) | |
| tree | 3b461eb7bf58239d5cd684df9e3170ea202bc4ee | |
| parent | f2e7d5b3a8372af20a15f19cdc501c0cff6953a2 (diff) | |
| download | dhcpcd-ui-23dc84bcd7ae4b638c8ca65bdf60f2ed0d4636c4.tar.xz | |
Add clang as a supported compiler.dhcpcd-ui-0.6.0
Don't show RA's for stopped interfaces.
| -rwxr-xr-x | configure | 2 | ||||
| -rw-r--r-- | src/dhcpcd-gtk/main.c | 17 |
2 files changed, 16 insertions, 3 deletions
@@ -155,7 +155,7 @@ echo "MANDIR= ${MANDIR}" >>$CONFIG_MK if [ -z "$CC" ]; then printf "Looking for compiler ... " for b in $TARGET- ""; do - for cc in gcc pcc icc cc; do + for cc in gcc clang pcc icc cc; do if type $b$cc >/dev/null 2>&1; then CC=$b$cc echo "$CC" diff --git a/src/dhcpcd-gtk/main.c b/src/dhcpcd-gtk/main.c index 0da2030..332d205 100644 --- a/src/dhcpcd-gtk/main.c +++ b/src/dhcpcd-gtk/main.c @@ -121,9 +121,9 @@ animate_online(_unused gpointer data) static void update_online(DHCPCD_CONNECTION *con, bool showif) { - bool ison, iscarrier; + bool ison, iscarrier, isstop; char *msg, *msgs, *tmp; - DHCPCD_IF *ifs, *i; + DHCPCD_IF *ifs, *i, *j; ison = iscarrier = false; msgs = NULL; @@ -134,6 +134,19 @@ update_online(DHCPCD_CONNECTION *con, bool showif) if (strcmp(i->reason, "RELEASE") == 0 || strcmp(i->reason, "STOP") == 0) continue; + if (strcmp(i->type, "ipv4") != 0) { + isstop = false; + for (j = ifs; j; j = j->next) + if (strcmp(j->ifname, i->ifname) == 0 && + strcmp(j->type, "ipv4") == 0) + { + if (strcmp(j->reason, "STOP") == 0) + isstop = true; + break; + } + if (isstop) + continue; + } if (i->up) ison = iscarrier = true; if (!iscarrier && g_strcmp0(i->reason, "CARRIER") == 0) |
