summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-05 16:50:01 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-05 16:50:01 (GMT)
commitb0f5ddb0a06498d35ad3c12f42cc07e0a36e96cb (patch)
tree08eb6c7afe29169c80e341794c709ee5b7887f07
parent109a5de8db90cb59f885bfda734728179fcd8d8b (diff)
downloadconnman-b0f5ddb0a06498d35ad3c12f42cc07e0a36e96cb.zip
connman-b0f5ddb0a06498d35ad3c12f42cc07e0a36e96cb.tar.gz
connman-b0f5ddb0a06498d35ad3c12f42cc07e0a36e96cb.tar.bz2
Simplify the provider creation code path
-rw-r--r--src/provider.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/provider.c b/src/provider.c
index a17cdd0..4190f10 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -381,13 +381,6 @@ static struct connman_provider *connman_provider_new(void)
return provider;
}
-static int provider_register(struct connman_provider *provider)
-{
- DBG("provider %p", provider);
-
- return 0;
-}
-
static struct connman_provider *connman_provider_get(const char *identifier)
{
struct connman_provider *provider;
@@ -412,20 +405,6 @@ static struct connman_provider *connman_provider_get(const char *identifier)
return provider;
}
-static struct connman_provider *connman_provider_create(const char *name)
-{
- struct connman_provider *provider;
-
- provider = connman_provider_get(name);
-
- if (provider == NULL)
- return NULL;
-
- provider_register(provider);
-
- return provider;
-}
-
int __connman_provider_create_and_connect(DBusMessage *msg)
{
struct connman_provider *provider;
@@ -476,7 +455,7 @@ int __connman_provider_create_and_connect(DBusMessage *msg)
if (provider == NULL) {
created = TRUE;
- provider = connman_provider_create(ident);
+ provider = connman_provider_get(ident);
if (provider) {
provider->name = g_strdup(name);
provider->type = g_strdup(type);