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
1aa9ec3a
Commit
1aa9ec3a
authored
Sep 14, 2005
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/access_output/udp.c: Check send() return value.
parent
8d64e09b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
modules/access_output/udp.c
modules/access_output/udp.c
+21
-2
No files found.
modules/access_output/udp.c
View file @
1aa9ec3a
...
...
@@ -53,6 +53,17 @@
#define MAX_EMPTY_BLOCKS 200
#if defined(WIN32) || defined(UNDER_CE)
# define WINSOCK_STRERROR_SIZE 20
static
const
char
*
winsock_strerror
(
char
*
buf
)
{
snprintf
(
buf
,
WINSOCK_STRERROR_SIZE
,
"Winsock error %d"
,
WSAGetLastError
(
)
);
buf
[
WINSOCK_STRERROR_SIZE
-
1
]
=
'\0'
;
return
buf
;
}
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
@@ -528,6 +539,10 @@ static void ThreadWrite( vlc_object_t *p_this )
mtime_t
i_date_last
=
-
1
;
mtime_t
i_to_send
=
p_thread
->
i_group
;
int
i_dropped_packets
=
0
;
#if defined(WIN32) || defined(UNDER_CE)
char
strerror_buf
[
WINSOCK_STRERROR_SIZE
];
# define strerror( x ) winsock_strerror( strerror_buf )
#endif
while
(
!
p_thread
->
b_die
)
{
...
...
@@ -564,12 +579,16 @@ static void ThreadWrite( vlc_object_t *p_this )
}
i_to_send
--
;
if
(
!
i_to_send
||
(
p_pk
->
i_flags
&
BLOCK_FLAG_CLOCK
)
)
if
(
!
i_to_send
||
(
p_pk
->
i_flags
&
BLOCK_FLAG_CLOCK
)
)
{
mwait
(
i_date
);
i_to_send
=
p_thread
->
i_group
;
}
send
(
p_thread
->
i_handle
,
p_pk
->
p_buffer
,
p_pk
->
i_buffer
,
0
);
if
(
send
(
p_thread
->
i_handle
,
p_pk
->
p_buffer
,
p_pk
->
i_buffer
,
0
)
==
-
1
)
{
msg_Warn
(
p_thread
,
"send error: %s"
,
strerror
(
errno
)
);
}
if
(
i_dropped_packets
)
{
...
...
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