Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e5ca059b
Commit
e5ca059b
authored
Oct 19, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify EOF handling
parent
8c1e99ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
src/network/io.c
src/network/io.c
+3
-14
No files found.
src/network/io.c
View file @
e5ca059b
...
@@ -134,9 +134,6 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
...
@@ -134,9 +134,6 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
int
wait_ms
,
vlc_bool_t
waitall
)
int
wait_ms
,
vlc_bool_t
waitall
)
{
{
size_t
i_total
=
0
;
size_t
i_total
=
0
;
int
eof
[
fdc
];
unsigned
int
i_eof
=
0
;
memset
(
eof
,
0
,
sizeof
(
eof
)
);
do
do
{
{
...
@@ -152,9 +149,6 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
...
@@ -152,9 +149,6 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
if
(
i_buflen
==
0
)
if
(
i_buflen
==
0
)
return
i_total
;
// output buffer full
return
i_total
;
// output buffer full
if
(
i_eof
==
fdc
)
return
i_total
;
// all sockets are at EOF
delay_ms
=
500
;
delay_ms
=
500
;
if
(
(
wait_ms
!=
-
1
)
&&
(
wait_ms
<
500
)
)
if
(
(
wait_ms
!=
-
1
)
&&
(
wait_ms
<
500
)
)
delay_ms
=
wait_ms
;
delay_ms
=
wait_ms
;
...
@@ -271,18 +265,13 @@ receive:
...
@@ -271,18 +265,13 @@ receive:
goto
error
;
goto
error
;
}
}
if
(
n
==
0
)
// EOF
return
i_total
;
i_total
+=
n
;
i_total
+=
n
;
p_buf
+=
n
;
p_buf
+=
n
;
i_buflen
-=
n
;
i_buflen
-=
n
;
if
(
n
==
0
)
// EOF on socket
{
unsigned
int
j
;
for
(
j
=
0
;
j
<
i_eof
;
j
++
)
if
(
eof
[
j
]
==
*
fdv
)
goto
end
;
eof
[
i_eof
++
]
=
*
fdv
;
}
end:
if
(
wait_ms
==
-
1
)
if
(
wait_ms
==
-
1
)
{
{
if
(
!
waitall
)
if
(
!
waitall
)
...
...
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