Name: net-config
Summary: TIZEN Network Configuration service
-Version: 1.1.140
+Version: 1.1.141
Release: 3
Group: System/Network
License: Apache-2.0
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);
- sd->chk_conflict_sd = -1;
- }
+ close(sd->chk_conflict_sd);
+ sd->chk_conflict_sd = -1;
/* reopen socket */
if ((sd->chk_conflict_sd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ARP))) == -1) {
g_error_free(error);
}
- chmod(pathname, S_IRUSR | S_IWUSR);
- DBG("Successfully saved keyfile %s", pathname);
+ if (chmod(pathname, S_IRUSR | S_IWUSR) < 0)
+ DBG("Failed to change mode");
+ else
+ DBG("Successfully saved keyfile %s", pathname);
g_free(keydata);
}
return;
}
- fseek(fp, 0L, SEEK_SET);
- rv = fscanf(fp, "%17s", bssid);
+ rv = fseek(fp, 0L, SEEK_SET);
+ if (rv != 0) {
+ ERR("Fail to seek file");
+ fclose(fp);
+ return;
+ }
- if (rv < 0)
+ rv = fscanf(fp, "%17s", bssid);
+ if (rv < 0) {
ERR("Fail to read bssid");
+ fclose(fp);
+ return;
+ }
netconfig_set_vconf_str(VCONF_WIFI_BSSID_ADDRESS, bssid);