Merge "Removed cap for mac override and change the label for connman dir" into tizen
[platform/upstream/connman.git] / src / service.c
index 056213f..f77f033 100755 (executable)
@@ -4222,31 +4222,6 @@ void __connman_service_set_active_session(bool enable, GSList *list)
                        active_count);
 }
 
-#if defined TIZEN_CONNMAN_USE_BLACKLIST
-static connman_bool_t is_allowed(struct connman_service *service)
-{
-       connman_bool_t allowed;
-       const char *security = NULL;
-
-       if (!service)
-               return false;
-
-       security = security2string(service->security);
-       if (!security)
-               return false;
-
-       /* check if service is existed in blacklist */
-       allowed = __connman_agent_request_blacklist_check(service->name,
-                       security, service->eap);
-       if (allowed == false) {
-               DBG("service %p is not allowed", service);
-               service->autoconnect = false;
-       }
-
-       return allowed;
-}
-#endif
-
 struct preferred_tech_data {
        GList *preferred_list;
        enum connman_service_type type;
@@ -4376,11 +4351,6 @@ static bool auto_connect_service(GList *services,
                                CONNMAN_SERVICE_STATE_IDLE)
                        continue;
 
-#if defined TIZEN_CONNMAN_USE_BLACKLIST
-               if (is_allowed(service) == false)
-                       continue;
-#endif
-
                if (autoconnecting && !active_sessions[service->type]) {
                        DBG("service %p type %s has no users", service,
                                __connman_service_type2string(service->type));
@@ -5960,21 +5930,6 @@ void __connman_service_set_search_domains(struct connman_service *service,
        searchdomain_add_all(service);
 }
 
-#if defined TIZEN_EXT
-void __connman_service_set_autoconnect(struct connman_service *service,
-                                               bool autoconnect)
-{
-       if (service == NULL)
-               return;
-
-       if (service->autoconnect != autoconnect) {
-               DBG("updated autoconnect flag (%d)", autoconnect);
-               service->autoconnect = autoconnect;
-               service_save(service);
-       }
-}
-#endif
-
 static void service_complete(struct connman_service *service)
 {
        reply_pending(service, EIO);
@@ -6677,6 +6632,11 @@ int __connman_service_indicate_error(struct connman_service *service,
                                service->error == CONNMAN_SERVICE_ERROR_CONNECT_FAILED)
                        __connman_service_disconnect_default(service);
 
+               if (service->type == CONNMAN_SERVICE_TYPE_WIFI &&
+                               service->error == CONNMAN_SERVICE_ERROR_INVALID_KEY) {
+                       g_free(service->passphrase);
+                       service->passphrase = NULL;
+               }
 #endif
 
        __connman_service_ipconfig_indicate_state(service,