From de83bc9f21db7d23d36930696b3665bbd5b95aa7 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 24 Jun 2020 14:44:30 +0200 Subject: [PATCH] Fixed accidental removal of line --- TCP.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TCP.c b/TCP.c index d53ae64..c8e3d52 100644 --- a/TCP.c +++ b/TCP.c @@ -11,6 +11,8 @@ int open_tcp(char* ip, int port) { struct hostent *server; struct sockaddr_in serv_addr; + server = gethostbyname(ip); + if (server == NULL) { perror("Error resolving host"); exit(1);