Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c0082a6a
Commit
c0082a6a
authored
Feb 10, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove arbitrary timer in net_Write()
parent
b1c5d1c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
src/network/io.c
src/network/io.c
+17
-15
No files found.
src/network/io.c
View file @
c0082a6a
...
@@ -392,30 +392,32 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
...
@@ -392,30 +392,32 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
const
uint8_t
*
p_data
,
size_t
i_data
)
const
uint8_t
*
p_data
,
size_t
i_data
)
{
{
size_t
i_total
=
0
;
size_t
i_total
=
0
;
struct
pollfd
ufd
[
2
]
=
{
{
.
fd
=
fd
,
.
events
=
POLLOUT
},
{
.
fd
=
vlc_object_waitpipe
(
p_this
),
.
events
=
POLLIN
},
};
if
(
ufd
[
1
].
fd
==
-
1
)
return
-
1
;
while
(
i_data
>
0
)
while
(
i_data
>
0
)
{
{
if
(
p_this
->
b_die
)
ssize_t
val
;
break
;
struct
pollfd
ufd
[
1
];
ufd
[
0
].
revents
=
ufd
[
1
].
revents
=
0
;
memset
(
ufd
,
0
,
sizeof
(
ufd
));
ufd
[
0
].
fd
=
fd
;
ufd
[
0
].
events
=
POLLOUT
;
int
val
=
poll
(
ufd
,
1
,
500
);
if
(
poll
(
ufd
,
1
,
-
1
)
==
-
1
)
switch
(
val
)
{
if
(
errno
!=
EINTR
)
{
{
case
-
1
:
msg_Err
(
p_this
,
"Write error: %m"
);
msg_Err
(
p_this
,
"Write error: %m"
);
goto
out
;
goto
out
;
}
case
0
:
continue
;
continue
;
}
}
if
((
ufd
[
0
].
revents
&
(
POLLERR
|
POLLNVAL
|
POLLHUP
))
&&
(
i_total
>
0
))
if
((
ufd
[
0
].
revents
&
(
POLLERR
|
POLLNVAL
|
POLLHUP
))
&&
(
i_total
>
0
))
return
i_total
;
// error will be dequeued separately on next call
break
;
// error will be dequeued separately on next call
if
(
p_vs
!=
NULL
)
if
(
p_vs
!=
NULL
)
val
=
p_vs
->
pf_send
(
p_vs
->
p_sys
,
p_data
,
i_data
);
val
=
p_vs
->
pf_send
(
p_vs
->
p_sys
,
p_data
,
i_data
);
...
...
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