summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp/ppp_fsm.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-09-11 14:27:27 +0400
committerKozlov Dmitry <dima@server>2010-09-11 14:27:27 +0400
commit417ef849f1adcb3b655fbb2382e126b0b17aabbe (patch)
tree560cba379463fc8e912c7f73b54676b7c1582062 /accel-pptpd/ppp/ppp_fsm.c
parentd0c060a39d3bf6f675666a1400b533511e24a26c (diff)
downloadaccel-ppp-417ef849f1adcb3b655fbb2382e126b0b17aabbe.tar.gz
accel-ppp-417ef849f1adcb3b655fbb2382e126b0b17aabbe.zip
log: implemented extensible loggin engine with per-session logging support
log: implemented log_file logging target with per-user/per-session support
Diffstat (limited to 'accel-pptpd/ppp/ppp_fsm.c')
-rw-r--r--accel-pptpd/ppp/ppp_fsm.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/accel-pptpd/ppp/ppp_fsm.c b/accel-pptpd/ppp/ppp_fsm.c
index a99453f..20fe8ff 100644
--- a/accel-pptpd/ppp/ppp_fsm.c
+++ b/accel-pptpd/ppp/ppp_fsm.c
@@ -466,7 +466,7 @@ void send_term_req(struct ppp_fsm_t *layer)
.len = htons(4),
};
- log_debug("send [LCP TermReq id=%i \"\"]\n",hdr.id);
+ log_ppp_debug("send [LCP TermReq id=%i \"\"]\n",hdr.id);
--layer->restart_counter;
ppp_chan_send(layer->ppp, &hdr, 6);
@@ -480,27 +480,23 @@ void send_term_ack(struct ppp_fsm_t *layer)
.len = htons(4),
};
- log_debug("send [LCP TermAck id=%i \"\"]\n", hdr.id);
+ log_ppp_debug("send [LCP TermAck id=%i \"\"]\n", hdr.id);
ppp_chan_send(layer->ppp, &hdr, 6);
}
static void stop_timer(struct ppp_fsm_t *fsm)
{
- if (fsm->restart_timer.period) {
- fsm->restart_timer.period = 0;
+ if (fsm->restart_timer.tpd)
triton_timer_del(&fsm->restart_timer);
- }
}
static void init_req_counter(struct ppp_fsm_t *layer,int timeout)
{
layer->restart_timer.expire_tv.tv_sec=0;
layer->restart_counter = timeout;
- if (!layer->restart_timer.period) {
- layer->restart_timer.period = layer->timeout * 1000;
+ if (!layer->restart_timer.tpd)
triton_timer_add(layer->ppp->ctrl->ctx, &layer->restart_timer, 0);
- }
}
static void zero_req_counter(struct ppp_fsm_t *layer)
{