summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton/triton.c
diff options
context:
space:
mode:
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));