diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-27 18:14:50 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-27 18:14:50 +0200 |
commit | 99bd7d03991b1da4bc941eeda59c43e41c1a1ce6 (patch) | |
tree | e7822f0fd8030ab9be1d396ef7d53514ec0ff913 | |
parent | 979c2da679bd3550c783254ea8abe3862aca0893 (diff) | |
download | ofono-99bd7d03991b1da4bc941eeda59c43e41c1a1ce6.tar.bz2 |
gprs: Use common function for default name of default Internet context
-rw-r--r-- | src/gprs.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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, |