checking for WHY2_CHAT_CODE_ACCEPT_MESSAGES from client
it was using the first received message
This commit is contained in:
parent
15e36f5919
commit
07eb596180
@ -962,6 +962,8 @@ void *why2_listen_server(void *socket)
|
||||
|
||||
if (server_uname == NULL) //GET SERVER USERNAME
|
||||
{
|
||||
if (code == NULL || strcmp(code, WHY2_CHAT_CODE_ACCEPT_MESSAGES) != 0) goto deallocation;
|
||||
|
||||
server_uname = why2_strdup(username); //GET USERNAME
|
||||
|
||||
//GET INFO
|
||||
@ -1097,13 +1099,14 @@ void *why2_listen_server(void *socket)
|
||||
printf("\n\n%s%s: %s\n\n", WHY2_CLEAR_AND_GO_UP, username, message);
|
||||
}
|
||||
|
||||
|
||||
if (!exiting && !continuing)
|
||||
{
|
||||
printf(">>> ");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
deallocation:
|
||||
|
||||
//DEALLOCATION
|
||||
why2_deallocate(read);
|
||||
why2_deallocate(username);
|
||||
|
Loading…
x
Reference in New Issue
Block a user