summaryrefslogtreecommitdiff
path: root/comm/IrdaAddress.cc
diff options
context:
space:
mode:
Diffstat (limited to 'comm/IrdaAddress.cc')
-rw-r--r--comm/IrdaAddress.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/comm/IrdaAddress.cc b/comm/IrdaAddress.cc
index 9896564..6797980 100644
--- a/comm/IrdaAddress.cc
+++ b/comm/IrdaAddress.cc
@@ -88,8 +88,8 @@ IvlIrdaAddress :: DiscoverPeers (int fd, IvlListOf <IvlIrdaAddress>& al)
socklen_t len = 1024;
byte buf[1024];
struct irda_device_list *l = (struct irda_device_list *) buf;
- getsockopt (fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &len);
-
+ if (getsockopt (fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &len) < 0)
+ return 0;
if (len <= 0) {
fprintf (stderr, "no device found\n");
@@ -98,7 +98,7 @@ IvlIrdaAddress :: DiscoverPeers (int fd, IvlListOf <IvlIrdaAddress>& al)
struct irda_device_info* d = l->dev;
for (int i = 0; i < l->len ; ++i, ++d) {
- fprintf (stderr, "found %s at [0x%08x, 0x%08x]\n", d->info, d->saddr, d->daddr);
+// fprintf (stderr, "found %s at [0x%08x, 0x%08x]\n", d->info, d->saddr, d->daddr);
al.Append (new IvlIrdaAddress (d->daddr));
}
return l->len;