summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton/triton.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-11-25 22:29:10 +0300
committerDmitry Kozlov <xeb@mail.ru>2010-11-25 22:29:10 +0300
commit1cf19a1c76a8e13ee60a111fc6d64df3683cd3bc (patch)
treefa57c6d6417b59b74bcaab0631c757ef9602fc11 /accel-pptpd/triton/triton.c
parent194b2c29a31aafc59fb0e0fac90411aae2fcd9aa (diff)
downloadaccel-ppp-1cf19a1c76a8e13ee60a111fc6d64df3683cd3bc.tar.gz
accel-ppp-1cf19a1c76a8e13ee60a111fc6d64df3683cd3bc.zip
radius: fixed bug of double packet free when second DM request received in time when radius sends Accounting-Request Stop
Diffstat (limited to 'accel-pptpd/triton/triton.c')
-rw-r--r--accel-pptpd/triton/triton.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c
index b62d04f1..a628fe16 100644
--- a/accel-pptpd/triton/triton.c
+++ b/accel-pptpd/triton/triton.c
@@ -416,6 +416,21 @@ int __export triton_context_call(struct triton_context_t *ud, void (*func)(void
return 0;
}
+void __export triton_cancel_call(struct triton_context_t *ud, void (*func)(void *))
+{
+ struct _triton_context_t *ctx = (struct _triton_context_t *)ud->tpd;
+ struct list_head *pos, *n;
+ struct _triton_ctx_call_t *call;
+
+ list_for_each_safe(pos, n, &ctx->pending_calls) {
+ call = list_entry(pos, typeof(*call), entry);
+ if (call->func != func)
+ continue;
+ list_del(&call->entry);
+ mempool_free(call);
+ }
+}
+
int __export triton_init(const char *conf_file)
{
ctx_pool = mempool_create2(sizeof(struct _triton_context_t));