diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2014-09-01 15:14:36 +0600 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-09-13 11:01:47 +0400 |
commit | 16384eee09c257191445d4e0189ddf88393eb470 (patch) | |
tree | e9d417dfd19db0803ee05fe4996a2d0b598edfe8 /accel-pppd/ctrl/pptp/pptp.c | |
parent | 28da35fa4784f98854dbbe5d9e317bcafc16e8f0 (diff) | |
download | accel-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index f447aa7..f428afc 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) { |