mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-04-24 00:00:04 +08:00
Fixed errno being corrupted by LOG_ERROR()
This commit is contained in:
@@ -505,24 +505,24 @@ static inline NSString* _EncodeBase64(NSString* string) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(@"Failed starting listening socket: %s (%i)", strerror(errno), errno);
|
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = GCDWebServerMakePosixError(errno);
|
*error = GCDWebServerMakePosixError(errno);
|
||||||
}
|
}
|
||||||
|
LOG_ERROR(@"Failed starting listening socket: %s (%i)", strerror(errno), errno);
|
||||||
close(listeningSocket);
|
close(listeningSocket);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(@"Failed binding listening socket: %s (%i)", strerror(errno), errno);
|
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = GCDWebServerMakePosixError(errno);
|
*error = GCDWebServerMakePosixError(errno);
|
||||||
}
|
}
|
||||||
|
LOG_ERROR(@"Failed binding listening socket: %s (%i)", strerror(errno), errno);
|
||||||
close(listeningSocket);
|
close(listeningSocket);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(@"Failed creating listening socket: %s (%i)", strerror(errno), errno);
|
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = GCDWebServerMakePosixError(errno);
|
*error = GCDWebServerMakePosixError(errno);
|
||||||
}
|
}
|
||||||
|
LOG_ERROR(@"Failed creating listening socket: %s (%i)", strerror(errno), errno);
|
||||||
}
|
}
|
||||||
return (_source ? YES : NO);
|
return (_source ? YES : NO);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user