summaryrefslogtreecommitdiff
path: root/accel-pptpd
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-12-30 13:38:25 +0300
committerKozlov Dmitry <dima@server>2010-12-30 13:38:25 +0300
commitf7058be535637cc5cee39a9b1aa852461cfb66fd (patch)
tree6ca91796b07419e3835db5a15f96521c5bc0bb2c /accel-pptpd
parenta1124d71dafdea11c4869e2a45ff9c3e105e3592 (diff)
downloadaccel-ppp-f7058be535637cc5cee39a9b1aa852461cfb66fd.tar.gz
accel-ppp-f7058be535637cc5cee39a9b1aa852461cfb66fd.zip
pppd_compat: fixed bug
Diffstat (limited to 'accel-pptpd')
-rw-r--r--accel-pptpd/extra/pppd_compat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/accel-pptpd/extra/pppd_compat.c b/accel-pptpd/extra/pppd_compat.c
index f6e85b0..f897dd6 100644
--- a/accel-pptpd/extra/pppd_compat.c
+++ b/accel-pptpd/extra/pppd_compat.c
@@ -476,8 +476,7 @@ static void fill_env(char **env, struct pppd_compat_pd_t *pd)
{
snprintf(env[0], 64, "PEERNAME=%s", pd->ppp->username);
- if (pd->ppp->stop_time) {
-
+ if (pd->ppp->stop_time && env[1]) {
snprintf(env[1], 24, "CONNECT_TIME=%lu", pd->ppp->stop_time - pd->ppp->start_time);
snprintf(env[2], 24, "BYTES_SENT=%u", pd->bytes_sent);
snprintf(env[3], 24, "BYTES_RCVD=%u", pd->bytes_rcvd);