}
default:
- DBG("Skipping sub-block: 0x%02X (%zd bytes)",
+ DBG("Skipping sub-block: 0x%02X (%zu bytes)",
g_isi_sb_iter_get_id(&iter),
g_isi_sb_iter_get_len(&iter));
break;
if (!cbd)
goto error;
- if (g_isi_request_make(nd->client, msg, sizeof(msg), NETWORK_TIMEOUT,
+ if (g_isi_request_make(nd->client, msg, sizeof(msg),
+ NETWORK_TIMEOUT,
reg_status_resp_cb, cbd))
return;
goto error;
}
- if (!g_isi_sb_iter_init(msg + 7, len - 7, &iter, false))
+ if (!g_isi_sb_iter_init(msg+7, len-7, &iter, false))
goto error;
while (g_isi_sb_iter_is_valid(&iter)) {
goto error;
strncpy(op.name, tag, OFONO_MAX_OPERATOR_NAME_LENGTH);
+ op.name[OFONO_MAX_OPERATOR_NAME_LENGTH] = '\0';
g_free(tag);
break;
}
if (!cbd)
goto error;
- if (g_isi_request_make(nd->client, msg, sizeof(msg), NETWORK_TIMEOUT,
+ if (g_isi_request_make(nd->client, msg, sizeof(msg),
+ NETWORK_TIMEOUT,
name_get_resp_cb, cbd))
return;
if (!cbd)
goto error;
- if (g_isi_request_make(nd->client, msg, sizeof(msg), NETWORK_TIMEOUT,
+ if (g_isi_request_make(nd->client, msg, sizeof(msg),
+ NETWORK_TIMEOUT,
rssi_resp_cb, cbd))
return;
g_isi_subscribe(nd->client, NET_RAT_IND, rat_ind_cb, netreg);
/* Bootstrap current RAT setting */
- if (!g_isi_request_make(nd->client, rat, sizeof(rat), NETWORK_TIMEOUT,
+ if (!g_isi_request_make(nd->client, rat, sizeof(rat),
+ NETWORK_TIMEOUT,
rat_resp_cb, netreg))
DBG("Failed to bootstrap RAT");
guint8 namelen;
guint8 numberlen;
- if (g_isi_sb_iter_get_len(&iter) < 8)
- goto error;
-
if (!g_isi_sb_iter_get_word(&iter, &loc, 4) ||
!g_isi_sb_iter_get_byte(&iter, &namelen, 6) ||
!g_isi_sb_iter_get_byte(&iter, &numberlen, 7))
goto error;
- location = loc;
-
if (!g_isi_sb_iter_get_alpha_tag(&iter, &name,
namelen * 2, 8))
goto error;
if (!g_isi_sb_iter_get_alpha_tag(&iter, &number,
numberlen * 2, 8 + namelen * 2))
goto error;
+
+ location = loc;
break;
}
case SIM_PB_SNE: {
guint8 snelen;
- if (g_isi_sb_iter_get_len(&iter) < 8)
- goto error;
-
if (!g_isi_sb_iter_get_byte(&iter, &snelen, 6))
goto error;
case SIM_PB_ANR: {
guint8 anrlen;
- if (g_isi_sb_iter_get_len(&iter) < 8)
- goto error;
-
if (!g_isi_sb_iter_get_byte(&iter, &anrlen, 6))
goto error;
case SIM_PB_EMAIL: {
guint8 emaillen;
- if (g_isi_sb_iter_get_len(&iter) < 8)
- goto error;
-
if (!g_isi_sb_iter_get_byte(&iter, &emaillen, 6))
goto error;
case SIM_PB_STATUS:
- if (g_isi_sb_iter_get_len(&iter) < 5)
- goto error;
-
if (!g_isi_sb_iter_get_byte(&iter, &status, 4))
goto error;