mirror of https://git.48k.eu/ogserver
client: add helper function to reset last client command information
just a preparation, no functional changes are intended.master
parent
16cc22df3e
commit
83b1be6589
12
src/client.c
12
src/client.c
|
@ -1330,6 +1330,12 @@ static int og_clear_image_placeholder()
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void og_client_reset_cmd(struct og_client *cli)
|
||||
{
|
||||
cli->last_cmd.id = 0;
|
||||
cli->last_cmd.type = OG_CMD_UNSPEC;
|
||||
}
|
||||
|
||||
int og_agent_state_process_response(struct og_client *cli)
|
||||
{
|
||||
enum og_cmd_type cmd_type = cli->last_cmd.type;
|
||||
|
@ -1392,8 +1398,7 @@ int og_agent_state_process_response(struct og_client *cli)
|
|||
}
|
||||
|
||||
if (!cli->content_length) {
|
||||
cli->last_cmd.id = 0;
|
||||
cli->last_cmd.type = OG_CMD_UNSPEC;
|
||||
og_client_reset_cmd(cli);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1456,8 +1461,7 @@ int og_agent_state_process_response(struct og_client *cli)
|
|||
/* ... cancel pending actions related to this task for this client here */
|
||||
}
|
||||
|
||||
cli->last_cmd.id = 0;
|
||||
cli->last_cmd.type = OG_CMD_UNSPEC;
|
||||
og_client_reset_cmd(cli);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue