count = (int)g_slist_length(list);
if (count == 0) {
- WIFI_LOG(WIFI_INFO, "No hidden AP found");
- return;
+ WIFI_LOG(WIFI_INFO, "No hidden AP found"); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
for (i = 0; i < count; ++i) {
net_ssid_scan_bss_info_s *info = (net_ssid_scan_bss_info_s *)list->data;
prof_info = g_try_malloc0(sizeof(net_profile_info_s));
if (prof_info == NULL) {
- WIFI_LOG(WIFI_ERROR, "Failed to alloc profile");
- return;
+ WIFI_LOG(WIFI_ERROR, "Failed to alloc profile"); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
if (net_init_profile_info(prof_info) != NET_ERR_NONE) {
- WIFI_LOG(WIFI_ERROR, "Failed to init profile");
- g_free(prof_info);
- return;
+ WIFI_LOG(WIFI_ERROR, "Failed to init profile"); //LCOV_EXCL_LINE
+ g_free(prof_info); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
g_strlcpy(prof_info->essid, info->ssid, NET_WLAN_ESSID_LEN);
memcpy(prof_info->raw_ssid, info->raw_ssid, info->raw_ssid_len);
count = (int)g_slist_length(list);
if (count == 0) {
- WIFI_LOG(WIFI_INFO, "No AP found !!");
- return;
+ WIFI_LOG(WIFI_INFO, "No AP found !!"); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
for (list = bss_list; list; list = list->next) {
net_bssid_scan_bss_info_s *ap = (net_bssid_scan_bss_info_s *)list->data;
net_profile_info_s *profile = g_try_malloc0(sizeof(net_profile_info_s));
if (profile == NULL) {
- WIFI_LOG(WIFI_ERROR, "Failed to alloc profile");
- return;
+ WIFI_LOG(WIFI_ERROR, "Failed to alloc profile"); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
if (net_init_profile_info(profile) != NET_ERR_NONE) {
- WIFI_LOG(WIFI_ERROR, "Failed to init profile");
- g_free(profile);
- return;
+ WIFI_LOG(WIFI_ERROR, "Failed to init profile"); //LCOV_EXCL_LINE
+ g_free(profile); //LCOV_EXCL_LINE
+ return; //LCOV_EXCL_LINE
}
g_strlcpy(profile->essid, (char *)ap->ssid, NET_WLAN_ESSID_LEN+1);
}
}
+//LCOV_EXCL_START
static void __update_netlink_scan_profile_iterator(GSList *bss_list)
{
int count = 0;
(net_profile_info_s *)profile);
}
}
+//LCOV_EXCL_STOP
static void __convert_profile_info_to_wifi_info(net_wifi_connection_info_s *wifi_info,
net_profile_info_s *ap_info)
rv = net_open_connection_with_wifi_info(&wifi_info);
if (rv == NET_ERR_ACCESS_DENIED) {
- WIFI_LOG(WIFI_ERROR, "Access denied");
- return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
+ WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
} else if (rv != NET_ERR_NONE)
- return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_NONE;
}
__bssid_scan_cb(event_cb);
break;
case NET_EVENT_WIFI_IP_CONFLICT_IND:
- WIFI_LOG(WIFI_INFO, "Got ip conflict event IND\n");
- __ip_conflict_cb(event_cb);
+ WIFI_LOG(WIFI_INFO, "Got ip conflict event IND\n"); //LCOV_EXCL_LINE
+ __ip_conflict_cb(event_cb); //LCOV_EXCL_LINE
break;
case NET_EVENT_WIFI_NETLINK_SCAN_IND:
- WIFI_LOG(WIFI_INFO, "Got NETLINK scan done IND\n");
- __netlink_scan_cb(event_cb);
+ WIFI_LOG(WIFI_INFO, "Got NETLINK scan done IND\n"); //LCOV_EXCL_LINE
+ __netlink_scan_cb(event_cb); //LCOV_EXCL_LINE
break;
case NET_EVENT_WIFI_SCAN_CHANGED:
WIFI_LOG(WIFI_INFO, "Got Wi-Fi ScanChanged event\n");
__power_on_off_cb(event_cb, is_requested);
break;
case NET_EVENT_WIFI_TDLS_DISCOVERED_IND:
- WIFI_LOG(WIFI_INFO, "Received TDLS Discover Ind");
- __tdls_discovered_cb(event_cb);
+ WIFI_LOG(WIFI_INFO, "Received TDLS Discover Ind"); //LCOV_EXCL_LINE
+ __tdls_discovered_cb(event_cb); //LCOV_EXCL_LINE
break;
case NET_EVENT_WIFI_TDLS_CONNECTED_IND:
- WIFI_LOG(WIFI_INFO, "Received TDLS Connected Ind");
- __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_CONNECTED, event_cb);
+ WIFI_LOG(WIFI_INFO, "Received TDLS Connected Ind"); //LCOV_EXCL_LINE
+ __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_CONNECTED, event_cb); //LCOV_EXCL_LINE
break;
case NET_EVENT_WIFI_TDLS_DISCONNECTED_IND:
- WIFI_LOG(WIFI_INFO, "Received TDLS Disconnected Ind");
- __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_DISCONNECTED, event_cb);
+ WIFI_LOG(WIFI_INFO, "Received TDLS Disconnected Ind"); //LCOV_EXCL_LINE
+ __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_DISCONNECTED, event_cb); //LCOV_EXCL_LINE
break;
case NET_EVENT_WIFI_MULTI_SCAN_RSP:
- WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan RSP\n");
- __multi_scan_cb(event_cb);
+ WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan RSP\n"); //LCOV_EXCL_LINE
+ __multi_scan_cb(event_cb); //LCOV_EXCL_LINE
break;
case NET_EVENT_WIFI_MULTI_SCAN_IND:
- WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan IND\n");
- __multi_scan_cb(event_cb);
+ WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan IND\n"); //LCOV_EXCL_LINE
+ __multi_scan_cb(event_cb); //LCOV_EXCL_LINE
break;
default:
break;
return true;
}
+//LCOV_EXCL_START
void _wifi_set_cs_tid(int tid)
{
net_set_cs_tid(tid);
{
net_unset_cs_tid(tid);
}
+//LCOV_EXCL_STOP
int _wifi_activate(wifi_manager_h wifi, wifi_manager_activated_cb callback,
gboolean wifi_picker_test, void *user_data)
WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
} else if (rv == NET_ERR_INVALID_OPERATION) {
- WIFI_LOG(WIFI_ERROR, "Mode was already set");
+ WIFI_LOG(WIFI_ERROR, "Mode was already set"); //LCOV_EXCL_LINE
} else if (rv == NET_ERR_NONE) {
return WIFI_MANAGER_ERROR_NONE;
}
rv = net_bssid_scan_wifi(activated);
if (rv == NET_ERR_ACCESS_DENIED) {
- WIFI_LOG(WIFI_ERROR, "Access denied");
- return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
+ WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
} else if (rv == NET_ERR_INVALID_OPERATION) {
- return WIFI_MANAGER_ERROR_INVALID_OPERATION;
+ return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
} else if (rv == NET_ERR_NONE) {
__set_bssid_scan_cb(wifi, callback, user_data);
return WIFI_MANAGER_ERROR_NONE;
}
- WIFI_LOG(WIFI_ERROR, "Operation Failed");
- return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+ WIFI_LOG(WIFI_ERROR, "Operation Failed"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
+//LCOV_EXCL_START
bool _wifi_check_netlink_scan_validity(wifi_manager_netlink_scan_h netlink_scan)
{
GSList *list = NULL;
return WIFI_MANAGER_ERROR_OPERATION_FAILED;
}
-//LCOV_EXCL_START
int _wifi_add_vsie(wifi_manager_h wifi,
wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
{
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
int _wifi_foreach_found_netlink_scan_ap(wifi_manager_found_ap_cb callback, void *user_data)
{
int rv;
__clear_profile_list(&bss_profile_iterator);
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int _wifi_open_profile(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
wifi_manager_connected_cb callback, void *user_data)
if (g_str_has_suffix(id, "ieee8021x") == TRUE) {
h->eap_config = g_new0(wifi_eap_config_s, 1);
if (h->eap_config == NULL) {
- g_free(h);
- break;
+ g_free(h);//LCOV_EXCL_LINE
+ break;//LCOV_EXCL_LINE
}
rv = __load_eap_configurations(id, &h->name,
&h->security_type, &h->proxy_address, &h->is_hidden, &h->eap_config, &h->last_error);
}
if (rv != WIFI_MANAGER_ERROR_NONE) {
+ //LCOV_EXCL_START
g_free(h->name);
g_free(h->passphrase);
g_free(h->proxy_address);
g_free(h->eap_config);
}
g_free(h);
+ //LCOV_EXCL_STOP
WIFI_LOG(WIFI_ERROR, "Fail to load configurations [%d]", rv); //LCOV_EXCL_LINE
} else {
h->address_family = WIFI_MANAGER_ADDRESS_FAMILY_IPV4;
break;
case 'w':
case 'W':
- profile = TIZEN_PROFILE_WEARABLE;
- break;
+ profile = TIZEN_PROFILE_WEARABLE; //LCOV_EXCL_LINE
+ break; //LCOV_EXCL_LINE
case 't':
case 'T':
- profile = TIZEN_PROFILE_TV;
- break;
+ profile = TIZEN_PROFILE_TV; //LCOV_EXCL_LINE
+ break; //LCOV_EXCL_LINE
case 'i':
case 'I':
- profile = TIZEN_PROFILE_IVI;
- break;
+ profile = TIZEN_PROFILE_IVI; //LCOV_EXCL_LINE
+ break; //LCOV_EXCL_LINE
default: // common or unknown ==> ALL ARE COMMON.
- profile = TIZEN_PROFILE_COMMON;
+ profile = TIZEN_PROFILE_COMMON; //LCOV_EXCL_LINE
}
free(profileName);
*specific_scan = g_try_malloc0(sizeof(int));
if (*specific_scan == NULL) {
- WIFI_LOG(WIFI_ERROR, "Failed to create specific scan handle");
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+ WIFI_LOG(WIFI_ERROR, "Failed to create specific scan handle"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
WIFI_LOG(WIFI_INFO, "New specific scan handle[%p]", *specific_scan);
wifi_manager_multi_scan_ap_s *ap = (wifi_manager_multi_scan_ap_s*)g_try_malloc0(sizeof(wifi_manager_multi_scan_ap_s));
if (!ap) {
- WIFI_LOG(WIFI_ERROR, "Failed to allocate memory");
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+ WIFI_LOG(WIFI_ERROR, "Failed to allocate memory"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
g_strlcpy(ap->str, essid, NET_WLAN_ESSID_LEN);
ap->flag = true;
wifi_manager_multi_scan_ap_s *ap = (wifi_manager_multi_scan_ap_s*)g_try_malloc0(sizeof(wifi_manager_multi_scan_ap_s));
if (!ap) {
- WIFI_LOG(WIFI_ERROR, "Failed to allocate memory");
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
+ WIFI_LOG(WIFI_ERROR, "Failed to allocate memory"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
g_strlcpy(ap->str, str, NET_WLAN_FREQ_LEN);
ap->flag = false;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_initialize_cs(int tid, wifi_manager_h *wifi)
{
__NETWORK_CAPI_FUNC_ENTER__;
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_activate(wifi_manager_h wifi,
wifi_manager_activated_cb callback, void *user_data)
}
if (_get_tizen_profile() == TIZEN_PROFILE_TV) {
+ //LCOV_EXCL_START
FILE *fp = NULL;
char buf[WIFI_MAC_ADDR_LENGTH + 1];
if (0 == access(WIFI_MAC_ADDR_PATH, F_OK))
fp = fopen(WIFI_MAC_ADDR_PATH, "r");
if (fp == NULL) {
- WIFI_LOG(WIFI_ERROR, "Failed to open file" //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR, "Failed to open file"
" %s\n", WIFI_MAC_ADDR_PATH);
- __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED;
}
if (fgets(buf, sizeof(buf), fp) == NULL) {
WIFI_LOG(WIFI_ERROR, "Failed to get MAC"
- " info from %s\n", WIFI_MAC_ADDR_PATH); //LCOV_EXCL_LINE
- fclose(fp); //LCOV_EXCL_LINE
- __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+ " info from %s\n", WIFI_MAC_ADDR_PATH);
+ fclose(fp);
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED;
}
WIFI_LOG(WIFI_INFO, "%s : %s\n", WIFI_MAC_ADDR_PATH, buf);
*mac_address = strndup(buf, WIFI_MAC_ADDR_LENGTH + 1);
if (*mac_address == NULL) {
- WIFI_LOG(WIFI_ERROR, "strndup() failed"); //LCOV_EXCL_LINE
- fclose(fp); //LCOV_EXCL_LINE
- __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR, "strndup() failed");
+ fclose(fp);
+ __NETWORK_CAPI_FUNC_EXIT__;
+ return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
}
fclose(fp);
+ //LCOV_EXCL_STOP
} else {
*mac_address = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
if (strlen(*mac_address) == 0) {
WIFI_LOG(WIFI_ERROR, "Mac address is invalid" //LCOV_EXCL_LINE
" from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
- g_free(*mac_address);
- *mac_address = NULL;
+ g_free(*mac_address); //LCOV_EXCL_LINE
+ *mac_address = NULL; //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
if (rv != WIFI_MANAGER_ERROR_NONE) {
WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi scan state"); //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
- return rv;
+ return rv; //LCOV_EXCL_LINE
}
__NETWORK_CAPI_FUNC_EXIT__;
return _wifi_ip_conflict_detect_is_enabled(state);
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_set_ip_conflict_period(wifi_manager_h wifi,
unsigned int initial_time)
{
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
if (!(__wifi_check_handle_validity(wifi))) {
- WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
}
return _wifi_set_ip_conflict_period(initial_time);
{
CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
if (initial_time == NULL || !(__wifi_check_handle_validity(wifi))) {
- WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+ WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+ return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
}
return _wifi_get_ip_conflict_period(initial_time);
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_get_ip_conflict_state(wifi_manager_h wifi,
wifi_manager_ip_conflict_state_e *state)
rv = _wifi_cancel_wps();
if (rv != WIFI_MANAGER_ERROR_NONE)
- WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Error!! WPS Cancel Request failed. rv[%d]\n", rv);
+ WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Error!! WPS Cancel Request failed. rv[%d]\n", rv); //LCOV_EXCL_LINE
__NETWORK_CAPI_FUNC_EXIT__;
return rv;
return _wifi_bssid_scan_request(wifi, callback, user_data);
}
+//LCOV_EXCL_START
EXPORT_API int wifi_manager_netlink_scan(wifi_manager_h wifi, wifi_manager_netlink_scan_h netlink_scan,
wifi_manager_netlink_scan_finished_cb callback, void *user_data)
{
return _wifi_netlink_scan_request(wifi, netlink_scan, callback, user_data);
}
-//LCOV_EXCL_START
EXPORT_API int wifi_manager_add_vsie(wifi_manager_h wifi,
wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
{
__NETWORK_CAPI_FUNC_EXIT__;
return _wifi_get_ap_auto_connect(ap, autoconnect);
}
-//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_netlink_scan_create(wifi_manager_h wifi,
wifi_manager_netlink_scan_h *netlink_scan)
__NETWORK_CAPI_FUNC_EXIT__;
return WIFI_MANAGER_ERROR_NONE;
}
+//LCOV_EXCL_STOP
EXPORT_API int wifi_manager_specific_scan_create(wifi_manager_h wifi,
wifi_manager_specific_scan_h *specific_scan)