summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pptp/pptp.c
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2014-09-01 15:14:36 +0600
committerDmitry Kozlov <xeb@mail.ru>2014-09-13 11:01:47 +0400
commit16384eee09c257191445d4e0189ddf88393eb470 (patch)
treee9d417dfd19db0803ee05fe4996a2d0b598edfe8 /accel-pppd/ctrl/pptp/pptp.c
parent28da35fa4784f98854dbbe5d9e317bcafc16e8f0 (diff)
downloadaccel-ppp-16384eee09c257191445d4e0189ddf88393eb470.tar.gz
accel-ppp-16384eee09c257191445d4e0189ddf88393eb470.zip
pptp: don't delay control connection msg on EINTR
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) {