summaryrefslogtreecommitdiff
path: root/src/counter.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-01-05 07:07:44 -0800
committerMarcel Holtmann <marcel@holtmann.org>2010-01-05 07:07:44 -0800
commit56050f8e365a6a581a54374b1baa08b72bee8611 (patch)
tree86fb61fca5192500d5b351897a1c02a52863cd2f /src/counter.c
parentf33303b557c1c12313c42372fdd173c4e69ddef0 (diff)
downloadconnman-56050f8e365a6a581a54374b1baa08b72bee8611.tar.gz
connman-56050f8e365a6a581a54374b1baa08b72bee8611.tar.bz2
connman-56050f8e365a6a581a54374b1baa08b72bee8611.zip
Only send updates if byte count actually changed
Diffstat (limited to 'src/counter.c')
-rw-r--r--src/counter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/counter.c b/src/counter.c
index 224d122e..31d463e2 100644
--- a/src/counter.c
+++ b/src/counter.c
@@ -164,6 +164,10 @@ void __connman_counter_notify(unsigned int rx_bytes, unsigned int tx_bytes)
while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
struct connman_counter *counter = value;
+ if (counter->rx_bytes == rx_bytes &&
+ counter->tx_bytes == tx_bytes)
+ continue;
+
counter->rx_bytes = rx_bytes;
counter->tx_bytes = tx_bytes;