summaryrefslogtreecommitdiffstats
path: root/plugins/ifx.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-21 23:51:36 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-21 23:51:36 +0200
commit2c06348356bff344c68f381011d2b42a8067713c (patch)
treef911e0dbccc118dfa2cc73810f8c97c4e4511dfc /plugins/ifx.c
parentf6b92bd2d9d6df1831749db3778ab56e8d8edf70 (diff)
downloadofono-2c06348356bff344c68f381011d2b42a8067713c.tar.bz2
ifx: Add two GPRS contexts since the modem should support it
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r--plugins/ifx.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c
index 49eb4bf6..af0dae25 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -663,7 +663,7 @@ static void ifx_post_online(struct ofono_modem *modem)
struct ifx_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);
@@ -688,11 +688,18 @@ static void ifx_post_online(struct ofono_modem *modem)
ofono_message_waiting_register(mw);
gprs = ofono_gprs_create(modem, 0, "atmodem", data->dlcs[NETREG_DLC]);
- gc = ofono_gprs_context_create(modem, 0,
+ if (!gprs)
+ return;
+
+ gc1 = ofono_gprs_context_create(modem, 0,
"ifxmodem", data->dlcs[GPRS1_DLC]);
+ if (gc1)
+ ofono_gprs_add_context(gprs, gc1);
- if (gprs && gc)
- ofono_gprs_add_context(gprs, gc);
+ gc2 = ofono_gprs_context_create(modem, 0,
+ "ifxmodem", data->dlcs[GPRS2_DLC]);
+ if (gc2)
+ ofono_gprs_add_context(gprs, gc2);
}
static struct ofono_modem_driver ifx_driver = {