checking for WHY2_CHAT_CODE_ACCEPT_MESSAGES from client
All checks were successful
Codacy Scan / Codacy Security Scan (push) Successful in 1m9s
Test WHY2-core / test-why2 (why2, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-core-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m43s
Build WHY2-chat / test-why2 (./out/why2-chat-client, ./configure.sh, ubuntu-latest, ./out/why2-chat-server) (push) Successful in 2m51s
Test WHY2-logger / test-why2 (why2-logger, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-logger-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m53s
Test Project / test-project (./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./test) (push) Successful in 2m53s
All checks were successful
Codacy Scan / Codacy Security Scan (push) Successful in 1m9s
Test WHY2-core / test-why2 (why2, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-core-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m43s
Build WHY2-chat / test-why2 (./out/why2-chat-client, ./configure.sh, ubuntu-latest, ./out/why2-chat-server) (push) Successful in 2m51s
Test WHY2-logger / test-why2 (why2-logger, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-logger-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m53s
Test Project / test-project (./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./test) (push) Successful in 2m53s
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