#define CASE_TO_STR(x) case x: return #x;
+/* LCOV_EXCL_START */
static const char* wifi_error_to_string(wifi_manager_error_e err)
{
switch (err) {
return "WIFI_MANAGER_ERROR_UNKNOWN";
}
}
+/* LCOV_EXCL_STOP */
NetWmesh* wmeshd_dbus_get_object()
{
return meshd_dbus_object;
}
+/* LCOV_EXCL_START */
int64_t wmeshd_dbus_generate_signal_number()
{
static int64_t i = 0;
return g_strcmp0(client->bus_name, b);
}
+/* LCOV_EXCL_STOP */
static inline GList* _wmeshd_dbus_client_list_find_client(const gchar *owner)
{
g_mutex_lock(&meshd_dbus_client_list_mutex);
client = _wmeshd_dbus_client_list_find_client(old_owner);
if (client) { /* found bus name in our bus list */
+ /* LCOV_EXCL_START */
WMESH_LOGD("bus(%s) stopped", old_owner);
meshd_dbus_client_list = g_list_remove_link(meshd_dbus_client_list, client);
+ /* LCOV_EXCL_STOP */
}
g_mutex_unlock(&meshd_dbus_client_list_mutex);
if (client) {
+ /* LCOV_EXCL_START */
ret = _wmeshd_dbus_client_list_cleanup(client);
if (WMESHD_ERROR_NONE != ret)
WMESH_LOGE("_wmeshd_dbus_client_list_cleanup() Fail(%d)", ret);
+ /* LCOV_EXCL_STOP */
}
}
}
NULL,
NULL);
if (0 == id) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("g_dbus_connection_signal_subscribe() Fail");
return WMESHD_ERROR_IO_ERROR;
+ /* LCOV_EXCL_STOP */
}
return WMESHD_ERROR_NONE;
/* Initialize Wi-Fi driver */
ret = wifi_manager_initialize(&wifi_handle);
- if (WIFI_MANAGER_ERROR_NONE != ret)
+ if (WIFI_MANAGER_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Failed to get wifi manager handle ! [%s(%X)]",
wifi_error_to_string(ret), ret);
+ /* LCOV_EXCL_STOP */
+ }
wifi_manager_is_activated(wifi_handle, &wifi_activated);
if (false == wifi_activated) {
+ /* LCOV_EXCL_START */
ret = wifi_manager_activate(wifi_handle, NULL, NULL);
if (WIFI_MANAGER_ERROR_NONE != ret)
WMESH_LOGE("Failed to activate wifi ! [%s(%X)]",
wifi_error_to_string(ret), ret);
+ /* LCOV_EXCL_STOP */
}
wifi_manager_deinitialize(wifi_handle);
if (service->mesh_activated) {
+ /* LCOV_EXCL_START */
/* Already activated */
manager_complete_enable(object, invocation, WMESHD_ERROR_NONE);
goto FINISH;
+ /* LCOV_EXCL_STOP */
}
/* Do API response first */
wmeshd_check_null_ret_error("info", info, FALSE);
/* Register event handler first */
- ret = wmesh_request_register_event_handler();
+ ret = wmesh_request_register_event_handler(service);
if (WMESHD_ERROR_IN_PROGRESS == ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Currently set netlink event handler !! [%d]", ret);
ret = WMESHD_ERROR_NONE;
+ /* LCOV_EXCL_STOP */
} else if (WMESHD_ERROR_NONE != ret) {
- WMESH_LOGE("Failed to register mesh event handler !! [%d]", ret);
+ WMESH_LOGE("Failed to register mesh event handler !! [%d]", ret); //LCOV_EXCL_LINE
}
ret = wmesh_interface_initialize(service->interface_info);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Failed to wmesh_interface_initialize [%d]", ret);
goto FINISH;
+ /* LCOV_EXCL_STOP */
}
FINISH:
ret = wmesh_request_unregister_event_handler();
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to unregister mesh event handler !! [%d]", ret);
+ WMESH_LOGE("Failed to unregister mesh event handler !! [%d]", ret); //LCOV_EXCL_LINE
/* Terminate daemon */
wmeshd_service_exit(service);
ret = wmesh_request_scan(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_scan !");
+ WMESH_LOGE("Failed to wmesh_request_scan !"); //LCOV_EXCL_LINE
net_wmesh_complete_scan(object, invocation, ret);
ret = wmesh_request_specific_scan(service, mesh_id, channel);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_specific_scan !");
+ WMESH_LOGE("Failed to wmesh_request_specific_scan !"); //LCOV_EXCL_LINE
net_wmesh_complete_specific_scan(object, invocation, ret);
ret = wmesh_request_cancel_scan(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_cancel_scan");
+ WMESH_LOGE("Failed to wmesh_request_cancel_scan"); //LCOV_EXCL_LINE
net_wmesh_complete_cancel_scan(object, invocation, ret);
return TRUE;
}
+/* LCOV_EXCL_START */
static void _on_scan_result_destroy(gpointer data)
{
wmesh_scan_result_s *scan_item = (wmesh_scan_result_s *)data;
g_free(info);
}
}
+/* LCOV_EXCL_STOP */
static gboolean _wmeshd_dbus_handle_get_found_mesh_networks(NetWmesh *object,
GDBusMethodInvocation *invocation,
ret = wmesh_request_get_networks(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_get_networks");
+ WMESH_LOGE("Failed to wmesh_request_get_networks"); //LCOV_EXCL_LINE
g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
/* scanned_mesh_network would be filled above request */
iter = service->scanned_mesh_network;
while (iter != NULL) {
+ /* LCOV_EXCL_START */
scan_item = (wmesh_scan_result_s*)iter->data;
g_variant_builder_open(&builder, G_VARIANT_TYPE_VARDICT);
g_variant_builder_close(&builder);
iter = g_list_next(iter);
+ /* LCOV_EXCL_STOP */
}
networks = g_variant_builder_end(&builder);
/* It handles creating virtual network and bridge */
ret = wmesh_request_enable_network(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_enable_network [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_request_enable_network [%d]", ret); //LCOV_EXCL_LINE
wmesh_start_monitor_service(service);
wmeshd_check_null_ret_error("info", info, FALSE);
if (FALSE == service->mesh_activated) {
+ /* LCOV_EXCL_START */
WMESH_LOGD("Mesh network is not activated yet");
ret = WMESHD_ERROR_OPERATION_FAILED;
net_wmesh_complete_disable_mesh(object, invocation, ret);
return TRUE;
+ /* LCOV_EXCL_STOP */
}
ret = wmesh_request_disable_network(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to disable mesh network !");
+ WMESH_LOGE("Failed to disable mesh network !"); //LCOV_EXCL_LINE
/* Stop Mesh Node Monitoring Service */
wmesh_stop_monitor_service(service);
/* It handles creating virtual network and bridge */
ret = wmesh_interface_check(service->interface_info->mesh_interface);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Mesh Interface doesn't exists");
state = FALSE;
+ /* LCOV_EXCL_STOP */
}
net_wmesh_complete_is_mesh_enabled(object, invocation, state);
ret = wmesh_request_get_joined_network(service);
if (WMESHD_ERROR_NONE == ret) {
+ /* LCOV_EXCL_START */
if (service->joined_network)
state = TRUE;
+ /* LCOV_EXCL_STOP */
}
net_wmesh_complete_is_joined(object, invocation, state, ret);
if (WMESHD_ERROR_NONE == ret) {
joined = service->joined_network;
if (joined) {
+ /* LCOV_EXCL_START */
net_wmesh_complete_get_joined_mesh_network(object, invocation,
joined->mesh_id, joined->bssid,
joined->channel, (int)joined->security,
joined->state, joined->ipv4_type, joined->ipv4_address,
joined->ipv4_netmask, ret);
+ /* LCOV_EXCL_STOP */
} else {
net_wmesh_complete_get_joined_mesh_network(object, invocation,
- "", "", 0, 0, 0, 0, "", "", WMESHD_ERROR_NO_DATA);
+ "", "", 0, 0, 0, 0, "", "", WMESHD_ERROR_NO_DATA); /* LCOV_EXCL_LINE */
}
} else {
net_wmesh_complete_get_joined_mesh_network(object, invocation,
- "", "", 0, 0, 0, 0, "", "", ret);
+ "", "", 0, 0, 0, 0, "", "", ret); /* LCOV_EXCL_LINE */
}
return TRUE;
ret = wmesh_request_get_connected_peers(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_get_connected_peers");
+ WMESH_LOGE("Failed to wmesh_request_get_connected_peers"); //LCOV_EXCL_LINE
g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
iter = service->connected_mesh_peers;
while (iter != NULL) {
+ /* LCOV_EXCL_START */
peer = (wmesh_peer_info_s*)iter->data;
g_variant_builder_open(&builder, G_VARIANT_TYPE_VARDICT);
g_variant_builder_close(&builder);
iter = g_list_next(iter);
+ /* LCOV_EXCL_STOP */
}
peer_list = g_variant_builder_end(&builder);
/* Set STP and gate_announce for connmand */
ret = wmesh_gdbus_set_mesh_gate(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_gdbus_set_mesh_gate [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_gdbus_set_mesh_gate [%d]", ret); //LCOV_EXCL_LINE
/* Set STP and gate_announce right now */
ret = wmesh_request_set_mesh_gate(info->bridge_interface,
info->mesh_interface, info->external_interface);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_gdbus_set_mesh_gate [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_gdbus_set_mesh_gate [%d]", ret); //LCOV_EXCL_LINE
net_wmesh_complete_set_gate(object, invocation, ret);
/* Set STP and gate_announce for connmand */
ret = wmesh_gdbus_set_mesh_gate(service);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_gdbus_set_mesh_gate [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_gdbus_set_mesh_gate [%d]", ret); //LCOV_EXCL_LINE
/* Unset STP and Gate Annouce right now */
ret = wmesh_request_unset_mesh_gate(info->bridge_interface,
info->mesh_interface, info->external_interface);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_unset_mesh_gate [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_request_unset_mesh_gate [%d]", ret); //LCOV_EXCL_LINE
net_wmesh_complete_unset_gate(object, invocation, ret);
ssid, mode, channel, visibility, max_sta,
security, passphrase);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_set_softap_config [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_request_set_softap_config [%d]", ret); //LCOV_EXCL_LINE
net_wmesh_complete_set_softap(object, invocation, ret);
ret = wmesh_request_get_softap_config(&interface, &ssid, &mode, &channel,
&visibility, &max_sta, &security, &passphrase);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Failed to wmesh_request_get_softap_config [%d]", ret);
net_wmesh_complete_get_softap(object, invocation, "", "", 0, 0, 0, 0,
"", ret);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
WMESH_LOGD("SSID : %s", ssid);
if (security == 1)
net_wmesh_complete_get_softap(object, invocation, ssid, mode, channel,
- visibility, max_sta, security, passphrase, ret);
+ visibility, max_sta, security, passphrase, ret); /* LCOV_EXCL_LINE */
else
net_wmesh_complete_get_softap(object, invocation, ssid, mode, channel,
- visibility, max_sta, security, "", ret);
+ visibility, max_sta, security, "", ret); /* LCOV_EXCL_LINE */
return TRUE;
}
/* Check softAP interface and execute it */
ret = wmesh_request_enable_softap(info->bridge_interface, info->softap_interface);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_enable_softap [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_request_enable_softap [%d]", ret); //LCOV_EXCL_LINE
net_wmesh_complete_enable_softap(object, invocation, ret);
/* Destroy softAP */
ret = wmesh_request_disable_softap(info->bridge_interface, info->softap_interface);
if (WMESHD_ERROR_NONE != ret)
- WMESH_LOGE("Failed to wmesh_request_disable_softap [%d]", ret);
+ WMESH_LOGE("Failed to wmesh_request_disable_softap [%d]", ret); //LCOV_EXCL_LINE
net_wmesh_complete_disable_softap(object, invocation, ret);
static gboolean _wmeshd_dbus_handle_create_mesh_network(NetWmesh *object,
GDBusMethodInvocation *invocation,
- gchar *mesh_id, gint channel, gint security,
+ gchar *mesh_id, gint channel, gint security, gint pmf,
gpointer user_data)
{
int ret = WMESHD_ERROR_NONE;
wmesh_service *service = (wmesh_service *)user_data;
wmeshd_security_type_e sec = (1 == security) ? WMESHD_SECURITY_SAE : WMESHD_SECURITY_NONE;
- ret = wmesh_request_create_mesh_network(service, mesh_id, channel, sec);
+ ret = wmesh_request_create_mesh_network(service, mesh_id, channel, sec, pmf);
net_wmesh_complete_create_mesh_network(object, invocation, ret);
}
static gboolean _wmeshd_dbus_handle_get_station_info(NetWmesh *object,
- GDBusMethodInvocation *invocation,
+ GDBusMethodInvocation *invocation, gint station_type,
gpointer user_data)
{
int ret = WMESHD_ERROR_NONE;
wmesh_service *service = (wmesh_service *)user_data;
wmesh_interface_s *info = service->interface_info;
- /* Clear mesh station list */
- g_list_free_full(service->station_list, _on_station_list_destroy);
- service->station_list = NULL;
+ if (station_type == WMESHD_STATION_TYPE_MESH_POINT) {
+ /* LCOV_EXCL_START */
+ /* Clear mesh station list */
+ g_list_free_full(service->station_list, _on_station_list_destroy);
+ service->station_list = NULL;
+
+ ret = wmesh_request_get_station_info(
+ info->mesh_interface, &service->station_list);
+ } else if (station_type == WMESHD_STATION_TYPE_SOFTAP) {
+ /* Clear softAP station list */
+ g_list_free_full(service->softap_station_list,
+ _on_station_list_destroy);
+ service->softap_station_list = NULL;
+
+ ret = wmesh_request_get_station_info(
+ info->softap_interface,
+ &service->softap_station_list);
+ } else {
+ WMESH_LOGE("Invalid station type");
+
+ g_dbus_method_invocation_return_error(invocation,
+ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid station type");
+
+ return FALSE;
+ /* LCOV_EXCL_STOP */
+ }
- ret = wmesh_request_get_station_info(
- info->mesh_interface, &service->station_list);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Failed to wmesh_request_get_station_info");
g_dbus_method_invocation_return_error(invocation,
G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Request Failed");
+ /* LCOV_EXCL_STOP */
} else {
- /*
- * sh-3.2# iw mesh0 station dump
- * Station 7c:dd:90:62:37:cf (on mesh0)
- * inactive time: 1685 ms
- * rx bytes: 34174
- * rx packets: 1181
- * tx bytes: 6877
- * tx packets: 76
- * tx retries: 0
- * tx failed: 0
- * beacon loss: 0
- * signal: -64 dBm
- * signal avg: -63 dBm
- * tx bitrate: 54.0 MBit/s
- * rx bitrate: 5.5 MBit/s
- * mesh llid: 51731
- * mesh plid: 35432
- * mesh plink: ESTAB
- * mesh local PS mode: ACTIVE
- * mesh peer PS mode: ACTIVE
- * mesh non-peer PS mode: ACTIVE
- * authorized: yes
- * authenticated: yes
- * associated: yes
- * preamble: long
- * WMM/WME: yes
- * MFP: no
- * TDLS peer: no
- * DTIM period: 0
- * beacon interval:1000
- * short slot time:yes
- * connected time: 256 seconds
- */
+ /*
+ * sh-3.2# iw mesh0 station dump
+ * Station 7c:dd:90:62:37:cf (on mesh0)
+ * inactive time: 1685 ms
+ * rx bytes: 34174
+ * rx packets: 1181
+ * tx bytes: 6877
+ * tx packets: 76
+ * tx retries: 0
+ * tx failed: 0
+ * beacon loss: 0
+ * signal: -64 dBm
+ * signal avg: -63 dBm
+ * tx bitrate: 54.0 MBit/s
+ * rx bitrate: 5.5 MBit/s
+ * mesh llid: 51731
+ * mesh plid: 35432
+ * mesh plink: ESTAB
+ * mesh local PS mode: ACTIVE
+ * mesh peer PS mode: ACTIVE
+ * mesh non-peer PS mode: ACTIVE
+ * authorized: yes
+ * authenticated: yes
+ * associated: yes
+ * preamble: long
+ * WMM/WME: yes
+ * MFP: no
+ * TDLS peer: no
+ * DTIM period: 0
+ * beacon interval:1000
+ * short slot time:yes
+ * connected time: 256 seconds
+ */
+
+ /* LCOV_EXCL_START */
/* Get station information and make variant data */
g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
- iter = service->station_list;
+ if (station_type == WMESHD_STATION_TYPE_MESH_POINT)
+ iter = service->station_list;
+ else
+ iter = service->softap_station_list;
+
while (iter != NULL) {
wmesh_station_info_s *item = (wmesh_station_info_s*)iter->data;
g_variant_new_uint32(item->tx_bitrate)); /* 10 times */
g_variant_builder_add(&builder, "{sv}", "rx_bitrate",
g_variant_new_uint32(item->rx_bitrate)); /* 10 times */
- g_variant_builder_add(&builder, "{sv}", "mesh_llid",
- g_variant_new_uint16(item->llid));
- g_variant_builder_add(&builder, "{sv}", "mesh_plid",
- g_variant_new_uint16(item->plid));
- g_variant_builder_add(&builder, "{sv}", "mesh_plink",
- g_variant_new_byte(item->mesh_plink)); /* 0 : DISCON, 1 : ESTAB */
- g_variant_builder_add(&builder, "{sv}", "local_ps_mode",
- g_variant_new_uint32(item->local_ps_mode)); /* 0 : INACTIVE, 1 : ACTIVE */
- g_variant_builder_add(&builder, "{sv}", "peer_ps_mode",
- g_variant_new_uint32(item->peer_ps_mode)); /* 0 : INACTIVE, 1 : ACTIVE */
- g_variant_builder_add(&builder, "{sv}", "non_peer_ps_mode",
- g_variant_new_uint32(item->non_peer_ps_mode)); /* 0 : INACTIVE, 1 : ACTIVE */
+ if (station_type == WMESHD_STATION_TYPE_MESH_POINT) {
+ g_variant_builder_add(&builder, "{sv}", "mesh_llid",
+ g_variant_new_uint16(item->llid));
+ g_variant_builder_add(&builder, "{sv}", "mesh_plid",
+ g_variant_new_uint16(item->plid));
+ g_variant_builder_add(&builder, "{sv}", "mesh_plink",
+ g_variant_new_byte(item->mesh_plink)); /* 0 : DISCON, 1 : ESTAB */
+ g_variant_builder_add(&builder, "{sv}", "local_ps_mode",
+ g_variant_new_uint32(item->local_ps_mode)); /* 0 : INACTIVE, 1 : ACTIVE */
+ g_variant_builder_add(&builder, "{sv}", "peer_ps_mode",
+ g_variant_new_uint32(item->peer_ps_mode)); /* 0 : INACTIVE, 1 : ACTIVE */
+ g_variant_builder_add(&builder, "{sv}", "non_peer_ps_mode",
+ g_variant_new_uint32(item->non_peer_ps_mode)); /* 0 : INACTIVE, 1 : ACTIVE */
+ }
g_variant_builder_add(&builder, "{sv}", "authorized",
g_variant_new_boolean(item->authorized));
+ g_variant_builder_add(&builder, "{sv}", "authenticated",
+ g_variant_new_boolean(item->authenticated));
g_variant_builder_add(&builder, "{sv}", "associated",
g_variant_new_boolean(item->associated));
g_variant_builder_add(&builder, "{sv}", "preamble",
g_object_unref(station);
}
+ /* LCOV_EXCL_STOP */
return TRUE;
}
ret = wmesh_request_get_mpath_info(
info->mesh_interface, &service->mpath_list);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Failed to wmesh_request_get_mpath_info");
g_dbus_method_invocation_return_error(invocation,
G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Request Failed");
+ /* LCOV_EXCL_STOP */
} else {
- /*
- * Example) sh-3.2# iw mesh0 mpath dump
- * DEST ADDR NEXT HOP IFACE SN METRIC QLEN EXPTIME DTIM DRET FLAGS
- * 7c:dd:90:62:37:cf 7c:dd:90:62:37:cf mesh0 221 152 0 10 100 0 0x5
- */
+ /*
+ * Example) sh-3.2# iw mesh0 mpath dump
+ * DEST ADDR NEXT HOP IFACE SN METRIC QLEN EXPTIME DTIM DRET FLAGS
+ * 7c:dd:90:62:37:cf 7c:dd:90:62:37:cf mesh0 221 152 0 10 100 0 0x5
+ */
+
+ /* LCOV_EXCL_START */
/* Get mesh path information and make variant data */
g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
net_wmesh_complete_get_mpath_info(object, invocation, mpath_data, ret);
g_object_unref(mpath_data);
+ /* LCOV_EXCL_STOP */
}
return TRUE;
ret = wmesh_request_get_meshconf_info(service);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("Failed to wmesh_request_get_mpath_info");
g_dbus_method_invocation_return_error(invocation,
G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Request Failed");
+ /* LCOV_EXCL_STOP */
} else {
/* Get mesh path information and make variant data */
g_variant_builder_init(&builder, G_VARIANT_TYPE("a{sv}"));
meshd_activator_dbus_object = manager_skeleton_new();
if (NULL == meshd_activator_dbus_object) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("manager_skeleton_new() Fail");
return;
+ /* LCOV_EXCL_STOP */
}
g_signal_connect(meshd_activator_dbus_object, "handle-enable",
G_DBUS_INTERFACE_SKELETON(meshd_activator_dbus_object),
conn, WMESH_DBUS_MANAGER_OBJPATH, &error);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("g_dbus_interface_skeleton_export() Fail(%s)", error->message);
g_error_free(error);
+ /* LCOV_EXCL_STOP */
}
}
meshd_dbus_object = net_wmesh_skeleton_new();
if (NULL == meshd_dbus_object) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("net_wmesh_skeleton_new() Fail");
return;
+ /* LCOV_EXCL_STOP */
}
g_signal_connect(meshd_dbus_object, "handle-scan",
ret = g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(meshd_dbus_object),
conn, WMESH_DBUS_OBJPATH, &error);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("g_dbus_interface_skeleton_export() Fail(%s)", error->message);
g_error_free(error);
+ /* LCOV_EXCL_STOP */
}
ret = _wmeshd_dbus_subscribe_name_owner_changed(conn);
if (WMESHD_ERROR_NONE != ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("_wmeshd_dbus_subscribe_name_owner_changed() Fail(%d)", ret);
return;
+ /* LCOV_EXCL_STOP */
}
}
+/* LCOV_EXCL_START */
static void _wmeshd_dbus_on_name_lost(GDBusConnection *conn, const gchar *name,
gpointer user_data)
{
WMESH_LOGD("Lost the name %s", name);
}
+/* LCOV_EXCL_STOP */
static void _wmeshd_dbus_on_name_acquired(GDBusConnection *conn, const gchar *name,
gpointer user_data)
service,
NULL);
if (0 == id) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("g_bus_own_name() Fail");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/* Get D-Bus owner to activate mesh service daemon */
g_free(info->external_interface);
if (service->joined_network) {
+ /* LCOV_EXCL_START */
g_free(service->joined_network->mesh_id);
g_free(service->joined_network->bssid);
g_free(service->joined_network);
service->joined_network = NULL;
+ /* LCOV_EXCL_STOP */
}
/* Clear scan list */
if (service->scanned_mesh_network)
- g_list_free_full(service->scanned_mesh_network, _on_scan_result_destroy);
+ g_list_free_full(service->scanned_mesh_network, _on_scan_result_destroy); /* LCOV_EXCL_LINE */
service->scanned_mesh_network = NULL;
/* Clear connected peers list */
if (service->connected_mesh_peers)
- g_list_free_full(service->connected_mesh_peers, _on_peer_info_destroy);
+ g_list_free_full(service->connected_mesh_peers, _on_peer_info_destroy); /* LCOV_EXCL_LINE */
service->connected_mesh_peers = NULL;
/* Clear mesh path list */
if (service->mpath_list)
- g_list_free_full(service->mpath_list, _on_mpath_list_destroy);
+ g_list_free_full(service->mpath_list, _on_mpath_list_destroy); /* LCOV_EXCL_LINE */
service->mpath_list = NULL;
/* Clear mesh station list */
if (service->station_list)
- g_list_free_full(service->station_list, _on_station_list_destroy);
+ g_list_free_full(service->station_list, _on_station_list_destroy); /* LCOV_EXCL_LINE */
service->station_list = NULL;
+ /* Clear mesh station list */
+ if (service->softap_station_list)
+ g_list_free_full(service->softap_station_list, _on_station_list_destroy); /* LCOV_EXCL_LINE */
+ service->softap_station_list = NULL;
+
g_free(service->interface_info);
service->interface_info = NULL;
}
/* Initialize dbus interface */
ret = _wmeshd_dbus_interface_init(service);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
WMESH_LOGE("_wmeshd_dbus_interface_init failed!!!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
return TRUE;