Add connection type counter at default connection change 81/177781/2
authorNishant Chaprana <n.chaprana@samsung.com>
Thu, 3 May 2018 14:41:15 +0000 (20:11 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Fri, 11 May 2018 15:16:11 +0000 (20:46 +0530)
Change-Id: I48a1049187c7a548e8d7a759271ed628e7242366
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/stc-manager.spec
src/monitor/stc-monitor.c

index 7eebba3..0c2ded7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.45
+Version:    0.0.46
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index c1ba238..2d35bd9 100644 (file)
@@ -380,9 +380,12 @@ static gboolean __add_application_monitor(gpointer key, gpointer value,
        default_connection_s *connection = (default_connection_s *)data;
        stc_s *stc = stc_get_manager();
 
-       if (app_value->classid == STC_TOTAL_DATACALL_CLASSID ||
-           app_value->classid == STC_TOTAL_WIFI_CLASSID ||
-           app_value->classid == STC_TOTAL_BLUETOOTH_CLASSID)
+       if ((app_value->classid == STC_TOTAL_DATACALL_CLASSID &&
+            connection->type != STC_IFACE_DATACALL) ||
+           (app_value->classid == STC_TOTAL_WIFI_CLASSID &&
+            connection->type != STC_IFACE_WIFI) ||
+           (app_value->classid == STC_TOTAL_BLUETOOTH_CLASSID &&
+            connection->type != STC_IFACE_BLUETOOTH))
                return FALSE;
 
        if (stc && connection && connection->ifname) {