case STC_EVENT_STATS_GET_RSP:
if (handle->stats_cb) {
if (err == STC_ERROR_NONE) {
- for (data = info_data; data; data = data->next) {
- stc_stats_info_h info = data->data;
- ret = handle->stats_cb(err,
- info, handle->stats_user_data);
-
- if (ret == STC_CALLBACK_CANCEL)
- break;
+ if (info_data != NULL) {
+ for (data = info_data; data; data = data->next) {
+ stc_stats_info_h info = data->data;
+ ret = handle->stats_cb(err,
+ info, handle->stats_user_data);
+
+ if (ret == STC_CALLBACK_CANCEL)
+ break;
+ }
+ } else {
+ handle->stats_cb(err, NULL, NULL);
}
} else {
handle->stats_cb(err, NULL, NULL);
case STC_EVENT_STATS_GET_ALL_RSP:
if (handle->stats_all_cb) {
if (err == STC_ERROR_NONE) {
- for (data = info_data; data; data = data->next) {
- stc_stats_info_h info = data->data;
- ret = handle->stats_all_cb(err,
- info, handle->stats_all_user_data);
-
- if (ret == STC_CALLBACK_CANCEL)
- break;
+ if (info_data != NULL) {
+ for (data = info_data; data; data = data->next) {
+ stc_stats_info_h info = data->data;
+ ret = handle->stats_all_cb(err,
+ info, handle->stats_all_user_data);
+
+ if (ret == STC_CALLBACK_CANCEL)
+ break;
+ }
+ } else {
+ handle->stats_all_cb(err, NULL, NULL);
}
} else {
handle->stats_all_cb(err, NULL, NULL);
case STC_EVENT_STATS_GET_TOTAL_RSP:
if (handle->stats_total_cb) {
if (err == STC_ERROR_NONE) {
- for (data = info_data; data; data = data->next) {
- stc_stats_info_h info = data->data;
- ret = handle->stats_total_cb(err,
- info, handle->stats_total_user_data);
-
- if (ret == STC_CALLBACK_CANCEL)
- break;
+ if (info_data != NULL) {
+ for (data = info_data; data; data = data->next) {
+ stc_stats_info_h info = data->data;
+ ret = handle->stats_total_cb(err,
+ info, handle->stats_total_user_data);
+
+ if (ret == STC_CALLBACK_CANCEL)
+ break;
+ }
+ } else {
+ handle->stats_total_cb(err, NULL, NULL);
}
} else {
handle->stats_total_cb(err, NULL, NULL);
case STC_EVENT_RESTRICTION_GET_RSP:
if (handle->restriction_cb) {
if (err == STC_ERROR_NONE) {
- for (data = info_data; data; data = data->next) {
- stc_restriction_info_h info = data->data;
- ret = handle->restriction_cb(err,
- info, handle->restriction_user_data);
-
- if (ret == STC_CALLBACK_CANCEL)
- break;
+ if (info_data != NULL) {
+ for (data = info_data; data; data = data->next) {
+ stc_restriction_info_h info = data->data;
+ ret = handle->restriction_cb(err,
+ info, handle->restriction_user_data);
+
+ if (ret == STC_CALLBACK_CANCEL)
+ break;
+ }
+ } else {
+ handle->restriction_cb(err, NULL, NULL);
}
} else {
handle->restriction_cb(err, NULL, NULL);
case STC_EVENT_RESTRICTION_GET_ALL_RSP:
if (handle->restriction_all_cb) {
if (err == STC_ERROR_NONE) {
- for (data = info_data; data; data = data->next) {
- stc_restriction_info_h info = data->data;
- ret = handle->restriction_all_cb(err,
- info, handle->restriction_all_user_data);
-
- if (ret == STC_CALLBACK_CANCEL)
- break;
+ if (info_data != NULL) {
+ for (data = info_data; data; data = data->next) {
+ stc_restriction_info_h info = data->data;
+ ret = handle->restriction_all_cb(err,
+ info, handle->restriction_all_user_data);
+
+ if (ret == STC_CALLBACK_CANCEL)
+ break;
+ }
+ } else {
+ handle->restriction_all_cb(err, NULL, NULL);
}
} else {
handle->restriction_all_cb(err, NULL, NULL);