Hi,
When using the libbluetooth SDP API, records registered that do not
have SDP_RECORD_PERSIST are not always collected by sdpd when the sdp
session is closed. I think the attached patch should help.
Regards,
Albert
Index: server.c
===================================================================
RCS file: /cvsroot/bluez/utils/sdpd/server.c,v
retrieving revision 1.13
diff -u -r1.13 server.c
--- server.c 2 Feb 2008 03:37:48 -0000 1.13
+++ server.c 12 Jun 2008 19:47:52 -0000
@@ -151,11 +151,15 @@
uint8_t *buf;
int sk, len, size;
- if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL))
- return FALSE;
-
sk = g_io_channel_unix_get_fd(chan);
+ if (cond & G_IO_NVAL) {
+ return FALSE;
+ } else if (cond & (G_IO_HUP | G_IO_ERR)) {
+ sdp_svcdb_collect_all(sk);
+ return FALSE;
+ }
+
len = recv(sk, &hdr, sizeof(sdp_pdu_hdr_t), MSG_PEEK);
if (len <= 0) {
sdp_svcdb_collect_all(sk);
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bluez-devel