Commit 9afe3151 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

adaptive: remove always true parameter to Socket::read()

parent 0c8ef543
......@@ -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);
......
......@@ -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;
......
......@@ -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 ();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment