return proxy;
}
+/* LCOV_EXCL_START */
static void _dbus_name_owner_notify(GObject *object, GParamSpec *pspec,
gpointer *user_data)
{
- /* LCOV_EXCL_START */
GDBusProxy *proxy = G_DBUS_PROXY(object);
gchar *name_owner = g_dbus_proxy_get_name_owner(proxy);
wifi_mesh_h handle = (wifi_mesh_h)user_data;
LOGD("Name owner notify [%s]", name_owner);
if (NULL == name_owner)
- _wifi_mesh_close_gdbus_call(handle); //LCOV_EXCL_LINE
-
+ _wifi_mesh_close_gdbus_call(handle);
g_free(name_owner);
- /* LCOV_EXCL_STOP */
+
}
+/* LCOV_EXCL_STOP */
static int _wifi_mesh_create_gdbus_call(wifi_mesh_h handle)
{
}
static GList *g_networks = { 0, };
+/* LCOV_EXCL_START */
static void _wifi_mesh_free_network(gpointer data)
{
- /* LCOV_EXCL_START */
struct mesh_network_s *network = data;
g_free(network);
network = NULL;
- /* LCOV_EXCL_STOP */
}
+/* LCOV_EXCL_STOP */
static void _mesh_remove_networks()
{
return result;
}
+/* LCOV_EXCL_START */
static void _mesh_signal_handler(GDBusConnection *connection,
const gchar *sender_name, const gchar *object_path, const gchar *interface_name,
const gchar *signal_name, GVariant *parameters, gpointer user_data)
{
- /* LCOV_EXCL_START */
mesh_handle_s *h = user_data;
if (NULL == h) {
- /* LCOV_EXCL_START */
LOGE("user_data is null");
return;
- /* LCOV_EXCL_STOP */
}
if (NULL == h->event_handler) {
- /* LCOV_EXCL_START */
LOGE("event_handler is null");
return;
- /* LCOV_EXCL_STOP */
}
LOGD("signal received = %s", signal_name);
ev.data.wifi_mesh_enable = calloc(1, sizeof(wifi_mesh_enabled_event_s));
if (NULL == ev.data.wifi_mesh_enable)
- LOGE("Failed to memory allocation !"); // LCOV_EXCL_LINE
+ LOGE("Failed to memory allocation !");
ev.data.wifi_mesh_enable->result = __convert_service_error_type(result);
ev.data.connection_state = calloc(1, sizeof(wifi_mesh_connection_state_event_s));
if (NULL == ev.data.connection_state)
- LOGE("Failed to memory allocation !"); // LCOV_EXCL_LINE
+ LOGE("Failed to memory allocation !");
g_snprintf(ev.data.connection_state->mesh_id, MAX_MESHID_LEN, "%s", mesh_id);
g_snprintf(ev.data.connection_state->bssid, MAX_BSSID_LEN, "%s", bssid);
ev.data.connection_state->channel = channel;
wifi_mesh_event_data_s ev;
ev.data.sta_info = calloc(1, sizeof(wifi_mesh_other_station_event_s));
if (NULL == ev.data.sta_info)
- LOGE("Failed to memory allocation !"); // LCOV_EXCL_LINE
+ LOGE("Failed to memory allocation !");
g_variant_get(parameters, "(si)", &bssid, &station_type);
memcpy(ev.data.sta_info->bssid, bssid, MAX_BSSID_LEN);
ev.data.sta_info->station_type = station_type;
ev.data.sta_info = calloc(1, sizeof(wifi_mesh_other_station_event_s));
if (NULL == ev.data.sta_info)
- LOGE("Failed to memory allocation !"); // LCOV_EXCL_LINE
+ LOGE("Failed to memory allocation !");
g_variant_get(parameters, "(si)", &bssid, &station_type);
memcpy(ev.data.sta_info->bssid, bssid, MAX_BSSID_LEN);
ev.data.sta_info->station_type = station_type;
free(ev.data.sta_info);
}
}
+/* LCOV_EXCL_STOP */
static void _mesh_subscribe_event(wifi_mesh_h handle)
{
return WIFI_MESH_ERROR_NONE;
}
+ /* LCOV_EXCL_START */
if (WIFI_MESH_ERROR_NONE != result)
return result;
}
*_network = &g_joined_network;
+ /* LCOV_EXCL_STOP */
} else if (error) {
/* LCOV_EXCL_START */
LOGE("Failed DBus call [%s]", error->message);
-1,
NULL, &error);
if (variant) {
+ /* LCOV_EXCL_START */
/* handle station list here */
g_variant_get(variant, "(aa{sv}i)", &iter, &result);
while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
struct mesh_station_info_s station;
memset(&station, 0, sizeof(struct mesh_station_info_s));
- /* LCOV_EXCL_START */
station.sta_type = sta_type;
while (g_variant_iter_loop(iter_row, "{sv}", &key, &val)) {
if (strcasecmp(key, "bssid") == 0) {
}
}
g_variant_iter_free(iter_row);
- /* LCOV_EXCL_STOP */
}
g_variant_iter_free(iter);
LOGD("get_saved_mesh_networks status 0x%x", result);
result = __convert_service_error_type(result);
+ /* LCOV_EXCL_STOP */
} else if (error) {
/* LCOV_EXCL_START */
LOGE("Failed DBus call [%s]", error->message);
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL, &error);
+ /* LCOV_EXCL_START */
if (variant) {
g_variant_get(variant, "(a{sv}i)", &iter, &result);
- /* LCOV_EXCL_START */
struct mesh_meshconf_dump_s *meshparam =
g_malloc0(sizeof(struct mesh_meshconf_dump_s));
LOGE("GATE_ANNOUNCEMENTS=%u", meshparam->gate_announcements);
}
}
- /* LCOV_EXCL_STOP */
g_variant_iter_free(iter);
LOGD("get_meshconf_info status 0x%x", result);
result = __convert_service_error_type(result);
*meshconf = (wifi_mesh_meshconf_info_h) meshparam;
+ /* LCOV_EXCL_STOP */
} else if (error) {
/* LCOV_EXCL_START */
LOGE("Failed DBus call [%s]", error->message);