From cc18a525e78c128aa5e922392e55fa12b03edc3c Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Mon, 18 Nov 2019 17:34:54 +0900 Subject: [PATCH] Add log for getting statistics issue It will be removed after resolving the issue. Change-Id: I7d462081da58aeb41a7dc0ea6495510ec324f3b4 --- src/network-statistics.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network-statistics.c b/src/network-statistics.c index 44f181e..cc8f803 100755 --- a/src/network-statistics.c +++ b/src/network-statistics.c @@ -42,6 +42,7 @@ gboolean netconfig_wifi_get_bytes_statistics(guint64 *tx, guint64 *rx) *tx = 0; *rx = 0; + DBG("open /proc/net/dev file"); fp = fopen(NETCONFIG_PROCDEV, "r"); if (fp == NULL) { ERR("Failed to open %s", NETCONFIG_PROCDEV); @@ -130,14 +131,19 @@ static gboolean handle_get_wifi_total_rx_bytes( guint64 total_bytes = 0; int val = 0; + DBG("+"); netconfig_vconf_get_int(VCONFKEY_NETWORK_WIFI_PKT_TOTAL_RCV, &val); rx_bytes = (guint64)val; + DBG("got rx packet size from vconf [%lld]", rx_bytes); + if (netconfig_wifi_get_bytes_statistics(&tx, &rx) == TRUE) total_bytes = rx + rx_bytes; else total_bytes = rx_bytes; + DBG("wifi total rx bytes [%lld]", total_bytes); + network_statistics_complete_get_wifi_total_rx_bytes(object, context, total_bytes); return TRUE; } -- 2.7.4