Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
f944e018
Commit
f944e018
authored
Mar 16, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle EINTR and EAGAIN in babel_send.
parent
04699653
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
net.c
net.c
+15
-0
No files found.
net.c
View file @
f944e018
...
@@ -28,6 +28,8 @@ THE SOFTWARE.
...
@@ -28,6 +28,8 @@ THE SOFTWARE.
#include <netinet/in.h>
#include <netinet/in.h>
#include <errno.h>
#include <errno.h>
#include "babel.h"
#include "util.h"
#include "net.h"
#include "net.h"
int
int
...
@@ -126,6 +128,19 @@ babel_send(int s,
...
@@ -126,6 +128,19 @@ babel_send(int s,
msg
.
msg_namelen
=
slen
;
msg
.
msg_namelen
=
slen
;
msg
.
msg_iov
=
iovec
;
msg
.
msg_iov
=
iovec
;
msg
.
msg_iovlen
=
2
;
msg
.
msg_iovlen
=
2
;
again:
rc
=
sendmsg
(
s
,
&
msg
,
0
);
rc
=
sendmsg
(
s
,
&
msg
,
0
);
if
(
rc
<
0
)
{
if
(
errno
==
EINTR
)
goto
again
;
else
if
(
errno
==
EAGAIN
)
{
int
rc2
;
rc2
=
wait_for_fd
(
1
,
s
,
5
);
if
(
rc2
>
0
)
goto
again
;
errno
=
EAGAIN
;
}
}
return
rc
;
return
rc
;
}
}
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