summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-22 00:29:05 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-22 00:29:05 -0800
commit6d7c60194a2cd0da5119fcce156ab7bd9f82babf (patch)
treec1ddb88600ae5998f629dca45165eca17bf407d5
parentad619e369a8144af4a28c9be0e794f8468686162 (diff)
downloadconnman-6d7c60194a2cd0da5119fcce156ab7bd9f82babf.tar.gz
connman-6d7c60194a2cd0da5119fcce156ab7bd9f82babf.tar.bz2
connman-6d7c60194a2cd0da5119fcce156ab7bd9f82babf.zip
Fix service loading and add provision callbacks
-rw-r--r--src/config.c7
-rw-r--r--src/connman.h2
-rw-r--r--src/service.c12
3 files changed, 13 insertions, 8 deletions
diff --git a/src/config.c b/src/config.c
index f22d5178..cf8e42aa 100644
--- a/src/config.c
+++ b/src/config.c
@@ -166,3 +166,10 @@ void __connman_config_cleanup(void)
g_hash_table_destroy(config_hash);
config_hash = NULL;
}
+
+int __connman_config_provision_service(struct connman_service *service)
+{
+ DBG("service %p", service);
+
+ return 0;
+}
diff --git a/src/connman.h b/src/connman.h
index c4020b1e..6a36331c 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -331,6 +331,8 @@ connman_bool_t __connman_network_get_connecting(struct connman_network *network)
int __connman_config_init();
void __connman_config_cleanup(void);
+int __connman_config_provision_service(struct connman_service *service);
+
#include <connman/profile.h>
int __connman_profile_init();
diff --git a/src/service.c b/src/service.c
index 34c4e479..3092f673 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1867,8 +1867,6 @@ static struct connman_service *__connman_service_get(const char *identifier)
service->profile = g_strdup(__connman_profile_active_ident());
- __connman_storage_load_service(service);
-
iter = g_sequence_insert_sorted(service_list, service,
service_compare, NULL);
@@ -1891,13 +1889,15 @@ static int service_register(struct connman_service *service)
DBG("path %s", service->path);
+ __connman_config_provision_service(service);
+
+ __connman_storage_load_service(service);
+
g_dbus_register_interface(connection, service->path,
CONNMAN_SERVICE_INTERFACE,
service_methods, service_signals,
NULL, service, NULL);
- __connman_storage_load_service(service);
-
iter = g_hash_table_lookup(service_hash, service->identifier);
if (iter != NULL)
g_sequence_sort_changed(iter, service_compare, NULL);
@@ -1966,8 +1966,6 @@ static void setup_ipconfig(struct connman_service *service, int index)
connman_ipconfig_set_method(service->ipconfig,
CONNMAN_IPCONFIG_METHOD_DHCP);
- __connman_storage_load_service(service);
-
connman_ipconfig_set_data(service->ipconfig, service);
connman_ipconfig_set_ops(service->ipconfig, &service_ops);
@@ -2245,8 +2243,6 @@ struct connman_service *__connman_service_create_from_network(struct connman_net
service_register(service);
- __connman_profile_changed(TRUE);
-
if (service->favorite == TRUE)
__connman_service_auto_connect();