diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-11-25 22:29:10 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-11-25 22:29:10 +0300 |
commit | 1cf19a1c76a8e13ee60a111fc6d64df3683cd3bc (patch) | |
tree | fa57c6d6417b59b74bcaab0631c757ef9602fc11 /accel-pptpd/triton/triton.c | |
parent | 194b2c29a31aafc59fb0e0fac90411aae2fcd9aa (diff) | |
download | accel-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.c | 15 |
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)); |