[vlc-commits] sap: call recv() directly

Rémi Denis-Courmont git at videolan.org
Wed Oct 21 17:21:42 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 10 19:58:18 2015 +0300| [2e8cba3db74f8dbd3fb76f175ac83dba8ba93780] | committer: Jean-Baptiste Kempf

sap: call recv() directly

net_Read() is identical to recv() outside the input thread and if
waitall is false.

(cherry picked from commit f9c35694825e05d1f1da6f44d40d2554cb593aa4)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=2e8cba3db74f8dbd3fb76f175ac83dba8ba93780
---

 modules/services_discovery/sap.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index a044d4e..bc658f9 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -553,8 +553,7 @@ static void *Run( void *data )
                     uint8_t p_buffer[MAX_SAP_BUFFER+1];
                     ssize_t i_read;
 
-                    i_read = net_Read (p_sd, ufd[i].fd, NULL, p_buffer,
-                                       MAX_SAP_BUFFER, false);
+                    i_read = recv (ufd[i].fd, p_buffer, MAX_SAP_BUFFER, 0);
                     if (i_read < 0)
                         msg_Warn (p_sd, "receive error: %s",
                                   vlc_strerror_c(errno));



More information about the vlc-commits mailing list