From 388761cdc8f8a1293bb0b1a5bd576b5fb41616ca Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Tue, 17 Sep 2013 17:40:20 +0300 Subject: [PATCH] sdp: Check correct number of bytes received in recv Instead of checking for error check that correct number of bytes received. --- src/sdpd-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdpd-server.c b/src/sdpd-server.c index 181d24820..7b1351f81 100644 --- a/src/sdpd-server.c +++ b/src/sdpd-server.c @@ -177,7 +177,7 @@ static gboolean io_session_event(GIOChannel *chan, GIOCondition cond, gpointer d return TRUE; len = recv(sk, buf, size, 0); - if (len <= 0) { + if (len != size) { sdp_svcdb_collect_all(sk); free(buf); return FALSE; -- 2.11.0