diff options
author | Kozlov Dmitry <dima@server> | 2010-10-14 11:28:17 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-10-14 11:28:17 +0400 |
commit | 763fe9e3ba0faeea25cc423152a065900f901a53 (patch) | |
tree | d3772cac139507699746461afc16a26e20065f21 /accel-pptpd/radius/req.c | |
parent | 80e8ec99aeffcec505165f099f68d0fb2903e12b (diff) | |
download | accel-ppp-763fe9e3ba0faeea25cc423152a065900f901a53.tar.gz accel-ppp-763fe9e3ba0faeea25cc423152a065900f901a53.zip |
various bug fixed and improvements
Diffstat (limited to 'accel-pptpd/radius/req.c')
-rw-r--r-- | accel-pptpd/radius/req.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/accel-pptpd/radius/req.c b/accel-pptpd/radius/req.c index f3f41386..5b1261fe 100644 --- a/accel-pptpd/radius/req.c +++ b/accel-pptpd/radius/req.c @@ -196,8 +196,22 @@ static void req_wakeup(struct rad_req_t *req) static int rad_req_read(struct triton_md_handler_t *h) { struct rad_req_t *req = container_of(h, typeof(*req), hnd); + struct rad_packet_t *pack; + int r; + + while (1) { + r = rad_packet_recv(h->fd, &pack, NULL); + + if (pack) { + if (req->reply) + rad_packet_free(req->reply); + req->reply = pack; + } + + if (r) + break; + } - req->reply = rad_packet_recv(h->fd, NULL); req_wakeup(req); return 0; |