summaryrefslogtreecommitdiff
path: root/plugins/phonesim.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-10-25 14:42:59 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-10-25 14:45:12 -0500
commitde3c0d624742b5caff093cfeeff758d04886742a (patch)
treeeb107f557e8d08e8bce9702e595ad626275316ba /plugins/phonesim.c
parentd168c35b9910937e03bc7d3bae722f0d4dcf6877 (diff)
downloadofono-de3c0d624742b5caff093cfeeff758d04886742a.tar.gz
phonesim: Support multiple contexts
Diffstat (limited to 'plugins/phonesim.c')
-rw-r--r--plugins/phonesim.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/phonesim.c b/plugins/phonesim.c
index 851ed769..8d5ef8f2 100644
--- a/plugins/phonesim.c
+++ b/plugins/phonesim.c
@@ -477,7 +477,7 @@ static void phonesim_post_online(struct ofono_modem *modem)
struct phonesim_data *data = ofono_modem_get_data(modem);
struct ofono_message_waiting *mw;
struct ofono_gprs *gprs;
- struct ofono_gprs_context *gc;
+ struct ofono_gprs_context *gc1, *gc2;
DBG("%p", modem);
@@ -503,10 +503,14 @@ static void phonesim_post_online(struct ofono_modem *modem)
}
gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
- gc = ofono_gprs_context_create(modem, 0, "phonesim", data->chat);
- if (gprs && gc)
- ofono_gprs_add_context(gprs, gc);
+ 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);
mw = ofono_message_waiting_create(modem);
if (mw)