diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2018-01-04 14:48:49 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2018-01-04 15:43:26 +0530 |
commit | 3210aec76f77e83630367d47b888db89baec44c4 (patch) | |
tree | c6ce9c5447cf101b8a322393cafd67a166dc5de7 /src/network.c | |
parent | 1a5031d10d06c727f8cbc866e928b5d69bce50cc (diff) | |
download | connman-3210aec76f77e83630367d47b888db89baec44c4.tar.gz connman-3210aec76f77e83630367d47b888db89baec44c4.tar.bz2 connman-3210aec76f77e83630367d47b888db89baec44c4.zip |
Modified logic to process each VSIE of all vendors.
Modified logic to process each VSIE of all vendors instead of
only samsung vendor(OUI: 001632). Received VSIE will be appended
in the list and shared with application.
Change-Id: I11fee186c04677fdcd7746fcef7fd1dee4a0b02e
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/network.c')
-rwxr-xr-x | src/network.c | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/src/network.c b/src/network.c index 5aac8d6a..f7a9925a 100755 --- a/src/network.c +++ b/src/network.c @@ -109,8 +109,7 @@ struct connman_network { bool rsn_mode; int disconnect_reason; int assoc_status_code; - void *wifi_vsie; - unsigned int wifi_vsie_len; + GSList *vsie_list; #endif } wifi; @@ -971,7 +970,7 @@ static void network_destruct(struct connman_network *network) g_free(network->wifi.phase2_auth); g_free(network->wifi.pin_wps); #if defined TIZEN_EXT - g_free(network->wifi.wifi_vsie); + g_slist_free_full(network->wifi.vsie_list, g_free); #endif g_free(network->path); g_free(network->group); @@ -2395,6 +2394,31 @@ bool connman_network_get_bool(struct connman_network *network, return false; } +#if defined TIZEN_EXT +/** + * connman_network_set_vsie_list: + * @network: network structure + * @vsie_list: GSList pointer + * + * Set vendor specific list pointer + */ +void connman_network_set_vsie_list(struct connman_network *network, GSList *vsie_list) +{ + network->wifi.vsie_list = vsie_list; +} + +/** + * connman_network_get_vsie_list: + * @network: network structure + * + * Get vendor specific list pointer + */ +void *connman_network_get_vsie_list(struct connman_network *network) +{ + return network->wifi.vsie_list; +} +#endif + /** * connman_network_set_blob: * @network: network structure @@ -2419,16 +2443,6 @@ int connman_network_set_blob(struct connman_network *network, network->wifi.ssid_len = size; } else network->wifi.ssid_len = 0; -#if defined TIZEN_EXT - } else if (g_str_equal(key, "WiFi.Vsie")){ - g_free(network->wifi.wifi_vsie); - network->wifi.wifi_vsie = g_try_malloc(size); - if (network->wifi.wifi_vsie) { - memcpy(network->wifi.wifi_vsie, data, size); - network->wifi.wifi_vsie_len = size; - } else - network->wifi.wifi_vsie_len = 0; -#endif } else { return -EINVAL; } @@ -2457,14 +2471,6 @@ const void *connman_network_get_blob(struct connman_network *network, return network->wifi.ssid; } -#if defined TIZEN_EXT - if (g_str_equal(key, "WiFi.Vsie")) { - if (size) - *size = network->wifi.wifi_vsie_len; - return network->wifi.wifi_vsie; - } -#endif - return NULL; } |