{
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
Storage *strg_vconf = tcore_server_find_storage(tcore_plugin_ref_server(indi_plugin), S_INDI_VCONF_STORAGE_NAME);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return;
+ }
s_indi_assert(NULL != strg_vconf);
/** NULL cp_name: subscription independent vconf key */
{
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
Storage *strg_vconf = tcore_server_find_storage(tcore_plugin_ref_server(indi_plugin), S_INDI_VCONF_STORAGE_NAME);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return;
+ }
s_indi_assert(NULL != strg_vconf);
/** NULL cp_name: subscription independent vconf key */
{
gchar *cp_name = NULL;
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return;
+ }
/** @todo: It may be possible to use cp_name without duping as well */
cp_name = s_indi_strdup(tcore_server_get_cp_name_by_plugin(modem_plugin));
{
const char *cp_name = NULL;
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return;
+ }
+ s_indi_assert(NULL != priv_info->state_info);
cp_name = tcore_server_get_cp_name_by_plugin(modem_plugin);
s_indi_assert(NULL != cp_name);
- s_indi_assert(NULL != priv_info->state_info);
if (g_hash_table_remove(priv_info->state_info, cp_name))
s_indi_log_ex(cp_name, "Removed");
__s_indi_cb_user_data *cb_data = NULL;
s_indi_cp_state_info_type *state_info = NULL;
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return FALSE;
+ }
if ((state_info = g_hash_table_lookup(priv_info->state_info, cp_name)) == NULL) {
warn("CP [%s] Not Present", cp_name);
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
Storage *strg_vconf = NULL;
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return G_SOURCE_REMOVE;
+ }
+
/* VCONF Mapper */
if (s_indi_str_has_suffix(cp_name, "0")) {
key_last_rcv = STORAGE_KEY_CELLULAR_PKT_LAST_RCV;
}
}
- rx_changes_total = rx_curr_total - rx_prev_total;
- tx_changes_total = tx_curr_total - tx_prev_total;
+ rx_changes_total = ((rx_curr_total > rx_prev_total) ? (rx_curr_total - rx_prev_total) : S_INDI_ZERO);
+ tx_changes_total = ((tx_curr_total > tx_prev_total) ? (tx_curr_total - tx_prev_total) : S_INDI_ZERO);
if (rx_changes_total)
cp_state |= S_INDI_TRANSFER_RX;
s_indi_cp_state_info_type *state_info = NULL;
GVariant *tmp = value;
s_indi_private_info *priv_info = __s_indi_get_priv_info(user_data);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return;
+ }
s_indi_assert(NULL != tmp);
switch (key) {
case STORAGE_KEY_PM_STATE: {
GHashTableIter iter;
- gpointer key, value;
+ gpointer key_info, value_info;
gint pm_state = S_INDI_ZERO;
if (!g_variant_is_of_type(tmp, G_VARIANT_TYPE_INT32)) {
dbg("PM state Value:[%d]", pm_state);
g_hash_table_iter_init(&iter, priv_info->state_info);
- while (g_hash_table_iter_next(&iter, &key, &value)) {
- state_info = value;
+ while (g_hash_table_iter_next(&iter, &key_info, &value_info)) {
+ state_info = value_info;
state_info->dormant_info.lcd_state = pm_state;
}
}
const char *cp_name = NULL;
s_indi_cp_state_info_type *state_info = NULL;
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return TCORE_HOOK_RETURN_CONTINUE;
+ }
cp_name = tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
s_indi_assert(NULL != cp_name);
const char *cp_name = NULL;
s_indi_cp_state_info_type *state_info = NULL;
s_indi_private_info *priv_info = __s_indi_get_priv_info(indi_plugin);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return TCORE_HOOK_RETURN_CONTINUE;
+ }
s_indi_assert(cstatus != NULL);
S_INDI_NOT_USED(command);
S_INDI_NOT_USED(data_len);
CORE_OBJECT_CHECK_RETURN(source, CORE_OBJECT_TYPE_NETWORK, TCORE_HOOK_RETURN_CONTINUE);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return TCORE_HOOK_RETURN_CONTINUE;
+ }
cp_name = tcore_server_get_cp_name_by_plugin(tcore_object_ref_plugin(source));
s_indi_assert(NULL != cp_name);
S_INDI_NOT_USED(data);
CORE_OBJECT_CHECK_RETURN(source, CORE_OBJECT_TYPE_CALL, TCORE_HOOK_RETURN_CONTINUE);
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return TCORE_HOOK_RETURN_CONTINUE;
+ }
/* Update all modem states */
g_hash_table_iter_init(&iter, priv_info->state_info);
__s_indi_unregister_vconf_key(STORAGE_KEY_PM_STATE, plugin, NULL);
/* Destroy all watched modems */
+ if (priv_info == NULL) {
+ err("priv_info is NULL!!!");
+ return;
+ }
iter = g_hash_table_get_values(priv_info->state_info);
while (iter) {
state_info = iter->data;