Change-Id: I4ed552ae7de2d691a26239c3390fde62f2a0d40f
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Name: stc-manager
Summary: STC(Smart Traffic Control) manager
Name: stc-manager
Summary: STC(Smart Traffic Control) manager
Release: 0
Group: Network & Connectivity/Other
License: Apache-2.0
Release: 0
Group: Network & Connectivity/Other
License: Apache-2.0
if (sock == -1) {
__STC_LOG_FUNC_EXIT__;
if (sock == -1) {
__STC_LOG_FUNC_EXIT__;
+ return STC_ERROR_INVALID_PARAMETER;
}
memset(&msg, 0, sizeof(nl_connector_msg_s));
}
memset(&msg, 0, sizeof(nl_connector_msg_s));
if (ret == -1) {
STC_LOGE("Error sending netlink connector message");
__STC_LOG_FUNC_EXIT__;
if (ret == -1) {
STC_LOGE("Error sending netlink connector message");
__STC_LOG_FUNC_EXIT__;
}
static int __unsubscribe_proc_events(void)
}
static int __unsubscribe_proc_events(void)
if (sock == -1) {
__STC_LOG_FUNC_EXIT__;
if (sock == -1) {
__STC_LOG_FUNC_EXIT__;
+ return STC_ERROR_INVALID_PARAMETER;
}
memset(&msg, 0, sizeof(nl_connector_msg_s));
}
memset(&msg, 0, sizeof(nl_connector_msg_s));
if (ret == -1) {
STC_LOGE("Error sending netlink connector message");
__STC_LOG_FUNC_EXIT__;
if (ret == -1) {
STC_LOGE("Error sending netlink connector message");
__STC_LOG_FUNC_EXIT__;
}
static bool __process_pid_cb(pid_t pid, void *user_data)
}
static bool __process_pid_cb(pid_t pid, void *user_data)
int stc_plugin_procfs_initialize(void)
{
__STC_LOG_FUNC_ENTER__;
int stc_plugin_procfs_initialize(void)
{
__STC_LOG_FUNC_ENTER__;
+ int ret = STC_ERROR_NONE;
proc_tree = g_tree_new_full(__proc_tree_key_compare, NULL,
__proc_tree_key_free,
proc_tree = g_tree_new_full(__proc_tree_key_compare, NULL,
__proc_tree_key_free,
/* TODO: Fill proc tree with current procfs state */
__open_nl_connector_sock();
/* TODO: Fill proc tree with current procfs state */
__open_nl_connector_sock();
- __subscribe_proc_events();
+ ret = __subscribe_proc_events();
+
}
int stc_plugin_procfs_deinitialize(void)
{
__STC_LOG_FUNC_ENTER__;
}
int stc_plugin_procfs_deinitialize(void)
{
__STC_LOG_FUNC_ENTER__;
+ int ret = STC_ERROR_NONE;
if (nl_connector_sock == -1) {
STC_LOGD("socket already closed");
return STC_ERROR_NONE;
}
if (nl_connector_sock == -1) {
STC_LOGD("socket already closed");
return STC_ERROR_NONE;
}
- __unsubscribe_proc_events();
+ ret = __unsubscribe_proc_events();
__close_nl_connector_sock();
g_tree_destroy(proc_tree);
proc_tree = NULL;
__STC_LOG_FUNC_EXIT__;
__close_nl_connector_sock();
g_tree_destroy(proc_tree);
proc_tree = NULL;
__STC_LOG_FUNC_EXIT__;
}
stc_error_e stc_plugin_procfs_load(void)
}
stc_error_e stc_plugin_procfs_load(void)