Minor fixes

This commit is contained in:
Andrey Borodin 2019-04-25 14:23:23 +05:00
parent 9cd12c9d4c
commit 5fa204b082
2 changed files with 2 additions and 1 deletions

View File

@ -502,7 +502,7 @@ od_auth_backend(od_server_t *server, machine_msg_t *msg)
while (1)
{
msg = od_read(&server->io, UINT32_MAX);
if (rc == -1) {
if (msg == NULL) {
od_error(&instance->logger, "auth", NULL, server,
"read error: %s",
od_io_error(&server->io));

View File

@ -192,6 +192,7 @@ od_read(od_io_t *io, uint32_t time_ms)
uint32_t size;
size = kiwi_read_size((char*)&header, sizeof(header));
assert(size > 0);
machine_msg_t *msg;
msg = machine_msg_create(sizeof(header) + size);