diff options
author | emax <emax@FreeBSD.org> | 2004-01-20 20:48:26 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2004-01-20 20:48:26 +0000 |
commit | 8a9c8a287a37066fd95659d3185b331a52843591 (patch) | |
tree | c318d183c555f9482f9b067d6ac25de5901a5821 /lib/libsdp/search.c | |
parent | 63d4653d05ffbec70fdf5d14dc3b1cb29e2b4425 (diff) | |
download | FreeBSD-src-8a9c8a287a37066fd95659d3185b331a52843591.zip FreeBSD-src-8a9c8a287a37066fd95659d3185b331a52843591.tar.gz |
Import sdpd(8) sources. This is Bluetooth Service Discovery Protocol daemon.
Extend libsdp(3) API to allow service registration and removal.
Fix uninitialized variable bug in sdpcontrol(8).
Reviewed by: imp (mentor)
No objection: ru
Diffstat (limited to 'lib/libsdp/search.c')
-rw-r--r-- | lib/libsdp/search.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libsdp/search.c b/lib/libsdp/search.c index 98e3e18..42f162d 100644 --- a/lib/libsdp/search.c +++ b/lib/libsdp/search.c @@ -133,7 +133,10 @@ sdp_search(void *xss, iov[1].iov_base = (void *) ss->req; iov[1].iov_len = req_cs - ss->req; - len = writev(ss->s, iov, sizeof(iov)/sizeof(iov[0])); + do { + len = writev(ss->s, iov, sizeof(iov)/sizeof(iov[0])); + } while (len < 0 && errno == EINTR); + if (len < 0) { ss->error = errno; return (-1); @@ -145,7 +148,10 @@ sdp_search(void *xss, iov[1].iov_base = (void *) rsp; iov[1].iov_len = ss->imtu; - len = readv(ss->s, iov, sizeof(iov)/sizeof(iov[0])); + do { + len = readv(ss->s, iov, sizeof(iov)/sizeof(iov[0])); + } while (len < 0 && errno == EINTR); + if (len < 0) { ss->error = errno; return (-1); |