diff options
author | Kozlov Dmitry <dima@server> | 2011-05-25 16:39:10 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-05-25 16:40:17 +0400 |
commit | a06c41c335789d7c3154422d3f60481e26feb1b0 (patch) | |
tree | 6b50cdc5dc2f3e137a5e9ef30bdab5a57efc632a /accel-pppd/radius | |
parent | 85b204590c8d2ed028405330ca67cbd8c6dd25f9 (diff) | |
download | accel-ppp-a06c41c335789d7c3154422d3f60481e26feb1b0.tar.gz accel-ppp-a06c41c335789d7c3154422d3f60481e26feb1b0.zip |
radius: fix incorrect reading acct-timeout option
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r-- | accel-pppd/radius/acct.c | 2 | ||||
-rw-r--r-- | accel-pppd/radius/radius.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c index 01e73af0..2c12d2a1 100644 --- a/accel-pppd/radius/acct.c +++ b/accel-pppd/radius/acct.c @@ -176,7 +176,7 @@ static void rad_acct_interim_update(struct triton_timer_t *t) rad_req_send(rpd->acct_req, conf_interim_verbose); __sync_add_and_fetch(&stat_interim_sent, 1); if (conf_acct_timeout) { - rpd->acct_req->timeout.period = conf_timeout * 1000; + rpd->acct_req->timeout.period = conf_acct_timeout * 1000; triton_timer_add(rpd->ppp->ctrl->ctx, &rpd->acct_req->timeout, 0); } } diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index edf3120e..1900e0fc 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -25,7 +25,7 @@ int conf_max_try = 3; int conf_timeout = 3; -int conf_acct_timeout = 600; +int conf_acct_timeout = 3; char *conf_nas_identifier; in_addr_t conf_nas_ip_address; in_addr_t conf_gw_ip_address; @@ -460,7 +460,7 @@ static int load_config(void) conf_timeout = atoi(opt); opt = conf_get_opt("radius", "acct-timeout"); - if (opt && atoi(opt) > 0) + if (opt && atoi(opt) >= 0) conf_acct_timeout = atoi(opt); opt = conf_get_opt("radius", "verbose"); |