summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/serv.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-04 18:52:17 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-04 18:52:17 +0400
commit43a444fc65d917bf680831c0b942d682d933dc84 (patch)
treecc7c85b61e86f72795e4c3881199e3a96ddd0ca6 /accel-pppd/radius/serv.c
parentcc301ec08bf329968cea8fab8a5d7c4b05a1870b (diff)
downloadaccel-ppp-xebd-43a444fc65d917bf680831c0b942d682d933dc84.tar.gz
accel-ppp-xebd-43a444fc65d917bf680831c0b942d682d933dc84.zip
radius: various bug fixes
Diffstat (limited to 'accel-pppd/radius/serv.c')
-rw-r--r--accel-pppd/radius/serv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/accel-pppd/radius/serv.c b/accel-pppd/radius/serv.c
index 441936c..664c11d 100644
--- a/accel-pppd/radius/serv.c
+++ b/accel-pppd/radius/serv.c
@@ -104,7 +104,10 @@ static void req_wakeup(struct rad_req_t *req)
{
struct timespec ts;
- log_ppp_debug("radius(%i): wakeup %i\n", req->serv->id, req->active);
+ if (!req->rpd)
+ log_switch(triton_context_self(), NULL);
+
+ log_ppp_debug("radius(%i): wakeup %p %i\n", req->serv->id, req, req->active);
if (!req->active)
return;
@@ -128,7 +131,7 @@ static void req_wakeup(struct rad_req_t *req)
req->send(req, 1);
}
-int rad_server_req_cancel(struct rad_req_t *req)
+int rad_server_req_cancel(struct rad_req_t *req, int full)
{
int r = 0;
@@ -140,6 +143,11 @@ int rad_server_req_cancel(struct rad_req_t *req)
}
pthread_mutex_unlock(&req->serv->lock);
+ triton_cancel_call(req->rpd ? req->rpd->ses->ctrl->ctx : NULL, (triton_event_func)req_wakeup);
+
+ if (!full)
+ return r;
+
if (req->active)
rad_server_req_exit(req);