From: Marcel Holtmann Date: Tue, 22 Dec 2009 08:29:05 +0000 (-0800) Subject: Fix service loading and add provision callbacks X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~2985 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d7c60194a2cd0da5119fcce156ab7bd9f82babf;p=profile%2Fivi%2Fconnman.git Fix service loading and add provision callbacks --- diff --git a/src/config.c b/src/config.c index f22d517..cf8e42a 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 c4020b1..6a36331 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 int __connman_profile_init(); diff --git a/src/service.c b/src/service.c index 34c4e47..3092f67 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();