Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
cpp-libs
libnice
Commits
de6e8a7e
Commit
de6e8a7e
authored
Oct 29, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
in tcp-turn, change all write/read into proper send/recv calls
parent
6039152c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
socket/tcp-turn.c
socket/tcp-turn.c
+8
-8
No files found.
socket/tcp-turn.c
View file @
de6e8a7e
...
...
@@ -94,8 +94,8 @@ socket_recv (
else
g_assert_not_reached
();
ret
=
re
ad
(
sock
->
fileno
,
priv
->
recv_buf
+
priv
->
recv_buf_len
,
headerlen
-
priv
->
recv_buf_len
);
ret
=
re
cv
(
sock
->
fileno
,
priv
->
recv_buf
+
priv
->
recv_buf_len
,
headerlen
-
priv
->
recv_buf_len
,
0
);
if
(
ret
<
0
)
{
#ifdef G_OS_WIN32
if
(
WSAGetLastError
()
==
WSAEWOULDBLOCK
)
...
...
@@ -136,8 +136,8 @@ socket_recv (
else
padlen
=
0
;
ret
=
re
ad
(
sock
->
fileno
,
priv
->
recv_buf
+
priv
->
recv_buf_len
,
priv
->
expecting_len
+
padlen
-
priv
->
recv_buf_len
);
ret
=
re
cv
(
sock
->
fileno
,
priv
->
recv_buf
+
priv
->
recv_buf_len
,
priv
->
expecting_len
+
padlen
-
priv
->
recv_buf_len
,
0
);
if
(
ret
<
0
)
{
#ifdef G_OS_WIN32
if
(
WSAGetLastError
()
==
WSAEWOULDBLOCK
)
...
...
@@ -189,7 +189,7 @@ socket_send_more (
while
((
tbs
=
g_queue_pop_head
(
&
priv
->
send_queue
)))
{
int
ret
;
ret
=
write
(
sock
->
fileno
,
tbs
->
buf
,
tbs
->
length
);
ret
=
send
(
sock
->
fileno
,
tbs
->
buf
,
tbs
->
length
,
0
);
if
(
ret
<
0
)
{
#ifdef G_OS_WIN32
...
...
@@ -272,7 +272,7 @@ socket_send (
if
(
g_queue_is_empty
(
&
priv
->
send_queue
))
{
if
(
priv
->
compatibility
==
NICE_UDP_TURN_SOCKET_COMPATIBILITY_GOOGLE
)
{
guint16
tmpbuf
=
htons
(
len
);
ret
=
write
(
sock
->
fileno
,
&
tmpbuf
,
sizeof
(
guint16
)
);
ret
=
send
(
sock
->
fileno
,
(
void
*
)
&
tmpbuf
,
sizeof
(
guint16
),
0
);
if
(
ret
<
0
)
{
#ifdef G_OS_WIN32
...
...
@@ -294,7 +294,7 @@ socket_send (
}
}
ret
=
write
(
sock
->
fileno
,
buf
,
len
);
ret
=
send
(
sock
->
fileno
,
buf
,
len
,
0
);
if
(
ret
<
0
)
{
#ifdef G_OS_WIN32
...
...
@@ -317,7 +317,7 @@ socket_send (
if
(
priv
->
compatibility
==
NICE_UDP_TURN_SOCKET_COMPATIBILITY_DRAFT9
&&
len
%
4
)
{
ret
=
write
(
sock
->
fileno
,
padbuf
,
padlen
);
ret
=
send
(
sock
->
fileno
,
padbuf
,
padlen
,
0
);
if
(
ret
<
0
)
{
#ifdef G_OS_WIN32
...
...
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