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

Rémi Denis-Courmont git at videolan.org
Sun May 10 18:59:31 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 10 19:58:18 2015 +0300| [a06925a8b6aefc107c1e743f20176ec00d91a357] | committer: Rémi Denis-Courmont

audioscrobbler: call recv() directly

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

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

 modules/misc/audioscrobbler.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index 81e2a8b..e99e9b9 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -829,8 +829,9 @@ static void *Run(void *data)
             continue;
         }
 
-        i_net_ret = net_Read(p_intf, i_post_socket, NULL,
-                    p_buffer, sizeof(p_buffer) - 1, false);
+        /* FIXME: With TCP, you should never assume that a single read will
+         * return the entire response... */
+        i_net_ret = recv(i_post_socket, p_buffer, sizeof(p_buffer) - 1, 0);
         if (i_net_ret <= 0)
         {
             /* if we get no answer, something went wrong : try again */



More information about the vlc-commits mailing list