char out_buff[], int len_max);
bool compare_imsis(const char *imsi_a, const char *imsi_b);
-restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, int64_t limit, int64_t warning_limit);
+restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, const char *imsi, int64_t limit, int64_t warning_limit);
#endif /* SMARTMANAGER_UTILS_H_ */
if (limit_popup_data->element_type == ELEMENT_TYPE_WARNING) {
res = set_mobile_limit_restrictions(
limit_popup_data->smd->stc,
+ limit_popup_data->smd->selected_sim_imsi,
limit_popup_data->smd->selected_sim_limits->limit,
(int64_t)value);
} else if (limit_popup_data->element_type == ELEMENT_TYPE_LIMIT) {
res = set_mobile_limit_restrictions(
limit_popup_data->smd->stc,
+ limit_popup_data->smd->selected_sim_imsi,
(int64_t)value,
limit_popup_data->smd->selected_sim_limits->warning);
} else {
return (0 == safeStrNCmp(imsi_a, imsi_b, 15));
}
-restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, int64_t limit, int64_t warning_limit)
+restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, const char *imsi, int64_t limit, int64_t warning_limit)
{
SETTING_TRACE_BEGIN;
int ret = STC_ERROR_NONE;
return RESTRICTIONS_VALUE_HIGHTER_THAN_MAX;
}
+ ret = stc_restriction_rule_set_imsi(rule, imsi);
+ if (STC_ERROR_NONE != ret) {
+ (void)(void)stc_restriction_rule_destroy(rule);
+ SETTING_TRACE_ERROR("stc_restriction_rule_set_imsi() error: %s",
+ get_error_message(ret));
+ return RESTRICTIONS_OTHER_ERROR;
+ }
+
ret = stc_restriction_rule_set_limit(rule, limit);
if (STC_ERROR_NONE != ret) {
(void)stc_restriction_rule_destroy(rule);