Open Source Telephony
 help / color / mirror / Atom feed
* [PATCHv2 1/2] ste: Add support for multiple pdp contexts.
@ 2011-02-21 11:58 Marit Henriksen
  2011-02-21 16:27 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Marit Henriksen @ 2011-02-21 11:58 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]

From: Marit Henriksen <marit.henriksen@stericsson.com>

---
 plugins/ste.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/plugins/ste.c b/plugins/ste.c
index cf8aed8..749c4f3 100644
--- a/plugins/ste.c
+++ b/plugins/ste.c
@@ -66,6 +66,7 @@
 #include <drivers/stemodem/if_caif.h>
 
 #define NUM_CHAT	1
+#define MAX_PDP_CONTEXTS	4
 
 static const char *cpin_prefix[] = { "+CPIN:", NULL };
 
@@ -363,6 +364,7 @@ static void ste_post_online(struct ofono_modem *modem)
 	struct ofono_message_waiting *mw;
 	struct ofono_gprs *gprs;
 	struct ofono_gprs_context *gc;
+	int i;
 
 	DBG("%p", modem);
 
@@ -378,13 +380,18 @@ static void ste_post_online(struct ofono_modem *modem)
 
 	gprs = ofono_gprs_create(modem, OFONO_VENDOR_MBM,
 					"atmodem", data->chat);
-	gc = ofono_gprs_context_create(modem, 0, "stemodem", data->chat);
-
-	if (gprs && gc)
-		ofono_gprs_add_context(gprs, gc);
+	if (gprs) {
+		for (i = 0; i < MAX_PDP_CONTEXTS; i++) {
+			gc = ofono_gprs_context_create(
+					modem, 0, "stemodem", data->chat);
+			if (gc == NULL)
+				break;
+
+			ofono_gprs_add_context(gprs, gc);
+		}
+	}
 
 	mw = ofono_message_waiting_create(modem);
-
 	if (mw)
 		ofono_message_waiting_register(mw);
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCHv2 1/2] ste: Add support for multiple pdp contexts.
  2011-02-21 11:58 [PATCHv2 1/2] ste: Add support for multiple pdp contexts Marit Henriksen
@ 2011-02-21 16:27 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2011-02-21 16:27 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

Hi Marit,

>  plugins/ste.c |   17 ++++++++++++-----
>  1 files changed, 12 insertions(+), 5 deletions(-)

patch has been applied.

Regards

Marcel



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-21 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 11:58 [PATCHv2 1/2] ste: Add support for multiple pdp contexts Marit Henriksen
2011-02-21 16:27 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox