Add log for getting statistics issue 83/217983/2 submit/tizen_5.5/20191118.102623
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 18 Nov 2019 08:34:54 +0000 (17:34 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 18 Nov 2019 09:05:56 +0000 (18:05 +0900)
It will be removed after resolving the issue.

Change-Id: I7d462081da58aeb41a7dc0ea6495510ec324f3b4

src/network-statistics.c

index 44f181e..cc8f803 100755 (executable)
@@ -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;
 }