mirror of git://git.sysmocom.de/ofono
Fix over-complicated code flow that results in uninitialized variables
This commit is contained in:
parent
fbec2de660
commit
bbc2a56986
|
@ -1261,12 +1261,15 @@ static void sim_pnn_read_cb(struct ofono_modem *modem, int ok,
|
|||
|
||||
sim_eons_add_pnn_record(netreg->eons, record, data, record_length);
|
||||
|
||||
if (record != total)
|
||||
return;
|
||||
|
||||
check:
|
||||
/* If PNN is not present then OPL is not useful, don't
|
||||
* retrieve it. If OPL is not there then PNN[1] will
|
||||
* still be used for the HPLMN and/or EHPLMN, if PNN
|
||||
* is present. */
|
||||
if ((record == total || !ok) && !sim_eons_pnn_is_empty(netreg->eons))
|
||||
if (!sim_eons_pnn_is_empty(netreg->eons))
|
||||
ofono_sim_read(modem, SIM_EFOPL_FILEID, sim_opl_read_cb, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -201,8 +201,11 @@ static void sim_msisdn_read_cb(struct ofono_modem *modem, int ok,
|
|||
|
||||
sim->own_numbers = g_slist_prepend(sim->own_numbers, ph);
|
||||
|
||||
if (record != total)
|
||||
return;
|
||||
|
||||
check:
|
||||
if ((record == total || !ok) && sim->own_numbers) {
|
||||
if (sim->own_numbers) {
|
||||
char **own_numbers;
|
||||
DBusConnection *conn = ofono_dbus_get_connection();
|
||||
|
||||
|
|
Loading…
Reference in New Issue