Refactor: Preserve Phase obtained from the SIM

This commit is contained in:
Denis Kenzior 2010-01-06 13:19:47 -06:00
parent b4c3e1c1cc
commit beb3e032e4
2 changed files with 6 additions and 7 deletions

View File

@ -58,9 +58,10 @@ enum ofono_sim_password_type {
};
enum ofono_sim_phase {
OFONO_SIM_PHASE_G1,
OFONO_SIM_PHASE_G2,
OFONO_SIM_PHASE_G3,
OFONO_SIM_PHASE_1G,
OFONO_SIM_PHASE_2G,
OFONO_SIM_PHASE_2G_PLUS,
OFONO_SIM_PHASE_3G,
};
typedef void (*ofono_sim_file_info_cb_t)(const struct ofono_error *error,

View File

@ -1226,11 +1226,9 @@ static void sim_efphase_read_cb(const struct ofono_error *error,
struct ofono_sim *sim = user;
if (!error || error->type != OFONO_ERROR_TYPE_NO_ERROR || len != 1)
sim->phase = OFONO_SIM_PHASE_G3;
else if (data[0] != 0x00)
sim->phase = OFONO_SIM_PHASE_G2;
sim->phase = OFONO_SIM_PHASE_3G;
else
sim->phase = OFONO_SIM_PHASE_G1;
sim->phase = data[0];
/* Proceed with SIM initialization */
sim_retrieve_efli_and_efpl(sim);