diff options
author | taesub kim <taesub.kim@samsung.com> | 2016-09-28 17:45:43 -0700 |
---|---|---|
committer | taesub kim <taesub.kim@samsung.com> | 2016-09-28 17:45:43 -0700 |
commit | b98026b7b4bf550e955d58dd3c672d7382a685e7 (patch) | |
tree | 5730f4665938fc003f86ae959bd77a03aeb798b1 /src | |
parent | 7ace8c778781a6d3e47010843d9bc5c0d337594d (diff) | |
download | connman-b98026b7b4bf550e955d58dd3c672d7382a685e7.tar.gz connman-b98026b7b4bf550e955d58dd3c672d7382a685e7.tar.bz2 connman-b98026b7b4bf550e955d58dd3c672d7382a685e7.zip |
Revert "Remove Tizen specific hidden connection logic"submit/tizen/20160929.042234accepted/tizen/wearable/20160929.081746accepted/tizen/tv/20160929.081805accepted/tizen/mobile/20160929.081738accepted/tizen/ivi/20160929.081755accepted/tizen/common/20160929.163218
This reverts commit 7ace8c778781a6d3e47010843d9bc5c0d337594d.
Change-Id: Ia05ae51984781af64d3225ac302bdfb24df37263
Diffstat (limited to 'src')
-rwxr-xr-x | src/service.c | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c index bd0c1ff6..1eae3807 100755 --- a/src/service.c +++ b/src/service.c @@ -4085,10 +4085,8 @@ static void set_error(struct connman_service *service, if (!service->path) return; -#if !defined TIZEN_EXT if (!allow_property_changed(service)) return; -#endif str = error2string(service->error); @@ -6004,6 +6002,34 @@ static int check_wpspin(struct connman_service *service, const char *wpspin) return 0; } +#if defined TIZEN_EXT +static int __connman_service_connect_hidden(struct connman_service *service, + const char *name, int name_len, + const char *identity, const char *passphrase, void *user_data) +{ + GList *list; + + for (list = service_list; list; list = list->next) { + struct connman_service *target = list->data; + const char *target_ssid = NULL; + unsigned int target_ssid_len = 0; + + if (service->network != NULL && + service->security == target->security) { + target_ssid = connman_network_get_blob(service->network, + "WiFi.SSID", &target_ssid_len); + if (target_ssid_len == name_len && + memcmp(target_ssid, name, name_len) == 0) { + return connman_network_connect_hidden(service->network, + (char *)identity, (char *)passphrase, user_data); + } + } + } + + return -ENOENT; +} +#endif + static void request_input_cb(struct connman_service *service, bool values_received, const char *name, int name_len, @@ -6036,6 +6062,14 @@ static void request_input_cb(struct connman_service *service, } if (service->hidden && name_len > 0 && name_len <= 32) { +#if defined TIZEN_EXT + /* TIZEN already has Wi-Fi hidden scan before this hidden connection */ + err = __connman_service_connect_hidden(service, name, name_len, + identity, passphrase, user_data); + if (err == 0 || err == -EALREADY || err == -EINPROGRESS) + return; +#endif + device = connman_network_get_device(service->network); security = connman_network_get_string(service->network, "WiFi.Security"); |