FREE(key);
}
+/*
//LCOV_EXCL_START
static gboolean __processes_tree_foreach_print(gpointer key, gpointer value,
gpointer data)
g_tree_foreach(g_system->apps, __apps_tree_foreach_print, NULL);
}
//LCOV_EXCL_STOP
+*/
static gboolean __apps_tree_foreach_remove_pid(gpointer key, gpointer value,
gpointer data)
remove_pid_context_s *context = (remove_pid_context_s *)data;
stc_app_value_s *app_value = (stc_app_value_s *)value;
- if (!g_tree_remove(app_value->processes, context->proc_key)) {
- if (STC_DEBUG_LOG)
- STC_LOGD("key not found"); //LCOV_EXCL_LINE
+ if (!g_tree_remove(app_value->processes, context->proc_key))
return FALSE;
- }
context->entry_removed = TRUE;
context->app_key = (stc_app_key_s *)key;
app_value->counter.in_bytes = context->bytes;
g_system->apps_tree_updated = TRUE;
- if (STC_DEBUG_LOG)
- __apps_tree_foreach_print(app_key, app_value, NULL); //LCOV_EXCL_LINE
+ /*
+ __apps_tree_foreach_print(app_key, app_value, NULL); //LCOV_EXCL_LINE
+ */
break;
case NFACCT_COUNTER_OUT:
app_value->data_usage.out_bytes += context->bytes;
app_value->counter.out_bytes = context->bytes;
g_system->apps_tree_updated = TRUE;
- if (STC_DEBUG_LOG)
- __apps_tree_foreach_print(app_key, app_value, NULL); //LCOV_EXCL_LINE
+ /*
+ __apps_tree_foreach_print(app_key, app_value, NULL); //LCOV_EXCL_LINE
+ */
break;
default:
STC_LOGE("unknown iotype"); //LCOV_EXCL_LINE
return; //LCOV_EXCL_LINE
}
- STC_LOGI("classid %u, iftype %u, iotype %d, intend %d, ifname %s, bytes %lld",
- context.counter->classid, context.counter->iftype,
- context.counter->iotype, context.counter->intend,
- context.counter->ifname, context.bytes);
+ if (STC_DEBUG_LOG)
+ STC_LOGI("classid %u, iftype %u, iotype %d, intend %d, ifname %s, bytes %lld",
+ context.counter->classid, context.counter->iftype,
+ context.counter->iotype, context.counter->intend,
+ context.counter->ifname, context.bytes);
if (g_system->rstns)
g_tree_foreach(g_system->rstns,
return TRUE;
}
+/*
//LCOV_EXCL_START
static gboolean __rstn_tree_foreach_print(gpointer key, gpointer value,
gpointer data)
{
g_tree_foreach(g_system->rstns, __rstn_tree_foreach_print, NULL);
}
-//LCOV_EXCL_END
+//LCOV_EXCL_STOP
+*/
static stc_rstn_value_s * __rstn_lookup(GTree *rstns_tree,
const stc_rstn_key_s *key)
{
table_restrictions_foreach(__insert_restriction_cb, NULL);
- if (STC_DEBUG_LOG)
- __rstn_tree_printall();
+ /* __rstn_tree_printall(); */
}
static gboolean __add_rstn_foreach_application(gpointer key,
lookup = __application_lookup(g_system->apps, &app_key);
if (lookup) {
- STC_LOGD("app_key already present"); //LCOV_EXCL_LINE
+ if (STC_DEBUG_LOG)
+ STC_LOGD("app_key already present"); //LCOV_EXCL_LINE
return STC_ERROR_NONE; //LCOV_EXCL_LINE
}
app_lookup = __application_lookup(g_system->apps, &app_key);
if (!app_lookup) {
- STC_LOGD("app_key not found"); //LCOV_EXCL_LINE
+ if (STC_DEBUG_LOG)
+ STC_LOGD("app_key not found"); //LCOV_EXCL_LINE
return STC_ERROR_FAIL; //LCOV_EXCL_LINE
}
proc_lookup = __process_lookup(app_lookup->processes, &proc_key);
if (proc_lookup) {
- STC_LOGD("proc_key already present"); //LCOV_EXCL_LINE
+ if (STC_DEBUG_LOG)
+ STC_LOGD("proc_key already present"); //LCOV_EXCL_LINE
return STC_ERROR_NONE; //LCOV_EXCL_LINE
}
/* add pid to application cgroup */
place_pids_to_net_cgroup(proc_key.pid, app_key.app_id);
- if (STC_DEBUG_LOG)
- __apps_tree_printall(); //LCOV_EXCL_LINE
+ /*
+ __apps_tree_printall(); //LCOV_EXCL_LINE
+ */
return ret;
}
if (context.entry_removed)
__application_remove_if_empty(context.app_key);
- if (STC_DEBUG_LOG)
- __apps_tree_printall(); //LCOV_EXCL_LINE
+ /*
+ __apps_tree_printall(); //LCOV_EXCL_LINE
+ */
return ret;
}