mirror of git://git.sysmocom.de/ofono
phonesim: Create atoms in a different order
This uncovers a valgrind condition: ==17231== Invalid read of size 8 ==17231== at 0x4A2461: gprs_context_unregister (gprs.c:2143) ==17231== by 0x46FEB0: __ofono_atom_unregister (modem.c:260) ==17231== by 0x4703C9: modem_change_state (modem.c:407) ==17231== by 0x470664: set_powered (modem.c:848) ==17231== by 0x4706BA: __ofono_modem_shutdown (modem.c:2137)
This commit is contained in:
parent
563fcc5fe9
commit
9c8451a1b8
|
@ -689,13 +689,13 @@ static void phonesim_post_online(struct ofono_modem *modem)
|
|||
if (!data->calypso)
|
||||
ofono_cbs_create(modem, 0, "atmodem", data->chat);
|
||||
|
||||
gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
|
||||
|
||||
gc1 = ofono_gprs_context_create(modem, 0, "phonesim", data->chat);
|
||||
gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
|
||||
gc2 = ofono_gprs_context_create(modem, 0, "phonesim", data->chat);
|
||||
|
||||
if (gprs && gc1)
|
||||
ofono_gprs_add_context(gprs, gc1);
|
||||
|
||||
gc2 = ofono_gprs_context_create(modem, 0, "phonesim", data->chat);
|
||||
if (gprs && gc2)
|
||||
ofono_gprs_add_context(gprs, gc2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue