Typedef custom structures

This commit is contained in:
Igor Socec 2016-11-12 22:03:07 +01:00
parent 154f16a7f1
commit cad50493a6
6 changed files with 52 additions and 48 deletions

View file

@ -183,7 +183,7 @@ int main(int argc, char *argv[]) {
/* check if new client is availabe for connection */
if ( (client.socket == -1) && (new_client.socket != -1) ) {
/* copy new client information */
memcpy(&client, &new_client, sizeof(struct client_t));
memcpy(&client, &new_client, sizeof(client_t));
new_client.socket = -1;
fprintf(stderr, "[%s] client %s connected\n", NAME, client.ip_string);
/* ask client to provide a username before going to "character" mode */