mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Added logs for error within SIOCGIFCONF section.
This commit is contained in:
1 parent
7aa3b1398e
commit
cdea71e901
1 file changed
+8
-2
@@ -146,10 +146,16 @@ bool GetIPList(std::vector<std::string> &IP4s) {
|
||||
ifc.ifc_len = sizeof(ifreqs);
|
||||
|
||||
int sd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sd < 0) return false;
|
||||
if (sd < 0) {
|
||||
ERROR_LOG(SCENET, "GetIPList failed to create socket (result = %i, errno = %i)", sd, errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
int r = ioctl(sd, SIOCGIFCONF, (char*)&ifc);
|
||||
if (r != 0) return false;
|
||||
if (r != 0) {
|
||||
ERROR_LOG(SCENET, "GetIPList failed ioctl/SIOCGIFCONF (result = %i, errno = %i)", r, errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < ifc.ifc_len / sizeof(struct ifreq); ++i)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user