Remove error log for reading classid from cgroup
[platform/core/connectivity/stc-manager.git] / src / helper / helper-net-cls.c
old mode 100644 (file)
new mode 100755 (executable)
index f9d59e6..3f460f7
@@ -80,7 +80,6 @@ static stc_error_e __get_classid_from_cgroup(const char *cgroup,
 
        int ret = cgroup_read_node_uint32(buf, CLASSID_FILE_NAME, classid);
        if (ret < 0) {
-               STC_LOGE("Can't read classid from cgroup %s", buf); //LCOV_EXCL_LINE
                *classid = STC_UNKNOWN_CLASSID;
                return STC_ERROR_NO_DATA;
        }
@@ -117,7 +116,7 @@ API uint32_t get_classid_by_app_id(const char *app_id, int create)
                return STC_UNKNOWN_CLASSID; //LCOV_EXCL_LINE
        }
 
-       if (!strcmp(app_id, STC_BACKGROUND_APP_ID))
+       if (!strcmp(app_id, STC_TOTAL_BACKGROUND))
                return STC_BACKGROUND_APP_CLASSID;
 
        if (!strcmp(app_id, STC_TOTAL_DATACALL))
@@ -190,9 +189,7 @@ stc_error_e place_pids_to_net_cgroup(const int pid, const char *app_id)
                return STC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       if (!strcmp(app_id, STC_BACKGROUND_APP_ID))
-               path_to_net_cgroup_dir = STC_CGROUP_NETWORK;
-       else if (strstr(app_id, STC_BACKGROUND_APP_SUFFIX))
+       if (strstr(app_id, STC_BACKGROUND_APP_SUFFIX))
                path_to_net_cgroup_dir = BACKGROUND_CGROUP_NETWORK;
        else if (strstr(app_id, STC_TETHERING_APP_SUFFIX))
                path_to_net_cgroup_dir = TETHERING_CGROUP_NETWORK;