X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Flcp.c;fp=pppd%2Flcp.c;h=d7ea47106376cc3e3a43a6c7d55ed40a137994c2;hp=902b64a565c21d11940c39cb0fe5e10cf911848f;hb=e7ee3ad1743d34cb6fdf0773e6a73e9d8bf15216;hpb=045169401601639b9163e1df00f868a0a49131ce diff --git a/pppd/lcp.c b/pppd/lcp.c index 902b64a..d7ea471 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -2339,12 +2339,10 @@ LcpSendEchoRequest (f) */ if (lcp_echo_adaptive) { static unsigned int last_pkts_in = 0; + struct pppd_stats cur_stats; - update_link_stats(f->unit); - link_stats_valid = 0; - - if (link_stats.pkts_in != last_pkts_in) { - last_pkts_in = link_stats.pkts_in; + if (get_ppp_stats(f->unit, &cur_stats) && cur_stats.pkts_in != last_pkts_in) { + last_pkts_in = cur_stats.pkts_in; return; } }