SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -Werror -fvisibility=hidden")
SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -Wall -Werror -fvisibility=hidden -fvisibility-inlines-hidden")
-SET(CMAKE_C_FLAGS "-I${CMAKE_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/include ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
+SET(CMAKE_C_FLAGS "-I${CMAKE_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/include ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -D_GNU_SOURCE")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fPIE")
SET(CMAKE_C_FLAGS_RELEASE "-O2 -fPIE")
g_variant_get(message, "(t)", &tx_bytes);
g_variant_unref(message);
- GLOGD("Succeeded to get wifi total tx bytes %d", tx_bytes);
+ GLOGD("Succeeded to get wifi total tx bytes %llu", tx_bytes);
return ERROR_NONE;
}
g_variant_get(message, "(t)", &rx_bytes);
g_variant_unref(message);
- GLOGD("Succeeded to get wifi total rx bytes %d", rx_bytes);
+ GLOGD("Succeeded to get wifi total rx bytes %llu", rx_bytes);
return ERROR_NONE;
}
g_variant_get(message, "(t)", &tx_bytes);
g_variant_unref(message);
- GLOGD("Succeeded to get wifi last tx bytes %d", tx_bytes);
+ GLOGD("Succeeded to get wifi last tx bytes %llu", tx_bytes);
return ERROR_NONE;
}
g_variant_get(message, "(t)", &rx_bytes);
g_variant_unref(message);
- GLOGD("Succeeded to get wifi last rx bytes %d", rx_bytes);
+ GLOGD("Succeeded to get wifi last rx bytes %llu", rx_bytes);
return ERROR_NONE;
}
Name: net-config
Summary: TIZEN Network Configuration service
-Version: 1.1.137
+Version: 1.1.138
Release: 3
Group: System/Network
License: Apache-2.0
}
if (ioctl(sd->chk_conflict_sd, SIOCGIFINDEX, &net_ifr) == -1) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- INFO("ioctl Failed. Error..... = %s\n", error_buf);
+ INFO("ioctl Failed. Error..... = %s\n",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
goto err;
}
memcpy(addr.sll_addr, broadcast_addr, ETHER_ADDR_LEN);
if (sendto(sd->chk_conflict_sd, &arp, sizeof(arp), 0, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- INFO("Sending ARP Packet Failed. Error. = %s\n", error_buf);
+ INFO("Sending ARP Packet Failed. Error. = %s\n",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
/* close socket */
if (-1 < sd->chk_conflict_sd) {
close(sd->chk_conflict_sd);
/* reopen socket */
if ((sd->chk_conflict_sd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ARP))) == -1) {
INFO("socket %d", sd->chk_conflict_sd);
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- INFO("socket Failed. Error = %s\n", error_buf);
+ INFO("socket Failed. Error = %s\n",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
}
goto err;
} else {
sd->iteration = 0;
if ((sd->chk_conflict_sd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ARP))) == -1) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- INFO("socket Failed. Error = %s\n", error_buf);
+ INFO("socket Failed. Error = %s\n",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
g_free(sd);
return NULL;
} else {
int enabled = -1;
if ((buf = __read_mptcp_parameter(sysctlname)) == NULL) {
- ERR("Fail to read %s, sysctlname");
+ ERR("Fail to read %s", sysctlname);
return -1;
}
errno = 0;
rv = fscanf(fd, "%d", &ret);
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);
+ ERR("Error! Failed to read from file, rv:[%d], error:[%s]",
+ rv, strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
fclose(fd);
return -1;
}
errno = 0;
if (execve(file_path, args, envs) == -1) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Fail to execute command (%s)", error_buf);
+ DBG("Fail to execute command (%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
exit(1);
}
} else if (pid > 0) {
return rv;
}
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("failed to fork(%s)", error_buf);
+ DBG("failed to fork(%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -EIO;
}
errno = 0;
if (execve(file_path, args, envs) == -1) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Fail to execute command (%s)", error_buf);
+ DBG("Fail to execute command (%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
exit(1);
}
} else if (pid > 0) {
return rv;
}
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("failed to fork(%s)", error_buf);
+ DBG("failed to fork(%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -EIO;
}
errno = 0;
if (execv(args[0], args) == -1) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Fail to execute command (%s)", error_buf);
+ DBG("Fail to execute command (%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
g_strfreev(args);
exit(1);
}
return rv;
}
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("failed to fork(%s)", error_buf);
+ DBG("failed to fork(%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
g_strfreev(args);
return -EIO;
state = sigaction(SIGCHLD, &act, 0);
if (state != 0) {
- DBG("sigaction() : %d");
+ DBG("sigaction() : %d", state);
return -1;
}
errno = 0;
if (execvp(file_path, args) == -1) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- ERR("Fail to execute command (%s)", error_buf);
+ ERR("Fail to execute command (%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
} else if (pid > 0) {
return rv;
}
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("failed to fork(%s)", error_buf);
+ DBG("failed to fork(%s)",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -EIO;
}
state = sigaction(SIGCHLD, &act, 0);
if (state != 0) {
- DBG("sigaction() : %d");
+ DBG("sigaction() : %d", state);
return -1;
}
errno = 0;
sock = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (sock < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to create socket : %s", error_buf);
+ DBG("Failed to create socket : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
close(sock);
if (result < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to get ifr index: %s", error_buf);
+ DBG("Failed to get ifr index: %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
sock = socket(PF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to create socket : %s", error_buf);
+ DBG("Failed to create socket : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
if (ioctl(sock, SIOCADDRT, &rt) < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to set route address : %s", error_buf);
+ DBG("Failed to set route address : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
close(sock);
return -1;
}
sock = socket(PF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to create socket : %s", error_buf);
+ DBG("Failed to create socket : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
if (ioctl(sock, SIOCDELRT, &rt) < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to set route address : %s", error_buf);
+ DBG("Failed to set route address : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
close(sock);
return -1;
}
errno = 0;
if (inet_pton(AF_INET6, ip_addr, &rt.rtmsg_dst) < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("inet_pton failed : %s", error_buf);
+ DBG("inet_pton failed : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
if (gateway != NULL) {
rt.rtmsg_flags |= RTF_GATEWAY;
if (inet_pton(AF_INET6, gateway, &rt.rtmsg_gateway) < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("inet_pton failed : %s", error_buf);
+ DBG("inet_pton failed : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
}
fd = socket(AF_INET6, SOCK_DGRAM, 0);
if (fd < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to create socket : %s", error_buf);
+ DBG("Failed to create socket : %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return -1;
}
}
if ((err = ioctl(fd, SIOCADDRT, &rt)) < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("Failed to add route: %s", error_buf);
+ DBG("Failed to add route: %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
close(fd);
return -1;
}
agent.passphrase = g_strdup(g_variant_get_string(value, NULL));
updated = TRUE;
- DBG("Field [%s] - []", field);
+ DBG("Field [%s] - []", (gchar *)field);
if (agent.passphrase == NULL)
continue;
agent.wps_pbc = TRUE;
updated = TRUE;
- DBG("Field [%s] - [%d]", field, agent.wps_pbc);
+ DBG("Field [%s] - [%d]", (gchar *)field, agent.wps_pbc);
}
} else if (g_strcmp0(field, NETCONFIG_AGENT_FIELD_WPS_PIN) == 0) {
if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
agent.wps_pin = g_strdup(g_variant_get_string(value, NULL));
updated = TRUE;
- DBG("Field [%s] - [%s]", field, agent.wps_pin);
+ DBG("Field [%s] - [%s]", (gchar *)field, agent.wps_pin);
}
} else if (g_strcmp0(field, NETCONFIG_AGENT_FIELD_NAME) == 0) {
if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
agent.name = g_strdup(g_variant_get_string(value, NULL));
updated = TRUE;
- DBG("Field [%s] - [%s]", field, agent.name);
+ DBG("Field [%s] - [%s]", (gchar *)field, agent.name);
}
} else if (g_strcmp0(field, NETCONFIG_AGENT_FIELD_SSID) == 0) {
if (agent.ssid != NULL) {
memcpy(agent.ssid->data, array->data, array->len);
updated = TRUE;
- DBG("Field [%s] - []", field);
+ DBG("Field [%s] - []", (gchar *)field);
}
}
} else if (g_strcmp0(field, NETCONFIG_AGENT_FIELD_IDENTITY) == 0) {
agent.identity = g_strdup(g_variant_get_string(value, NULL));
updated = TRUE;
- DBG("Field [%s] - [%s]", field, agent.identity);
+ DBG("Field [%s] - [%s]", (gchar *)field, agent.identity);
}
#if defined TIZEN_CAPTIVE_PORTAL
} else if (g_strcmp0(field, NETCONFIG_AGENT_FIELD_USERNAME) == 0) {
agent.username = g_strdup(g_variant_get_string(value, NULL));
updated = TRUE;
- DBG("Field [%s] - [%s]", field, agent.username);
+ DBG("Field [%s] - [%s]", (gchar *)field, agent.username);
}
} else if (g_strcmp0(field, NETCONFIG_AGENT_FIELD_PASSWORD) == 0) {
if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
agent.password = g_strdup(g_variant_get_string(value, NULL));
updated = TRUE;
- DBG("Field [%s] - [%s]", field, agent.password);
+ DBG("Field [%s] - [%s]", (gchar *)field, agent.password);
}
#endif
}
g_return_val_if_fail(config_id != NULL, TRUE);
g_return_val_if_fail(key != NULL, TRUE);
- DBG("Key[%s] Value[%d]", key, value);
+ DBG("Key[%s] Value[%s]", key, value);
if (g_strcmp0(key, WIFI_CONFIG_PROXYADDRESS) == 0) {
ret = _set_field(config_id, WIFI_CONFIG_PROXY_METHOD, "manual");
result = g_file_get_contents(src, &buf, &length, &error);
if (result != TRUE) {
- ERR("Failed to read %s[%s]", error->message);
+ ERR("Failed to read [%s]", error->message);
g_error_free(error);
return result;
result = g_file_set_contents(dst, buf, length, &error);
if (result != TRUE) {
- ERR("Failed to write %s[%s]", error->message);
+ ERR("Failed to write [%s]", error->message);
g_error_free(error);
}
ioctl_sock = socket(PF_INET, SOCK_DGRAM, 0);
if (ioctl_sock < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- DBG("socket(PF_INET,SOCK_DGRAM) failed: %s", error_buf);
+ DBG("socket(PF_INET,SOCK_DGRAM) failed: %s",
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
return;
}
ret = ioctl(ioctl_sock, WLAN_IOCTL_SUSPEND, &ifr);
-
if (ret < 0) {
- strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
- ERR("Fail to issue private commands: %d. %s", ret, error_buf);
+ ERR("Fail to issue private commands: %d. %s", ret,
+ strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
} else {
old_state = value;
}