]> git.ozlabs.org Git - ppp.git/commit
pppd: Fix reliability of print_link_stats (with option persist) (#505)
authorenometh <57609820+enometh@users.noreply.github.com>
Tue, 10 Sep 2024 10:12:35 +0000 (15:42 +0530)
committerGitHub <noreply@github.com>
Tue, 10 Sep 2024 10:12:35 +0000 (20:12 +1000)
commit9d8271036d7db5d6900ef16a39930d7ae13a3e15
treeec5aa8d4872fe0fa6d694baf326a4de225372c30
parent077141058aabdcea4ac11066eb18707be51d7989
pppd: Fix reliability of print_link_stats (with option persist) (#505)

* pppd/ipcp.c: (ipcp_down): fix comment
* pppd/main.c: (reset_link_stats): reset print_link_stats to 1, set
start_time even if get_ppp_stats fails.

This is an attempt to fix the problem noted in the linux-ppp mailing list on
mar-26-2024 and may-03-2024 under the subject "ppp-2.5.0 sometimes doesn't
print stats on terminating on signal 2"

The sent/recv log messages were being lost, especially with the persist option.
This seems to be an oversight during reorg in commit ba7f7e0 "Header file
reorganization and cleaning up the public API for pppd version 2.5.0 (#379)"
around the repurposing of the link_stats_valid variable as link_stats_print.

It also fixes a stray reference to the old variable in a comment.

Signed-off-by: S Madhu <enometh@meer.net>
pppd/ipcp.c
pppd/main.c