char str_error[ERROR_MESSAGE_LENGTH];
int stp_state = (state) ? 1 : 0;
struct ifreq ifr;
- unsigned long arg[4] =
- { BRCTL_SET_BRIDGE_STP_STATE, stp_state, 0, 0 };
+ unsigned long arg[4] = {
+ BRCTL_SET_BRIDGE_STP_STATE,
+ stp_state, 0, 0 };
if (NULL == bridge_name || strlen(bridge_name) > IFNAMSIZ) {
MESH_LOGE("Invalid parameter [%p]", bridge_name);
return MESHD_ERROR_NONE;
}
-int mesh_gdbus_mesh_specific_scan(mesh_service *service, gchar *mesh_id,
- gint channel)
+int mesh_gdbus_mesh_specific_scan(mesh_service *service, gchar *mesh_id, gint channel)
{
GVariant *variant = NULL;
GError *error = NULL;
}
while (g_variant_iter_loop(property, "{sv}", &key, &val)) {
- if (strcasecmp(key, "Name") == 0) {
+ if (strcasecmp(key, "Name") == 0) {
buf = g_variant_get_string(val, &len);
joined_info->mesh_id = g_strdup(buf);
- }
- else if (strcasecmp(key, "BSSID") == 0) {
+ } else if (strcasecmp(key, "BSSID") == 0) {
buf = g_variant_get_string(val, &len);
joined_info->bssid = g_strdup(buf);
- }
- else if (strcasecmp(key, "State") == 0) {
+ } else if (strcasecmp(key, "State") == 0) {
buf = g_variant_get_string(val, &len);
MESH_LOGD(" State : %s", buf);
} else if (g_strcmp0(buf, "ready") == 0 || g_strcmp0(buf, "online") == 0) {
joined_info->state = MESHD_CONNECTION_STATE_CONNECTED;
}
- }
- else if (strcasecmp(key, "Security") == 0) {
+ } else if (strcasecmp(key, "Security") == 0) {
buf = g_variant_get_string(val, &len);
if (g_strcmp0("sae", buf) == 0)
joined_info->security = MESHD_SECURITY_SAE;
else
joined_info->security = MESHD_SECURITY_NONE;
- }
- else if (strcasecmp(key, "Frequency") == 0) {
+ } else if (strcasecmp(key, "Frequency") == 0) {
joined_info->channel = __frequency_to_channel(g_variant_get_uint16(val));
}
}
scan_info->object_path = g_strdup(obj_path);
while (g_variant_iter_loop(property, "{sv}", &key, &val)) {
- if (strcasecmp(key, "Name") == 0) {
+ if (strcasecmp(key, "Name") == 0) {
const char *buf = g_variant_get_string(val, &len);
scan_info->mesh_id = g_strdup(buf);
MESH_LOGD(" Mesh ID : %s", scan_info->mesh_id);
- }
- else if (strcasecmp(key, "BSSID") == 0) {
+ } else if (strcasecmp(key, "BSSID") == 0) {
const char *buf = g_variant_get_string(val, &len);
scan_info->bssid = g_strdup(buf);
MESH_LOGD(" BSSID : %s", scan_info->bssid);
- }
- else if (strcasecmp(key, "State") == 0) {
+ } else if (strcasecmp(key, "State") == 0) {
const char *buf = g_variant_get_string(val, &len);
MESH_LOGD(" State : %s", buf);
} else if (g_strcmp0(buf, "ready") == 0 || g_strcmp0(buf, "online") == 0) {
scan_info->state = MESHD_CONNECTION_STATE_CONNECTED;
}
- }
- else if (strcasecmp(key, "Security") == 0) {
+ } else if (strcasecmp(key, "Security") == 0) {
const char *buf = g_variant_get_string(val, &len);
MESH_LOGD(" Security : %s", buf);
if (g_strcmp0("sae", buf) == 0)
scan_info->security = MESHD_SECURITY_SAE;
else
scan_info->security = MESHD_SECURITY_NONE;
- }
- else if (strcasecmp(key, "Frequency") == 0) {
+ } else if (strcasecmp(key, "Frequency") == 0) {
scan_info->channel = __frequency_to_channel(g_variant_get_uint16(val));
MESH_LOGD(" Channel : %d", scan_info->channel);
- }
- else if (strcasecmp(key, "Favorite") == 0) {
+ } else if (strcasecmp(key, "Favorite") == 0) {
const char *buf = g_variant_get_string(val, &len);
MESH_LOGD(" Favorite : %s", buf);
- }
- else if (strcasecmp(key, "Strength") == 0) {
+ } else if (strcasecmp(key, "Strength") == 0) {
scan_info->rssi = (gint)g_variant_get_byte(val);
MESH_LOGD(" RSSI : %d", scan_info->rssi);
}
g_variant_get(variant, "(a{sv})", &property);
while (g_variant_iter_loop(property, "{sv}", &key, &val)) {
- if (strcasecmp(key, "Name") == 0) {
+ if (strcasecmp(key, "Name") == 0) {
const char *buf = g_variant_get_string(val, &len);
result->mesh_id = g_strdup(buf);
MESH_LOGD(" Mesh ID : %s", result->mesh_id);
- }
- else if (strcasecmp(key, "BSSID") == 0) {
+ } else if (strcasecmp(key, "BSSID") == 0) {
const char *buf = g_variant_get_string(val, &len);
result->bssid = g_strdup(buf);
MESH_LOGD(" BSSID : %s", result->bssid);
- }
- else if (strcasecmp(key, "State") == 0) {
+ } else if (strcasecmp(key, "State") == 0) {
const char *buf = g_variant_get_string(val, &len);
MESH_LOGD(" State : %s", buf);
} else if (g_strcmp0(buf, "ready") == 0 || g_strcmp0(buf, "online") == 0) {
result->state = MESHD_CONNECTION_STATE_CONNECTED;
}
- }
- else if (strcasecmp(key, "Security") == 0) {
+ } else if (strcasecmp(key, "Security") == 0) {
const char *buf = g_variant_get_string(val, &len);
MESH_LOGD(" Security : %s", buf);
if (g_strcmp0("sae", buf) == 0)
result->security = MESHD_SECURITY_SAE;
else
result->security = MESHD_SECURITY_NONE;
- }
- else if (strcasecmp(key, "Frequency") == 0) {
+ } else if (strcasecmp(key, "Frequency") == 0) {
result->channel = __frequency_to_channel(g_variant_get_uint16(val));
MESH_LOGD(" Channel : %d", result->channel);
- }
- else if (strcasecmp(key, "Favorite") == 0) {
+ } else if (strcasecmp(key, "Favorite") == 0) {
const char *buf = g_variant_get_string(val, &len);
MESH_LOGD(" Favorite : %s", buf);
- }
- else if (strcasecmp(key, "Strength") == 0) {
+ } else if (strcasecmp(key, "Strength") == 0) {
gint rssi = (gint)g_variant_get_byte(val);
MESH_LOGD(" RSSI : %d", rssi);
}
return MESHD_ERROR_NONE;
}
-int mesh_gdbus_set_passphrase(mesh_service *service, mesh_scan_result_s *info,
- gchar *passphrase)
+int mesh_gdbus_set_passphrase(mesh_service *service, mesh_scan_result_s *info, gchar *passphrase)
{
GVariant *variant = NULL;
GError *error = NULL;
int ret = MESHD_ERROR_NONE;
cable_state_e cable_state = ETHERNET_CABLE_DETACHED;
- if (NULL == external_interface || NULL == state) {
+ if (NULL == external_interface || NULL == state)
return MESHD_ERROR_INVALID_PARAMETER;
- }
bool ex = _check_interface_exists(external_interface);
if (FALSE == ex) {
}
*state = FALSE;
- if (ETHERNET_CABLE_ATTACHED == cable_state) {
+ if (ETHERNET_CABLE_ATTACHED == cable_state)
*state = TRUE;
- }
return MESHD_ERROR_NONE;
-}
\ No newline at end of file
+}
mpath_data = g_variant_builder_end(&builder);
g_object_unref(mpath_data);
- }else
+ } else
MESH_LOGE("Failed to mesh_request_get_mpath_info");
return ret;
nla_parse(tb, CTRL_ATTR_MAX,
genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
- if (!tb[CTRL_ATTR_MCAST_GROUPS]) {
+ if (!tb[CTRL_ATTR_MCAST_GROUPS])
return NL_SKIP;
- }
nla_for_each_nested(mcast_group, tb[CTRL_ATTR_MCAST_GROUPS], rem_mcast_group) {
struct nlattr *tb_mcast_group[CTRL_ATTR_MCAST_GRP_MAX + 1];
return NL_SKIP;
}
-static int no_seq_check(struct nl_msg *msg, void *arg) {
+static int no_seq_check(struct nl_msg *msg, void *arg)
+{
NOTUSED(msg);
NOTUSED(arg);
MESH_LOGD("[Event] I/O received");
- while (nl_recvmsgs_report(state->nl_socket, state->cb) > 0) {
+ while (nl_recvmsgs_report(state->nl_socket, state->cb) > 0)
MESH_LOGD(" count [%02d]", ++test);
- }
/* Do not remove I/O source */
return TRUE;
static void _on_remove_event_io_handler()
{
- if(event_state) {
+ if (event_state) {
g_source_remove(event_state->event_source);
__clean_netlink_message(event_state);
[NL80211_STA_BSS_PARAM_BEACON_INTERVAL] = { .type = NLA_U16 },
};
- if (nla_parse_nested(bss_param_info, NL80211_STA_BSS_PARAM_MAX, bss_param_attr, bss_poilcy)) {
+ if (nla_parse_nested(bss_param_info, NL80211_STA_BSS_PARAM_MAX, bss_param_attr, bss_poilcy))
MESH_LOGE("failed to parse nested bss param attributes!");
- }
info = bss_param_info[NL80211_STA_BSS_PARAM_DTIM_PERIOD];
if (info) {
[NL80211_STA_INFO_TX_FAILED] = { .type = NLA_U32 },
[NL80211_STA_INFO_BEACON_LOSS] = { .type = NLA_U32},
[NL80211_STA_INFO_RX_DROP_MISC] = { .type = NLA_U64},
- [NL80211_STA_INFO_STA_FLAGS] =
- { .minlen = sizeof(struct nl80211_sta_flag_update) },
+ [NL80211_STA_INFO_STA_FLAGS] = { .minlen = sizeof(struct nl80211_sta_flag_update) },
[NL80211_STA_INFO_LOCAL_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_PEER_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_NONPEER_PM] = { .type = NLA_U32},
station_info->rx_bytes =
(unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_RX_BYTES64]);
MESH_LOGE(" rx bytes:\t%llu", station_info->rx_bytes);
- }
- else if (sinfo[NL80211_STA_INFO_RX_BYTES]) {
+ } else if (sinfo[NL80211_STA_INFO_RX_BYTES]) {
station_info->rx_bytes =
nla_get_u32(sinfo[NL80211_STA_INFO_RX_BYTES]);
MESH_LOGD(" rx bytes:\t%u", station_info->rx_bytes);
station_info->tx_bytes =
(unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_TX_BYTES64]);
MESH_LOGD(" tx bytes:\t%llu", station_info->rx_packets);
- }
- else if (sinfo[NL80211_STA_INFO_TX_BYTES]) {
+ } else if (sinfo[NL80211_STA_INFO_TX_BYTES]) {
station_info->tx_bytes =
nla_get_u32(sinfo[NL80211_STA_INFO_TX_BYTES]);
MESH_LOGD(" tx bytes:\t%u", station_info->tx_bytes);
/* Set callbacks for event handler */
nl_cb_set(event_state->cb, NL_CB_VALID, NL_CB_CUSTOM,
_on_receive_mesh_event, event_state);
- // No sequence checking for multicast messages.
+ /* No sequence checking for multicast messages. */
nl_cb_set(event_state->cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);
MESH_LOGD("Register event handler");
/* Change socket type to non-blocking */
ret = nl_socket_set_nonblocking(event_state->nl_socket);
- if (ret < 0) {
+ if (ret < 0)
MESH_LOGE("Failed to non-blocking socket [%s](%d)", nl_geterror(ret), ret);
- }
/* Register I/O callback to wait asynchronously */
if (FALSE == event_state->error_occured) {
if (state) {
/* Turn STP on */
ret = mesh_bridge_set_stp(bridge_interface, TRUE);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to turn STP on !");
return ret;
}
/* Set mesh parameters */
ret = mesh_netlink_set_mesh_parameter(mesh_interface,
"mesh_hwmp_rootmode", 4);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to set [mesh_hwmp_rootmode] : 4");
- }
ret = mesh_netlink_set_mesh_parameter(mesh_interface,
"mesh_gate_announcements", 1);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to set [mesh_gate_announcements] : 1");
- }
} else {
MESH_LOGE("External interface is not available !");
return MESHD_ERROR_OPERATION_FAILED;
/* Set mesh parameters */
ret = mesh_netlink_set_mesh_parameter(mesh_interface,
"mesh_hwmp_rootmode", 0);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to set [mesh_hwmp_rootmode] : 0");
- }
ret = mesh_netlink_set_mesh_parameter(mesh_interface,
"mesh_gate_announcements", 0);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to set [mesh_gate_announcements] : 0");
- }
/* Turn STP off */
ret = mesh_bridge_set_stp(bridge_interface, FALSE);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to turn STP off!");
return ret;
}
/* Add external interface into bridge */
ret = mesh_bridge_add_interface(bridge_interface, interface);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to add interface !");
return ret;
}
/* Make external interface down */
ret = mesh_interface_set(interface, NULL, MESH_INTERFACE_DOWN);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to change external interface state");
return ret;
}
/* Make external interface up with cleared IP */
ret = mesh_interface_set(interface, "0.0.0.0", MESH_INTERFACE_UP);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to change external interface state");
return ret;
}
/* Remove external interface into bridge */
ret = mesh_bridge_del_interface(bridge_interface, interface);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to remove interface !");
return ret;
}
ret = mesh_softap_set_configuration(softap_interface, ssid, mode, channel,
visibility, max_sta, security, passphrase);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to set Configuration for SoftAP");
return ret;
}
/* Add softAP interface into bridge */
ret = mesh_request_add_bridge_interface(bridge_interface, softap_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
return ret;
- }
return ret;
}
/* Remove softAP interface from bridge */
ret = mesh_request_remove_bridge_interface(bridge_interface, softap_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
return ret;
- }
return ret;
}
/* Get station info */
ret = mesh_netlink_get_station_info(mesh_interface, station_list);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
return ret;
- }
return MESHD_ERROR_NONE;
}
/* Get MPath info */
ret = mesh_netlink_get_mpath_info(mesh_interface, mpath_list);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
return ret;
- }
return MESHD_ERROR_NONE;
}
/* Get MPath info */
ret = mesh_netlink_register_event_handler();
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
return ret;
- }
return MESHD_ERROR_NONE;
}
/* Get MPath info */
ret = mesh_netlink_unregister_event_handler();
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
return ret;
- }
return MESHD_ERROR_NONE;
}
MESH_LOGD("[IPC] Enable mesh network");
ret = mesh_gdbus_create_mesh_interface(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to create mesh network");
return ret;
}
MESH_LOGD("[IPC] Disable mesh network");
ret = mesh_gdbus_remove_mesh_interface(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to create mesh network");
return ret;
}
MESH_LOGD("[IPC] Request scan for mesh network");
ret = mesh_gdbus_mesh_scan(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to request scan for mesh network");
return ret;
}
return MESHD_ERROR_NONE;
}
-int mesh_request_specific_scan(mesh_service *service, gchar *mesh_id,
- gint channel)
+int mesh_request_specific_scan(mesh_service *service, gchar *mesh_id, gint channel)
{
int ret;
if (NULL == service) {
MESH_LOGD("[IPC] Request specific scan for mesh network");
ret = mesh_gdbus_mesh_specific_scan(service, mesh_id, channel);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to request specific scan for mesh network");
return ret;
}
MESH_LOGD("[IPC] Cancel scan for mesh network");
ret = mesh_gdbus_mesh_cancel_scan(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to cancel scan for mesh network");
return ret;
}
MESH_LOGD("[IPC] Get mesh networks");
ret = mesh_gdbus_get_mesh_networks(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to get mesh networks !");
return ret;
}
item = (mesh_scan_result_s*)iter->data;
if (g_strcmp0(mesh_id, item->mesh_id) == 0) {
- if (item->channel == mesh_channel && item->security == sec)
- {
+ if (item->channel == mesh_channel && item->security == sec) {
*info = item;
found = TRUE;
break;
MESH_LOGD("[IPC] Get joined mesh network");
ret = mesh_gdbus_get_joined_mesh_network(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to get joined mesh network");
return ret;
}
MESH_LOGD("[IPC] Get connected mesh peers");
ret = mesh_gdbus_get_connected_peers(service);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to get connected mesh peers");
return ret;
}
MESH_LOGD("[IPC] Create a new mesh network");
ret = mesh_gdbus_create_network(service, mesh_id, channel, sec);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to create mesh network");
return ret;
}
/* Get mesh_id and channel from saved network */
ret = _select_matched_network(service->scanned_mesh_network,
mesh_id, channel, sec, &info);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to mesh_network_get_first_mesh_network");
return ret;
}
if (MESHD_SECURITY_NONE != sec) {
if (NULL != passphrase) {
ret = mesh_gdbus_set_passphrase(service, info, passphrase);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to set passphrase for mesh network");
return ret;
}
}
ret = mesh_gdbus_connect_network(service, info);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to connect mesh network");
return ret;
}
/* Get mesh_id and channel from saved network */
ret = _select_matched_network(service->scanned_mesh_network,
mesh_id, channel, sec, &info);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to _select_matched_network");
return ret;
}
ret = mesh_gdbus_disconnect_network(service, info);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to disconnect mesh network");
return ret;
}
/* Get mesh_id and channel from saved network */
ret = _select_matched_network(service->scanned_mesh_network,
mesh_id, channel, sec, &info);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to _select_matched_network");
return ret;
}
ret = mesh_gdbus_remove_network(service, info);
- if(MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret) {
MESH_LOGE("Failed to remove mesh network");
return ret;
}
/* Register event handler first */
ret = mesh_request_register_event_handler();
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to register mesh event handler !! [%d]", ret);
- }
ret = mesh_interface_initialize(service->interface_info);
if (MESHD_ERROR_NONE != ret) {
manager_complete_disable(object, invocation, ret);
ret = mesh_request_unregister_event_handler();
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to unregister mesh event handler !! [%d]", ret);
- }
/* Terminate daemon */
meshd_service_exit(service);
mesh_service *service = (mesh_service *)user_data;
ret = mesh_request_cancel_scan(service);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_cancel_scan");
- }
net_mesh_complete_cancel_scan(object, invocation, ret);
and decide to make gate enabled */
ret = mesh_request_set_mesh_gate(info->bridge_interface,
info->mesh_interface, info->external_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_set_mesh_gate [%d]", ret);
- }
#endif
net_mesh_complete_enable_mesh(object, invocation, ret);
}
ret = mesh_request_disable_network(service);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to disable mesh network !");
- }
/* Make response */
net_mesh_complete_disable_mesh(object, invocation, ret);
/* Set STP and gate_announce */
ret = mesh_request_set_mesh_gate(info->bridge_interface,
info->mesh_interface, info->external_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_set_mesh_gate [%d]", ret);
- }
net_mesh_complete_set_gate(object, invocation, ret);
ret = mesh_request_unset_mesh_gate(info->bridge_interface,
info->mesh_interface, info->external_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_unset_mesh_gate [%d]", ret);
- }
+
net_mesh_complete_unset_gate(object, invocation, ret);
return TRUE;
ret = mesh_request_set_softap_config(info->softap_interface,
ssid, mode, channel, visibility, max_sta,
security, passphrase);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_set_softap_config [%d]", ret);
- }
net_mesh_complete_set_softap(object, invocation, ret);
/* Check softAP interface and execute it */
ret = mesh_request_enable_softap(info->bridge_interface, info->softap_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_enable_softap [%d]", ret);
- }
net_mesh_complete_enable_softap(object, invocation, ret);
/* Destroy softAP */
ret = mesh_request_disable_softap(info->bridge_interface, info->softap_interface);
- if (MESHD_ERROR_NONE != ret) {
+ if (MESHD_ERROR_NONE != ret)
MESH_LOGE("Failed to mesh_request_disable_softap [%d]", ret);
- }
net_mesh_complete_disable_softap(object, invocation, ret);
* tx retries: 0
* tx failed: 0
* beacon loss: 0
- * signal: -64 dBm
+ * signal: -64 dBm
* signal avg: -63 dBm
* tx bitrate: 54.0 MBit/s
* rx bitrate: 5.5 MBit/s
*/
/* Get mesh path information and make variant data */
g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
-
+
iter = service->mpath_list;
while (iter != NULL) {
mesh_mpath_info_s *item = (mesh_mpath_info_s*)iter->data;
g_main_loop_quit(service->main_loop);
return TRUE;
-}
\ No newline at end of file
+}
}
ret = __close_hostapd_intf(&hostapd_ctrl_fd);
- if (ret != MESHD_ERROR_NONE) {
+ if (ret != MESHD_ERROR_NONE)
MESH_LOGE("__close_hostapd_intf is failed");
- }
kill(hostapd_pid, SIGTERM);
waitpid(hostapd_pid, NULL, 0);
return MESHD_ERROR_OPERATION_FAILED;
}
- return ret;
+ return ret;
}