X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Frp-pppoe%2Fdiscovery.c;h=a4e4cec93ce1c21ebd8841813b6ee33cdc67d13f;hb=b1fcf16fa66159f380ee4abd7c9a76b59809dc7b;hp=2aebcd1c13ac1205511e32bade4d9d22442668b7;hpb=8e77984ac5d7acbe68b2b2f590abd17564c9730d;p=ppp.git diff --git a/pppd/plugins/rp-pppoe/discovery.c b/pppd/plugins/rp-pppoe/discovery.c index 2aebcd1..a4e4cec 100644 --- a/pppd/plugins/rp-pppoe/discovery.c +++ b/pppd/plugins/rp-pppoe/discovery.c @@ -45,8 +45,8 @@ static int time_left(struct timeval *diff, struct timeval *exp) { struct timeval now; - if (gettimeofday(&now, NULL) < 0) { - error("gettimeofday: %m"); + if (get_time(&now) < 0) { + error("get_time: %m"); return 0; } @@ -353,8 +353,8 @@ waitForPADO(PPPoEConnection *conn, int timeout) conn->seenMaxPayload = 0; conn->error = 0; - if (gettimeofday(&expire_at, NULL) < 0) { - error("gettimeofday (waitForPADO): %m"); + if (get_time(&expire_at) < 0) { + error("get_time (waitForPADO): %m"); return; } expire_at.tv_sec += timeout; @@ -533,8 +533,8 @@ waitForPADS(PPPoEConnection *conn, int timeout) PPPoEPacket packet; int len; - if (gettimeofday(&expire_at, NULL) < 0) { - error("gettimeofday (waitForPADS): %m"); + if (get_time(&expire_at) < 0) { + error("get_time (waitForPADS): %m"); return; } expire_at.tv_sec += timeout;