diff options
author | Kozlov Dmitry <dima@server> | 2010-12-30 13:38:25 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-12-30 13:38:25 +0300 |
commit | f7058be535637cc5cee39a9b1aa852461cfb66fd (patch) | |
tree | 6ca91796b07419e3835db5a15f96521c5bc0bb2c | |
parent | a1124d71dafdea11c4869e2a45ff9c3e105e3592 (diff) | |
download | accel-ppp-f7058be535637cc5cee39a9b1aa852461cfb66fd.tar.gz accel-ppp-f7058be535637cc5cee39a9b1aa852461cfb66fd.zip |
pppd_compat: fixed bug
-rw-r--r-- | accel-pptpd/extra/pppd_compat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/accel-pptpd/extra/pppd_compat.c b/accel-pptpd/extra/pppd_compat.c index f6e85b02..f897dd68 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); |