rilmodem: Implement ril_pin_send_puk inline

This commit is contained in:
Denis Kenzior 2015-11-12 11:06:02 -06:00
parent 44c04f8c1f
commit ca06f58fef
1 changed files with 14 additions and 9 deletions

View File

@ -1034,17 +1034,22 @@ static void ril_pin_send_puk(struct ofono_sim *sim,
sd->passwd_type = OFONO_SIM_PASSWORD_SIM_PUK; sd->passwd_type = OFONO_SIM_PASSWORD_SIM_PUK;
g_ril_request_pin_send_puk(sd->ril, parcel_init(&rilp);
puk,
passwd, parcel_w_int32(&rilp, 3);
sd->aid_str, parcel_w_string(&rilp, puk);
&rilp); parcel_w_string(&rilp, passwd);
parcel_w_string(&rilp, sd->aid_str);
g_ril_append_print_buf(sd->ril, "(puk=%s,pin=%s,aid=%s)",
puk, passwd, sd->aid_str);
if (g_ril_send(sd->ril, RIL_REQUEST_ENTER_SIM_PUK, &rilp, if (g_ril_send(sd->ril, RIL_REQUEST_ENTER_SIM_PUK, &rilp,
ril_pin_change_state_cb, cbd, g_free) == 0) { ril_pin_change_state_cb, cbd, g_free) > 0)
g_free(cbd); return;
CALLBACK_WITH_FAILURE(cb, data);
} g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
} }
static void ril_change_passwd(struct ofono_sim *sim, static void ril_change_passwd(struct ofono_sim *sim,