* 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>
sifvjcomp(f->unit, 0, 0, 0);
print_link_stats(); /* _after_ running the notifiers and ip_down_hook(),
- * because print_link_stats() sets link_stats_valid
+ * because print_link_stats() sets link_stats_print
* to 0 (zero) */
/*
void
reset_link_stats(int u)
{
- if (!get_ppp_stats(u, &old_link_stats))
- return;
+ get_ppp_stats(u, &old_link_stats);
ppp_get_time(&start_time);
+ link_stats_print = 1;
}
/*