diff --git a/src/chat/main/server.c b/src/chat/main/server.c index ddfc491..cc89441 100644 --- a/src/chat/main/server.c +++ b/src/chat/main/server.c @@ -50,7 +50,6 @@ int main(void) if (accepted == -1) continue; pthread_create(&thread, NULL, why2_communicate_thread, &accepted); - why2_register_connection(accepted); //PUSH TO LIST } return 0; diff --git a/src/chat/misc.c b/src/chat/misc.c index 6d257b0..89a0a77 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -133,6 +133,8 @@ void *why2_communicate_thread(void *arg) { printf("User connected.\t%d\n", *((int*) arg)); + why2_register_connection(*((int*) arg)); //TODO: Remove why2_register_connection if unused + const time_t startTime = time(NULL); char *received = NULL;