Print addresses before opening socket.

This commit is contained in:
2019-10-20 21:38:14 +01:00
parent 4f21cdfbc9
commit 8cad44149f

16
main.c
View File

@@ -86,6 +86,14 @@ int main()
printf(
"Running under %s %s (%s).\n", pkt_server_hello->sysname, pkt_server_hello->release, pkt_server_hello->machine);
ret = PrintNetworkAddresses();
if(ret)
{
printf("Error %d enumerating interfaces\n", errno);
return 1;
}
printf("Opening socket.\n");
sock_fd = NetSocket(AF_INET, SOCK_STREAM, 0);
if(sock_fd < 0)
@@ -105,14 +113,6 @@ int main()
return 1;
}
ret = PrintNetworkAddresses();
if(ret)
{
printf("Error %d enumerating interfaces\n", errno);
return 1;
}
ret = NetListen(sock_fd, 1);
if(ret)