[SPIN] wifi: enable to reload service profile from storage. 73/74373/1
authorNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 14 Jun 2016 10:40:37 +0000 (16:10 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 14 Jun 2016 10:40:37 +0000 (16:10 +0530)
Change-Id: Idf19d82d0052f83a69b424536ecfceca65e840cb
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
src/connman.h
src/service.c

index c39210b..2e9c26f 100755 (executable)
@@ -698,6 +698,8 @@ enum connman_service_security __connman_service_get_security(struct connman_serv
 const char *__connman_service_get_phase2(struct connman_service *service);
 bool __connman_service_wps_enabled(struct connman_service *service);
 #if defined TIZEN_EXT
+void __connman_service_set_storage_reload(struct connman_service *service,
+                                               bool storage_reload);
 void __connman_service_set_autoconnect(struct connman_service *service,
                                                bool autoconnect);
 #endif
index 71e2c09..3f84287 100755 (executable)
@@ -156,6 +156,7 @@ struct connman_service {
         *              manage open/close connection requests by each application.
         */
        int user_pdn_connection_refcount;
+       bool storage_reload;
 #endif
 #if defined TIZEN_TV_EXT
        enum connman_dnsconfig_method dns_config_method;
@@ -5368,6 +5369,7 @@ static void service_initialize(struct connman_service *service)
 
        service->wps = false;
 #if defined TIZEN_EXT
+       service->storage_reload = false;
        /*
         * Description: TIZEN implements system global connection management.
         */
@@ -5759,6 +5761,13 @@ int __connman_service_get_connected_count_of_iface(
 
        return count;
 }
+
+void __connman_service_set_storage_reload(struct connman_service *service,
+                                       bool storage_reload)
+{
+       if (service != NULL)
+               service->storage_reload = storage_reload;
+}
 #endif
 
 /**
@@ -8003,6 +8012,13 @@ void __connman_service_update_from_network(struct connman_network *network)
        if (!service->network)
                return;
 
+#if defined TIZEN_EXT
+       if (service->storage_reload) {
+               service_load(service);
+               __connman_service_set_storage_reload(service, false);
+       }
+#endif
+
        name = connman_network_get_string(service->network, "Name");
        if (g_strcmp0(service->name, name) != 0) {
                g_free(service->name);