mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 03:49:37 +00:00
better error reporting in view.cgi verbose mode
This commit is contained in:
parent
26632bbbde
commit
561b352b27
@ -98,14 +98,18 @@ getSocketAndIPAddress(void *a, unsigned char *hostName, int port,
|
||||
proto = getprotobyname("tcp");
|
||||
if (!proto)
|
||||
{
|
||||
perror("getprotobyname failed");
|
||||
perror("getprotobyname");
|
||||
viewReport(a, "getprotobyname failed");
|
||||
viewReport(a, strerror(errno) ? strerror(errno) : "NULL");
|
||||
return -1;
|
||||
}
|
||||
|
||||
sock = socket(PF_INET, SOCK_STREAM, proto->p_proto);
|
||||
if (sock < 0)
|
||||
{
|
||||
perror("socket failed");
|
||||
perror("socket");
|
||||
viewReport(a, "socket failed");
|
||||
viewReport(a, strerror(errno) ? strerror(errno) : "NULL");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user