*/
int user_pdn_connection_refcount;
bool storage_reload;
+ /*
+ * Description: In case of EAP security type,
+ * user can select the keymgmt type for roaming(802.11r).
+ * - FT, CCKM, OKC, ...
+ */
+ char *keymgmt_type;
+ int disconnect_reason;
#endif
#if defined TIZEN_TV_EXT
enum connman_dnsconfig_method dns_config_method;
const char *str;
GSList *list;
+#if defined TIZEN_EXT
+ unsigned int frequency = 0U;
+ if (service && service->network) {
+ frequency = connman_network_get_frequency(service->network);
+ connman_dbus_dict_append_basic(dict, "Frequency",
+ DBUS_TYPE_UINT16, &frequency);
+ }
+#endif
+
str = __connman_service_type2string(service->type);
if (str)
connman_dbus_dict_append_basic(dict, "Type",
connman_dbus_dict_append_dict(dict, "Ethernet",
append_ethernet, service);
+
+ connman_dbus_dict_append_basic(dict, "DisconnectReason",
+ DBUS_TYPE_INT32, &service->disconnect_reason);
+
break;
#endif
case CONNMAN_SERVICE_TYPE_ETHERNET:
if (err < 0) {
if (is_connected_state(service, state) ||
is_connecting_state(service, state)) {
- __connman_network_enable_ipconfig(service->network,
+ if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
+ __connman_network_enable_ipconfig(service->network,
service->ipconfig_ipv4);
- __connman_network_enable_ipconfig(service->network,
+ else
+ __connman_network_enable_ipconfig(service->network,
service->ipconfig_ipv6);
}
ipv6_configuration_changed(service);
if (is_connecting(service) || is_connected(service)) {
- __connman_network_enable_ipconfig(service->network,
- service->ipconfig_ipv4);
- __connman_network_enable_ipconfig(service->network,
- service->ipconfig_ipv6);
+ if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
+ __connman_network_enable_ipconfig(service->network,
+ service->ipconfig_ipv4);
+ else
+ __connman_network_enable_ipconfig(service->network,
+ service->ipconfig_ipv6);
}
service_save(service);
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;
*/
if (service->type == CONNMAN_SERVICE_TYPE_CELLULAR)
break;
+
+ if (service->type == CONNMAN_SERVICE_TYPE_BLUETOOTH)
+ break;
#endif
return NULL;
}
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));
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);
/* It is not relevant to stay on Failure state
* when failing is due to wrong user input */
__connman_service_clear_error(service);
+#if defined TIZEN_EXT
+ /* Reseting the state back in case of failure state */
+ service->state_ipv4 = service->state_ipv6 =
+ CONNMAN_SERVICE_STATE_IDLE;
+ if (service->error != CONNMAN_SERVICE_ERROR_AUTH_FAILED)
+ set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);
+#endif
service_complete(service);
__connman_connection_update_gateway();
}
reply_pending(service, ECONNABORTED);
def_service = __connman_service_get_default();
+ service->disconnect_reason = connman_network_get_disconnect_reason(service->network);
if (!__connman_notifier_is_connected() &&
def_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,