summaryrefslogtreecommitdiffstats
path: root/sdpd
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-23 01:10:06 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-23 01:10:06 +0000
commitf65077489960f0dda7f02461de9cedc89ef347a5 (patch)
treef95184fbbc5a8a16460eeab208389d6d5b913e92 /sdpd
parentb468daedba50975703c41e99194d223c540131aa (diff)
Fix collect for non-persistent service records
Diffstat (limited to 'sdpd')
-rw-r--r--sdpd/server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sdpd/server.c b/sdpd/server.c
index fcdbf49f..1524d1c0 100644
--- a/sdpd/server.c
+++ b/sdpd/server.c
@@ -151,11 +151,16 @@ static gboolean io_session_event(GIOChannel *chan, GIOCondition cond, gpointer d
uint8_t *buf;
int sk, len, size;
- if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL))
+ if (cond & G_IO_NVAL)
return FALSE;
sk = g_io_channel_unix_get_fd(chan);
+ 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);