summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pptp/pptp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/pptp/pptp.c')
-rw-r--r--accel-pppd/ctrl/pptp/pptp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c
index f447aa7a..f428afcf 100644
--- a/accel-pppd/ctrl/pptp/pptp.c
+++ b/accel-pppd/ctrl/pptp/pptp.c
@@ -116,9 +116,12 @@ static int post_msg(struct pptp_conn_t *conn, void *buf, int size)
return -1;
}
+again:
n=write(conn->hnd.fd, buf, size);
if (n < 0) {
- if (errno == EINTR || errno == EAGAIN)
+ if (errno == EINTR)
+ goto again;
+ else if (errno == EAGAIN)
n = 0;
else {
if (errno != EPIPE) {