diff options
author | Kozlov Dmitry <dima@server> | 2010-09-10 11:58:34 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-10 11:58:34 +0400 |
commit | c471cd62571f654b92bad0bd9f431927758f4d45 (patch) | |
tree | 8f08d11522ae9b3d0e2c44d04746ca0f0e5ed22c /accel-pptpd/triton | |
parent | 35d38d2c3f3db22216d43604b8750ecb6089e525 (diff) | |
download | accel-ppp-xebd-c471cd62571f654b92bad0bd9f431927758f4d45.tar.gz accel-ppp-xebd-c471cd62571f654b92bad0bd9f431927758f4d45.zip |
ippool: implemented module ippool which gives IP address from configurable ranges
Diffstat (limited to 'accel-pptpd/triton')
-rw-r--r-- | accel-pptpd/triton/triton.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c index 4ecf0a8..742d493 100644 --- a/accel-pptpd/triton/triton.c +++ b/accel-pptpd/triton/triton.c @@ -261,6 +261,7 @@ void __export triton_context_wakeup(struct triton_context_t *ud) ctx->sleeping = 0; r = triton_queue_ctx(ctx); spin_unlock(&ctx->lock); + if (r) triton_thread_wakeup(ctx->thread); } @@ -269,6 +270,7 @@ int __export triton_context_call(struct triton_context_t *ud, void (*func)(void { struct _triton_context_t *ctx = (struct _triton_context_t *)ud->tpd; struct _triton_ctx_call_t *call = mempool_alloc(call_pool); + int r; if (!call) return -1; @@ -278,8 +280,12 @@ int __export triton_context_call(struct triton_context_t *ud, void (*func)(void spin_lock(&ctx->lock); list_add_tail(&call->entry, &ctx->pending_calls); + r = triton_queue_ctx(ctx); spin_unlock(&ctx->lock); + if (r) + triton_thread_wakeup(ctx->thread); + return 0; } |