[vlc-commits] adaptive: remove always true parameter to Socket::read()
Rémi Denis-Courmont
git at videolan.org
Tue May 12 21:23:08 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 12 22:19:27 2015 +0300| [9afe3151742bfff7d8b1388e11e46092825196fc] | committer: Rémi Denis-Courmont
adaptive: remove always true parameter to Socket::read()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9afe3151742bfff7d8b1388e11e46092825196fc
---
modules/demux/adaptative/http/HTTPConnection.cpp | 2 +-
modules/demux/adaptative/http/Sockets.cpp | 10 +++++-----
modules/demux/adaptative/http/Sockets.hpp | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/demux/adaptative/http/HTTPConnection.cpp b/modules/demux/adaptative/http/HTTPConnection.cpp
index 11b6715..d1417ff 100644
--- a/modules/demux/adaptative/http/HTTPConnection.cpp
+++ b/modules/demux/adaptative/http/HTTPConnection.cpp
@@ -132,7 +132,7 @@ ssize_t HTTPConnection::read(void *p_buffer, size_t len)
if(len > chunk->getBytesToRead())
len = chunk->getBytesToRead();
- ssize_t ret = socket->read(stream, p_buffer, len, true);
+ ssize_t ret = socket->read(stream, p_buffer, len);
if(ret >= 0)
chunk->setBytesRead(chunk->getBytesRead() + ret);
diff --git a/modules/demux/adaptative/http/Sockets.cpp b/modules/demux/adaptative/http/Sockets.cpp
index 9d049a0..00d67ea 100644
--- a/modules/demux/adaptative/http/Sockets.cpp
+++ b/modules/demux/adaptative/http/Sockets.cpp
@@ -58,12 +58,12 @@ void Socket::disconnect()
}
}
-ssize_t Socket::read(vlc_object_t *stream, void *p_buffer, size_t len, bool retry)
+ssize_t Socket::read(vlc_object_t *stream, void *p_buffer, size_t len)
{
ssize_t size;
do
{
- size = net_Read(stream, netfd, NULL, p_buffer, len, retry);
+ size = net_Read(stream, netfd, NULL, p_buffer, len, true);
} while (size < 0 && (errno == EINTR || errno==EAGAIN) );
return size;
}
@@ -135,7 +135,7 @@ bool TLSSocket::connected() const
return Socket::connected() && tls;
}
-ssize_t TLSSocket::read(vlc_object_t *, void *p_buffer, size_t len, bool)
+ssize_t TLSSocket::read(vlc_object_t *, void *p_buffer, size_t len)
{
ssize_t size;
size_t totalread = 0;
@@ -159,7 +159,7 @@ std::string TLSSocket::readline(vlc_object_t *stream)
std::string ret;
ret.reserve(256);
char c[2] = {0,0};
- ssize_t size = TLSSocket::read(stream, c, 1, true);
+ ssize_t size = TLSSocket::read(stream, c, 1);
while(size > 0)
{
@@ -167,7 +167,7 @@ std::string TLSSocket::readline(vlc_object_t *stream)
if(c[0] == '\n')
break;
- size = TLSSocket::read(stream, c, 1, true);
+ size = TLSSocket::read(stream, c, 1);
}
return ret;
diff --git a/modules/demux/adaptative/http/Sockets.hpp b/modules/demux/adaptative/http/Sockets.hpp
index e8161ae..c08263b 100644
--- a/modules/demux/adaptative/http/Sockets.hpp
+++ b/modules/demux/adaptative/http/Sockets.hpp
@@ -40,7 +40,7 @@ namespace adaptative
virtual bool connect (vlc_object_t *, const std::string&, int port = 80);
virtual bool connected () const;
virtual bool send (vlc_object_t *, const void *buf, size_t size);
- virtual ssize_t read (vlc_object_t *, void *p_buffer, size_t len, bool);
+ virtual ssize_t read (vlc_object_t *, void *p_buffer, size_t len);
virtual std::string readline(vlc_object_t *);
virtual void disconnect ();
@@ -56,7 +56,7 @@ namespace adaptative
virtual bool connect (vlc_object_t *, const std::string&, int port = 443);
virtual bool connected () const;
virtual bool send (vlc_object_t *, const void *buf, size_t size);
- virtual ssize_t read (vlc_object_t *, void *p_buffer, size_t len, bool);
+ virtual ssize_t read (vlc_object_t *, void *p_buffer, size_t len);
virtual std::string readline(vlc_object_t *);
virtual void disconnect ();
More information about the vlc-commits
mailing list