Commit 792686ca authored by Maia Jejelava's avatar Maia Jejelava
Browse files

Bug fixed.

parent fe07e107
......@@ -3,6 +3,6 @@ bin_PROGRAMS = client chargen_server_TCP get_addresses echo_server_IPv6
client_SOURCES = client.c Socket.c
chargen_server_TCP_SOURCES = discard_server_TCP.c Socket.c
get_addresses_SOURCES = get_addresses.c Socket.c
echo_server_IPv6_SOURCES = echo_server.c Socket.c
echo_server_IPv6_LDFLAGS = -l pthread
echo_server_IPv6_SOURCES = echo_server_IPv6.c Socket.c
echo_server_IPv6_LDFLAGS = -pthread
......@@ -31,12 +31,12 @@ int main (int argc, char **argv) {
int server_fd;
int* thread_fd;
pthread_t client_thread;
struct sockaddr_in server_addr;
struct sockaddr_in6 server_addr;
//create an IPv6 socket
server_fd = socket_wrapper(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
memset(&server_addr, 0, sizeof(server_addr));
server_addr.sin_family = AF_INET6;
server_addr.sin6_family = AF_INET6;
#ifdef HAVE_SIN_LEN
server_addr.sin_len = sizeof(struct sockaddr_in);
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment