From 7bac984ed2a24e9865a00c08a35c6016e78d8ca3 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Wed, 25 Jan 2012 13:49:43 +0200 Subject: [PATCH] provider: Handle connman_provider_load() in provider_create() Load provider data in provider_create() if provider_register() returns success. --- src/provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/provider.c b/src/provider.c index baa3c9b..1989ff9 100644 --- a/src/provider.c +++ b/src/provider.c @@ -208,7 +208,6 @@ static void provider_remove(struct connman_provider *provider) static int provider_register(struct connman_provider *provider) { - connman_provider_load(provider); return provider_probe(provider); } @@ -636,7 +635,8 @@ int __connman_provider_create_and_connect(DBusMessage *msg) provider->name = g_strdup(name); provider->type = g_strdup(type); - provider_register(provider); + if (provider_register(provider) == 0) + connman_provider_load(provider); } dbus_message_iter_init(msg, &iter); -- 2.7.4