return TRUE;
}
- stc_plugin_monitor_add_rstn(&rule);
+ ret = stc_plugin_monitor_add_rstn(&rule);
+ if (ret == STC_ERROR_UNINITIALIZED) {
+ STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
+ STC_ERROR_UNINITIALIZED);
+ table_restrictions_delete(rule.app_id, rule.iftype, rule.ifname,
+ rule.subscriber_id, rule.roaming);
+ __stc_free_restriction_rule_members(&rule);
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return TRUE;
+ } else if (ret == STC_ERROR_NO_DATA || ret == STC_ERROR_OUT_OF_MEMORY) {
+ STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
+ ret);
+ __stc_free_restriction_rule_members(&rule);
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return TRUE;
+ }
STC_DBUS_REPLY_ERROR_NONE(invocation);
__stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__;
return TRUE;
}
- stc_plugin_monitor_remove_rstn(&rule);
+ ret = stc_plugin_monitor_remove_rstn(&rule);
+ if (ret == STC_ERROR_UNINITIALIZED) {
+ STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
+ STC_ERROR_UNINITIALIZED);
+ __stc_free_restriction_rule_members(&rule);
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return TRUE;
+ } else if (ret == STC_ERROR_NO_DATA) {
+ table_restrictions_update(&rule);
+ STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
+ STC_ERROR_NO_DATA);
+ __stc_free_restriction_rule_members(&rule);
+ __STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
+ return TRUE;
+ }
+
STC_DBUS_REPLY_ERROR_NONE(invocation);
__stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__;