summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-27 18:14:50 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-27 18:14:50 +0200
commit99bd7d03991b1da4bc941eeda59c43e41c1a1ce6 (patch)
treee7822f0fd8030ab9be1d396ef7d53514ec0ff913 /src
parent979c2da679bd3550c783254ea8abe3862aca0893 (diff)
downloadofono-99bd7d03991b1da4bc941eeda59c43e41c1a1ce6.tar.bz2
gprs: Use common function for default name of default Internet context
Diffstat (limited to 'src')
-rw-r--r--src/gprs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gprs.c b/src/gprs.c
index 6f62e920..e94f1693 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1146,6 +1146,12 @@ static struct pri_context *pri_context_create(struct ofono_gprs *gprs,
if (!context)
return NULL;
+ if (!name) {
+ name = gprs_context_type_to_default_name(type);
+ if (!name)
+ return NULL;
+ }
+
context->gprs = gprs;
strcpy(context->name, name);
context->type = type;
@@ -2475,7 +2481,7 @@ void ofono_gprs_register(struct ofono_gprs *gprs)
}
if (gprs->contexts == NULL)
- add_context(gprs, "Internet", OFONO_GPRS_CONTEXT_TYPE_INTERNET);
+ add_context(gprs, NULL, OFONO_GPRS_CONTEXT_TYPE_INTERNET);
gprs->netreg_watch = __ofono_modem_add_atom_watch(modem,
OFONO_ATOM_TYPE_NETREG,