why is this code not printing the username? is it being copied corretly?
if (FD_ISSET(sock_fd, &listen_fds)) {
    client_fd = accept_connection(sock_fd, users, &user_list);

    Client *c = malloc(sizeof(Client));
    c->fd = client_fd;
    c->username = NULL;

    char *s1 = "What is your username?\r\n";
    if (write(c->fd, s1, strlen(s1)) < 0) {
        perror("write");
        exit(1);
    }

    char username[MAX_NAME + 1];

    int num_read = 0;

    char *input = partial_read(c->fd);
    printf("%s\n", input);

    num_read = strlen(input);

    if (num_read < 0) {
        perror("server: read username");
        exit(1);
    }

    if ((c->username = malloc((strlen(input) + 1) * sizeof(char))) == NULL) {
        perror("malloc at server");
        exit(1);
    }

    strcpy(username, input);
    username[num_read - 1] = '\0';

    strcpy(c->username, username);

    user = process_name(&user_list, client_fd, c->username);
    printf("%s", user->name);
    printf("returned name\r\n");

    if (client_fd > max_fd) {
        max_fd = client_fd;
    }
    FD_SET(client_fd, &all_fds);

    char *s = "Go ahead and enter user commands>\r\n";
    if (write(client_fd, s, strlen(s)) < 0) {
        perror("write");
        exit(1);
    }
}