Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
ortp
Commits
37c60a63
Commit
37c60a63
authored
Jan 06, 2011
by
jehan
Browse files
some buggy net driver returns -1 with no errno
parent
d4c36bf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/rtpsession_inet.c
src/rtpsession_inet.c
+7
-5
No files found.
src/rtpsession_inet.c
View file @
37c60a63
...
...
@@ -997,17 +997,18 @@ rtp_session_rtp_recv (RtpSession * session, uint32_t user_ts)
else
{
int
errnum
=
getSocketErrorCode
();
if
(
error
==
0
){
if
(
error
==
0
||
(
error
==
-
1
&&
errnum
==
0
)
){
/*0 can be returned by RtpTransport functions in case of EWOULDBLOCK*/
/*we ignore it*/
/*ortp_warning
("rtp_recv: strange... recv() returned zero.");*/
/*(error == -1 && errnum==0) for buggy drivers*/
}
else
if
(
!
is_would_block_error
(
errnum
))
{
if
(
session
->
on_network_error
.
count
>
0
){
rtp_signal_table_emit3
(
&
session
->
on_network_error
,(
long
)
"Error receiving RTP packet"
,
INT_TO_POINTER
(
getSocketErrorCode
()));
}
else
ortp_warning
(
"Error receiving RTP packet: %s
.
"
,
getSocketError
());
}
else
ortp_warning
(
"Error receiving RTP packet: %s
, err num [%i],error [%i]
"
,
getSocketError
()
,
errnum
,
error
);
}
/* don't free the cached_mp, it will be reused next time */
return
-
1
;
/* avoids an infinite loop ! */
...
...
@@ -1085,10 +1086,11 @@ rtp_session_rtcp_recv (RtpSession * session)
{
int
errnum
=
getSocketErrorCode
();
if
(
error
==
0
)
if
(
error
==
0
||
(
error
=-
1
&&
errnum
==
0
)
)
{
ortp_warning
(
"rtcp_recv: strange... recv() returned zero."
);
/*ortp_warning
("rtcp_recv: strange... recv() returned zero.");*/
/*(error == -1 && errnum==0) for buggy drivers*/
}
else
if
(
!
is_would_block_error
(
errnum
))
{
...
...
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