X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fnetlink.c;h=50ddf5c282aa3442e62fb9627024aac925fdbbc1;hb=d7a2e63033dd0d2d248b4cab7bf35e78f4049354;hp=88979e10f6e62129d0474fb4d1759d62f4a77566;hpb=b6820898d317c29a31f97018ede6da5195d16bfb;p=catta 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; }