summaryrefslogtreecommitdiffstats
path: root/avahi-core/netlink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-06-11 11:10:57 +0000
committerLennart Poettering <lennart@poettering.net>2005-06-11 11:10:57 +0000
commitc0244c2448a5504581ae24e78b5859760b999b8e (patch)
tree36f494e426c66eac524064ec87e547d4868fe887 /avahi-core/netlink.c
parentcc13c12d162239446a01c3f1d322cf9704379253 (diff)
* 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
Diffstat (limited to 'avahi-core/netlink.c')
-rw-r--r--avahi-core/netlink.c7
1 files changed, 4 insertions, 3 deletions
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 <sys/ioctl.h>
#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;
}