proccessing fread output on CA

This commit is contained in:
Václav Šmejkal 2025-02-02 21:55:07 +01:00
parent 6c080a438c
commit 44be9ad2f6
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -1152,10 +1152,12 @@ void *why2_authority_communicate_thread(void *arg)
//ALLOCATE //ALLOCATE
buffer = why2_calloc(buffer_size + 1, sizeof(char)); buffer = why2_calloc(buffer_size + 1, sizeof(char));
fread(buffer, buffer_size, 1, cert); //READ //READ
if (fread(buffer, buffer_size, 1, cert) == 1)
//SEND STATUS {
why2_send_socket_code(NULL, NULL, NULL, connection, strcmp(buffer, message) == 0 ? WHY2_CHAT_CODE_SUCCESS : WHY2_CHAT_CODE_FAILURE); //SEND STATUS
why2_send_socket_code(NULL, NULL, NULL, connection, strcmp(buffer, message) == 0 ? WHY2_CHAT_CODE_SUCCESS : WHY2_CHAT_CODE_FAILURE);
}
//DEALLOCATION //DEALLOCATION
why2_deallocate(buffer); why2_deallocate(buffer);