From f65077489960f0dda7f02461de9cedc89ef347a5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 23 Jun 2008 01:10:06 +0000 Subject: Fix collect for non-persistent service records --- sdpd/server.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- cgit