Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
9afe3151
Commit
9afe3151
authored
May 12, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adaptive: remove always true parameter to Socket::read()
parent
0c8ef543
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
modules/demux/adaptative/http/HTTPConnection.cpp
modules/demux/adaptative/http/HTTPConnection.cpp
+1
-1
modules/demux/adaptative/http/Sockets.cpp
modules/demux/adaptative/http/Sockets.cpp
+5
-5
modules/demux/adaptative/http/Sockets.hpp
modules/demux/adaptative/http/Sockets.hpp
+2
-2
No files found.
modules/demux/adaptative/http/HTTPConnection.cpp
View file @
9afe3151
...
...
@@ -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
);
...
...
modules/demux/adaptative/http/Sockets.cpp
View file @
9afe3151
...
...
@@ -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
;
...
...
modules/demux/adaptative/http/Sockets.hpp
View file @
9afe3151
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment