Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Feb 21, 2024
1 parent 8d9cbb4 commit 4b84b3f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
17 changes: 10 additions & 7 deletions sources/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@ static od_frontend_status_t od_frontend_remote_server(od_relay_t *relay,

kiwi_be_type_t type = *data;
if (instance->config.log_debug)
od_debug(&instance->logger, "main", client, server, "server recieved %s",
kiwi_be_type_to_string(type));
od_debug(&instance->logger, "main", client, server,
"server recieved %s", kiwi_be_type_to_string(type));

int is_deploy = od_server_in_deploy(server);
int is_ready_for_query = 0;
Expand Down Expand Up @@ -1403,7 +1403,6 @@ static od_frontend_status_t od_frontend_remote_client(od_relay_t *relay,
*refcnt = 1 + *refcnt;
}


machine_msg_t *msg;
msg = od_frontend_rewrite_msg(data, size,
opname_start_offset,
Expand Down Expand Up @@ -1571,9 +1570,11 @@ static inline od_frontend_status_t od_frontend_poll_catchup(od_client_t *client,
}

static inline od_frontend_status_t
od_frontend_remote_process_server(od_server_t *server, od_client_t *client, int waitread)
od_frontend_remote_process_server(od_server_t *server, od_client_t *client,
int waitread)
{
od_frontend_status_t status = od_relay_step(&server->relay, waitread, 1);
od_frontend_status_t status =
od_relay_step(&server->relay, waitread, 1);
int rc;
od_instance_t *instance = client->global->instance;

Expand Down Expand Up @@ -1774,10 +1775,12 @@ static od_frontend_status_t od_frontend_remote(od_client_t *client)

if (status == OD_WAIT_SYNC) {
while (!od_server_synchronized(server)) {
status = od_frontend_remote_process_server(server, client, 1);
status = od_frontend_remote_process_server(
server, client, 1);
}
} else {
status = od_frontend_remote_process_server(server, client, 0);
status = od_frontend_remote_process_server(server,
client, 0);
}

if (status != OD_OK) {
Expand Down
6 changes: 4 additions & 2 deletions sources/relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ od_relay_process(od_relay_t *relay, int *progress, char *data, int size)
return OD_OK;
}

static inline od_frontend_status_t od_relay_pipeline(od_relay_t *relay, int stepserv)
static inline od_frontend_status_t od_relay_pipeline(od_relay_t *relay,
int stepserv)
{
char *current = od_readahead_pos_read(&relay->src->readahead);
char *end = od_readahead_pos(&relay->src->readahead);
Expand Down Expand Up @@ -361,7 +362,8 @@ static inline od_frontend_status_t od_relay_write(od_relay_t *relay)
return OD_OK;
}

static inline od_frontend_status_t od_relay_step(od_relay_t *relay, int waitread, int stepserv)
static inline od_frontend_status_t od_relay_step(od_relay_t *relay,
int waitread, int stepserv)
{
/* on read event */
od_frontend_status_t retstatus;
Expand Down
5 changes: 2 additions & 3 deletions third_party/machinarium/sources/cond.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ MACHINE_API int machine_cond_wait(machine_cond_t *obj, uint32_t time_ms)
return mm_cond_wait(cond, time_ms, 0);
}



MACHINE_API int machine_cond_wait_no_change(machine_cond_t *obj, uint32_t time_ms)
MACHINE_API int machine_cond_wait_no_change(machine_cond_t *obj,
uint32_t time_ms)
{
mm_cond_t *cond = mm_cast(mm_cond_t *, obj);
mm_errno_set(0);
Expand Down
3 changes: 2 additions & 1 deletion third_party/machinarium/sources/machinarium.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ MACHINE_API int machine_cond_try(machine_cond_t *);

MACHINE_API int machine_cond_wait(machine_cond_t *, uint32_t time_ms);

MACHINE_API int machine_cond_wait_no_change(machine_cond_t *obj, uint32_t time_ms);
MACHINE_API int machine_cond_wait_no_change(machine_cond_t *obj,
uint32_t time_ms);

/* msg */

Expand Down

0 comments on commit 4b84b3f

Please sign in to comment.