diff options
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-x | channels/chan_sip.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 16a836507..542a762ab 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8351,8 +8351,7 @@ static int handle_response_peerpoke(struct sip_pvt *p, int resp, char *rest, str int newstate = 0; peer = p->peerpoke; gettimeofday(&tv, NULL); - pingtime = (tv.tv_sec - peer->ps.tv_sec) * 1000 + - (tv.tv_usec - peer->ps.tv_usec) / 1000; + pingtime = ast_tvdiff_ms(tv, peer->ps); if (pingtime < 1) pingtime = 1; if ((peer->lastms < 0) || (peer->lastms > peer->maxms)) { |