diff options
author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-11-13 17:18:35 +0000 |
---|---|---|
committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-11-13 17:18:35 +0000 |
commit | cb74a64d630a10818d2ff88ffdeda8a77a3622b8 (patch) | |
tree | 0215409a59f1fe7353ecc291c9bdcc04d5a7dec4 /avahi-core/iface-pfroute.c | |
parent | 53ab0a33e26d8dbeeaba8555eeb486abfd6bbb26 (diff) |
* fixed a problem on FreeBSD where sysctl needs locked memory
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@956 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/iface-pfroute.c')
-rw-r--r-- | avahi-core/iface-pfroute.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c index c573075..c3a342d 100644 --- a/avahi-core/iface-pfroute.c +++ b/avahi-core/iface-pfroute.c @@ -321,10 +321,14 @@ void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) { mib[4] = NET_RT_IFLIST; mib[5] = 0; /* no flags */ if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) - return; + { + avahi_log_warn("sysctl failed: %s", strerror(errno)); + return; + } if ((buf = avahi_malloc(needed)) == NULL) return; if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { + avahi_log_warn("sysctl failed: %s", strerror(errno)); if (errno == ENOMEM && count++ < 10) { sleep(1); avahi_free(buf); |