summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-12-29 19:09:45 +0300
committerKozlov Dmitry <dima@server>2010-12-29 19:09:45 +0300
commita1124d71dafdea11c4869e2a45ff9c3e105e3592 (patch)
treea3be7e8cdbf30941a3347a367495be384be77735 /accel-pptpd/triton
parent1be76a6d12ea1c0052ad3b57c31151543f67e7cd (diff)
downloadaccel-ppp-a1124d71dafdea11c4869e2a45ff9c3e105e3592.tar.gz
accel-ppp-a1124d71dafdea11c4869e2a45ff9c3e105e3592.zip
fix statistics calculation
Diffstat (limited to 'accel-pptpd/triton')
-rw-r--r--accel-pptpd/triton/md.c4
-rw-r--r--accel-pptpd/triton/timer.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/accel-pptpd/triton/md.c b/accel-pptpd/triton/md.c
index d845389..84073d0 100644
--- a/accel-pptpd/triton/md.c
+++ b/accel-pptpd/triton/md.c
@@ -140,8 +140,10 @@ void __export triton_md_unregister_handler(struct triton_md_handler_t *ud)
spin_lock(&h->ctx->lock);
h->ud = NULL;
list_del(&h->entry);
- if (h->pending)
+ if (h->pending) {
list_del(&h->entry2);
+ __sync_sub_and_fetch(&triton_stat.md_handler_pending, 1);
+ }
spin_unlock(&h->ctx->lock);
sched_yield();
diff --git a/accel-pptpd/triton/timer.c b/accel-pptpd/triton/timer.c
index 4e37754..7d11730 100644
--- a/accel-pptpd/triton/timer.c
+++ b/accel-pptpd/triton/timer.c
@@ -202,8 +202,10 @@ void __export triton_timer_del(struct triton_timer_t *ud)
spin_lock(&t->ctx->lock);
t->ud = NULL;
list_del(&t->entry);
- if (t->pending)
+ if (t->pending) {
list_del(&t->entry2);
+ __sync_sub_and_fetch(&triton_stat.timer_pending, 1);
+ }
spin_unlock(&t->ctx->lock);
sched_yield();