From c0244c2448a5504581ae24e78b5859760b999b8e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 11 Jun 2005 11:10:57 +0000 Subject: * add logging API and make all code make use of it git-svn-id: file:///home/lennart/svn/public/avahi/trunk@112 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/netlink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'avahi-core/netlink.c') diff --git a/avahi-core/netlink.c b/avahi-core/netlink.c index 88979e1..50ddf5c 100644 --- a/avahi-core/netlink.c +++ b/avahi-core/netlink.c @@ -29,6 +29,7 @@ #include #include "netlink.h" +#include "log.h" struct AvahiNetlink { GMainContext *context; @@ -55,14 +56,14 @@ gboolean avahi_netlink_work(AvahiNetlink *nl, gboolean block) { if (errno == EAGAIN || errno == EINTR) break; - g_warning("NETLINK: recv() failed: %s", strerror(errno)); + avahi_log_warn("NETLINK: recv() failed: %s", strerror(errno)); return FALSE; } if (nl->callback) { for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) { if (!NLMSG_OK(p, (size_t) bytes)) { - g_warning("NETLINK: packet truncated"); + avahi_log_warn("NETLINK: packet truncated"); return FALSE; } @@ -179,7 +180,7 @@ int avahi_netlink_send(AvahiNetlink *nl, struct nlmsghdr *m, guint *ret_seq) { m->nlmsg_flags |= NLM_F_ACK; if (send(nl->fd, m, m->nlmsg_len, 0) < 0) { - g_warning("NETLINK: send(): %s\n", strerror(errno)); + avahi_log_warn("NETLINK: send(): %s\n", strerror(errno)); return -1; } -- cgit