summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-05-10 21:35:20 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-05-11 12:11:19 -0500
commit9c8451a1b8ea304b18b7770d9ae3a78280698b20 (patch)
tree1791ed9c0fb6c40c18ec058bb37dd7debcdf56de /plugins
parent563fcc5fe93b4a3c3ec3985bb787e2ffba5d4b58 (diff)
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)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/phonesim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/phonesim.c b/plugins/phonesim.c
index 1a6703dd..f49c13a5 100644
--- a/plugins/phonesim.c
+++ b/plugins/phonesim.c
@@ -689,13 +689,13 @@ static void phonesim_post_online(struct ofono_modem *modem)
if (!data->calypso)
ofono_cbs_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);
- gc1 = 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);