diff options
author | TingPing <TingPing@users.noreply.github.com> | 2014-02-04 17:29:27 -0800 |
---|---|---|
committer | TingPing <TingPing@users.noreply.github.com> | 2014-02-04 17:29:27 -0800 |
commit | 29e01daeae94281d5c21aba01dae9123f6aa34d5 (patch) | |
tree | 9660121007954778aa804a78206c5b4b8445b33e /src/common/inbound.c | |
parent | 9f01950bcbc85f8b3960724b6df77c3e9c111601 (diff) | |
parent | 9969282c72f838004fe3d75f06db48072b0fbfeb (diff) |
Merge pull request #890 from orium/lagmeter-fixes
Lagmeter fixes
Diffstat (limited to 'src/common/inbound.c')
-rw-r--r-- | src/common/inbound.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c index d1c5b51a..47fe2e00 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -892,8 +892,8 @@ inbound_ping_reply (session *sess, char *timestring, char *from, if (lag) { sess->server->lag_sent = 0; - sess->server->lag = dif / 1000; - fe_set_lag (sess->server, dif / 100000); + sess->server->lag = dif; + fe_set_lag (sess->server, dif); return; } @@ -906,7 +906,7 @@ inbound_ping_reply (session *sess, char *timestring, char *from, tags_data->timestamp); } else { - snprintf (outbuf, sizeof (outbuf), "%ld.%ld%ld", dif / 1000000, (dif / 100000) % 10, dif % 10); + snprintf (outbuf, sizeof (outbuf), "%ld.%03ld", dif / 1000, dif % 1000); EMIT_SIGNAL_TIMESTAMP (XP_TE_PINGREP, sess, from, outbuf, NULL, NULL, 0, tags_data->timestamp); } |