summaryrefslogtreecommitdiff
path: root/accel-pptpd/radius
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-09-23 19:43:39 +0400
committerKozlov Dmitry <dima@server>2010-09-23 19:43:39 +0400
commit8681ad6d60565ca2e399156bf721f67f8a8bdc92 (patch)
treee736428b3d5dcfe52f65d9234b8ebc4ba17259cf /accel-pptpd/radius
parent82b0f0953159fc9ab8e387f5e6014dc377b14b38 (diff)
downloadaccel-ppp-8681ad6d60565ca2e399156bf721f67f8a8bdc92.tar.gz
accel-ppp-8681ad6d60565ca2e399156bf721f67f8a8bdc92.zip
various bug fixes
Diffstat (limited to 'accel-pptpd/radius')
-rw-r--r--accel-pptpd/radius/auth.c2
-rw-r--r--accel-pptpd/radius/dm_coa.c1
-rw-r--r--accel-pptpd/radius/req.c9
3 files changed, 7 insertions, 5 deletions
diff --git a/accel-pptpd/radius/auth.c b/accel-pptpd/radius/auth.c
index 46adbd7..ccb8fc0 100644
--- a/accel-pptpd/radius/auth.c
+++ b/accel-pptpd/radius/auth.c
@@ -70,7 +70,7 @@ static int rad_auth_send(struct rad_req_t *req)
else if (req->reply->code == CODE_ACCESS_ACCEPT) {
rad_proc_attrs(req);
return PWDB_SUCCESS;
- }
+}
out:
return PWDB_DENIED;
diff --git a/accel-pptpd/radius/dm_coa.c b/accel-pptpd/radius/dm_coa.c
index af7c0fe..32466bb 100644
--- a/accel-pptpd/radius/dm_coa.c
+++ b/accel-pptpd/radius/dm_coa.c
@@ -273,4 +273,5 @@ static void __init init(void)
triton_context_register(&serv.ctx, NULL);
triton_md_register_handler(&serv.ctx, &serv.hnd);
triton_md_enable_handler(&serv.hnd, MD_MODE_READ);
+ triton_context_wakeup(&serv.ctx);
}
diff --git a/accel-pptpd/radius/req.c b/accel-pptpd/radius/req.c
index cd4a31b..76b7ba3 100644
--- a/accel-pptpd/radius/req.c
+++ b/accel-pptpd/radius/req.c
@@ -4,6 +4,7 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
+#include <sched.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -217,12 +218,12 @@ int rad_req_wait(struct rad_req_t *req, int timeout)
req->ctx.fname=__FILE__;
req->ctx.line=__LINE__;
triton_md_register_handler(&req->ctx, &req->hnd);
- if (triton_md_enable_handler(&req->hnd, MD_MODE_READ))
- return -1;
+ triton_md_enable_handler(&req->hnd, MD_MODE_READ);
req->timeout.period = timeout * 1000;
- if (triton_timer_add(&req->ctx, &req->timeout, 0))
- return -1;
+ triton_timer_add(&req->ctx, &req->timeout, 0);
+
+ triton_context_wakeup(&req->ctx);
triton_context_schedule(req->rpd->ppp->ctrl->ctx);