Name: net-config
Summary: TIZEN Network Configuration service
-Version: 1.1.92
+Version: 1.1.93
Release: 2
Group: System/Network
License: Apache-2.0
exit(1);
}
- manager_server_vpn= g_dbus_object_manager_server_new(NETCONFIG_VPNSVC_PATH);
+ manager_server_vpn = g_dbus_object_manager_server_new(NETCONFIG_VPNSVC_PATH);
if (manager_server_vpn == NULL) {
ERR("Manager server for VPNSVC_PATH not created.");
exit(1);
int ret = -1;
FILE *fd = NULL;
char error_buf[MAX_SIZE_ERROR_BUFFER] = {0, };
- if(0 == access(ETHERNET_CABLE_STATUS, F_OK)) {
+ if (0 == access(ETHERNET_CABLE_STATUS, F_OK)) {
fd = fopen(ETHERNET_CABLE_STATUS, "r");
- if(fd == NULL) {
+ if (fd == NULL) {
ERR("Error! Could not open /sys/class/net/eth0/carrier file\n");
return -1;
}
int rv = 0;
errno = 0;
rv = fscanf(fd, "%d", &ret);
- if(rv < 0) {
+ if (rv < 0) {
strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
ERR("Error! Failed to read from file, rv:[%d], error:[%s]", rv, error_buf);
fclose(fd);
return -1;
}
- if(ret == 1) {
- if(!g_chk_eth_send_notification) {
+ if (ret == 1) {
+ if (!g_chk_eth_send_notification) {
ERR("/sys/class/net/eth0/carrier : [%d]", ret);
netconfig_network_notify_ethernet_cable_state("ATTACHED");
}
g_chk_eth_send_notification = TRUE;
} else if (ret == 0) {
- if(g_chk_eth_send_notification) {
+ if (g_chk_eth_send_notification) {
ERR("/sys/class/net/eth0/carrier : [%d]", ret);
netconfig_network_notify_ethernet_cable_state("DETACHED");
}
{
DBG("Driver session overlapped handling!");
ERR("WPS PBC SESSION OVERLAPPED");
-#if defined TIZEN_WEARABLE
+#if defined TIZEN_WEARABLE
return;
#else
netconfig_send_message_to_net_popup("WPS Error",
#endif
}
-int execute_mdnsd_script(char* op) {
+int execute_mdnsd_script(char* op)
+{
const char *path = "/usr/bin/mdnsresponder-server.sh";
char *const args[] = { "mdnsresponder-server.sh", op, NULL };
char *const envs[] = { NULL };
GDBusConnection *conn = NULL;
GError *error = NULL;
- conn = G_DBUS_CONNECTION (source_object);
+ conn = G_DBUS_CONNECTION(source_object);
reply = g_dbus_connection_call_finish(conn, res, &error);
if (reply == NULL) {
wifi_complete_get_config_ids(wifi, context, (const gchar * const *)result);
for (i = 0; i < length; i++)
- if(result[i])
+ if (result[i])
g_free(result[i]);
if (result)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_NAME, g_variant_new_string(conf->name));
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_SECURITY_TYPE, g_variant_new_string(conf->security_type));
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_HIDDEN, g_variant_new_string(conf->is_hidden));
- if (conf->proxy_address != NULL) {
+ if (conf->proxy_address != NULL)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_PROXYADDRESS, g_variant_new_string(conf->proxy_address));
- } else
+ else
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_PROXYADDRESS, g_variant_new_string("NONE"));
- if (conf->last_error != NULL) {
+ if (conf->last_error != NULL)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_FAILURE, g_variant_new_string(conf->last_error));
- } else
+ else
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_FAILURE, g_variant_new_string("ERROR_NONE"));
if (conf->eap_config != NULL) {
GDBusConnection *conn = NULL;
GError *error = NULL;
- conn = G_DBUS_CONNECTION (source_object);
+ conn = G_DBUS_CONNECTION(source_object);
reply = g_dbus_connection_call_finish(conn, res, &error);
if (reply == NULL) {
gboolean wps = bss_info->wps;
DBG("BSS found; SSID:%s security:%d WPS:%d", ssid, security, wps);
- if(bssid) {
+ if (bssid) {
snprintf(bssid_str, sizeof(bssid_buf), MACSTR, MAC2STR(bssid));
DBG("BSSID: %s", bssid_str);
}
gsize ie_len;
ie = g_variant_get_fixed_array(value, &ie_len, sizeof(guchar));
DBG("The IE : %s", ie);
- } else if(g_strcmp0(key, "BSSID") == 0) {
+ } else if (g_strcmp0(key, "BSSID") == 0) {
const guchar *bssid;
gsize bssid_len;
bssid = g_variant_get_fixed_array(value, &bssid_len, sizeof(guchar));
- if(bssid != NULL && bssid_len == 6)
- memcpy(bss_info->bssid,bssid,bssid_len);
+ if (bssid != NULL && bssid_len == 6)
+ memcpy(bss_info->bssid, bssid, bssid_len);
}
}
_wifi_state_changed(new_state);
- if (new_state == NETCONFIG_WIFI_CONNECTED) {
+ if (new_state == NETCONFIG_WIFI_CONNECTED)
_wifi_state_connected_activation();
- }
}
wifi_service_state_e wifi_state_get_service_state(void)
__netconfig_wifi_wps_request_scan(path);
g_free(path);
}
- }
- else if (NULL != strstr(error->message, ".InterfaceExists")) {
+ } else if (NULL != strstr(error->message, ".InterfaceExists")) {
INFO("Error Message %s %s", error->message, path);
g_variant_get(message, "(o)", &path);
if (path) {
__netconfig_wifi_wps_request_scan(path);
g_free(path);
- }
- else
+ } else
__netconfig_wifi_wps_request_scan(NULL);
} else {
ERR("Failed to create interface, Error: %d[%s]", error->code, error->message);