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
e5896809
Commit
e5896809
authored
Feb 10, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Really (I swear) implement the waitpipe in net_write
parent
55153f42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
src/network/io.c
src/network/io.c
+13
-3
No files found.
src/network/io.c
View file @
e5896809
...
@@ -284,7 +284,7 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
...
@@ -284,7 +284,7 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
if
(
poll
(
ufd
,
sizeof
(
ufd
)
/
sizeof
(
ufd
[
0
]),
-
1
)
<
0
)
if
(
poll
(
ufd
,
sizeof
(
ufd
)
/
sizeof
(
ufd
[
0
]),
-
1
)
<
0
)
{
{
if
(
errno
=!
EINTR
)
if
(
errno
!=
EINTR
)
goto
error
;
goto
error
;
continue
;
continue
;
}
}
...
@@ -306,6 +306,7 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
...
@@ -306,6 +306,7 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
{
{
if
(
ufd
[
1
].
revents
)
if
(
ufd
[
1
].
revents
)
{
{
assert
(
p_this
->
b_die
);
msg_Dbg
(
p_this
,
"socket %d polling interrupted"
,
fd
);
msg_Dbg
(
p_this
,
"socket %d polling interrupted"
,
fd
);
#if defined(WIN32) || defined(UNDER_CE)
#if defined(WIN32) || defined(UNDER_CE)
WSASetLastError
(
WSAEINTR
);
WSASetLastError
(
WSAEINTR
);
...
@@ -411,7 +412,7 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
...
@@ -411,7 +412,7 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
if
(
errno
!=
EINTR
)
if
(
errno
!=
EINTR
)
{
{
msg_Err
(
p_this
,
"Write error: %m"
);
msg_Err
(
p_this
,
"Write error: %m"
);
goto
out
;
goto
error
;
}
}
continue
;
continue
;
}
}
...
@@ -424,6 +425,15 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
...
@@ -424,6 +425,15 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
if
(
ufd
[
1
].
revents
)
if
(
ufd
[
1
].
revents
)
break
;
break
;
}
}
else
{
if
(
ufd
[
1
].
revents
)
{
assert
(
p_this
->
b_die
);
errno
=
EINTR
;
goto
error
;
}
}
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
);
...
@@ -445,10 +455,10 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
...
@@ -445,10 +455,10 @@ ssize_t __net_Write( vlc_object_t *p_this, int fd, const v_socket_t *p_vs,
i_total
+=
val
;
i_total
+=
val
;
}
}
out:
if
((
i_total
>
0
)
||
(
i_data
==
0
))
if
((
i_total
>
0
)
||
(
i_data
==
0
))
return
i_total
;
return
i_total
;
error:
return
-
1
;
return
-
1
;
}
}
...
...
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