summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ppp.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-09-20 12:18:49 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-09-20 12:18:49 +0400
commit62e89248160d3592c2d754fcaa15e37586a5b091 (patch)
treea6513cfd1e8ef6c6079ea2436e8573b122cc1ec6 /accel-pppd/ppp/ppp.c
parent0a58c20b44136c1fba996becea18696b3f67a1f9 (diff)
downloadaccel-ppp-62e89248160d3592c2d754fcaa15e37586a5b091.tar.gz
accel-ppp-62e89248160d3592c2d754fcaa15e37586a5b091.zip
rewrite of authentication/accounting procedures
This patch gets rid of synchronuos style of authentication/accounting. Synchronous style of authentication/accounting produced sleeping threads which becomes a problem when lots of sessions started/stopped and all they want authorization/accounting.
Diffstat (limited to 'accel-pppd/ppp/ppp.c')
-rw-r--r--accel-pppd/ppp/ppp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index 6e02480..fd57259 100644
--- a/accel-pppd/ppp/ppp.c
+++ b/accel-pppd/ppp/ppp.c
@@ -115,7 +115,7 @@ int __export establish_ppp(struct ppp_t *ppp)
log_ppp_error("open(unit) /dev/ppp: %s\n", strerror(errno));
goto exit_close_chan;
}
-
+
fcntl(ppp->unit_fd, F_SETFD, fcntl(ppp->unit_fd, F_GETFD) | FD_CLOEXEC);
ppp->ses.unit_idx = -1;
@@ -283,7 +283,7 @@ cont:
list_for_each_entry(ppp_h, &ppp->chan_handlers, entry) {
if (ppp_h->proto == proto) {
ppp_h->recv(ppp_h);
- if (ppp->chan_fd == -1) {
+ if (ppp->fd == -1) {
//ppp->ses.ctrl->finished(ppp);
return 1;
}
@@ -331,7 +331,7 @@ cont:
list_for_each_entry(ppp_h, &ppp->unit_handlers, entry) {
if (ppp_h->proto == proto) {
ppp_h->recv(ppp_h);
- if (ppp->unit_fd == -1) {
+ if (ppp->fd == -1) {
//ppp->ses.ctrl->finished(ppp);
return 1;
}