diff options
Diffstat (limited to 'netlink-notify.c')
-rw-r--r-- | netlink-notify.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/netlink-notify.c b/netlink-notify.c index d5dd647..00b3a4d 100644 --- a/netlink-notify.c +++ b/netlink-notify.c @@ -191,9 +191,7 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { if (notifystr == NULL) { return 0; } -#if DEBUG - puts (notifystr); -#endif + address = notify_notification_new(TEXT_TOPIC, notifystr, ICON_NETWORK_ADDRESS); notify_notification_set_category(address, PROGNAME); notify_notification_set_urgency(address, NOTIFY_URGENCY_NORMAL); @@ -208,15 +206,9 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { return 0; case RTM_NEWLINK: notifystr = newstr_link(TEXT_NEWLINK, name, ifi->ifi_flags); -#if DEBUG - puts (notifystr); -#endif break; case RTM_DELLINK: notifystr = newstr_away(TEXT_DELLINK); -#if DEBUG - puts (notifystr); -#endif break; default: /* we should not get here... */ @@ -224,6 +216,10 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { return 0; } +#if DEBUG + puts (notifystr); +#endif + if (address == NULL) { if (notification[ifi->ifi_index] == NULL) { notification[ifi->ifi_index] = notify_notification_new(TEXT_TOPIC, notifystr, |