diff options
author | Christian Hesse <mail@eworm.de> | 2013-05-16 13:41:50 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-05-16 13:41:50 +0200 |
commit | e7f586a0b91e40dcd7d84b6d249d037833b88e9f (patch) | |
tree | d4c3137942bbf177c4f10d88173fa251a0f56ea3 | |
parent | 83b0a6ce4f4f627aec620d62f0542bc6c543d0c4 (diff) | |
download | netlink-notify-e7f586a0b91e40dcd7d84b6d249d037833b88e9f.tar.gz netlink-notify-e7f586a0b91e40dcd7d84b6d249d037833b88e9f.tar.zst |
simplify debug output0.5.0
-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, |