From e7f586a0b91e40dcd7d84b6d249d037833b88e9f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 16 May 2013 13:41:50 +0200 Subject: simplify debug output --- netlink-notify.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'netlink-notify.c') 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, -- cgit v1.2.3-54-g00ecf